aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-09-01 06:32:13 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-09-01 06:32:13 -0400
commit9d7548d4ca3c52ecb58f098a32b0756cdf8f96ee (patch)
tree651f7058bbaa2d8b2855286380d614afcf505118 /include
parent31db6e9ea1dbdcf66b8227b4f7035dee1b1dd8c0 (diff)
parentbef69ea0dcce574a425feb0a5aa4c63dd108b9a6 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acnamesp.h2
-rw-r--r--include/asm-alpha/8253pit.h10
-rw-r--r--include/asm-alpha/Kbuild11
-rw-r--r--include/asm-alpha/a.out-core.h80
-rw-r--r--include/asm-alpha/a.out.h102
-rw-r--r--include/asm-alpha/agp.h22
-rw-r--r--include/asm-alpha/agp_backend.h42
-rw-r--r--include/asm-alpha/atomic.h267
-rw-r--r--include/asm-alpha/auxvec.h24
-rw-r--r--include/asm-alpha/barrier.h33
-rw-r--r--include/asm-alpha/bitops.h466
-rw-r--r--include/asm-alpha/bug.h28
-rw-r--r--include/asm-alpha/bugs.h20
-rw-r--r--include/asm-alpha/byteorder.h47
-rw-r--r--include/asm-alpha/cache.h23
-rw-r--r--include/asm-alpha/cacheflush.h74
-rw-r--r--include/asm-alpha/checksum.h75
-rw-r--r--include/asm-alpha/compiler.h130
-rw-r--r--include/asm-alpha/console.h75
-rw-r--r--include/asm-alpha/core_apecs.h517
-rw-r--r--include/asm-alpha/core_cia.h500
-rw-r--r--include/asm-alpha/core_irongate.h232
-rw-r--r--include/asm-alpha/core_lca.h361
-rw-r--r--include/asm-alpha/core_marvel.h378
-rw-r--r--include/asm-alpha/core_mcpcia.h381
-rw-r--r--include/asm-alpha/core_polaris.h110
-rw-r--r--include/asm-alpha/core_t2.h633
-rw-r--r--include/asm-alpha/core_titan.h410
-rw-r--r--include/asm-alpha/core_tsunami.h335
-rw-r--r--include/asm-alpha/core_wildfire.h318
-rw-r--r--include/asm-alpha/cputime.h6
-rw-r--r--include/asm-alpha/current.h9
-rw-r--r--include/asm-alpha/delay.h10
-rw-r--r--include/asm-alpha/device.h7
-rw-r--r--include/asm-alpha/div64.h1
-rw-r--r--include/asm-alpha/dma-mapping.h69
-rw-r--r--include/asm-alpha/dma.h376
-rw-r--r--include/asm-alpha/elf.h165
-rw-r--r--include/asm-alpha/emergency-restart.h6
-rw-r--r--include/asm-alpha/err_common.h118
-rw-r--r--include/asm-alpha/err_ev6.h6
-rw-r--r--include/asm-alpha/err_ev7.h202
-rw-r--r--include/asm-alpha/errno.h123
-rw-r--r--include/asm-alpha/fb.h13
-rw-r--r--include/asm-alpha/fcntl.h43
-rw-r--r--include/asm-alpha/floppy.h115
-rw-r--r--include/asm-alpha/fpu.h193
-rw-r--r--include/asm-alpha/futex.h6
-rw-r--r--include/asm-alpha/gct.h58
-rw-r--r--include/asm-alpha/gentrap.h37
-rw-r--r--include/asm-alpha/hardirq.h30
-rw-r--r--include/asm-alpha/hw_irq.h13
-rw-r--r--include/asm-alpha/hwrpb.h220
-rw-r--r--include/asm-alpha/io.h577
-rw-r--r--include/asm-alpha/io_trivial.h131
-rw-r--r--include/asm-alpha/ioctl.h66
-rw-r--r--include/asm-alpha/ioctls.h112
-rw-r--r--include/asm-alpha/ipcbuf.h28
-rw-r--r--include/asm-alpha/irq.h91
-rw-r--r--include/asm-alpha/irq_regs.h1
-rw-r--r--include/asm-alpha/jensen.h346
-rw-r--r--include/asm-alpha/kdebug.h1
-rw-r--r--include/asm-alpha/kmap_types.h32
-rw-r--r--include/asm-alpha/linkage.h6
-rw-r--r--include/asm-alpha/local.h118
-rw-r--r--include/asm-alpha/machvec.h134
-rw-r--r--include/asm-alpha/mc146818rtc.h27
-rw-r--r--include/asm-alpha/md.h13
-rw-r--r--include/asm-alpha/mman.h54
-rw-r--r--include/asm-alpha/mmu.h7
-rw-r--r--include/asm-alpha/mmu_context.h260
-rw-r--r--include/asm-alpha/mmzone.h115
-rw-r--r--include/asm-alpha/module.h23
-rw-r--r--include/asm-alpha/msgbuf.h27
-rw-r--r--include/asm-alpha/mutex.h9
-rw-r--r--include/asm-alpha/page.h98
-rw-r--r--include/asm-alpha/pal.h51
-rw-r--r--include/asm-alpha/param.h27
-rw-r--r--include/asm-alpha/parport.h18
-rw-r--r--include/asm-alpha/pci.h276
-rw-r--r--include/asm-alpha/percpu.h78
-rw-r--r--include/asm-alpha/pgalloc.h83
-rw-r--r--include/asm-alpha/pgtable.h380
-rw-r--r--include/asm-alpha/poll.h1
-rw-r--r--include/asm-alpha/posix_types.h123
-rw-r--r--include/asm-alpha/processor.h93
-rw-r--r--include/asm-alpha/ptrace.h83
-rw-r--r--include/asm-alpha/reg.h52
-rw-r--r--include/asm-alpha/regdef.h44
-rw-r--r--include/asm-alpha/resource.h22
-rw-r--r--include/asm-alpha/rtc.h10
-rw-r--r--include/asm-alpha/rwsem.h259
-rw-r--r--include/asm-alpha/scatterlist.h25
-rw-r--r--include/asm-alpha/sections.h7
-rw-r--r--include/asm-alpha/segment.h6
-rw-r--r--include/asm-alpha/sembuf.h22
-rw-r--r--include/asm-alpha/serial.h29
-rw-r--r--include/asm-alpha/setup.h6
-rw-r--r--include/asm-alpha/sfp-machine.h82
-rw-r--r--include/asm-alpha/shmbuf.h38
-rw-r--r--include/asm-alpha/shmparam.h6
-rw-r--r--include/asm-alpha/sigcontext.h34
-rw-r--r--include/asm-alpha/siginfo.h9
-rw-r--r--include/asm-alpha/signal.h172
-rw-r--r--include/asm-alpha/smp.h62
-rw-r--r--include/asm-alpha/socket.h70
-rw-r--r--include/asm-alpha/sockios.h16
-rw-r--r--include/asm-alpha/spinlock.h173
-rw-r--r--include/asm-alpha/spinlock_types.h20
-rw-r--r--include/asm-alpha/stat.h48
-rw-r--r--include/asm-alpha/statfs.h6
-rw-r--r--include/asm-alpha/string.h66
-rw-r--r--include/asm-alpha/suspend.h6
-rw-r--r--include/asm-alpha/sysinfo.h39
-rw-r--r--include/asm-alpha/system.h829
-rw-r--r--include/asm-alpha/termbits.h200
-rw-r--r--include/asm-alpha/termios.h146
-rw-r--r--include/asm-alpha/thread_info.h114
-rw-r--r--include/asm-alpha/timex.h31
-rw-r--r--include/asm-alpha/tlb.h15
-rw-r--r--include/asm-alpha/tlbflush.h151
-rw-r--r--include/asm-alpha/topology.h47
-rw-r--r--include/asm-alpha/types.h33
-rw-r--r--include/asm-alpha/uaccess.h511
-rw-r--r--include/asm-alpha/ucontext.h13
-rw-r--r--include/asm-alpha/unaligned.h11
-rw-r--r--include/asm-alpha/unistd.h464
-rw-r--r--include/asm-alpha/user.h53
-rw-r--r--include/asm-alpha/vga.h82
-rw-r--r--include/asm-alpha/xor.h855
-rw-r--r--include/asm-arm/plat-orion/cache-feroceon-l2.h11
-rw-r--r--include/asm-arm/plat-orion/ehci-orion.h19
-rw-r--r--include/asm-arm/plat-orion/irq.h17
-rw-r--r--include/asm-arm/plat-orion/mv_xor.h28
-rw-r--r--include/asm-arm/plat-orion/orion_nand.h25
-rw-r--r--include/asm-arm/plat-orion/pcie.h32
-rw-r--r--include/asm-arm/plat-orion/time.h17
-rw-r--r--include/asm-arm/plat-s3c/regs-nand.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-timer.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-watchdog.h2
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2410.h4
-rw-r--r--include/asm-blackfin/.gitignore1
-rw-r--r--include/asm-blackfin/Kbuild3
-rw-r--r--include/asm-blackfin/a.out.h19
-rw-r--r--include/asm-blackfin/atomic.h144
-rw-r--r--include/asm-blackfin/auxvec.h4
-rw-r--r--include/asm-blackfin/bfin-global.h131
-rw-r--r--include/asm-blackfin/bfin5xx_spi.h137
-rw-r--r--include/asm-blackfin/bfin_simple_timer.h13
-rw-r--r--include/asm-blackfin/bfin_sport.h175
-rw-r--r--include/asm-blackfin/bitops.h218
-rw-r--r--include/asm-blackfin/blackfin.h92
-rw-r--r--include/asm-blackfin/bug.h17
-rw-r--r--include/asm-blackfin/bugs.h16
-rw-r--r--include/asm-blackfin/byteorder.h48
-rw-r--r--include/asm-blackfin/cache.h29
-rw-r--r--include/asm-blackfin/cacheflush.h90
-rw-r--r--include/asm-blackfin/checksum.h100
-rw-r--r--include/asm-blackfin/cplb-mpu.h61
-rw-r--r--include/asm-blackfin/cplb.h110
-rw-r--r--include/asm-blackfin/cplbinit.h95
-rw-r--r--include/asm-blackfin/cpumask.h6
-rw-r--r--include/asm-blackfin/cputime.h6
-rw-r--r--include/asm-blackfin/current.h23
-rw-r--r--include/asm-blackfin/delay.h62
-rw-r--r--include/asm-blackfin/device.h7
-rw-r--r--include/asm-blackfin/div64.h1
-rw-r--r--include/asm-blackfin/dma-mapping.h83
-rw-r--r--include/asm-blackfin/dma.h205
-rw-r--r--include/asm-blackfin/dpmc.h58
-rw-r--r--include/asm-blackfin/early_printk.h28
-rw-r--r--include/asm-blackfin/elf.h127
-rw-r--r--include/asm-blackfin/emergency-restart.h6
-rw-r--r--include/asm-blackfin/entry.h61
-rw-r--r--include/asm-blackfin/errno.h6
-rw-r--r--include/asm-blackfin/fb.h12
-rw-r--r--include/asm-blackfin/fcntl.h13
-rw-r--r--include/asm-blackfin/fixed_code.h22
-rw-r--r--include/asm-blackfin/flat.h58
-rw-r--r--include/asm-blackfin/futex.h6
-rw-r--r--include/asm-blackfin/gpio.h456
-rw-r--r--include/asm-blackfin/gptimers.h191
-rw-r--r--include/asm-blackfin/hardirq.h45
-rw-r--r--include/asm-blackfin/hw_irq.h6
-rw-r--r--include/asm-blackfin/io.h212
-rw-r--r--include/asm-blackfin/ioctl.h1
-rw-r--r--include/asm-blackfin/ioctls.h87
-rw-r--r--include/asm-blackfin/ipcbuf.h30
-rw-r--r--include/asm-blackfin/irq.h72
-rw-r--r--include/asm-blackfin/irq_handler.h33
-rw-r--r--include/asm-blackfin/irq_regs.h1
-rw-r--r--include/asm-blackfin/kdebug.h1
-rw-r--r--include/asm-blackfin/kgdb.h184
-rw-r--r--include/asm-blackfin/kmap_types.h21
-rw-r--r--include/asm-blackfin/l1layout.h31
-rw-r--r--include/asm-blackfin/linkage.h7
-rw-r--r--include/asm-blackfin/local.h6
-rw-r--r--include/asm-blackfin/mach-bf527/anomaly.h104
-rw-r--r--include/asm-blackfin/mach-bf527/bf527.h127
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_serial_5xx.h195
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_sir.h142
-rw-r--r--include/asm-blackfin/mach-bf527/blackfin.h93
-rw-r--r--include/asm-blackfin/mach-bf527/cdefBF522.h46
-rw-r--r--include/asm-blackfin/mach-bf527/cdefBF525.h461
-rw-r--r--include/asm-blackfin/mach-bf527/cdefBF527.h626
-rw-r--r--include/asm-blackfin/mach-bf527/cdefBF52x_base.h1204
-rw-r--r--include/asm-blackfin/mach-bf527/defBF522.h42
-rw-r--r--include/asm-blackfin/mach-bf527/defBF525.h713
-rw-r--r--include/asm-blackfin/mach-bf527/defBF527.h1090
-rw-r--r--include/asm-blackfin/mach-bf527/defBF52x_base.h2014
-rw-r--r--include/asm-blackfin/mach-bf527/dma.h62
-rw-r--r--include/asm-blackfin/mach-bf527/irq.h259
-rw-r--r--include/asm-blackfin/mach-bf527/mem_init.h310
-rw-r--r--include/asm-blackfin/mach-bf527/mem_map.h97
-rw-r--r--include/asm-blackfin/mach-bf527/portmux.h207
-rw-r--r--include/asm-blackfin/mach-bf533/anomaly.h272
-rw-r--r--include/asm-blackfin/mach-bf533/bf533.h161
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_serial_5xx.h164
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_sir.h125
-rw-r--r--include/asm-blackfin/mach-bf533/blackfin.h60
-rw-r--r--include/asm-blackfin/mach-bf533/cdefBF532.h767
-rw-r--r--include/asm-blackfin/mach-bf533/defBF532.h1266
-rw-r--r--include/asm-blackfin/mach-bf533/dma.h54
-rw-r--r--include/asm-blackfin/mach-bf533/irq.h173
-rw-r--r--include/asm-blackfin/mach-bf533/mem_init.h297
-rw-r--r--include/asm-blackfin/mach-bf533/mem_map.h166
-rw-r--r--include/asm-blackfin/mach-bf533/portmux.h67
-rw-r--r--include/asm-blackfin/mach-bf537/anomaly.h163
-rw-r--r--include/asm-blackfin/mach-bf537/bf537.h141
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_serial_5xx.h195
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_sir.h142
-rw-r--r--include/asm-blackfin/mach-bf537/blackfin.h165
-rw-r--r--include/asm-blackfin/mach-bf537/cdefBF534.h1819
-rw-r--r--include/asm-blackfin/mach-bf537/cdefBF537.h206
-rw-r--r--include/asm-blackfin/mach-bf537/defBF534.h2527
-rw-r--r--include/asm-blackfin/mach-bf537/defBF537.h405
-rw-r--r--include/asm-blackfin/mach-bf537/dma.h55
-rw-r--r--include/asm-blackfin/mach-bf537/irq.h214
-rw-r--r--include/asm-blackfin/mach-bf537/mem_init.h303
-rw-r--r--include/asm-blackfin/mach-bf537/mem_map.h174
-rw-r--r--include/asm-blackfin/mach-bf537/portmux.h144
-rw-r--r--include/asm-blackfin/mach-bf548/anomaly.h100
-rw-r--r--include/asm-blackfin/mach-bf548/bf548.h127
-rw-r--r--include/asm-blackfin/mach-bf548/bf54x-lq043.h30
-rw-r--r--include/asm-blackfin/mach-bf548/bf54x_keys.h17
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_serial_5xx.h220
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_sir.h166
-rw-r--r--include/asm-blackfin/mach-bf548/blackfin.h190
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF542.h590
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF544.h945
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF547.h832
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF548.h1577
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF549.h1863
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF54x_base.h2750
-rw-r--r--include/asm-blackfin/mach-bf548/defBF542.h925
-rw-r--r--include/asm-blackfin/mach-bf548/defBF544.h707
-rw-r--r--include/asm-blackfin/mach-bf548/defBF547.h1244
-rw-r--r--include/asm-blackfin/mach-bf548/defBF548.h1627
-rw-r--r--include/asm-blackfin/mach-bf548/defBF549.h2737
-rw-r--r--include/asm-blackfin/mach-bf548/defBF54x_base.h3956
-rw-r--r--include/asm-blackfin/mach-bf548/dma.h76
-rw-r--r--include/asm-blackfin/mach-bf548/gpio.h219
-rw-r--r--include/asm-blackfin/mach-bf548/irq.h501
-rw-r--r--include/asm-blackfin/mach-bf548/mem_init.h255
-rw-r--r--include/asm-blackfin/mach-bf548/mem_map.h111
-rw-r--r--include/asm-blackfin/mach-bf548/portmux.h286
-rw-r--r--include/asm-blackfin/mach-bf561/anomaly.h274
-rw-r--r--include/asm-blackfin/mach-bf561/bf561.h223
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_serial_5xx.h164
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_sir.h125
-rw-r--r--include/asm-blackfin/mach-bf561/blackfin.h87
-rw-r--r--include/asm-blackfin/mach-bf561/cdefBF561.h1579
-rw-r--r--include/asm-blackfin/mach-bf561/defBF561.h1758
-rw-r--r--include/asm-blackfin/mach-bf561/dma.h35
-rw-r--r--include/asm-blackfin/mach-bf561/irq.h447
-rw-r--r--include/asm-blackfin/mach-bf561/mem_init.h295
-rw-r--r--include/asm-blackfin/mach-bf561/mem_map.h78
-rw-r--r--include/asm-blackfin/mach-bf561/portmux.h89
-rw-r--r--include/asm-blackfin/mach-common/cdef_LPBlackfin.h336
-rw-r--r--include/asm-blackfin/mach-common/clocks.h70
-rw-r--r--include/asm-blackfin/mach-common/context.S355
-rw-r--r--include/asm-blackfin/mach-common/def_LPBlackfin.h712
-rw-r--r--include/asm-blackfin/mem_map.h12
-rw-r--r--include/asm-blackfin/mman.h43
-rw-r--r--include/asm-blackfin/mmu.h32
-rw-r--r--include/asm-blackfin/mmu_context.h181
-rw-r--r--include/asm-blackfin/module.h20
-rw-r--r--include/asm-blackfin/msgbuf.h31
-rw-r--r--include/asm-blackfin/mutex.h9
-rw-r--r--include/asm-blackfin/nand.h47
-rw-r--r--include/asm-blackfin/page.h88
-rw-r--r--include/asm-blackfin/page_offset.h6
-rw-r--r--include/asm-blackfin/param.h22
-rw-r--r--include/asm-blackfin/pci.h148
-rw-r--r--include/asm-blackfin/percpu.h6
-rw-r--r--include/asm-blackfin/pgalloc.h8
-rw-r--r--include/asm-blackfin/pgtable.h96
-rw-r--r--include/asm-blackfin/poll.h24
-rw-r--r--include/asm-blackfin/portmux.h1188
-rw-r--r--include/asm-blackfin/posix_types.h61
-rw-r--r--include/asm-blackfin/processor.h158
-rw-r--r--include/asm-blackfin/ptrace.h168
-rw-r--r--include/asm-blackfin/reboot.h20
-rw-r--r--include/asm-blackfin/resource.h6
-rw-r--r--include/asm-blackfin/scatterlist.h28
-rw-r--r--include/asm-blackfin/sections.h7
-rw-r--r--include/asm-blackfin/segment.h7
-rw-r--r--include/asm-blackfin/sembuf.h25
-rw-r--r--include/asm-blackfin/serial.h5
-rw-r--r--include/asm-blackfin/setup.h17
-rw-r--r--include/asm-blackfin/shmbuf.h42
-rw-r--r--include/asm-blackfin/shmparam.h6
-rw-r--r--include/asm-blackfin/sigcontext.h55
-rw-r--r--include/asm-blackfin/siginfo.h35
-rw-r--r--include/asm-blackfin/signal.h160
-rw-r--r--include/asm-blackfin/socket.h56
-rw-r--r--include/asm-blackfin/sockios.h13
-rw-r--r--include/asm-blackfin/spinlock.h6
-rw-r--r--include/asm-blackfin/stat.h63
-rw-r--r--include/asm-blackfin/statfs.h6
-rw-r--r--include/asm-blackfin/string.h137
-rw-r--r--include/asm-blackfin/system.h221
-rw-r--r--include/asm-blackfin/termbits.h198
-rw-r--r--include/asm-blackfin/termios.h94
-rw-r--r--include/asm-blackfin/thread_info.h135
-rw-r--r--include/asm-blackfin/time.h40
-rw-r--r--include/asm-blackfin/timex.h23
-rw-r--r--include/asm-blackfin/tlb.h16
-rw-r--r--include/asm-blackfin/tlbflush.h56
-rw-r--r--include/asm-blackfin/topology.h6
-rw-r--r--include/asm-blackfin/trace.h94
-rw-r--r--include/asm-blackfin/traps.h131
-rw-r--r--include/asm-blackfin/types.h36
-rw-r--r--include/asm-blackfin/uaccess.h271
-rw-r--r--include/asm-blackfin/ucontext.h17
-rw-r--r--include/asm-blackfin/unaligned.h11
-rw-r--r--include/asm-blackfin/unistd.h432
-rw-r--r--include/asm-blackfin/user.h89
-rw-r--r--include/asm-cris/Kbuild1
-rw-r--r--include/asm-frv/io.h2
-rw-r--r--include/asm-generic/ioctl.h4
-rw-r--r--include/asm-generic/rtc.h12
-rw-r--r--include/asm-h8300/Kbuild1
-rw-r--r--include/asm-h8300/a.out.h20
-rw-r--r--include/asm-h8300/atomic.h144
-rw-r--r--include/asm-h8300/auxvec.h4
-rw-r--r--include/asm-h8300/bitops.h212
-rw-r--r--include/asm-h8300/bootinfo.h2
-rw-r--r--include/asm-h8300/bug.h4
-rw-r--r--include/asm-h8300/bugs.h16
-rw-r--r--include/asm-h8300/byteorder.h13
-rw-r--r--include/asm-h8300/cache.h12
-rw-r--r--include/asm-h8300/cachectl.h14
-rw-r--r--include/asm-h8300/cacheflush.h39
-rw-r--r--include/asm-h8300/checksum.h102
-rw-r--r--include/asm-h8300/cputime.h6
-rw-r--r--include/asm-h8300/current.h25
-rw-r--r--include/asm-h8300/dbg.h2
-rw-r--r--include/asm-h8300/delay.h38
-rw-r--r--include/asm-h8300/device.h7
-rw-r--r--include/asm-h8300/div64.h1
-rw-r--r--include/asm-h8300/dma.h15
-rw-r--r--include/asm-h8300/elf.h104
-rw-r--r--include/asm-h8300/emergency-restart.h6
-rw-r--r--include/asm-h8300/errno.h6
-rw-r--r--include/asm-h8300/fb.h12
-rw-r--r--include/asm-h8300/fcntl.h11
-rw-r--r--include/asm-h8300/flat.h27
-rw-r--r--include/asm-h8300/fpu.h1
-rw-r--r--include/asm-h8300/futex.h6
-rw-r--r--include/asm-h8300/gpio.h52
-rw-r--r--include/asm-h8300/hardirq.h28
-rw-r--r--include/asm-h8300/hw_irq.h1
-rw-r--r--include/asm-h8300/io.h324
-rw-r--r--include/asm-h8300/ioctl.h1
-rw-r--r--include/asm-h8300/ioctls.h85
-rw-r--r--include/asm-h8300/ipcbuf.h29
-rw-r--r--include/asm-h8300/irq.h49
-rw-r--r--include/asm-h8300/irq_regs.h1
-rw-r--r--include/asm-h8300/kdebug.h1
-rw-r--r--include/asm-h8300/kmap_types.h21
-rw-r--r--include/asm-h8300/linkage.h8
-rw-r--r--include/asm-h8300/local.h6
-rw-r--r--include/asm-h8300/mc146818rtc.h9
-rw-r--r--include/asm-h8300/md.h13
-rw-r--r--include/asm-h8300/mman.h17
-rw-r--r--include/asm-h8300/mmu.h11
-rw-r--r--include/asm-h8300/mmu_context.h32
-rw-r--r--include/asm-h8300/module.h13
-rw-r--r--include/asm-h8300/msgbuf.h31
-rw-r--r--include/asm-h8300/mutex.h9
-rw-r--r--include/asm-h8300/page.h78
-rw-r--r--include/asm-h8300/page_offset.h3
-rw-r--r--include/asm-h8300/param.h20
-rw-r--r--include/asm-h8300/pci.h25
-rw-r--r--include/asm-h8300/percpu.h6
-rw-r--r--include/asm-h8300/pgalloc.h8
-rw-r--r--include/asm-h8300/pgtable.h73
-rw-r--r--include/asm-h8300/poll.h11
-rw-r--r--include/asm-h8300/posix_types.h60
-rw-r--r--include/asm-h8300/processor.h140
-rw-r--r--include/asm-h8300/ptrace.h64
-rw-r--r--include/asm-h8300/regs267x.h336
-rw-r--r--include/asm-h8300/regs306x.h212
-rw-r--r--include/asm-h8300/resource.h6
-rw-r--r--include/asm-h8300/scatterlist.h18
-rw-r--r--include/asm-h8300/sections.h6
-rw-r--r--include/asm-h8300/segment.h49
-rw-r--r--include/asm-h8300/sembuf.h25
-rw-r--r--include/asm-h8300/setup.h6
-rw-r--r--include/asm-h8300/sh_bios.h29
-rw-r--r--include/asm-h8300/shm.h31
-rw-r--r--include/asm-h8300/shmbuf.h42
-rw-r--r--include/asm-h8300/shmparam.h6
-rw-r--r--include/asm-h8300/sigcontext.h18
-rw-r--r--include/asm-h8300/siginfo.h6
-rw-r--r--include/asm-h8300/signal.h161
-rw-r--r--include/asm-h8300/smp.h1
-rw-r--r--include/asm-h8300/socket.h57
-rw-r--r--include/asm-h8300/sockios.h13
-rw-r--r--include/asm-h8300/spinlock.h6
-rw-r--r--include/asm-h8300/stat.h78
-rw-r--r--include/asm-h8300/statfs.h6
-rw-r--r--include/asm-h8300/string.h44
-rw-r--r--include/asm-h8300/system.h158
-rw-r--r--include/asm-h8300/target_time.h4
-rw-r--r--include/asm-h8300/termbits.h200
-rw-r--r--include/asm-h8300/termios.h92
-rw-r--r--include/asm-h8300/thread_info.h104
-rw-r--r--include/asm-h8300/timex.h19
-rw-r--r--include/asm-h8300/tlb.h23
-rw-r--r--include/asm-h8300/tlbflush.h55
-rw-r--r--include/asm-h8300/topology.h6
-rw-r--r--include/asm-h8300/traps.h37
-rw-r--r--include/asm-h8300/types.h33
-rw-r--r--include/asm-h8300/uaccess.h162
-rw-r--r--include/asm-h8300/ucontext.h12
-rw-r--r--include/asm-h8300/unaligned.h11
-rw-r--r--include/asm-h8300/unistd.h364
-rw-r--r--include/asm-h8300/user.h75
-rw-r--r--include/asm-h8300/virtconvert.h20
-rw-r--r--include/asm-mips/kexec.h2
-rw-r--r--include/asm-mips/unistd.h30
-rw-r--r--include/asm-mn10300/io.h2
-rw-r--r--include/asm-x86/amd_iommu_types.h8
-rw-r--r--include/asm-x86/atomic_64.h8
-rw-r--r--include/asm-x86/cpufeature.h2
-rw-r--r--include/asm-x86/efi.h2
-rw-r--r--include/asm-x86/genapic_32.h1
-rw-r--r--include/asm-x86/genapic_64.h1
-rw-r--r--include/asm-x86/geode.h3
-rw-r--r--include/asm-x86/hw_irq.h12
-rw-r--r--include/asm-x86/i387.h34
-rw-r--r--include/asm-x86/io.h18
-rw-r--r--include/asm-x86/irq_vectors.h11
-rw-r--r--include/asm-x86/kexec.h8
-rw-r--r--include/asm-x86/kvm_host.h2
-rw-r--r--include/asm-x86/mce.h1
-rw-r--r--include/asm-x86/mman.h1
-rw-r--r--include/asm-x86/mmconfig.h2
-rw-r--r--include/asm-x86/mmzone_32.h6
-rw-r--r--include/asm-x86/msr.h27
-rw-r--r--include/asm-x86/percpu.h2
-rw-r--r--include/asm-x86/pgtable_64.h2
-rw-r--r--include/asm-x86/processor.h23
-rw-r--r--include/asm-x86/spinlock.h4
-rw-r--r--include/asm-x86/uv/uv_bau.h5
-rw-r--r--include/asm-x86/xen/hypervisor.h1
-rw-r--r--include/crypto/hash.h18
-rw-r--r--include/linux/Kbuild3
-rw-r--r--include/linux/agp_backend.h5
-rw-r--r--include/linux/ata.h155
-rw-r--r--include/linux/bitmap.h1
-rw-r--r--include/linux/blkdev.h18
-rw-r--r--include/linux/bootmem.h4
-rw-r--r--include/linux/byteorder.h372
-rw-r--r--include/linux/capability.h15
-rw-r--r--include/linux/completion.h3
-rw-r--r--include/linux/cred.h50
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/device.h5
-rw-r--r--include/linux/exportfs.h21
-rw-r--r--include/linux/fb.h3
-rw-r--r--include/linux/firmware-map.h26
-rw-r--r--include/linux/fs_uart_pd.h1
-rw-r--r--include/linux/ftrace.h21
-rw-r--r--include/linux/genhd.h10
-rw-r--r--include/linux/i2c-id.h2
-rw-r--r--include/linux/i2c.h12
-rw-r--r--include/linux/if_tun.h1
-rw-r--r--include/linux/init.h1
-rw-r--r--include/linux/ioport.h1
-rw-r--r--include/linux/ivtv.h6
-rw-r--r--include/linux/ivtvfb.h6
-rw-r--r--include/linux/kernel.h14
-rw-r--r--include/linux/kexec.h4
-rw-r--r--include/linux/kvm.h4
-rw-r--r--include/linux/libata.h24
-rw-r--r--include/linux/lockdep.h70
-rw-r--r--include/linux/mm.h22
-rw-r--r--include/linux/mm_types.h2
-rw-r--r--include/linux/net.h14
-rw-r--r--include/linux/pci-acpi.h11
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--include/linux/pid.h9
-rw-r--r--include/linux/rcuclassic.h2
-rw-r--r--include/linux/reboot.h1
-rw-r--r--include/linux/rmap.h2
-rw-r--r--include/linux/sched.h32
-rw-r--r--include/linux/security.h39
-rw-r--r--include/linux/seq_file.h12
-rw-r--r--include/linux/skbuff.h10
-rw-r--r--include/linux/spinlock.h6
-rw-r--r--include/linux/spinlock_api_smp.h2
-rw-r--r--include/linux/stop_machine.h19
-rw-r--r--include/linux/suspend.h4
-rw-r--r--include/linux/swab.h309
-rw-r--r--include/linux/tick.h5
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_driver.h14
-rw-r--r--include/linux/usb.h5
-rw-r--r--include/linux/usb/musb.h98
-rw-r--r--include/linux/usb/serial.h3
-rw-r--r--include/linux/videodev2.h4
-rw-r--r--include/linux/vmalloc.h4
-rw-r--r--include/linux/vt_kern.h1
-rw-r--r--include/net/addrconf.h3
-rw-r--r--include/net/ip6_route.h7
-rw-r--r--include/net/ip_vs.h32
-rw-r--r--include/net/mac80211.h11
-rw-r--r--include/net/pkt_sched.h6
-rw-r--r--include/net/sch_generic.h19
-rw-r--r--include/scsi/scsi_device.h3
-rw-r--r--include/video/atmel_lcdc.h1
-rw-r--r--include/video/radeon.h4
535 files changed, 1513 insertions, 76281 deletions
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index 9ed70a050580..c34008507b69 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -182,7 +182,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
182 */ 182 */
183u32 acpi_ns_opens_scope(acpi_object_type type); 183u32 acpi_ns_opens_scope(acpi_object_type type);
184 184
185void 185acpi_status
186acpi_ns_build_external_path(struct acpi_namespace_node *node, 186acpi_ns_build_external_path(struct acpi_namespace_node *node,
187 acpi_size size, char *name_buffer); 187 acpi_size size, char *name_buffer);
188 188
diff --git a/include/asm-alpha/8253pit.h b/include/asm-alpha/8253pit.h
deleted file mode 100644
index fef5c1450e47..000000000000
--- a/include/asm-alpha/8253pit.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * 8253/8254 Programmable Interval Timer
3 */
4
5#ifndef _8253PIT_H
6#define _8253PIT_H
7
8#define PIT_TICK_RATE 1193180UL
9
10#endif
diff --git a/include/asm-alpha/Kbuild b/include/asm-alpha/Kbuild
deleted file mode 100644
index b7c8f188b313..000000000000
--- a/include/asm-alpha/Kbuild
+++ /dev/null
@@ -1,11 +0,0 @@
1include include/asm-generic/Kbuild.asm
2
3header-y += gentrap.h
4header-y += regdef.h
5header-y += pal.h
6header-y += reg.h
7
8unifdef-y += console.h
9unifdef-y += fpu.h
10unifdef-y += sysinfo.h
11unifdef-y += compiler.h
diff --git a/include/asm-alpha/a.out-core.h b/include/asm-alpha/a.out-core.h
deleted file mode 100644
index 9e33e92e524c..000000000000
--- a/include/asm-alpha/a.out-core.h
+++ /dev/null
@@ -1,80 +0,0 @@
1/* a.out coredump register dumper
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef _ASM_A_OUT_CORE_H
13#define _ASM_A_OUT_CORE_H
14
15#ifdef __KERNEL__
16
17#include <linux/user.h>
18
19/*
20 * Fill in the user structure for an ECOFF core dump.
21 */
22static inline void aout_dump_thread(struct pt_regs *pt, struct user *dump)
23{
24 /* switch stack follows right below pt_regs: */
25 struct switch_stack * sw = ((struct switch_stack *) pt) - 1;
26
27 dump->magic = CMAGIC;
28 dump->start_code = current->mm->start_code;
29 dump->start_data = current->mm->start_data;
30 dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
31 dump->u_tsize = ((current->mm->end_code - dump->start_code)
32 >> PAGE_SHIFT);
33 dump->u_dsize = ((current->mm->brk + PAGE_SIZE-1 - dump->start_data)
34 >> PAGE_SHIFT);
35 dump->u_ssize = (current->mm->start_stack - dump->start_stack
36 + PAGE_SIZE-1) >> PAGE_SHIFT;
37
38 /*
39 * We store the registers in an order/format that is
40 * compatible with DEC Unix/OSF/1 as this makes life easier
41 * for gdb.
42 */
43 dump->regs[EF_V0] = pt->r0;
44 dump->regs[EF_T0] = pt->r1;
45 dump->regs[EF_T1] = pt->r2;
46 dump->regs[EF_T2] = pt->r3;
47 dump->regs[EF_T3] = pt->r4;
48 dump->regs[EF_T4] = pt->r5;
49 dump->regs[EF_T5] = pt->r6;
50 dump->regs[EF_T6] = pt->r7;
51 dump->regs[EF_T7] = pt->r8;
52 dump->regs[EF_S0] = sw->r9;
53 dump->regs[EF_S1] = sw->r10;
54 dump->regs[EF_S2] = sw->r11;
55 dump->regs[EF_S3] = sw->r12;
56 dump->regs[EF_S4] = sw->r13;
57 dump->regs[EF_S5] = sw->r14;
58 dump->regs[EF_S6] = sw->r15;
59 dump->regs[EF_A3] = pt->r19;
60 dump->regs[EF_A4] = pt->r20;
61 dump->regs[EF_A5] = pt->r21;
62 dump->regs[EF_T8] = pt->r22;
63 dump->regs[EF_T9] = pt->r23;
64 dump->regs[EF_T10] = pt->r24;
65 dump->regs[EF_T11] = pt->r25;
66 dump->regs[EF_RA] = pt->r26;
67 dump->regs[EF_T12] = pt->r27;
68 dump->regs[EF_AT] = pt->r28;
69 dump->regs[EF_SP] = rdusp();
70 dump->regs[EF_PS] = pt->ps;
71 dump->regs[EF_PC] = pt->pc;
72 dump->regs[EF_GP] = pt->gp;
73 dump->regs[EF_A0] = pt->r16;
74 dump->regs[EF_A1] = pt->r17;
75 dump->regs[EF_A2] = pt->r18;
76 memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8);
77}
78
79#endif /* __KERNEL__ */
80#endif /* _ASM_A_OUT_CORE_H */
diff --git a/include/asm-alpha/a.out.h b/include/asm-alpha/a.out.h
deleted file mode 100644
index 02ce8473870a..000000000000
--- a/include/asm-alpha/a.out.h
+++ /dev/null
@@ -1,102 +0,0 @@
1#ifndef __ALPHA_A_OUT_H__
2#define __ALPHA_A_OUT_H__
3
4#include <linux/types.h>
5
6/*
7 * OSF/1 ECOFF header structs. ECOFF files consist of:
8 * - a file header (struct filehdr),
9 * - an a.out header (struct aouthdr),
10 * - one or more section headers (struct scnhdr).
11 * The filhdr's "f_nscns" field contains the
12 * number of section headers.
13 */
14
15struct filehdr
16{
17 /* OSF/1 "file" header */
18 __u16 f_magic, f_nscns;
19 __u32 f_timdat;
20 __u64 f_symptr;
21 __u32 f_nsyms;
22 __u16 f_opthdr, f_flags;
23};
24
25struct aouthdr
26{
27 __u64 info; /* after that it looks quite normal.. */
28 __u64 tsize;
29 __u64 dsize;
30 __u64 bsize;
31 __u64 entry;
32 __u64 text_start; /* with a few additions that actually make sense */
33 __u64 data_start;
34 __u64 bss_start;
35 __u32 gprmask, fprmask; /* bitmask of general & floating point regs used in binary */
36 __u64 gpvalue;
37};
38
39struct scnhdr
40{
41 char s_name[8];
42 __u64 s_paddr;
43 __u64 s_vaddr;
44 __u64 s_size;
45 __u64 s_scnptr;
46 __u64 s_relptr;
47 __u64 s_lnnoptr;
48 __u16 s_nreloc;
49 __u16 s_nlnno;
50 __u32 s_flags;
51};
52
53struct exec
54{
55 /* OSF/1 "file" header */
56 struct filehdr fh;
57 struct aouthdr ah;
58};
59
60/*
61 * Define's so that the kernel exec code can access the a.out header
62 * fields...
63 */
64#define a_info ah.info
65#define a_text ah.tsize
66#define a_data ah.dsize
67#define a_bss ah.bsize
68#define a_entry ah.entry
69#define a_textstart ah.text_start
70#define a_datastart ah.data_start
71#define a_bssstart ah.bss_start
72#define a_gprmask ah.gprmask
73#define a_fprmask ah.fprmask
74#define a_gpvalue ah.gpvalue
75
76#define N_TXTADDR(x) ((x).a_textstart)
77#define N_DATADDR(x) ((x).a_datastart)
78#define N_BSSADDR(x) ((x).a_bssstart)
79#define N_DRSIZE(x) 0
80#define N_TRSIZE(x) 0
81#define N_SYMSIZE(x) 0
82
83#define AOUTHSZ sizeof(struct aouthdr)
84#define SCNHSZ sizeof(struct scnhdr)
85#define SCNROUND 16
86
87#define N_TXTOFF(x) \
88 ((long) N_MAGIC(x) == ZMAGIC ? 0 : \
89 (sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1))
90
91#ifdef __KERNEL__
92
93/* Assume that start addresses below 4G belong to a TASO application.
94 Unfortunately, there is no proper bit in the exec header to check.
95 Worse, we have to notice the start address before swapping to use
96 /sbin/loader, which of course is _not_ a TASO application. */
97#define SET_AOUT_PERSONALITY(BFPM, EX) \
98 set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \
99 ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
100
101#endif /* __KERNEL__ */
102#endif /* __A_OUT_GNU_H__ */
diff --git a/include/asm-alpha/agp.h b/include/asm-alpha/agp.h
deleted file mode 100644
index 26c179135293..000000000000
--- a/include/asm-alpha/agp.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef AGP_H
2#define AGP_H 1
3
4#include <asm/io.h>
5
6/* dummy for now */
7
8#define map_page_into_agp(page)
9#define unmap_page_from_agp(page)
10#define flush_agp_cache() mb()
11
12/* Convert a physical address to an address suitable for the GART. */
13#define phys_to_gart(x) (x)
14#define gart_to_phys(x) (x)
15
16/* GATT allocation. Returns/accepts GATT kernel virtual address. */
17#define alloc_gatt_pages(order) \
18 ((char *)__get_free_pages(GFP_KERNEL, (order)))
19#define free_gatt_pages(table, order) \
20 free_pages((unsigned long)(table), (order))
21
22#endif
diff --git a/include/asm-alpha/agp_backend.h b/include/asm-alpha/agp_backend.h
deleted file mode 100644
index 55dd44a2cea7..000000000000
--- a/include/asm-alpha/agp_backend.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef _ALPHA_AGP_BACKEND_H
2#define _ALPHA_AGP_BACKEND_H 1
3
4typedef union _alpha_agp_mode {
5 struct {
6 u32 rate : 3;
7 u32 reserved0 : 1;
8 u32 fw : 1;
9 u32 fourgb : 1;
10 u32 reserved1 : 2;
11 u32 enable : 1;
12 u32 sba : 1;
13 u32 reserved2 : 14;
14 u32 rq : 8;
15 } bits;
16 u32 lw;
17} alpha_agp_mode;
18
19typedef struct _alpha_agp_info {
20 struct pci_controller *hose;
21 struct {
22 dma_addr_t bus_base;
23 unsigned long size;
24 void *sysdata;
25 } aperture;
26 alpha_agp_mode capability;
27 alpha_agp_mode mode;
28 void *private;
29 struct alpha_agp_ops *ops;
30} alpha_agp_info;
31
32struct alpha_agp_ops {
33 int (*setup)(alpha_agp_info *);
34 void (*cleanup)(alpha_agp_info *);
35 int (*configure)(alpha_agp_info *);
36 int (*bind)(alpha_agp_info *, off_t, struct agp_memory *);
37 int (*unbind)(alpha_agp_info *, off_t, struct agp_memory *);
38 unsigned long (*translate)(alpha_agp_info *, dma_addr_t);
39};
40
41
42#endif /* _ALPHA_AGP_BACKEND_H */
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
deleted file mode 100644
index ca88e54dec93..000000000000
--- a/include/asm-alpha/atomic.h
+++ /dev/null
@@ -1,267 +0,0 @@
1#ifndef _ALPHA_ATOMIC_H
2#define _ALPHA_ATOMIC_H
3
4#include <asm/barrier.h>
5#include <asm/system.h>
6
7/*
8 * Atomic operations that C can't guarantee us. Useful for
9 * resource counting etc...
10 *
11 * But use these as seldom as possible since they are much slower
12 * than regular operations.
13 */
14
15
16/*
17 * Counter is volatile to make sure gcc doesn't try to be clever
18 * and move things around on us. We need to use _exactly_ the address
19 * the user gave us, not some alias that contains the same information.
20 */
21typedef struct { volatile int counter; } atomic_t;
22typedef struct { volatile long counter; } atomic64_t;
23
24#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
25#define ATOMIC64_INIT(i) ( (atomic64_t) { (i) } )
26
27#define atomic_read(v) ((v)->counter + 0)
28#define atomic64_read(v) ((v)->counter + 0)
29
30#define atomic_set(v,i) ((v)->counter = (i))
31#define atomic64_set(v,i) ((v)->counter = (i))
32
33/*
34 * To get proper branch prediction for the main line, we must branch
35 * forward to code at the end of this object's .text section, then
36 * branch back to restart the operation.
37 */
38
39static __inline__ void atomic_add(int i, atomic_t * v)
40{
41 unsigned long temp;
42 __asm__ __volatile__(
43 "1: ldl_l %0,%1\n"
44 " addl %0,%2,%0\n"
45 " stl_c %0,%1\n"
46 " beq %0,2f\n"
47 ".subsection 2\n"
48 "2: br 1b\n"
49 ".previous"
50 :"=&r" (temp), "=m" (v->counter)
51 :"Ir" (i), "m" (v->counter));
52}
53
54static __inline__ void atomic64_add(long i, atomic64_t * v)
55{
56 unsigned long temp;
57 __asm__ __volatile__(
58 "1: ldq_l %0,%1\n"
59 " addq %0,%2,%0\n"
60 " stq_c %0,%1\n"
61 " beq %0,2f\n"
62 ".subsection 2\n"
63 "2: br 1b\n"
64 ".previous"
65 :"=&r" (temp), "=m" (v->counter)
66 :"Ir" (i), "m" (v->counter));
67}
68
69static __inline__ void atomic_sub(int i, atomic_t * v)
70{
71 unsigned long temp;
72 __asm__ __volatile__(
73 "1: ldl_l %0,%1\n"
74 " subl %0,%2,%0\n"
75 " stl_c %0,%1\n"
76 " beq %0,2f\n"
77 ".subsection 2\n"
78 "2: br 1b\n"
79 ".previous"
80 :"=&r" (temp), "=m" (v->counter)
81 :"Ir" (i), "m" (v->counter));
82}
83
84static __inline__ void atomic64_sub(long i, atomic64_t * v)
85{
86 unsigned long temp;
87 __asm__ __volatile__(
88 "1: ldq_l %0,%1\n"
89 " subq %0,%2,%0\n"
90 " stq_c %0,%1\n"
91 " beq %0,2f\n"
92 ".subsection 2\n"
93 "2: br 1b\n"
94 ".previous"
95 :"=&r" (temp), "=m" (v->counter)
96 :"Ir" (i), "m" (v->counter));
97}
98
99
100/*
101 * Same as above, but return the result value
102 */
103static inline int atomic_add_return(int i, atomic_t *v)
104{
105 long temp, result;
106 smp_mb();
107 __asm__ __volatile__(
108 "1: ldl_l %0,%1\n"
109 " addl %0,%3,%2\n"
110 " addl %0,%3,%0\n"
111 " stl_c %0,%1\n"
112 " beq %0,2f\n"
113 ".subsection 2\n"
114 "2: br 1b\n"
115 ".previous"
116 :"=&r" (temp), "=m" (v->counter), "=&r" (result)
117 :"Ir" (i), "m" (v->counter) : "memory");
118 smp_mb();
119 return result;
120}
121
122static __inline__ long atomic64_add_return(long i, atomic64_t * v)
123{
124 long temp, result;
125 smp_mb();
126 __asm__ __volatile__(
127 "1: ldq_l %0,%1\n"
128 " addq %0,%3,%2\n"
129 " addq %0,%3,%0\n"
130 " stq_c %0,%1\n"
131 " beq %0,2f\n"
132 ".subsection 2\n"
133 "2: br 1b\n"
134 ".previous"
135 :"=&r" (temp), "=m" (v->counter), "=&r" (result)
136 :"Ir" (i), "m" (v->counter) : "memory");
137 smp_mb();
138 return result;
139}
140
141static __inline__ long atomic_sub_return(int i, atomic_t * v)
142{
143 long temp, result;
144 smp_mb();
145 __asm__ __volatile__(
146 "1: ldl_l %0,%1\n"
147 " subl %0,%3,%2\n"
148 " subl %0,%3,%0\n"
149 " stl_c %0,%1\n"
150 " beq %0,2f\n"
151 ".subsection 2\n"
152 "2: br 1b\n"
153 ".previous"
154 :"=&r" (temp), "=m" (v->counter), "=&r" (result)
155 :"Ir" (i), "m" (v->counter) : "memory");
156 smp_mb();
157 return result;
158}
159
160static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
161{
162 long temp, result;
163 smp_mb();
164 __asm__ __volatile__(
165 "1: ldq_l %0,%1\n"
166 " subq %0,%3,%2\n"
167 " subq %0,%3,%0\n"
168 " stq_c %0,%1\n"
169 " beq %0,2f\n"
170 ".subsection 2\n"
171 "2: br 1b\n"
172 ".previous"
173 :"=&r" (temp), "=m" (v->counter), "=&r" (result)
174 :"Ir" (i), "m" (v->counter) : "memory");
175 smp_mb();
176 return result;
177}
178
179#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
180#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
181
182#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
183#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
184
185/**
186 * atomic_add_unless - add unless the number is a given value
187 * @v: pointer of type atomic_t
188 * @a: the amount to add to v...
189 * @u: ...unless v is equal to u.
190 *
191 * Atomically adds @a to @v, so long as it was not @u.
192 * Returns non-zero if @v was not @u, and zero otherwise.
193 */
194static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
195{
196 int c, old;
197 c = atomic_read(v);
198 for (;;) {
199 if (unlikely(c == (u)))
200 break;
201 old = atomic_cmpxchg((v), c, c + (a));
202 if (likely(old == c))
203 break;
204 c = old;
205 }
206 return c != (u);
207}
208
209#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
210
211/**
212 * atomic64_add_unless - add unless the number is a given value
213 * @v: pointer of type atomic64_t
214 * @a: the amount to add to v...
215 * @u: ...unless v is equal to u.
216 *
217 * Atomically adds @a to @v, so long as it was not @u.
218 * Returns non-zero if @v was not @u, and zero otherwise.
219 */
220static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
221{
222 long c, old;
223 c = atomic64_read(v);
224 for (;;) {
225 if (unlikely(c == (u)))
226 break;
227 old = atomic64_cmpxchg((v), c, c + (a));
228 if (likely(old == c))
229 break;
230 c = old;
231 }
232 return c != (u);
233}
234
235#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
236
237#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
238#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
239
240#define atomic_dec_return(v) atomic_sub_return(1,(v))
241#define atomic64_dec_return(v) atomic64_sub_return(1,(v))
242
243#define atomic_inc_return(v) atomic_add_return(1,(v))
244#define atomic64_inc_return(v) atomic64_add_return(1,(v))
245
246#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
247#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0)
248
249#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
250#define atomic64_inc_and_test(v) (atomic64_add_return(1, (v)) == 0)
251
252#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
253#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
254
255#define atomic_inc(v) atomic_add(1,(v))
256#define atomic64_inc(v) atomic64_add(1,(v))
257
258#define atomic_dec(v) atomic_sub(1,(v))
259#define atomic64_dec(v) atomic64_sub(1,(v))
260
261#define smp_mb__before_atomic_dec() smp_mb()
262#define smp_mb__after_atomic_dec() smp_mb()
263#define smp_mb__before_atomic_inc() smp_mb()
264#define smp_mb__after_atomic_inc() smp_mb()
265
266#include <asm-generic/atomic.h>
267#endif /* _ALPHA_ATOMIC_H */
diff --git a/include/asm-alpha/auxvec.h b/include/asm-alpha/auxvec.h
deleted file mode 100644
index e96fe880e310..000000000000
--- a/include/asm-alpha/auxvec.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef __ASM_ALPHA_AUXVEC_H
2#define __ASM_ALPHA_AUXVEC_H
3
4/* Reserve these numbers for any future use of a VDSO. */
5#if 0
6#define AT_SYSINFO 32
7#define AT_SYSINFO_EHDR 33
8#endif
9
10/* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the
11 value is -1, then the cache doesn't exist. Otherwise:
12
13 bit 0-3: Cache set-associativity; 0 means fully associative.
14 bit 4-7: Log2 of cacheline size.
15 bit 8-31: Size of the entire cache >> 8.
16 bit 32-63: Reserved.
17*/
18
19#define AT_L1I_CACHESHAPE 34
20#define AT_L1D_CACHESHAPE 35
21#define AT_L2_CACHESHAPE 36
22#define AT_L3_CACHESHAPE 37
23
24#endif /* __ASM_ALPHA_AUXVEC_H */
diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h
deleted file mode 100644
index ac78eba909bc..000000000000
--- a/include/asm-alpha/barrier.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __BARRIER_H
2#define __BARRIER_H
3
4#include <asm/compiler.h>
5
6#define mb() \
7__asm__ __volatile__("mb": : :"memory")
8
9#define rmb() \
10__asm__ __volatile__("mb": : :"memory")
11
12#define wmb() \
13__asm__ __volatile__("wmb": : :"memory")
14
15#define read_barrier_depends() \
16__asm__ __volatile__("mb": : :"memory")
17
18#ifdef CONFIG_SMP
19#define smp_mb() mb()
20#define smp_rmb() rmb()
21#define smp_wmb() wmb()
22#define smp_read_barrier_depends() read_barrier_depends()
23#else
24#define smp_mb() barrier()
25#define smp_rmb() barrier()
26#define smp_wmb() barrier()
27#define smp_read_barrier_depends() do { } while (0)
28#endif
29
30#define set_mb(var, value) \
31do { var = value; mb(); } while (0)
32
33#endif /* __BARRIER_H */
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
deleted file mode 100644
index 15f3ae25c511..000000000000
--- a/include/asm-alpha/bitops.h
+++ /dev/null
@@ -1,466 +0,0 @@
1#ifndef _ALPHA_BITOPS_H
2#define _ALPHA_BITOPS_H
3
4#ifndef _LINUX_BITOPS_H
5#error only <linux/bitops.h> can be included directly
6#endif
7
8#include <asm/compiler.h>
9#include <asm/barrier.h>
10
11/*
12 * Copyright 1994, Linus Torvalds.
13 */
14
15/*
16 * These have to be done with inline assembly: that way the bit-setting
17 * is guaranteed to be atomic. All bit operations return 0 if the bit
18 * was cleared before the operation and != 0 if it was not.
19 *
20 * To get proper branch prediction for the main line, we must branch
21 * forward to code at the end of this object's .text section, then
22 * branch back to restart the operation.
23 *
24 * bit 0 is the LSB of addr; bit 64 is the LSB of (addr+1).
25 */
26
27static inline void
28set_bit(unsigned long nr, volatile void * addr)
29{
30 unsigned long temp;
31 int *m = ((int *) addr) + (nr >> 5);
32
33 __asm__ __volatile__(
34 "1: ldl_l %0,%3\n"
35 " bis %0,%2,%0\n"
36 " stl_c %0,%1\n"
37 " beq %0,2f\n"
38 ".subsection 2\n"
39 "2: br 1b\n"
40 ".previous"
41 :"=&r" (temp), "=m" (*m)
42 :"Ir" (1UL << (nr & 31)), "m" (*m));
43}
44
45/*
46 * WARNING: non atomic version.
47 */
48static inline void
49__set_bit(unsigned long nr, volatile void * addr)
50{
51 int *m = ((int *) addr) + (nr >> 5);
52
53 *m |= 1 << (nr & 31);
54}
55
56#define smp_mb__before_clear_bit() smp_mb()
57#define smp_mb__after_clear_bit() smp_mb()
58
59static inline void
60clear_bit(unsigned long nr, volatile void * addr)
61{
62 unsigned long temp;
63 int *m = ((int *) addr) + (nr >> 5);
64
65 __asm__ __volatile__(
66 "1: ldl_l %0,%3\n"
67 " bic %0,%2,%0\n"
68 " stl_c %0,%1\n"
69 " beq %0,2f\n"
70 ".subsection 2\n"
71 "2: br 1b\n"
72 ".previous"
73 :"=&r" (temp), "=m" (*m)
74 :"Ir" (1UL << (nr & 31)), "m" (*m));
75}
76
77static inline void
78clear_bit_unlock(unsigned long nr, volatile void * addr)
79{
80 smp_mb();
81 clear_bit(nr, addr);
82}
83
84/*
85 * WARNING: non atomic version.
86 */
87static __inline__ void
88__clear_bit(unsigned long nr, volatile void * addr)
89{
90 int *m = ((int *) addr) + (nr >> 5);
91
92 *m &= ~(1 << (nr & 31));
93}
94
95static inline void
96__clear_bit_unlock(unsigned long nr, volatile void * addr)
97{
98 smp_mb();
99 __clear_bit(nr, addr);
100}
101
102static inline void
103change_bit(unsigned long nr, volatile void * addr)
104{
105 unsigned long temp;
106 int *m = ((int *) addr) + (nr >> 5);
107
108 __asm__ __volatile__(
109 "1: ldl_l %0,%3\n"
110 " xor %0,%2,%0\n"
111 " stl_c %0,%1\n"
112 " beq %0,2f\n"
113 ".subsection 2\n"
114 "2: br 1b\n"
115 ".previous"
116 :"=&r" (temp), "=m" (*m)
117 :"Ir" (1UL << (nr & 31)), "m" (*m));
118}
119
120/*
121 * WARNING: non atomic version.
122 */
123static __inline__ void
124__change_bit(unsigned long nr, volatile void * addr)
125{
126 int *m = ((int *) addr) + (nr >> 5);
127
128 *m ^= 1 << (nr & 31);
129}
130
131static inline int
132test_and_set_bit(unsigned long nr, volatile void *addr)
133{
134 unsigned long oldbit;
135 unsigned long temp;
136 int *m = ((int *) addr) + (nr >> 5);
137
138 __asm__ __volatile__(
139#ifdef CONFIG_SMP
140 " mb\n"
141#endif
142 "1: ldl_l %0,%4\n"
143 " and %0,%3,%2\n"
144 " bne %2,2f\n"
145 " xor %0,%3,%0\n"
146 " stl_c %0,%1\n"
147 " beq %0,3f\n"
148 "2:\n"
149#ifdef CONFIG_SMP
150 " mb\n"
151#endif
152 ".subsection 2\n"
153 "3: br 1b\n"
154 ".previous"
155 :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
156 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory");
157
158 return oldbit != 0;
159}
160
161static inline int
162test_and_set_bit_lock(unsigned long nr, volatile void *addr)
163{
164 unsigned long oldbit;
165 unsigned long temp;
166 int *m = ((int *) addr) + (nr >> 5);
167
168 __asm__ __volatile__(
169 "1: ldl_l %0,%4\n"
170 " and %0,%3,%2\n"
171 " bne %2,2f\n"
172 " xor %0,%3,%0\n"
173 " stl_c %0,%1\n"
174 " beq %0,3f\n"
175 "2:\n"
176#ifdef CONFIG_SMP
177 " mb\n"
178#endif
179 ".subsection 2\n"
180 "3: br 1b\n"
181 ".previous"
182 :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
183 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory");
184
185 return oldbit != 0;
186}
187
188/*
189 * WARNING: non atomic version.
190 */
191static inline int
192__test_and_set_bit(unsigned long nr, volatile void * addr)
193{
194 unsigned long mask = 1 << (nr & 0x1f);
195 int *m = ((int *) addr) + (nr >> 5);
196 int old = *m;
197
198 *m = old | mask;
199 return (old & mask) != 0;
200}
201
202static inline int
203test_and_clear_bit(unsigned long nr, volatile void * addr)
204{
205 unsigned long oldbit;
206 unsigned long temp;
207 int *m = ((int *) addr) + (nr >> 5);
208
209 __asm__ __volatile__(
210#ifdef CONFIG_SMP
211 " mb\n"
212#endif
213 "1: ldl_l %0,%4\n"
214 " and %0,%3,%2\n"
215 " beq %2,2f\n"
216 " xor %0,%3,%0\n"
217 " stl_c %0,%1\n"
218 " beq %0,3f\n"
219 "2:\n"
220#ifdef CONFIG_SMP
221 " mb\n"
222#endif
223 ".subsection 2\n"
224 "3: br 1b\n"
225 ".previous"
226 :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
227 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory");
228
229 return oldbit != 0;
230}
231
232/*
233 * WARNING: non atomic version.
234 */
235static inline int
236__test_and_clear_bit(unsigned long nr, volatile void * addr)
237{
238 unsigned long mask = 1 << (nr & 0x1f);
239 int *m = ((int *) addr) + (nr >> 5);
240 int old = *m;
241
242 *m = old & ~mask;
243 return (old & mask) != 0;
244}
245
246static inline int
247test_and_change_bit(unsigned long nr, volatile void * addr)
248{
249 unsigned long oldbit;
250 unsigned long temp;
251 int *m = ((int *) addr) + (nr >> 5);
252
253 __asm__ __volatile__(
254#ifdef CONFIG_SMP
255 " mb\n"
256#endif
257 "1: ldl_l %0,%4\n"
258 " and %0,%3,%2\n"
259 " xor %0,%3,%0\n"
260 " stl_c %0,%1\n"
261 " beq %0,3f\n"
262#ifdef CONFIG_SMP
263 " mb\n"
264#endif
265 ".subsection 2\n"
266 "3: br 1b\n"
267 ".previous"
268 :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
269 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory");
270
271 return oldbit != 0;
272}
273
274/*
275 * WARNING: non atomic version.
276 */
277static __inline__ int
278__test_and_change_bit(unsigned long nr, volatile void * addr)
279{
280 unsigned long mask = 1 << (nr & 0x1f);
281 int *m = ((int *) addr) + (nr >> 5);
282 int old = *m;
283
284 *m = old ^ mask;
285 return (old & mask) != 0;
286}
287
288static inline int
289test_bit(int nr, const volatile void * addr)
290{
291 return (1UL & (((const int *) addr)[nr >> 5] >> (nr & 31))) != 0UL;
292}
293
294/*
295 * ffz = Find First Zero in word. Undefined if no zero exists,
296 * so code should check against ~0UL first..
297 *
298 * Do a binary search on the bits. Due to the nature of large
299 * constants on the alpha, it is worthwhile to split the search.
300 */
301static inline unsigned long ffz_b(unsigned long x)
302{
303 unsigned long sum, x1, x2, x4;
304
305 x = ~x & -~x; /* set first 0 bit, clear others */
306 x1 = x & 0xAA;
307 x2 = x & 0xCC;
308 x4 = x & 0xF0;
309 sum = x2 ? 2 : 0;
310 sum += (x4 != 0) * 4;
311 sum += (x1 != 0);
312
313 return sum;
314}
315
316static inline unsigned long ffz(unsigned long word)
317{
318#if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67)
319 /* Whee. EV67 can calculate it directly. */
320 return __kernel_cttz(~word);
321#else
322 unsigned long bits, qofs, bofs;
323
324 bits = __kernel_cmpbge(word, ~0UL);
325 qofs = ffz_b(bits);
326 bits = __kernel_extbl(word, qofs);
327 bofs = ffz_b(bits);
328
329 return qofs*8 + bofs;
330#endif
331}
332
333/*
334 * __ffs = Find First set bit in word. Undefined if no set bit exists.
335 */
336static inline unsigned long __ffs(unsigned long word)
337{
338#if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67)
339 /* Whee. EV67 can calculate it directly. */
340 return __kernel_cttz(word);
341#else
342 unsigned long bits, qofs, bofs;
343
344 bits = __kernel_cmpbge(0, word);
345 qofs = ffz_b(bits);
346 bits = __kernel_extbl(word, qofs);
347 bofs = ffz_b(~bits);
348
349 return qofs*8 + bofs;
350#endif
351}
352
353#ifdef __KERNEL__
354
355/*
356 * ffs: find first bit set. This is defined the same way as
357 * the libc and compiler builtin ffs routines, therefore
358 * differs in spirit from the above __ffs.
359 */
360
361static inline int ffs(int word)
362{
363 int result = __ffs(word) + 1;
364 return word ? result : 0;
365}
366
367/*
368 * fls: find last bit set.
369 */
370#if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67)
371static inline int fls64(unsigned long word)
372{
373 return 64 - __kernel_ctlz(word);
374}
375#else
376extern const unsigned char __flsm1_tab[256];
377
378static inline int fls64(unsigned long x)
379{
380 unsigned long t, a, r;
381
382 t = __kernel_cmpbge (x, 0x0101010101010101UL);
383 a = __flsm1_tab[t];
384 t = __kernel_extbl (x, a);
385 r = a*8 + __flsm1_tab[t] + (x != 0);
386
387 return r;
388}
389#endif
390
391static inline unsigned long __fls(unsigned long x)
392{
393 return fls64(x) - 1;
394}
395
396static inline int fls(int x)
397{
398 return fls64((unsigned int) x);
399}
400
401/*
402 * hweightN: returns the hamming weight (i.e. the number
403 * of bits set) of a N-bit word
404 */
405
406#if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67)
407/* Whee. EV67 can calculate it directly. */
408static inline unsigned long hweight64(unsigned long w)
409{
410 return __kernel_ctpop(w);
411}
412
413static inline unsigned int hweight32(unsigned int w)
414{
415 return hweight64(w);
416}
417
418static inline unsigned int hweight16(unsigned int w)
419{
420 return hweight64(w & 0xffff);
421}
422
423static inline unsigned int hweight8(unsigned int w)
424{
425 return hweight64(w & 0xff);
426}
427#else
428#include <asm-generic/bitops/hweight.h>
429#endif
430
431#endif /* __KERNEL__ */
432
433#include <asm-generic/bitops/find.h>
434
435#ifdef __KERNEL__
436
437/*
438 * Every architecture must define this function. It's the fastest
439 * way of searching a 140-bit bitmap where the first 100 bits are
440 * unlikely to be set. It's guaranteed that at least one of the 140
441 * bits is set.
442 */
443static inline unsigned long
444sched_find_first_bit(unsigned long b[3])
445{
446 unsigned long b0 = b[0], b1 = b[1], b2 = b[2];
447 unsigned long ofs;
448
449 ofs = (b1 ? 64 : 128);
450 b1 = (b1 ? b1 : b2);
451 ofs = (b0 ? 0 : ofs);
452 b0 = (b0 ? b0 : b1);
453
454 return __ffs(b0) + ofs;
455}
456
457#include <asm-generic/bitops/ext2-non-atomic.h>
458
459#define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a)
460#define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a)
461
462#include <asm-generic/bitops/minix.h>
463
464#endif /* __KERNEL__ */
465
466#endif /* _ALPHA_BITOPS_H */
diff --git a/include/asm-alpha/bug.h b/include/asm-alpha/bug.h
deleted file mode 100644
index 695a5ee4b5d3..000000000000
--- a/include/asm-alpha/bug.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef _ALPHA_BUG_H
2#define _ALPHA_BUG_H
3
4#include <linux/linkage.h>
5
6#ifdef CONFIG_BUG
7#include <asm/pal.h>
8
9/* ??? Would be nice to use .gprel32 here, but we can't be sure that the
10 function loaded the GP, so this could fail in modules. */
11static inline void ATTRIB_NORET __BUG(const char *file, int line)
12{
13 __asm__ __volatile__(
14 "call_pal %0 # bugchk\n\t"
15 ".long %1\n\t.8byte %2"
16 : : "i" (PAL_bugchk), "i"(line), "i"(file));
17 for ( ; ; )
18 ;
19}
20
21#define BUG() __BUG(__FILE__, __LINE__)
22
23#define HAVE_ARCH_BUG
24#endif
25
26#include <asm-generic/bug.h>
27
28#endif
diff --git a/include/asm-alpha/bugs.h b/include/asm-alpha/bugs.h
deleted file mode 100644
index 78030d1c7e7e..000000000000
--- a/include/asm-alpha/bugs.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-alpha/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14/*
15 * I don't know of any alpha bugs yet.. Nice chip
16 */
17
18static void check_bugs(void)
19{
20}
diff --git a/include/asm-alpha/byteorder.h b/include/asm-alpha/byteorder.h
deleted file mode 100644
index 58e958fc7f1b..000000000000
--- a/include/asm-alpha/byteorder.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef _ALPHA_BYTEORDER_H
2#define _ALPHA_BYTEORDER_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6#include <asm/compiler.h>
7
8#ifdef __GNUC__
9
10static inline __attribute_const__ __u32 __arch__swab32(__u32 x)
11{
12 /*
13 * Unfortunately, we can't use the 6 instruction sequence
14 * on ev6 since the latency of the UNPKBW is 3, which is
15 * pretty hard to hide. Just in case a future implementation
16 * has a lower latency, here's the sequence (also by Mike Burrows)
17 *
18 * UNPKBW a0, v0 v0: 00AA00BB00CC00DD
19 * SLL v0, 24, a0 a0: BB00CC00DD000000
20 * BIS v0, a0, a0 a0: BBAACCBBDDCC00DD
21 * EXTWL a0, 6, v0 v0: 000000000000BBAA
22 * ZAP a0, 0xf3, a0 a0: 00000000DDCC0000
23 * ADDL a0, v0, v0 v0: ssssssssDDCCBBAA
24 */
25
26 __u64 t0, t1, t2, t3;
27
28 t0 = __kernel_inslh(x, 7); /* t0 : 0000000000AABBCC */
29 t1 = __kernel_inswl(x, 3); /* t1 : 000000CCDD000000 */
30 t1 |= t0; /* t1 : 000000CCDDAABBCC */
31 t2 = t1 >> 16; /* t2 : 0000000000CCDDAA */
32 t0 = t1 & 0xFF00FF00; /* t0 : 00000000DD00BB00 */
33 t3 = t2 & 0x00FF00FF; /* t3 : 0000000000CC00AA */
34 t1 = t0 + t3; /* t1 : ssssssssDDCCBBAA */
35
36 return t1;
37}
38
39#define __arch__swab32 __arch__swab32
40
41#endif /* __GNUC__ */
42
43#define __BYTEORDER_HAS_U64__
44
45#include <linux/byteorder/little_endian.h>
46
47#endif /* _ALPHA_BYTEORDER_H */
diff --git a/include/asm-alpha/cache.h b/include/asm-alpha/cache.h
deleted file mode 100644
index f199e69a5d0b..000000000000
--- a/include/asm-alpha/cache.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * include/asm-alpha/cache.h
3 */
4#ifndef __ARCH_ALPHA_CACHE_H
5#define __ARCH_ALPHA_CACHE_H
6
7
8/* Bytes per L1 (data) cache line. */
9#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_EV6)
10# define L1_CACHE_BYTES 64
11# define L1_CACHE_SHIFT 6
12#else
13/* Both EV4 and EV5 are write-through, read-allocate,
14 direct-mapped, physical.
15*/
16# define L1_CACHE_BYTES 32
17# define L1_CACHE_SHIFT 5
18#endif
19
20#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
21#define SMP_CACHE_BYTES L1_CACHE_BYTES
22
23#endif
diff --git a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h
deleted file mode 100644
index b686cc7fc44e..000000000000
--- a/include/asm-alpha/cacheflush.h
+++ /dev/null
@@ -1,74 +0,0 @@
1#ifndef _ALPHA_CACHEFLUSH_H
2#define _ALPHA_CACHEFLUSH_H
3
4#include <linux/mm.h>
5
6/* Caches aren't brain-dead on the Alpha. */
7#define flush_cache_all() do { } while (0)
8#define flush_cache_mm(mm) do { } while (0)
9#define flush_cache_dup_mm(mm) do { } while (0)
10#define flush_cache_range(vma, start, end) do { } while (0)
11#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
12#define flush_dcache_page(page) do { } while (0)
13#define flush_dcache_mmap_lock(mapping) do { } while (0)
14#define flush_dcache_mmap_unlock(mapping) do { } while (0)
15#define flush_cache_vmap(start, end) do { } while (0)
16#define flush_cache_vunmap(start, end) do { } while (0)
17
18/* Note that the following two definitions are _highly_ dependent
19 on the contexts in which they are used in the kernel. I personally
20 think it is criminal how loosely defined these macros are. */
21
22/* We need to flush the kernel's icache after loading modules. The
23 only other use of this macro is in load_aout_interp which is not
24 used on Alpha.
25
26 Note that this definition should *not* be used for userspace
27 icache flushing. While functional, it is _way_ overkill. The
28 icache is tagged with ASNs and it suffices to allocate a new ASN
29 for the process. */
30#ifndef CONFIG_SMP
31#define flush_icache_range(start, end) imb()
32#else
33#define flush_icache_range(start, end) smp_imb()
34extern void smp_imb(void);
35#endif
36
37/* We need to flush the userspace icache after setting breakpoints in
38 ptrace.
39
40 Instead of indiscriminately using imb, take advantage of the fact
41 that icache entries are tagged with the ASN and load a new mm context. */
42/* ??? Ought to use this in arch/alpha/kernel/signal.c too. */
43
44#ifndef CONFIG_SMP
45extern void __load_new_mm_context(struct mm_struct *);
46static inline void
47flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
48 unsigned long addr, int len)
49{
50 if (vma->vm_flags & VM_EXEC) {
51 struct mm_struct *mm = vma->vm_mm;
52 if (current->active_mm == mm)
53 __load_new_mm_context(mm);
54 else
55 mm->context[smp_processor_id()] = 0;
56 }
57}
58#else
59extern void flush_icache_user_range(struct vm_area_struct *vma,
60 struct page *page, unsigned long addr, int len);
61#endif
62
63/* This is used only in do_no_page and do_swap_page. */
64#define flush_icache_page(vma, page) \
65 flush_icache_user_range((vma), (page), 0, 0)
66
67#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
68do { memcpy(dst, src, len); \
69 flush_icache_user_range(vma, page, vaddr, len); \
70} while (0)
71#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
72 memcpy(dst, src, len)
73
74#endif /* _ALPHA_CACHEFLUSH_H */
diff --git a/include/asm-alpha/checksum.h b/include/asm-alpha/checksum.h
deleted file mode 100644
index d3854bbf0a9e..000000000000
--- a/include/asm-alpha/checksum.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef _ALPHA_CHECKSUM_H
2#define _ALPHA_CHECKSUM_H
3
4#include <linux/in6.h>
5
6/*
7 * This is a version of ip_compute_csum() optimized for IP headers,
8 * which always checksum on 4 octet boundaries.
9 */
10extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
11
12/*
13 * computes the checksum of the TCP/UDP pseudo-header
14 * returns a 16-bit checksum, already complemented
15 */
16extern __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
17 unsigned short len,
18 unsigned short proto,
19 __wsum sum);
20
21__wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
22 unsigned short len, unsigned short proto,
23 __wsum sum);
24
25/*
26 * computes the checksum of a memory block at buff, length len,
27 * and adds in "sum" (32-bit)
28 *
29 * returns a 32-bit number suitable for feeding into itself
30 * or csum_tcpudp_magic
31 *
32 * this function must be called with even lengths, except
33 * for the last fragment, which may be odd
34 *
35 * it's best to have buff aligned on a 32-bit boundary
36 */
37extern __wsum csum_partial(const void *buff, int len, __wsum sum);
38
39/*
40 * the same as csum_partial, but copies from src while it
41 * checksums
42 *
43 * here even more important to align src and dst on a 32-bit (or even
44 * better 64-bit) boundary
45 */
46__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *errp);
47
48__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
49
50
51/*
52 * this routine is used for miscellaneous IP-like checksums, mainly
53 * in icmp.c
54 */
55
56extern __sum16 ip_compute_csum(const void *buff, int len);
57
58/*
59 * Fold a partial checksum without adding pseudo headers
60 */
61
62static inline __sum16 csum_fold(__wsum csum)
63{
64 u32 sum = (__force u32)csum;
65 sum = (sum & 0xffff) + (sum >> 16);
66 sum = (sum & 0xffff) + (sum >> 16);
67 return (__force __sum16)~sum;
68}
69
70#define _HAVE_ARCH_IPV6_CSUM
71extern __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
72 const struct in6_addr *daddr,
73 __u32 len, unsigned short proto,
74 __wsum sum);
75#endif
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h
deleted file mode 100644
index da6bb199839c..000000000000
--- a/include/asm-alpha/compiler.h
+++ /dev/null
@@ -1,130 +0,0 @@
1#ifndef __ALPHA_COMPILER_H
2#define __ALPHA_COMPILER_H
3
4/*
5 * Herein are macros we use when describing various patterns we want to GCC.
6 * In all cases we can get better schedules out of the compiler if we hide
7 * as little as possible inside inline assembly. However, we want to be
8 * able to know what we'll get out before giving up inline assembly. Thus
9 * these tests and macros.
10 */
11
12#if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
13# define __kernel_insbl(val, shift) __builtin_alpha_insbl(val, shift)
14# define __kernel_inswl(val, shift) __builtin_alpha_inswl(val, shift)
15# define __kernel_insql(val, shift) __builtin_alpha_insql(val, shift)
16# define __kernel_inslh(val, shift) __builtin_alpha_inslh(val, shift)
17# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift)
18# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift)
19# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b)
20#else
21# define __kernel_insbl(val, shift) \
22 ({ unsigned long __kir; \
23 __asm__("insbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
24 __kir; })
25# define __kernel_inswl(val, shift) \
26 ({ unsigned long __kir; \
27 __asm__("inswl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
28 __kir; })
29# define __kernel_insql(val, shift) \
30 ({ unsigned long __kir; \
31 __asm__("insql %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
32 __kir; })
33# define __kernel_inslh(val, shift) \
34 ({ unsigned long __kir; \
35 __asm__("inslh %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
36 __kir; })
37# define __kernel_extbl(val, shift) \
38 ({ unsigned long __kir; \
39 __asm__("extbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
40 __kir; })
41# define __kernel_extwl(val, shift) \
42 ({ unsigned long __kir; \
43 __asm__("extwl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \
44 __kir; })
45# define __kernel_cmpbge(a, b) \
46 ({ unsigned long __kir; \
47 __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \
48 __kir; })
49#endif
50
51#ifdef __alpha_cix__
52# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
53# define __kernel_cttz(x) __builtin_ctzl(x)
54# define __kernel_ctlz(x) __builtin_clzl(x)
55# define __kernel_ctpop(x) __builtin_popcountl(x)
56# else
57# define __kernel_cttz(x) \
58 ({ unsigned long __kir; \
59 __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \
60 __kir; })
61# define __kernel_ctlz(x) \
62 ({ unsigned long __kir; \
63 __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
64 __kir; })
65# define __kernel_ctpop(x) \
66 ({ unsigned long __kir; \
67 __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
68 __kir; })
69# endif
70#else
71# define __kernel_cttz(x) \
72 ({ unsigned long __kir; \
73 __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \
74 __kir; })
75# define __kernel_ctlz(x) \
76 ({ unsigned long __kir; \
77 __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
78 __kir; })
79# define __kernel_ctpop(x) \
80 ({ unsigned long __kir; \
81 __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
82 __kir; })
83#endif
84
85
86/*
87 * Beginning with EGCS 1.1, GCC defines __alpha_bwx__ when the BWX
88 * extension is enabled. Previous versions did not define anything
89 * we could test during compilation -- too bad, so sad.
90 */
91
92#if defined(__alpha_bwx__)
93#define __kernel_ldbu(mem) (mem)
94#define __kernel_ldwu(mem) (mem)
95#define __kernel_stb(val,mem) ((mem) = (val))
96#define __kernel_stw(val,mem) ((mem) = (val))
97#else
98#define __kernel_ldbu(mem) \
99 ({ unsigned char __kir; \
100 __asm__(".arch ev56; \
101 ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \
102 __kir; })
103#define __kernel_ldwu(mem) \
104 ({ unsigned short __kir; \
105 __asm__(".arch ev56; \
106 ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \
107 __kir; })
108#define __kernel_stb(val,mem) \
109 __asm__(".arch ev56; \
110 stb %1,%0" : "=m"(mem) : "r"(val))
111#define __kernel_stw(val,mem) \
112 __asm__(".arch ev56; \
113 stw %1,%0" : "=m"(mem) : "r"(val))
114#endif
115
116#ifdef __KERNEL__
117/* Some idiots over in <linux/compiler.h> thought inline should imply
118 always_inline. This breaks stuff. We'll include this file whenever
119 we run into such problems. */
120
121#include <linux/compiler.h>
122#undef inline
123#undef __inline__
124#undef __inline
125#undef __always_inline
126#define __always_inline inline __attribute__((always_inline))
127
128#endif /* __KERNEL__ */
129
130#endif /* __ALPHA_COMPILER_H */
diff --git a/include/asm-alpha/console.h b/include/asm-alpha/console.h
deleted file mode 100644
index a3ce4e62249b..000000000000
--- a/include/asm-alpha/console.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef __AXP_CONSOLE_H
2#define __AXP_CONSOLE_H
3
4/*
5 * Console callback routine numbers
6 */
7#define CCB_GETC 0x01
8#define CCB_PUTS 0x02
9#define CCB_RESET_TERM 0x03
10#define CCB_SET_TERM_INT 0x04
11#define CCB_SET_TERM_CTL 0x05
12#define CCB_PROCESS_KEYCODE 0x06
13#define CCB_OPEN_CONSOLE 0x07
14#define CCB_CLOSE_CONSOLE 0x08
15
16#define CCB_OPEN 0x10
17#define CCB_CLOSE 0x11
18#define CCB_IOCTL 0x12
19#define CCB_READ 0x13
20#define CCB_WRITE 0x14
21
22#define CCB_SET_ENV 0x20
23#define CCB_RESET_ENV 0x21
24#define CCB_GET_ENV 0x22
25#define CCB_SAVE_ENV 0x23
26
27#define CCB_PSWITCH 0x30
28#define CCB_BIOS_EMUL 0x32
29
30/*
31 * Environment variable numbers
32 */
33#define ENV_AUTO_ACTION 0x01
34#define ENV_BOOT_DEV 0x02
35#define ENV_BOOTDEF_DEV 0x03
36#define ENV_BOOTED_DEV 0x04
37#define ENV_BOOT_FILE 0x05
38#define ENV_BOOTED_FILE 0x06
39#define ENV_BOOT_OSFLAGS 0x07
40#define ENV_BOOTED_OSFLAGS 0x08
41#define ENV_BOOT_RESET 0x09
42#define ENV_DUMP_DEV 0x0A
43#define ENV_ENABLE_AUDIT 0x0B
44#define ENV_LICENSE 0x0C
45#define ENV_CHAR_SET 0x0D
46#define ENV_LANGUAGE 0x0E
47#define ENV_TTY_DEV 0x0F
48
49#ifdef __KERNEL__
50#ifndef __ASSEMBLY__
51extern long callback_puts(long unit, const char *s, long length);
52extern long callback_getc(long unit);
53extern long callback_open_console(void);
54extern long callback_close_console(void);
55extern long callback_open(const char *device, long length);
56extern long callback_close(long unit);
57extern long callback_read(long channel, long count, const char *buf, long lbn);
58extern long callback_getenv(long id, const char *buf, unsigned long buf_size);
59extern long callback_setenv(long id, const char *buf, unsigned long buf_size);
60extern long callback_save_env(void);
61
62extern int srm_fixup(unsigned long new_callback_addr,
63 unsigned long new_hwrpb_addr);
64extern long srm_puts(const char *, long);
65extern long srm_printk(const char *, ...)
66 __attribute__ ((format (printf, 1, 2)));
67
68struct crb_struct;
69struct hwrpb_struct;
70extern int callback_init_done;
71extern void * callback_init(void *);
72#endif /* __ASSEMBLY__ */
73#endif /* __KERNEL__ */
74
75#endif /* __AXP_CONSOLE_H */
diff --git a/include/asm-alpha/core_apecs.h b/include/asm-alpha/core_apecs.h
deleted file mode 100644
index 6785ff7e02bc..000000000000
--- a/include/asm-alpha/core_apecs.h
+++ /dev/null
@@ -1,517 +0,0 @@
1#ifndef __ALPHA_APECS__H__
2#define __ALPHA_APECS__H__
3
4#include <linux/types.h>
5#include <asm/compiler.h>
6
7/*
8 * APECS is the internal name for the 2107x chipset which provides
9 * memory controller and PCI access for the 21064 chip based systems.
10 *
11 * This file is based on:
12 *
13 * DECchip 21071-AA and DECchip 21072-AA Core Logic Chipsets
14 * Data Sheet
15 *
16 * EC-N0648-72
17 *
18 *
19 * david.rusling@reo.mts.dec.com Initial Version.
20 *
21 */
22
23/*
24 An AVANTI *might* be an XL, and an XL has only 27 bits of ISA address
25 that get passed through the PCI<->ISA bridge chip. So we've gotta use
26 both windows to max out the physical memory we can DMA to. Sigh...
27
28 If we try a window at 0 for 1GB as a work-around, we run into conflicts
29 with ISA/PCI bus memory which can't be relocated, like VGA aperture and
30 BIOS ROMs. So we must put the windows high enough to avoid these areas.
31
32 We put window 1 at BUS 64Mb for 64Mb, mapping physical 0 to 64Mb-1,
33 and window 2 at BUS 1Gb for 1Gb, mapping physical 0 to 1Gb-1.
34 Yes, this does map 0 to 64Mb-1 twice, but only window 1 will actually
35 be used for that range (via virt_to_bus()).
36
37 Note that we actually fudge the window 1 maximum as 48Mb instead of 64Mb,
38 to keep virt_to_bus() from returning an address in the first window, for
39 a data area that goes beyond the 64Mb first DMA window. Sigh...
40 The fudge factor MUST match with <asm/dma.h> MAX_DMA_ADDRESS, but
41 we can't just use that here, because of header file looping... :-(
42
43 Window 1 will be used for all DMA from the ISA bus; yes, that does
44 limit what memory an ISA floppy or sound card or Ethernet can touch, but
45 it's also a known limitation on other platforms as well. We use the
46 same technique that is used on INTEL platforms with similar limitation:
47 set MAX_DMA_ADDRESS and clear some pages' DMAable flags during mem_init().
48 We trust that any ISA bus device drivers will *always* ask for DMAable
49 memory explicitly via kmalloc()/get_free_pages() flags arguments.
50
51 Note that most PCI bus devices' drivers do *not* explicitly ask for
52 DMAable memory; they count on being able to DMA to any memory they
53 get from kmalloc()/get_free_pages(). They will also use window 1 for
54 any physical memory accesses below 64Mb; the rest will be handled by
55 window 2, maxing out at 1Gb of memory. I trust this is enough... :-)
56
57 We hope that the area before the first window is large enough so that
58 there will be no overlap at the top end (64Mb). We *must* locate the
59 PCI cards' memory just below window 1, so that there's still the
60 possibility of being able to access it via SPARSE space. This is
61 important for cards such as the Matrox Millennium, whose Xserver
62 wants to access memory-mapped registers in byte and short lengths.
63
64 Note that the XL is treated differently from the AVANTI, even though
65 for most other things they are identical. It didn't seem reasonable to
66 make the AVANTI support pay for the limitations of the XL. It is true,
67 however, that an XL kernel will run on an AVANTI without problems.
68
69 %%% All of this should be obviated by the ability to route
70 everything through the iommu.
71*/
72
73/*
74 * 21071-DA Control and Status registers.
75 * These are used for PCI memory access.
76 */
77#define APECS_IOC_DCSR (IDENT_ADDR + 0x1A0000000UL)
78#define APECS_IOC_PEAR (IDENT_ADDR + 0x1A0000020UL)
79#define APECS_IOC_SEAR (IDENT_ADDR + 0x1A0000040UL)
80#define APECS_IOC_DR1 (IDENT_ADDR + 0x1A0000060UL)
81#define APECS_IOC_DR2 (IDENT_ADDR + 0x1A0000080UL)
82#define APECS_IOC_DR3 (IDENT_ADDR + 0x1A00000A0UL)
83
84#define APECS_IOC_TB1R (IDENT_ADDR + 0x1A00000C0UL)
85#define APECS_IOC_TB2R (IDENT_ADDR + 0x1A00000E0UL)
86
87#define APECS_IOC_PB1R (IDENT_ADDR + 0x1A0000100UL)
88#define APECS_IOC_PB2R (IDENT_ADDR + 0x1A0000120UL)
89
90#define APECS_IOC_PM1R (IDENT_ADDR + 0x1A0000140UL)
91#define APECS_IOC_PM2R (IDENT_ADDR + 0x1A0000160UL)
92
93#define APECS_IOC_HAXR0 (IDENT_ADDR + 0x1A0000180UL)
94#define APECS_IOC_HAXR1 (IDENT_ADDR + 0x1A00001A0UL)
95#define APECS_IOC_HAXR2 (IDENT_ADDR + 0x1A00001C0UL)
96
97#define APECS_IOC_PMLT (IDENT_ADDR + 0x1A00001E0UL)
98
99#define APECS_IOC_TLBTAG0 (IDENT_ADDR + 0x1A0000200UL)
100#define APECS_IOC_TLBTAG1 (IDENT_ADDR + 0x1A0000220UL)
101#define APECS_IOC_TLBTAG2 (IDENT_ADDR + 0x1A0000240UL)
102#define APECS_IOC_TLBTAG3 (IDENT_ADDR + 0x1A0000260UL)
103#define APECS_IOC_TLBTAG4 (IDENT_ADDR + 0x1A0000280UL)
104#define APECS_IOC_TLBTAG5 (IDENT_ADDR + 0x1A00002A0UL)
105#define APECS_IOC_TLBTAG6 (IDENT_ADDR + 0x1A00002C0UL)
106#define APECS_IOC_TLBTAG7 (IDENT_ADDR + 0x1A00002E0UL)
107
108#define APECS_IOC_TLBDATA0 (IDENT_ADDR + 0x1A0000300UL)
109#define APECS_IOC_TLBDATA1 (IDENT_ADDR + 0x1A0000320UL)
110#define APECS_IOC_TLBDATA2 (IDENT_ADDR + 0x1A0000340UL)
111#define APECS_IOC_TLBDATA3 (IDENT_ADDR + 0x1A0000360UL)
112#define APECS_IOC_TLBDATA4 (IDENT_ADDR + 0x1A0000380UL)
113#define APECS_IOC_TLBDATA5 (IDENT_ADDR + 0x1A00003A0UL)
114#define APECS_IOC_TLBDATA6 (IDENT_ADDR + 0x1A00003C0UL)
115#define APECS_IOC_TLBDATA7 (IDENT_ADDR + 0x1A00003E0UL)
116
117#define APECS_IOC_TBIA (IDENT_ADDR + 0x1A0000400UL)
118
119
120/*
121 * 21071-CA Control and Status registers.
122 * These are used to program memory timing,
123 * configure memory and initialise the B-Cache.
124 */
125#define APECS_MEM_GCR (IDENT_ADDR + 0x180000000UL)
126#define APECS_MEM_EDSR (IDENT_ADDR + 0x180000040UL)
127#define APECS_MEM_TAR (IDENT_ADDR + 0x180000060UL)
128#define APECS_MEM_ELAR (IDENT_ADDR + 0x180000080UL)
129#define APECS_MEM_EHAR (IDENT_ADDR + 0x1800000a0UL)
130#define APECS_MEM_SFT_RST (IDENT_ADDR + 0x1800000c0UL)
131#define APECS_MEM_LDxLAR (IDENT_ADDR + 0x1800000e0UL)
132#define APECS_MEM_LDxHAR (IDENT_ADDR + 0x180000100UL)
133#define APECS_MEM_GTR (IDENT_ADDR + 0x180000200UL)
134#define APECS_MEM_RTR (IDENT_ADDR + 0x180000220UL)
135#define APECS_MEM_VFPR (IDENT_ADDR + 0x180000240UL)
136#define APECS_MEM_PDLDR (IDENT_ADDR + 0x180000260UL)
137#define APECS_MEM_PDhDR (IDENT_ADDR + 0x180000280UL)
138
139/* Bank x Base Address Register */
140#define APECS_MEM_B0BAR (IDENT_ADDR + 0x180000800UL)
141#define APECS_MEM_B1BAR (IDENT_ADDR + 0x180000820UL)
142#define APECS_MEM_B2BAR (IDENT_ADDR + 0x180000840UL)
143#define APECS_MEM_B3BAR (IDENT_ADDR + 0x180000860UL)
144#define APECS_MEM_B4BAR (IDENT_ADDR + 0x180000880UL)
145#define APECS_MEM_B5BAR (IDENT_ADDR + 0x1800008A0UL)
146#define APECS_MEM_B6BAR (IDENT_ADDR + 0x1800008C0UL)
147#define APECS_MEM_B7BAR (IDENT_ADDR + 0x1800008E0UL)
148#define APECS_MEM_B8BAR (IDENT_ADDR + 0x180000900UL)
149
150/* Bank x Configuration Register */
151#define APECS_MEM_B0BCR (IDENT_ADDR + 0x180000A00UL)
152#define APECS_MEM_B1BCR (IDENT_ADDR + 0x180000A20UL)
153#define APECS_MEM_B2BCR (IDENT_ADDR + 0x180000A40UL)
154#define APECS_MEM_B3BCR (IDENT_ADDR + 0x180000A60UL)
155#define APECS_MEM_B4BCR (IDENT_ADDR + 0x180000A80UL)
156#define APECS_MEM_B5BCR (IDENT_ADDR + 0x180000AA0UL)
157#define APECS_MEM_B6BCR (IDENT_ADDR + 0x180000AC0UL)
158#define APECS_MEM_B7BCR (IDENT_ADDR + 0x180000AE0UL)
159#define APECS_MEM_B8BCR (IDENT_ADDR + 0x180000B00UL)
160
161/* Bank x Timing Register A */
162#define APECS_MEM_B0TRA (IDENT_ADDR + 0x180000C00UL)
163#define APECS_MEM_B1TRA (IDENT_ADDR + 0x180000C20UL)
164#define APECS_MEM_B2TRA (IDENT_ADDR + 0x180000C40UL)
165#define APECS_MEM_B3TRA (IDENT_ADDR + 0x180000C60UL)
166#define APECS_MEM_B4TRA (IDENT_ADDR + 0x180000C80UL)
167#define APECS_MEM_B5TRA (IDENT_ADDR + 0x180000CA0UL)
168#define APECS_MEM_B6TRA (IDENT_ADDR + 0x180000CC0UL)
169#define APECS_MEM_B7TRA (IDENT_ADDR + 0x180000CE0UL)
170#define APECS_MEM_B8TRA (IDENT_ADDR + 0x180000D00UL)
171
172/* Bank x Timing Register B */
173#define APECS_MEM_B0TRB (IDENT_ADDR + 0x180000E00UL)
174#define APECS_MEM_B1TRB (IDENT_ADDR + 0x180000E20UL)
175#define APECS_MEM_B2TRB (IDENT_ADDR + 0x180000E40UL)
176#define APECS_MEM_B3TRB (IDENT_ADDR + 0x180000E60UL)
177#define APECS_MEM_B4TRB (IDENT_ADDR + 0x180000E80UL)
178#define APECS_MEM_B5TRB (IDENT_ADDR + 0x180000EA0UL)
179#define APECS_MEM_B6TRB (IDENT_ADDR + 0x180000EC0UL)
180#define APECS_MEM_B7TRB (IDENT_ADDR + 0x180000EE0UL)
181#define APECS_MEM_B8TRB (IDENT_ADDR + 0x180000F00UL)
182
183
184/*
185 * Memory spaces:
186 */
187#define APECS_IACK_SC (IDENT_ADDR + 0x1b0000000UL)
188#define APECS_CONF (IDENT_ADDR + 0x1e0000000UL)
189#define APECS_IO (IDENT_ADDR + 0x1c0000000UL)
190#define APECS_SPARSE_MEM (IDENT_ADDR + 0x200000000UL)
191#define APECS_DENSE_MEM (IDENT_ADDR + 0x300000000UL)
192
193
194/*
195 * Bit definitions for I/O Controller status register 0:
196 */
197#define APECS_IOC_STAT0_CMD 0xf
198#define APECS_IOC_STAT0_ERR (1<<4)
199#define APECS_IOC_STAT0_LOST (1<<5)
200#define APECS_IOC_STAT0_THIT (1<<6)
201#define APECS_IOC_STAT0_TREF (1<<7)
202#define APECS_IOC_STAT0_CODE_SHIFT 8
203#define APECS_IOC_STAT0_CODE_MASK 0x7
204#define APECS_IOC_STAT0_P_NBR_SHIFT 13
205#define APECS_IOC_STAT0_P_NBR_MASK 0x7ffff
206
207#define APECS_HAE_ADDRESS APECS_IOC_HAXR1
208
209
210/*
211 * Data structure for handling APECS machine checks:
212 */
213
214struct el_apecs_mikasa_sysdata_mcheck
215{
216 unsigned long coma_gcr;
217 unsigned long coma_edsr;
218 unsigned long coma_ter;
219 unsigned long coma_elar;
220 unsigned long coma_ehar;
221 unsigned long coma_ldlr;
222 unsigned long coma_ldhr;
223 unsigned long coma_base0;
224 unsigned long coma_base1;
225 unsigned long coma_base2;
226 unsigned long coma_base3;
227 unsigned long coma_cnfg0;
228 unsigned long coma_cnfg1;
229 unsigned long coma_cnfg2;
230 unsigned long coma_cnfg3;
231 unsigned long epic_dcsr;
232 unsigned long epic_pear;
233 unsigned long epic_sear;
234 unsigned long epic_tbr1;
235 unsigned long epic_tbr2;
236 unsigned long epic_pbr1;
237 unsigned long epic_pbr2;
238 unsigned long epic_pmr1;
239 unsigned long epic_pmr2;
240 unsigned long epic_harx1;
241 unsigned long epic_harx2;
242 unsigned long epic_pmlt;
243 unsigned long epic_tag0;
244 unsigned long epic_tag1;
245 unsigned long epic_tag2;
246 unsigned long epic_tag3;
247 unsigned long epic_tag4;
248 unsigned long epic_tag5;
249 unsigned long epic_tag6;
250 unsigned long epic_tag7;
251 unsigned long epic_data0;
252 unsigned long epic_data1;
253 unsigned long epic_data2;
254 unsigned long epic_data3;
255 unsigned long epic_data4;
256 unsigned long epic_data5;
257 unsigned long epic_data6;
258 unsigned long epic_data7;
259
260 unsigned long pceb_vid;
261 unsigned long pceb_did;
262 unsigned long pceb_revision;
263 unsigned long pceb_command;
264 unsigned long pceb_status;
265 unsigned long pceb_latency;
266 unsigned long pceb_control;
267 unsigned long pceb_arbcon;
268 unsigned long pceb_arbpri;
269
270 unsigned long esc_id;
271 unsigned long esc_revision;
272 unsigned long esc_int0;
273 unsigned long esc_int1;
274 unsigned long esc_elcr0;
275 unsigned long esc_elcr1;
276 unsigned long esc_last_eisa;
277 unsigned long esc_nmi_stat;
278
279 unsigned long pci_ir;
280 unsigned long pci_imr;
281 unsigned long svr_mgr;
282};
283
284/* This for the normal APECS machines. */
285struct el_apecs_sysdata_mcheck
286{
287 unsigned long coma_gcr;
288 unsigned long coma_edsr;
289 unsigned long coma_ter;
290 unsigned long coma_elar;
291 unsigned long coma_ehar;
292 unsigned long coma_ldlr;
293 unsigned long coma_ldhr;
294 unsigned long coma_base0;
295 unsigned long coma_base1;
296 unsigned long coma_base2;
297 unsigned long coma_cnfg0;
298 unsigned long coma_cnfg1;
299 unsigned long coma_cnfg2;
300 unsigned long epic_dcsr;
301 unsigned long epic_pear;
302 unsigned long epic_sear;
303 unsigned long epic_tbr1;
304 unsigned long epic_tbr2;
305 unsigned long epic_pbr1;
306 unsigned long epic_pbr2;
307 unsigned long epic_pmr1;
308 unsigned long epic_pmr2;
309 unsigned long epic_harx1;
310 unsigned long epic_harx2;
311 unsigned long epic_pmlt;
312 unsigned long epic_tag0;
313 unsigned long epic_tag1;
314 unsigned long epic_tag2;
315 unsigned long epic_tag3;
316 unsigned long epic_tag4;
317 unsigned long epic_tag5;
318 unsigned long epic_tag6;
319 unsigned long epic_tag7;
320 unsigned long epic_data0;
321 unsigned long epic_data1;
322 unsigned long epic_data2;
323 unsigned long epic_data3;
324 unsigned long epic_data4;
325 unsigned long epic_data5;
326 unsigned long epic_data6;
327 unsigned long epic_data7;
328};
329
330struct el_apecs_procdata
331{
332 unsigned long paltemp[32]; /* PAL TEMP REGS. */
333 /* EV4-specific fields */
334 unsigned long exc_addr; /* Address of excepting instruction. */
335 unsigned long exc_sum; /* Summary of arithmetic traps. */
336 unsigned long exc_mask; /* Exception mask (from exc_sum). */
337 unsigned long iccsr; /* IBox hardware enables. */
338 unsigned long pal_base; /* Base address for PALcode. */
339 unsigned long hier; /* Hardware Interrupt Enable. */
340 unsigned long hirr; /* Hardware Interrupt Request. */
341 unsigned long csr; /* D-stream fault info. */
342 unsigned long dc_stat; /* D-cache status (ECC/Parity Err). */
343 unsigned long dc_addr; /* EV3 Phys Addr for ECC/DPERR. */
344 unsigned long abox_ctl; /* ABox Control Register. */
345 unsigned long biu_stat; /* BIU Status. */
346 unsigned long biu_addr; /* BUI Address. */
347 unsigned long biu_ctl; /* BIU Control. */
348 unsigned long fill_syndrome;/* For correcting ECC errors. */
349 unsigned long fill_addr; /* Cache block which was being read */
350 unsigned long va; /* Effective VA of fault or miss. */
351 unsigned long bc_tag; /* Backup Cache Tag Probe Results.*/
352};
353
354
355#ifdef __KERNEL__
356
357#ifndef __EXTERN_INLINE
358#define __EXTERN_INLINE extern inline
359#define __IO_EXTERN_INLINE
360#endif
361
362/*
363 * I/O functions:
364 *
365 * Unlike Jensen, the APECS machines have no concept of local
366 * I/O---everything goes over the PCI bus.
367 *
368 * There is plenty room for optimization here. In particular,
369 * the Alpha's insb/insw/extb/extw should be useful in moving
370 * data to/from the right byte-lanes.
371 */
372
373#define vip volatile int __force *
374#define vuip volatile unsigned int __force *
375#define vulp volatile unsigned long __force *
376
377#define APECS_SET_HAE \
378 do { \
379 if (addr >= (1UL << 24)) { \
380 unsigned long msb = addr & 0xf8000000; \
381 addr -= msb; \
382 set_hae(msb); \
383 } \
384 } while (0)
385
386__EXTERN_INLINE unsigned int apecs_ioread8(void __iomem *xaddr)
387{
388 unsigned long addr = (unsigned long) xaddr;
389 unsigned long result, base_and_type;
390
391 if (addr >= APECS_DENSE_MEM) {
392 addr -= APECS_DENSE_MEM;
393 APECS_SET_HAE;
394 base_and_type = APECS_SPARSE_MEM + 0x00;
395 } else {
396 addr -= APECS_IO;
397 base_and_type = APECS_IO + 0x00;
398 }
399
400 result = *(vip) ((addr << 5) + base_and_type);
401 return __kernel_extbl(result, addr & 3);
402}
403
404__EXTERN_INLINE void apecs_iowrite8(u8 b, void __iomem *xaddr)
405{
406 unsigned long addr = (unsigned long) xaddr;
407 unsigned long w, base_and_type;
408
409 if (addr >= APECS_DENSE_MEM) {
410 addr -= APECS_DENSE_MEM;
411 APECS_SET_HAE;
412 base_and_type = APECS_SPARSE_MEM + 0x00;
413 } else {
414 addr -= APECS_IO;
415 base_and_type = APECS_IO + 0x00;
416 }
417
418 w = __kernel_insbl(b, addr & 3);
419 *(vuip) ((addr << 5) + base_and_type) = w;
420}
421
422__EXTERN_INLINE unsigned int apecs_ioread16(void __iomem *xaddr)
423{
424 unsigned long addr = (unsigned long) xaddr;
425 unsigned long result, base_and_type;
426
427 if (addr >= APECS_DENSE_MEM) {
428 addr -= APECS_DENSE_MEM;
429 APECS_SET_HAE;
430 base_and_type = APECS_SPARSE_MEM + 0x08;
431 } else {
432 addr -= APECS_IO;
433 base_and_type = APECS_IO + 0x08;
434 }
435
436 result = *(vip) ((addr << 5) + base_and_type);
437 return __kernel_extwl(result, addr & 3);
438}
439
440__EXTERN_INLINE void apecs_iowrite16(u16 b, void __iomem *xaddr)
441{
442 unsigned long addr = (unsigned long) xaddr;
443 unsigned long w, base_and_type;
444
445 if (addr >= APECS_DENSE_MEM) {
446 addr -= APECS_DENSE_MEM;
447 APECS_SET_HAE;
448 base_and_type = APECS_SPARSE_MEM + 0x08;
449 } else {
450 addr -= APECS_IO;
451 base_and_type = APECS_IO + 0x08;
452 }
453
454 w = __kernel_inswl(b, addr & 3);
455 *(vuip) ((addr << 5) + base_and_type) = w;
456}
457
458__EXTERN_INLINE unsigned int apecs_ioread32(void __iomem *xaddr)
459{
460 unsigned long addr = (unsigned long) xaddr;
461 if (addr < APECS_DENSE_MEM)
462 addr = ((addr - APECS_IO) << 5) + APECS_IO + 0x18;
463 return *(vuip)addr;
464}
465
466__EXTERN_INLINE void apecs_iowrite32(u32 b, void __iomem *xaddr)
467{
468 unsigned long addr = (unsigned long) xaddr;
469 if (addr < APECS_DENSE_MEM)
470 addr = ((addr - APECS_IO) << 5) + APECS_IO + 0x18;
471 *(vuip)addr = b;
472}
473
474__EXTERN_INLINE void __iomem *apecs_ioportmap(unsigned long addr)
475{
476 return (void __iomem *)(addr + APECS_IO);
477}
478
479__EXTERN_INLINE void __iomem *apecs_ioremap(unsigned long addr,
480 unsigned long size)
481{
482 return (void __iomem *)(addr + APECS_DENSE_MEM);
483}
484
485__EXTERN_INLINE int apecs_is_ioaddr(unsigned long addr)
486{
487 return addr >= IDENT_ADDR + 0x180000000UL;
488}
489
490__EXTERN_INLINE int apecs_is_mmio(const volatile void __iomem *addr)
491{
492 return (unsigned long)addr >= APECS_DENSE_MEM;
493}
494
495#undef APECS_SET_HAE
496
497#undef vip
498#undef vuip
499#undef vulp
500
501#undef __IO_PREFIX
502#define __IO_PREFIX apecs
503#define apecs_trivial_io_bw 0
504#define apecs_trivial_io_lq 0
505#define apecs_trivial_rw_bw 2
506#define apecs_trivial_rw_lq 1
507#define apecs_trivial_iounmap 1
508#include <asm/io_trivial.h>
509
510#ifdef __IO_EXTERN_INLINE
511#undef __EXTERN_INLINE
512#undef __IO_EXTERN_INLINE
513#endif
514
515#endif /* __KERNEL__ */
516
517#endif /* __ALPHA_APECS__H__ */
diff --git a/include/asm-alpha/core_cia.h b/include/asm-alpha/core_cia.h
deleted file mode 100644
index 9e0516c0ca27..000000000000
--- a/include/asm-alpha/core_cia.h
+++ /dev/null
@@ -1,500 +0,0 @@
1#ifndef __ALPHA_CIA__H__
2#define __ALPHA_CIA__H__
3
4/* Define to experiment with fitting everything into one 512MB HAE window. */
5#define CIA_ONE_HAE_WINDOW 1
6
7#include <linux/types.h>
8#include <asm/compiler.h>
9
10/*
11 * CIA is the internal name for the 21171 chipset which provides
12 * memory controller and PCI access for the 21164 chip based systems.
13 * Also supported here is the 21172 (CIA-2) and 21174 (PYXIS).
14 *
15 * The lineage is a bit confused, since the 21174 was reportedly started
16 * from the 21171 Pass 1 mask, and so is missing bug fixes that appear
17 * in 21171 Pass 2 and 21172, but it also contains additional features.
18 *
19 * This file is based on:
20 *
21 * DECchip 21171 Core Logic Chipset
22 * Technical Reference Manual
23 *
24 * EC-QE18B-TE
25 *
26 * david.rusling@reo.mts.dec.com Initial Version.
27 *
28 */
29
30/*
31 * CIA ADDRESS BIT DEFINITIONS
32 *
33 * 3333 3333 3322 2222 2222 1111 1111 11
34 * 9876 5432 1098 7654 3210 9876 5432 1098 7654 3210
35 * ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
36 * 1 000
37 * ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
38 * | |\|
39 * | Byte Enable --+ |
40 * | Transfer Length --+
41 * +-- IO space, not cached
42 *
43 * Byte Transfer
44 * Enable Length Transfer Byte Address
45 * adr<6:5> adr<4:3> Length Enable Adder
46 * ---------------------------------------------
47 * 00 00 Byte 1110 0x000
48 * 01 00 Byte 1101 0x020
49 * 10 00 Byte 1011 0x040
50 * 11 00 Byte 0111 0x060
51 *
52 * 00 01 Word 1100 0x008
53 * 01 01 Word 1001 0x028 <= Not supported in this code.
54 * 10 01 Word 0011 0x048
55 *
56 * 00 10 Tribyte 1000 0x010
57 * 01 10 Tribyte 0001 0x030
58 *
59 * 10 11 Longword 0000 0x058
60 *
61 * Note that byte enables are asserted low.
62 *
63 */
64
65#define CIA_MEM_R1_MASK 0x1fffffff /* SPARSE Mem region 1 mask is 29 bits */
66#define CIA_MEM_R2_MASK 0x07ffffff /* SPARSE Mem region 2 mask is 27 bits */
67#define CIA_MEM_R3_MASK 0x03ffffff /* SPARSE Mem region 3 mask is 26 bits */
68
69/*
70 * 21171-CA Control and Status Registers
71 */
72#define CIA_IOC_CIA_REV (IDENT_ADDR + 0x8740000080UL)
73# define CIA_REV_MASK 0xff
74#define CIA_IOC_PCI_LAT (IDENT_ADDR + 0x87400000C0UL)
75#define CIA_IOC_CIA_CTRL (IDENT_ADDR + 0x8740000100UL)
76# define CIA_CTRL_PCI_EN (1 << 0)
77# define CIA_CTRL_PCI_LOCK_EN (1 << 1)
78# define CIA_CTRL_PCI_LOOP_EN (1 << 2)
79# define CIA_CTRL_FST_BB_EN (1 << 3)
80# define CIA_CTRL_PCI_MST_EN (1 << 4)
81# define CIA_CTRL_PCI_MEM_EN (1 << 5)
82# define CIA_CTRL_PCI_REQ64_EN (1 << 6)
83# define CIA_CTRL_PCI_ACK64_EN (1 << 7)
84# define CIA_CTRL_ADDR_PE_EN (1 << 8)
85# define CIA_CTRL_PERR_EN (1 << 9)
86# define CIA_CTRL_FILL_ERR_EN (1 << 10)
87# define CIA_CTRL_MCHK_ERR_EN (1 << 11)
88# define CIA_CTRL_ECC_CHK_EN (1 << 12)
89# define CIA_CTRL_ASSERT_IDLE_BC (1 << 13)
90# define CIA_CTRL_COM_IDLE_BC (1 << 14)
91# define CIA_CTRL_CSR_IOA_BYPASS (1 << 15)
92# define CIA_CTRL_IO_FLUSHREQ_EN (1 << 16)
93# define CIA_CTRL_CPU_FLUSHREQ_EN (1 << 17)
94# define CIA_CTRL_ARB_CPU_EN (1 << 18)
95# define CIA_CTRL_EN_ARB_LINK (1 << 19)
96# define CIA_CTRL_RD_TYPE_SHIFT 20
97# define CIA_CTRL_RL_TYPE_SHIFT 24
98# define CIA_CTRL_RM_TYPE_SHIFT 28
99# define CIA_CTRL_EN_DMA_RD_PERF (1 << 31)
100#define CIA_IOC_CIA_CNFG (IDENT_ADDR + 0x8740000140UL)
101# define CIA_CNFG_IOA_BWEN (1 << 0)
102# define CIA_CNFG_PCI_MWEN (1 << 4)
103# define CIA_CNFG_PCI_DWEN (1 << 5)
104# define CIA_CNFG_PCI_WLEN (1 << 8)
105#define CIA_IOC_FLASH_CTRL (IDENT_ADDR + 0x8740000200UL)
106#define CIA_IOC_HAE_MEM (IDENT_ADDR + 0x8740000400UL)
107#define CIA_IOC_HAE_IO (IDENT_ADDR + 0x8740000440UL)
108#define CIA_IOC_CFG (IDENT_ADDR + 0x8740000480UL)
109#define CIA_IOC_CACK_EN (IDENT_ADDR + 0x8740000600UL)
110# define CIA_CACK_EN_LOCK_EN (1 << 0)
111# define CIA_CACK_EN_MB_EN (1 << 1)
112# define CIA_CACK_EN_SET_DIRTY_EN (1 << 2)
113# define CIA_CACK_EN_BC_VICTIM_EN (1 << 3)
114
115
116/*
117 * 21171-CA Diagnostic Registers
118 */
119#define CIA_IOC_CIA_DIAG (IDENT_ADDR + 0x8740002000UL)
120#define CIA_IOC_DIAG_CHECK (IDENT_ADDR + 0x8740003000UL)
121
122/*
123 * 21171-CA Performance Monitor registers
124 */
125#define CIA_IOC_PERF_MONITOR (IDENT_ADDR + 0x8740004000UL)
126#define CIA_IOC_PERF_CONTROL (IDENT_ADDR + 0x8740004040UL)
127
128/*
129 * 21171-CA Error registers
130 */
131#define CIA_IOC_CPU_ERR0 (IDENT_ADDR + 0x8740008000UL)
132#define CIA_IOC_CPU_ERR1 (IDENT_ADDR + 0x8740008040UL)
133#define CIA_IOC_CIA_ERR (IDENT_ADDR + 0x8740008200UL)
134# define CIA_ERR_COR_ERR (1 << 0)
135# define CIA_ERR_UN_COR_ERR (1 << 1)
136# define CIA_ERR_CPU_PE (1 << 2)
137# define CIA_ERR_MEM_NEM (1 << 3)
138# define CIA_ERR_PCI_SERR (1 << 4)
139# define CIA_ERR_PERR (1 << 5)
140# define CIA_ERR_PCI_ADDR_PE (1 << 6)
141# define CIA_ERR_RCVD_MAS_ABT (1 << 7)
142# define CIA_ERR_RCVD_TAR_ABT (1 << 8)
143# define CIA_ERR_PA_PTE_INV (1 << 9)
144# define CIA_ERR_FROM_WRT_ERR (1 << 10)
145# define CIA_ERR_IOA_TIMEOUT (1 << 11)
146# define CIA_ERR_LOST_CORR_ERR (1 << 16)
147# define CIA_ERR_LOST_UN_CORR_ERR (1 << 17)
148# define CIA_ERR_LOST_CPU_PE (1 << 18)
149# define CIA_ERR_LOST_MEM_NEM (1 << 19)
150# define CIA_ERR_LOST_PERR (1 << 21)
151# define CIA_ERR_LOST_PCI_ADDR_PE (1 << 22)
152# define CIA_ERR_LOST_RCVD_MAS_ABT (1 << 23)
153# define CIA_ERR_LOST_RCVD_TAR_ABT (1 << 24)
154# define CIA_ERR_LOST_PA_PTE_INV (1 << 25)
155# define CIA_ERR_LOST_FROM_WRT_ERR (1 << 26)
156# define CIA_ERR_LOST_IOA_TIMEOUT (1 << 27)
157# define CIA_ERR_VALID (1 << 31)
158#define CIA_IOC_CIA_STAT (IDENT_ADDR + 0x8740008240UL)
159#define CIA_IOC_ERR_MASK (IDENT_ADDR + 0x8740008280UL)
160#define CIA_IOC_CIA_SYN (IDENT_ADDR + 0x8740008300UL)
161#define CIA_IOC_MEM_ERR0 (IDENT_ADDR + 0x8740008400UL)
162#define CIA_IOC_MEM_ERR1 (IDENT_ADDR + 0x8740008440UL)
163#define CIA_IOC_PCI_ERR0 (IDENT_ADDR + 0x8740008800UL)
164#define CIA_IOC_PCI_ERR1 (IDENT_ADDR + 0x8740008840UL)
165#define CIA_IOC_PCI_ERR3 (IDENT_ADDR + 0x8740008880UL)
166
167/*
168 * 21171-CA System configuration registers
169 */
170#define CIA_IOC_MCR (IDENT_ADDR + 0x8750000000UL)
171#define CIA_IOC_MBA0 (IDENT_ADDR + 0x8750000600UL)
172#define CIA_IOC_MBA2 (IDENT_ADDR + 0x8750000680UL)
173#define CIA_IOC_MBA4 (IDENT_ADDR + 0x8750000700UL)
174#define CIA_IOC_MBA6 (IDENT_ADDR + 0x8750000780UL)
175#define CIA_IOC_MBA8 (IDENT_ADDR + 0x8750000800UL)
176#define CIA_IOC_MBAA (IDENT_ADDR + 0x8750000880UL)
177#define CIA_IOC_MBAC (IDENT_ADDR + 0x8750000900UL)
178#define CIA_IOC_MBAE (IDENT_ADDR + 0x8750000980UL)
179#define CIA_IOC_TMG0 (IDENT_ADDR + 0x8750000B00UL)
180#define CIA_IOC_TMG1 (IDENT_ADDR + 0x8750000B40UL)
181#define CIA_IOC_TMG2 (IDENT_ADDR + 0x8750000B80UL)
182
183/*
184 * 2117A-CA PCI Address and Scatter-Gather Registers.
185 */
186#define CIA_IOC_PCI_TBIA (IDENT_ADDR + 0x8760000100UL)
187
188#define CIA_IOC_PCI_W0_BASE (IDENT_ADDR + 0x8760000400UL)
189#define CIA_IOC_PCI_W0_MASK (IDENT_ADDR + 0x8760000440UL)
190#define CIA_IOC_PCI_T0_BASE (IDENT_ADDR + 0x8760000480UL)
191
192#define CIA_IOC_PCI_W1_BASE (IDENT_ADDR + 0x8760000500UL)
193#define CIA_IOC_PCI_W1_MASK (IDENT_ADDR + 0x8760000540UL)
194#define CIA_IOC_PCI_T1_BASE (IDENT_ADDR + 0x8760000580UL)
195
196#define CIA_IOC_PCI_W2_BASE (IDENT_ADDR + 0x8760000600UL)
197#define CIA_IOC_PCI_W2_MASK (IDENT_ADDR + 0x8760000640UL)
198#define CIA_IOC_PCI_T2_BASE (IDENT_ADDR + 0x8760000680UL)
199
200#define CIA_IOC_PCI_W3_BASE (IDENT_ADDR + 0x8760000700UL)
201#define CIA_IOC_PCI_W3_MASK (IDENT_ADDR + 0x8760000740UL)
202#define CIA_IOC_PCI_T3_BASE (IDENT_ADDR + 0x8760000780UL)
203
204#define CIA_IOC_PCI_Wn_BASE(N) (IDENT_ADDR + 0x8760000400UL + (N)*0x100)
205#define CIA_IOC_PCI_Wn_MASK(N) (IDENT_ADDR + 0x8760000440UL + (N)*0x100)
206#define CIA_IOC_PCI_Tn_BASE(N) (IDENT_ADDR + 0x8760000480UL + (N)*0x100)
207
208#define CIA_IOC_PCI_W_DAC (IDENT_ADDR + 0x87600007C0UL)
209
210/*
211 * 2117A-CA Address Translation Registers.
212 */
213
214/* 8 tag registers, the first 4 of which are lockable. */
215#define CIA_IOC_TB_TAGn(n) \
216 (IDENT_ADDR + 0x8760000800UL + (n)*0x40)
217
218/* 4 page registers per tag register. */
219#define CIA_IOC_TBn_PAGEm(n,m) \
220 (IDENT_ADDR + 0x8760001000UL + (n)*0x100 + (m)*0x40)
221
222/*
223 * Memory spaces:
224 */
225#define CIA_IACK_SC (IDENT_ADDR + 0x8720000000UL)
226#define CIA_CONF (IDENT_ADDR + 0x8700000000UL)
227#define CIA_IO (IDENT_ADDR + 0x8580000000UL)
228#define CIA_SPARSE_MEM (IDENT_ADDR + 0x8000000000UL)
229#define CIA_SPARSE_MEM_R2 (IDENT_ADDR + 0x8400000000UL)
230#define CIA_SPARSE_MEM_R3 (IDENT_ADDR + 0x8500000000UL)
231#define CIA_DENSE_MEM (IDENT_ADDR + 0x8600000000UL)
232#define CIA_BW_MEM (IDENT_ADDR + 0x8800000000UL)
233#define CIA_BW_IO (IDENT_ADDR + 0x8900000000UL)
234#define CIA_BW_CFG_0 (IDENT_ADDR + 0x8a00000000UL)
235#define CIA_BW_CFG_1 (IDENT_ADDR + 0x8b00000000UL)
236
237/*
238 * ALCOR's GRU ASIC registers
239 */
240#define GRU_INT_REQ (IDENT_ADDR + 0x8780000000UL)
241#define GRU_INT_MASK (IDENT_ADDR + 0x8780000040UL)
242#define GRU_INT_EDGE (IDENT_ADDR + 0x8780000080UL)
243#define GRU_INT_HILO (IDENT_ADDR + 0x87800000C0UL)
244#define GRU_INT_CLEAR (IDENT_ADDR + 0x8780000100UL)
245
246#define GRU_CACHE_CNFG (IDENT_ADDR + 0x8780000200UL)
247#define GRU_SCR (IDENT_ADDR + 0x8780000300UL)
248#define GRU_LED (IDENT_ADDR + 0x8780000800UL)
249#define GRU_RESET (IDENT_ADDR + 0x8780000900UL)
250
251#define ALCOR_GRU_INT_REQ_BITS 0x800fffffUL
252#define XLT_GRU_INT_REQ_BITS 0x80003fffUL
253#define GRU_INT_REQ_BITS (alpha_mv.sys.cia.gru_int_req_bits+0)
254
255/*
256 * PYXIS interrupt control registers
257 */
258#define PYXIS_INT_REQ (IDENT_ADDR + 0x87A0000000UL)
259#define PYXIS_INT_MASK (IDENT_ADDR + 0x87A0000040UL)
260#define PYXIS_INT_HILO (IDENT_ADDR + 0x87A00000C0UL)
261#define PYXIS_INT_ROUTE (IDENT_ADDR + 0x87A0000140UL)
262#define PYXIS_GPO (IDENT_ADDR + 0x87A0000180UL)
263#define PYXIS_INT_CNFG (IDENT_ADDR + 0x87A00001C0UL)
264#define PYXIS_RT_COUNT (IDENT_ADDR + 0x87A0000200UL)
265#define PYXIS_INT_TIME (IDENT_ADDR + 0x87A0000240UL)
266#define PYXIS_IIC_CTRL (IDENT_ADDR + 0x87A00002C0UL)
267#define PYXIS_RESET (IDENT_ADDR + 0x8780000900UL)
268
269/* Offset between ram physical addresses and pci64 DAC bus addresses. */
270#define PYXIS_DAC_OFFSET (1UL << 40)
271
272/*
273 * Data structure for handling CIA machine checks.
274 */
275
276/* System-specific info. */
277struct el_CIA_sysdata_mcheck {
278 unsigned long cpu_err0;
279 unsigned long cpu_err1;
280 unsigned long cia_err;
281 unsigned long cia_stat;
282 unsigned long err_mask;
283 unsigned long cia_syn;
284 unsigned long mem_err0;
285 unsigned long mem_err1;
286 unsigned long pci_err0;
287 unsigned long pci_err1;
288 unsigned long pci_err2;
289};
290
291
292#ifdef __KERNEL__
293
294#ifndef __EXTERN_INLINE
295/* Do not touch, this should *NOT* be static inline */
296#define __EXTERN_INLINE extern inline
297#define __IO_EXTERN_INLINE
298#endif
299
300/*
301 * I/O functions:
302 *
303 * CIA (the 2117x PCI/memory support chipset for the EV5 (21164)
304 * series of processors uses a sparse address mapping scheme to
305 * get at PCI memory and I/O.
306 */
307
308/*
309 * Memory functions. 64-bit and 32-bit accesses are done through
310 * dense memory space, everything else through sparse space.
311 *
312 * For reading and writing 8 and 16 bit quantities we need to
313 * go through one of the three sparse address mapping regions
314 * and use the HAE_MEM CSR to provide some bits of the address.
315 * The following few routines use only sparse address region 1
316 * which gives 1Gbyte of accessible space which relates exactly
317 * to the amount of PCI memory mapping *into* system address space.
318 * See p 6-17 of the specification but it looks something like this:
319 *
320 * 21164 Address:
321 *
322 * 3 2 1
323 * 9876543210987654321098765432109876543210
324 * 1ZZZZ0.PCI.QW.Address............BBLL
325 *
326 * ZZ = SBZ
327 * BB = Byte offset
328 * LL = Transfer length
329 *
330 * PCI Address:
331 *
332 * 3 2 1
333 * 10987654321098765432109876543210
334 * HHH....PCI.QW.Address........ 00
335 *
336 * HHH = 31:29 HAE_MEM CSR
337 *
338 */
339
340#define vip volatile int __force *
341#define vuip volatile unsigned int __force *
342#define vulp volatile unsigned long __force *
343
344__EXTERN_INLINE unsigned int cia_ioread8(void __iomem *xaddr)
345{
346 unsigned long addr = (unsigned long) xaddr;
347 unsigned long result, base_and_type;
348
349 if (addr >= CIA_DENSE_MEM)
350 base_and_type = CIA_SPARSE_MEM + 0x00;
351 else
352 base_and_type = CIA_IO + 0x00;
353
354 /* We can use CIA_MEM_R1_MASK for io ports too, since it is large
355 enough to cover all io ports, and smaller than CIA_IO. */
356 addr &= CIA_MEM_R1_MASK;
357 result = *(vip) ((addr << 5) + base_and_type);
358 return __kernel_extbl(result, addr & 3);
359}
360
361__EXTERN_INLINE void cia_iowrite8(u8 b, void __iomem *xaddr)
362{
363 unsigned long addr = (unsigned long) xaddr;
364 unsigned long w, base_and_type;
365
366 if (addr >= CIA_DENSE_MEM)
367 base_and_type = CIA_SPARSE_MEM + 0x00;
368 else
369 base_and_type = CIA_IO + 0x00;
370
371 addr &= CIA_MEM_R1_MASK;
372 w = __kernel_insbl(b, addr & 3);
373 *(vuip) ((addr << 5) + base_and_type) = w;
374}
375
376__EXTERN_INLINE unsigned int cia_ioread16(void __iomem *xaddr)
377{
378 unsigned long addr = (unsigned long) xaddr;
379 unsigned long result, base_and_type;
380
381 if (addr >= CIA_DENSE_MEM)
382 base_and_type = CIA_SPARSE_MEM + 0x08;
383 else
384 base_and_type = CIA_IO + 0x08;
385
386 addr &= CIA_MEM_R1_MASK;
387 result = *(vip) ((addr << 5) + base_and_type);
388 return __kernel_extwl(result, addr & 3);
389}
390
391__EXTERN_INLINE void cia_iowrite16(u16 b, void __iomem *xaddr)
392{
393 unsigned long addr = (unsigned long) xaddr;
394 unsigned long w, base_and_type;
395
396 if (addr >= CIA_DENSE_MEM)
397 base_and_type = CIA_SPARSE_MEM + 0x08;
398 else
399 base_and_type = CIA_IO + 0x08;
400
401 addr &= CIA_MEM_R1_MASK;
402 w = __kernel_inswl(b, addr & 3);
403 *(vuip) ((addr << 5) + base_and_type) = w;
404}
405
406__EXTERN_INLINE unsigned int cia_ioread32(void __iomem *xaddr)
407{
408 unsigned long addr = (unsigned long) xaddr;
409 if (addr < CIA_DENSE_MEM)
410 addr = ((addr - CIA_IO) << 5) + CIA_IO + 0x18;
411 return *(vuip)addr;
412}
413
414__EXTERN_INLINE void cia_iowrite32(u32 b, void __iomem *xaddr)
415{
416 unsigned long addr = (unsigned long) xaddr;
417 if (addr < CIA_DENSE_MEM)
418 addr = ((addr - CIA_IO) << 5) + CIA_IO + 0x18;
419 *(vuip)addr = b;
420}
421
422__EXTERN_INLINE void __iomem *cia_ioportmap(unsigned long addr)
423{
424 return (void __iomem *)(addr + CIA_IO);
425}
426
427__EXTERN_INLINE void __iomem *cia_ioremap(unsigned long addr,
428 unsigned long size)
429{
430 return (void __iomem *)(addr + CIA_DENSE_MEM);
431}
432
433__EXTERN_INLINE int cia_is_ioaddr(unsigned long addr)
434{
435 return addr >= IDENT_ADDR + 0x8000000000UL;
436}
437
438__EXTERN_INLINE int cia_is_mmio(const volatile void __iomem *addr)
439{
440 return (unsigned long)addr >= CIA_DENSE_MEM;
441}
442
443__EXTERN_INLINE void __iomem *cia_bwx_ioportmap(unsigned long addr)
444{
445 return (void __iomem *)(addr + CIA_BW_IO);
446}
447
448__EXTERN_INLINE void __iomem *cia_bwx_ioremap(unsigned long addr,
449 unsigned long size)
450{
451 return (void __iomem *)(addr + CIA_BW_MEM);
452}
453
454__EXTERN_INLINE int cia_bwx_is_ioaddr(unsigned long addr)
455{
456 return addr >= IDENT_ADDR + 0x8000000000UL;
457}
458
459__EXTERN_INLINE int cia_bwx_is_mmio(const volatile void __iomem *addr)
460{
461 return (unsigned long)addr < CIA_BW_IO;
462}
463
464#undef vip
465#undef vuip
466#undef vulp
467
468#undef __IO_PREFIX
469#define __IO_PREFIX cia
470#define cia_trivial_rw_bw 2
471#define cia_trivial_rw_lq 1
472#define cia_trivial_io_bw 0
473#define cia_trivial_io_lq 0
474#define cia_trivial_iounmap 1
475#include <asm/io_trivial.h>
476
477#undef __IO_PREFIX
478#define __IO_PREFIX cia_bwx
479#define cia_bwx_trivial_rw_bw 1
480#define cia_bwx_trivial_rw_lq 1
481#define cia_bwx_trivial_io_bw 1
482#define cia_bwx_trivial_io_lq 1
483#define cia_bwx_trivial_iounmap 1
484#include <asm/io_trivial.h>
485
486#undef __IO_PREFIX
487#ifdef CONFIG_ALPHA_PYXIS
488#define __IO_PREFIX cia_bwx
489#else
490#define __IO_PREFIX cia
491#endif
492
493#ifdef __IO_EXTERN_INLINE
494#undef __EXTERN_INLINE
495#undef __IO_EXTERN_INLINE
496#endif
497
498#endif /* __KERNEL__ */
499
500#endif /* __ALPHA_CIA__H__ */
diff --git a/include/asm-alpha/core_irongate.h b/include/asm-alpha/core_irongate.h
deleted file mode 100644
index 24b2db541501..000000000000
--- a/include/asm-alpha/core_irongate.h
+++ /dev/null
@@ -1,232 +0,0 @@
1#ifndef __ALPHA_IRONGATE__H__
2#define __ALPHA_IRONGATE__H__
3
4#include <linux/types.h>
5#include <asm/compiler.h>
6
7/*
8 * IRONGATE is the internal name for the AMD-751 K7 core logic chipset
9 * which provides memory controller and PCI access for NAUTILUS-based
10 * EV6 (21264) systems.
11 *
12 * This file is based on:
13 *
14 * IronGate management library, (c) 1999 Alpha Processor, Inc.
15 * Copyright (C) 1999 Alpha Processor, Inc.,
16 * (David Daniel, Stig Telfer, Soohoon Lee)
17 */
18
19/*
20 * The 21264 supports, and internally recognizes, a 44-bit physical
21 * address space that is divided equally between memory address space
22 * and I/O address space. Memory address space resides in the lower
23 * half of the physical address space (PA[43]=0) and I/O address space
24 * resides in the upper half of the physical address space (PA[43]=1).
25 */
26
27/*
28 * Irongate CSR map. Some of the CSRs are 8 or 16 bits, but all access
29 * through the routines given is 32-bit.
30 *
31 * The first 0x40 bytes are standard as per the PCI spec.
32 */
33
34typedef volatile __u32 igcsr32;
35
36typedef struct {
37 igcsr32 dev_vendor; /* 0x00 - device ID, vendor ID */
38 igcsr32 stat_cmd; /* 0x04 - status, command */
39 igcsr32 class; /* 0x08 - class code, rev ID */
40 igcsr32 latency; /* 0x0C - header type, PCI latency */
41 igcsr32 bar0; /* 0x10 - BAR0 - AGP */
42 igcsr32 bar1; /* 0x14 - BAR1 - GART */
43 igcsr32 bar2; /* 0x18 - Power Management reg block */
44
45 igcsr32 rsrvd0[6]; /* 0x1C-0x33 reserved */
46
47 igcsr32 capptr; /* 0x34 - Capabilities pointer */
48
49 igcsr32 rsrvd1[2]; /* 0x38-0x3F reserved */
50
51 igcsr32 bacsr10; /* 0x40 - base address chip selects */
52 igcsr32 bacsr32; /* 0x44 - base address chip selects */
53 igcsr32 bacsr54_eccms761; /* 0x48 - 751: base addr. chip selects
54 761: ECC, mode/status */
55
56 igcsr32 rsrvd2[1]; /* 0x4C-0x4F reserved */
57
58 igcsr32 drammap; /* 0x50 - address mapping control */
59 igcsr32 dramtm; /* 0x54 - timing, driver strength */
60 igcsr32 dramms; /* 0x58 - DRAM mode/status */
61
62 igcsr32 rsrvd3[1]; /* 0x5C-0x5F reserved */
63
64 igcsr32 biu0; /* 0x60 - bus interface unit */
65 igcsr32 biusip; /* 0x64 - Serial initialisation pkt */
66
67 igcsr32 rsrvd4[2]; /* 0x68-0x6F reserved */
68
69 igcsr32 mro; /* 0x70 - memory request optimiser */
70
71 igcsr32 rsrvd5[3]; /* 0x74-0x7F reserved */
72
73 igcsr32 whami; /* 0x80 - who am I */
74 igcsr32 pciarb; /* 0x84 - PCI arbitration control */
75 igcsr32 pcicfg; /* 0x88 - PCI config status */
76
77 igcsr32 rsrvd6[4]; /* 0x8C-0x9B reserved */
78
79 igcsr32 pci_mem; /* 0x9C - PCI top of memory,
80 761 only */
81
82 /* AGP (bus 1) control registers */
83 igcsr32 agpcap; /* 0xA0 - AGP Capability Identifier */
84 igcsr32 agpstat; /* 0xA4 - AGP status register */
85 igcsr32 agpcmd; /* 0xA8 - AGP control register */
86 igcsr32 agpva; /* 0xAC - AGP Virtual Address Space */
87 igcsr32 agpmode; /* 0xB0 - AGP/GART mode control */
88} Irongate0;
89
90
91typedef struct {
92
93 igcsr32 dev_vendor; /* 0x00 - Device and Vendor IDs */
94 igcsr32 stat_cmd; /* 0x04 - Status and Command regs */
95 igcsr32 class; /* 0x08 - subclass, baseclass etc */
96 igcsr32 htype; /* 0x0C - header type (at 0x0E) */
97 igcsr32 rsrvd0[2]; /* 0x10-0x17 reserved */
98 igcsr32 busnos; /* 0x18 - Primary, secondary bus nos */
99 igcsr32 io_baselim_regs; /* 0x1C - IO base, IO lim, AGP status */
100 igcsr32 mem_baselim; /* 0x20 - memory base, memory lim */
101 igcsr32 pfmem_baselim; /* 0x24 - prefetchable base, lim */
102 igcsr32 rsrvd1[2]; /* 0x28-0x2F reserved */
103 igcsr32 io_baselim; /* 0x30 - IO base, IO limit */
104 igcsr32 rsrvd2[2]; /* 0x34-0x3B - reserved */
105 igcsr32 interrupt; /* 0x3C - interrupt, PCI bridge ctrl */
106
107} Irongate1;
108
109extern igcsr32 *IronECC;
110
111/*
112 * Memory spaces:
113 */
114
115/* Irongate is consistent with a subset of the Tsunami memory map */
116#ifdef USE_48_BIT_KSEG
117#define IRONGATE_BIAS 0x80000000000UL
118#else
119#define IRONGATE_BIAS 0x10000000000UL
120#endif
121
122
123#define IRONGATE_MEM (IDENT_ADDR | IRONGATE_BIAS | 0x000000000UL)
124#define IRONGATE_IACK_SC (IDENT_ADDR | IRONGATE_BIAS | 0x1F8000000UL)
125#define IRONGATE_IO (IDENT_ADDR | IRONGATE_BIAS | 0x1FC000000UL)
126#define IRONGATE_CONF (IDENT_ADDR | IRONGATE_BIAS | 0x1FE000000UL)
127
128/*
129 * PCI Configuration space accesses are formed like so:
130 *
131 * 0x1FE << 24 | : 2 2 2 2 1 1 1 1 : 1 1 1 1 1 1 0 0 : 0 0 0 0 0 0 0 0 :
132 * : 3 2 1 0 9 8 7 6 : 5 4 3 2 1 0 9 8 : 7 6 5 4 3 2 1 0 :
133 * ---bus numer--- -device-- -fun- ---register----
134 */
135
136#define IGCSR(dev,fun,reg) ( IRONGATE_CONF | \
137 ((dev)<<11) | \
138 ((fun)<<8) | \
139 (reg) )
140
141#define IRONGATE0 ((Irongate0 *) IGCSR(0, 0, 0))
142#define IRONGATE1 ((Irongate1 *) IGCSR(1, 0, 0))
143
144/*
145 * Data structure for handling IRONGATE machine checks:
146 * This is the standard OSF logout frame
147 */
148
149#define SCB_Q_SYSERR 0x620 /* OSF definitions */
150#define SCB_Q_PROCERR 0x630
151#define SCB_Q_SYSMCHK 0x660
152#define SCB_Q_PROCMCHK 0x670
153
154struct el_IRONGATE_sysdata_mcheck {
155 __u32 FrameSize; /* Bytes, including this field */
156 __u32 FrameFlags; /* <31> = Retry, <30> = Second Error */
157 __u32 CpuOffset; /* Offset to CPU-specific into */
158 __u32 SystemOffset; /* Offset to system-specific info */
159 __u32 MCHK_Code;
160 __u32 MCHK_Frame_Rev;
161 __u64 I_STAT;
162 __u64 DC_STAT;
163 __u64 C_ADDR;
164 __u64 DC1_SYNDROME;
165 __u64 DC0_SYNDROME;
166 __u64 C_STAT;
167 __u64 C_STS;
168 __u64 RESERVED0;
169 __u64 EXC_ADDR;
170 __u64 IER_CM;
171 __u64 ISUM;
172 __u64 MM_STAT;
173 __u64 PAL_BASE;
174 __u64 I_CTL;
175 __u64 PCTX;
176};
177
178
179#ifdef __KERNEL__
180
181#ifndef __EXTERN_INLINE
182#define __EXTERN_INLINE extern inline
183#define __IO_EXTERN_INLINE
184#endif
185
186/*
187 * I/O functions:
188 *
189 * IRONGATE (AMD-751) PCI/memory support chip for the EV6 (21264) and
190 * K7 can only use linear accesses to get at PCI memory and I/O spaces.
191 */
192
193/*
194 * Memory functions. All accesses are done through linear space.
195 */
196
197__EXTERN_INLINE void __iomem *irongate_ioportmap(unsigned long addr)
198{
199 return (void __iomem *)(addr + IRONGATE_IO);
200}
201
202extern void __iomem *irongate_ioremap(unsigned long addr, unsigned long size);
203extern void irongate_iounmap(volatile void __iomem *addr);
204
205__EXTERN_INLINE int irongate_is_ioaddr(unsigned long addr)
206{
207 return addr >= IRONGATE_MEM;
208}
209
210__EXTERN_INLINE int irongate_is_mmio(const volatile void __iomem *xaddr)
211{
212 unsigned long addr = (unsigned long)xaddr;
213 return addr < IRONGATE_IO || addr >= IRONGATE_CONF;
214}
215
216#undef __IO_PREFIX
217#define __IO_PREFIX irongate
218#define irongate_trivial_rw_bw 1
219#define irongate_trivial_rw_lq 1
220#define irongate_trivial_io_bw 1
221#define irongate_trivial_io_lq 1
222#define irongate_trivial_iounmap 0
223#include <asm/io_trivial.h>
224
225#ifdef __IO_EXTERN_INLINE
226#undef __EXTERN_INLINE
227#undef __IO_EXTERN_INLINE
228#endif
229
230#endif /* __KERNEL__ */
231
232#endif /* __ALPHA_IRONGATE__H__ */
diff --git a/include/asm-alpha/core_lca.h b/include/asm-alpha/core_lca.h
deleted file mode 100644
index f7cb4b460954..000000000000
--- a/include/asm-alpha/core_lca.h
+++ /dev/null
@@ -1,361 +0,0 @@
1#ifndef __ALPHA_LCA__H__
2#define __ALPHA_LCA__H__
3
4#include <asm/system.h>
5#include <asm/compiler.h>
6
7/*
8 * Low Cost Alpha (LCA) definitions (these apply to 21066 and 21068,
9 * for example).
10 *
11 * This file is based on:
12 *
13 * DECchip 21066 and DECchip 21068 Alpha AXP Microprocessors
14 * Hardware Reference Manual; Digital Equipment Corp.; May 1994;
15 * Maynard, MA; Order Number: EC-N2681-71.
16 */
17
18/*
19 * NOTE: The LCA uses a Host Address Extension (HAE) register to access
20 * PCI addresses that are beyond the first 27 bits of address
21 * space. Updating the HAE requires an external cycle (and
22 * a memory barrier), which tends to be slow. Instead of updating
23 * it on each sparse memory access, we keep the current HAE value
24 * cached in variable cache_hae. Only if the cached HAE differs
25 * from the desired HAE value do we actually updated HAE register.
26 * The HAE register is preserved by the interrupt handler entry/exit
27 * code, so this scheme works even in the presence of interrupts.
28 *
29 * Dense memory space doesn't require the HAE, but is restricted to
30 * aligned 32 and 64 bit accesses. Special Cycle and Interrupt
31 * Acknowledge cycles may also require the use of the HAE. The LCA
32 * limits I/O address space to the bottom 24 bits of address space,
33 * but this easily covers the 16 bit ISA I/O address space.
34 */
35
36/*
37 * NOTE 2! The memory operations do not set any memory barriers, as
38 * it's not needed for cases like a frame buffer that is essentially
39 * memory-like. You need to do them by hand if the operations depend
40 * on ordering.
41 *
42 * Similarly, the port I/O operations do a "mb" only after a write
43 * operation: if an mb is needed before (as in the case of doing
44 * memory mapped I/O first, and then a port I/O operation to the same
45 * device), it needs to be done by hand.
46 *
47 * After the above has bitten me 100 times, I'll give up and just do
48 * the mb all the time, but right now I'm hoping this will work out.
49 * Avoiding mb's may potentially be a noticeable speed improvement,
50 * but I can't honestly say I've tested it.
51 *
52 * Handling interrupts that need to do mb's to synchronize to
53 * non-interrupts is another fun race area. Don't do it (because if
54 * you do, I'll have to do *everything* with interrupts disabled,
55 * ugh).
56 */
57
58/*
59 * Memory Controller registers:
60 */
61#define LCA_MEM_BCR0 (IDENT_ADDR + 0x120000000UL)
62#define LCA_MEM_BCR1 (IDENT_ADDR + 0x120000008UL)
63#define LCA_MEM_BCR2 (IDENT_ADDR + 0x120000010UL)
64#define LCA_MEM_BCR3 (IDENT_ADDR + 0x120000018UL)
65#define LCA_MEM_BMR0 (IDENT_ADDR + 0x120000020UL)
66#define LCA_MEM_BMR1 (IDENT_ADDR + 0x120000028UL)
67#define LCA_MEM_BMR2 (IDENT_ADDR + 0x120000030UL)
68#define LCA_MEM_BMR3 (IDENT_ADDR + 0x120000038UL)
69#define LCA_MEM_BTR0 (IDENT_ADDR + 0x120000040UL)
70#define LCA_MEM_BTR1 (IDENT_ADDR + 0x120000048UL)
71#define LCA_MEM_BTR2 (IDENT_ADDR + 0x120000050UL)
72#define LCA_MEM_BTR3 (IDENT_ADDR + 0x120000058UL)
73#define LCA_MEM_GTR (IDENT_ADDR + 0x120000060UL)
74#define LCA_MEM_ESR (IDENT_ADDR + 0x120000068UL)
75#define LCA_MEM_EAR (IDENT_ADDR + 0x120000070UL)
76#define LCA_MEM_CAR (IDENT_ADDR + 0x120000078UL)
77#define LCA_MEM_VGR (IDENT_ADDR + 0x120000080UL)
78#define LCA_MEM_PLM (IDENT_ADDR + 0x120000088UL)
79#define LCA_MEM_FOR (IDENT_ADDR + 0x120000090UL)
80
81/*
82 * I/O Controller registers:
83 */
84#define LCA_IOC_HAE (IDENT_ADDR + 0x180000000UL)
85#define LCA_IOC_CONF (IDENT_ADDR + 0x180000020UL)
86#define LCA_IOC_STAT0 (IDENT_ADDR + 0x180000040UL)
87#define LCA_IOC_STAT1 (IDENT_ADDR + 0x180000060UL)
88#define LCA_IOC_TBIA (IDENT_ADDR + 0x180000080UL)
89#define LCA_IOC_TB_ENA (IDENT_ADDR + 0x1800000a0UL)
90#define LCA_IOC_SFT_RST (IDENT_ADDR + 0x1800000c0UL)
91#define LCA_IOC_PAR_DIS (IDENT_ADDR + 0x1800000e0UL)
92#define LCA_IOC_W_BASE0 (IDENT_ADDR + 0x180000100UL)
93#define LCA_IOC_W_BASE1 (IDENT_ADDR + 0x180000120UL)
94#define LCA_IOC_W_MASK0 (IDENT_ADDR + 0x180000140UL)
95#define LCA_IOC_W_MASK1 (IDENT_ADDR + 0x180000160UL)
96#define LCA_IOC_T_BASE0 (IDENT_ADDR + 0x180000180UL)
97#define LCA_IOC_T_BASE1 (IDENT_ADDR + 0x1800001a0UL)
98#define LCA_IOC_TB_TAG0 (IDENT_ADDR + 0x188000000UL)
99#define LCA_IOC_TB_TAG1 (IDENT_ADDR + 0x188000020UL)
100#define LCA_IOC_TB_TAG2 (IDENT_ADDR + 0x188000040UL)
101#define LCA_IOC_TB_TAG3 (IDENT_ADDR + 0x188000060UL)
102#define LCA_IOC_TB_TAG4 (IDENT_ADDR + 0x188000070UL)
103#define LCA_IOC_TB_TAG5 (IDENT_ADDR + 0x1880000a0UL)
104#define LCA_IOC_TB_TAG6 (IDENT_ADDR + 0x1880000c0UL)
105#define LCA_IOC_TB_TAG7 (IDENT_ADDR + 0x1880000e0UL)
106
107/*
108 * Memory spaces:
109 */
110#define LCA_IACK_SC (IDENT_ADDR + 0x1a0000000UL)
111#define LCA_CONF (IDENT_ADDR + 0x1e0000000UL)
112#define LCA_IO (IDENT_ADDR + 0x1c0000000UL)
113#define LCA_SPARSE_MEM (IDENT_ADDR + 0x200000000UL)
114#define LCA_DENSE_MEM (IDENT_ADDR + 0x300000000UL)
115
116/*
117 * Bit definitions for I/O Controller status register 0:
118 */
119#define LCA_IOC_STAT0_CMD 0xf
120#define LCA_IOC_STAT0_ERR (1<<4)
121#define LCA_IOC_STAT0_LOST (1<<5)
122#define LCA_IOC_STAT0_THIT (1<<6)
123#define LCA_IOC_STAT0_TREF (1<<7)
124#define LCA_IOC_STAT0_CODE_SHIFT 8
125#define LCA_IOC_STAT0_CODE_MASK 0x7
126#define LCA_IOC_STAT0_P_NBR_SHIFT 13
127#define LCA_IOC_STAT0_P_NBR_MASK 0x7ffff
128
129#define LCA_HAE_ADDRESS LCA_IOC_HAE
130
131/* LCA PMR Power Management register defines */
132#define LCA_PMR_ADDR (IDENT_ADDR + 0x120000098UL)
133#define LCA_PMR_PDIV 0x7 /* Primary clock divisor */
134#define LCA_PMR_ODIV 0x38 /* Override clock divisor */
135#define LCA_PMR_INTO 0x40 /* Interrupt override */
136#define LCA_PMR_DMAO 0x80 /* DMA override */
137#define LCA_PMR_OCCEB 0xffff0000L /* Override cycle counter - even bits */
138#define LCA_PMR_OCCOB 0xffff000000000000L /* Override cycle counter - even bits */
139#define LCA_PMR_PRIMARY_MASK 0xfffffffffffffff8L
140
141/* LCA PMR Macros */
142
143#define LCA_READ_PMR (*(volatile unsigned long *)LCA_PMR_ADDR)
144#define LCA_WRITE_PMR(d) (*((volatile unsigned long *)LCA_PMR_ADDR) = (d))
145
146#define LCA_GET_PRIMARY(r) ((r) & LCA_PMR_PDIV)
147#define LCA_GET_OVERRIDE(r) (((r) >> 3) & LCA_PMR_PDIV)
148#define LCA_SET_PRIMARY_CLOCK(r, c) ((r) = (((r) & LCA_PMR_PRIMARY_MASK)|(c)))
149
150/* LCA PMR Divisor values */
151#define LCA_PMR_DIV_1 0x0
152#define LCA_PMR_DIV_1_5 0x1
153#define LCA_PMR_DIV_2 0x2
154#define LCA_PMR_DIV_4 0x3
155#define LCA_PMR_DIV_8 0x4
156#define LCA_PMR_DIV_16 0x5
157#define LCA_PMR_DIV_MIN DIV_1
158#define LCA_PMR_DIV_MAX DIV_16
159
160
161/*
162 * Data structure for handling LCA machine checks. Correctable errors
163 * result in a short logout frame, uncorrectable ones in a long one.
164 */
165struct el_lca_mcheck_short {
166 struct el_common h; /* common logout header */
167 unsigned long esr; /* error-status register */
168 unsigned long ear; /* error-address register */
169 unsigned long dc_stat; /* dcache status register */
170 unsigned long ioc_stat0; /* I/O controller status register 0 */
171 unsigned long ioc_stat1; /* I/O controller status register 1 */
172};
173
174struct el_lca_mcheck_long {
175 struct el_common h; /* common logout header */
176 unsigned long pt[31]; /* PAL temps */
177 unsigned long exc_addr; /* exception address */
178 unsigned long pad1[3];
179 unsigned long pal_base; /* PALcode base address */
180 unsigned long hier; /* hw interrupt enable */
181 unsigned long hirr; /* hw interrupt request */
182 unsigned long mm_csr; /* MMU control & status */
183 unsigned long dc_stat; /* data cache status */
184 unsigned long dc_addr; /* data cache addr register */
185 unsigned long abox_ctl; /* address box control register */
186 unsigned long esr; /* error status register */
187 unsigned long ear; /* error address register */
188 unsigned long car; /* cache control register */
189 unsigned long ioc_stat0; /* I/O controller status register 0 */
190 unsigned long ioc_stat1; /* I/O controller status register 1 */
191 unsigned long va; /* virtual address register */
192};
193
194union el_lca {
195 struct el_common * c;
196 struct el_lca_mcheck_long * l;
197 struct el_lca_mcheck_short * s;
198};
199
200#ifdef __KERNEL__
201
202#ifndef __EXTERN_INLINE
203#define __EXTERN_INLINE extern inline
204#define __IO_EXTERN_INLINE
205#endif
206
207/*
208 * I/O functions:
209 *
210 * Unlike Jensen, the Noname machines have no concept of local
211 * I/O---everything goes over the PCI bus.
212 *
213 * There is plenty room for optimization here. In particular,
214 * the Alpha's insb/insw/extb/extw should be useful in moving
215 * data to/from the right byte-lanes.
216 */
217
218#define vip volatile int __force *
219#define vuip volatile unsigned int __force *
220#define vulp volatile unsigned long __force *
221
222#define LCA_SET_HAE \
223 do { \
224 if (addr >= (1UL << 24)) { \
225 unsigned long msb = addr & 0xf8000000; \
226 addr -= msb; \
227 set_hae(msb); \
228 } \
229 } while (0)
230
231
232__EXTERN_INLINE unsigned int lca_ioread8(void __iomem *xaddr)
233{
234 unsigned long addr = (unsigned long) xaddr;
235 unsigned long result, base_and_type;
236
237 if (addr >= LCA_DENSE_MEM) {
238 addr -= LCA_DENSE_MEM;
239 LCA_SET_HAE;
240 base_and_type = LCA_SPARSE_MEM + 0x00;
241 } else {
242 addr -= LCA_IO;
243 base_and_type = LCA_IO + 0x00;
244 }
245
246 result = *(vip) ((addr << 5) + base_and_type);
247 return __kernel_extbl(result, addr & 3);
248}
249
250__EXTERN_INLINE void lca_iowrite8(u8 b, void __iomem *xaddr)
251{
252 unsigned long addr = (unsigned long) xaddr;
253 unsigned long w, base_and_type;
254
255 if (addr >= LCA_DENSE_MEM) {
256 addr -= LCA_DENSE_MEM;
257 LCA_SET_HAE;
258 base_and_type = LCA_SPARSE_MEM + 0x00;
259 } else {
260 addr -= LCA_IO;
261 base_and_type = LCA_IO + 0x00;
262 }
263
264 w = __kernel_insbl(b, addr & 3);
265 *(vuip) ((addr << 5) + base_and_type) = w;
266}
267
268__EXTERN_INLINE unsigned int lca_ioread16(void __iomem *xaddr)
269{
270 unsigned long addr = (unsigned long) xaddr;
271 unsigned long result, base_and_type;
272
273 if (addr >= LCA_DENSE_MEM) {
274 addr -= LCA_DENSE_MEM;
275 LCA_SET_HAE;
276 base_and_type = LCA_SPARSE_MEM + 0x08;
277 } else {
278 addr -= LCA_IO;
279 base_and_type = LCA_IO + 0x08;
280 }
281
282 result = *(vip) ((addr << 5) + base_and_type);
283 return __kernel_extwl(result, addr & 3);
284}
285
286__EXTERN_INLINE void lca_iowrite16(u16 b, void __iomem *xaddr)
287{
288 unsigned long addr = (unsigned long) xaddr;
289 unsigned long w, base_and_type;
290
291 if (addr >= LCA_DENSE_MEM) {
292 addr -= LCA_DENSE_MEM;
293 LCA_SET_HAE;
294 base_and_type = LCA_SPARSE_MEM + 0x08;
295 } else {
296 addr -= LCA_IO;
297 base_and_type = LCA_IO + 0x08;
298 }
299
300 w = __kernel_inswl(b, addr & 3);
301 *(vuip) ((addr << 5) + base_and_type) = w;
302}
303
304__EXTERN_INLINE unsigned int lca_ioread32(void __iomem *xaddr)
305{
306 unsigned long addr = (unsigned long) xaddr;
307 if (addr < LCA_DENSE_MEM)
308 addr = ((addr - LCA_IO) << 5) + LCA_IO + 0x18;
309 return *(vuip)addr;
310}
311
312__EXTERN_INLINE void lca_iowrite32(u32 b, void __iomem *xaddr)
313{
314 unsigned long addr = (unsigned long) xaddr;
315 if (addr < LCA_DENSE_MEM)
316 addr = ((addr - LCA_IO) << 5) + LCA_IO + 0x18;
317 *(vuip)addr = b;
318}
319
320__EXTERN_INLINE void __iomem *lca_ioportmap(unsigned long addr)
321{
322 return (void __iomem *)(addr + LCA_IO);
323}
324
325__EXTERN_INLINE void __iomem *lca_ioremap(unsigned long addr,
326 unsigned long size)
327{
328 return (void __iomem *)(addr + LCA_DENSE_MEM);
329}
330
331__EXTERN_INLINE int lca_is_ioaddr(unsigned long addr)
332{
333 return addr >= IDENT_ADDR + 0x120000000UL;
334}
335
336__EXTERN_INLINE int lca_is_mmio(const volatile void __iomem *addr)
337{
338 return (unsigned long)addr >= LCA_DENSE_MEM;
339}
340
341#undef vip
342#undef vuip
343#undef vulp
344
345#undef __IO_PREFIX
346#define __IO_PREFIX lca
347#define lca_trivial_rw_bw 2
348#define lca_trivial_rw_lq 1
349#define lca_trivial_io_bw 0
350#define lca_trivial_io_lq 0
351#define lca_trivial_iounmap 1
352#include <asm/io_trivial.h>
353
354#ifdef __IO_EXTERN_INLINE
355#undef __EXTERN_INLINE
356#undef __IO_EXTERN_INLINE
357#endif
358
359#endif /* __KERNEL__ */
360
361#endif /* __ALPHA_LCA__H__ */
diff --git a/include/asm-alpha/core_marvel.h b/include/asm-alpha/core_marvel.h
deleted file mode 100644
index 30d55fe7aaf6..000000000000
--- a/include/asm-alpha/core_marvel.h
+++ /dev/null
@@ -1,378 +0,0 @@
1/*
2 * Marvel systems use the IO7 I/O chip provides PCI/PCIX/AGP access
3 *
4 * This file is based on:
5 *
6 * Marvel / EV7 System Programmer's Manual
7 * Revision 1.00
8 * 14 May 2001
9 */
10
11#ifndef __ALPHA_MARVEL__H__
12#define __ALPHA_MARVEL__H__
13
14#include <linux/types.h>
15#include <linux/pci.h>
16#include <linux/spinlock.h>
17
18#include <asm/compiler.h>
19
20#define MARVEL_MAX_PIDS 32 /* as long as we rely on 43-bit superpage */
21#define MARVEL_IRQ_VEC_PE_SHIFT (10)
22#define MARVEL_IRQ_VEC_IRQ_MASK ((1 << MARVEL_IRQ_VEC_PE_SHIFT) - 1)
23#define MARVEL_NR_IRQS \
24 (16 + (MARVEL_MAX_PIDS * (1 << MARVEL_IRQ_VEC_PE_SHIFT)))
25
26/*
27 * EV7 RBOX Registers
28 */
29typedef struct {
30 volatile unsigned long csr __attribute__((aligned(16)));
31} ev7_csr;
32
33typedef struct {
34 ev7_csr RBOX_CFG; /* 0x0000 */
35 ev7_csr RBOX_NSVC;
36 ev7_csr RBOX_EWVC;
37 ev7_csr RBOX_WHAMI;
38 ev7_csr RBOX_TCTL; /* 0x0040 */
39 ev7_csr RBOX_INT;
40 ev7_csr RBOX_IMASK;
41 ev7_csr RBOX_IREQ;
42 ev7_csr RBOX_INTQ; /* 0x0080 */
43 ev7_csr RBOX_INTA;
44 ev7_csr RBOX_IT;
45 ev7_csr RBOX_SCRATCH1;
46 ev7_csr RBOX_SCRATCH2; /* 0x00c0 */
47 ev7_csr RBOX_L_ERR;
48} ev7_csrs;
49
50/*
51 * EV7 CSR addressing macros
52 */
53#define EV7_MASK40(addr) ((addr) & ((1UL << 41) - 1))
54#define EV7_KERN_ADDR(addr) ((void *)(IDENT_ADDR | EV7_MASK40(addr)))
55
56#define EV7_PE_MASK 0x1ffUL /* 9 bits ( 256 + mem/io ) */
57#define EV7_IPE(pe) ((~((long)(pe)) & EV7_PE_MASK) << 35)
58
59#define EV7_CSR_PHYS(pe, off) (EV7_IPE(pe) | (0x7FFCUL << 20) | (off))
60#define EV7_CSRS_PHYS(pe) (EV7_CSR_PHYS(pe, 0UL))
61
62#define EV7_CSR_KERN(pe, off) (EV7_KERN_ADDR(EV7_CSR_PHYS(pe, off)))
63#define EV7_CSRS_KERN(pe) (EV7_KERN_ADDR(EV7_CSRS_PHYS(pe)))
64
65#define EV7_CSR_OFFSET(name) ((unsigned long)&((ev7_csrs *)NULL)->name.csr)
66
67/*
68 * IO7 registers
69 */
70typedef struct {
71 volatile unsigned long csr __attribute__((aligned(64)));
72} io7_csr;
73
74typedef struct {
75 /* I/O Port Control Registers */
76 io7_csr POx_CTRL; /* 0x0000 */
77 io7_csr POx_CACHE_CTL;
78 io7_csr POx_TIMER;
79 io7_csr POx_IO_ADR_EXT;
80 io7_csr POx_MEM_ADR_EXT; /* 0x0100 */
81 io7_csr POx_XCAL_CTRL;
82 io7_csr rsvd1[2]; /* ?? spec doesn't show 0x180 */
83 io7_csr POx_DM_SOURCE; /* 0x0200 */
84 io7_csr POx_DM_DEST;
85 io7_csr POx_DM_SIZE;
86 io7_csr POx_DM_CTRL;
87 io7_csr rsvd2[4]; /* 0x0300 */
88
89 /* AGP Control Registers -- port 3 only */
90 io7_csr AGP_CAP_ID; /* 0x0400 */
91 io7_csr AGP_STAT;
92 io7_csr AGP_CMD;
93 io7_csr rsvd3;
94
95 /* I/O Port Monitor Registers */
96 io7_csr POx_MONCTL; /* 0x0500 */
97 io7_csr POx_CTRA;
98 io7_csr POx_CTRB;
99 io7_csr POx_CTR56;
100 io7_csr POx_SCRATCH; /* 0x0600 */
101 io7_csr POx_XTRA_A;
102 io7_csr POx_XTRA_TS;
103 io7_csr POx_XTRA_Z;
104 io7_csr rsvd4; /* 0x0700 */
105 io7_csr POx_THRESHA;
106 io7_csr POx_THRESHB;
107 io7_csr rsvd5[33];
108
109 /* System Address Space Window Control Registers */
110
111 io7_csr POx_WBASE[4]; /* 0x1000 */
112 io7_csr POx_WMASK[4];
113 io7_csr POx_TBASE[4];
114 io7_csr POx_SG_TBIA;
115 io7_csr POx_MSI_WBASE;
116 io7_csr rsvd6[50];
117
118 /* I/O Port Error Registers */
119 io7_csr POx_ERR_SUM;
120 io7_csr POx_FIRST_ERR;
121 io7_csr POx_MSK_HEI;
122 io7_csr POx_TLB_ERR;
123 io7_csr POx_SPL_COMPLT;
124 io7_csr POx_TRANS_SUM;
125 io7_csr POx_FRC_PCI_ERR;
126 io7_csr POx_MULT_ERR;
127 io7_csr rsvd7[8];
128
129 /* I/O Port End of Interrupt Registers */
130 io7_csr EOI_DAT;
131 io7_csr rsvd8[7];
132 io7_csr POx_IACK_SPECIAL;
133 io7_csr rsvd9[103];
134} io7_ioport_csrs;
135
136typedef struct {
137 io7_csr IO_ASIC_REV; /* 0x30.0000 */
138 io7_csr IO_SYS_REV;
139 io7_csr SER_CHAIN3;
140 io7_csr PO7_RST1;
141 io7_csr PO7_RST2; /* 0x30.0100 */
142 io7_csr POx_RST[4];
143 io7_csr IO7_DWNH;
144 io7_csr IO7_MAF;
145 io7_csr IO7_MAF_TO;
146 io7_csr IO7_ACC_CLUMP; /* 0x30.0300 */
147 io7_csr IO7_PMASK;
148 io7_csr IO7_IOMASK;
149 io7_csr IO7_UPH;
150 io7_csr IO7_UPH_TO; /* 0x30.0400 */
151 io7_csr RBX_IREQ_OFF;
152 io7_csr RBX_INTA_OFF;
153 io7_csr INT_RTY;
154 io7_csr PO7_MONCTL; /* 0x30.0500 */
155 io7_csr PO7_CTRA;
156 io7_csr PO7_CTRB;
157 io7_csr PO7_CTR56;
158 io7_csr PO7_SCRATCH; /* 0x30.0600 */
159 io7_csr PO7_XTRA_A;
160 io7_csr PO7_XTRA_TS;
161 io7_csr PO7_XTRA_Z;
162 io7_csr PO7_PMASK; /* 0x30.0700 */
163 io7_csr PO7_THRESHA;
164 io7_csr PO7_THRESHB;
165 io7_csr rsvd1[97];
166 io7_csr PO7_ERROR_SUM; /* 0x30.2000 */
167 io7_csr PO7_BHOLE_MASK;
168 io7_csr PO7_HEI_MSK;
169 io7_csr PO7_CRD_MSK;
170 io7_csr PO7_UNCRR_SYM; /* 0x30.2100 */
171 io7_csr PO7_CRRCT_SYM;
172 io7_csr PO7_ERR_PKT[2];
173 io7_csr PO7_UGBGE_SYM; /* 0x30.2200 */
174 io7_csr rsbv2[887];
175 io7_csr PO7_LSI_CTL[128]; /* 0x31.0000 */
176 io7_csr rsvd3[123];
177 io7_csr HLT_CTL; /* 0x31.3ec0 */
178 io7_csr HPI_CTL; /* 0x31.3f00 */
179 io7_csr CRD_CTL;
180 io7_csr STV_CTL;
181 io7_csr HEI_CTL;
182 io7_csr PO7_MSI_CTL[16]; /* 0x31.4000 */
183 io7_csr rsvd4[240];
184
185 /*
186 * Interrupt Diagnostic / Test
187 */
188 struct {
189 io7_csr INT_PND;
190 io7_csr INT_CLR;
191 io7_csr INT_EOI;
192 io7_csr rsvd[29];
193 } INT_DIAG[4];
194 io7_csr rsvd5[125]; /* 0x31.a000 */
195 io7_csr MISC_PND; /* 0x31.b800 */
196 io7_csr rsvd6[31];
197 io7_csr MSI_PND[16]; /* 0x31.c000 */
198 io7_csr rsvd7[16];
199 io7_csr MSI_CLR[16]; /* 0x31.c800 */
200} io7_port7_csrs;
201
202/*
203 * IO7 DMA Window Base register (POx_WBASEx)
204 */
205#define wbase_m_ena 0x1
206#define wbase_m_sg 0x2
207#define wbase_m_dac 0x4
208#define wbase_m_addr 0xFFF00000
209union IO7_POx_WBASE {
210 struct {
211 unsigned ena : 1; /* <0> */
212 unsigned sg : 1; /* <1> */
213 unsigned dac : 1; /* <2> -- window 3 only */
214 unsigned rsvd1 : 17;
215 unsigned addr : 12; /* <31:20> */
216 unsigned rsvd2 : 32;
217 } bits;
218 unsigned as_long[2];
219 unsigned as_quad;
220};
221
222/*
223 * IO7 IID (Interrupt IDentifier) format
224 *
225 * For level-sensative interrupts, int_num is encoded as:
226 *
227 * bus/port slot/device INTx
228 * <7:5> <4:2> <1:0>
229 */
230union IO7_IID {
231 struct {
232 unsigned int_num : 9; /* <8:0> */
233 unsigned tpu_mask : 4; /* <12:9> rsvd */
234 unsigned msi : 1; /* 13 */
235 unsigned ipe : 10; /* <23:14> */
236 unsigned long rsvd : 40;
237 } bits;
238 unsigned int as_long[2];
239 unsigned long as_quad;
240};
241
242/*
243 * IO7 addressing macros
244 */
245#define IO7_KERN_ADDR(addr) (EV7_KERN_ADDR(addr))
246
247#define IO7_PORT_MASK 0x07UL /* 3 bits of port */
248
249#define IO7_IPE(pe) (EV7_IPE(pe))
250#define IO7_IPORT(port) ((~((long)(port)) & IO7_PORT_MASK) << 32)
251
252#define IO7_HOSE(pe, port) (IO7_IPE(pe) | IO7_IPORT(port))
253
254#define IO7_MEM_PHYS(pe, port) (IO7_HOSE(pe, port) | 0x00000000UL)
255#define IO7_CONF_PHYS(pe, port) (IO7_HOSE(pe, port) | 0xFE000000UL)
256#define IO7_IO_PHYS(pe, port) (IO7_HOSE(pe, port) | 0xFF000000UL)
257#define IO7_CSR_PHYS(pe, port, off) \
258 (IO7_HOSE(pe, port) | 0xFF800000UL | (off))
259#define IO7_CSRS_PHYS(pe, port) (IO7_CSR_PHYS(pe, port, 0UL))
260#define IO7_PORT7_CSRS_PHYS(pe) (IO7_CSR_PHYS(pe, 7, 0x300000UL))
261
262#define IO7_MEM_KERN(pe, port) (IO7_KERN_ADDR(IO7_MEM_PHYS(pe, port)))
263#define IO7_CONF_KERN(pe, port) (IO7_KERN_ADDR(IO7_CONF_PHYS(pe, port)))
264#define IO7_IO_KERN(pe, port) (IO7_KERN_ADDR(IO7_IO_PHYS(pe, port)))
265#define IO7_CSR_KERN(pe, port, off) (IO7_KERN_ADDR(IO7_CSR_PHYS(pe,port,off)))
266#define IO7_CSRS_KERN(pe, port) (IO7_KERN_ADDR(IO7_CSRS_PHYS(pe, port)))
267#define IO7_PORT7_CSRS_KERN(pe) (IO7_KERN_ADDR(IO7_PORT7_CSRS_PHYS(pe)))
268
269#define IO7_PLL_RNGA(pll) (((pll) >> 3) & 0x7)
270#define IO7_PLL_RNGB(pll) (((pll) >> 6) & 0x7)
271
272#define IO7_MEM_SPACE (2UL * 1024 * 1024 * 1024) /* 2GB MEM */
273#define IO7_IO_SPACE (8UL * 1024 * 1024) /* 8MB I/O */
274
275
276/*
277 * Offset between ram physical addresses and pci64 DAC addresses
278 */
279#define IO7_DAC_OFFSET (1UL << 49)
280
281/*
282 * This is needed to satisify the IO() macro used in initializing the machvec
283 */
284#define MARVEL_IACK_SC \
285 ((unsigned long) \
286 (&(((io7_ioport_csrs *)IO7_CSRS_KERN(0, 0))->POx_IACK_SPECIAL)))
287
288#ifdef __KERNEL__
289
290/*
291 * IO7 structs
292 */
293#define IO7_NUM_PORTS 4
294#define IO7_AGP_PORT 3
295
296struct io7_port {
297 struct io7 *io7;
298 struct pci_controller *hose;
299
300 int enabled;
301 unsigned int port;
302 io7_ioport_csrs *csrs;
303
304 unsigned long saved_wbase[4];
305 unsigned long saved_wmask[4];
306 unsigned long saved_tbase[4];
307};
308
309struct io7 {
310 struct io7 *next;
311
312 unsigned int pe;
313 io7_port7_csrs *csrs;
314 struct io7_port ports[IO7_NUM_PORTS];
315
316 spinlock_t irq_lock;
317};
318
319#ifndef __EXTERN_INLINE
320# define __EXTERN_INLINE extern inline
321# define __IO_EXTERN_INLINE
322#endif
323
324/*
325 * I/O functions. All access through linear space.
326 */
327
328/*
329 * Memory functions. All accesses through linear space.
330 */
331
332#define vucp volatile unsigned char __force *
333#define vusp volatile unsigned short __force *
334
335extern unsigned int marvel_ioread8(void __iomem *);
336extern void marvel_iowrite8(u8 b, void __iomem *);
337
338__EXTERN_INLINE unsigned int marvel_ioread16(void __iomem *addr)
339{
340 return __kernel_ldwu(*(vusp)addr);
341}
342
343__EXTERN_INLINE void marvel_iowrite16(u16 b, void __iomem *addr)
344{
345 __kernel_stw(b, *(vusp)addr);
346}
347
348extern void __iomem *marvel_ioremap(unsigned long addr, unsigned long size);
349extern void marvel_iounmap(volatile void __iomem *addr);
350extern void __iomem *marvel_ioportmap (unsigned long addr);
351
352__EXTERN_INLINE int marvel_is_ioaddr(unsigned long addr)
353{
354 return (addr >> 40) & 1;
355}
356
357extern int marvel_is_mmio(const volatile void __iomem *);
358
359#undef vucp
360#undef vusp
361
362#undef __IO_PREFIX
363#define __IO_PREFIX marvel
364#define marvel_trivial_rw_bw 1
365#define marvel_trivial_rw_lq 1
366#define marvel_trivial_io_bw 0
367#define marvel_trivial_io_lq 1
368#define marvel_trivial_iounmap 0
369#include <asm/io_trivial.h>
370
371#ifdef __IO_EXTERN_INLINE
372# undef __EXTERN_INLINE
373# undef __IO_EXTERN_INLINE
374#endif
375
376#endif /* __KERNEL__ */
377
378#endif /* __ALPHA_MARVEL__H__ */
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h
deleted file mode 100644
index acf55b483472..000000000000
--- a/include/asm-alpha/core_mcpcia.h
+++ /dev/null
@@ -1,381 +0,0 @@
1#ifndef __ALPHA_MCPCIA__H__
2#define __ALPHA_MCPCIA__H__
3
4/* Define to experiment with fitting everything into one 128MB HAE window.
5 One window per bus, that is. */
6#define MCPCIA_ONE_HAE_WINDOW 1
7
8#include <linux/types.h>
9#include <linux/pci.h>
10#include <asm/compiler.h>
11
12/*
13 * MCPCIA is the internal name for a core logic chipset which provides
14 * PCI access for the RAWHIDE family of systems.
15 *
16 * This file is based on:
17 *
18 * RAWHIDE System Programmer's Manual
19 * 16-May-96
20 * Rev. 1.4
21 *
22 */
23
24/*------------------------------------------------------------------------**
25** **
26** I/O procedures **
27** **
28** inport[b|w|t|l], outport[b|w|t|l] 8:16:24:32 IO xfers **
29** inportbxt: 8 bits only **
30** inport: alias of inportw **
31** outport: alias of outportw **
32** **
33** inmem[b|w|t|l], outmem[b|w|t|l] 8:16:24:32 ISA memory xfers **
34** inmembxt: 8 bits only **
35** inmem: alias of inmemw **
36** outmem: alias of outmemw **
37** **
38**------------------------------------------------------------------------*/
39
40
41/* MCPCIA ADDRESS BIT DEFINITIONS
42 *
43 * 3333 3333 3322 2222 2222 1111 1111 11
44 * 9876 5432 1098 7654 3210 9876 5432 1098 7654 3210
45 * ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
46 * 1 000
47 * ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
48 * | |\|
49 * | Byte Enable --+ |
50 * | Transfer Length --+
51 * +-- IO space, not cached
52 *
53 * Byte Transfer
54 * Enable Length Transfer Byte Address
55 * adr<6:5> adr<4:3> Length Enable Adder
56 * ---------------------------------------------
57 * 00 00 Byte 1110 0x000
58 * 01 00 Byte 1101 0x020
59 * 10 00 Byte 1011 0x040
60 * 11 00 Byte 0111 0x060
61 *
62 * 00 01 Word 1100 0x008
63 * 01 01 Word 1001 0x028 <= Not supported in this code.
64 * 10 01 Word 0011 0x048
65 *
66 * 00 10 Tribyte 1000 0x010
67 * 01 10 Tribyte 0001 0x030
68 *
69 * 10 11 Longword 0000 0x058
70 *
71 * Note that byte enables are asserted low.
72 *
73 */
74
75#define MCPCIA_MAX_HOSES 4
76
77#define MCPCIA_MID(m) ((unsigned long)(m) << 33)
78
79/* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively.
80 Durango adds PCI2 and PCI3 at MID 6 and 7 respectively. */
81#define MCPCIA_HOSE2MID(h) ((h) + 4)
82
83#define MCPCIA_MEM_MASK 0x07ffffff /* SPARSE Mem region mask is 27 bits */
84
85/*
86 * Memory spaces:
87 */
88#define MCPCIA_SPARSE(m) (IDENT_ADDR + 0xf000000000UL + MCPCIA_MID(m))
89#define MCPCIA_DENSE(m) (IDENT_ADDR + 0xf100000000UL + MCPCIA_MID(m))
90#define MCPCIA_IO(m) (IDENT_ADDR + 0xf180000000UL + MCPCIA_MID(m))
91#define MCPCIA_CONF(m) (IDENT_ADDR + 0xf1c0000000UL + MCPCIA_MID(m))
92#define MCPCIA_CSR(m) (IDENT_ADDR + 0xf1e0000000UL + MCPCIA_MID(m))
93#define MCPCIA_IO_IACK(m) (IDENT_ADDR + 0xf1f0000000UL + MCPCIA_MID(m))
94#define MCPCIA_DENSE_IO(m) (IDENT_ADDR + 0xe1fc000000UL + MCPCIA_MID(m))
95#define MCPCIA_DENSE_CONF(m) (IDENT_ADDR + 0xe1fe000000UL + MCPCIA_MID(m))
96
97/*
98 * General Registers
99 */
100#define MCPCIA_REV(m) (MCPCIA_CSR(m) + 0x000)
101#define MCPCIA_WHOAMI(m) (MCPCIA_CSR(m) + 0x040)
102#define MCPCIA_PCI_LAT(m) (MCPCIA_CSR(m) + 0x080)
103#define MCPCIA_CAP_CTRL(m) (MCPCIA_CSR(m) + 0x100)
104#define MCPCIA_HAE_MEM(m) (MCPCIA_CSR(m) + 0x400)
105#define MCPCIA_HAE_IO(m) (MCPCIA_CSR(m) + 0x440)
106#define _MCPCIA_IACK_SC(m) (MCPCIA_CSR(m) + 0x480)
107#define MCPCIA_HAE_DENSE(m) (MCPCIA_CSR(m) + 0x4C0)
108
109/*
110 * Interrupt Control registers
111 */
112#define MCPCIA_INT_CTL(m) (MCPCIA_CSR(m) + 0x500)
113#define MCPCIA_INT_REQ(m) (MCPCIA_CSR(m) + 0x540)
114#define MCPCIA_INT_TARG(m) (MCPCIA_CSR(m) + 0x580)
115#define MCPCIA_INT_ADR(m) (MCPCIA_CSR(m) + 0x5C0)
116#define MCPCIA_INT_ADR_EXT(m) (MCPCIA_CSR(m) + 0x600)
117#define MCPCIA_INT_MASK0(m) (MCPCIA_CSR(m) + 0x640)
118#define MCPCIA_INT_MASK1(m) (MCPCIA_CSR(m) + 0x680)
119#define MCPCIA_INT_ACK0(m) (MCPCIA_CSR(m) + 0x10003f00)
120#define MCPCIA_INT_ACK1(m) (MCPCIA_CSR(m) + 0x10003f40)
121
122/*
123 * Performance Monitor registers
124 */
125#define MCPCIA_PERF_MON(m) (MCPCIA_CSR(m) + 0x300)
126#define MCPCIA_PERF_CONT(m) (MCPCIA_CSR(m) + 0x340)
127
128/*
129 * Diagnostic Registers
130 */
131#define MCPCIA_CAP_DIAG(m) (MCPCIA_CSR(m) + 0x700)
132#define MCPCIA_TOP_OF_MEM(m) (MCPCIA_CSR(m) + 0x7C0)
133
134/*
135 * Error registers
136 */
137#define MCPCIA_MC_ERR0(m) (MCPCIA_CSR(m) + 0x800)
138#define MCPCIA_MC_ERR1(m) (MCPCIA_CSR(m) + 0x840)
139#define MCPCIA_CAP_ERR(m) (MCPCIA_CSR(m) + 0x880)
140#define MCPCIA_PCI_ERR1(m) (MCPCIA_CSR(m) + 0x1040)
141#define MCPCIA_MDPA_STAT(m) (MCPCIA_CSR(m) + 0x4000)
142#define MCPCIA_MDPA_SYN(m) (MCPCIA_CSR(m) + 0x4040)
143#define MCPCIA_MDPA_DIAG(m) (MCPCIA_CSR(m) + 0x4080)
144#define MCPCIA_MDPB_STAT(m) (MCPCIA_CSR(m) + 0x8000)
145#define MCPCIA_MDPB_SYN(m) (MCPCIA_CSR(m) + 0x8040)
146#define MCPCIA_MDPB_DIAG(m) (MCPCIA_CSR(m) + 0x8080)
147
148/*
149 * PCI Address Translation Registers.
150 */
151#define MCPCIA_SG_TBIA(m) (MCPCIA_CSR(m) + 0x1300)
152#define MCPCIA_HBASE(m) (MCPCIA_CSR(m) + 0x1340)
153
154#define MCPCIA_W0_BASE(m) (MCPCIA_CSR(m) + 0x1400)
155#define MCPCIA_W0_MASK(m) (MCPCIA_CSR(m) + 0x1440)
156#define MCPCIA_T0_BASE(m) (MCPCIA_CSR(m) + 0x1480)
157
158#define MCPCIA_W1_BASE(m) (MCPCIA_CSR(m) + 0x1500)
159#define MCPCIA_W1_MASK(m) (MCPCIA_CSR(m) + 0x1540)
160#define MCPCIA_T1_BASE(m) (MCPCIA_CSR(m) + 0x1580)
161
162#define MCPCIA_W2_BASE(m) (MCPCIA_CSR(m) + 0x1600)
163#define MCPCIA_W2_MASK(m) (MCPCIA_CSR(m) + 0x1640)
164#define MCPCIA_T2_BASE(m) (MCPCIA_CSR(m) + 0x1680)
165
166#define MCPCIA_W3_BASE(m) (MCPCIA_CSR(m) + 0x1700)
167#define MCPCIA_W3_MASK(m) (MCPCIA_CSR(m) + 0x1740)
168#define MCPCIA_T3_BASE(m) (MCPCIA_CSR(m) + 0x1780)
169
170/* Hack! Only words for bus 0. */
171
172#ifndef MCPCIA_ONE_HAE_WINDOW
173#define MCPCIA_HAE_ADDRESS MCPCIA_HAE_MEM(4)
174#endif
175#define MCPCIA_IACK_SC _MCPCIA_IACK_SC(4)
176
177/*
178 * The canonical non-remaped I/O and MEM addresses have these values
179 * subtracted out. This is arranged so that folks manipulating ISA
180 * devices can use their familiar numbers and have them map to bus 0.
181 */
182
183#define MCPCIA_IO_BIAS MCPCIA_IO(4)
184#define MCPCIA_MEM_BIAS MCPCIA_DENSE(4)
185
186/* Offset between ram physical addresses and pci64 DAC bus addresses. */
187#define MCPCIA_DAC_OFFSET (1UL << 40)
188
189/*
190 * Data structure for handling MCPCIA machine checks:
191 */
192struct el_MCPCIA_uncorrected_frame_mcheck {
193 struct el_common header;
194 struct el_common_EV5_uncorrectable_mcheck procdata;
195};
196
197
198#ifdef __KERNEL__
199
200#ifndef __EXTERN_INLINE
201#define __EXTERN_INLINE extern inline
202#define __IO_EXTERN_INLINE
203#endif
204
205/*
206 * I/O functions:
207 *
208 * MCPCIA, the RAWHIDE family PCI/memory support chipset for the EV5 (21164)
209 * and EV56 (21164a) processors, can use either a sparse address mapping
210 * scheme, or the so-called byte-word PCI address space, to get at PCI memory
211 * and I/O.
212 *
213 * Unfortunately, we can't use BWIO with EV5, so for now, we always use SPARSE.
214 */
215
216/*
217 * Memory functions. 64-bit and 32-bit accesses are done through
218 * dense memory space, everything else through sparse space.
219 *
220 * For reading and writing 8 and 16 bit quantities we need to
221 * go through one of the three sparse address mapping regions
222 * and use the HAE_MEM CSR to provide some bits of the address.
223 * The following few routines use only sparse address region 1
224 * which gives 1Gbyte of accessible space which relates exactly
225 * to the amount of PCI memory mapping *into* system address space.
226 * See p 6-17 of the specification but it looks something like this:
227 *
228 * 21164 Address:
229 *
230 * 3 2 1
231 * 9876543210987654321098765432109876543210
232 * 1ZZZZ0.PCI.QW.Address............BBLL
233 *
234 * ZZ = SBZ
235 * BB = Byte offset
236 * LL = Transfer length
237 *
238 * PCI Address:
239 *
240 * 3 2 1
241 * 10987654321098765432109876543210
242 * HHH....PCI.QW.Address........ 00
243 *
244 * HHH = 31:29 HAE_MEM CSR
245 *
246 */
247
248#define vip volatile int __force *
249#define vuip volatile unsigned int __force *
250
251#ifdef MCPCIA_ONE_HAE_WINDOW
252#define MCPCIA_FROB_MMIO \
253 if (__mcpcia_is_mmio(hose)) { \
254 set_hae(hose & 0xffffffff); \
255 hose = hose - MCPCIA_DENSE(4) + MCPCIA_SPARSE(4); \
256 }
257#else
258#define MCPCIA_FROB_MMIO \
259 if (__mcpcia_is_mmio(hose)) { \
260 hose = hose - MCPCIA_DENSE(4) + MCPCIA_SPARSE(4); \
261 }
262#endif
263
264extern inline int __mcpcia_is_mmio(unsigned long addr)
265{
266 return (addr & 0x80000000UL) == 0;
267}
268
269__EXTERN_INLINE unsigned int mcpcia_ioread8(void __iomem *xaddr)
270{
271 unsigned long addr = (unsigned long)xaddr & MCPCIA_MEM_MASK;
272 unsigned long hose = (unsigned long)xaddr & ~MCPCIA_MEM_MASK;
273 unsigned long result;
274
275 MCPCIA_FROB_MMIO;
276
277 result = *(vip) ((addr << 5) + hose + 0x00);
278 return __kernel_extbl(result, addr & 3);
279}
280
281__EXTERN_INLINE void mcpcia_iowrite8(u8 b, void __iomem *xaddr)
282{
283 unsigned long addr = (unsigned long)xaddr & MCPCIA_MEM_MASK;
284 unsigned long hose = (unsigned long)xaddr & ~MCPCIA_MEM_MASK;
285 unsigned long w;
286
287 MCPCIA_FROB_MMIO;
288
289 w = __kernel_insbl(b, addr & 3);
290 *(vuip) ((addr << 5) + hose + 0x00) = w;
291}
292
293__EXTERN_INLINE unsigned int mcpcia_ioread16(void __iomem *xaddr)
294{
295 unsigned long addr = (unsigned long)xaddr & MCPCIA_MEM_MASK;
296 unsigned long hose = (unsigned long)xaddr & ~MCPCIA_MEM_MASK;
297 unsigned long result;
298
299 MCPCIA_FROB_MMIO;
300
301 result = *(vip) ((addr << 5) + hose + 0x08);
302 return __kernel_extwl(result, addr & 3);
303}
304
305__EXTERN_INLINE void mcpcia_iowrite16(u16 b, void __iomem *xaddr)
306{
307 unsigned long addr = (unsigned long)xaddr & MCPCIA_MEM_MASK;
308 unsigned long hose = (unsigned long)xaddr & ~MCPCIA_MEM_MASK;
309 unsigned long w;
310
311 MCPCIA_FROB_MMIO;
312
313 w = __kernel_inswl(b, addr & 3);
314 *(vuip) ((addr << 5) + hose + 0x08) = w;
315}
316
317__EXTERN_INLINE unsigned int mcpcia_ioread32(void __iomem *xaddr)
318{
319 unsigned long addr = (unsigned long)xaddr;
320
321 if (!__mcpcia_is_mmio(addr))
322 addr = ((addr & 0xffff) << 5) + (addr & ~0xfffful) + 0x18;
323
324 return *(vuip)addr;
325}
326
327__EXTERN_INLINE void mcpcia_iowrite32(u32 b, void __iomem *xaddr)
328{
329 unsigned long addr = (unsigned long)xaddr;
330
331 if (!__mcpcia_is_mmio(addr))
332 addr = ((addr & 0xffff) << 5) + (addr & ~0xfffful) + 0x18;
333
334 *(vuip)addr = b;
335}
336
337
338__EXTERN_INLINE void __iomem *mcpcia_ioportmap(unsigned long addr)
339{
340 return (void __iomem *)(addr + MCPCIA_IO_BIAS);
341}
342
343__EXTERN_INLINE void __iomem *mcpcia_ioremap(unsigned long addr,
344 unsigned long size)
345{
346 return (void __iomem *)(addr + MCPCIA_MEM_BIAS);
347}
348
349__EXTERN_INLINE int mcpcia_is_ioaddr(unsigned long addr)
350{
351 return addr >= MCPCIA_SPARSE(0);
352}
353
354__EXTERN_INLINE int mcpcia_is_mmio(const volatile void __iomem *xaddr)
355{
356 unsigned long addr = (unsigned long) xaddr;
357 return __mcpcia_is_mmio(addr);
358}
359
360#undef MCPCIA_FROB_MMIO
361
362#undef vip
363#undef vuip
364
365#undef __IO_PREFIX
366#define __IO_PREFIX mcpcia
367#define mcpcia_trivial_rw_bw 2
368#define mcpcia_trivial_rw_lq 1
369#define mcpcia_trivial_io_bw 0
370#define mcpcia_trivial_io_lq 0
371#define mcpcia_trivial_iounmap 1
372#include <asm/io_trivial.h>
373
374#ifdef __IO_EXTERN_INLINE
375#undef __EXTERN_INLINE
376#undef __IO_EXTERN_INLINE
377#endif
378
379#endif /* __KERNEL__ */
380
381#endif /* __ALPHA_MCPCIA__H__ */
diff --git a/include/asm-alpha/core_polaris.h b/include/asm-alpha/core_polaris.h
deleted file mode 100644
index 2f966b64659d..000000000000
--- a/include/asm-alpha/core_polaris.h
+++ /dev/null
@@ -1,110 +0,0 @@
1#ifndef __ALPHA_POLARIS__H__
2#define __ALPHA_POLARIS__H__
3
4#include <linux/types.h>
5#include <asm/compiler.h>
6
7/*
8 * POLARIS is the internal name for a core logic chipset which provides
9 * memory controller and PCI access for the 21164PC chip based systems.
10 *
11 * This file is based on:
12 *
13 * Polaris System Controller
14 * Device Functional Specification
15 * 22-Jan-98
16 * Rev. 4.2
17 *
18 */
19
20/* Polaris memory regions */
21#define POLARIS_SPARSE_MEM_BASE (IDENT_ADDR + 0xf800000000UL)
22#define POLARIS_DENSE_MEM_BASE (IDENT_ADDR + 0xf900000000UL)
23#define POLARIS_SPARSE_IO_BASE (IDENT_ADDR + 0xf980000000UL)
24#define POLARIS_SPARSE_CONFIG_BASE (IDENT_ADDR + 0xf9c0000000UL)
25#define POLARIS_IACK_BASE (IDENT_ADDR + 0xf9f8000000UL)
26#define POLARIS_DENSE_IO_BASE (IDENT_ADDR + 0xf9fc000000UL)
27#define POLARIS_DENSE_CONFIG_BASE (IDENT_ADDR + 0xf9fe000000UL)
28
29#define POLARIS_IACK_SC POLARIS_IACK_BASE
30
31/* The Polaris command/status registers live in PCI Config space for
32 * bus 0/device 0. As such, they may be bytes, words, or doublewords.
33 */
34#define POLARIS_W_VENID (POLARIS_DENSE_CONFIG_BASE)
35#define POLARIS_W_DEVID (POLARIS_DENSE_CONFIG_BASE+2)
36#define POLARIS_W_CMD (POLARIS_DENSE_CONFIG_BASE+4)
37#define POLARIS_W_STATUS (POLARIS_DENSE_CONFIG_BASE+6)
38
39/*
40 * Data structure for handling POLARIS machine checks:
41 */
42struct el_POLARIS_sysdata_mcheck {
43 u_long psc_status;
44 u_long psc_pcictl0;
45 u_long psc_pcictl1;
46 u_long psc_pcictl2;
47};
48
49#ifdef __KERNEL__
50
51#ifndef __EXTERN_INLINE
52#define __EXTERN_INLINE extern inline
53#define __IO_EXTERN_INLINE
54#endif
55
56/*
57 * I/O functions:
58 *
59 * POLARIS, the PCI/memory support chipset for the PCA56 (21164PC)
60 * processors, can use either a sparse address mapping scheme, or the
61 * so-called byte-word PCI address space, to get at PCI memory and I/O.
62 *
63 * However, we will support only the BWX form.
64 */
65
66/*
67 * Memory functions. Polaris allows all accesses (byte/word
68 * as well as long/quad) to be done through dense space.
69 *
70 * We will only support DENSE access via BWX insns.
71 */
72
73__EXTERN_INLINE void __iomem *polaris_ioportmap(unsigned long addr)
74{
75 return (void __iomem *)(addr + POLARIS_DENSE_IO_BASE);
76}
77
78__EXTERN_INLINE void __iomem *polaris_ioremap(unsigned long addr,
79 unsigned long size)
80{
81 return (void __iomem *)(addr + POLARIS_DENSE_MEM_BASE);
82}
83
84__EXTERN_INLINE int polaris_is_ioaddr(unsigned long addr)
85{
86 return addr >= POLARIS_SPARSE_MEM_BASE;
87}
88
89__EXTERN_INLINE int polaris_is_mmio(const volatile void __iomem *addr)
90{
91 return (unsigned long)addr < POLARIS_SPARSE_IO_BASE;
92}
93
94#undef __IO_PREFIX
95#define __IO_PREFIX polaris
96#define polaris_trivial_rw_bw 1
97#define polaris_trivial_rw_lq 1
98#define polaris_trivial_io_bw 1
99#define polaris_trivial_io_lq 1
100#define polaris_trivial_iounmap 1
101#include <asm/io_trivial.h>
102
103#ifdef __IO_EXTERN_INLINE
104#undef __EXTERN_INLINE
105#undef __IO_EXTERN_INLINE
106#endif
107
108#endif /* __KERNEL__ */
109
110#endif /* __ALPHA_POLARIS__H__ */
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h
deleted file mode 100644
index 46bfff58f670..000000000000
--- a/include/asm-alpha/core_t2.h
+++ /dev/null
@@ -1,633 +0,0 @@
1#ifndef __ALPHA_T2__H__
2#define __ALPHA_T2__H__
3
4#include <linux/types.h>
5#include <linux/spinlock.h>
6#include <asm/compiler.h>
7#include <asm/system.h>
8
9/*
10 * T2 is the internal name for the core logic chipset which provides
11 * memory controller and PCI access for the SABLE-based systems.
12 *
13 * This file is based on:
14 *
15 * SABLE I/O Specification
16 * Revision/Update Information: 1.3
17 *
18 * jestabro@amt.tay1.dec.com Initial Version.
19 *
20 */
21
22#define T2_MEM_R1_MASK 0x07ffffff /* Mem sparse region 1 mask is 26 bits */
23
24/* GAMMA-SABLE is a SABLE with EV5-based CPUs */
25/* All LYNX machines, EV4 or EV5, use the GAMMA bias also */
26#define _GAMMA_BIAS 0x8000000000UL
27
28#if defined(CONFIG_ALPHA_GENERIC)
29#define GAMMA_BIAS alpha_mv.sys.t2.gamma_bias
30#elif defined(CONFIG_ALPHA_GAMMA)
31#define GAMMA_BIAS _GAMMA_BIAS
32#else
33#define GAMMA_BIAS 0
34#endif
35
36/*
37 * Memory spaces:
38 */
39#define T2_CONF (IDENT_ADDR + GAMMA_BIAS + 0x390000000UL)
40#define T2_IO (IDENT_ADDR + GAMMA_BIAS + 0x3a0000000UL)
41#define T2_SPARSE_MEM (IDENT_ADDR + GAMMA_BIAS + 0x200000000UL)
42#define T2_DENSE_MEM (IDENT_ADDR + GAMMA_BIAS + 0x3c0000000UL)
43
44#define T2_IOCSR (IDENT_ADDR + GAMMA_BIAS + 0x38e000000UL)
45#define T2_CERR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000020UL)
46#define T2_CERR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000040UL)
47#define T2_CERR3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000060UL)
48#define T2_PERR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000080UL)
49#define T2_PERR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0000a0UL)
50#define T2_PSCR (IDENT_ADDR + GAMMA_BIAS + 0x38e0000c0UL)
51#define T2_HAE_1 (IDENT_ADDR + GAMMA_BIAS + 0x38e0000e0UL)
52#define T2_HAE_2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000100UL)
53#define T2_HBASE (IDENT_ADDR + GAMMA_BIAS + 0x38e000120UL)
54#define T2_WBASE1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000140UL)
55#define T2_WMASK1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000160UL)
56#define T2_TBASE1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000180UL)
57#define T2_WBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001a0UL)
58#define T2_WMASK2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001c0UL)
59#define T2_TBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001e0UL)
60#define T2_TLBBR (IDENT_ADDR + GAMMA_BIAS + 0x38e000200UL)
61#define T2_IVR (IDENT_ADDR + GAMMA_BIAS + 0x38e000220UL)
62#define T2_HAE_3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000240UL)
63#define T2_HAE_4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000260UL)
64
65/* The CSRs below are T3/T4 only */
66#define T2_WBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000280UL)
67#define T2_WMASK3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002a0UL)
68#define T2_TBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002c0UL)
69
70#define T2_TDR0 (IDENT_ADDR + GAMMA_BIAS + 0x38e000300UL)
71#define T2_TDR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000320UL)
72#define T2_TDR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000340UL)
73#define T2_TDR3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000360UL)
74#define T2_TDR4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000380UL)
75#define T2_TDR5 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003a0UL)
76#define T2_TDR6 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003c0UL)
77#define T2_TDR7 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003e0UL)
78
79#define T2_WBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000400UL)
80#define T2_WMASK4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000420UL)
81#define T2_TBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000440UL)
82
83#define T2_AIR (IDENT_ADDR + GAMMA_BIAS + 0x38e000460UL)
84#define T2_VAR (IDENT_ADDR + GAMMA_BIAS + 0x38e000480UL)
85#define T2_DIR (IDENT_ADDR + GAMMA_BIAS + 0x38e0004a0UL)
86#define T2_ICE (IDENT_ADDR + GAMMA_BIAS + 0x38e0004c0UL)
87
88#define T2_HAE_ADDRESS T2_HAE_1
89
90/* T2 CSRs are in the non-cachable primary IO space from 3.8000.0000 to
91 3.8fff.ffff
92 *
93 * +--------------+ 3 8000 0000
94 * | CPU 0 CSRs |
95 * +--------------+ 3 8100 0000
96 * | CPU 1 CSRs |
97 * +--------------+ 3 8200 0000
98 * | CPU 2 CSRs |
99 * +--------------+ 3 8300 0000
100 * | CPU 3 CSRs |
101 * +--------------+ 3 8400 0000
102 * | CPU Reserved |
103 * +--------------+ 3 8700 0000
104 * | Mem Reserved |
105 * +--------------+ 3 8800 0000
106 * | Mem 0 CSRs |
107 * +--------------+ 3 8900 0000
108 * | Mem 1 CSRs |
109 * +--------------+ 3 8a00 0000
110 * | Mem 2 CSRs |
111 * +--------------+ 3 8b00 0000
112 * | Mem 3 CSRs |
113 * +--------------+ 3 8c00 0000
114 * | Mem Reserved |
115 * +--------------+ 3 8e00 0000
116 * | PCI Bridge |
117 * +--------------+ 3 8f00 0000
118 * | Expansion IO |
119 * +--------------+ 3 9000 0000
120 *
121 *
122 */
123#define T2_CPU0_BASE (IDENT_ADDR + GAMMA_BIAS + 0x380000000L)
124#define T2_CPU1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x381000000L)
125#define T2_CPU2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x382000000L)
126#define T2_CPU3_BASE (IDENT_ADDR + GAMMA_BIAS + 0x383000000L)
127
128#define T2_CPUn_BASE(n) (T2_CPU0_BASE + (((n)&3) * 0x001000000L))
129
130#define T2_MEM0_BASE (IDENT_ADDR + GAMMA_BIAS + 0x388000000L)
131#define T2_MEM1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x389000000L)
132#define T2_MEM2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x38a000000L)
133#define T2_MEM3_BASE (IDENT_ADDR + GAMMA_BIAS + 0x38b000000L)
134
135
136/*
137 * Sable CPU Module CSRS
138 *
139 * These are CSRs for hardware other than the CPU chip on the CPU module.
140 * The CPU module has Backup Cache control logic, Cbus control logic, and
141 * interrupt control logic on it. There is a duplicate tag store to speed
142 * up maintaining cache coherency.
143 */
144
145struct sable_cpu_csr {
146 unsigned long bcc; long fill_00[3]; /* Backup Cache Control */
147 unsigned long bcce; long fill_01[3]; /* Backup Cache Correctable Error */
148 unsigned long bccea; long fill_02[3]; /* B-Cache Corr Err Address Latch */
149 unsigned long bcue; long fill_03[3]; /* B-Cache Uncorrectable Error */
150 unsigned long bcuea; long fill_04[3]; /* B-Cache Uncorr Err Addr Latch */
151 unsigned long dter; long fill_05[3]; /* Duplicate Tag Error */
152 unsigned long cbctl; long fill_06[3]; /* CBus Control */
153 unsigned long cbe; long fill_07[3]; /* CBus Error */
154 unsigned long cbeal; long fill_08[3]; /* CBus Error Addr Latch low */
155 unsigned long cbeah; long fill_09[3]; /* CBus Error Addr Latch high */
156 unsigned long pmbx; long fill_10[3]; /* Processor Mailbox */
157 unsigned long ipir; long fill_11[3]; /* Inter-Processor Int Request */
158 unsigned long sic; long fill_12[3]; /* System Interrupt Clear */
159 unsigned long adlk; long fill_13[3]; /* Address Lock (LDxL/STxC) */
160 unsigned long madrl; long fill_14[3]; /* CBus Miss Address */
161 unsigned long rev; long fill_15[3]; /* CMIC Revision */
162};
163
164/*
165 * Data structure for handling T2 machine checks:
166 */
167struct el_t2_frame_header {
168 unsigned int elcf_fid; /* Frame ID (from above) */
169 unsigned int elcf_size; /* Size of frame in bytes */
170};
171
172struct el_t2_procdata_mcheck {
173 unsigned long elfmc_paltemp[32]; /* PAL TEMP REGS. */
174 /* EV4-specific fields */
175 unsigned long elfmc_exc_addr; /* Addr of excepting insn. */
176 unsigned long elfmc_exc_sum; /* Summary of arith traps. */
177 unsigned long elfmc_exc_mask; /* Exception mask (from exc_sum). */
178 unsigned long elfmc_iccsr; /* IBox hardware enables. */
179 unsigned long elfmc_pal_base; /* Base address for PALcode. */
180 unsigned long elfmc_hier; /* Hardware Interrupt Enable. */
181 unsigned long elfmc_hirr; /* Hardware Interrupt Request. */
182 unsigned long elfmc_mm_csr; /* D-stream fault info. */
183 unsigned long elfmc_dc_stat; /* D-cache status (ECC/Parity Err). */
184 unsigned long elfmc_dc_addr; /* EV3 Phys Addr for ECC/DPERR. */
185 unsigned long elfmc_abox_ctl; /* ABox Control Register. */
186 unsigned long elfmc_biu_stat; /* BIU Status. */
187 unsigned long elfmc_biu_addr; /* BUI Address. */
188 unsigned long elfmc_biu_ctl; /* BIU Control. */
189 unsigned long elfmc_fill_syndrome; /* For correcting ECC errors. */
190 unsigned long elfmc_fill_addr;/* Cache block which was being read. */
191 unsigned long elfmc_va; /* Effective VA of fault or miss. */
192 unsigned long elfmc_bc_tag; /* Backup Cache Tag Probe Results. */
193};
194
195/*
196 * Sable processor specific Machine Check Data segment.
197 */
198
199struct el_t2_logout_header {
200 unsigned int elfl_size; /* size in bytes of logout area. */
201 unsigned int elfl_sbz1:31; /* Should be zero. */
202 unsigned int elfl_retry:1; /* Retry flag. */
203 unsigned int elfl_procoffset; /* Processor-specific offset. */
204 unsigned int elfl_sysoffset; /* Offset of system-specific. */
205 unsigned int elfl_error_type; /* PAL error type code. */
206 unsigned int elfl_frame_rev; /* PAL Frame revision. */
207};
208struct el_t2_sysdata_mcheck {
209 unsigned long elcmc_bcc; /* CSR 0 */
210 unsigned long elcmc_bcce; /* CSR 1 */
211 unsigned long elcmc_bccea; /* CSR 2 */
212 unsigned long elcmc_bcue; /* CSR 3 */
213 unsigned long elcmc_bcuea; /* CSR 4 */
214 unsigned long elcmc_dter; /* CSR 5 */
215 unsigned long elcmc_cbctl; /* CSR 6 */
216 unsigned long elcmc_cbe; /* CSR 7 */
217 unsigned long elcmc_cbeal; /* CSR 8 */
218 unsigned long elcmc_cbeah; /* CSR 9 */
219 unsigned long elcmc_pmbx; /* CSR 10 */
220 unsigned long elcmc_ipir; /* CSR 11 */
221 unsigned long elcmc_sic; /* CSR 12 */
222 unsigned long elcmc_adlk; /* CSR 13 */
223 unsigned long elcmc_madrl; /* CSR 14 */
224 unsigned long elcmc_crrev4; /* CSR 15 */
225};
226
227/*
228 * Sable memory error frame - sable pfms section 3.42
229 */
230struct el_t2_data_memory {
231 struct el_t2_frame_header elcm_hdr; /* ID$MEM-FERR = 0x08 */
232 unsigned int elcm_module; /* Module id. */
233 unsigned int elcm_res04; /* Reserved. */
234 unsigned long elcm_merr; /* CSR0: Error Reg 1. */
235 unsigned long elcm_mcmd1; /* CSR1: Command Trap 1. */
236 unsigned long elcm_mcmd2; /* CSR2: Command Trap 2. */
237 unsigned long elcm_mconf; /* CSR3: Configuration. */
238 unsigned long elcm_medc1; /* CSR4: EDC Status 1. */
239 unsigned long elcm_medc2; /* CSR5: EDC Status 2. */
240 unsigned long elcm_medcc; /* CSR6: EDC Control. */
241 unsigned long elcm_msctl; /* CSR7: Stream Buffer Control. */
242 unsigned long elcm_mref; /* CSR8: Refresh Control. */
243 unsigned long elcm_filter; /* CSR9: CRD Filter Control. */
244};
245
246
247/*
248 * Sable other CPU error frame - sable pfms section 3.43
249 */
250struct el_t2_data_other_cpu {
251 short elco_cpuid; /* CPU ID */
252 short elco_res02[3];
253 unsigned long elco_bcc; /* CSR 0 */
254 unsigned long elco_bcce; /* CSR 1 */
255 unsigned long elco_bccea; /* CSR 2 */
256 unsigned long elco_bcue; /* CSR 3 */
257 unsigned long elco_bcuea; /* CSR 4 */
258 unsigned long elco_dter; /* CSR 5 */
259 unsigned long elco_cbctl; /* CSR 6 */
260 unsigned long elco_cbe; /* CSR 7 */
261 unsigned long elco_cbeal; /* CSR 8 */
262 unsigned long elco_cbeah; /* CSR 9 */
263 unsigned long elco_pmbx; /* CSR 10 */
264 unsigned long elco_ipir; /* CSR 11 */
265 unsigned long elco_sic; /* CSR 12 */
266 unsigned long elco_adlk; /* CSR 13 */
267 unsigned long elco_madrl; /* CSR 14 */
268 unsigned long elco_crrev4; /* CSR 15 */
269};
270
271/*
272 * Sable other CPU error frame - sable pfms section 3.44
273 */
274struct el_t2_data_t2{
275 struct el_t2_frame_header elct_hdr; /* ID$T2-FRAME */
276 unsigned long elct_iocsr; /* IO Control and Status Register */
277 unsigned long elct_cerr1; /* Cbus Error Register 1 */
278 unsigned long elct_cerr2; /* Cbus Error Register 2 */
279 unsigned long elct_cerr3; /* Cbus Error Register 3 */
280 unsigned long elct_perr1; /* PCI Error Register 1 */
281 unsigned long elct_perr2; /* PCI Error Register 2 */
282 unsigned long elct_hae0_1; /* High Address Extension Register 1 */
283 unsigned long elct_hae0_2; /* High Address Extension Register 2 */
284 unsigned long elct_hbase; /* High Base Register */
285 unsigned long elct_wbase1; /* Window Base Register 1 */
286 unsigned long elct_wmask1; /* Window Mask Register 1 */
287 unsigned long elct_tbase1; /* Translated Base Register 1 */
288 unsigned long elct_wbase2; /* Window Base Register 2 */
289 unsigned long elct_wmask2; /* Window Mask Register 2 */
290 unsigned long elct_tbase2; /* Translated Base Register 2 */
291 unsigned long elct_tdr0; /* TLB Data Register 0 */
292 unsigned long elct_tdr1; /* TLB Data Register 1 */
293 unsigned long elct_tdr2; /* TLB Data Register 2 */
294 unsigned long elct_tdr3; /* TLB Data Register 3 */
295 unsigned long elct_tdr4; /* TLB Data Register 4 */
296 unsigned long elct_tdr5; /* TLB Data Register 5 */
297 unsigned long elct_tdr6; /* TLB Data Register 6 */
298 unsigned long elct_tdr7; /* TLB Data Register 7 */
299};
300
301/*
302 * Sable error log data structure - sable pfms section 3.40
303 */
304struct el_t2_data_corrected {
305 unsigned long elcpb_biu_stat;
306 unsigned long elcpb_biu_addr;
307 unsigned long elcpb_biu_ctl;
308 unsigned long elcpb_fill_syndrome;
309 unsigned long elcpb_fill_addr;
310 unsigned long elcpb_bc_tag;
311};
312
313/*
314 * Sable error log data structure
315 * Note there are 4 memory slots on sable (see t2.h)
316 */
317struct el_t2_frame_mcheck {
318 struct el_t2_frame_header elfmc_header; /* ID$P-FRAME_MCHECK */
319 struct el_t2_logout_header elfmc_hdr;
320 struct el_t2_procdata_mcheck elfmc_procdata;
321 struct el_t2_sysdata_mcheck elfmc_sysdata;
322 struct el_t2_data_t2 elfmc_t2data;
323 struct el_t2_data_memory elfmc_memdata[4];
324 struct el_t2_frame_header elfmc_footer; /* empty */
325};
326
327
328/*
329 * Sable error log data structures on memory errors
330 */
331struct el_t2_frame_corrected {
332 struct el_t2_frame_header elfcc_header; /* ID$P-BC-COR */
333 struct el_t2_logout_header elfcc_hdr;
334 struct el_t2_data_corrected elfcc_procdata;
335/* struct el_t2_data_t2 elfcc_t2data; */
336/* struct el_t2_data_memory elfcc_memdata[4]; */
337 struct el_t2_frame_header elfcc_footer; /* empty */
338};
339
340
341#ifdef __KERNEL__
342
343#ifndef __EXTERN_INLINE
344#define __EXTERN_INLINE extern inline
345#define __IO_EXTERN_INLINE
346#endif
347
348/*
349 * I/O functions:
350 *
351 * T2 (the core logic PCI/memory support chipset for the SABLE
352 * series of processors uses a sparse address mapping scheme to
353 * get at PCI memory and I/O.
354 */
355
356#define vip volatile int *
357#define vuip volatile unsigned int *
358
359extern inline u8 t2_inb(unsigned long addr)
360{
361 long result = *(vip) ((addr << 5) + T2_IO + 0x00);
362 return __kernel_extbl(result, addr & 3);
363}
364
365extern inline void t2_outb(u8 b, unsigned long addr)
366{
367 unsigned long w;
368
369 w = __kernel_insbl(b, addr & 3);
370 *(vuip) ((addr << 5) + T2_IO + 0x00) = w;
371 mb();
372}
373
374extern inline u16 t2_inw(unsigned long addr)
375{
376 long result = *(vip) ((addr << 5) + T2_IO + 0x08);
377 return __kernel_extwl(result, addr & 3);
378}
379
380extern inline void t2_outw(u16 b, unsigned long addr)
381{
382 unsigned long w;
383
384 w = __kernel_inswl(b, addr & 3);
385 *(vuip) ((addr << 5) + T2_IO + 0x08) = w;
386 mb();
387}
388
389extern inline u32 t2_inl(unsigned long addr)
390{
391 return *(vuip) ((addr << 5) + T2_IO + 0x18);
392}
393
394extern inline void t2_outl(u32 b, unsigned long addr)
395{
396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b;
397 mb();
398}
399
400
401/*
402 * Memory functions.
403 *
404 * For reading and writing 8 and 16 bit quantities we need to
405 * go through one of the three sparse address mapping regions
406 * and use the HAE_MEM CSR to provide some bits of the address.
407 * The following few routines use only sparse address region 1
408 * which gives 1Gbyte of accessible space which relates exactly
409 * to the amount of PCI memory mapping *into* system address space.
410 * See p 6-17 of the specification but it looks something like this:
411 *
412 * 21164 Address:
413 *
414 * 3 2 1
415 * 9876543210987654321098765432109876543210
416 * 1ZZZZ0.PCI.QW.Address............BBLL
417 *
418 * ZZ = SBZ
419 * BB = Byte offset
420 * LL = Transfer length
421 *
422 * PCI Address:
423 *
424 * 3 2 1
425 * 10987654321098765432109876543210
426 * HHH....PCI.QW.Address........ 00
427 *
428 * HHH = 31:29 HAE_MEM CSR
429 *
430 */
431
432#define t2_set_hae { \
433 msb = addr >> 27; \
434 addr &= T2_MEM_R1_MASK; \
435 set_hae(msb); \
436}
437
438extern spinlock_t t2_hae_lock;
439
440/*
441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since
442 * they may be called directly, rather than through the
443 * ioreadNN/iowriteNN routines.
444 */
445
446__EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr)
447{
448 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
449 unsigned long result, msb;
450 unsigned long flags;
451 spin_lock_irqsave(&t2_hae_lock, flags);
452
453 t2_set_hae;
454
455 result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00);
456 spin_unlock_irqrestore(&t2_hae_lock, flags);
457 return __kernel_extbl(result, addr & 3);
458}
459
460__EXTERN_INLINE u16 t2_readw(const volatile void __iomem *xaddr)
461{
462 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
463 unsigned long result, msb;
464 unsigned long flags;
465 spin_lock_irqsave(&t2_hae_lock, flags);
466
467 t2_set_hae;
468
469 result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08);
470 spin_unlock_irqrestore(&t2_hae_lock, flags);
471 return __kernel_extwl(result, addr & 3);
472}
473
474/*
475 * On SABLE with T2, we must use SPARSE memory even for 32-bit access,
476 * because we cannot access all of DENSE without changing its HAE.
477 */
478__EXTERN_INLINE u32 t2_readl(const volatile void __iomem *xaddr)
479{
480 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
481 unsigned long result, msb;
482 unsigned long flags;
483 spin_lock_irqsave(&t2_hae_lock, flags);
484
485 t2_set_hae;
486
487 result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18);
488 spin_unlock_irqrestore(&t2_hae_lock, flags);
489 return result & 0xffffffffUL;
490}
491
492__EXTERN_INLINE u64 t2_readq(const volatile void __iomem *xaddr)
493{
494 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
495 unsigned long r0, r1, work, msb;
496 unsigned long flags;
497 spin_lock_irqsave(&t2_hae_lock, flags);
498
499 t2_set_hae;
500
501 work = (addr << 5) + T2_SPARSE_MEM + 0x18;
502 r0 = *(vuip)(work);
503 r1 = *(vuip)(work + (4 << 5));
504 spin_unlock_irqrestore(&t2_hae_lock, flags);
505 return r1 << 32 | r0;
506}
507
508__EXTERN_INLINE void t2_writeb(u8 b, volatile void __iomem *xaddr)
509{
510 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
511 unsigned long msb, w;
512 unsigned long flags;
513 spin_lock_irqsave(&t2_hae_lock, flags);
514
515 t2_set_hae;
516
517 w = __kernel_insbl(b, addr & 3);
518 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w;
519 spin_unlock_irqrestore(&t2_hae_lock, flags);
520}
521
522__EXTERN_INLINE void t2_writew(u16 b, volatile void __iomem *xaddr)
523{
524 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
525 unsigned long msb, w;
526 unsigned long flags;
527 spin_lock_irqsave(&t2_hae_lock, flags);
528
529 t2_set_hae;
530
531 w = __kernel_inswl(b, addr & 3);
532 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w;
533 spin_unlock_irqrestore(&t2_hae_lock, flags);
534}
535
536/*
537 * On SABLE with T2, we must use SPARSE memory even for 32-bit access,
538 * because we cannot access all of DENSE without changing its HAE.
539 */
540__EXTERN_INLINE void t2_writel(u32 b, volatile void __iomem *xaddr)
541{
542 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
543 unsigned long msb;
544 unsigned long flags;
545 spin_lock_irqsave(&t2_hae_lock, flags);
546
547 t2_set_hae;
548
549 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b;
550 spin_unlock_irqrestore(&t2_hae_lock, flags);
551}
552
553__EXTERN_INLINE void t2_writeq(u64 b, volatile void __iomem *xaddr)
554{
555 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
556 unsigned long msb, work;
557 unsigned long flags;
558 spin_lock_irqsave(&t2_hae_lock, flags);
559
560 t2_set_hae;
561
562 work = (addr << 5) + T2_SPARSE_MEM + 0x18;
563 *(vuip)work = b;
564 *(vuip)(work + (4 << 5)) = b >> 32;
565 spin_unlock_irqrestore(&t2_hae_lock, flags);
566}
567
568__EXTERN_INLINE void __iomem *t2_ioportmap(unsigned long addr)
569{
570 return (void __iomem *)(addr + T2_IO);
571}
572
573__EXTERN_INLINE void __iomem *t2_ioremap(unsigned long addr,
574 unsigned long size)
575{
576 return (void __iomem *)(addr + T2_DENSE_MEM);
577}
578
579__EXTERN_INLINE int t2_is_ioaddr(unsigned long addr)
580{
581 return (long)addr >= 0;
582}
583
584__EXTERN_INLINE int t2_is_mmio(const volatile void __iomem *addr)
585{
586 return (unsigned long)addr >= T2_DENSE_MEM;
587}
588
589/* New-style ioread interface. The mmio routines are so ugly for T2 that
590 it doesn't make sense to merge the pio and mmio routines. */
591
592#define IOPORT(OS, NS) \
593__EXTERN_INLINE unsigned int t2_ioread##NS(void __iomem *xaddr) \
594{ \
595 if (t2_is_mmio(xaddr)) \
596 return t2_read##OS(xaddr); \
597 else \
598 return t2_in##OS((unsigned long)xaddr - T2_IO); \
599} \
600__EXTERN_INLINE void t2_iowrite##NS(u##NS b, void __iomem *xaddr) \
601{ \
602 if (t2_is_mmio(xaddr)) \
603 t2_write##OS(b, xaddr); \
604 else \
605 t2_out##OS(b, (unsigned long)xaddr - T2_IO); \
606}
607
608IOPORT(b, 8)
609IOPORT(w, 16)
610IOPORT(l, 32)
611
612#undef IOPORT
613
614#undef vip
615#undef vuip
616
617#undef __IO_PREFIX
618#define __IO_PREFIX t2
619#define t2_trivial_rw_bw 0
620#define t2_trivial_rw_lq 0
621#define t2_trivial_io_bw 0
622#define t2_trivial_io_lq 0
623#define t2_trivial_iounmap 1
624#include <asm/io_trivial.h>
625
626#ifdef __IO_EXTERN_INLINE
627#undef __EXTERN_INLINE
628#undef __IO_EXTERN_INLINE
629#endif
630
631#endif /* __KERNEL__ */
632
633#endif /* __ALPHA_T2__H__ */
diff --git a/include/asm-alpha/core_titan.h b/include/asm-alpha/core_titan.h
deleted file mode 100644
index a17f6f33b68e..000000000000
--- a/include/asm-alpha/core_titan.h
+++ /dev/null
@@ -1,410 +0,0 @@
1#ifndef __ALPHA_TITAN__H__
2#define __ALPHA_TITAN__H__
3
4#include <linux/types.h>
5#include <linux/pci.h>
6#include <asm/compiler.h>
7
8/*
9 * TITAN is the internal names for a core logic chipset which provides
10 * memory controller and PCI/AGP access for 21264 based systems.
11 *
12 * This file is based on:
13 *
14 * Titan Chipset Engineering Specification
15 * Revision 0.12
16 * 13 July 1999
17 *
18 */
19
20/* XXX: Do we need to conditionalize on this? */
21#ifdef USE_48_BIT_KSEG
22#define TI_BIAS 0x80000000000UL
23#else
24#define TI_BIAS 0x10000000000UL
25#endif
26
27/*
28 * CChip, DChip, and PChip registers
29 */
30
31typedef struct {
32 volatile unsigned long csr __attribute__((aligned(64)));
33} titan_64;
34
35typedef struct {
36 titan_64 csc;
37 titan_64 mtr;
38 titan_64 misc;
39 titan_64 mpd;
40 titan_64 aar0;
41 titan_64 aar1;
42 titan_64 aar2;
43 titan_64 aar3;
44 titan_64 dim0;
45 titan_64 dim1;
46 titan_64 dir0;
47 titan_64 dir1;
48 titan_64 drir;
49 titan_64 prben;
50 titan_64 iic0;
51 titan_64 iic1;
52 titan_64 mpr0;
53 titan_64 mpr1;
54 titan_64 mpr2;
55 titan_64 mpr3;
56 titan_64 rsvd[2];
57 titan_64 ttr;
58 titan_64 tdr;
59 titan_64 dim2;
60 titan_64 dim3;
61 titan_64 dir2;
62 titan_64 dir3;
63 titan_64 iic2;
64 titan_64 iic3;
65 titan_64 pwr;
66 titan_64 reserved[17];
67 titan_64 cmonctla;
68 titan_64 cmonctlb;
69 titan_64 cmoncnt01;
70 titan_64 cmoncnt23;
71 titan_64 cpen;
72} titan_cchip;
73
74typedef struct {
75 titan_64 dsc;
76 titan_64 str;
77 titan_64 drev;
78 titan_64 dsc2;
79} titan_dchip;
80
81typedef struct {
82 titan_64 wsba[4];
83 titan_64 wsm[4];
84 titan_64 tba[4];
85 titan_64 pctl;
86 titan_64 plat;
87 titan_64 reserved0[2];
88 union {
89 struct {
90 titan_64 serror;
91 titan_64 serren;
92 titan_64 serrset;
93 titan_64 reserved0;
94 titan_64 gperror;
95 titan_64 gperren;
96 titan_64 gperrset;
97 titan_64 reserved1;
98 titan_64 gtlbiv;
99 titan_64 gtlbia;
100 titan_64 reserved2[2];
101 titan_64 sctl;
102 titan_64 reserved3[3];
103 } g;
104 struct {
105 titan_64 agperror;
106 titan_64 agperren;
107 titan_64 agperrset;
108 titan_64 agplastwr;
109 titan_64 aperror;
110 titan_64 aperren;
111 titan_64 aperrset;
112 titan_64 reserved0;
113 titan_64 atlbiv;
114 titan_64 atlbia;
115 titan_64 reserved1[6];
116 } a;
117 } port_specific;
118 titan_64 sprst;
119 titan_64 reserved1[31];
120} titan_pachip_port;
121
122typedef struct {
123 titan_pachip_port g_port;
124 titan_pachip_port a_port;
125} titan_pachip;
126
127#define TITAN_cchip ((titan_cchip *)(IDENT_ADDR+TI_BIAS+0x1A0000000UL))
128#define TITAN_dchip ((titan_dchip *)(IDENT_ADDR+TI_BIAS+0x1B0000800UL))
129#define TITAN_pachip0 ((titan_pachip *)(IDENT_ADDR+TI_BIAS+0x180000000UL))
130#define TITAN_pachip1 ((titan_pachip *)(IDENT_ADDR+TI_BIAS+0x380000000UL))
131extern unsigned TITAN_agp;
132extern int TITAN_bootcpu;
133
134/*
135 * TITAN PA-chip Window Space Base Address register.
136 * (WSBA[0-2])
137 */
138#define wsba_m_ena 0x1
139#define wsba_m_sg 0x2
140#define wsba_m_addr 0xFFF00000
141#define wmask_k_sz1gb 0x3FF00000
142union TPAchipWSBA {
143 struct {
144 unsigned wsba_v_ena : 1;
145 unsigned wsba_v_sg : 1;
146 unsigned wsba_v_rsvd1 : 18;
147 unsigned wsba_v_addr : 12;
148 unsigned wsba_v_rsvd2 : 32;
149 } wsba_r_bits;
150 int wsba_q_whole [2];
151};
152
153/*
154 * TITAN PA-chip Control Register
155 * This definition covers both the G-Port GPCTL and the A-PORT APCTL.
156 * Bits <51:0> are the same in both cases. APCTL<63:52> are only
157 * applicable to AGP.
158 */
159#define pctl_m_fbtb 0x00000001
160#define pctl_m_thdis 0x00000002
161#define pctl_m_chaindis 0x00000004
162#define pctl_m_tgtlat 0x00000018
163#define pctl_m_hole 0x00000020
164#define pctl_m_mwin 0x00000040
165#define pctl_m_arbena 0x00000080
166#define pctl_m_prigrp 0x0000FF00
167#define pctl_m_ppri 0x00010000
168#define pctl_m_pcispd66 0x00020000
169#define pctl_m_cngstlt 0x003C0000
170#define pctl_m_ptpdesten 0x3FC00000
171#define pctl_m_dpcen 0x40000000
172#define pctl_m_apcen 0x0000000080000000UL
173#define pctl_m_dcrtv 0x0000000300000000UL
174#define pctl_m_en_stepping 0x0000000400000000UL
175#define apctl_m_rsvd1 0x000FFFF800000000UL
176#define apctl_m_agp_rate 0x0030000000000000UL
177#define apctl_m_agp_sba_en 0x0040000000000000UL
178#define apctl_m_agp_en 0x0080000000000000UL
179#define apctl_m_rsvd2 0x0100000000000000UL
180#define apctl_m_agp_present 0x0200000000000000UL
181#define apctl_agp_hp_rd 0x1C00000000000000UL
182#define apctl_agp_lp_rd 0xE000000000000000UL
183#define gpctl_m_rsvd 0xFFFFFFF800000000UL
184union TPAchipPCTL {
185 struct {
186 unsigned pctl_v_fbtb : 1; /* A/G [0] */
187 unsigned pctl_v_thdis : 1; /* A/G [1] */
188 unsigned pctl_v_chaindis : 1; /* A/G [2] */
189 unsigned pctl_v_tgtlat : 2; /* A/G [4:3] */
190 unsigned pctl_v_hole : 1; /* A/G [5] */
191 unsigned pctl_v_mwin : 1; /* A/G [6] */
192 unsigned pctl_v_arbena : 1; /* A/G [7] */
193 unsigned pctl_v_prigrp : 8; /* A/G [15:8] */
194 unsigned pctl_v_ppri : 1; /* A/G [16] */
195 unsigned pctl_v_pcispd66 : 1; /* A/G [17] */
196 unsigned pctl_v_cngstlt : 4; /* A/G [21:18] */
197 unsigned pctl_v_ptpdesten : 8; /* A/G [29:22] */
198 unsigned pctl_v_dpcen : 1; /* A/G [30] */
199 unsigned pctl_v_apcen : 1; /* A/G [31] */
200 unsigned pctl_v_dcrtv : 2; /* A/G [33:32] */
201 unsigned pctl_v_en_stepping :1; /* A/G [34] */
202 unsigned apctl_v_rsvd1 : 17; /* A [51:35] */
203 unsigned apctl_v_agp_rate : 2; /* A [53:52] */
204 unsigned apctl_v_agp_sba_en : 1; /* A [54] */
205 unsigned apctl_v_agp_en : 1; /* A [55] */
206 unsigned apctl_v_rsvd2 : 1; /* A [56] */
207 unsigned apctl_v_agp_present : 1; /* A [57] */
208 unsigned apctl_v_agp_hp_rd : 3; /* A [60:58] */
209 unsigned apctl_v_agp_lp_rd : 3; /* A [63:61] */
210 } pctl_r_bits;
211 unsigned int pctl_l_whole [2];
212 unsigned long pctl_q_whole;
213};
214
215/*
216 * SERROR / SERREN / SERRSET
217 */
218union TPAchipSERR {
219 struct {
220 unsigned serr_v_lost_uecc : 1; /* [0] */
221 unsigned serr_v_uecc : 1; /* [1] */
222 unsigned serr_v_cre : 1; /* [2] */
223 unsigned serr_v_nxio : 1; /* [3] */
224 unsigned serr_v_lost_cre : 1; /* [4] */
225 unsigned serr_v_rsvd0 : 10; /* [14:5] */
226 unsigned serr_v_addr : 32; /* [46:15] */
227 unsigned serr_v_rsvd1 : 5; /* [51:47] */
228 unsigned serr_v_source : 2; /* [53:52] */
229 unsigned serr_v_cmd : 2; /* [55:54] */
230 unsigned serr_v_syn : 8; /* [63:56] */
231 } serr_r_bits;
232 unsigned int serr_l_whole[2];
233 unsigned long serr_q_whole;
234};
235
236/*
237 * GPERROR / APERROR / GPERREN / APERREN / GPERRSET / APERRSET
238 */
239union TPAchipPERR {
240 struct {
241 unsigned long perr_v_lost : 1; /* [0] */
242 unsigned long perr_v_serr : 1; /* [1] */
243 unsigned long perr_v_perr : 1; /* [2] */
244 unsigned long perr_v_dcrto : 1; /* [3] */
245 unsigned long perr_v_sge : 1; /* [4] */
246 unsigned long perr_v_ape : 1; /* [5] */
247 unsigned long perr_v_ta : 1; /* [6] */
248 unsigned long perr_v_dpe : 1; /* [7] */
249 unsigned long perr_v_nds : 1; /* [8] */
250 unsigned long perr_v_iptpr : 1; /* [9] */
251 unsigned long perr_v_iptpw : 1; /* [10] */
252 unsigned long perr_v_rsvd0 : 3; /* [13:11] */
253 unsigned long perr_v_addr : 33; /* [46:14] */
254 unsigned long perr_v_dac : 1; /* [47] */
255 unsigned long perr_v_mwin : 1; /* [48] */
256 unsigned long perr_v_rsvd1 : 3; /* [51:49] */
257 unsigned long perr_v_cmd : 4; /* [55:52] */
258 unsigned long perr_v_rsvd2 : 8; /* [63:56] */
259 } perr_r_bits;
260 unsigned int perr_l_whole[2];
261 unsigned long perr_q_whole;
262};
263
264/*
265 * AGPERROR / AGPERREN / AGPERRSET
266 */
267union TPAchipAGPERR {
268 struct {
269 unsigned agperr_v_lost : 1; /* [0] */
270 unsigned agperr_v_lpqfull : 1; /* [1] */
271 unsigned apgerr_v_hpqfull : 1; /* [2] */
272 unsigned agperr_v_rescmd : 1; /* [3] */
273 unsigned agperr_v_ipte : 1; /* [4] */
274 unsigned agperr_v_ptp : 1; /* [5] */
275 unsigned agperr_v_nowindow : 1; /* [6] */
276 unsigned agperr_v_rsvd0 : 8; /* [14:7] */
277 unsigned agperr_v_addr : 32; /* [46:15] */
278 unsigned agperr_v_rsvd1 : 1; /* [47] */
279 unsigned agperr_v_dac : 1; /* [48] */
280 unsigned agperr_v_mwin : 1; /* [49] */
281 unsigned agperr_v_cmd : 3; /* [52:50] */
282 unsigned agperr_v_length : 6; /* [58:53] */
283 unsigned agperr_v_fence : 1; /* [59] */
284 unsigned agperr_v_rsvd2 : 4; /* [63:60] */
285 } agperr_r_bits;
286 unsigned int agperr_l_whole[2];
287 unsigned long agperr_q_whole;
288};
289/*
290 * Memory spaces:
291 * Hose numbers are assigned as follows:
292 * 0 - pachip 0 / G Port
293 * 1 - pachip 1 / G Port
294 * 2 - pachip 0 / A Port
295 * 3 - pachip 1 / A Port
296 */
297#define TITAN_HOSE_SHIFT (33)
298#define TITAN_HOSE(h) (((unsigned long)(h)) << TITAN_HOSE_SHIFT)
299#define TITAN_BASE (IDENT_ADDR + TI_BIAS)
300#define TITAN_MEM(h) (TITAN_BASE+TITAN_HOSE(h)+0x000000000UL)
301#define _TITAN_IACK_SC(h) (TITAN_BASE+TITAN_HOSE(h)+0x1F8000000UL)
302#define TITAN_IO(h) (TITAN_BASE+TITAN_HOSE(h)+0x1FC000000UL)
303#define TITAN_CONF(h) (TITAN_BASE+TITAN_HOSE(h)+0x1FE000000UL)
304
305#define TITAN_HOSE_MASK TITAN_HOSE(3)
306#define TITAN_IACK_SC _TITAN_IACK_SC(0) /* hack! */
307
308/*
309 * The canonical non-remaped I/O and MEM addresses have these values
310 * subtracted out. This is arranged so that folks manipulating ISA
311 * devices can use their familiar numbers and have them map to bus 0.
312 */
313
314#define TITAN_IO_BIAS TITAN_IO(0)
315#define TITAN_MEM_BIAS TITAN_MEM(0)
316
317/* The IO address space is larger than 0xffff */
318#define TITAN_IO_SPACE (TITAN_CONF(0) - TITAN_IO(0))
319
320/* TIG Space */
321#define TITAN_TIG_SPACE (TITAN_BASE + 0x100000000UL)
322
323/* Offset between ram physical addresses and pci64 DAC bus addresses. */
324/* ??? Just a guess. Ought to confirm it hasn't been moved. */
325#define TITAN_DAC_OFFSET (1UL << 40)
326
327/*
328 * Data structure for handling TITAN machine checks:
329 */
330#define SCB_Q_SYSERR 0x620
331#define SCB_Q_PROCERR 0x630
332#define SCB_Q_SYSMCHK 0x660
333#define SCB_Q_PROCMCHK 0x670
334#define SCB_Q_SYSEVENT 0x680 /* environmental / system management */
335struct el_TITAN_sysdata_mcheck {
336 u64 summary; /* 0x00 */
337 u64 c_dirx; /* 0x08 */
338 u64 c_misc; /* 0x10 */
339 u64 p0_serror; /* 0x18 */
340 u64 p0_gperror; /* 0x20 */
341 u64 p0_aperror; /* 0x28 */
342 u64 p0_agperror;/* 0x30 */
343 u64 p1_serror; /* 0x38 */
344 u64 p1_gperror; /* 0x40 */
345 u64 p1_aperror; /* 0x48 */
346 u64 p1_agperror;/* 0x50 */
347};
348
349/*
350 * System area for a privateer 680 environmental/system management mcheck
351 */
352struct el_PRIVATEER_envdata_mcheck {
353 u64 summary; /* 0x00 */
354 u64 c_dirx; /* 0x08 */
355 u64 smir; /* 0x10 */
356 u64 cpuir; /* 0x18 */
357 u64 psir; /* 0x20 */
358 u64 fault; /* 0x28 */
359 u64 sys_doors; /* 0x30 */
360 u64 temp_warn; /* 0x38 */
361 u64 fan_ctrl; /* 0x40 */
362 u64 code; /* 0x48 */
363 u64 reserved; /* 0x50 */
364};
365
366#ifdef __KERNEL__
367
368#ifndef __EXTERN_INLINE
369#define __EXTERN_INLINE extern inline
370#define __IO_EXTERN_INLINE
371#endif
372
373/*
374 * I/O functions:
375 *
376 * TITAN, a 21??? PCI/memory support chipset for the EV6 (21264)
377 * can only use linear accesses to get at PCI/AGP memory and I/O spaces.
378 */
379
380/*
381 * Memory functions. all accesses are done through linear space.
382 */
383extern void __iomem *titan_ioportmap(unsigned long addr);
384extern void __iomem *titan_ioremap(unsigned long addr, unsigned long size);
385extern void titan_iounmap(volatile void __iomem *addr);
386
387__EXTERN_INLINE int titan_is_ioaddr(unsigned long addr)
388{
389 return addr >= TITAN_BASE;
390}
391
392extern int titan_is_mmio(const volatile void __iomem *addr);
393
394#undef __IO_PREFIX
395#define __IO_PREFIX titan
396#define titan_trivial_rw_bw 1
397#define titan_trivial_rw_lq 1
398#define titan_trivial_io_bw 1
399#define titan_trivial_io_lq 1
400#define titan_trivial_iounmap 0
401#include <asm/io_trivial.h>
402
403#ifdef __IO_EXTERN_INLINE
404#undef __EXTERN_INLINE
405#undef __IO_EXTERN_INLINE
406#endif
407
408#endif /* __KERNEL__ */
409
410#endif /* __ALPHA_TITAN__H__ */
diff --git a/include/asm-alpha/core_tsunami.h b/include/asm-alpha/core_tsunami.h
deleted file mode 100644
index 58d4fe48742c..000000000000
--- a/include/asm-alpha/core_tsunami.h
+++ /dev/null
@@ -1,335 +0,0 @@
1#ifndef __ALPHA_TSUNAMI__H__
2#define __ALPHA_TSUNAMI__H__
3
4#include <linux/types.h>
5#include <linux/pci.h>
6#include <asm/compiler.h>
7
8/*
9 * TSUNAMI/TYPHOON are the internal names for the core logic chipset which
10 * provides memory controller and PCI access for the 21264 based systems.
11 *
12 * This file is based on:
13 *
14 * Tsunami System Programmers Manual
15 * Preliminary, Chapters 2-5
16 *
17 */
18
19/* XXX: Do we need to conditionalize on this? */
20#ifdef USE_48_BIT_KSEG
21#define TS_BIAS 0x80000000000UL
22#else
23#define TS_BIAS 0x10000000000UL
24#endif
25
26/*
27 * CChip, DChip, and PChip registers
28 */
29
30typedef struct {
31 volatile unsigned long csr __attribute__((aligned(64)));
32} tsunami_64;
33
34typedef struct {
35 tsunami_64 csc;
36 tsunami_64 mtr;
37 tsunami_64 misc;
38 tsunami_64 mpd;
39 tsunami_64 aar0;
40 tsunami_64 aar1;
41 tsunami_64 aar2;
42 tsunami_64 aar3;
43 tsunami_64 dim0;
44 tsunami_64 dim1;
45 tsunami_64 dir0;
46 tsunami_64 dir1;
47 tsunami_64 drir;
48 tsunami_64 prben;
49 tsunami_64 iic; /* a.k.a. iic0 */
50 tsunami_64 wdr; /* a.k.a. iic1 */
51 tsunami_64 mpr0;
52 tsunami_64 mpr1;
53 tsunami_64 mpr2;
54 tsunami_64 mpr3;
55 tsunami_64 mctl;
56 tsunami_64 __pad1;
57 tsunami_64 ttr;
58 tsunami_64 tdr;
59 tsunami_64 dim2;
60 tsunami_64 dim3;
61 tsunami_64 dir2;
62 tsunami_64 dir3;
63 tsunami_64 iic2;
64 tsunami_64 iic3;
65} tsunami_cchip;
66
67typedef struct {
68 tsunami_64 dsc;
69 tsunami_64 str;
70 tsunami_64 drev;
71} tsunami_dchip;
72
73typedef struct {
74 tsunami_64 wsba[4];
75 tsunami_64 wsm[4];
76 tsunami_64 tba[4];
77 tsunami_64 pctl;
78 tsunami_64 plat;
79 tsunami_64 reserved;
80 tsunami_64 perror;
81 tsunami_64 perrmask;
82 tsunami_64 perrset;
83 tsunami_64 tlbiv;
84 tsunami_64 tlbia;
85 tsunami_64 pmonctl;
86 tsunami_64 pmoncnt;
87} tsunami_pchip;
88
89#define TSUNAMI_cchip ((tsunami_cchip *)(IDENT_ADDR+TS_BIAS+0x1A0000000UL))
90#define TSUNAMI_dchip ((tsunami_dchip *)(IDENT_ADDR+TS_BIAS+0x1B0000800UL))
91#define TSUNAMI_pchip0 ((tsunami_pchip *)(IDENT_ADDR+TS_BIAS+0x180000000UL))
92#define TSUNAMI_pchip1 ((tsunami_pchip *)(IDENT_ADDR+TS_BIAS+0x380000000UL))
93extern int TSUNAMI_bootcpu;
94
95/*
96 * TSUNAMI Pchip Error register.
97 */
98
99#define perror_m_lost 0x1
100#define perror_m_serr 0x2
101#define perror_m_perr 0x4
102#define perror_m_dcrto 0x8
103#define perror_m_sge 0x10
104#define perror_m_ape 0x20
105#define perror_m_ta 0x40
106#define perror_m_rdpe 0x80
107#define perror_m_nds 0x100
108#define perror_m_rto 0x200
109#define perror_m_uecc 0x400
110#define perror_m_cre 0x800
111#define perror_m_addrl 0xFFFFFFFF0000UL
112#define perror_m_addrh 0x7000000000000UL
113#define perror_m_cmd 0xF0000000000000UL
114#define perror_m_syn 0xFF00000000000000UL
115union TPchipPERROR {
116 struct {
117 unsigned int perror_v_lost : 1;
118 unsigned perror_v_serr : 1;
119 unsigned perror_v_perr : 1;
120 unsigned perror_v_dcrto : 1;
121 unsigned perror_v_sge : 1;
122 unsigned perror_v_ape : 1;
123 unsigned perror_v_ta : 1;
124 unsigned perror_v_rdpe : 1;
125 unsigned perror_v_nds : 1;
126 unsigned perror_v_rto : 1;
127 unsigned perror_v_uecc : 1;
128 unsigned perror_v_cre : 1;
129 unsigned perror_v_rsvd1 : 4;
130 unsigned perror_v_addrl : 32;
131 unsigned perror_v_addrh : 3;
132 unsigned perror_v_rsvd2 : 1;
133 unsigned perror_v_cmd : 4;
134 unsigned perror_v_syn : 8;
135 } perror_r_bits;
136 int perror_q_whole [2];
137};
138
139/*
140 * TSUNAMI Pchip Window Space Base Address register.
141 */
142#define wsba_m_ena 0x1
143#define wsba_m_sg 0x2
144#define wsba_m_ptp 0x4
145#define wsba_m_addr 0xFFF00000
146#define wmask_k_sz1gb 0x3FF00000
147union TPchipWSBA {
148 struct {
149 unsigned wsba_v_ena : 1;
150 unsigned wsba_v_sg : 1;
151 unsigned wsba_v_ptp : 1;
152 unsigned wsba_v_rsvd1 : 17;
153 unsigned wsba_v_addr : 12;
154 unsigned wsba_v_rsvd2 : 32;
155 } wsba_r_bits;
156 int wsba_q_whole [2];
157};
158
159/*
160 * TSUNAMI Pchip Control Register
161 */
162#define pctl_m_fdsc 0x1
163#define pctl_m_fbtb 0x2
164#define pctl_m_thdis 0x4
165#define pctl_m_chaindis 0x8
166#define pctl_m_tgtlat 0x10
167#define pctl_m_hole 0x20
168#define pctl_m_mwin 0x40
169#define pctl_m_arbena 0x80
170#define pctl_m_prigrp 0x7F00
171#define pctl_m_ppri 0x8000
172#define pctl_m_rsvd1 0x30000
173#define pctl_m_eccen 0x40000
174#define pctl_m_padm 0x80000
175#define pctl_m_cdqmax 0xF00000
176#define pctl_m_rev 0xFF000000
177#define pctl_m_crqmax 0xF00000000UL
178#define pctl_m_ptpmax 0xF000000000UL
179#define pctl_m_pclkx 0x30000000000UL
180#define pctl_m_fdsdis 0x40000000000UL
181#define pctl_m_fdwdis 0x80000000000UL
182#define pctl_m_ptevrfy 0x100000000000UL
183#define pctl_m_rpp 0x200000000000UL
184#define pctl_m_pid 0xC00000000000UL
185#define pctl_m_rsvd2 0xFFFF000000000000UL
186
187union TPchipPCTL {
188 struct {
189 unsigned pctl_v_fdsc : 1;
190 unsigned pctl_v_fbtb : 1;
191 unsigned pctl_v_thdis : 1;
192 unsigned pctl_v_chaindis : 1;
193 unsigned pctl_v_tgtlat : 1;
194 unsigned pctl_v_hole : 1;
195 unsigned pctl_v_mwin : 1;
196 unsigned pctl_v_arbena : 1;
197 unsigned pctl_v_prigrp : 7;
198 unsigned pctl_v_ppri : 1;
199 unsigned pctl_v_rsvd1 : 2;
200 unsigned pctl_v_eccen : 1;
201 unsigned pctl_v_padm : 1;
202 unsigned pctl_v_cdqmax : 4;
203 unsigned pctl_v_rev : 8;
204 unsigned pctl_v_crqmax : 4;
205 unsigned pctl_v_ptpmax : 4;
206 unsigned pctl_v_pclkx : 2;
207 unsigned pctl_v_fdsdis : 1;
208 unsigned pctl_v_fdwdis : 1;
209 unsigned pctl_v_ptevrfy : 1;
210 unsigned pctl_v_rpp : 1;
211 unsigned pctl_v_pid : 2;
212 unsigned pctl_v_rsvd2 : 16;
213 } pctl_r_bits;
214 int pctl_q_whole [2];
215};
216
217/*
218 * TSUNAMI Pchip Error Mask Register.
219 */
220#define perrmask_m_lost 0x1
221#define perrmask_m_serr 0x2
222#define perrmask_m_perr 0x4
223#define perrmask_m_dcrto 0x8
224#define perrmask_m_sge 0x10
225#define perrmask_m_ape 0x20
226#define perrmask_m_ta 0x40
227#define perrmask_m_rdpe 0x80
228#define perrmask_m_nds 0x100
229#define perrmask_m_rto 0x200
230#define perrmask_m_uecc 0x400
231#define perrmask_m_cre 0x800
232#define perrmask_m_rsvd 0xFFFFFFFFFFFFF000UL
233union TPchipPERRMASK {
234 struct {
235 unsigned int perrmask_v_lost : 1;
236 unsigned perrmask_v_serr : 1;
237 unsigned perrmask_v_perr : 1;
238 unsigned perrmask_v_dcrto : 1;
239 unsigned perrmask_v_sge : 1;
240 unsigned perrmask_v_ape : 1;
241 unsigned perrmask_v_ta : 1;
242 unsigned perrmask_v_rdpe : 1;
243 unsigned perrmask_v_nds : 1;
244 unsigned perrmask_v_rto : 1;
245 unsigned perrmask_v_uecc : 1;
246 unsigned perrmask_v_cre : 1;
247 unsigned perrmask_v_rsvd1 : 20;
248 unsigned perrmask_v_rsvd2 : 32;
249 } perrmask_r_bits;
250 int perrmask_q_whole [2];
251};
252
253/*
254 * Memory spaces:
255 */
256#define TSUNAMI_HOSE(h) (((unsigned long)(h)) << 33)
257#define TSUNAMI_BASE (IDENT_ADDR + TS_BIAS)
258
259#define TSUNAMI_MEM(h) (TSUNAMI_BASE+TSUNAMI_HOSE(h) + 0x000000000UL)
260#define _TSUNAMI_IACK_SC(h) (TSUNAMI_BASE+TSUNAMI_HOSE(h) + 0x1F8000000UL)
261#define TSUNAMI_IO(h) (TSUNAMI_BASE+TSUNAMI_HOSE(h) + 0x1FC000000UL)
262#define TSUNAMI_CONF(h) (TSUNAMI_BASE+TSUNAMI_HOSE(h) + 0x1FE000000UL)
263
264#define TSUNAMI_IACK_SC _TSUNAMI_IACK_SC(0) /* hack! */
265
266
267/*
268 * The canonical non-remaped I/O and MEM addresses have these values
269 * subtracted out. This is arranged so that folks manipulating ISA
270 * devices can use their familiar numbers and have them map to bus 0.
271 */
272
273#define TSUNAMI_IO_BIAS TSUNAMI_IO(0)
274#define TSUNAMI_MEM_BIAS TSUNAMI_MEM(0)
275
276/* The IO address space is larger than 0xffff */
277#define TSUNAMI_IO_SPACE (TSUNAMI_CONF(0) - TSUNAMI_IO(0))
278
279/* Offset between ram physical addresses and pci64 DAC bus addresses. */
280#define TSUNAMI_DAC_OFFSET (1UL << 40)
281
282/*
283 * Data structure for handling TSUNAMI machine checks:
284 */
285struct el_TSUNAMI_sysdata_mcheck {
286};
287
288
289#ifdef __KERNEL__
290
291#ifndef __EXTERN_INLINE
292#define __EXTERN_INLINE extern inline
293#define __IO_EXTERN_INLINE
294#endif
295
296/*
297 * I/O functions:
298 *
299 * TSUNAMI, the 21??? PCI/memory support chipset for the EV6 (21264)
300 * can only use linear accesses to get at PCI memory and I/O spaces.
301 */
302
303/*
304 * Memory functions. all accesses are done through linear space.
305 */
306extern void __iomem *tsunami_ioportmap(unsigned long addr);
307extern void __iomem *tsunami_ioremap(unsigned long addr, unsigned long size);
308__EXTERN_INLINE int tsunami_is_ioaddr(unsigned long addr)
309{
310 return addr >= TSUNAMI_BASE;
311}
312
313__EXTERN_INLINE int tsunami_is_mmio(const volatile void __iomem *xaddr)
314{
315 unsigned long addr = (unsigned long) xaddr;
316 return (addr & 0x100000000UL) == 0;
317}
318
319#undef __IO_PREFIX
320#define __IO_PREFIX tsunami
321#define tsunami_trivial_rw_bw 1
322#define tsunami_trivial_rw_lq 1
323#define tsunami_trivial_io_bw 1
324#define tsunami_trivial_io_lq 1
325#define tsunami_trivial_iounmap 1
326#include <asm/io_trivial.h>
327
328#ifdef __IO_EXTERN_INLINE
329#undef __EXTERN_INLINE
330#undef __IO_EXTERN_INLINE
331#endif
332
333#endif /* __KERNEL__ */
334
335#endif /* __ALPHA_TSUNAMI__H__ */
diff --git a/include/asm-alpha/core_wildfire.h b/include/asm-alpha/core_wildfire.h
deleted file mode 100644
index cd562f544ba2..000000000000
--- a/include/asm-alpha/core_wildfire.h
+++ /dev/null
@@ -1,318 +0,0 @@
1#ifndef __ALPHA_WILDFIRE__H__
2#define __ALPHA_WILDFIRE__H__
3
4#include <linux/types.h>
5#include <asm/compiler.h>
6
7#define WILDFIRE_MAX_QBB 8 /* more than 8 requires other mods */
8#define WILDFIRE_PCA_PER_QBB 4
9#define WILDFIRE_IRQ_PER_PCA 64
10
11#define WILDFIRE_NR_IRQS \
12 (WILDFIRE_MAX_QBB * WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)
13
14extern unsigned char wildfire_hard_qbb_map[WILDFIRE_MAX_QBB];
15extern unsigned char wildfire_soft_qbb_map[WILDFIRE_MAX_QBB];
16#define QBB_MAP_EMPTY 0xff
17
18extern unsigned long wildfire_hard_qbb_mask;
19extern unsigned long wildfire_soft_qbb_mask;
20extern unsigned long wildfire_gp_mask;
21extern unsigned long wildfire_hs_mask;
22extern unsigned long wildfire_iop_mask;
23extern unsigned long wildfire_ior_mask;
24extern unsigned long wildfire_pca_mask;
25extern unsigned long wildfire_cpu_mask;
26extern unsigned long wildfire_mem_mask;
27
28#define WILDFIRE_QBB_EXISTS(qbbno) (wildfire_soft_qbb_mask & (1 << (qbbno)))
29
30#define WILDFIRE_MEM_EXISTS(qbbno) (wildfire_mem_mask & (0xf << ((qbbno) << 2)))
31
32#define WILDFIRE_PCA_EXISTS(qbbno, pcano) \
33 (wildfire_pca_mask & (1 << (((qbbno) << 2) + (pcano))))
34
35typedef struct {
36 volatile unsigned long csr __attribute__((aligned(64)));
37} wildfire_64;
38
39typedef struct {
40 volatile unsigned long csr __attribute__((aligned(256)));
41} wildfire_256;
42
43typedef struct {
44 volatile unsigned long csr __attribute__((aligned(2048)));
45} wildfire_2k;
46
47typedef struct {
48 wildfire_64 qsd_whami;
49 wildfire_64 qsd_rev;
50 wildfire_64 qsd_port_present;
51 wildfire_64 qsd_port_active;
52 wildfire_64 qsd_fault_ena;
53 wildfire_64 qsd_cpu_int_ena;
54 wildfire_64 qsd_mem_config;
55 wildfire_64 qsd_err_sum;
56 wildfire_64 ce_sum[4];
57 wildfire_64 dev_init[4];
58 wildfire_64 it_int[4];
59 wildfire_64 ip_int[4];
60 wildfire_64 uce_sum[4];
61 wildfire_64 se_sum__non_dev_int[4];
62 wildfire_64 scratch[4];
63 wildfire_64 qsd_timer;
64 wildfire_64 qsd_diag;
65} wildfire_qsd;
66
67typedef struct {
68 wildfire_256 qsd_whami;
69 wildfire_256 __pad1;
70 wildfire_256 ce_sum;
71 wildfire_256 dev_init;
72 wildfire_256 it_int;
73 wildfire_256 ip_int;
74 wildfire_256 uce_sum;
75 wildfire_256 se_sum;
76} wildfire_fast_qsd;
77
78typedef struct {
79 wildfire_2k qsa_qbb_id;
80 wildfire_2k __pad1;
81 wildfire_2k qsa_port_ena;
82 wildfire_2k qsa_scratch;
83 wildfire_2k qsa_config[5];
84 wildfire_2k qsa_ref_int;
85 wildfire_2k qsa_qbb_pop[2];
86 wildfire_2k qsa_dtag_fc;
87 wildfire_2k __pad2[3];
88 wildfire_2k qsa_diag;
89 wildfire_2k qsa_diag_lock[4];
90 wildfire_2k __pad3[11];
91 wildfire_2k qsa_cpu_err_sum;
92 wildfire_2k qsa_misc_err_sum;
93 wildfire_2k qsa_tmo_err_sum;
94 wildfire_2k qsa_err_ena;
95 wildfire_2k qsa_tmo_config;
96 wildfire_2k qsa_ill_cmd_err_sum;
97 wildfire_2k __pad4[26];
98 wildfire_2k qsa_busy_mask;
99 wildfire_2k qsa_arr_valid;
100 wildfire_2k __pad5[2];
101 wildfire_2k qsa_port_map[4];
102 wildfire_2k qsa_arr_addr[8];
103 wildfire_2k qsa_arr_mask[8];
104} wildfire_qsa;
105
106typedef struct {
107 wildfire_64 ioa_config;
108 wildfire_64 iod_config;
109 wildfire_64 iop_switch_credits;
110 wildfire_64 __pad1;
111 wildfire_64 iop_hose_credits;
112 wildfire_64 __pad2[11];
113 struct {
114 wildfire_64 __pad3;
115 wildfire_64 init;
116 } iop_hose[4];
117 wildfire_64 ioa_hose_0_ctrl;
118 wildfire_64 iod_hose_0_ctrl;
119 wildfire_64 ioa_hose_1_ctrl;
120 wildfire_64 iod_hose_1_ctrl;
121 wildfire_64 ioa_hose_2_ctrl;
122 wildfire_64 iod_hose_2_ctrl;
123 wildfire_64 ioa_hose_3_ctrl;
124 wildfire_64 iod_hose_3_ctrl;
125 struct {
126 wildfire_64 target;
127 wildfire_64 __pad4;
128 } iop_dev_int[4];
129
130 wildfire_64 iop_err_int_target;
131 wildfire_64 __pad5[7];
132 wildfire_64 iop_qbb_err_sum;
133 wildfire_64 __pad6;
134 wildfire_64 iop_qbb_se_sum;
135 wildfire_64 __pad7;
136 wildfire_64 ioa_err_sum;
137 wildfire_64 iod_err_sum;
138 wildfire_64 __pad8[4];
139 wildfire_64 ioa_diag_force_err;
140 wildfire_64 iod_diag_force_err;
141 wildfire_64 __pad9[4];
142 wildfire_64 iop_diag_send_err_int;
143 wildfire_64 __pad10[15];
144 wildfire_64 ioa_scratch;
145 wildfire_64 iod_scratch;
146} wildfire_iop;
147
148typedef struct {
149 wildfire_2k gpa_qbb_map[4];
150 wildfire_2k gpa_mem_pop_map;
151 wildfire_2k gpa_scratch;
152 wildfire_2k gpa_diag;
153 wildfire_2k gpa_config_0;
154 wildfire_2k __pad1;
155 wildfire_2k gpa_init_id;
156 wildfire_2k gpa_config_2;
157 /* not complete */
158} wildfire_gp;
159
160typedef struct {
161 wildfire_64 pca_what_am_i;
162 wildfire_64 pca_err_sum;
163 wildfire_64 pca_diag_force_err;
164 wildfire_64 pca_diag_send_err_int;
165 wildfire_64 pca_hose_credits;
166 wildfire_64 pca_scratch;
167 wildfire_64 pca_micro_addr;
168 wildfire_64 pca_micro_data;
169 wildfire_64 pca_pend_int;
170 wildfire_64 pca_sent_int;
171 wildfire_64 __pad1;
172 wildfire_64 pca_stdio_edge_level;
173 wildfire_64 __pad2[52];
174 struct {
175 wildfire_64 target;
176 wildfire_64 enable;
177 } pca_int[4];
178 wildfire_64 __pad3[56];
179 wildfire_64 pca_alt_sent_int[32];
180} wildfire_pca;
181
182typedef struct {
183 wildfire_64 ne_what_am_i;
184 /* not complete */
185} wildfire_ne;
186
187typedef struct {
188 wildfire_64 fe_what_am_i;
189 /* not complete */
190} wildfire_fe;
191
192typedef struct {
193 wildfire_64 pci_io_addr_ext;
194 wildfire_64 pci_ctrl;
195 wildfire_64 pci_err_sum;
196 wildfire_64 pci_err_addr;
197 wildfire_64 pci_stall_cnt;
198 wildfire_64 pci_iack_special;
199 wildfire_64 __pad1[2];
200 wildfire_64 pci_pend_int;
201 wildfire_64 pci_sent_int;
202 wildfire_64 __pad2[54];
203 struct {
204 wildfire_64 wbase;
205 wildfire_64 wmask;
206 wildfire_64 tbase;
207 } pci_window[4];
208 wildfire_64 pci_flush_tlb;
209 wildfire_64 pci_perf_mon;
210} wildfire_pci;
211
212#define WILDFIRE_ENTITY_SHIFT 18
213
214#define WILDFIRE_GP_ENTITY (0x10UL << WILDFIRE_ENTITY_SHIFT)
215#define WILDFIRE_IOP_ENTITY (0x08UL << WILDFIRE_ENTITY_SHIFT)
216#define WILDFIRE_QSA_ENTITY (0x04UL << WILDFIRE_ENTITY_SHIFT)
217#define WILDFIRE_QSD_ENTITY_SLOW (0x05UL << WILDFIRE_ENTITY_SHIFT)
218#define WILDFIRE_QSD_ENTITY_FAST (0x01UL << WILDFIRE_ENTITY_SHIFT)
219
220#define WILDFIRE_PCA_ENTITY(pca) ((0xc|(pca))<<WILDFIRE_ENTITY_SHIFT)
221
222#define WILDFIRE_BASE (IDENT_ADDR | (1UL << 40))
223
224#define WILDFIRE_QBB_MASK 0x0fUL /* for now, only 4 bits/16 QBBs */
225
226#define WILDFIRE_QBB(q) ((~((long)(q)) & WILDFIRE_QBB_MASK) << 36)
227#define WILDFIRE_HOSE(h) ((long)(h) << 33)
228
229#define WILDFIRE_QBB_IO(q) (WILDFIRE_BASE | WILDFIRE_QBB(q))
230#define WILDFIRE_QBB_HOSE(q,h) (WILDFIRE_QBB_IO(q) | WILDFIRE_HOSE(h))
231
232#define WILDFIRE_MEM(q,h) (WILDFIRE_QBB_HOSE(q,h) | 0x000000000UL)
233#define WILDFIRE_CONF(q,h) (WILDFIRE_QBB_HOSE(q,h) | 0x1FE000000UL)
234#define WILDFIRE_IO(q,h) (WILDFIRE_QBB_HOSE(q,h) | 0x1FF000000UL)
235
236#define WILDFIRE_qsd(q) \
237 ((wildfire_qsd *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSD_ENTITY_SLOW|(((1UL<<13)-1)<<23)))
238
239#define WILDFIRE_fast_qsd() \
240 ((wildfire_fast_qsd *)(WILDFIRE_QBB_IO(0)|WILDFIRE_QSD_ENTITY_FAST|(((1UL<<13)-1)<<23)))
241
242#define WILDFIRE_qsa(q) \
243 ((wildfire_qsa *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSA_ENTITY|(((1UL<<13)-1)<<23)))
244
245#define WILDFIRE_iop(q) \
246 ((wildfire_iop *)(WILDFIRE_QBB_IO(q)|WILDFIRE_IOP_ENTITY|(((1UL<<13)-1)<<23)))
247
248#define WILDFIRE_gp(q) \
249 ((wildfire_gp *)(WILDFIRE_QBB_IO(q)|WILDFIRE_GP_ENTITY|(((1UL<<13)-1)<<23)))
250
251#define WILDFIRE_pca(q,pca) \
252 ((wildfire_pca *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)))
253
254#define WILDFIRE_ne(q,pca) \
255 ((wildfire_ne *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(1UL<<16)))
256
257#define WILDFIRE_fe(q,pca) \
258 ((wildfire_fe *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(3UL<<15)))
259
260#define WILDFIRE_pci(q,h) \
261 ((wildfire_pci *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(((h)&6)>>1)|((((h)&1)|2)<<16)|(((1UL<<13)-1)<<23)))
262
263#define WILDFIRE_IO_BIAS WILDFIRE_IO(0,0)
264#define WILDFIRE_MEM_BIAS WILDFIRE_MEM(0,0) /* ??? */
265
266/* The IO address space is larger than 0xffff */
267#define WILDFIRE_IO_SPACE (8UL*1024*1024)
268
269#ifdef __KERNEL__
270
271#ifndef __EXTERN_INLINE
272#define __EXTERN_INLINE extern inline
273#define __IO_EXTERN_INLINE
274#endif
275
276/*
277 * Memory functions. all accesses are done through linear space.
278 */
279
280__EXTERN_INLINE void __iomem *wildfire_ioportmap(unsigned long addr)
281{
282 return (void __iomem *)(addr + WILDFIRE_IO_BIAS);
283}
284
285__EXTERN_INLINE void __iomem *wildfire_ioremap(unsigned long addr,
286 unsigned long size)
287{
288 return (void __iomem *)(addr + WILDFIRE_MEM_BIAS);
289}
290
291__EXTERN_INLINE int wildfire_is_ioaddr(unsigned long addr)
292{
293 return addr >= WILDFIRE_BASE;
294}
295
296__EXTERN_INLINE int wildfire_is_mmio(const volatile void __iomem *xaddr)
297{
298 unsigned long addr = (unsigned long)xaddr;
299 return (addr & 0x100000000UL) == 0;
300}
301
302#undef __IO_PREFIX
303#define __IO_PREFIX wildfire
304#define wildfire_trivial_rw_bw 1
305#define wildfire_trivial_rw_lq 1
306#define wildfire_trivial_io_bw 1
307#define wildfire_trivial_io_lq 1
308#define wildfire_trivial_iounmap 1
309#include <asm/io_trivial.h>
310
311#ifdef __IO_EXTERN_INLINE
312#undef __EXTERN_INLINE
313#undef __IO_EXTERN_INLINE
314#endif
315
316#endif /* __KERNEL__ */
317
318#endif /* __ALPHA_WILDFIRE__H__ */
diff --git a/include/asm-alpha/cputime.h b/include/asm-alpha/cputime.h
deleted file mode 100644
index 19577fd93230..000000000000
--- a/include/asm-alpha/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ALPHA_CPUTIME_H
2#define __ALPHA_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __ALPHA_CPUTIME_H */
diff --git a/include/asm-alpha/current.h b/include/asm-alpha/current.h
deleted file mode 100644
index 094d285a1b34..000000000000
--- a/include/asm-alpha/current.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ALPHA_CURRENT_H
2#define _ALPHA_CURRENT_H
3
4#include <linux/thread_info.h>
5
6#define get_current() (current_thread_info()->task)
7#define current get_current()
8
9#endif /* _ALPHA_CURRENT_H */
diff --git a/include/asm-alpha/delay.h b/include/asm-alpha/delay.h
deleted file mode 100644
index 2aa3f410f7e6..000000000000
--- a/include/asm-alpha/delay.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __ALPHA_DELAY_H
2#define __ALPHA_DELAY_H
3
4extern void __delay(int loops);
5extern void udelay(unsigned long usecs);
6
7extern void ndelay(unsigned long nsecs);
8#define ndelay ndelay
9
10#endif /* defined(__ALPHA_DELAY_H) */
diff --git a/include/asm-alpha/device.h b/include/asm-alpha/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-alpha/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-alpha/div64.h b/include/asm-alpha/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/include/asm-alpha/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h
deleted file mode 100644
index a5801ae02e4b..000000000000
--- a/include/asm-alpha/dma-mapping.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef _ALPHA_DMA_MAPPING_H
2#define _ALPHA_DMA_MAPPING_H
3
4
5#ifdef CONFIG_PCI
6
7#include <linux/pci.h>
8
9#define dma_map_single(dev, va, size, dir) \
10 pci_map_single(alpha_gendev_to_pci(dev), va, size, dir)
11#define dma_unmap_single(dev, addr, size, dir) \
12 pci_unmap_single(alpha_gendev_to_pci(dev), addr, size, dir)
13#define dma_alloc_coherent(dev, size, addr, gfp) \
14 __pci_alloc_consistent(alpha_gendev_to_pci(dev), size, addr, gfp)
15#define dma_free_coherent(dev, size, va, addr) \
16 pci_free_consistent(alpha_gendev_to_pci(dev), size, va, addr)
17#define dma_map_page(dev, page, off, size, dir) \
18 pci_map_page(alpha_gendev_to_pci(dev), page, off, size, dir)
19#define dma_unmap_page(dev, addr, size, dir) \
20 pci_unmap_page(alpha_gendev_to_pci(dev), addr, size, dir)
21#define dma_map_sg(dev, sg, nents, dir) \
22 pci_map_sg(alpha_gendev_to_pci(dev), sg, nents, dir)
23#define dma_unmap_sg(dev, sg, nents, dir) \
24 pci_unmap_sg(alpha_gendev_to_pci(dev), sg, nents, dir)
25#define dma_supported(dev, mask) \
26 pci_dma_supported(alpha_gendev_to_pci(dev), mask)
27#define dma_mapping_error(dev, addr) \
28 pci_dma_mapping_error(alpha_gendev_to_pci(dev), addr)
29
30#else /* no PCI - no IOMMU. */
31
32struct scatterlist;
33void *dma_alloc_coherent(struct device *dev, size_t size,
34 dma_addr_t *dma_handle, gfp_t gfp);
35int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
36 enum dma_data_direction direction);
37
38#define dma_free_coherent(dev, size, va, addr) \
39 free_pages((unsigned long)va, get_order(size))
40#define dma_supported(dev, mask) (mask < 0x00ffffffUL ? 0 : 1)
41#define dma_map_single(dev, va, size, dir) virt_to_phys(va)
42#define dma_map_page(dev, page, off, size, dir) (page_to_pa(page) + off)
43
44#define dma_unmap_single(dev, addr, size, dir) ((void)0)
45#define dma_unmap_page(dev, addr, size, dir) ((void)0)
46#define dma_unmap_sg(dev, sg, nents, dir) ((void)0)
47
48#define dma_mapping_error(dev, addr) (0)
49
50#endif /* !CONFIG_PCI */
51
52#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
53#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
54#define dma_is_consistent(d, h) (1)
55
56int dma_set_mask(struct device *dev, u64 mask);
57
58#define dma_sync_single_for_cpu(dev, addr, size, dir) ((void)0)
59#define dma_sync_single_for_device(dev, addr, size, dir) ((void)0)
60#define dma_sync_single_range(dev, addr, off, size, dir) ((void)0)
61#define dma_sync_sg_for_cpu(dev, sg, nents, dir) ((void)0)
62#define dma_sync_sg_for_device(dev, sg, nents, dir) ((void)0)
63#define dma_cache_sync(dev, va, size, dir) ((void)0)
64#define dma_sync_single_range_for_cpu(dev, addr, offset, size, dir) ((void)0)
65#define dma_sync_single_range_for_device(dev, addr, offset, size, dir) ((void)0)
66
67#define dma_get_cache_alignment() L1_CACHE_BYTES
68
69#endif /* _ALPHA_DMA_MAPPING_H */
diff --git a/include/asm-alpha/dma.h b/include/asm-alpha/dma.h
deleted file mode 100644
index 87cfdbdf08fc..000000000000
--- a/include/asm-alpha/dma.h
+++ /dev/null
@@ -1,376 +0,0 @@
1/*
2 * include/asm-alpha/dma.h
3 *
4 * This is essentially the same as the i386 DMA stuff, as the AlphaPCs
5 * use ISA-compatible dma. The only extension is support for high-page
6 * registers that allow to set the top 8 bits of a 32-bit DMA address.
7 * This register should be written last when setting up a DMA address
8 * as this will also enable DMA across 64 KB boundaries.
9 */
10
11/* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $
12 * linux/include/asm/dma.h: Defines for using and allocating dma channels.
13 * Written by Hennus Bergman, 1992.
14 * High DMA channel support & info by Hannu Savolainen
15 * and John Boyd, Nov. 1992.
16 */
17
18#ifndef _ASM_DMA_H
19#define _ASM_DMA_H
20
21#include <linux/spinlock.h>
22#include <asm/io.h>
23
24#define dma_outb outb
25#define dma_inb inb
26
27/*
28 * NOTES about DMA transfers:
29 *
30 * controller 1: channels 0-3, byte operations, ports 00-1F
31 * controller 2: channels 4-7, word operations, ports C0-DF
32 *
33 * - ALL registers are 8 bits only, regardless of transfer size
34 * - channel 4 is not used - cascades 1 into 2.
35 * - channels 0-3 are byte - addresses/counts are for physical bytes
36 * - channels 5-7 are word - addresses/counts are for physical words
37 * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
38 * - transfer count loaded to registers is 1 less than actual count
39 * - controller 2 offsets are all even (2x offsets for controller 1)
40 * - page registers for 5-7 don't use data bit 0, represent 128K pages
41 * - page registers for 0-3 use bit 0, represent 64K pages
42 *
43 * DMA transfers are limited to the lower 16MB of _physical_ memory.
44 * Note that addresses loaded into registers must be _physical_ addresses,
45 * not logical addresses (which may differ if paging is active).
46 *
47 * Address mapping for channels 0-3:
48 *
49 * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses)
50 * | ... | | ... | | ... |
51 * | ... | | ... | | ... |
52 * | ... | | ... | | ... |
53 * P7 ... P0 A7 ... A0 A7 ... A0
54 * | Page | Addr MSB | Addr LSB | (DMA registers)
55 *
56 * Address mapping for channels 5-7:
57 *
58 * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses)
59 * | ... | \ \ ... \ \ \ ... \ \
60 * | ... | \ \ ... \ \ \ ... \ (not used)
61 * | ... | \ \ ... \ \ \ ... \
62 * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0
63 * | Page | Addr MSB | Addr LSB | (DMA registers)
64 *
65 * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses
66 * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at
67 * the hardware level, so odd-byte transfers aren't possible).
68 *
69 * Transfer count (_not # bytes_) is limited to 64K, represented as actual
70 * count - 1 : 64K => 0xFFFF, 1 => 0x0000. Thus, count is always 1 or more,
71 * and up to 128K bytes may be transferred on channels 5-7 in one operation.
72 *
73 */
74
75#define MAX_DMA_CHANNELS 8
76
77/*
78 ISA DMA limitations on Alpha platforms,
79
80 These may be due to SIO (PCI<->ISA bridge) chipset limitation, or
81 just a wiring limit.
82*/
83
84/* The maximum address for ISA DMA transfer on Alpha XL, due to an
85 hardware SIO limitation, is 64MB.
86*/
87#define ALPHA_XL_MAX_ISA_DMA_ADDRESS 0x04000000UL
88
89/* The maximum address for ISA DMA transfer on RUFFIAN,
90 due to an hardware SIO limitation, is 16MB.
91*/
92#define ALPHA_RUFFIAN_MAX_ISA_DMA_ADDRESS 0x01000000UL
93
94/* The maximum address for ISA DMA transfer on SABLE, and some ALCORs,
95 due to an hardware SIO chip limitation, is 2GB.
96*/
97#define ALPHA_SABLE_MAX_ISA_DMA_ADDRESS 0x80000000UL
98#define ALPHA_ALCOR_MAX_ISA_DMA_ADDRESS 0x80000000UL
99
100/*
101 Maximum address for all the others is the complete 32-bit bus
102 address space.
103*/
104#define ALPHA_MAX_ISA_DMA_ADDRESS 0x100000000UL
105
106#ifdef CONFIG_ALPHA_GENERIC
107# define MAX_ISA_DMA_ADDRESS (alpha_mv.max_isa_dma_address)
108#else
109# if defined(CONFIG_ALPHA_XL)
110# define MAX_ISA_DMA_ADDRESS ALPHA_XL_MAX_ISA_DMA_ADDRESS
111# elif defined(CONFIG_ALPHA_RUFFIAN)
112# define MAX_ISA_DMA_ADDRESS ALPHA_RUFFIAN_MAX_ISA_DMA_ADDRESS
113# elif defined(CONFIG_ALPHA_SABLE)
114# define MAX_ISA_DMA_ADDRESS ALPHA_SABLE_MAX_ISA_DMA_ADDRESS
115# elif defined(CONFIG_ALPHA_ALCOR)
116# define MAX_ISA_DMA_ADDRESS ALPHA_ALCOR_MAX_ISA_DMA_ADDRESS
117# else
118# define MAX_ISA_DMA_ADDRESS ALPHA_MAX_ISA_DMA_ADDRESS
119# endif
120#endif
121
122/* If we have the iommu, we don't have any address limitations on DMA.
123 Otherwise (Nautilus, RX164), we have to have 0-16 Mb DMA zone
124 like i386. */
125#define MAX_DMA_ADDRESS (alpha_mv.mv_pci_tbi ? \
126 ~0UL : IDENT_ADDR + 0x01000000)
127
128/* 8237 DMA controllers */
129#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */
130#define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */
131
132/* DMA controller registers */
133#define DMA1_CMD_REG 0x08 /* command register (w) */
134#define DMA1_STAT_REG 0x08 /* status register (r) */
135#define DMA1_REQ_REG 0x09 /* request register (w) */
136#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */
137#define DMA1_MODE_REG 0x0B /* mode register (w) */
138#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */
139#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */
140#define DMA1_RESET_REG 0x0D /* Master Clear (w) */
141#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */
142#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */
143#define DMA1_EXT_MODE_REG (0x400 | DMA1_MODE_REG)
144
145#define DMA2_CMD_REG 0xD0 /* command register (w) */
146#define DMA2_STAT_REG 0xD0 /* status register (r) */
147#define DMA2_REQ_REG 0xD2 /* request register (w) */
148#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */
149#define DMA2_MODE_REG 0xD6 /* mode register (w) */
150#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */
151#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */
152#define DMA2_RESET_REG 0xDA /* Master Clear (w) */
153#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */
154#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */
155#define DMA2_EXT_MODE_REG (0x400 | DMA2_MODE_REG)
156
157#define DMA_ADDR_0 0x00 /* DMA address registers */
158#define DMA_ADDR_1 0x02
159#define DMA_ADDR_2 0x04
160#define DMA_ADDR_3 0x06
161#define DMA_ADDR_4 0xC0
162#define DMA_ADDR_5 0xC4
163#define DMA_ADDR_6 0xC8
164#define DMA_ADDR_7 0xCC
165
166#define DMA_CNT_0 0x01 /* DMA count registers */
167#define DMA_CNT_1 0x03
168#define DMA_CNT_2 0x05
169#define DMA_CNT_3 0x07
170#define DMA_CNT_4 0xC2
171#define DMA_CNT_5 0xC6
172#define DMA_CNT_6 0xCA
173#define DMA_CNT_7 0xCE
174
175#define DMA_PAGE_0 0x87 /* DMA page registers */
176#define DMA_PAGE_1 0x83
177#define DMA_PAGE_2 0x81
178#define DMA_PAGE_3 0x82
179#define DMA_PAGE_5 0x8B
180#define DMA_PAGE_6 0x89
181#define DMA_PAGE_7 0x8A
182
183#define DMA_HIPAGE_0 (0x400 | DMA_PAGE_0)
184#define DMA_HIPAGE_1 (0x400 | DMA_PAGE_1)
185#define DMA_HIPAGE_2 (0x400 | DMA_PAGE_2)
186#define DMA_HIPAGE_3 (0x400 | DMA_PAGE_3)
187#define DMA_HIPAGE_4 (0x400 | DMA_PAGE_4)
188#define DMA_HIPAGE_5 (0x400 | DMA_PAGE_5)
189#define DMA_HIPAGE_6 (0x400 | DMA_PAGE_6)
190#define DMA_HIPAGE_7 (0x400 | DMA_PAGE_7)
191
192#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */
193#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */
194#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */
195
196#define DMA_AUTOINIT 0x10
197
198extern spinlock_t dma_spin_lock;
199
200static __inline__ unsigned long claim_dma_lock(void)
201{
202 unsigned long flags;
203 spin_lock_irqsave(&dma_spin_lock, flags);
204 return flags;
205}
206
207static __inline__ void release_dma_lock(unsigned long flags)
208{
209 spin_unlock_irqrestore(&dma_spin_lock, flags);
210}
211
212/* enable/disable a specific DMA channel */
213static __inline__ void enable_dma(unsigned int dmanr)
214{
215 if (dmanr<=3)
216 dma_outb(dmanr, DMA1_MASK_REG);
217 else
218 dma_outb(dmanr & 3, DMA2_MASK_REG);
219}
220
221static __inline__ void disable_dma(unsigned int dmanr)
222{
223 if (dmanr<=3)
224 dma_outb(dmanr | 4, DMA1_MASK_REG);
225 else
226 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG);
227}
228
229/* Clear the 'DMA Pointer Flip Flop'.
230 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
231 * Use this once to initialize the FF to a known state.
232 * After that, keep track of it. :-)
233 * --- In order to do that, the DMA routines below should ---
234 * --- only be used while interrupts are disabled! ---
235 */
236static __inline__ void clear_dma_ff(unsigned int dmanr)
237{
238 if (dmanr<=3)
239 dma_outb(0, DMA1_CLEAR_FF_REG);
240 else
241 dma_outb(0, DMA2_CLEAR_FF_REG);
242}
243
244/* set mode (above) for a specific DMA channel */
245static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
246{
247 if (dmanr<=3)
248 dma_outb(mode | dmanr, DMA1_MODE_REG);
249 else
250 dma_outb(mode | (dmanr&3), DMA2_MODE_REG);
251}
252
253/* set extended mode for a specific DMA channel */
254static __inline__ void set_dma_ext_mode(unsigned int dmanr, char ext_mode)
255{
256 if (dmanr<=3)
257 dma_outb(ext_mode | dmanr, DMA1_EXT_MODE_REG);
258 else
259 dma_outb(ext_mode | (dmanr&3), DMA2_EXT_MODE_REG);
260}
261
262/* Set only the page register bits of the transfer address.
263 * This is used for successive transfers when we know the contents of
264 * the lower 16 bits of the DMA current address register.
265 */
266static __inline__ void set_dma_page(unsigned int dmanr, unsigned int pagenr)
267{
268 switch(dmanr) {
269 case 0:
270 dma_outb(pagenr, DMA_PAGE_0);
271 dma_outb((pagenr >> 8), DMA_HIPAGE_0);
272 break;
273 case 1:
274 dma_outb(pagenr, DMA_PAGE_1);
275 dma_outb((pagenr >> 8), DMA_HIPAGE_1);
276 break;
277 case 2:
278 dma_outb(pagenr, DMA_PAGE_2);
279 dma_outb((pagenr >> 8), DMA_HIPAGE_2);
280 break;
281 case 3:
282 dma_outb(pagenr, DMA_PAGE_3);
283 dma_outb((pagenr >> 8), DMA_HIPAGE_3);
284 break;
285 case 5:
286 dma_outb(pagenr & 0xfe, DMA_PAGE_5);
287 dma_outb((pagenr >> 8), DMA_HIPAGE_5);
288 break;
289 case 6:
290 dma_outb(pagenr & 0xfe, DMA_PAGE_6);
291 dma_outb((pagenr >> 8), DMA_HIPAGE_6);
292 break;
293 case 7:
294 dma_outb(pagenr & 0xfe, DMA_PAGE_7);
295 dma_outb((pagenr >> 8), DMA_HIPAGE_7);
296 break;
297 }
298}
299
300
301/* Set transfer address & page bits for specific DMA channel.
302 * Assumes dma flipflop is clear.
303 */
304static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
305{
306 if (dmanr <= 3) {
307 dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
308 dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
309 } else {
310 dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
311 dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
312 }
313 set_dma_page(dmanr, a>>16); /* set hipage last to enable 32-bit mode */
314}
315
316
317/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
318 * a specific DMA channel.
319 * You must ensure the parameters are valid.
320 * NOTE: from a manual: "the number of transfers is one more
321 * than the initial word count"! This is taken into account.
322 * Assumes dma flip-flop is clear.
323 * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
324 */
325static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
326{
327 count--;
328 if (dmanr <= 3) {
329 dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
330 dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
331 } else {
332 dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
333 dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
334 }
335}
336
337
338/* Get DMA residue count. After a DMA transfer, this
339 * should return zero. Reading this while a DMA transfer is
340 * still in progress will return unpredictable results.
341 * If called before the channel has been used, it may return 1.
342 * Otherwise, it returns the number of _bytes_ left to transfer.
343 *
344 * Assumes DMA flip-flop is clear.
345 */
346static __inline__ int get_dma_residue(unsigned int dmanr)
347{
348 unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE
349 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE;
350
351 /* using short to get 16-bit wrap around */
352 unsigned short count;
353
354 count = 1 + dma_inb(io_port);
355 count += dma_inb(io_port) << 8;
356
357 return (dmanr<=3)? count : (count<<1);
358}
359
360
361/* These are in kernel/dma.c: */
362extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
363extern void free_dma(unsigned int dmanr); /* release it again */
364#define KERNEL_HAVE_CHECK_DMA
365extern int check_dma(unsigned int dmanr);
366
367/* From PCI */
368
369#ifdef CONFIG_PCI
370extern int isa_dma_bridge_buggy;
371#else
372#define isa_dma_bridge_buggy (0)
373#endif
374
375
376#endif /* _ASM_DMA_H */
diff --git a/include/asm-alpha/elf.h b/include/asm-alpha/elf.h
deleted file mode 100644
index fc1002ea1e0c..000000000000
--- a/include/asm-alpha/elf.h
+++ /dev/null
@@ -1,165 +0,0 @@
1#ifndef __ASM_ALPHA_ELF_H
2#define __ASM_ALPHA_ELF_H
3
4#include <asm/auxvec.h>
5
6/* Special values for the st_other field in the symbol table. */
7
8#define STO_ALPHA_NOPV 0x80
9#define STO_ALPHA_STD_GPLOAD 0x88
10
11/*
12 * Alpha ELF relocation types
13 */
14#define R_ALPHA_NONE 0 /* No reloc */
15#define R_ALPHA_REFLONG 1 /* Direct 32 bit */
16#define R_ALPHA_REFQUAD 2 /* Direct 64 bit */
17#define R_ALPHA_GPREL32 3 /* GP relative 32 bit */
18#define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */
19#define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */
20#define R_ALPHA_GPDISP 6 /* Add displacement to GP */
21#define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */
22#define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */
23#define R_ALPHA_SREL16 9 /* PC relative 16 bit */
24#define R_ALPHA_SREL32 10 /* PC relative 32 bit */
25#define R_ALPHA_SREL64 11 /* PC relative 64 bit */
26#define R_ALPHA_GPRELHIGH 17 /* GP relative 32 bit, high 16 bits */
27#define R_ALPHA_GPRELLOW 18 /* GP relative 32 bit, low 16 bits */
28#define R_ALPHA_GPREL16 19 /* GP relative 16 bit */
29#define R_ALPHA_COPY 24 /* Copy symbol at runtime */
30#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
31#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
32#define R_ALPHA_RELATIVE 27 /* Adjust by program base */
33#define R_ALPHA_BRSGP 28
34#define R_ALPHA_TLSGD 29
35#define R_ALPHA_TLS_LDM 30
36#define R_ALPHA_DTPMOD64 31
37#define R_ALPHA_GOTDTPREL 32
38#define R_ALPHA_DTPREL64 33
39#define R_ALPHA_DTPRELHI 34
40#define R_ALPHA_DTPRELLO 35
41#define R_ALPHA_DTPREL16 36
42#define R_ALPHA_GOTTPREL 37
43#define R_ALPHA_TPREL64 38
44#define R_ALPHA_TPRELHI 39
45#define R_ALPHA_TPRELLO 40
46#define R_ALPHA_TPREL16 41
47
48#define SHF_ALPHA_GPREL 0x10000000
49
50/* Legal values for e_flags field of Elf64_Ehdr. */
51
52#define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */
53
54/*
55 * ELF register definitions..
56 */
57
58/*
59 * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
60 * I have no idea why that is so. For now, we just leave it at 33
61 * (32 general regs + processor status word).
62 */
63#define ELF_NGREG 33
64#define ELF_NFPREG 32
65
66typedef unsigned long elf_greg_t;
67typedef elf_greg_t elf_gregset_t[ELF_NGREG];
68
69typedef double elf_fpreg_t;
70typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
71
72/*
73 * This is used to ensure we don't load something for the wrong architecture.
74 */
75#define elf_check_arch(x) ((x)->e_machine == EM_ALPHA)
76
77/*
78 * These are used to set parameters in the core dumps.
79 */
80#define ELF_CLASS ELFCLASS64
81#define ELF_DATA ELFDATA2LSB
82#define ELF_ARCH EM_ALPHA
83
84#define USE_ELF_CORE_DUMP
85#define ELF_EXEC_PAGESIZE 8192
86
87/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
88 use of this is to invoke "./ld.so someprog" to test out a new version of
89 the loader. We need to make sure that it is out of the way of the program
90 that it will "exec", and that there is sufficient room for the brk. */
91
92#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
93
94/* $0 is set by ld.so to a pointer to a function which might be
95 registered using atexit. This provides a mean for the dynamic
96 linker to call DT_FINI functions for shared libraries that have
97 been loaded before the code runs.
98
99 So that we can use the same startup file with static executables,
100 we start programs with a value of 0 to indicate that there is no
101 such function. */
102
103#define ELF_PLAT_INIT(_r, load_addr) _r->r0 = 0
104
105/* The registers are layed out in pt_regs for PAL and syscall
106 convenience. Re-order them for the linear elf_gregset_t. */
107
108struct pt_regs;
109struct thread_info;
110struct task_struct;
111extern void dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt,
112 struct thread_info *ti);
113#define ELF_CORE_COPY_REGS(DEST, REGS) \
114 dump_elf_thread(DEST, REGS, current_thread_info());
115
116/* Similar, but for a thread other than current. */
117
118extern int dump_elf_task(elf_greg_t *dest, struct task_struct *task);
119#define ELF_CORE_COPY_TASK_REGS(TASK, DEST) \
120 dump_elf_task(*(DEST), TASK)
121
122/* Similar, but for the FP registers. */
123
124extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
125#define ELF_CORE_COPY_FPREGS(TASK, DEST) \
126 dump_elf_task_fp(*(DEST), TASK)
127
128/* This yields a mask that user programs can use to figure out what
129 instruction set this CPU supports. This is trivial on Alpha,
130 but not so on other machines. */
131
132#define ELF_HWCAP (~amask(-1))
133
134/* This yields a string that ld.so will use to load implementation
135 specific libraries for optimization. This is more specific in
136 intent than poking at uname or /proc/cpuinfo. */
137
138#define ELF_PLATFORM \
139({ \
140 enum implver_enum i_ = implver(); \
141 ( i_ == IMPLVER_EV4 ? "ev4" \
142 : i_ == IMPLVER_EV5 \
143 ? (amask(AMASK_BWX) ? "ev5" : "ev56") \
144 : amask (AMASK_CIX) ? "ev6" : "ev67"); \
145})
146
147#define SET_PERSONALITY(EX, IBCS2) \
148 set_personality(((EX).e_flags & EF_ALPHA_32BIT) \
149 ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX)
150
151extern int alpha_l1i_cacheshape;
152extern int alpha_l1d_cacheshape;
153extern int alpha_l2_cacheshape;
154extern int alpha_l3_cacheshape;
155
156/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
157#define ARCH_DLINFO \
158 do { \
159 NEW_AUX_ENT(AT_L1I_CACHESHAPE, alpha_l1i_cacheshape); \
160 NEW_AUX_ENT(AT_L1D_CACHESHAPE, alpha_l1d_cacheshape); \
161 NEW_AUX_ENT(AT_L2_CACHESHAPE, alpha_l2_cacheshape); \
162 NEW_AUX_ENT(AT_L3_CACHESHAPE, alpha_l3_cacheshape); \
163 } while (0)
164
165#endif /* __ASM_ALPHA_ELF_H */
diff --git a/include/asm-alpha/emergency-restart.h b/include/asm-alpha/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/include/asm-alpha/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-alpha/err_common.h b/include/asm-alpha/err_common.h
deleted file mode 100644
index c25095942107..000000000000
--- a/include/asm-alpha/err_common.h
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * linux/include/asm-alpha/err_common.h
3 *
4 * Copyright (C) 2000 Jeff Wiedemeier (Compaq Computer Corporation)
5 *
6 * Contains declarations and macros to support Alpha error handling
7 * implementations.
8 */
9
10#ifndef __ALPHA_ERR_COMMON_H
11#define __ALPHA_ERR_COMMON_H 1
12
13/*
14 * SCB Vector definitions
15 */
16#define SCB_Q_SYSERR 0x620
17#define SCB_Q_PROCERR 0x630
18#define SCB_Q_SYSMCHK 0x660
19#define SCB_Q_PROCMCHK 0x670
20#define SCB_Q_SYSEVENT 0x680
21
22/*
23 * Disposition definitions for logout frame parser
24 */
25#define MCHK_DISPOSITION_UNKNOWN_ERROR 0x00
26#define MCHK_DISPOSITION_REPORT 0x01
27#define MCHK_DISPOSITION_DISMISS 0x02
28
29/*
30 * Error Log definitions
31 */
32/*
33 * Types
34 */
35
36#define EL_CLASS__TERMINATION (0)
37# define EL_TYPE__TERMINATION__TERMINATION (0)
38#define EL_CLASS__HEADER (5)
39# define EL_TYPE__HEADER__SYSTEM_ERROR_FRAME (1)
40# define EL_TYPE__HEADER__SYSTEM_EVENT_FRAME (2)
41# define EL_TYPE__HEADER__HALT_FRAME (3)
42# define EL_TYPE__HEADER__LOGOUT_FRAME (19)
43#define EL_CLASS__GENERAL_NOTIFICATION (9)
44#define EL_CLASS__PCI_ERROR_FRAME (11)
45#define EL_CLASS__REGATTA_FAMILY (12)
46# define EL_TYPE__REGATTA__PROCESSOR_ERROR_FRAME (1)
47# define EL_TYPE__REGATTA__SYSTEM_ERROR_FRAME (2)
48# define EL_TYPE__REGATTA__ENVIRONMENTAL_FRAME (3)
49# define EL_TYPE__REGATTA__TITAN_PCHIP0_EXTENDED (8)
50# define EL_TYPE__REGATTA__TITAN_PCHIP1_EXTENDED (9)
51# define EL_TYPE__REGATTA__TITAN_MEMORY_EXTENDED (10)
52# define EL_TYPE__REGATTA__PROCESSOR_DBL_ERROR_HALT (11)
53# define EL_TYPE__REGATTA__SYSTEM_DBL_ERROR_HALT (12)
54#define EL_CLASS__PAL (14)
55# define EL_TYPE__PAL__LOGOUT_FRAME (1)
56# define EL_TYPE__PAL__EV7_PROCESSOR (4)
57# define EL_TYPE__PAL__EV7_ZBOX (5)
58# define EL_TYPE__PAL__EV7_RBOX (6)
59# define EL_TYPE__PAL__EV7_IO (7)
60# define EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE (10)
61# define EL_TYPE__PAL__ENV__AIRMOVER_FAN (11)
62# define EL_TYPE__PAL__ENV__VOLTAGE (12)
63# define EL_TYPE__PAL__ENV__INTRUSION (13)
64# define EL_TYPE__PAL__ENV__POWER_SUPPLY (14)
65# define EL_TYPE__PAL__ENV__LAN (15)
66# define EL_TYPE__PAL__ENV__HOT_PLUG (16)
67
68union el_timestamp {
69 struct {
70 u8 second;
71 u8 minute;
72 u8 hour;
73 u8 day;
74 u8 month;
75 u8 year;
76 } b;
77 u64 as_int;
78};
79
80struct el_subpacket {
81 u16 length; /* length of header (in bytes) */
82 u16 class; /* header class and type... */
83 u16 type; /* ...determine content */
84 u16 revision; /* header revision */
85 union {
86 struct { /* Class 5, Type 1 - System Error */
87 u32 frame_length;
88 u32 frame_packet_count;
89 } sys_err;
90 struct { /* Class 5, Type 2 - System Event */
91 union el_timestamp timestamp;
92 u32 frame_length;
93 u32 frame_packet_count;
94 } sys_event;
95 struct { /* Class 5, Type 3 - Double Error Halt */
96 u16 halt_code;
97 u16 reserved;
98 union el_timestamp timestamp;
99 u32 frame_length;
100 u32 frame_packet_count;
101 } err_halt;
102 struct { /* Clasee 5, Type 19 - Logout Frame Header */
103 u32 frame_length;
104 u32 frame_flags;
105 u32 cpu_offset;
106 u32 system_offset;
107 } logout_header;
108 struct { /* Class 12 - Regatta */
109 u64 cpuid;
110 u64 data_start[1];
111 } regatta_frame;
112 struct { /* Raw */
113 u64 data_start[1];
114 } raw;
115 } by_type;
116};
117
118#endif /* __ALPHA_ERR_COMMON_H */
diff --git a/include/asm-alpha/err_ev6.h b/include/asm-alpha/err_ev6.h
deleted file mode 100644
index ea637791e4a9..000000000000
--- a/include/asm-alpha/err_ev6.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ALPHA_ERR_EV6_H
2#define __ALPHA_ERR_EV6_H 1
3
4/* Dummy include for now. */
5
6#endif /* __ALPHA_ERR_EV6_H */
diff --git a/include/asm-alpha/err_ev7.h b/include/asm-alpha/err_ev7.h
deleted file mode 100644
index 87f99777c2e4..000000000000
--- a/include/asm-alpha/err_ev7.h
+++ /dev/null
@@ -1,202 +0,0 @@
1#ifndef __ALPHA_ERR_EV7_H
2#define __ALPHA_ERR_EV7_H 1
3
4/*
5 * Data for el packet class PAL (14), type LOGOUT_FRAME (1)
6 */
7struct ev7_pal_logout_subpacket {
8 u32 mchk_code;
9 u32 subpacket_count;
10 u64 whami;
11 u64 rbox_whami;
12 u64 rbox_int;
13 u64 exc_addr;
14 union el_timestamp timestamp;
15 u64 halt_code;
16 u64 reserved;
17};
18
19/*
20 * Data for el packet class PAL (14), type EV7_PROCESSOR (4)
21 */
22struct ev7_pal_processor_subpacket {
23 u64 i_stat;
24 u64 dc_stat;
25 u64 c_addr;
26 u64 c_syndrome_1;
27 u64 c_syndrome_0;
28 u64 c_stat;
29 u64 c_sts;
30 u64 mm_stat;
31 u64 exc_addr;
32 u64 ier_cm;
33 u64 isum;
34 u64 pal_base;
35 u64 i_ctl;
36 u64 process_context;
37 u64 cbox_ctl;
38 u64 cbox_stp_ctl;
39 u64 cbox_acc_ctl;
40 u64 cbox_lcl_set;
41 u64 cbox_gbl_set;
42 u64 bbox_ctl;
43 u64 bbox_err_sts;
44 u64 bbox_err_idx;
45 u64 cbox_ddp_err_sts;
46 u64 bbox_dat_rmp;
47 u64 reserved[2];
48};
49
50/*
51 * Data for el packet class PAL (14), type EV7_ZBOX (5)
52 */
53struct ev7_pal_zbox_subpacket {
54 u32 zbox0_dram_err_status_1;
55 u32 zbox0_dram_err_status_2;
56 u32 zbox0_dram_err_status_3;
57 u32 zbox0_dram_err_ctl;
58 u32 zbox0_dram_err_adr;
59 u32 zbox0_dift_timeout;
60 u32 zbox0_dram_mapper_ctl;
61 u32 zbox0_frc_err_adr;
62 u32 zbox0_dift_err_status;
63 u32 reserved1;
64 u32 zbox1_dram_err_status_1;
65 u32 zbox1_dram_err_status_2;
66 u32 zbox1_dram_err_status_3;
67 u32 zbox1_dram_err_ctl;
68 u32 zbox1_dram_err_adr;
69 u32 zbox1_dift_timeout;
70 u32 zbox1_dram_mapper_ctl;
71 u32 zbox1_frc_err_adr;
72 u32 zbox1_dift_err_status;
73 u32 reserved2;
74 u64 cbox_ctl;
75 u64 cbox_stp_ctl;
76 u64 zbox0_error_pa;
77 u64 zbox1_error_pa;
78 u64 zbox0_ored_syndrome;
79 u64 zbox1_ored_syndrome;
80 u64 reserved3[2];
81};
82
83/*
84 * Data for el packet class PAL (14), type EV7_RBOX (6)
85 */
86struct ev7_pal_rbox_subpacket {
87 u64 rbox_cfg;
88 u64 rbox_n_cfg;
89 u64 rbox_s_cfg;
90 u64 rbox_e_cfg;
91 u64 rbox_w_cfg;
92 u64 rbox_n_err;
93 u64 rbox_s_err;
94 u64 rbox_e_err;
95 u64 rbox_w_err;
96 u64 rbox_io_cfg;
97 u64 rbox_io_err;
98 u64 rbox_l_err;
99 u64 rbox_whoami;
100 u64 rbox_imask;
101 u64 rbox_intq;
102 u64 rbox_int;
103 u64 reserved[2];
104};
105
106/*
107 * Data for el packet class PAL (14), type EV7_IO (7)
108 */
109struct ev7_pal_io_one_port {
110 u64 pox_err_sum;
111 u64 pox_tlb_err;
112 u64 pox_spl_cmplt;
113 u64 pox_trans_sum;
114 u64 pox_first_err;
115 u64 pox_mult_err;
116 u64 pox_dm_source;
117 u64 pox_dm_dest;
118 u64 pox_dm_size;
119 u64 pox_dm_ctrl;
120 u64 reserved;
121};
122
123struct ev7_pal_io_subpacket {
124 u64 io_asic_rev;
125 u64 io_sys_rev;
126 u64 io7_uph;
127 u64 hpi_ctl;
128 u64 crd_ctl;
129 u64 hei_ctl;
130 u64 po7_error_sum;
131 u64 po7_uncrr_sym;
132 u64 po7_crrct_sym;
133 u64 po7_ugbge_sym;
134 u64 po7_err_pkt0;
135 u64 po7_err_pkt1;
136 u64 reserved[2];
137 struct ev7_pal_io_one_port ports[4];
138};
139
140/*
141 * Environmental subpacket. Data used for el packets:
142 * class PAL (14), type AMBIENT_TEMPERATURE (10)
143 * class PAL (14), type AIRMOVER_FAN (11)
144 * class PAL (14), type VOLTAGE (12)
145 * class PAL (14), type INTRUSION (13)
146 * class PAL (14), type POWER_SUPPLY (14)
147 * class PAL (14), type LAN (15)
148 * class PAL (14), type HOT_PLUG (16)
149 */
150struct ev7_pal_environmental_subpacket {
151 u16 cabinet;
152 u16 drawer;
153 u16 reserved1[2];
154 u8 module_type;
155 u8 unit_id; /* unit reporting condition */
156 u8 reserved2;
157 u8 condition; /* condition reported */
158};
159
160/*
161 * Convert environmental type to index
162 */
163static inline int ev7_lf_env_index(int type)
164{
165 BUG_ON((type < EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE)
166 || (type > EL_TYPE__PAL__ENV__HOT_PLUG));
167
168 return type - EL_TYPE__PAL__ENV__AMBIENT_TEMPERATURE;
169}
170
171/*
172 * Data for generic el packet class PAL.
173 */
174struct ev7_pal_subpacket {
175 union {
176 struct ev7_pal_logout_subpacket logout; /* Type 1 */
177 struct ev7_pal_processor_subpacket ev7; /* Type 4 */
178 struct ev7_pal_zbox_subpacket zbox; /* Type 5 */
179 struct ev7_pal_rbox_subpacket rbox; /* Type 6 */
180 struct ev7_pal_io_subpacket io; /* Type 7 */
181 struct ev7_pal_environmental_subpacket env; /* Type 10-16 */
182 u64 as_quad[1]; /* Raw u64 */
183 } by_type;
184};
185
186/*
187 * Struct to contain collected logout from subpackets.
188 */
189struct ev7_lf_subpackets {
190 struct ev7_pal_logout_subpacket *logout; /* Type 1 */
191 struct ev7_pal_processor_subpacket *ev7; /* Type 4 */
192 struct ev7_pal_zbox_subpacket *zbox; /* Type 5 */
193 struct ev7_pal_rbox_subpacket *rbox; /* Type 6 */
194 struct ev7_pal_io_subpacket *io; /* Type 7 */
195 struct ev7_pal_environmental_subpacket *env[7]; /* Type 10-16 */
196
197 unsigned int io_pid;
198};
199
200#endif /* __ALPHA_ERR_EV7_H */
201
202
diff --git a/include/asm-alpha/errno.h b/include/asm-alpha/errno.h
deleted file mode 100644
index 69e2655249d2..000000000000
--- a/include/asm-alpha/errno.h
+++ /dev/null
@@ -1,123 +0,0 @@
1#ifndef _ALPHA_ERRNO_H
2#define _ALPHA_ERRNO_H
3
4#include <asm-generic/errno-base.h>
5
6#undef EAGAIN /* 11 in errno-base.h */
7
8#define EDEADLK 11 /* Resource deadlock would occur */
9
10#define EAGAIN 35 /* Try again */
11#define EWOULDBLOCK EAGAIN /* Operation would block */
12#define EINPROGRESS 36 /* Operation now in progress */
13#define EALREADY 37 /* Operation already in progress */
14#define ENOTSOCK 38 /* Socket operation on non-socket */
15#define EDESTADDRREQ 39 /* Destination address required */
16#define EMSGSIZE 40 /* Message too long */
17#define EPROTOTYPE 41 /* Protocol wrong type for socket */
18#define ENOPROTOOPT 42 /* Protocol not available */
19#define EPROTONOSUPPORT 43 /* Protocol not supported */
20#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
21#define EOPNOTSUPP 45 /* Operation not supported on transport endpoint */
22#define EPFNOSUPPORT 46 /* Protocol family not supported */
23#define EAFNOSUPPORT 47 /* Address family not supported by protocol */
24#define EADDRINUSE 48 /* Address already in use */
25#define EADDRNOTAVAIL 49 /* Cannot assign requested address */
26#define ENETDOWN 50 /* Network is down */
27#define ENETUNREACH 51 /* Network is unreachable */
28#define ENETRESET 52 /* Network dropped connection because of reset */
29#define ECONNABORTED 53 /* Software caused connection abort */
30#define ECONNRESET 54 /* Connection reset by peer */
31#define ENOBUFS 55 /* No buffer space available */
32#define EISCONN 56 /* Transport endpoint is already connected */
33#define ENOTCONN 57 /* Transport endpoint is not connected */
34#define ESHUTDOWN 58 /* Cannot send after transport endpoint shutdown */
35#define ETOOMANYREFS 59 /* Too many references: cannot splice */
36#define ETIMEDOUT 60 /* Connection timed out */
37#define ECONNREFUSED 61 /* Connection refused */
38#define ELOOP 62 /* Too many symbolic links encountered */
39#define ENAMETOOLONG 63 /* File name too long */
40#define EHOSTDOWN 64 /* Host is down */
41#define EHOSTUNREACH 65 /* No route to host */
42#define ENOTEMPTY 66 /* Directory not empty */
43
44#define EUSERS 68 /* Too many users */
45#define EDQUOT 69 /* Quota exceeded */
46#define ESTALE 70 /* Stale NFS file handle */
47#define EREMOTE 71 /* Object is remote */
48
49#define ENOLCK 77 /* No record locks available */
50#define ENOSYS 78 /* Function not implemented */
51
52#define ENOMSG 80 /* No message of desired type */
53#define EIDRM 81 /* Identifier removed */
54#define ENOSR 82 /* Out of streams resources */
55#define ETIME 83 /* Timer expired */
56#define EBADMSG 84 /* Not a data message */
57#define EPROTO 85 /* Protocol error */
58#define ENODATA 86 /* No data available */
59#define ENOSTR 87 /* Device not a stream */
60
61#define ENOPKG 92 /* Package not installed */
62
63#define EILSEQ 116 /* Illegal byte sequence */
64
65/* The following are just random noise.. */
66#define ECHRNG 88 /* Channel number out of range */
67#define EL2NSYNC 89 /* Level 2 not synchronized */
68#define EL3HLT 90 /* Level 3 halted */
69#define EL3RST 91 /* Level 3 reset */
70
71#define ELNRNG 93 /* Link number out of range */
72#define EUNATCH 94 /* Protocol driver not attached */
73#define ENOCSI 95 /* No CSI structure available */
74#define EL2HLT 96 /* Level 2 halted */
75#define EBADE 97 /* Invalid exchange */
76#define EBADR 98 /* Invalid request descriptor */
77#define EXFULL 99 /* Exchange full */
78#define ENOANO 100 /* No anode */
79#define EBADRQC 101 /* Invalid request code */
80#define EBADSLT 102 /* Invalid slot */
81
82#define EDEADLOCK EDEADLK
83
84#define EBFONT 104 /* Bad font file format */
85#define ENONET 105 /* Machine is not on the network */
86#define ENOLINK 106 /* Link has been severed */
87#define EADV 107 /* Advertise error */
88#define ESRMNT 108 /* Srmount error */
89#define ECOMM 109 /* Communication error on send */
90#define EMULTIHOP 110 /* Multihop attempted */
91#define EDOTDOT 111 /* RFS specific error */
92#define EOVERFLOW 112 /* Value too large for defined data type */
93#define ENOTUNIQ 113 /* Name not unique on network */
94#define EBADFD 114 /* File descriptor in bad state */
95#define EREMCHG 115 /* Remote address changed */
96
97#define EUCLEAN 117 /* Structure needs cleaning */
98#define ENOTNAM 118 /* Not a XENIX named type file */
99#define ENAVAIL 119 /* No XENIX semaphores available */
100#define EISNAM 120 /* Is a named type file */
101#define EREMOTEIO 121 /* Remote I/O error */
102
103#define ELIBACC 122 /* Can not access a needed shared library */
104#define ELIBBAD 123 /* Accessing a corrupted shared library */
105#define ELIBSCN 124 /* .lib section in a.out corrupted */
106#define ELIBMAX 125 /* Attempting to link in too many shared libraries */
107#define ELIBEXEC 126 /* Cannot exec a shared library directly */
108#define ERESTART 127 /* Interrupted system call should be restarted */
109#define ESTRPIPE 128 /* Streams pipe error */
110
111#define ENOMEDIUM 129 /* No medium found */
112#define EMEDIUMTYPE 130 /* Wrong medium type */
113#define ECANCELED 131 /* Operation Cancelled */
114#define ENOKEY 132 /* Required key not available */
115#define EKEYEXPIRED 133 /* Key has expired */
116#define EKEYREVOKED 134 /* Key has been revoked */
117#define EKEYREJECTED 135 /* Key was rejected by service */
118
119/* for robust mutexes */
120#define EOWNERDEAD 136 /* Owner died */
121#define ENOTRECOVERABLE 137 /* State not recoverable */
122
123#endif
diff --git a/include/asm-alpha/fb.h b/include/asm-alpha/fb.h
deleted file mode 100644
index fa9bbb96b2b3..000000000000
--- a/include/asm-alpha/fb.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/device.h>
4
5/* Caching is off in the I/O space quadrant by design. */
6#define fb_pgprotect(...) do {} while (0)
7
8static inline int fb_is_primary_device(struct fb_info *info)
9{
10 return 0;
11}
12
13#endif /* _ASM_FB_H_ */
diff --git a/include/asm-alpha/fcntl.h b/include/asm-alpha/fcntl.h
deleted file mode 100644
index 25da0017ec87..000000000000
--- a/include/asm-alpha/fcntl.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef _ALPHA_FCNTL_H
2#define _ALPHA_FCNTL_H
3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 01000 /* not fcntl */
7#define O_TRUNC 02000 /* not fcntl */
8#define O_EXCL 04000 /* not fcntl */
9#define O_NOCTTY 010000 /* not fcntl */
10
11#define O_NONBLOCK 00004
12#define O_APPEND 00010
13#define O_SYNC 040000
14#define O_DIRECTORY 0100000 /* must be a directory */
15#define O_NOFOLLOW 0200000 /* don't follow links */
16#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */
17#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */
18#define O_NOATIME 04000000
19#define O_CLOEXEC 010000000 /* set close_on_exec */
20
21#define F_GETLK 7
22#define F_SETLK 8
23#define F_SETLKW 9
24
25#define F_SETOWN 5 /* for sockets. */
26#define F_GETOWN 6 /* for sockets. */
27#define F_SETSIG 10 /* for sockets. */
28#define F_GETSIG 11 /* for sockets. */
29
30/* for posix fcntl() and lockf() */
31#define F_RDLCK 1
32#define F_WRLCK 2
33#define F_UNLCK 8
34
35/* for old implementation of bsd flock () */
36#define F_EXLCK 16 /* or 3 */
37#define F_SHLCK 32 /* or 4 */
38
39#define F_INPROGRESS 64
40
41#include <asm-generic/fcntl.h>
42
43#endif
diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h
deleted file mode 100644
index 0be50413b2b5..000000000000
--- a/include/asm-alpha/floppy.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * Architecture specific parts of the Floppy driver
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995
9 */
10#ifndef __ASM_ALPHA_FLOPPY_H
11#define __ASM_ALPHA_FLOPPY_H
12
13
14#define fd_inb(port) inb_p(port)
15#define fd_outb(value,port) outb_p(value,port)
16
17#define fd_enable_dma() enable_dma(FLOPPY_DMA)
18#define fd_disable_dma() disable_dma(FLOPPY_DMA)
19#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy")
20#define fd_free_dma() free_dma(FLOPPY_DMA)
21#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA)
22#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA,mode)
23#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA,virt_to_bus(addr))
24#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
25#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
26#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
27#define fd_cacheflush(addr,size) /* nothing */
28#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\
29 IRQF_DISABLED, "floppy", NULL)
30#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
31
32#ifdef CONFIG_PCI
33
34#include <linux/pci.h>
35
36#define fd_dma_setup(addr,size,mode,io) alpha_fd_dma_setup(addr,size,mode,io)
37
38static __inline__ int
39alpha_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
40{
41 static unsigned long prev_size;
42 static dma_addr_t bus_addr = 0;
43 static char *prev_addr;
44 static int prev_dir;
45 int dir;
46
47 dir = (mode != DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE;
48
49 if (bus_addr
50 && (addr != prev_addr || size != prev_size || dir != prev_dir)) {
51 /* different from last time -- unmap prev */
52 pci_unmap_single(isa_bridge, bus_addr, prev_size, prev_dir);
53 bus_addr = 0;
54 }
55
56 if (!bus_addr) /* need to map it */
57 bus_addr = pci_map_single(isa_bridge, addr, size, dir);
58
59 /* remember this one as prev */
60 prev_addr = addr;
61 prev_size = size;
62 prev_dir = dir;
63
64 fd_clear_dma_ff();
65 fd_cacheflush(addr, size);
66 fd_set_dma_mode(mode);
67 set_dma_addr(FLOPPY_DMA, bus_addr);
68 fd_set_dma_count(size);
69 virtual_dma_port = io;
70 fd_enable_dma();
71
72 return 0;
73}
74
75#endif /* CONFIG_PCI */
76
77__inline__ void virtual_dma_init(void)
78{
79 /* Nothing to do on an Alpha */
80}
81
82static int FDC1 = 0x3f0;
83static int FDC2 = -1;
84
85/*
86 * Again, the CMOS information doesn't work on the alpha..
87 */
88#define FLOPPY0_TYPE 6
89#define FLOPPY1_TYPE 0
90
91#define N_FDC 2
92#define N_DRIVE 8
93
94/*
95 * Most Alphas have no problems with floppy DMA crossing 64k borders,
96 * except for certain ones, like XL and RUFFIAN.
97 *
98 * However, the test is simple and fast, and this *is* floppy, after all,
99 * so we do it for all platforms, just to make sure.
100 *
101 * This is advantageous in other circumstances as well, as in moving
102 * about the PCI DMA windows and forcing the floppy to start doing
103 * scatter-gather when it never had before, and there *is* a problem
104 * on that platform... ;-}
105 */
106
107static inline unsigned long CROSS_64KB(void *a, unsigned long s)
108{
109 unsigned long p = (unsigned long)a;
110 return ((p + s - 1) ^ p) & ~0xffffUL;
111}
112
113#define EXTRA_FLOPPY_PARAMS
114
115#endif /* __ASM_ALPHA_FLOPPY_H */
diff --git a/include/asm-alpha/fpu.h b/include/asm-alpha/fpu.h
deleted file mode 100644
index ecb17a72acc3..000000000000
--- a/include/asm-alpha/fpu.h
+++ /dev/null
@@ -1,193 +0,0 @@
1#ifndef __ASM_ALPHA_FPU_H
2#define __ASM_ALPHA_FPU_H
3
4/*
5 * Alpha floating-point control register defines:
6 */
7#define FPCR_DNOD (1UL<<47) /* denorm INV trap disable */
8#define FPCR_DNZ (1UL<<48) /* denorms to zero */
9#define FPCR_INVD (1UL<<49) /* invalid op disable (opt.) */
10#define FPCR_DZED (1UL<<50) /* division by zero disable (opt.) */
11#define FPCR_OVFD (1UL<<51) /* overflow disable (optional) */
12#define FPCR_INV (1UL<<52) /* invalid operation */
13#define FPCR_DZE (1UL<<53) /* division by zero */
14#define FPCR_OVF (1UL<<54) /* overflow */
15#define FPCR_UNF (1UL<<55) /* underflow */
16#define FPCR_INE (1UL<<56) /* inexact */
17#define FPCR_IOV (1UL<<57) /* integer overflow */
18#define FPCR_UNDZ (1UL<<60) /* underflow to zero (opt.) */
19#define FPCR_UNFD (1UL<<61) /* underflow disable (opt.) */
20#define FPCR_INED (1UL<<62) /* inexact disable (opt.) */
21#define FPCR_SUM (1UL<<63) /* summary bit */
22
23#define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */
24#define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */
25#define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */
26#define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */
27#define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */
28#define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT)
29
30#define FPCR_MASK 0xffff800000000000L
31
32/*
33 * IEEE trap enables are implemented in software. These per-thread
34 * bits are stored in the "ieee_state" field of "struct thread_info".
35 * Thus, the bits are defined so as not to conflict with the
36 * floating-point enable bit (which is architected). On top of that,
37 * we want to make these bits compatible with OSF/1 so
38 * ieee_set_fp_control() etc. can be implemented easily and
39 * compatibly. The corresponding definitions are in
40 * /usr/include/machine/fpu.h under OSF/1.
41 */
42#define IEEE_TRAP_ENABLE_INV (1UL<<1) /* invalid op */
43#define IEEE_TRAP_ENABLE_DZE (1UL<<2) /* division by zero */
44#define IEEE_TRAP_ENABLE_OVF (1UL<<3) /* overflow */
45#define IEEE_TRAP_ENABLE_UNF (1UL<<4) /* underflow */
46#define IEEE_TRAP_ENABLE_INE (1UL<<5) /* inexact */
47#define IEEE_TRAP_ENABLE_DNO (1UL<<6) /* denorm */
48#define IEEE_TRAP_ENABLE_MASK (IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE |\
49 IEEE_TRAP_ENABLE_OVF | IEEE_TRAP_ENABLE_UNF |\
50 IEEE_TRAP_ENABLE_INE | IEEE_TRAP_ENABLE_DNO)
51
52/* Denorm and Underflow flushing */
53#define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */
54#define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */
55
56#define IEEE_MAP_MASK (IEEE_MAP_DMZ | IEEE_MAP_UMZ)
57
58/* status bits coming from fpcr: */
59#define IEEE_STATUS_INV (1UL<<17)
60#define IEEE_STATUS_DZE (1UL<<18)
61#define IEEE_STATUS_OVF (1UL<<19)
62#define IEEE_STATUS_UNF (1UL<<20)
63#define IEEE_STATUS_INE (1UL<<21)
64#define IEEE_STATUS_DNO (1UL<<22)
65
66#define IEEE_STATUS_MASK (IEEE_STATUS_INV | IEEE_STATUS_DZE | \
67 IEEE_STATUS_OVF | IEEE_STATUS_UNF | \
68 IEEE_STATUS_INE | IEEE_STATUS_DNO)
69
70#define IEEE_SW_MASK (IEEE_TRAP_ENABLE_MASK | \
71 IEEE_STATUS_MASK | IEEE_MAP_MASK)
72
73#define IEEE_CURRENT_RM_SHIFT 32
74#define IEEE_CURRENT_RM_MASK (3UL<<IEEE_CURRENT_RM_SHIFT)
75
76#define IEEE_STATUS_TO_EXCSUM_SHIFT 16
77
78#define IEEE_INHERIT (1UL<<63) /* inherit on thread create? */
79
80/*
81 * Convert the software IEEE trap enable and status bits into the
82 * hardware fpcr format.
83 *
84 * Digital Unix engineers receive my thanks for not defining the
85 * software bits identical to the hardware bits. The chip designers
86 * receive my thanks for making all the not-implemented fpcr bits
87 * RAZ forcing us to use system calls to read/write this value.
88 */
89
90static inline unsigned long
91ieee_swcr_to_fpcr(unsigned long sw)
92{
93 unsigned long fp;
94 fp = (sw & IEEE_STATUS_MASK) << 35;
95 fp |= (sw & IEEE_MAP_DMZ) << 36;
96 fp |= (sw & IEEE_STATUS_MASK ? FPCR_SUM : 0);
97 fp |= (~sw & (IEEE_TRAP_ENABLE_INV
98 | IEEE_TRAP_ENABLE_DZE
99 | IEEE_TRAP_ENABLE_OVF)) << 48;
100 fp |= (~sw & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE)) << 57;
101 fp |= (sw & IEEE_MAP_UMZ ? FPCR_UNDZ | FPCR_UNFD : 0);
102 fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41;
103 return fp;
104}
105
106static inline unsigned long
107ieee_fpcr_to_swcr(unsigned long fp)
108{
109 unsigned long sw;
110 sw = (fp >> 35) & IEEE_STATUS_MASK;
111 sw |= (fp >> 36) & IEEE_MAP_DMZ;
112 sw |= (~fp >> 48) & (IEEE_TRAP_ENABLE_INV
113 | IEEE_TRAP_ENABLE_DZE
114 | IEEE_TRAP_ENABLE_OVF);
115 sw |= (~fp >> 57) & (IEEE_TRAP_ENABLE_UNF | IEEE_TRAP_ENABLE_INE);
116 sw |= (fp >> 47) & IEEE_MAP_UMZ;
117 sw |= (~fp >> 41) & IEEE_TRAP_ENABLE_DNO;
118 return sw;
119}
120
121#ifdef __KERNEL__
122
123/* The following two functions don't need trapb/excb instructions
124 around the mf_fpcr/mt_fpcr instructions because (a) the kernel
125 never generates arithmetic faults and (b) call_pal instructions
126 are implied trap barriers. */
127
128static inline unsigned long
129rdfpcr(void)
130{
131 unsigned long tmp, ret;
132
133#if defined(CONFIG_ALPHA_EV6) || defined(CONFIG_ALPHA_EV67)
134 __asm__ __volatile__ (
135 "ftoit $f0,%0\n\t"
136 "mf_fpcr $f0\n\t"
137 "ftoit $f0,%1\n\t"
138 "itoft %0,$f0"
139 : "=r"(tmp), "=r"(ret));
140#else
141 __asm__ __volatile__ (
142 "stt $f0,%0\n\t"
143 "mf_fpcr $f0\n\t"
144 "stt $f0,%1\n\t"
145 "ldt $f0,%0"
146 : "=m"(tmp), "=m"(ret));
147#endif
148
149 return ret;
150}
151
152static inline void
153wrfpcr(unsigned long val)
154{
155 unsigned long tmp;
156
157#if defined(CONFIG_ALPHA_EV6) || defined(CONFIG_ALPHA_EV67)
158 __asm__ __volatile__ (
159 "ftoit $f0,%0\n\t"
160 "itoft %1,$f0\n\t"
161 "mt_fpcr $f0\n\t"
162 "itoft %0,$f0"
163 : "=&r"(tmp) : "r"(val));
164#else
165 __asm__ __volatile__ (
166 "stt $f0,%0\n\t"
167 "ldt $f0,%1\n\t"
168 "mt_fpcr $f0\n\t"
169 "ldt $f0,%0"
170 : "=m"(tmp) : "m"(val));
171#endif
172}
173
174static inline unsigned long
175swcr_update_status(unsigned long swcr, unsigned long fpcr)
176{
177 /* EV6 implements most of the bits in hardware. Collect
178 the acrued exception bits from the real fpcr. */
179 if (implver() == IMPLVER_EV6) {
180 swcr &= ~IEEE_STATUS_MASK;
181 swcr |= (fpcr >> 35) & IEEE_STATUS_MASK;
182 }
183 return swcr;
184}
185
186extern unsigned long alpha_read_fp_reg (unsigned long reg);
187extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
188extern unsigned long alpha_read_fp_reg_s (unsigned long reg);
189extern void alpha_write_fp_reg_s (unsigned long reg, unsigned long val);
190
191#endif /* __KERNEL__ */
192
193#endif /* __ASM_ALPHA_FPU_H */
diff --git a/include/asm-alpha/futex.h b/include/asm-alpha/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/include/asm-alpha/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/include/asm-alpha/gct.h b/include/asm-alpha/gct.h
deleted file mode 100644
index 3504c704927c..000000000000
--- a/include/asm-alpha/gct.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef __ALPHA_GCT_H
2#define __ALPHA_GCT_H
3
4typedef u64 gct_id;
5typedef u64 gct6_handle;
6
7typedef struct __gct6_node {
8 u8 type;
9 u8 subtype;
10 u16 size;
11 u32 hd_extension;
12 gct6_handle owner;
13 gct6_handle active_user;
14 gct_id id;
15 u64 flags;
16 u16 rev;
17 u16 change_counter;
18 u16 max_child;
19 u16 reserved1;
20 gct6_handle saved_owner;
21 gct6_handle affinity;
22 gct6_handle parent;
23 gct6_handle next;
24 gct6_handle prev;
25 gct6_handle child;
26 u64 fw_flags;
27 u64 os_usage;
28 u64 fru_id;
29 u32 checksum;
30 u32 magic; /* 'GLXY' */
31} gct6_node;
32
33typedef struct {
34 u8 type;
35 u8 subtype;
36 void (*callout)(gct6_node *);
37} gct6_search_struct;
38
39#define GCT_NODE_MAGIC 0x59584c47 /* 'GLXY' */
40
41/*
42 * node types
43 */
44#define GCT_TYPE_HOSE 0x0E
45
46/*
47 * node subtypes
48 */
49#define GCT_SUBTYPE_IO_PORT_MODULE 0x2C
50
51#define GCT_NODE_PTR(off) ((gct6_node *)((char *)hwrpb + \
52 hwrpb->frut_offset + \
53 (gct6_handle)(off))) \
54
55int gct6_find_nodes(gct6_node *, gct6_search_struct *);
56
57#endif /* __ALPHA_GCT_H */
58
diff --git a/include/asm-alpha/gentrap.h b/include/asm-alpha/gentrap.h
deleted file mode 100644
index ae50cc3192c7..000000000000
--- a/include/asm-alpha/gentrap.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef _ASMAXP_GENTRAP_H
2#define _ASMAXP_GENTRAP_H
3
4/*
5 * Definitions for gentrap causes. They are generated by user-level
6 * programs and therefore should be compatible with the corresponding
7 * OSF/1 definitions.
8 */
9#define GEN_INTOVF -1 /* integer overflow */
10#define GEN_INTDIV -2 /* integer division by zero */
11#define GEN_FLTOVF -3 /* fp overflow */
12#define GEN_FLTDIV -4 /* fp division by zero */
13#define GEN_FLTUND -5 /* fp underflow */
14#define GEN_FLTINV -6 /* invalid fp operand */
15#define GEN_FLTINE -7 /* inexact fp operand */
16#define GEN_DECOVF -8 /* decimal overflow (for COBOL??) */
17#define GEN_DECDIV -9 /* decimal division by zero */
18#define GEN_DECINV -10 /* invalid decimal operand */
19#define GEN_ROPRAND -11 /* reserved operand */
20#define GEN_ASSERTERR -12 /* assertion error */
21#define GEN_NULPTRERR -13 /* null pointer error */
22#define GEN_STKOVF -14 /* stack overflow */
23#define GEN_STRLENERR -15 /* string length error */
24#define GEN_SUBSTRERR -16 /* substring error */
25#define GEN_RANGERR -17 /* range error */
26#define GEN_SUBRNG -18
27#define GEN_SUBRNG1 -19
28#define GEN_SUBRNG2 -20
29#define GEN_SUBRNG3 -21 /* these report range errors for */
30#define GEN_SUBRNG4 -22 /* subscripting (indexing) at levels 0..7 */
31#define GEN_SUBRNG5 -23
32#define GEN_SUBRNG6 -24
33#define GEN_SUBRNG7 -25
34
35/* the remaining codes (-26..-1023) are reserved. */
36
37#endif /* _ASMAXP_GENTRAP_H */
diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h
deleted file mode 100644
index d953e234daa8..000000000000
--- a/include/asm-alpha/hardirq.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _ALPHA_HARDIRQ_H
2#define _ALPHA_HARDIRQ_H
3
4#include <linux/threads.h>
5#include <linux/cache.h>
6
7
8/* entry.S is sensitive to the offsets of these fields */
9typedef struct {
10 unsigned long __softirq_pending;
11} ____cacheline_aligned irq_cpustat_t;
12
13#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
14
15void ack_bad_irq(unsigned int irq);
16
17#define HARDIRQ_BITS 12
18
19/*
20 * The hardirq mask has to be large enough to have
21 * space for potentially nestable IRQ sources in the system
22 * to nest on a single CPU. On Alpha, interrupts are masked at the CPU
23 * by IPL as well as at the system level. We only have 8 IPLs (UNIX PALcode)
24 * so we really only have 8 nestable IRQs, but allow some overhead
25 */
26#if (1 << HARDIRQ_BITS) < 16
27#error HARDIRQ_BITS is too low!
28#endif
29
30#endif /* _ALPHA_HARDIRQ_H */
diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h
deleted file mode 100644
index a37db0f95092..000000000000
--- a/include/asm-alpha/hw_irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ALPHA_HW_IRQ_H
2#define _ALPHA_HW_IRQ_H
3
4
5extern volatile unsigned long irq_err_count;
6
7#ifdef CONFIG_ALPHA_GENERIC
8#define ACTUAL_NR_IRQS alpha_mv.nr_irqs
9#else
10#define ACTUAL_NR_IRQS NR_IRQS
11#endif
12
13#endif
diff --git a/include/asm-alpha/hwrpb.h b/include/asm-alpha/hwrpb.h
deleted file mode 100644
index 8e8f871af7cf..000000000000
--- a/include/asm-alpha/hwrpb.h
+++ /dev/null
@@ -1,220 +0,0 @@
1#ifndef __ALPHA_HWRPB_H
2#define __ALPHA_HWRPB_H
3
4#define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
5
6/*
7 * DEC processor types for Alpha systems. Found in HWRPB.
8 * These values are architected.
9 */
10
11#define EV3_CPU 1 /* EV3 */
12#define EV4_CPU 2 /* EV4 (21064) */
13#define LCA4_CPU 4 /* LCA4 (21066/21068) */
14#define EV5_CPU 5 /* EV5 (21164) */
15#define EV45_CPU 6 /* EV4.5 (21064/xxx) */
16#define EV56_CPU 7 /* EV5.6 (21164) */
17#define EV6_CPU 8 /* EV6 (21264) */
18#define PCA56_CPU 9 /* PCA56 (21164PC) */
19#define PCA57_CPU 10 /* PCA57 (notyet) */
20#define EV67_CPU 11 /* EV67 (21264A) */
21#define EV68CB_CPU 12 /* EV68CB (21264C) */
22#define EV68AL_CPU 13 /* EV68AL (21264B) */
23#define EV68CX_CPU 14 /* EV68CX (21264D) */
24#define EV7_CPU 15 /* EV7 (21364) */
25#define EV79_CPU 16 /* EV79 (21364??) */
26#define EV69_CPU 17 /* EV69 (21264/EV69A) */
27
28/*
29 * DEC system types for Alpha systems. Found in HWRPB.
30 * These values are architected.
31 */
32
33#define ST_ADU 1 /* Alpha ADU systype */
34#define ST_DEC_4000 2 /* Cobra systype */
35#define ST_DEC_7000 3 /* Ruby systype */
36#define ST_DEC_3000_500 4 /* Flamingo systype */
37#define ST_DEC_2000_300 6 /* Jensen systype */
38#define ST_DEC_3000_300 7 /* Pelican systype */
39#define ST_DEC_2100_A500 9 /* Sable systype */
40#define ST_DEC_AXPVME_64 10 /* AXPvme system type */
41#define ST_DEC_AXPPCI_33 11 /* NoName system type */
42#define ST_DEC_TLASER 12 /* Turbolaser systype */
43#define ST_DEC_2100_A50 13 /* Avanti systype */
44#define ST_DEC_MUSTANG 14 /* Mustang systype */
45#define ST_DEC_ALCOR 15 /* Alcor (EV5) systype */
46#define ST_DEC_1000 17 /* Mikasa systype */
47#define ST_DEC_EB64 18 /* EB64 systype */
48#define ST_DEC_EB66 19 /* EB66 systype */
49#define ST_DEC_EB64P 20 /* EB64+ systype */
50#define ST_DEC_BURNS 21 /* laptop systype */
51#define ST_DEC_RAWHIDE 22 /* Rawhide systype */
52#define ST_DEC_K2 23 /* K2 systype */
53#define ST_DEC_LYNX 24 /* Lynx systype */
54#define ST_DEC_XL 25 /* Alpha XL systype */
55#define ST_DEC_EB164 26 /* EB164 systype */
56#define ST_DEC_NORITAKE 27 /* Noritake systype */
57#define ST_DEC_CORTEX 28 /* Cortex systype */
58#define ST_DEC_MIATA 30 /* Miata systype */
59#define ST_DEC_XXM 31 /* XXM systype */
60#define ST_DEC_TAKARA 32 /* Takara systype */
61#define ST_DEC_YUKON 33 /* Yukon systype */
62#define ST_DEC_TSUNAMI 34 /* Tsunami systype */
63#define ST_DEC_WILDFIRE 35 /* Wildfire systype */
64#define ST_DEC_CUSCO 36 /* CUSCO systype */
65#define ST_DEC_EIGER 37 /* Eiger systype */
66#define ST_DEC_TITAN 38 /* Titan systype */
67#define ST_DEC_MARVEL 39 /* Marvel systype */
68
69/* UNOFFICIAL!!! */
70#define ST_UNOFFICIAL_BIAS 100
71#define ST_DTI_RUFFIAN 101 /* RUFFIAN systype */
72
73/* Alpha Processor, Inc. systems */
74#define ST_API_BIAS 200
75#define ST_API_NAUTILUS 201 /* UP1000 systype */
76
77struct pcb_struct {
78 unsigned long ksp;
79 unsigned long usp;
80 unsigned long ptbr;
81 unsigned int pcc;
82 unsigned int asn;
83 unsigned long unique;
84 unsigned long flags;
85 unsigned long res1, res2;
86};
87
88struct percpu_struct {
89 unsigned long hwpcb[16];
90 unsigned long flags;
91 unsigned long pal_mem_size;
92 unsigned long pal_scratch_size;
93 unsigned long pal_mem_pa;
94 unsigned long pal_scratch_pa;
95 unsigned long pal_revision;
96 unsigned long type;
97 unsigned long variation;
98 unsigned long revision;
99 unsigned long serial_no[2];
100 unsigned long logout_area_pa;
101 unsigned long logout_area_len;
102 unsigned long halt_PCBB;
103 unsigned long halt_PC;
104 unsigned long halt_PS;
105 unsigned long halt_arg;
106 unsigned long halt_ra;
107 unsigned long halt_pv;
108 unsigned long halt_reason;
109 unsigned long res;
110 unsigned long ipc_buffer[21];
111 unsigned long palcode_avail[16];
112 unsigned long compatibility;
113 unsigned long console_data_log_pa;
114 unsigned long console_data_log_length;
115 unsigned long bcache_info;
116};
117
118struct procdesc_struct {
119 unsigned long weird_vms_stuff;
120 unsigned long address;
121};
122
123struct vf_map_struct {
124 unsigned long va;
125 unsigned long pa;
126 unsigned long count;
127};
128
129struct crb_struct {
130 struct procdesc_struct * dispatch_va;
131 struct procdesc_struct * dispatch_pa;
132 struct procdesc_struct * fixup_va;
133 struct procdesc_struct * fixup_pa;
134 /* virtual->physical map */
135 unsigned long map_entries;
136 unsigned long map_pages;
137 struct vf_map_struct map[1];
138};
139
140struct memclust_struct {
141 unsigned long start_pfn;
142 unsigned long numpages;
143 unsigned long numtested;
144 unsigned long bitmap_va;
145 unsigned long bitmap_pa;
146 unsigned long bitmap_chksum;
147 unsigned long usage;
148};
149
150struct memdesc_struct {
151 unsigned long chksum;
152 unsigned long optional_pa;
153 unsigned long numclusters;
154 struct memclust_struct cluster[0];
155};
156
157struct dsr_struct {
158 long smm; /* SMM nubber used by LMF */
159 unsigned long lurt_off; /* offset to LURT table */
160 unsigned long sysname_off; /* offset to sysname char count */
161};
162
163struct hwrpb_struct {
164 unsigned long phys_addr; /* check: physical address of the hwrpb */
165 unsigned long id; /* check: "HWRPB\0\0\0" */
166 unsigned long revision;
167 unsigned long size; /* size of hwrpb */
168 unsigned long cpuid;
169 unsigned long pagesize; /* 8192, I hope */
170 unsigned long pa_bits; /* number of physical address bits */
171 unsigned long max_asn;
172 unsigned char ssn[16]; /* system serial number: big bother is watching */
173 unsigned long sys_type;
174 unsigned long sys_variation;
175 unsigned long sys_revision;
176 unsigned long intr_freq; /* interval clock frequency * 4096 */
177 unsigned long cycle_freq; /* cycle counter frequency */
178 unsigned long vptb; /* Virtual Page Table Base address */
179 unsigned long res1;
180 unsigned long tbhb_offset; /* Translation Buffer Hint Block */
181 unsigned long nr_processors;
182 unsigned long processor_size;
183 unsigned long processor_offset;
184 unsigned long ctb_nr;
185 unsigned long ctb_size; /* console terminal block size */
186 unsigned long ctbt_offset; /* console terminal block table offset */
187 unsigned long crb_offset; /* console callback routine block */
188 unsigned long mddt_offset; /* memory data descriptor table */
189 unsigned long cdb_offset; /* configuration data block (or NULL) */
190 unsigned long frut_offset; /* FRU table (or NULL) */
191 void (*save_terminal)(unsigned long);
192 unsigned long save_terminal_data;
193 void (*restore_terminal)(unsigned long);
194 unsigned long restore_terminal_data;
195 void (*CPU_restart)(unsigned long);
196 unsigned long CPU_restart_data;
197 unsigned long res2;
198 unsigned long res3;
199 unsigned long chksum;
200 unsigned long rxrdy;
201 unsigned long txrdy;
202 unsigned long dsr_offset; /* "Dynamic System Recognition Data Block Table" */
203};
204
205#ifdef __KERNEL__
206
207extern struct hwrpb_struct *hwrpb;
208
209static inline void
210hwrpb_update_checksum(struct hwrpb_struct *h)
211{
212 unsigned long sum = 0, *l;
213 for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
214 sum += *l;
215 h->chksum = sum;
216}
217
218#endif /* __KERNEL__ */
219
220#endif /* __ALPHA_HWRPB_H */
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h
deleted file mode 100644
index e971ab000f95..000000000000
--- a/include/asm-alpha/io.h
+++ /dev/null
@@ -1,577 +0,0 @@
1#ifndef __ALPHA_IO_H
2#define __ALPHA_IO_H
3
4#ifdef __KERNEL__
5
6#include <linux/kernel.h>
7#include <linux/mm.h>
8#include <asm/compiler.h>
9#include <asm/system.h>
10#include <asm/pgtable.h>
11#include <asm/machvec.h>
12#include <asm/hwrpb.h>
13
14/* The generic header contains only prototypes. Including it ensures that
15 the implementation we have here matches that interface. */
16#include <asm-generic/iomap.h>
17
18/* We don't use IO slowdowns on the Alpha, but.. */
19#define __SLOW_DOWN_IO do { } while (0)
20#define SLOW_DOWN_IO do { } while (0)
21
22/*
23 * Virtual -> physical identity mapping starts at this offset
24 */
25#ifdef USE_48_BIT_KSEG
26#define IDENT_ADDR 0xffff800000000000UL
27#else
28#define IDENT_ADDR 0xfffffc0000000000UL
29#endif
30
31/*
32 * We try to avoid hae updates (thus the cache), but when we
33 * do need to update the hae, we need to do it atomically, so
34 * that any interrupts wouldn't get confused with the hae
35 * register not being up-to-date with respect to the hardware
36 * value.
37 */
38extern inline void __set_hae(unsigned long new_hae)
39{
40 unsigned long flags;
41 local_irq_save(flags);
42
43 alpha_mv.hae_cache = new_hae;
44 *alpha_mv.hae_register = new_hae;
45 mb();
46 /* Re-read to make sure it was written. */
47 new_hae = *alpha_mv.hae_register;
48
49 local_irq_restore(flags);
50}
51
52extern inline void set_hae(unsigned long new_hae)
53{
54 if (new_hae != alpha_mv.hae_cache)
55 __set_hae(new_hae);
56}
57
58/*
59 * Change virtual addresses to physical addresses and vv.
60 */
61#ifdef USE_48_BIT_KSEG
62static inline unsigned long virt_to_phys(void *address)
63{
64 return (unsigned long)address - IDENT_ADDR;
65}
66
67static inline void * phys_to_virt(unsigned long address)
68{
69 return (void *) (address + IDENT_ADDR);
70}
71#else
72static inline unsigned long virt_to_phys(void *address)
73{
74 unsigned long phys = (unsigned long)address;
75
76 /* Sign-extend from bit 41. */
77 phys <<= (64 - 41);
78 phys = (long)phys >> (64 - 41);
79
80 /* Crop to the physical address width of the processor. */
81 phys &= (1ul << hwrpb->pa_bits) - 1;
82
83 return phys;
84}
85
86static inline void * phys_to_virt(unsigned long address)
87{
88 return (void *)(IDENT_ADDR + (address & ((1ul << 41) - 1)));
89}
90#endif
91
92#define page_to_phys(page) page_to_pa(page)
93
94static inline dma_addr_t __deprecated isa_page_to_bus(struct page *page)
95{
96 return page_to_phys(page);
97}
98
99/* This depends on working iommu. */
100#define BIO_VMERGE_BOUNDARY (alpha_mv.mv_pci_tbi ? PAGE_SIZE : 0)
101
102/* Maximum PIO space address supported? */
103#define IO_SPACE_LIMIT 0xffff
104
105/*
106 * Change addresses as seen by the kernel (virtual) to addresses as
107 * seen by a device (bus), and vice versa.
108 *
109 * Note that this only works for a limited range of kernel addresses,
110 * and very well may not span all memory. Consider this interface
111 * deprecated in favour of the DMA-mapping API.
112 */
113extern unsigned long __direct_map_base;
114extern unsigned long __direct_map_size;
115
116static inline unsigned long __deprecated virt_to_bus(void *address)
117{
118 unsigned long phys = virt_to_phys(address);
119 unsigned long bus = phys + __direct_map_base;
120 return phys <= __direct_map_size ? bus : 0;
121}
122#define isa_virt_to_bus virt_to_bus
123
124static inline void * __deprecated bus_to_virt(unsigned long address)
125{
126 void *virt;
127
128 /* This check is a sanity check but also ensures that bus address 0
129 maps to virtual address 0 which is useful to detect null pointers
130 (the NCR driver is much simpler if NULL pointers are preserved). */
131 address -= __direct_map_base;
132 virt = phys_to_virt(address);
133 return (long)address <= 0 ? NULL : virt;
134}
135#define isa_bus_to_virt bus_to_virt
136
137/*
138 * There are different chipsets to interface the Alpha CPUs to the world.
139 */
140
141#define IO_CONCAT(a,b) _IO_CONCAT(a,b)
142#define _IO_CONCAT(a,b) a ## _ ## b
143
144#ifdef CONFIG_ALPHA_GENERIC
145
146/* In a generic kernel, we always go through the machine vector. */
147
148#define REMAP1(TYPE, NAME, QUAL) \
149static inline TYPE generic_##NAME(QUAL void __iomem *addr) \
150{ \
151 return alpha_mv.mv_##NAME(addr); \
152}
153
154#define REMAP2(TYPE, NAME, QUAL) \
155static inline void generic_##NAME(TYPE b, QUAL void __iomem *addr) \
156{ \
157 alpha_mv.mv_##NAME(b, addr); \
158}
159
160REMAP1(unsigned int, ioread8, /**/)
161REMAP1(unsigned int, ioread16, /**/)
162REMAP1(unsigned int, ioread32, /**/)
163REMAP1(u8, readb, const volatile)
164REMAP1(u16, readw, const volatile)
165REMAP1(u32, readl, const volatile)
166REMAP1(u64, readq, const volatile)
167
168REMAP2(u8, iowrite8, /**/)
169REMAP2(u16, iowrite16, /**/)
170REMAP2(u32, iowrite32, /**/)
171REMAP2(u8, writeb, volatile)
172REMAP2(u16, writew, volatile)
173REMAP2(u32, writel, volatile)
174REMAP2(u64, writeq, volatile)
175
176#undef REMAP1
177#undef REMAP2
178
179extern inline void __iomem *generic_ioportmap(unsigned long a)
180{
181 return alpha_mv.mv_ioportmap(a);
182}
183
184static inline void __iomem *generic_ioremap(unsigned long a, unsigned long s)
185{
186 return alpha_mv.mv_ioremap(a, s);
187}
188
189static inline void generic_iounmap(volatile void __iomem *a)
190{
191 return alpha_mv.mv_iounmap(a);
192}
193
194static inline int generic_is_ioaddr(unsigned long a)
195{
196 return alpha_mv.mv_is_ioaddr(a);
197}
198
199static inline int generic_is_mmio(const volatile void __iomem *a)
200{
201 return alpha_mv.mv_is_mmio(a);
202}
203
204#define __IO_PREFIX generic
205#define generic_trivial_rw_bw 0
206#define generic_trivial_rw_lq 0
207#define generic_trivial_io_bw 0
208#define generic_trivial_io_lq 0
209#define generic_trivial_iounmap 0
210
211#else
212
213#if defined(CONFIG_ALPHA_APECS)
214# include <asm/core_apecs.h>
215#elif defined(CONFIG_ALPHA_CIA)
216# include <asm/core_cia.h>
217#elif defined(CONFIG_ALPHA_IRONGATE)
218# include <asm/core_irongate.h>
219#elif defined(CONFIG_ALPHA_JENSEN)
220# include <asm/jensen.h>
221#elif defined(CONFIG_ALPHA_LCA)
222# include <asm/core_lca.h>
223#elif defined(CONFIG_ALPHA_MARVEL)
224# include <asm/core_marvel.h>
225#elif defined(CONFIG_ALPHA_MCPCIA)
226# include <asm/core_mcpcia.h>
227#elif defined(CONFIG_ALPHA_POLARIS)
228# include <asm/core_polaris.h>
229#elif defined(CONFIG_ALPHA_T2)
230# include <asm/core_t2.h>
231#elif defined(CONFIG_ALPHA_TSUNAMI)
232# include <asm/core_tsunami.h>
233#elif defined(CONFIG_ALPHA_TITAN)
234# include <asm/core_titan.h>
235#elif defined(CONFIG_ALPHA_WILDFIRE)
236# include <asm/core_wildfire.h>
237#else
238#error "What system is this?"
239#endif
240
241#endif /* GENERIC */
242
243/*
244 * We always have external versions of these routines.
245 */
246extern u8 inb(unsigned long port);
247extern u16 inw(unsigned long port);
248extern u32 inl(unsigned long port);
249extern void outb(u8 b, unsigned long port);
250extern void outw(u16 b, unsigned long port);
251extern void outl(u32 b, unsigned long port);
252
253extern u8 readb(const volatile void __iomem *addr);
254extern u16 readw(const volatile void __iomem *addr);
255extern u32 readl(const volatile void __iomem *addr);
256extern u64 readq(const volatile void __iomem *addr);
257extern void writeb(u8 b, volatile void __iomem *addr);
258extern void writew(u16 b, volatile void __iomem *addr);
259extern void writel(u32 b, volatile void __iomem *addr);
260extern void writeq(u64 b, volatile void __iomem *addr);
261
262extern u8 __raw_readb(const volatile void __iomem *addr);
263extern u16 __raw_readw(const volatile void __iomem *addr);
264extern u32 __raw_readl(const volatile void __iomem *addr);
265extern u64 __raw_readq(const volatile void __iomem *addr);
266extern void __raw_writeb(u8 b, volatile void __iomem *addr);
267extern void __raw_writew(u16 b, volatile void __iomem *addr);
268extern void __raw_writel(u32 b, volatile void __iomem *addr);
269extern void __raw_writeq(u64 b, volatile void __iomem *addr);
270
271/*
272 * Mapping from port numbers to __iomem space is pretty easy.
273 */
274
275/* These two have to be extern inline because of the extern prototype from
276 <asm-generic/iomap.h>. It is not legal to mix "extern" and "static" for
277 the same declaration. */
278extern inline void __iomem *ioport_map(unsigned long port, unsigned int size)
279{
280 return IO_CONCAT(__IO_PREFIX,ioportmap) (port);
281}
282
283extern inline void ioport_unmap(void __iomem *addr)
284{
285}
286
287static inline void __iomem *ioremap(unsigned long port, unsigned long size)
288{
289 return IO_CONCAT(__IO_PREFIX,ioremap) (port, size);
290}
291
292static inline void __iomem *__ioremap(unsigned long port, unsigned long size,
293 unsigned long flags)
294{
295 return ioremap(port, size);
296}
297
298static inline void __iomem * ioremap_nocache(unsigned long offset,
299 unsigned long size)
300{
301 return ioremap(offset, size);
302}
303
304static inline void iounmap(volatile void __iomem *addr)
305{
306 IO_CONCAT(__IO_PREFIX,iounmap)(addr);
307}
308
309static inline int __is_ioaddr(unsigned long addr)
310{
311 return IO_CONCAT(__IO_PREFIX,is_ioaddr)(addr);
312}
313#define __is_ioaddr(a) __is_ioaddr((unsigned long)(a))
314
315static inline int __is_mmio(const volatile void __iomem *addr)
316{
317 return IO_CONCAT(__IO_PREFIX,is_mmio)(addr);
318}
319
320
321/*
322 * If the actual I/O bits are sufficiently trivial, then expand inline.
323 */
324
325#if IO_CONCAT(__IO_PREFIX,trivial_io_bw)
326extern inline unsigned int ioread8(void __iomem *addr)
327{
328 unsigned int ret = IO_CONCAT(__IO_PREFIX,ioread8)(addr);
329 mb();
330 return ret;
331}
332
333extern inline unsigned int ioread16(void __iomem *addr)
334{
335 unsigned int ret = IO_CONCAT(__IO_PREFIX,ioread16)(addr);
336 mb();
337 return ret;
338}
339
340extern inline void iowrite8(u8 b, void __iomem *addr)
341{
342 IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
343 mb();
344}
345
346extern inline void iowrite16(u16 b, void __iomem *addr)
347{
348 IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
349 mb();
350}
351
352extern inline u8 inb(unsigned long port)
353{
354 return ioread8(ioport_map(port, 1));
355}
356
357extern inline u16 inw(unsigned long port)
358{
359 return ioread16(ioport_map(port, 2));
360}
361
362extern inline void outb(u8 b, unsigned long port)
363{
364 iowrite8(b, ioport_map(port, 1));
365}
366
367extern inline void outw(u16 b, unsigned long port)
368{
369 iowrite16(b, ioport_map(port, 2));
370}
371#endif
372
373#if IO_CONCAT(__IO_PREFIX,trivial_io_lq)
374extern inline unsigned int ioread32(void __iomem *addr)
375{
376 unsigned int ret = IO_CONCAT(__IO_PREFIX,ioread32)(addr);
377 mb();
378 return ret;
379}
380
381extern inline void iowrite32(u32 b, void __iomem *addr)
382{
383 IO_CONCAT(__IO_PREFIX,iowrite32)(b, addr);
384 mb();
385}
386
387extern inline u32 inl(unsigned long port)
388{
389 return ioread32(ioport_map(port, 4));
390}
391
392extern inline void outl(u32 b, unsigned long port)
393{
394 iowrite32(b, ioport_map(port, 4));
395}
396#endif
397
398#if IO_CONCAT(__IO_PREFIX,trivial_rw_bw) == 1
399extern inline u8 __raw_readb(const volatile void __iomem *addr)
400{
401 return IO_CONCAT(__IO_PREFIX,readb)(addr);
402}
403
404extern inline u16 __raw_readw(const volatile void __iomem *addr)
405{
406 return IO_CONCAT(__IO_PREFIX,readw)(addr);
407}
408
409extern inline void __raw_writeb(u8 b, volatile void __iomem *addr)
410{
411 IO_CONCAT(__IO_PREFIX,writeb)(b, addr);
412}
413
414extern inline void __raw_writew(u16 b, volatile void __iomem *addr)
415{
416 IO_CONCAT(__IO_PREFIX,writew)(b, addr);
417}
418
419extern inline u8 readb(const volatile void __iomem *addr)
420{
421 u8 ret = __raw_readb(addr);
422 mb();
423 return ret;
424}
425
426extern inline u16 readw(const volatile void __iomem *addr)
427{
428 u16 ret = __raw_readw(addr);
429 mb();
430 return ret;
431}
432
433extern inline void writeb(u8 b, volatile void __iomem *addr)
434{
435 __raw_writeb(b, addr);
436 mb();
437}
438
439extern inline void writew(u16 b, volatile void __iomem *addr)
440{
441 __raw_writew(b, addr);
442 mb();
443}
444#endif
445
446#if IO_CONCAT(__IO_PREFIX,trivial_rw_lq) == 1
447extern inline u32 __raw_readl(const volatile void __iomem *addr)
448{
449 return IO_CONCAT(__IO_PREFIX,readl)(addr);
450}
451
452extern inline u64 __raw_readq(const volatile void __iomem *addr)
453{
454 return IO_CONCAT(__IO_PREFIX,readq)(addr);
455}
456
457extern inline void __raw_writel(u32 b, volatile void __iomem *addr)
458{
459 IO_CONCAT(__IO_PREFIX,writel)(b, addr);
460}
461
462extern inline void __raw_writeq(u64 b, volatile void __iomem *addr)
463{
464 IO_CONCAT(__IO_PREFIX,writeq)(b, addr);
465}
466
467extern inline u32 readl(const volatile void __iomem *addr)
468{
469 u32 ret = __raw_readl(addr);
470 mb();
471 return ret;
472}
473
474extern inline u64 readq(const volatile void __iomem *addr)
475{
476 u64 ret = __raw_readq(addr);
477 mb();
478 return ret;
479}
480
481extern inline void writel(u32 b, volatile void __iomem *addr)
482{
483 __raw_writel(b, addr);
484 mb();
485}
486
487extern inline void writeq(u64 b, volatile void __iomem *addr)
488{
489 __raw_writeq(b, addr);
490 mb();
491}
492#endif
493
494#define inb_p inb
495#define inw_p inw
496#define inl_p inl
497#define outb_p outb
498#define outw_p outw
499#define outl_p outl
500#define readb_relaxed(addr) __raw_readb(addr)
501#define readw_relaxed(addr) __raw_readw(addr)
502#define readl_relaxed(addr) __raw_readl(addr)
503#define readq_relaxed(addr) __raw_readq(addr)
504
505#define mmiowb()
506
507/*
508 * String version of IO memory access ops:
509 */
510extern void memcpy_fromio(void *, const volatile void __iomem *, long);
511extern void memcpy_toio(volatile void __iomem *, const void *, long);
512extern void _memset_c_io(volatile void __iomem *, unsigned long, long);
513
514static inline void memset_io(volatile void __iomem *addr, u8 c, long len)
515{
516 _memset_c_io(addr, 0x0101010101010101UL * c, len);
517}
518
519#define __HAVE_ARCH_MEMSETW_IO
520static inline void memsetw_io(volatile void __iomem *addr, u16 c, long len)
521{
522 _memset_c_io(addr, 0x0001000100010001UL * c, len);
523}
524
525/*
526 * String versions of in/out ops:
527 */
528extern void insb (unsigned long port, void *dst, unsigned long count);
529extern void insw (unsigned long port, void *dst, unsigned long count);
530extern void insl (unsigned long port, void *dst, unsigned long count);
531extern void outsb (unsigned long port, const void *src, unsigned long count);
532extern void outsw (unsigned long port, const void *src, unsigned long count);
533extern void outsl (unsigned long port, const void *src, unsigned long count);
534
535/*
536 * The Alpha Jensen hardware for some rather strange reason puts
537 * the RTC clock at 0x170 instead of 0x70. Probably due to some
538 * misguided idea about using 0x70 for NMI stuff.
539 *
540 * These defines will override the defaults when doing RTC queries
541 */
542
543#ifdef CONFIG_ALPHA_GENERIC
544# define RTC_PORT(x) ((x) + alpha_mv.rtc_port)
545#else
546# ifdef CONFIG_ALPHA_JENSEN
547# define RTC_PORT(x) (0x170+(x))
548# else
549# define RTC_PORT(x) (0x70 + (x))
550# endif
551#endif
552#define RTC_ALWAYS_BCD 0
553
554/*
555 * Some mucking forons use if[n]def writeq to check if platform has it.
556 * It's a bloody bad idea and we probably want ARCH_HAS_WRITEQ for them
557 * to play with; for now just use cpp anti-recursion logics and make sure
558 * that damn thing is defined and expands to itself.
559 */
560
561#define writeq writeq
562#define readq readq
563
564/*
565 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
566 * access
567 */
568#define xlate_dev_mem_ptr(p) __va(p)
569
570/*
571 * Convert a virtual cached pointer to an uncached pointer
572 */
573#define xlate_dev_kmem_ptr(p) p
574
575#endif /* __KERNEL__ */
576
577#endif /* __ALPHA_IO_H */
diff --git a/include/asm-alpha/io_trivial.h b/include/asm-alpha/io_trivial.h
deleted file mode 100644
index 1c77f10b4b36..000000000000
--- a/include/asm-alpha/io_trivial.h
+++ /dev/null
@@ -1,131 +0,0 @@
1/* Trivial implementations of basic i/o routines. Assumes that all
2 of the hard work has been done by ioremap and ioportmap, and that
3 access to i/o space is linear. */
4
5/* This file may be included multiple times. */
6
7#if IO_CONCAT(__IO_PREFIX,trivial_io_bw)
8__EXTERN_INLINE unsigned int
9IO_CONCAT(__IO_PREFIX,ioread8)(void __iomem *a)
10{
11 return __kernel_ldbu(*(volatile u8 __force *)a);
12}
13
14__EXTERN_INLINE unsigned int
15IO_CONCAT(__IO_PREFIX,ioread16)(void __iomem *a)
16{
17 return __kernel_ldwu(*(volatile u16 __force *)a);
18}
19
20__EXTERN_INLINE void
21IO_CONCAT(__IO_PREFIX,iowrite8)(u8 b, void __iomem *a)
22{
23 __kernel_stb(b, *(volatile u8 __force *)a);
24}
25
26__EXTERN_INLINE void
27IO_CONCAT(__IO_PREFIX,iowrite16)(u16 b, void __iomem *a)
28{
29 __kernel_stw(b, *(volatile u16 __force *)a);
30}
31#endif
32
33#if IO_CONCAT(__IO_PREFIX,trivial_io_lq)
34__EXTERN_INLINE unsigned int
35IO_CONCAT(__IO_PREFIX,ioread32)(void __iomem *a)
36{
37 return *(volatile u32 __force *)a;
38}
39
40__EXTERN_INLINE void
41IO_CONCAT(__IO_PREFIX,iowrite32)(u32 b, void __iomem *a)
42{
43 *(volatile u32 __force *)a = b;
44}
45#endif
46
47#if IO_CONCAT(__IO_PREFIX,trivial_rw_bw) == 1
48__EXTERN_INLINE u8
49IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a)
50{
51 return __kernel_ldbu(*(const volatile u8 __force *)a);
52}
53
54__EXTERN_INLINE u16
55IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a)
56{
57 return __kernel_ldwu(*(const volatile u16 __force *)a);
58}
59
60__EXTERN_INLINE void
61IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a)
62{
63 __kernel_stb(b, *(volatile u8 __force *)a);
64}
65
66__EXTERN_INLINE void
67IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
68{
69 __kernel_stw(b, *(volatile u16 __force *)a);
70}
71#elif IO_CONCAT(__IO_PREFIX,trivial_rw_bw) == 2
72__EXTERN_INLINE u8
73IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a)
74{
75 void __iomem *addr = (void __iomem *)a;
76 return IO_CONCAT(__IO_PREFIX,ioread8)(addr);
77}
78
79__EXTERN_INLINE u16
80IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a)
81{
82 void __iomem *addr = (void __iomem *)a;
83 return IO_CONCAT(__IO_PREFIX,ioread16)(addr);
84}
85
86__EXTERN_INLINE void
87IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a)
88{
89 void __iomem *addr = (void __iomem *)a;
90 IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
91}
92
93__EXTERN_INLINE void
94IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
95{
96 void __iomem *addr = (void __iomem *)a;
97 IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
98}
99#endif
100
101#if IO_CONCAT(__IO_PREFIX,trivial_rw_lq) == 1
102__EXTERN_INLINE u32
103IO_CONCAT(__IO_PREFIX,readl)(const volatile void __iomem *a)
104{
105 return *(const volatile u32 __force *)a;
106}
107
108__EXTERN_INLINE u64
109IO_CONCAT(__IO_PREFIX,readq)(const volatile void __iomem *a)
110{
111 return *(const volatile u64 __force *)a;
112}
113
114__EXTERN_INLINE void
115IO_CONCAT(__IO_PREFIX,writel)(u32 b, volatile void __iomem *a)
116{
117 *(volatile u32 __force *)a = b;
118}
119
120__EXTERN_INLINE void
121IO_CONCAT(__IO_PREFIX,writeq)(u64 b, volatile void __iomem *a)
122{
123 *(volatile u64 __force *)a = b;
124}
125#endif
126
127#if IO_CONCAT(__IO_PREFIX,trivial_iounmap)
128__EXTERN_INLINE void IO_CONCAT(__IO_PREFIX,iounmap)(volatile void __iomem *a)
129{
130}
131#endif
diff --git a/include/asm-alpha/ioctl.h b/include/asm-alpha/ioctl.h
deleted file mode 100644
index fc63727f4178..000000000000
--- a/include/asm-alpha/ioctl.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#ifndef _ALPHA_IOCTL_H
2#define _ALPHA_IOCTL_H
3
4/*
5 * The original linux ioctl numbering scheme was just a general
6 * "anything goes" setup, where more or less random numbers were
7 * assigned. Sorry, I was clueless when I started out on this.
8 *
9 * On the alpha, we'll try to clean it up a bit, using a more sane
10 * ioctl numbering, and also trying to be compatible with OSF/1 in
11 * the process. I'd like to clean it up for the i386 as well, but
12 * it's so painful recognizing both the new and the old numbers..
13 */
14
15#define _IOC_NRBITS 8
16#define _IOC_TYPEBITS 8
17#define _IOC_SIZEBITS 13
18#define _IOC_DIRBITS 3
19
20#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
21#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
22#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
23#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
24
25#define _IOC_NRSHIFT 0
26#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
27#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
28#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
29
30/*
31 * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit.
32 * And this turns out useful to catch old ioctl numbers in header
33 * files for us.
34 */
35#define _IOC_NONE 1U
36#define _IOC_READ 2U
37#define _IOC_WRITE 4U
38
39#define _IOC(dir,type,nr,size) \
40 ((unsigned int) \
41 (((dir) << _IOC_DIRSHIFT) | \
42 ((type) << _IOC_TYPESHIFT) | \
43 ((nr) << _IOC_NRSHIFT) | \
44 ((size) << _IOC_SIZESHIFT)))
45
46/* used to create numbers */
47#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
48#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
49#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
50#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
51
52/* used to decode them.. */
53#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
54#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
55#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
56#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
57
58/* ...and for the drivers/sound files... */
59
60#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
61#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
62#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
63#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
64#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
65
66#endif /* _ALPHA_IOCTL_H */
diff --git a/include/asm-alpha/ioctls.h b/include/asm-alpha/ioctls.h
deleted file mode 100644
index 67bb9f6fdbe4..000000000000
--- a/include/asm-alpha/ioctls.h
+++ /dev/null
@@ -1,112 +0,0 @@
1#ifndef _ASM_ALPHA_IOCTLS_H
2#define _ASM_ALPHA_IOCTLS_H
3
4#include <asm/ioctl.h>
5
6#define FIOCLEX _IO('f', 1)
7#define FIONCLEX _IO('f', 2)
8#define FIOASYNC _IOW('f', 125, int)
9#define FIONBIO _IOW('f', 126, int)
10#define FIONREAD _IOR('f', 127, int)
11#define TIOCINQ FIONREAD
12#define FIOQSIZE _IOR('f', 128, loff_t)
13
14#define TIOCGETP _IOR('t', 8, struct sgttyb)
15#define TIOCSETP _IOW('t', 9, struct sgttyb)
16#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
17
18#define TIOCSETC _IOW('t', 17, struct tchars)
19#define TIOCGETC _IOR('t', 18, struct tchars)
20#define TCGETS _IOR('t', 19, struct termios)
21#define TCSETS _IOW('t', 20, struct termios)
22#define TCSETSW _IOW('t', 21, struct termios)
23#define TCSETSF _IOW('t', 22, struct termios)
24
25#define TCGETA _IOR('t', 23, struct termio)
26#define TCSETA _IOW('t', 24, struct termio)
27#define TCSETAW _IOW('t', 25, struct termio)
28#define TCSETAF _IOW('t', 28, struct termio)
29
30#define TCSBRK _IO('t', 29)
31#define TCXONC _IO('t', 30)
32#define TCFLSH _IO('t', 31)
33
34#define TIOCSWINSZ _IOW('t', 103, struct winsize)
35#define TIOCGWINSZ _IOR('t', 104, struct winsize)
36#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
37#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
38#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
39
40#define TIOCGLTC _IOR('t', 116, struct ltchars)
41#define TIOCSLTC _IOW('t', 117, struct ltchars)
42#define TIOCSPGRP _IOW('t', 118, int)
43#define TIOCGPGRP _IOR('t', 119, int)
44
45#define TIOCEXCL 0x540C
46#define TIOCNXCL 0x540D
47#define TIOCSCTTY 0x540E
48
49#define TIOCSTI 0x5412
50#define TIOCMGET 0x5415
51#define TIOCMBIS 0x5416
52#define TIOCMBIC 0x5417
53#define TIOCMSET 0x5418
54# define TIOCM_LE 0x001
55# define TIOCM_DTR 0x002
56# define TIOCM_RTS 0x004
57# define TIOCM_ST 0x008
58# define TIOCM_SR 0x010
59# define TIOCM_CTS 0x020
60# define TIOCM_CAR 0x040
61# define TIOCM_RNG 0x080
62# define TIOCM_DSR 0x100
63# define TIOCM_CD TIOCM_CAR
64# define TIOCM_RI TIOCM_RNG
65# define TIOCM_OUT1 0x2000
66# define TIOCM_OUT2 0x4000
67# define TIOCM_LOOP 0x8000
68
69#define TIOCGSOFTCAR 0x5419
70#define TIOCSSOFTCAR 0x541A
71#define TIOCLINUX 0x541C
72#define TIOCCONS 0x541D
73#define TIOCGSERIAL 0x541E
74#define TIOCSSERIAL 0x541F
75#define TIOCPKT 0x5420
76# define TIOCPKT_DATA 0
77# define TIOCPKT_FLUSHREAD 1
78# define TIOCPKT_FLUSHWRITE 2
79# define TIOCPKT_STOP 4
80# define TIOCPKT_START 8
81# define TIOCPKT_NOSTOP 16
82# define TIOCPKT_DOSTOP 32
83
84
85#define TIOCNOTTY 0x5422
86#define TIOCSETD 0x5423
87#define TIOCGETD 0x5424
88#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
89#define TIOCSBRK 0x5427 /* BSD compatibility */
90#define TIOCCBRK 0x5428 /* BSD compatibility */
91#define TIOCGSID 0x5429 /* Return the session ID of FD */
92#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
93#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
94
95#define TIOCSERCONFIG 0x5453
96#define TIOCSERGWILD 0x5454
97#define TIOCSERSWILD 0x5455
98#define TIOCGLCKTRMIOS 0x5456
99#define TIOCSLCKTRMIOS 0x5457
100#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
101#define TIOCSERGETLSR 0x5459 /* Get line status register */
102 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
103# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
104#define TIOCSERGETMULTI 0x545A /* Get multiport config */
105#define TIOCSERSETMULTI 0x545B /* Set multiport config */
106
107#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
108#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
109#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
110#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
111
112#endif /* _ASM_ALPHA_IOCTLS_H */
diff --git a/include/asm-alpha/ipcbuf.h b/include/asm-alpha/ipcbuf.h
deleted file mode 100644
index d9c0e1a50702..000000000000
--- a/include/asm-alpha/ipcbuf.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef _ALPHA_IPCBUF_H
2#define _ALPHA_IPCBUF_H
3
4/*
5 * The ipc64_perm structure for alpha architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit seq
11 * - 2 miscellaneous 64-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid_t uid;
18 __kernel_gid_t gid;
19 __kernel_uid_t cuid;
20 __kernel_gid_t cgid;
21 __kernel_mode_t mode;
22 unsigned short seq;
23 unsigned short __pad1;
24 unsigned long __unused1;
25 unsigned long __unused2;
26};
27
28#endif /* _ALPHA_IPCBUF_H */
diff --git a/include/asm-alpha/irq.h b/include/asm-alpha/irq.h
deleted file mode 100644
index 06377400dc09..000000000000
--- a/include/asm-alpha/irq.h
+++ /dev/null
@@ -1,91 +0,0 @@
1#ifndef _ALPHA_IRQ_H
2#define _ALPHA_IRQ_H
3
4/*
5 * linux/include/alpha/irq.h
6 *
7 * (C) 1994 Linus Torvalds
8 */
9
10#include <linux/linkage.h>
11
12#if defined(CONFIG_ALPHA_GENERIC)
13
14/* Here NR_IRQS is not exact, but rather an upper bound. This is used
15 many places throughout the kernel to size static arrays. That's ok,
16 we'll use alpha_mv.nr_irqs when we want the real thing. */
17
18/* When LEGACY_START_ADDRESS is selected, we leave out:
19 TITAN
20 WILDFIRE
21 MARVEL
22
23 This helps keep the kernel object size reasonable for the majority
24 of machines.
25*/
26
27# if defined(CONFIG_ALPHA_LEGACY_START_ADDRESS)
28# define NR_IRQS (128) /* max is RAWHIDE/TAKARA */
29# else
30# define NR_IRQS (32768 + 16) /* marvel - 32 pids */
31# endif
32
33#elif defined(CONFIG_ALPHA_CABRIOLET) || \
34 defined(CONFIG_ALPHA_EB66P) || \
35 defined(CONFIG_ALPHA_EB164) || \
36 defined(CONFIG_ALPHA_PC164) || \
37 defined(CONFIG_ALPHA_LX164)
38# define NR_IRQS 35
39
40#elif defined(CONFIG_ALPHA_EB66) || \
41 defined(CONFIG_ALPHA_EB64P) || \
42 defined(CONFIG_ALPHA_MIKASA)
43# define NR_IRQS 32
44
45#elif defined(CONFIG_ALPHA_ALCOR) || \
46 defined(CONFIG_ALPHA_MIATA) || \
47 defined(CONFIG_ALPHA_RUFFIAN) || \
48 defined(CONFIG_ALPHA_RX164) || \
49 defined(CONFIG_ALPHA_NORITAKE)
50# define NR_IRQS 48
51
52#elif defined(CONFIG_ALPHA_SABLE) || \
53 defined(CONFIG_ALPHA_SX164)
54# define NR_IRQS 40
55
56#elif defined(CONFIG_ALPHA_DP264) || \
57 defined(CONFIG_ALPHA_LYNX) || \
58 defined(CONFIG_ALPHA_SHARK) || \
59 defined(CONFIG_ALPHA_EIGER)
60# define NR_IRQS 64
61
62#elif defined(CONFIG_ALPHA_TITAN)
63#define NR_IRQS 80
64
65#elif defined(CONFIG_ALPHA_RAWHIDE) || \
66 defined(CONFIG_ALPHA_TAKARA)
67# define NR_IRQS 128
68
69#elif defined(CONFIG_ALPHA_WILDFIRE)
70# define NR_IRQS 2048 /* enuff for 8 QBBs */
71
72#elif defined(CONFIG_ALPHA_MARVEL)
73# define NR_IRQS (32768 + 16) /* marvel - 32 pids*/
74
75#else /* everyone else */
76# define NR_IRQS 16
77#endif
78
79static __inline__ int irq_canonicalize(int irq)
80{
81 /*
82 * XXX is this true for all Alpha's? The old serial driver
83 * did it this way for years without any complaints, so....
84 */
85 return ((irq == 2) ? 9 : irq);
86}
87
88struct pt_regs;
89extern void (*perf_irq)(unsigned long, struct pt_regs *);
90
91#endif /* _ALPHA_IRQ_H */
diff --git a/include/asm-alpha/irq_regs.h b/include/asm-alpha/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-alpha/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-alpha/jensen.h b/include/asm-alpha/jensen.h
deleted file mode 100644
index 964b06ead43b..000000000000
--- a/include/asm-alpha/jensen.h
+++ /dev/null
@@ -1,346 +0,0 @@
1#ifndef __ALPHA_JENSEN_H
2#define __ALPHA_JENSEN_H
3
4#include <asm/compiler.h>
5
6/*
7 * Defines for the AlphaPC EISA IO and memory address space.
8 */
9
10/*
11 * NOTE! The memory operations do not set any memory barriers, as it's
12 * not needed for cases like a frame buffer that is essentially memory-like.
13 * You need to do them by hand if the operations depend on ordering.
14 *
15 * Similarly, the port IO operations do a "mb" only after a write operation:
16 * if an mb is needed before (as in the case of doing memory mapped IO
17 * first, and then a port IO operation to the same device), it needs to be
18 * done by hand.
19 *
20 * After the above has bitten me 100 times, I'll give up and just do the
21 * mb all the time, but right now I'm hoping this will work out. Avoiding
22 * mb's may potentially be a noticeable speed improvement, but I can't
23 * honestly say I've tested it.
24 *
25 * Handling interrupts that need to do mb's to synchronize to non-interrupts
26 * is another fun race area. Don't do it (because if you do, I'll have to
27 * do *everything* with interrupts disabled, ugh).
28 */
29
30/*
31 * EISA Interrupt Acknowledge address
32 */
33#define EISA_INTA (IDENT_ADDR + 0x100000000UL)
34
35/*
36 * FEPROM addresses
37 */
38#define EISA_FEPROM0 (IDENT_ADDR + 0x180000000UL)
39#define EISA_FEPROM1 (IDENT_ADDR + 0x1A0000000UL)
40
41/*
42 * VL82C106 base address
43 */
44#define EISA_VL82C106 (IDENT_ADDR + 0x1C0000000UL)
45
46/*
47 * EISA "Host Address Extension" address (bits 25-31 of the EISA address)
48 */
49#define EISA_HAE (IDENT_ADDR + 0x1D0000000UL)
50
51/*
52 * "SYSCTL" register address
53 */
54#define EISA_SYSCTL (IDENT_ADDR + 0x1E0000000UL)
55
56/*
57 * "spare" register address
58 */
59#define EISA_SPARE (IDENT_ADDR + 0x1F0000000UL)
60
61/*
62 * EISA memory address offset
63 */
64#define EISA_MEM (IDENT_ADDR + 0x200000000UL)
65
66/*
67 * EISA IO address offset
68 */
69#define EISA_IO (IDENT_ADDR + 0x300000000UL)
70
71
72#ifdef __KERNEL__
73
74#ifndef __EXTERN_INLINE
75#define __EXTERN_INLINE extern inline
76#define __IO_EXTERN_INLINE
77#endif
78
79/*
80 * Handle the "host address register". This needs to be set
81 * to the high 7 bits of the EISA address. This is also needed
82 * for EISA IO addresses, which are only 16 bits wide (the
83 * hae needs to be set to 0).
84 *
85 * HAE isn't needed for the local IO operations, though.
86 */
87
88#define JENSEN_HAE_ADDRESS EISA_HAE
89#define JENSEN_HAE_MASK 0x1ffffff
90
91__EXTERN_INLINE void jensen_set_hae(unsigned long addr)
92{
93 /* hae on the Jensen is bits 31:25 shifted right */
94 addr >>= 25;
95 if (addr != alpha_mv.hae_cache)
96 set_hae(addr);
97}
98
99#define vuip volatile unsigned int *
100
101/*
102 * IO functions
103 *
104 * The "local" functions are those that don't go out to the EISA bus,
105 * but instead act on the VL82C106 chip directly.. This is mainly the
106 * keyboard, RTC, printer and first two serial lines..
107 *
108 * The local stuff makes for some complications, but it seems to be
109 * gone in the PCI version. I hope I can get DEC suckered^H^H^H^H^H^H^H^H
110 * convinced that I need one of the newer machines.
111 */
112
113static inline unsigned int jensen_local_inb(unsigned long addr)
114{
115 return 0xff & *(vuip)((addr << 9) + EISA_VL82C106);
116}
117
118static inline void jensen_local_outb(u8 b, unsigned long addr)
119{
120 *(vuip)((addr << 9) + EISA_VL82C106) = b;
121 mb();
122}
123
124static inline unsigned int jensen_bus_inb(unsigned long addr)
125{
126 long result;
127
128 jensen_set_hae(0);
129 result = *(volatile int *)((addr << 7) + EISA_IO + 0x00);
130 return __kernel_extbl(result, addr & 3);
131}
132
133static inline void jensen_bus_outb(u8 b, unsigned long addr)
134{
135 jensen_set_hae(0);
136 *(vuip)((addr << 7) + EISA_IO + 0x00) = b * 0x01010101;
137 mb();
138}
139
140/*
141 * It seems gcc is not very good at optimizing away logical
142 * operations that result in operations across inline functions.
143 * Which is why this is a macro.
144 */
145
146#define jensen_is_local(addr) ( \
147/* keyboard */ (addr == 0x60 || addr == 0x64) || \
148/* RTC */ (addr == 0x170 || addr == 0x171) || \
149/* mb COM2 */ (addr >= 0x2f8 && addr <= 0x2ff) || \
150/* mb LPT1 */ (addr >= 0x3bc && addr <= 0x3be) || \
151/* mb COM2 */ (addr >= 0x3f8 && addr <= 0x3ff))
152
153__EXTERN_INLINE u8 jensen_inb(unsigned long addr)
154{
155 if (jensen_is_local(addr))
156 return jensen_local_inb(addr);
157 else
158 return jensen_bus_inb(addr);
159}
160
161__EXTERN_INLINE void jensen_outb(u8 b, unsigned long addr)
162{
163 if (jensen_is_local(addr))
164 jensen_local_outb(b, addr);
165 else
166 jensen_bus_outb(b, addr);
167}
168
169__EXTERN_INLINE u16 jensen_inw(unsigned long addr)
170{
171 long result;
172
173 jensen_set_hae(0);
174 result = *(volatile int *) ((addr << 7) + EISA_IO + 0x20);
175 result >>= (addr & 3) * 8;
176 return 0xffffUL & result;
177}
178
179__EXTERN_INLINE u32 jensen_inl(unsigned long addr)
180{
181 jensen_set_hae(0);
182 return *(vuip) ((addr << 7) + EISA_IO + 0x60);
183}
184
185__EXTERN_INLINE void jensen_outw(u16 b, unsigned long addr)
186{
187 jensen_set_hae(0);
188 *(vuip) ((addr << 7) + EISA_IO + 0x20) = b * 0x00010001;
189 mb();
190}
191
192__EXTERN_INLINE void jensen_outl(u32 b, unsigned long addr)
193{
194 jensen_set_hae(0);
195 *(vuip) ((addr << 7) + EISA_IO + 0x60) = b;
196 mb();
197}
198
199/*
200 * Memory functions.
201 */
202
203__EXTERN_INLINE u8 jensen_readb(const volatile void __iomem *xaddr)
204{
205 unsigned long addr = (unsigned long) xaddr;
206 long result;
207
208 jensen_set_hae(addr);
209 addr &= JENSEN_HAE_MASK;
210 result = *(volatile int *) ((addr << 7) + EISA_MEM + 0x00);
211 result >>= (addr & 3) * 8;
212 return 0xffUL & result;
213}
214
215__EXTERN_INLINE u16 jensen_readw(const volatile void __iomem *xaddr)
216{
217 unsigned long addr = (unsigned long) xaddr;
218 long result;
219
220 jensen_set_hae(addr);
221 addr &= JENSEN_HAE_MASK;
222 result = *(volatile int *) ((addr << 7) + EISA_MEM + 0x20);
223 result >>= (addr & 3) * 8;
224 return 0xffffUL & result;
225}
226
227__EXTERN_INLINE u32 jensen_readl(const volatile void __iomem *xaddr)
228{
229 unsigned long addr = (unsigned long) xaddr;
230 jensen_set_hae(addr);
231 addr &= JENSEN_HAE_MASK;
232 return *(vuip) ((addr << 7) + EISA_MEM + 0x60);
233}
234
235__EXTERN_INLINE u64 jensen_readq(const volatile void __iomem *xaddr)
236{
237 unsigned long addr = (unsigned long) xaddr;
238 unsigned long r0, r1;
239
240 jensen_set_hae(addr);
241 addr &= JENSEN_HAE_MASK;
242 addr = (addr << 7) + EISA_MEM + 0x60;
243 r0 = *(vuip) (addr);
244 r1 = *(vuip) (addr + (4 << 7));
245 return r1 << 32 | r0;
246}
247
248__EXTERN_INLINE void jensen_writeb(u8 b, volatile void __iomem *xaddr)
249{
250 unsigned long addr = (unsigned long) xaddr;
251 jensen_set_hae(addr);
252 addr &= JENSEN_HAE_MASK;
253 *(vuip) ((addr << 7) + EISA_MEM + 0x00) = b * 0x01010101;
254}
255
256__EXTERN_INLINE void jensen_writew(u16 b, volatile void __iomem *xaddr)
257{
258 unsigned long addr = (unsigned long) xaddr;
259 jensen_set_hae(addr);
260 addr &= JENSEN_HAE_MASK;
261 *(vuip) ((addr << 7) + EISA_MEM + 0x20) = b * 0x00010001;
262}
263
264__EXTERN_INLINE void jensen_writel(u32 b, volatile void __iomem *xaddr)
265{
266 unsigned long addr = (unsigned long) xaddr;
267 jensen_set_hae(addr);
268 addr &= JENSEN_HAE_MASK;
269 *(vuip) ((addr << 7) + EISA_MEM + 0x60) = b;
270}
271
272__EXTERN_INLINE void jensen_writeq(u64 b, volatile void __iomem *xaddr)
273{
274 unsigned long addr = (unsigned long) xaddr;
275 jensen_set_hae(addr);
276 addr &= JENSEN_HAE_MASK;
277 addr = (addr << 7) + EISA_MEM + 0x60;
278 *(vuip) (addr) = b;
279 *(vuip) (addr + (4 << 7)) = b >> 32;
280}
281
282__EXTERN_INLINE void __iomem *jensen_ioportmap(unsigned long addr)
283{
284 return (void __iomem *)addr;
285}
286
287__EXTERN_INLINE void __iomem *jensen_ioremap(unsigned long addr,
288 unsigned long size)
289{
290 return (void __iomem *)(addr + 0x100000000ul);
291}
292
293__EXTERN_INLINE int jensen_is_ioaddr(unsigned long addr)
294{
295 return (long)addr >= 0;
296}
297
298__EXTERN_INLINE int jensen_is_mmio(const volatile void __iomem *addr)
299{
300 return (unsigned long)addr >= 0x100000000ul;
301}
302
303/* New-style ioread interface. All the routines are so ugly for Jensen
304 that it doesn't make sense to merge them. */
305
306#define IOPORT(OS, NS) \
307__EXTERN_INLINE unsigned int jensen_ioread##NS(void __iomem *xaddr) \
308{ \
309 if (jensen_is_mmio(xaddr)) \
310 return jensen_read##OS(xaddr - 0x100000000ul); \
311 else \
312 return jensen_in##OS((unsigned long)xaddr); \
313} \
314__EXTERN_INLINE void jensen_iowrite##NS(u##NS b, void __iomem *xaddr) \
315{ \
316 if (jensen_is_mmio(xaddr)) \
317 jensen_write##OS(b, xaddr - 0x100000000ul); \
318 else \
319 jensen_out##OS(b, (unsigned long)xaddr); \
320}
321
322IOPORT(b, 8)
323IOPORT(w, 16)
324IOPORT(l, 32)
325
326#undef IOPORT
327
328#undef vuip
329
330#undef __IO_PREFIX
331#define __IO_PREFIX jensen
332#define jensen_trivial_rw_bw 0
333#define jensen_trivial_rw_lq 0
334#define jensen_trivial_io_bw 0
335#define jensen_trivial_io_lq 0
336#define jensen_trivial_iounmap 1
337#include <asm/io_trivial.h>
338
339#ifdef __IO_EXTERN_INLINE
340#undef __EXTERN_INLINE
341#undef __IO_EXTERN_INLINE
342#endif
343
344#endif /* __KERNEL__ */
345
346#endif /* __ALPHA_JENSEN_H */
diff --git a/include/asm-alpha/kdebug.h b/include/asm-alpha/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-alpha/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-alpha/kmap_types.h b/include/asm-alpha/kmap_types.h
deleted file mode 100644
index 3e6735a34c57..000000000000
--- a/include/asm-alpha/kmap_types.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4/* Dummy header just to define km_type. */
5
6
7#ifdef CONFIG_DEBUG_HIGHMEM
8# define D(n) __KM_FENCE_##n ,
9#else
10# define D(n)
11#endif
12
13enum km_type {
14D(0) KM_BOUNCE_READ,
15D(1) KM_SKB_SUNRPC_DATA,
16D(2) KM_SKB_DATA_SOFTIRQ,
17D(3) KM_USER0,
18D(4) KM_USER1,
19D(5) KM_BIO_SRC_IRQ,
20D(6) KM_BIO_DST_IRQ,
21D(7) KM_PTE0,
22D(8) KM_PTE1,
23D(9) KM_IRQ0,
24D(10) KM_IRQ1,
25D(11) KM_SOFTIRQ0,
26D(12) KM_SOFTIRQ1,
27D(13) KM_TYPE_NR
28};
29
30#undef D
31
32#endif
diff --git a/include/asm-alpha/linkage.h b/include/asm-alpha/linkage.h
deleted file mode 100644
index 291c2d01c44f..000000000000
--- a/include/asm-alpha/linkage.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_LINKAGE_H
2#define __ASM_LINKAGE_H
3
4/* Nothing to see here... */
5
6#endif
diff --git a/include/asm-alpha/local.h b/include/asm-alpha/local.h
deleted file mode 100644
index 6ad3ea696421..000000000000
--- a/include/asm-alpha/local.h
+++ /dev/null
@@ -1,118 +0,0 @@
1#ifndef _ALPHA_LOCAL_H
2#define _ALPHA_LOCAL_H
3
4#include <linux/percpu.h>
5#include <asm/atomic.h>
6
7typedef struct
8{
9 atomic_long_t a;
10} local_t;
11
12#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
13#define local_read(l) atomic_long_read(&(l)->a)
14#define local_set(l,i) atomic_long_set(&(l)->a, (i))
15#define local_inc(l) atomic_long_inc(&(l)->a)
16#define local_dec(l) atomic_long_dec(&(l)->a)
17#define local_add(i,l) atomic_long_add((i),(&(l)->a))
18#define local_sub(i,l) atomic_long_sub((i),(&(l)->a))
19
20static __inline__ long local_add_return(long i, local_t * l)
21{
22 long temp, result;
23 __asm__ __volatile__(
24 "1: ldq_l %0,%1\n"
25 " addq %0,%3,%2\n"
26 " addq %0,%3,%0\n"
27 " stq_c %0,%1\n"
28 " beq %0,2f\n"
29 ".subsection 2\n"
30 "2: br 1b\n"
31 ".previous"
32 :"=&r" (temp), "=m" (l->a.counter), "=&r" (result)
33 :"Ir" (i), "m" (l->a.counter) : "memory");
34 return result;
35}
36
37static __inline__ long local_sub_return(long i, local_t * l)
38{
39 long temp, result;
40 __asm__ __volatile__(
41 "1: ldq_l %0,%1\n"
42 " subq %0,%3,%2\n"
43 " subq %0,%3,%0\n"
44 " stq_c %0,%1\n"
45 " beq %0,2f\n"
46 ".subsection 2\n"
47 "2: br 1b\n"
48 ".previous"
49 :"=&r" (temp), "=m" (l->a.counter), "=&r" (result)
50 :"Ir" (i), "m" (l->a.counter) : "memory");
51 return result;
52}
53
54#define local_cmpxchg(l, o, n) \
55 (cmpxchg_local(&((l)->a.counter), (o), (n)))
56#define local_xchg(l, n) (xchg_local(&((l)->a.counter), (n)))
57
58/**
59 * local_add_unless - add unless the number is a given value
60 * @l: pointer of type local_t
61 * @a: the amount to add to l...
62 * @u: ...unless l is equal to u.
63 *
64 * Atomically adds @a to @l, so long as it was not @u.
65 * Returns non-zero if @l was not @u, and zero otherwise.
66 */
67#define local_add_unless(l, a, u) \
68({ \
69 long c, old; \
70 c = local_read(l); \
71 for (;;) { \
72 if (unlikely(c == (u))) \
73 break; \
74 old = local_cmpxchg((l), c, c + (a)); \
75 if (likely(old == c)) \
76 break; \
77 c = old; \
78 } \
79 c != (u); \
80})
81#define local_inc_not_zero(l) local_add_unless((l), 1, 0)
82
83#define local_add_negative(a, l) (local_add_return((a), (l)) < 0)
84
85#define local_dec_return(l) local_sub_return(1,(l))
86
87#define local_inc_return(l) local_add_return(1,(l))
88
89#define local_sub_and_test(i,l) (local_sub_return((i), (l)) == 0)
90
91#define local_inc_and_test(l) (local_add_return(1, (l)) == 0)
92
93#define local_dec_and_test(l) (local_sub_return(1, (l)) == 0)
94
95/* Verify if faster than atomic ops */
96#define __local_inc(l) ((l)->a.counter++)
97#define __local_dec(l) ((l)->a.counter++)
98#define __local_add(i,l) ((l)->a.counter+=(i))
99#define __local_sub(i,l) ((l)->a.counter-=(i))
100
101/* Use these for per-cpu local_t variables: on some archs they are
102 * much more efficient than these naive implementations. Note they take
103 * a variable, not an address.
104 */
105#define cpu_local_read(l) local_read(&__get_cpu_var(l))
106#define cpu_local_set(l, i) local_set(&__get_cpu_var(l), (i))
107
108#define cpu_local_inc(l) local_inc(&__get_cpu_var(l))
109#define cpu_local_dec(l) local_dec(&__get_cpu_var(l))
110#define cpu_local_add(i, l) local_add((i), &__get_cpu_var(l))
111#define cpu_local_sub(i, l) local_sub((i), &__get_cpu_var(l))
112
113#define __cpu_local_inc(l) __local_inc(&__get_cpu_var(l))
114#define __cpu_local_dec(l) __local_dec(&__get_cpu_var(l))
115#define __cpu_local_add(i, l) __local_add((i), &__get_cpu_var(l))
116#define __cpu_local_sub(i, l) __local_sub((i), &__get_cpu_var(l))
117
118#endif /* _ALPHA_LOCAL_H */
diff --git a/include/asm-alpha/machvec.h b/include/asm-alpha/machvec.h
deleted file mode 100644
index a86c083cdf7f..000000000000
--- a/include/asm-alpha/machvec.h
+++ /dev/null
@@ -1,134 +0,0 @@
1#ifndef __ALPHA_MACHVEC_H
2#define __ALPHA_MACHVEC_H 1
3
4#include <linux/types.h>
5
6/*
7 * This file gets pulled in by asm/io.h from user space. We don't
8 * want most of this escaping.
9 */
10
11#ifdef __KERNEL__
12
13/* The following structure vectors all of the I/O and IRQ manipulation
14 from the generic kernel to the hardware specific backend. */
15
16struct task_struct;
17struct mm_struct;
18struct vm_area_struct;
19struct linux_hose_info;
20struct pci_dev;
21struct pci_ops;
22struct pci_controller;
23struct _alpha_agp_info;
24
25struct alpha_machine_vector
26{
27 /* This "belongs" down below with the rest of the runtime
28 variables, but it is convenient for entry.S if these
29 two slots are at the beginning of the struct. */
30 unsigned long hae_cache;
31 unsigned long *hae_register;
32
33 int nr_irqs;
34 int rtc_port;
35 unsigned int max_asn;
36 unsigned long max_isa_dma_address;
37 unsigned long irq_probe_mask;
38 unsigned long iack_sc;
39 unsigned long min_io_address;
40 unsigned long min_mem_address;
41 unsigned long pci_dac_offset;
42
43 void (*mv_pci_tbi)(struct pci_controller *hose,
44 dma_addr_t start, dma_addr_t end);
45
46 unsigned int (*mv_ioread8)(void __iomem *);
47 unsigned int (*mv_ioread16)(void __iomem *);
48 unsigned int (*mv_ioread32)(void __iomem *);
49
50 void (*mv_iowrite8)(u8, void __iomem *);
51 void (*mv_iowrite16)(u16, void __iomem *);
52 void (*mv_iowrite32)(u32, void __iomem *);
53
54 u8 (*mv_readb)(const volatile void __iomem *);
55 u16 (*mv_readw)(const volatile void __iomem *);
56 u32 (*mv_readl)(const volatile void __iomem *);
57 u64 (*mv_readq)(const volatile void __iomem *);
58
59 void (*mv_writeb)(u8, volatile void __iomem *);
60 void (*mv_writew)(u16, volatile void __iomem *);
61 void (*mv_writel)(u32, volatile void __iomem *);
62 void (*mv_writeq)(u64, volatile void __iomem *);
63
64 void __iomem *(*mv_ioportmap)(unsigned long);
65 void __iomem *(*mv_ioremap)(unsigned long, unsigned long);
66 void (*mv_iounmap)(volatile void __iomem *);
67 int (*mv_is_ioaddr)(unsigned long);
68 int (*mv_is_mmio)(const volatile void __iomem *);
69
70 void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
71 struct task_struct *);
72 void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
73
74 void (*mv_flush_tlb_current)(struct mm_struct *);
75 void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
76 struct vm_area_struct *vma,
77 unsigned long addr);
78
79 void (*update_irq_hw)(unsigned long, unsigned long, int);
80 void (*ack_irq)(unsigned long);
81 void (*device_interrupt)(unsigned long vector);
82 void (*machine_check)(u64 vector, u64 la);
83
84 void (*smp_callin)(void);
85 void (*init_arch)(void);
86 void (*init_irq)(void);
87 void (*init_rtc)(void);
88 void (*init_pci)(void);
89 void (*kill_arch)(int);
90
91 u8 (*pci_swizzle)(struct pci_dev *, u8 *);
92 int (*pci_map_irq)(struct pci_dev *, u8, u8);
93 struct pci_ops *pci_ops;
94
95 struct _alpha_agp_info *(*agp_info)(void);
96
97 const char *vector_name;
98
99 /* NUMA information */
100 int (*pa_to_nid)(unsigned long);
101 int (*cpuid_to_nid)(int);
102 unsigned long (*node_mem_start)(int);
103 unsigned long (*node_mem_size)(int);
104
105 /* System specific parameters. */
106 union {
107 struct {
108 unsigned long gru_int_req_bits;
109 } cia;
110
111 struct {
112 unsigned long gamma_bias;
113 } t2;
114
115 struct {
116 unsigned int route_tab;
117 } sio;
118 } sys;
119};
120
121extern struct alpha_machine_vector alpha_mv;
122
123#ifdef CONFIG_ALPHA_GENERIC
124extern int alpha_using_srm;
125#else
126#ifdef CONFIG_ALPHA_SRM
127#define alpha_using_srm 1
128#else
129#define alpha_using_srm 0
130#endif
131#endif /* GENERIC */
132
133#endif
134#endif /* __ALPHA_MACHVEC_H */
diff --git a/include/asm-alpha/mc146818rtc.h b/include/asm-alpha/mc146818rtc.h
deleted file mode 100644
index 097703f1c8cb..000000000000
--- a/include/asm-alpha/mc146818rtc.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef __ASM_ALPHA_MC146818RTC_H
5#define __ASM_ALPHA_MC146818RTC_H
6
7#include <asm/io.h>
8
9#ifndef RTC_PORT
10#define RTC_PORT(x) (0x70 + (x))
11#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
12#endif
13
14/*
15 * The yet supported machines all access the RTC index register via
16 * an ISA port access but the way to access the date register differs ...
17 */
18#define CMOS_READ(addr) ({ \
19outb_p((addr),RTC_PORT(0)); \
20inb_p(RTC_PORT(1)); \
21})
22#define CMOS_WRITE(val, addr) ({ \
23outb_p((addr),RTC_PORT(0)); \
24outb_p((val),RTC_PORT(1)); \
25})
26
27#endif /* __ASM_ALPHA_MC146818RTC_H */
diff --git a/include/asm-alpha/md.h b/include/asm-alpha/md.h
deleted file mode 100644
index 6c9b8222a4f2..000000000000
--- a/include/asm-alpha/md.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* $Id: md.h,v 1.1 1997/12/15 15:11:48 jj Exp $
2 * md.h: High speed xor_block operation for RAID4/5
3 *
4 */
5
6#ifndef __ASM_MD_H
7#define __ASM_MD_H
8
9/* #define HAVE_ARCH_XORBLOCK */
10
11#define MD_XORBLOCK_ALIGNMENT sizeof(long)
12
13#endif /* __ASM_MD_H */
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h
deleted file mode 100644
index 90d7c35d2867..000000000000
--- a/include/asm-alpha/mman.h
+++ /dev/null
@@ -1,54 +0,0 @@
1#ifndef __ALPHA_MMAN_H__
2#define __ALPHA_MMAN_H__
3
4#define PROT_READ 0x1 /* page can be read */
5#define PROT_WRITE 0x2 /* page can be written */
6#define PROT_EXEC 0x4 /* page can be executed */
7#define PROT_SEM 0x8 /* page may be used for atomic ops */
8#define PROT_NONE 0x0 /* page can not be accessed */
9#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
10#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
11
12#define MAP_SHARED 0x01 /* Share changes */
13#define MAP_PRIVATE 0x02 /* Changes are private */
14#define MAP_TYPE 0x0f /* Mask for type of mapping (OSF/1 is _wrong_) */
15#define MAP_FIXED 0x100 /* Interpret addr exactly */
16#define MAP_ANONYMOUS 0x10 /* don't use a file */
17
18/* not used by linux, but here to make sure we don't clash with OSF/1 defines */
19#define _MAP_HASSEMAPHORE 0x0200
20#define _MAP_INHERIT 0x0400
21#define _MAP_UNALIGNED 0x0800
22
23/* These are linux-specific */
24#define MAP_GROWSDOWN 0x01000 /* stack-like segment */
25#define MAP_DENYWRITE 0x02000 /* ETXTBSY */
26#define MAP_EXECUTABLE 0x04000 /* mark it as an executable */
27#define MAP_LOCKED 0x08000 /* lock the mapping */
28#define MAP_NORESERVE 0x10000 /* don't check for reservations */
29#define MAP_POPULATE 0x20000 /* populate (prefault) pagetables */
30#define MAP_NONBLOCK 0x40000 /* do not block on IO */
31
32#define MS_ASYNC 1 /* sync memory asynchronously */
33#define MS_SYNC 2 /* synchronous memory sync */
34#define MS_INVALIDATE 4 /* invalidate the caches */
35
36#define MCL_CURRENT 8192 /* lock all currently mapped pages */
37#define MCL_FUTURE 16384 /* lock all additions to address space */
38
39#define MADV_NORMAL 0 /* no further special treatment */
40#define MADV_RANDOM 1 /* expect random page references */
41#define MADV_SEQUENTIAL 2 /* expect sequential page references */
42#define MADV_WILLNEED 3 /* will need these pages */
43#define MADV_SPACEAVAIL 5 /* ensure resources are available */
44#define MADV_DONTNEED 6 /* don't need these pages */
45
46/* common/generic parameters */
47#define MADV_REMOVE 9 /* remove these pages & resources */
48#define MADV_DONTFORK 10 /* don't inherit across fork */
49#define MADV_DOFORK 11 /* do inherit across fork */
50
51/* compatibility flags */
52#define MAP_FILE 0
53
54#endif /* __ALPHA_MMAN_H__ */
diff --git a/include/asm-alpha/mmu.h b/include/asm-alpha/mmu.h
deleted file mode 100644
index 3dc127779329..000000000000
--- a/include/asm-alpha/mmu.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ALPHA_MMU_H
2#define __ALPHA_MMU_H
3
4/* The alpha MMU context is one "unsigned long" bitmap per CPU */
5typedef unsigned long mm_context_t[NR_CPUS];
6
7#endif
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
deleted file mode 100644
index 86c08a02d239..000000000000
--- a/include/asm-alpha/mmu_context.h
+++ /dev/null
@@ -1,260 +0,0 @@
1#ifndef __ALPHA_MMU_CONTEXT_H
2#define __ALPHA_MMU_CONTEXT_H
3
4/*
5 * get a new mmu context..
6 *
7 * Copyright (C) 1996, Linus Torvalds
8 */
9
10#include <asm/system.h>
11#include <asm/machvec.h>
12#include <asm/compiler.h>
13#include <asm-generic/mm_hooks.h>
14
15/*
16 * Force a context reload. This is needed when we change the page
17 * table pointer or when we update the ASN of the current process.
18 */
19
20/* Don't get into trouble with dueling __EXTERN_INLINEs. */
21#ifndef __EXTERN_INLINE
22#include <asm/io.h>
23#endif
24
25
26static inline unsigned long
27__reload_thread(struct pcb_struct *pcb)
28{
29 register unsigned long a0 __asm__("$16");
30 register unsigned long v0 __asm__("$0");
31
32 a0 = virt_to_phys(pcb);
33 __asm__ __volatile__(
34 "call_pal %2 #__reload_thread"
35 : "=r"(v0), "=r"(a0)
36 : "i"(PAL_swpctx), "r"(a0)
37 : "$1", "$22", "$23", "$24", "$25");
38
39 return v0;
40}
41
42
43/*
44 * The maximum ASN's the processor supports. On the EV4 this is 63
45 * but the PAL-code doesn't actually use this information. On the
46 * EV5 this is 127, and EV6 has 255.
47 *
48 * On the EV4, the ASNs are more-or-less useless anyway, as they are
49 * only used as an icache tag, not for TB entries. On the EV5 and EV6,
50 * ASN's also validate the TB entries, and thus make a lot more sense.
51 *
52 * The EV4 ASN's don't even match the architecture manual, ugh. And
53 * I quote: "If a processor implements address space numbers (ASNs),
54 * and the old PTE has the Address Space Match (ASM) bit clear (ASNs
55 * in use) and the Valid bit set, then entries can also effectively be
56 * made coherent by assigning a new, unused ASN to the currently
57 * running process and not reusing the previous ASN before calling the
58 * appropriate PALcode routine to invalidate the translation buffer (TB)".
59 *
60 * In short, the EV4 has a "kind of" ASN capability, but it doesn't actually
61 * work correctly and can thus not be used (explaining the lack of PAL-code
62 * support).
63 */
64#define EV4_MAX_ASN 63
65#define EV5_MAX_ASN 127
66#define EV6_MAX_ASN 255
67
68#ifdef CONFIG_ALPHA_GENERIC
69# define MAX_ASN (alpha_mv.max_asn)
70#else
71# ifdef CONFIG_ALPHA_EV4
72# define MAX_ASN EV4_MAX_ASN
73# elif defined(CONFIG_ALPHA_EV5)
74# define MAX_ASN EV5_MAX_ASN
75# else
76# define MAX_ASN EV6_MAX_ASN
77# endif
78#endif
79
80/*
81 * cpu_last_asn(processor):
82 * 63 0
83 * +-------------+----------------+--------------+
84 * | asn version | this processor | hardware asn |
85 * +-------------+----------------+--------------+
86 */
87
88#include <asm/smp.h>
89#ifdef CONFIG_SMP
90#define cpu_last_asn(cpuid) (cpu_data[cpuid].last_asn)
91#else
92extern unsigned long last_asn;
93#define cpu_last_asn(cpuid) last_asn
94#endif /* CONFIG_SMP */
95
96#define WIDTH_HARDWARE_ASN 8
97#define ASN_FIRST_VERSION (1UL << WIDTH_HARDWARE_ASN)
98#define HARDWARE_ASN_MASK ((1UL << WIDTH_HARDWARE_ASN) - 1)
99
100/*
101 * NOTE! The way this is set up, the high bits of the "asn_cache" (and
102 * the "mm->context") are the ASN _version_ code. A version of 0 is
103 * always considered invalid, so to invalidate another process you only
104 * need to do "p->mm->context = 0".
105 *
106 * If we need more ASN's than the processor has, we invalidate the old
107 * user TLB's (tbiap()) and start a new ASN version. That will automatically
108 * force a new asn for any other processes the next time they want to
109 * run.
110 */
111
112#ifndef __EXTERN_INLINE
113#define __EXTERN_INLINE extern inline
114#define __MMU_EXTERN_INLINE
115#endif
116
117extern inline unsigned long
118__get_new_mm_context(struct mm_struct *mm, long cpu)
119{
120 unsigned long asn = cpu_last_asn(cpu);
121 unsigned long next = asn + 1;
122
123 if ((asn & HARDWARE_ASN_MASK) >= MAX_ASN) {
124 tbiap();
125 imb();
126 next = (asn & ~HARDWARE_ASN_MASK) + ASN_FIRST_VERSION;
127 }
128 cpu_last_asn(cpu) = next;
129 return next;
130}
131
132__EXTERN_INLINE void
133ev5_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
134 struct task_struct *next)
135{
136 /* Check if our ASN is of an older version, and thus invalid. */
137 unsigned long asn;
138 unsigned long mmc;
139 long cpu = smp_processor_id();
140
141#ifdef CONFIG_SMP
142 cpu_data[cpu].asn_lock = 1;
143 barrier();
144#endif
145 asn = cpu_last_asn(cpu);
146 mmc = next_mm->context[cpu];
147 if ((mmc ^ asn) & ~HARDWARE_ASN_MASK) {
148 mmc = __get_new_mm_context(next_mm, cpu);
149 next_mm->context[cpu] = mmc;
150 }
151#ifdef CONFIG_SMP
152 else
153 cpu_data[cpu].need_new_asn = 1;
154#endif
155
156 /* Always update the PCB ASN. Another thread may have allocated
157 a new mm->context (via flush_tlb_mm) without the ASN serial
158 number wrapping. We have no way to detect when this is needed. */
159 task_thread_info(next)->pcb.asn = mmc & HARDWARE_ASN_MASK;
160}
161
162__EXTERN_INLINE void
163ev4_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
164 struct task_struct *next)
165{
166 /* As described, ASN's are broken for TLB usage. But we can
167 optimize for switching between threads -- if the mm is
168 unchanged from current we needn't flush. */
169 /* ??? May not be needed because EV4 PALcode recognizes that
170 ASN's are broken and does a tbiap itself on swpctx, under
171 the "Must set ASN or flush" rule. At least this is true
172 for a 1992 SRM, reports Joseph Martin (jmartin@hlo.dec.com).
173 I'm going to leave this here anyway, just to Be Sure. -- r~ */
174 if (prev_mm != next_mm)
175 tbiap();
176
177 /* Do continue to allocate ASNs, because we can still use them
178 to avoid flushing the icache. */
179 ev5_switch_mm(prev_mm, next_mm, next);
180}
181
182extern void __load_new_mm_context(struct mm_struct *);
183
184#ifdef CONFIG_SMP
185#define check_mmu_context() \
186do { \
187 int cpu = smp_processor_id(); \
188 cpu_data[cpu].asn_lock = 0; \
189 barrier(); \
190 if (cpu_data[cpu].need_new_asn) { \
191 struct mm_struct * mm = current->active_mm; \
192 cpu_data[cpu].need_new_asn = 0; \
193 if (!mm->context[cpu]) \
194 __load_new_mm_context(mm); \
195 } \
196} while(0)
197#else
198#define check_mmu_context() do { } while(0)
199#endif
200
201__EXTERN_INLINE void
202ev5_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
203{
204 __load_new_mm_context(next_mm);
205}
206
207__EXTERN_INLINE void
208ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
209{
210 __load_new_mm_context(next_mm);
211 tbiap();
212}
213
214#define deactivate_mm(tsk,mm) do { } while (0)
215
216#ifdef CONFIG_ALPHA_GENERIC
217# define switch_mm(a,b,c) alpha_mv.mv_switch_mm((a),(b),(c))
218# define activate_mm(x,y) alpha_mv.mv_activate_mm((x),(y))
219#else
220# ifdef CONFIG_ALPHA_EV4
221# define switch_mm(a,b,c) ev4_switch_mm((a),(b),(c))
222# define activate_mm(x,y) ev4_activate_mm((x),(y))
223# else
224# define switch_mm(a,b,c) ev5_switch_mm((a),(b),(c))
225# define activate_mm(x,y) ev5_activate_mm((x),(y))
226# endif
227#endif
228
229static inline int
230init_new_context(struct task_struct *tsk, struct mm_struct *mm)
231{
232 int i;
233
234 for_each_online_cpu(i)
235 mm->context[i] = 0;
236 if (tsk != current)
237 task_thread_info(tsk)->pcb.ptbr
238 = ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
239 return 0;
240}
241
242extern inline void
243destroy_context(struct mm_struct *mm)
244{
245 /* Nothing to do. */
246}
247
248static inline void
249enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
250{
251 task_thread_info(tsk)->pcb.ptbr
252 = ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
253}
254
255#ifdef __MMU_EXTERN_INLINE
256#undef __EXTERN_INLINE
257#undef __MMU_EXTERN_INLINE
258#endif
259
260#endif /* __ALPHA_MMU_CONTEXT_H */
diff --git a/include/asm-alpha/mmzone.h b/include/asm-alpha/mmzone.h
deleted file mode 100644
index 8af56ce346ad..000000000000
--- a/include/asm-alpha/mmzone.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
3 * Adapted for the alpha wildfire architecture Jan 2001.
4 */
5#ifndef _ASM_MMZONE_H_
6#define _ASM_MMZONE_H_
7
8#include <asm/smp.h>
9
10struct bootmem_data_t; /* stupid forward decl. */
11
12/*
13 * Following are macros that are specific to this numa platform.
14 */
15
16extern pg_data_t node_data[];
17
18#define alpha_pa_to_nid(pa) \
19 (alpha_mv.pa_to_nid \
20 ? alpha_mv.pa_to_nid(pa) \
21 : (0))
22#define node_mem_start(nid) \
23 (alpha_mv.node_mem_start \
24 ? alpha_mv.node_mem_start(nid) \
25 : (0UL))
26#define node_mem_size(nid) \
27 (alpha_mv.node_mem_size \
28 ? alpha_mv.node_mem_size(nid) \
29 : ((nid) ? (0UL) : (~0UL)))
30
31#define pa_to_nid(pa) alpha_pa_to_nid(pa)
32#define NODE_DATA(nid) (&node_data[(nid)])
33
34#define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn)
35
36#if 1
37#define PLAT_NODE_DATA_LOCALNR(p, n) \
38 (((p) >> PAGE_SHIFT) - PLAT_NODE_DATA(n)->gendata.node_start_pfn)
39#else
40static inline unsigned long
41PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
42{
43 unsigned long temp;
44 temp = p >> PAGE_SHIFT;
45 return temp - PLAT_NODE_DATA(n)->gendata.node_start_pfn;
46}
47#endif
48
49#ifdef CONFIG_DISCONTIGMEM
50
51/*
52 * Following are macros that each numa implementation must define.
53 */
54
55/*
56 * Given a kernel address, find the home node of the underlying memory.
57 */
58#define kvaddr_to_nid(kaddr) pa_to_nid(__pa(kaddr))
59#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
60
61/*
62 * Given a kaddr, LOCAL_BASE_ADDR finds the owning node of the memory
63 * and returns the kaddr corresponding to first physical page in the
64 * node's mem_map.
65 */
66#define LOCAL_BASE_ADDR(kaddr) \
67 ((unsigned long)__va(NODE_DATA(kvaddr_to_nid(kaddr))->node_start_pfn \
68 << PAGE_SHIFT))
69
70/* XXX: FIXME -- wli */
71#define kern_addr_valid(kaddr) (0)
72
73#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
74
75#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
76
77#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32))
78#define pgd_page(pgd) (pfn_to_page(pgd_val(pgd) >> 32))
79#define pte_pfn(pte) (pte_val(pte) >> 32)
80
81#define mk_pte(page, pgprot) \
82({ \
83 pte_t pte; \
84 unsigned long pfn; \
85 \
86 pfn = page_to_pfn(page) << 32; \
87 pte_val(pte) = pfn | pgprot_val(pgprot); \
88 \
89 pte; \
90})
91
92#define pte_page(x) \
93({ \
94 unsigned long kvirt; \
95 struct page * __xx; \
96 \
97 kvirt = (unsigned long)__va(pte_val(x) >> (32-PAGE_SHIFT)); \
98 __xx = virt_to_page(kvirt); \
99 \
100 __xx; \
101})
102
103#define page_to_pa(page) \
104 (page_to_pfn(page) << PAGE_SHIFT)
105
106#define pfn_to_nid(pfn) pa_to_nid(((u64)(pfn) << PAGE_SHIFT))
107#define pfn_valid(pfn) \
108 (((pfn) - node_start_pfn(pfn_to_nid(pfn))) < \
109 node_spanned_pages(pfn_to_nid(pfn))) \
110
111#define virt_addr_valid(kaddr) pfn_valid((__pa(kaddr) >> PAGE_SHIFT))
112
113#endif /* CONFIG_DISCONTIGMEM */
114
115#endif /* _ASM_MMZONE_H_ */
diff --git a/include/asm-alpha/module.h b/include/asm-alpha/module.h
deleted file mode 100644
index 7b63743c534a..000000000000
--- a/include/asm-alpha/module.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef _ALPHA_MODULE_H
2#define _ALPHA_MODULE_H
3
4struct mod_arch_specific
5{
6 unsigned int gotsecindex;
7};
8
9#define Elf_Sym Elf64_Sym
10#define Elf_Shdr Elf64_Shdr
11#define Elf_Ehdr Elf64_Ehdr
12#define Elf_Phdr Elf64_Phdr
13#define Elf_Dyn Elf64_Dyn
14#define Elf_Rel Elf64_Rel
15#define Elf_Rela Elf64_Rela
16
17#define ARCH_SHF_SMALL SHF_ALPHA_GPREL
18
19#ifdef MODULE
20asm(".section .got,\"aws\",@progbits; .align 3; .previous");
21#endif
22
23#endif /*_ALPHA_MODULE_H*/
diff --git a/include/asm-alpha/msgbuf.h b/include/asm-alpha/msgbuf.h
deleted file mode 100644
index 98496501a2bb..000000000000
--- a/include/asm-alpha/msgbuf.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _ALPHA_MSGBUF_H
2#define _ALPHA_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for alpha architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 2 miscellaneous 64-bit values
11 */
12
13struct msqid64_ds {
14 struct ipc64_perm msg_perm;
15 __kernel_time_t msg_stime; /* last msgsnd time */
16 __kernel_time_t msg_rtime; /* last msgrcv time */
17 __kernel_time_t msg_ctime; /* last change time */
18 unsigned long msg_cbytes; /* current number of bytes on queue */
19 unsigned long msg_qnum; /* number of messages in queue */
20 unsigned long msg_qbytes; /* max number of bytes on queue */
21 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
22 __kernel_pid_t msg_lrpid; /* last receive pid */
23 unsigned long __unused1;
24 unsigned long __unused2;
25};
26
27#endif /* _ALPHA_MSGBUF_H */
diff --git a/include/asm-alpha/mutex.h b/include/asm-alpha/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/include/asm-alpha/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h
deleted file mode 100644
index 0995f9d13417..000000000000
--- a/include/asm-alpha/page.h
+++ /dev/null
@@ -1,98 +0,0 @@
1#ifndef _ALPHA_PAGE_H
2#define _ALPHA_PAGE_H
3
4#include <linux/const.h>
5#include <asm/pal.h>
6
7/* PAGE_SHIFT determines the page size */
8#define PAGE_SHIFT 13
9#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
10#define PAGE_MASK (~(PAGE_SIZE-1))
11
12#ifndef __ASSEMBLY__
13
14#define STRICT_MM_TYPECHECKS
15
16extern void clear_page(void *page);
17#define clear_user_page(page, vaddr, pg) clear_page(page)
18
19#define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
20 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vmaddr)
21#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
22
23extern void copy_page(void * _to, void * _from);
24#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
25
26#ifdef STRICT_MM_TYPECHECKS
27/*
28 * These are used to make use of C type-checking..
29 */
30typedef struct { unsigned long pte; } pte_t;
31typedef struct { unsigned long pmd; } pmd_t;
32typedef struct { unsigned long pgd; } pgd_t;
33typedef struct { unsigned long pgprot; } pgprot_t;
34
35#define pte_val(x) ((x).pte)
36#define pmd_val(x) ((x).pmd)
37#define pgd_val(x) ((x).pgd)
38#define pgprot_val(x) ((x).pgprot)
39
40#define __pte(x) ((pte_t) { (x) } )
41#define __pmd(x) ((pmd_t) { (x) } )
42#define __pgd(x) ((pgd_t) { (x) } )
43#define __pgprot(x) ((pgprot_t) { (x) } )
44
45#else
46/*
47 * .. while these make it easier on the compiler
48 */
49typedef unsigned long pte_t;
50typedef unsigned long pmd_t;
51typedef unsigned long pgd_t;
52typedef unsigned long pgprot_t;
53
54#define pte_val(x) (x)
55#define pmd_val(x) (x)
56#define pgd_val(x) (x)
57#define pgprot_val(x) (x)
58
59#define __pte(x) (x)
60#define __pgd(x) (x)
61#define __pgprot(x) (x)
62
63#endif /* STRICT_MM_TYPECHECKS */
64
65typedef struct page *pgtable_t;
66
67#ifdef USE_48_BIT_KSEG
68#define PAGE_OFFSET 0xffff800000000000UL
69#else
70#define PAGE_OFFSET 0xfffffc0000000000UL
71#endif
72
73#else
74
75#ifdef USE_48_BIT_KSEG
76#define PAGE_OFFSET 0xffff800000000000
77#else
78#define PAGE_OFFSET 0xfffffc0000000000
79#endif
80
81#endif /* !__ASSEMBLY__ */
82
83#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
84#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
85#ifndef CONFIG_DISCONTIGMEM
86#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
87
88#define pfn_valid(pfn) ((pfn) < max_mapnr)
89#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
90#endif /* CONFIG_DISCONTIGMEM */
91
92#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
93 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
94
95#include <asm-generic/memory_model.h>
96#include <asm-generic/page.h>
97
98#endif /* _ALPHA_PAGE_H */
diff --git a/include/asm-alpha/pal.h b/include/asm-alpha/pal.h
deleted file mode 100644
index 9b4ba0d6f00b..000000000000
--- a/include/asm-alpha/pal.h
+++ /dev/null
@@ -1,51 +0,0 @@
1#ifndef __ALPHA_PAL_H
2#define __ALPHA_PAL_H
3
4/*
5 * Common PAL-code
6 */
7#define PAL_halt 0
8#define PAL_cflush 1
9#define PAL_draina 2
10#define PAL_bpt 128
11#define PAL_bugchk 129
12#define PAL_chmk 131
13#define PAL_callsys 131
14#define PAL_imb 134
15#define PAL_rduniq 158
16#define PAL_wruniq 159
17#define PAL_gentrap 170
18#define PAL_nphalt 190
19
20/*
21 * VMS specific PAL-code
22 */
23#define PAL_swppal 10
24#define PAL_mfpr_vptb 41
25
26/*
27 * OSF specific PAL-code
28 */
29#define PAL_cserve 9
30#define PAL_wripir 13
31#define PAL_rdmces 16
32#define PAL_wrmces 17
33#define PAL_wrfen 43
34#define PAL_wrvptptr 45
35#define PAL_jtopal 46
36#define PAL_swpctx 48
37#define PAL_wrval 49
38#define PAL_rdval 50
39#define PAL_tbi 51
40#define PAL_wrent 52
41#define PAL_swpipl 53
42#define PAL_rdps 54
43#define PAL_wrkgp 55
44#define PAL_wrusp 56
45#define PAL_wrperfmon 57
46#define PAL_rdusp 58
47#define PAL_whami 60
48#define PAL_retsys 61
49#define PAL_rti 63
50
51#endif /* __ALPHA_PAL_H */
diff --git a/include/asm-alpha/param.h b/include/asm-alpha/param.h
deleted file mode 100644
index e691ecfedb2c..000000000000
--- a/include/asm-alpha/param.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _ASM_ALPHA_PARAM_H
2#define _ASM_ALPHA_PARAM_H
3
4/* ??? Gross. I don't want to parameterize this, and supposedly the
5 hardware ignores reprogramming. We also need userland buy-in to the
6 change in HZ, since this is visible in the wait4 resources etc. */
7
8#ifdef __KERNEL__
9#define HZ CONFIG_HZ
10#define USER_HZ HZ
11#else
12#define HZ 1024
13#endif
14
15#define EXEC_PAGESIZE 8192
16
17#ifndef NOGROUP
18#define NOGROUP (-1)
19#endif
20
21#define MAXHOSTNAMELEN 64 /* max length of hostname */
22
23#ifdef __KERNEL__
24# define CLOCKS_PER_SEC HZ /* frequency at which times() counts */
25#endif
26
27#endif /* _ASM_ALPHA_PARAM_H */
diff --git a/include/asm-alpha/parport.h b/include/asm-alpha/parport.h
deleted file mode 100644
index c5ee7cbb2fcd..000000000000
--- a/include/asm-alpha/parport.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * parport.h: platform-specific PC-style parport initialisation
3 *
4 * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
5 *
6 * This file should only be included by drivers/parport/parport_pc.c.
7 */
8
9#ifndef _ASM_AXP_PARPORT_H
10#define _ASM_AXP_PARPORT_H 1
11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{
15 return parport_pc_find_isa_ports (autoirq, autodma);
16}
17
18#endif /* !(_ASM_AXP_PARPORT_H) */
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
deleted file mode 100644
index 2a14302c17a3..000000000000
--- a/include/asm-alpha/pci.h
+++ /dev/null
@@ -1,276 +0,0 @@
1#ifndef __ALPHA_PCI_H
2#define __ALPHA_PCI_H
3
4#ifdef __KERNEL__
5
6#include <linux/spinlock.h>
7#include <linux/dma-mapping.h>
8#include <asm/scatterlist.h>
9#include <asm/machvec.h>
10
11/*
12 * The following structure is used to manage multiple PCI busses.
13 */
14
15struct pci_dev;
16struct pci_bus;
17struct resource;
18struct pci_iommu_arena;
19struct page;
20
21/* A controller. Used to manage multiple PCI busses. */
22
23struct pci_controller {
24 struct pci_controller *next;
25 struct pci_bus *bus;
26 struct resource *io_space;
27 struct resource *mem_space;
28
29 /* The following are for reporting to userland. The invariant is
30 that if we report a BWX-capable dense memory, we do not report
31 a sparse memory at all, even if it exists. */
32 unsigned long sparse_mem_base;
33 unsigned long dense_mem_base;
34 unsigned long sparse_io_base;
35 unsigned long dense_io_base;
36
37 /* This one's for the kernel only. It's in KSEG somewhere. */
38 unsigned long config_space_base;
39
40 unsigned int index;
41 /* For compatibility with current (as of July 2003) pciutils
42 and XFree86. Eventually will be removed. */
43 unsigned int need_domain_info;
44
45 struct pci_iommu_arena *sg_pci;
46 struct pci_iommu_arena *sg_isa;
47
48 void *sysdata;
49};
50
51/* Override the logic in pci_scan_bus for skipping already-configured
52 bus numbers. */
53
54#define pcibios_assign_all_busses() 1
55#define pcibios_scan_all_fns(a, b) 0
56
57#define PCIBIOS_MIN_IO alpha_mv.min_io_address
58#define PCIBIOS_MIN_MEM alpha_mv.min_mem_address
59
60extern void pcibios_set_master(struct pci_dev *dev);
61
62extern inline void pcibios_penalize_isa_irq(int irq, int active)
63{
64 /* We don't do dynamic PCI IRQ allocation */
65}
66
67/* IOMMU controls. */
68
69/* The PCI address space does not equal the physical memory address space.
70 The networking and block device layers use this boolean for bounce buffer
71 decisions. */
72#define PCI_DMA_BUS_IS_PHYS 0
73
74/* Allocate and map kernel buffer using consistent mode DMA for PCI
75 device. Returns non-NULL cpu-view pointer to the buffer if
76 successful and sets *DMA_ADDRP to the pci side dma address as well,
77 else DMA_ADDRP is undefined. */
78
79extern void *__pci_alloc_consistent(struct pci_dev *, size_t,
80 dma_addr_t *, gfp_t);
81static inline void *
82pci_alloc_consistent(struct pci_dev *dev, size_t size, dma_addr_t *dma)
83{
84 return __pci_alloc_consistent(dev, size, dma, GFP_ATOMIC);
85}
86
87/* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must
88 be values that were returned from pci_alloc_consistent. SIZE must
89 be the same as what as passed into pci_alloc_consistent.
90 References to the memory and mappings associated with CPU_ADDR or
91 DMA_ADDR past this call are illegal. */
92
93extern void pci_free_consistent(struct pci_dev *, size_t, void *, dma_addr_t);
94
95/* Map a single buffer of the indicate size for PCI DMA in streaming mode.
96 The 32-bit PCI bus mastering address to use is returned. Once the device
97 is given the dma address, the device owns this memory until either
98 pci_unmap_single or pci_dma_sync_single_for_cpu is performed. */
99
100extern dma_addr_t pci_map_single(struct pci_dev *, void *, size_t, int);
101
102/* Likewise, but for a page instead of an address. */
103extern dma_addr_t pci_map_page(struct pci_dev *, struct page *,
104 unsigned long, size_t, int);
105
106/* Test for pci_map_single or pci_map_page having generated an error. */
107
108static inline int
109pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr)
110{
111 return dma_addr == 0;
112}
113
114/* Unmap a single streaming mode DMA translation. The DMA_ADDR and
115 SIZE must match what was provided for in a previous pci_map_single
116 call. All other usages are undefined. After this call, reads by
117 the cpu to the buffer are guaranteed to see whatever the device
118 wrote there. */
119
120extern void pci_unmap_single(struct pci_dev *, dma_addr_t, size_t, int);
121extern void pci_unmap_page(struct pci_dev *, dma_addr_t, size_t, int);
122
123/* pci_unmap_{single,page} is not a nop, thus... */
124#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
125 dma_addr_t ADDR_NAME;
126#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
127 __u32 LEN_NAME;
128#define pci_unmap_addr(PTR, ADDR_NAME) \
129 ((PTR)->ADDR_NAME)
130#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
131 (((PTR)->ADDR_NAME) = (VAL))
132#define pci_unmap_len(PTR, LEN_NAME) \
133 ((PTR)->LEN_NAME)
134#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
135 (((PTR)->LEN_NAME) = (VAL))
136
137/* Map a set of buffers described by scatterlist in streaming mode for
138 PCI DMA. This is the scatter-gather version of the above
139 pci_map_single interface. Here the scatter gather list elements
140 are each tagged with the appropriate PCI dma address and length.
141 They are obtained via sg_dma_{address,length}(SG).
142
143 NOTE: An implementation may be able to use a smaller number of DMA
144 address/length pairs than there are SG table elements. (for
145 example via virtual mapping capabilities) The routine returns the
146 number of addr/length pairs actually used, at most nents.
147
148 Device ownership issues as mentioned above for pci_map_single are
149 the same here. */
150
151extern int pci_map_sg(struct pci_dev *, struct scatterlist *, int, int);
152
153/* Unmap a set of streaming mode DMA translations. Again, cpu read
154 rules concerning calls here are the same as for pci_unmap_single()
155 above. */
156
157extern void pci_unmap_sg(struct pci_dev *, struct scatterlist *, int, int);
158
159/* Make physical memory consistent for a single streaming mode DMA
160 translation after a transfer and device currently has ownership
161 of the buffer.
162
163 If you perform a pci_map_single() but wish to interrogate the
164 buffer using the cpu, yet do not wish to teardown the PCI dma
165 mapping, you must call this function before doing so. At the next
166 point you give the PCI dma address back to the card, you must first
167 perform a pci_dma_sync_for_device, and then the device again owns
168 the buffer. */
169
170static inline void
171pci_dma_sync_single_for_cpu(struct pci_dev *dev, dma_addr_t dma_addr,
172 long size, int direction)
173{
174 /* Nothing to do. */
175}
176
177static inline void
178pci_dma_sync_single_for_device(struct pci_dev *dev, dma_addr_t dma_addr,
179 size_t size, int direction)
180{
181 /* Nothing to do. */
182}
183
184/* Make physical memory consistent for a set of streaming mode DMA
185 translations after a transfer. The same as pci_dma_sync_single_*
186 but for a scatter-gather list, same rules and usage. */
187
188static inline void
189pci_dma_sync_sg_for_cpu(struct pci_dev *dev, struct scatterlist *sg,
190 int nents, int direction)
191{
192 /* Nothing to do. */
193}
194
195static inline void
196pci_dma_sync_sg_for_device(struct pci_dev *dev, struct scatterlist *sg,
197 int nents, int direction)
198{
199 /* Nothing to do. */
200}
201
202/* Return whether the given PCI device DMA address mask can
203 be supported properly. For example, if your device can
204 only drive the low 24-bits during PCI bus mastering, then
205 you would pass 0x00ffffff as the mask to this function. */
206
207extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask);
208
209#ifdef CONFIG_PCI
210static inline void pci_dma_burst_advice(struct pci_dev *pdev,
211 enum pci_dma_burst_strategy *strat,
212 unsigned long *strategy_parameter)
213{
214 unsigned long cacheline_size;
215 u8 byte;
216
217 pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
218 if (byte == 0)
219 cacheline_size = 1024;
220 else
221 cacheline_size = (int) byte * 4;
222
223 *strat = PCI_DMA_BURST_BOUNDARY;
224 *strategy_parameter = cacheline_size;
225}
226#endif
227
228/* TODO: integrate with include/asm-generic/pci.h ? */
229static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
230{
231 return channel ? 15 : 14;
232}
233
234extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *,
235 struct resource *);
236
237extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
238 struct pci_bus_region *region);
239
240static inline struct resource *
241pcibios_select_root(struct pci_dev *pdev, struct resource *res)
242{
243 struct resource *root = NULL;
244
245 if (res->flags & IORESOURCE_IO)
246 root = &ioport_resource;
247 if (res->flags & IORESOURCE_MEM)
248 root = &iomem_resource;
249
250 return root;
251}
252
253#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
254
255static inline int pci_proc_domain(struct pci_bus *bus)
256{
257 struct pci_controller *hose = bus->sysdata;
258 return hose->need_domain_info;
259}
260
261struct pci_dev *alpha_gendev_to_pci(struct device *dev);
262
263#endif /* __KERNEL__ */
264
265/* Values for the `which' argument to sys_pciconfig_iobase. */
266#define IOBASE_HOSE 0
267#define IOBASE_SPARSE_MEM 1
268#define IOBASE_DENSE_MEM 2
269#define IOBASE_SPARSE_IO 3
270#define IOBASE_DENSE_IO 4
271#define IOBASE_ROOT_BUS 5
272#define IOBASE_FROM_HOSE 0x10000
273
274extern struct pci_dev *isa_bridge;
275
276#endif /* __ALPHA_PCI_H */
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h
deleted file mode 100644
index 3495e8e00d70..000000000000
--- a/include/asm-alpha/percpu.h
+++ /dev/null
@@ -1,78 +0,0 @@
1#ifndef __ALPHA_PERCPU_H
2#define __ALPHA_PERCPU_H
3#include <linux/compiler.h>
4#include <linux/threads.h>
5
6/*
7 * Determine the real variable name from the name visible in the
8 * kernel sources.
9 */
10#define per_cpu_var(var) per_cpu__##var
11
12#ifdef CONFIG_SMP
13
14/*
15 * per_cpu_offset() is the offset that has to be added to a
16 * percpu variable to get to the instance for a certain processor.
17 */
18extern unsigned long __per_cpu_offset[NR_CPUS];
19
20#define per_cpu_offset(x) (__per_cpu_offset[x])
21
22#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
23#ifdef CONFIG_DEBUG_PREEMPT
24#define my_cpu_offset per_cpu_offset(smp_processor_id())
25#else
26#define my_cpu_offset __my_cpu_offset
27#endif
28
29#ifndef MODULE
30#define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset))
31#define PER_CPU_ATTRIBUTES
32#else
33/*
34 * To calculate addresses of locally defined variables, GCC uses 32-bit
35 * displacement from the GP. Which doesn't work for per cpu variables in
36 * modules, as an offset to the kernel per cpu area is way above 4G.
37 *
38 * This forces allocation of a GOT entry for per cpu variable using
39 * ldq instruction with a 'literal' relocation.
40 */
41#define SHIFT_PERCPU_PTR(var, offset) ({ \
42 extern int simple_identifier_##var(void); \
43 unsigned long __ptr, tmp_gp; \
44 asm ( "br %1, 1f \n\
45 1: ldgp %1, 0(%1) \n\
46 ldq %0, per_cpu__" #var"(%1)\t!literal" \
47 : "=&r"(__ptr), "=&r"(tmp_gp)); \
48 (typeof(&per_cpu_var(var)))(__ptr + (offset)); })
49
50#define PER_CPU_ATTRIBUTES __used
51
52#endif /* MODULE */
53
54/*
55 * A percpu variable may point to a discarded regions. The following are
56 * established ways to produce a usable pointer from the percpu variable
57 * offset.
58 */
59#define per_cpu(var, cpu) \
60 (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu)))
61#define __get_cpu_var(var) \
62 (*SHIFT_PERCPU_PTR(var, my_cpu_offset))
63#define __raw_get_cpu_var(var) \
64 (*SHIFT_PERCPU_PTR(var, __my_cpu_offset))
65
66#else /* ! SMP */
67
68#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))
69#define __get_cpu_var(var) per_cpu_var(var)
70#define __raw_get_cpu_var(var) per_cpu_var(var)
71
72#define PER_CPU_ATTRIBUTES
73
74#endif /* SMP */
75
76#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name)
77
78#endif /* __ALPHA_PERCPU_H */
diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h
deleted file mode 100644
index fd090155dccd..000000000000
--- a/include/asm-alpha/pgalloc.h
+++ /dev/null
@@ -1,83 +0,0 @@
1#ifndef _ALPHA_PGALLOC_H
2#define _ALPHA_PGALLOC_H
3
4#include <linux/mm.h>
5#include <linux/mmzone.h>
6
7/*
8 * Allocate and free page tables. The xxx_kernel() versions are
9 * used to allocate a kernel page table - this turns on ASN bits
10 * if any.
11 */
12
13static inline void
14pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte)
15{
16 pmd_set(pmd, (pte_t *)(page_to_pa(pte) + PAGE_OFFSET));
17}
18#define pmd_pgtable(pmd) pmd_page(pmd)
19
20static inline void
21pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
22{
23 pmd_set(pmd, pte);
24}
25
26static inline void
27pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd)
28{
29 pgd_set(pgd, pmd);
30}
31
32extern pgd_t *pgd_alloc(struct mm_struct *mm);
33
34static inline void
35pgd_free(struct mm_struct *mm, pgd_t *pgd)
36{
37 free_page((unsigned long)pgd);
38}
39
40static inline pmd_t *
41pmd_alloc_one(struct mm_struct *mm, unsigned long address)
42{
43 pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
44 return ret;
45}
46
47static inline void
48pmd_free(struct mm_struct *mm, pmd_t *pmd)
49{
50 free_page((unsigned long)pmd);
51}
52
53extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
54
55static inline void
56pte_free_kernel(struct mm_struct *mm, pte_t *pte)
57{
58 free_page((unsigned long)pte);
59}
60
61static inline pgtable_t
62pte_alloc_one(struct mm_struct *mm, unsigned long address)
63{
64 pte_t *pte = pte_alloc_one_kernel(mm, address);
65 struct page *page;
66
67 if (!pte)
68 return NULL;
69 page = virt_to_page(pte);
70 pgtable_page_ctor(page);
71 return page;
72}
73
74static inline void
75pte_free(struct mm_struct *mm, pgtable_t page)
76{
77 pgtable_page_dtor(page);
78 __free_page(page);
79}
80
81#define check_pgt_cache() do { } while (0)
82
83#endif /* _ALPHA_PGALLOC_H */
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
deleted file mode 100644
index 3f0c59f6d8aa..000000000000
--- a/include/asm-alpha/pgtable.h
+++ /dev/null
@@ -1,380 +0,0 @@
1#ifndef _ALPHA_PGTABLE_H
2#define _ALPHA_PGTABLE_H
3
4#include <asm-generic/4level-fixup.h>
5
6/*
7 * This file contains the functions and defines necessary to modify and use
8 * the Alpha page table tree.
9 *
10 * This hopefully works with any standard Alpha page-size, as defined
11 * in <asm/page.h> (currently 8192).
12 */
13#include <linux/mmzone.h>
14
15#include <asm/page.h>
16#include <asm/processor.h> /* For TASK_SIZE */
17#include <asm/machvec.h>
18
19struct mm_struct;
20struct vm_area_struct;
21
22/* Certain architectures need to do special things when PTEs
23 * within a page table are directly modified. Thus, the following
24 * hook is made available.
25 */
26#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
27#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
28
29/* PMD_SHIFT determines the size of the area a second-level page table can map */
30#define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3))
31#define PMD_SIZE (1UL << PMD_SHIFT)
32#define PMD_MASK (~(PMD_SIZE-1))
33
34/* PGDIR_SHIFT determines what a third-level page table entry can map */
35#define PGDIR_SHIFT (PAGE_SHIFT + 2*(PAGE_SHIFT-3))
36#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
37#define PGDIR_MASK (~(PGDIR_SIZE-1))
38
39/*
40 * Entries per page directory level: the Alpha is three-level, with
41 * all levels having a one-page page table.
42 */
43#define PTRS_PER_PTE (1UL << (PAGE_SHIFT-3))
44#define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3))
45#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3))
46#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
47#define FIRST_USER_ADDRESS 0
48
49/* Number of pointers that fit on a page: this will go away. */
50#define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3))
51
52#ifdef CONFIG_ALPHA_LARGE_VMALLOC
53#define VMALLOC_START 0xfffffe0000000000
54#else
55#define VMALLOC_START (-2*PGDIR_SIZE)
56#endif
57#define VMALLOC_END (-PGDIR_SIZE)
58
59/*
60 * OSF/1 PAL-code-imposed page table bits
61 */
62#define _PAGE_VALID 0x0001
63#define _PAGE_FOR 0x0002 /* used for page protection (fault on read) */
64#define _PAGE_FOW 0x0004 /* used for page protection (fault on write) */
65#define _PAGE_FOE 0x0008 /* used for page protection (fault on exec) */
66#define _PAGE_ASM 0x0010
67#define _PAGE_KRE 0x0100 /* xxx - see below on the "accessed" bit */
68#define _PAGE_URE 0x0200 /* xxx */
69#define _PAGE_KWE 0x1000 /* used to do the dirty bit in software */
70#define _PAGE_UWE 0x2000 /* used to do the dirty bit in software */
71
72/* .. and these are ours ... */
73#define _PAGE_DIRTY 0x20000
74#define _PAGE_ACCESSED 0x40000
75#define _PAGE_FILE 0x80000 /* set:pagecache, unset:swap */
76
77/*
78 * NOTE! The "accessed" bit isn't necessarily exact: it can be kept exactly
79 * by software (use the KRE/URE/KWE/UWE bits appropriately), but I'll fake it.
80 * Under Linux/AXP, the "accessed" bit just means "read", and I'll just use
81 * the KRE/URE bits to watch for it. That way we don't need to overload the
82 * KWE/UWE bits with both handling dirty and accessed.
83 *
84 * Note that the kernel uses the accessed bit just to check whether to page
85 * out a page or not, so it doesn't have to be exact anyway.
86 */
87
88#define __DIRTY_BITS (_PAGE_DIRTY | _PAGE_KWE | _PAGE_UWE)
89#define __ACCESS_BITS (_PAGE_ACCESSED | _PAGE_KRE | _PAGE_URE)
90
91#define _PFN_MASK 0xFFFFFFFF00000000UL
92
93#define _PAGE_TABLE (_PAGE_VALID | __DIRTY_BITS | __ACCESS_BITS)
94#define _PAGE_CHG_MASK (_PFN_MASK | __DIRTY_BITS | __ACCESS_BITS)
95
96/*
97 * All the normal masks have the "page accessed" bits on, as any time they are used,
98 * the page is accessed. They are cleared only by the page-out routines
99 */
100#define PAGE_NONE __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOR | _PAGE_FOW | _PAGE_FOE)
101#define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS)
102#define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
103#define PAGE_READONLY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
104#define PAGE_KERNEL __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
105
106#define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
107
108#define _PAGE_P(x) _PAGE_NORMAL((x) | (((x) & _PAGE_FOW)?0:_PAGE_FOW))
109#define _PAGE_S(x) _PAGE_NORMAL(x)
110
111/*
112 * The hardware can handle write-only mappings, but as the Alpha
113 * architecture does byte-wide writes with a read-modify-write
114 * sequence, it's not practical to have write-without-read privs.
115 * Thus the "-w- -> rw-" and "-wx -> rwx" mapping here (and in
116 * arch/alpha/mm/fault.c)
117 */
118 /* xwr */
119#define __P000 _PAGE_P(_PAGE_FOE | _PAGE_FOW | _PAGE_FOR)
120#define __P001 _PAGE_P(_PAGE_FOE | _PAGE_FOW)
121#define __P010 _PAGE_P(_PAGE_FOE)
122#define __P011 _PAGE_P(_PAGE_FOE)
123#define __P100 _PAGE_P(_PAGE_FOW | _PAGE_FOR)
124#define __P101 _PAGE_P(_PAGE_FOW)
125#define __P110 _PAGE_P(0)
126#define __P111 _PAGE_P(0)
127
128#define __S000 _PAGE_S(_PAGE_FOE | _PAGE_FOW | _PAGE_FOR)
129#define __S001 _PAGE_S(_PAGE_FOE | _PAGE_FOW)
130#define __S010 _PAGE_S(_PAGE_FOE)
131#define __S011 _PAGE_S(_PAGE_FOE)
132#define __S100 _PAGE_S(_PAGE_FOW | _PAGE_FOR)
133#define __S101 _PAGE_S(_PAGE_FOW)
134#define __S110 _PAGE_S(0)
135#define __S111 _PAGE_S(0)
136
137/*
138 * pgprot_noncached() is only for infiniband pci support, and a real
139 * implementation for RAM would be more complicated.
140 */
141#define pgprot_noncached(prot) (prot)
142
143/*
144 * BAD_PAGETABLE is used when we need a bogus page-table, while
145 * BAD_PAGE is used for a bogus page.
146 *
147 * ZERO_PAGE is a global shared page that is always zero: used
148 * for zero-mapped memory areas etc..
149 */
150extern pte_t __bad_page(void);
151extern pmd_t * __bad_pagetable(void);
152
153extern unsigned long __zero_page(void);
154
155#define BAD_PAGETABLE __bad_pagetable()
156#define BAD_PAGE __bad_page()
157#define ZERO_PAGE(vaddr) (virt_to_page(ZERO_PGE))
158
159/* number of bits that fit into a memory pointer */
160#define BITS_PER_PTR (8*sizeof(unsigned long))
161
162/* to align the pointer to a pointer address */
163#define PTR_MASK (~(sizeof(void*)-1))
164
165/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
166#define SIZEOF_PTR_LOG2 3
167
168/* to find an entry in a page-table */
169#define PAGE_PTR(address) \
170 ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
171
172/*
173 * On certain platforms whose physical address space can overlap KSEG,
174 * namely EV6 and above, we must re-twiddle the physaddr to restore the
175 * correct high-order bits.
176 *
177 * This is extremely confusing until you realize that this is actually
178 * just working around a userspace bug. The X server was intending to
179 * provide the physical address but instead provided the KSEG address.
180 * Or tried to, except it's not representable.
181 *
182 * On Tsunami there's nothing meaningful at 0x40000000000, so this is
183 * a safe thing to do. Come the first core logic that does put something
184 * in this area -- memory or whathaveyou -- then this hack will have
185 * to go away. So be prepared!
186 */
187
188#if defined(CONFIG_ALPHA_GENERIC) && defined(USE_48_BIT_KSEG)
189#error "EV6-only feature in a generic kernel"
190#endif
191#if defined(CONFIG_ALPHA_GENERIC) || \
192 (defined(CONFIG_ALPHA_EV6) && !defined(USE_48_BIT_KSEG))
193#define KSEG_PFN (0xc0000000000UL >> PAGE_SHIFT)
194#define PHYS_TWIDDLE(pfn) \
195 ((((pfn) & KSEG_PFN) == (0x40000000000UL >> PAGE_SHIFT)) \
196 ? ((pfn) ^= KSEG_PFN) : (pfn))
197#else
198#define PHYS_TWIDDLE(pfn) (pfn)
199#endif
200
201/*
202 * Conversion functions: convert a page and protection to a page entry,
203 * and a page entry and page directory to the page they refer to.
204 */
205#ifndef CONFIG_DISCONTIGMEM
206#define page_to_pa(page) (((page) - mem_map) << PAGE_SHIFT)
207
208#define pte_pfn(pte) (pte_val(pte) >> 32)
209#define pte_page(pte) pfn_to_page(pte_pfn(pte))
210#define mk_pte(page, pgprot) \
211({ \
212 pte_t pte; \
213 \
214 pte_val(pte) = (page_to_pfn(page) << 32) | pgprot_val(pgprot); \
215 pte; \
216})
217#endif
218
219extern inline pte_t pfn_pte(unsigned long physpfn, pgprot_t pgprot)
220{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpfn) << 32) | pgprot_val(pgprot); return pte; }
221
222extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
223{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
224
225extern inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
226{ pmd_val(*pmdp) = _PAGE_TABLE | ((((unsigned long) ptep) - PAGE_OFFSET) << (32-PAGE_SHIFT)); }
227
228extern inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
229{ pgd_val(*pgdp) = _PAGE_TABLE | ((((unsigned long) pmdp) - PAGE_OFFSET) << (32-PAGE_SHIFT)); }
230
231
232extern inline unsigned long
233pmd_page_vaddr(pmd_t pmd)
234{
235 return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET;
236}
237
238#ifndef CONFIG_DISCONTIGMEM
239#define pmd_page(pmd) (mem_map + ((pmd_val(pmd) & _PFN_MASK) >> 32))
240#define pgd_page(pgd) (mem_map + ((pgd_val(pgd) & _PFN_MASK) >> 32))
241#endif
242
243extern inline unsigned long pgd_page_vaddr(pgd_t pgd)
244{ return PAGE_OFFSET + ((pgd_val(pgd) & _PFN_MASK) >> (32-PAGE_SHIFT)); }
245
246extern inline int pte_none(pte_t pte) { return !pte_val(pte); }
247extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_VALID; }
248extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
249{
250 pte_val(*ptep) = 0;
251}
252
253extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); }
254extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~_PFN_MASK) != _PAGE_TABLE; }
255extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_VALID; }
256extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; }
257
258extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); }
259extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~_PFN_MASK) != _PAGE_TABLE; }
260extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_VALID; }
261extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; }
262
263/*
264 * The following only work if pte_present() is true.
265 * Undefined behaviour if not..
266 */
267extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
268extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
269extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
270extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
271extern inline int pte_special(pte_t pte) { return 0; }
272
273extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
274extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; }
275extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); return pte; }
276extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_FOW; return pte; }
277extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; }
278extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; }
279extern inline pte_t pte_mkspecial(pte_t pte) { return pte; }
280
281#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
282
283/* to find an entry in a kernel page-table-directory */
284#define pgd_offset_k(address) pgd_offset(&init_mm, (address))
285
286/* to find an entry in a page-table-directory. */
287#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
288#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
289
290/*
291 * The smp_read_barrier_depends() in the following functions are required to
292 * order the load of *dir (the pointer in the top level page table) with any
293 * subsequent load of the returned pmd_t *ret (ret is data dependent on *dir).
294 *
295 * If this ordering is not enforced, the CPU might load an older value of
296 * *ret, which may be uninitialized data. See mm/memory.c:__pte_alloc for
297 * more details.
298 *
299 * Note that we never change the mm->pgd pointer after the task is running, so
300 * pgd_offset does not require such a barrier.
301 */
302
303/* Find an entry in the second-level page table.. */
304extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
305{
306 pmd_t *ret = (pmd_t *) pgd_page_vaddr(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1));
307 smp_read_barrier_depends(); /* see above */
308 return ret;
309}
310
311/* Find an entry in the third-level page table.. */
312extern inline pte_t * pte_offset_kernel(pmd_t * dir, unsigned long address)
313{
314 pte_t *ret = (pte_t *) pmd_page_vaddr(*dir)
315 + ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1));
316 smp_read_barrier_depends(); /* see above */
317 return ret;
318}
319
320#define pte_offset_map(dir,addr) pte_offset_kernel((dir),(addr))
321#define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir),(addr))
322#define pte_unmap(pte) do { } while (0)
323#define pte_unmap_nested(pte) do { } while (0)
324
325extern pgd_t swapper_pg_dir[1024];
326
327/*
328 * The Alpha doesn't have any external MMU info: the kernel page
329 * tables contain all the necessary information.
330 */
331extern inline void update_mmu_cache(struct vm_area_struct * vma,
332 unsigned long address, pte_t pte)
333{
334}
335
336/*
337 * Non-present pages: high 24 bits are offset, next 8 bits type,
338 * low 32 bits zero.
339 */
340extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
341{ pte_t pte; pte_val(pte) = (type << 32) | (offset << 40); return pte; }
342
343#define __swp_type(x) (((x).val >> 32) & 0xff)
344#define __swp_offset(x) ((x).val >> 40)
345#define __swp_entry(type, off) ((swp_entry_t) { pte_val(mk_swap_pte((type), (off))) })
346#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
347#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
348
349#define pte_to_pgoff(pte) (pte_val(pte) >> 32)
350#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
351
352#define PTE_FILE_MAX_BITS 32
353
354#ifndef CONFIG_DISCONTIGMEM
355#define kern_addr_valid(addr) (1)
356#endif
357
358#define io_remap_pfn_range(vma, start, pfn, size, prot) \
359 remap_pfn_range(vma, start, pfn, size, prot)
360
361#define pte_ERROR(e) \
362 printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
363#define pmd_ERROR(e) \
364 printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
365#define pgd_ERROR(e) \
366 printk("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
367
368extern void paging_init(void);
369
370#include <asm-generic/pgtable.h>
371
372/*
373 * No page table caches to initialise
374 */
375#define pgtable_cache_init() do { } while (0)
376
377/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */
378#define HAVE_ARCH_UNMAPPED_AREA
379
380#endif /* _ALPHA_PGTABLE_H */
diff --git a/include/asm-alpha/poll.h b/include/asm-alpha/poll.h
deleted file mode 100644
index c98509d3149e..000000000000
--- a/include/asm-alpha/poll.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/poll.h>
diff --git a/include/asm-alpha/posix_types.h b/include/asm-alpha/posix_types.h
deleted file mode 100644
index db167413300b..000000000000
--- a/include/asm-alpha/posix_types.h
+++ /dev/null
@@ -1,123 +0,0 @@
1#ifndef _ALPHA_POSIX_TYPES_H
2#define _ALPHA_POSIX_TYPES_H
3
4/*
5 * This file is generally used by user-level software, so you need to
6 * be a little careful about namespace pollution etc. Also, we cannot
7 * assume GCC is being used.
8 */
9
10typedef unsigned int __kernel_ino_t;
11typedef unsigned int __kernel_mode_t;
12typedef unsigned int __kernel_nlink_t;
13typedef long __kernel_off_t;
14typedef long long __kernel_loff_t;
15typedef int __kernel_pid_t;
16typedef int __kernel_ipc_pid_t;
17typedef unsigned int __kernel_uid_t;
18typedef unsigned int __kernel_gid_t;
19typedef unsigned long __kernel_size_t;
20typedef long __kernel_ssize_t;
21typedef long __kernel_ptrdiff_t;
22typedef long __kernel_time_t;
23typedef long __kernel_suseconds_t;
24typedef long __kernel_clock_t;
25typedef int __kernel_daddr_t;
26typedef char * __kernel_caddr_t;
27typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
28typedef unsigned short __kernel_uid16_t;
29typedef unsigned short __kernel_gid16_t;
30typedef int __kernel_clockid_t;
31typedef int __kernel_timer_t;
32
33typedef struct {
34 int val[2];
35} __kernel_fsid_t;
36
37typedef __kernel_uid_t __kernel_old_uid_t;
38typedef __kernel_gid_t __kernel_old_gid_t;
39typedef __kernel_uid_t __kernel_uid32_t;
40typedef __kernel_gid_t __kernel_gid32_t;
41
42typedef unsigned int __kernel_old_dev_t;
43
44#ifdef __KERNEL__
45
46#ifndef __GNUC__
47
48#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
49#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
50#define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0)
51#define __FD_ZERO(set) \
52 ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set)))
53
54#else /* __GNUC__ */
55
56/* With GNU C, use inline functions instead so args are evaluated only once: */
57
58#undef __FD_SET
59static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
60{
61 unsigned long _tmp = fd / __NFDBITS;
62 unsigned long _rem = fd % __NFDBITS;
63 fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
64}
65
66#undef __FD_CLR
67static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
68{
69 unsigned long _tmp = fd / __NFDBITS;
70 unsigned long _rem = fd % __NFDBITS;
71 fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
72}
73
74#undef __FD_ISSET
75static __inline__ int __FD_ISSET(unsigned long fd, const __kernel_fd_set *p)
76{
77 unsigned long _tmp = fd / __NFDBITS;
78 unsigned long _rem = fd % __NFDBITS;
79 return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
80}
81
82/*
83 * This will unroll the loop for the normal constant case (8 ints,
84 * for a 256-bit fd_set)
85 */
86#undef __FD_ZERO
87static __inline__ void __FD_ZERO(__kernel_fd_set *p)
88{
89 unsigned long *tmp = p->fds_bits;
90 int i;
91
92 if (__builtin_constant_p(__FDSET_LONGS)) {
93 switch (__FDSET_LONGS) {
94 case 16:
95 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
96 tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
97 tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
98 tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
99 return;
100
101 case 8:
102 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
103 tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
104 return;
105
106 case 4:
107 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
108 return;
109 }
110 }
111 i = __FDSET_LONGS;
112 while (i) {
113 i--;
114 *tmp = 0;
115 tmp++;
116 }
117}
118
119#endif /* __GNUC__ */
120
121#endif /* __KERNEL__ */
122
123#endif /* _ALPHA_POSIX_TYPES_H */
diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h
deleted file mode 100644
index 94afe5859301..000000000000
--- a/include/asm-alpha/processor.h
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 * include/asm-alpha/processor.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7#ifndef __ASM_ALPHA_PROCESSOR_H
8#define __ASM_ALPHA_PROCESSOR_H
9
10#include <linux/personality.h> /* for ADDR_LIMIT_32BIT */
11
12/*
13 * Returns current instruction pointer ("program counter").
14 */
15#define current_text_addr() \
16 ({ void *__pc; __asm__ ("br %0,.+4" : "=r"(__pc)); __pc; })
17
18/*
19 * We have a 42-bit user address space: 4TB user VM...
20 */
21#define TASK_SIZE (0x40000000000UL)
22
23#define STACK_TOP \
24 (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
25
26#define STACK_TOP_MAX 0x00120000000UL
27
28/* This decides where the kernel will search for a free chunk of vm
29 * space during mmap's.
30 */
31#define TASK_UNMAPPED_BASE \
32 ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
33
34typedef struct {
35 unsigned long seg;
36} mm_segment_t;
37
38/* This is dead. Everything has been moved to thread_info. */
39struct thread_struct { };
40#define INIT_THREAD { }
41
42/* Return saved PC of a blocked thread. */
43struct task_struct;
44extern unsigned long thread_saved_pc(struct task_struct *);
45
46/* Do necessary setup to start up a newly executed thread. */
47extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
48
49/* Free all resources held by a thread. */
50extern void release_thread(struct task_struct *);
51
52/* Prepare to copy thread state - unlazy all lazy status */
53#define prepare_to_copy(tsk) do { } while (0)
54
55/* Create a kernel thread without removing it from tasklists. */
56extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
57
58unsigned long get_wchan(struct task_struct *p);
59
60#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
61
62#define KSTK_ESP(tsk) \
63 ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp)
64
65#define cpu_relax() barrier()
66
67#define ARCH_HAS_PREFETCH
68#define ARCH_HAS_PREFETCHW
69#define ARCH_HAS_SPINLOCK_PREFETCH
70
71#ifndef CONFIG_SMP
72/* Nothing to prefetch. */
73#define spin_lock_prefetch(lock) do { } while (0)
74#endif
75
76extern inline void prefetch(const void *ptr)
77{
78 __builtin_prefetch(ptr, 0, 3);
79}
80
81extern inline void prefetchw(const void *ptr)
82{
83 __builtin_prefetch(ptr, 1, 3);
84}
85
86#ifdef CONFIG_SMP
87extern inline void spin_lock_prefetch(const void *ptr)
88{
89 __builtin_prefetch(ptr, 1, 3);
90}
91#endif
92
93#endif /* __ASM_ALPHA_PROCESSOR_H */
diff --git a/include/asm-alpha/ptrace.h b/include/asm-alpha/ptrace.h
deleted file mode 100644
index 32c7a5cddd59..000000000000
--- a/include/asm-alpha/ptrace.h
+++ /dev/null
@@ -1,83 +0,0 @@
1#ifndef _ASMAXP_PTRACE_H
2#define _ASMAXP_PTRACE_H
3
4
5/*
6 * This struct defines the way the registers are stored on the
7 * kernel stack during a system call or other kernel entry
8 *
9 * NOTE! I want to minimize the overhead of system calls, so this
10 * struct has as little information as possible. I does not have
11 *
12 * - floating point regs: the kernel doesn't change those
13 * - r9-15: saved by the C compiler
14 *
15 * This makes "fork()" and "exec()" a bit more complex, but should
16 * give us low system call latency.
17 */
18
19struct pt_regs {
20 unsigned long r0;
21 unsigned long r1;
22 unsigned long r2;
23 unsigned long r3;
24 unsigned long r4;
25 unsigned long r5;
26 unsigned long r6;
27 unsigned long r7;
28 unsigned long r8;
29 unsigned long r19;
30 unsigned long r20;
31 unsigned long r21;
32 unsigned long r22;
33 unsigned long r23;
34 unsigned long r24;
35 unsigned long r25;
36 unsigned long r26;
37 unsigned long r27;
38 unsigned long r28;
39 unsigned long hae;
40/* JRP - These are the values provided to a0-a2 by PALcode */
41 unsigned long trap_a0;
42 unsigned long trap_a1;
43 unsigned long trap_a2;
44/* These are saved by PAL-code: */
45 unsigned long ps;
46 unsigned long pc;
47 unsigned long gp;
48 unsigned long r16;
49 unsigned long r17;
50 unsigned long r18;
51};
52
53/*
54 * This is the extended stack used by signal handlers and the context
55 * switcher: it's pushed after the normal "struct pt_regs".
56 */
57struct switch_stack {
58 unsigned long r9;
59 unsigned long r10;
60 unsigned long r11;
61 unsigned long r12;
62 unsigned long r13;
63 unsigned long r14;
64 unsigned long r15;
65 unsigned long r26;
66 unsigned long fp[32]; /* fp[31] is fpcr */
67};
68
69#ifdef __KERNEL__
70
71#define user_mode(regs) (((regs)->ps & 8) != 0)
72#define instruction_pointer(regs) ((regs)->pc)
73#define profile_pc(regs) instruction_pointer(regs)
74extern void show_regs(struct pt_regs *);
75
76#define task_pt_regs(task) \
77 ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
78
79#define force_successful_syscall_return() (task_pt_regs(current)->r0 = 0)
80
81#endif
82
83#endif
diff --git a/include/asm-alpha/reg.h b/include/asm-alpha/reg.h
deleted file mode 100644
index 86ff916fb069..000000000000
--- a/include/asm-alpha/reg.h
+++ /dev/null
@@ -1,52 +0,0 @@
1#ifndef __reg_h__
2#define __reg_h__
3
4/*
5 * Exception frame offsets.
6 */
7#define EF_V0 0
8#define EF_T0 1
9#define EF_T1 2
10#define EF_T2 3
11#define EF_T3 4
12#define EF_T4 5
13#define EF_T5 6
14#define EF_T6 7
15#define EF_T7 8
16#define EF_S0 9
17#define EF_S1 10
18#define EF_S2 11
19#define EF_S3 12
20#define EF_S4 13
21#define EF_S5 14
22#define EF_S6 15
23#define EF_A3 16
24#define EF_A4 17
25#define EF_A5 18
26#define EF_T8 19
27#define EF_T9 20
28#define EF_T10 21
29#define EF_T11 22
30#define EF_RA 23
31#define EF_T12 24
32#define EF_AT 25
33#define EF_SP 26
34#define EF_PS 27
35#define EF_PC 28
36#define EF_GP 29
37#define EF_A0 30
38#define EF_A1 31
39#define EF_A2 32
40
41#define EF_SIZE (33*8)
42#define HWEF_SIZE (6*8) /* size of PAL frame (PS-A2) */
43
44#define EF_SSIZE (EF_SIZE - HWEF_SIZE)
45
46/*
47 * Map register number into core file offset.
48 */
49#define CORE_REG(reg, ubase) \
50 (((unsigned long *)((unsigned long)(ubase)))[reg])
51
52#endif /* __reg_h__ */
diff --git a/include/asm-alpha/regdef.h b/include/asm-alpha/regdef.h
deleted file mode 100644
index 142df9c4f8b8..000000000000
--- a/include/asm-alpha/regdef.h
+++ /dev/null
@@ -1,44 +0,0 @@
1#ifndef __alpha_regdef_h__
2#define __alpha_regdef_h__
3
4#define v0 $0 /* function return value */
5
6#define t0 $1 /* temporary registers (caller-saved) */
7#define t1 $2
8#define t2 $3
9#define t3 $4
10#define t4 $5
11#define t5 $6
12#define t6 $7
13#define t7 $8
14
15#define s0 $9 /* saved-registers (callee-saved registers) */
16#define s1 $10
17#define s2 $11
18#define s3 $12
19#define s4 $13
20#define s5 $14
21#define s6 $15
22#define fp s6 /* frame-pointer (s6 in frame-less procedures) */
23
24#define a0 $16 /* argument registers (caller-saved) */
25#define a1 $17
26#define a2 $18
27#define a3 $19
28#define a4 $20
29#define a5 $21
30
31#define t8 $22 /* more temps (caller-saved) */
32#define t9 $23
33#define t10 $24
34#define t11 $25
35#define ra $26 /* return address register */
36#define t12 $27
37
38#define pv t12 /* procedure-variable register */
39#define AT $at /* assembler temporary */
40#define gp $29 /* global pointer */
41#define sp $30 /* stack pointer */
42#define zero $31 /* reads as zero, writes are noops */
43
44#endif /* __alpha_regdef_h__ */
diff --git a/include/asm-alpha/resource.h b/include/asm-alpha/resource.h
deleted file mode 100644
index c10874ff5973..000000000000
--- a/include/asm-alpha/resource.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ALPHA_RESOURCE_H
2#define _ALPHA_RESOURCE_H
3
4/*
5 * Alpha/Linux-specific ordering of these four resource limit IDs,
6 * the rest comes from the generic header:
7 */
8#define RLIMIT_NOFILE 6 /* max number of open files */
9#define RLIMIT_AS 7 /* address space limit */
10#define RLIMIT_NPROC 8 /* max number of processes */
11#define RLIMIT_MEMLOCK 9 /* max locked-in-memory address space */
12
13/*
14 * SuS says limits have to be unsigned. Fine, it's unsigned, but
15 * we retain the old value for compatibility, especially with DU.
16 * When you run into the 2^63 barrier, you call me.
17 */
18#define RLIM_INFINITY 0x7ffffffffffffffful
19
20#include <asm-generic/resource.h>
21
22#endif /* _ALPHA_RESOURCE_H */
diff --git a/include/asm-alpha/rtc.h b/include/asm-alpha/rtc.h
deleted file mode 100644
index 4e854b1333eb..000000000000
--- a/include/asm-alpha/rtc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef _ALPHA_RTC_H
2#define _ALPHA_RTC_H
3
4/*
5 * Alpha uses the default access methods for the RTC.
6 */
7
8#include <asm-generic/rtc.h>
9
10#endif
diff --git a/include/asm-alpha/rwsem.h b/include/asm-alpha/rwsem.h
deleted file mode 100644
index 1570c0b54336..000000000000
--- a/include/asm-alpha/rwsem.h
+++ /dev/null
@@ -1,259 +0,0 @@
1#ifndef _ALPHA_RWSEM_H
2#define _ALPHA_RWSEM_H
3
4/*
5 * Written by Ivan Kokshaysky <ink@jurassic.park.msu.ru>, 2001.
6 * Based on asm-alpha/semaphore.h and asm-i386/rwsem.h
7 */
8
9#ifndef _LINUX_RWSEM_H
10#error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead"
11#endif
12
13#ifdef __KERNEL__
14
15#include <linux/compiler.h>
16#include <linux/list.h>
17#include <linux/spinlock.h>
18
19struct rwsem_waiter;
20
21extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
22extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
23extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *);
24extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
25
26/*
27 * the semaphore definition
28 */
29struct rw_semaphore {
30 long count;
31#define RWSEM_UNLOCKED_VALUE 0x0000000000000000L
32#define RWSEM_ACTIVE_BIAS 0x0000000000000001L
33#define RWSEM_ACTIVE_MASK 0x00000000ffffffffL
34#define RWSEM_WAITING_BIAS (-0x0000000100000000L)
35#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
36#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
37 spinlock_t wait_lock;
38 struct list_head wait_list;
39};
40
41#define __RWSEM_INITIALIZER(name) \
42 { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
43 LIST_HEAD_INIT((name).wait_list) }
44
45#define DECLARE_RWSEM(name) \
46 struct rw_semaphore name = __RWSEM_INITIALIZER(name)
47
48static inline void init_rwsem(struct rw_semaphore *sem)
49{
50 sem->count = RWSEM_UNLOCKED_VALUE;
51 spin_lock_init(&sem->wait_lock);
52 INIT_LIST_HEAD(&sem->wait_list);
53}
54
55static inline void __down_read(struct rw_semaphore *sem)
56{
57 long oldcount;
58#ifndef CONFIG_SMP
59 oldcount = sem->count;
60 sem->count += RWSEM_ACTIVE_READ_BIAS;
61#else
62 long temp;
63 __asm__ __volatile__(
64 "1: ldq_l %0,%1\n"
65 " addq %0,%3,%2\n"
66 " stq_c %2,%1\n"
67 " beq %2,2f\n"
68 " mb\n"
69 ".subsection 2\n"
70 "2: br 1b\n"
71 ".previous"
72 :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp)
73 :"Ir" (RWSEM_ACTIVE_READ_BIAS), "m" (sem->count) : "memory");
74#endif
75 if (unlikely(oldcount < 0))
76 rwsem_down_read_failed(sem);
77}
78
79/*
80 * trylock for reading -- returns 1 if successful, 0 if contention
81 */
82static inline int __down_read_trylock(struct rw_semaphore *sem)
83{
84 long old, new, res;
85
86 res = sem->count;
87 do {
88 new = res + RWSEM_ACTIVE_READ_BIAS;
89 if (new <= 0)
90 break;
91 old = res;
92 res = cmpxchg(&sem->count, old, new);
93 } while (res != old);
94 return res >= 0 ? 1 : 0;
95}
96
97static inline void __down_write(struct rw_semaphore *sem)
98{
99 long oldcount;
100#ifndef CONFIG_SMP
101 oldcount = sem->count;
102 sem->count += RWSEM_ACTIVE_WRITE_BIAS;
103#else
104 long temp;
105 __asm__ __volatile__(
106 "1: ldq_l %0,%1\n"
107 " addq %0,%3,%2\n"
108 " stq_c %2,%1\n"
109 " beq %2,2f\n"
110 " mb\n"
111 ".subsection 2\n"
112 "2: br 1b\n"
113 ".previous"
114 :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp)
115 :"Ir" (RWSEM_ACTIVE_WRITE_BIAS), "m" (sem->count) : "memory");
116#endif
117 if (unlikely(oldcount))
118 rwsem_down_write_failed(sem);
119}
120
121/*
122 * trylock for writing -- returns 1 if successful, 0 if contention
123 */
124static inline int __down_write_trylock(struct rw_semaphore *sem)
125{
126 long ret = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
127 RWSEM_ACTIVE_WRITE_BIAS);
128 if (ret == RWSEM_UNLOCKED_VALUE)
129 return 1;
130 return 0;
131}
132
133static inline void __up_read(struct rw_semaphore *sem)
134{
135 long oldcount;
136#ifndef CONFIG_SMP
137 oldcount = sem->count;
138 sem->count -= RWSEM_ACTIVE_READ_BIAS;
139#else
140 long temp;
141 __asm__ __volatile__(
142 " mb\n"
143 "1: ldq_l %0,%1\n"
144 " subq %0,%3,%2\n"
145 " stq_c %2,%1\n"
146 " beq %2,2f\n"
147 ".subsection 2\n"
148 "2: br 1b\n"
149 ".previous"
150 :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp)
151 :"Ir" (RWSEM_ACTIVE_READ_BIAS), "m" (sem->count) : "memory");
152#endif
153 if (unlikely(oldcount < 0))
154 if ((int)oldcount - RWSEM_ACTIVE_READ_BIAS == 0)
155 rwsem_wake(sem);
156}
157
158static inline void __up_write(struct rw_semaphore *sem)
159{
160 long count;
161#ifndef CONFIG_SMP
162 sem->count -= RWSEM_ACTIVE_WRITE_BIAS;
163 count = sem->count;
164#else
165 long temp;
166 __asm__ __volatile__(
167 " mb\n"
168 "1: ldq_l %0,%1\n"
169 " subq %0,%3,%2\n"
170 " stq_c %2,%1\n"
171 " beq %2,2f\n"
172 " subq %0,%3,%0\n"
173 ".subsection 2\n"
174 "2: br 1b\n"
175 ".previous"
176 :"=&r" (count), "=m" (sem->count), "=&r" (temp)
177 :"Ir" (RWSEM_ACTIVE_WRITE_BIAS), "m" (sem->count) : "memory");
178#endif
179 if (unlikely(count))
180 if ((int)count == 0)
181 rwsem_wake(sem);
182}
183
184/*
185 * downgrade write lock to read lock
186 */
187static inline void __downgrade_write(struct rw_semaphore *sem)
188{
189 long oldcount;
190#ifndef CONFIG_SMP
191 oldcount = sem->count;
192 sem->count -= RWSEM_WAITING_BIAS;
193#else
194 long temp;
195 __asm__ __volatile__(
196 "1: ldq_l %0,%1\n"
197 " addq %0,%3,%2\n"
198 " stq_c %2,%1\n"
199 " beq %2,2f\n"
200 " mb\n"
201 ".subsection 2\n"
202 "2: br 1b\n"
203 ".previous"
204 :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp)
205 :"Ir" (-RWSEM_WAITING_BIAS), "m" (sem->count) : "memory");
206#endif
207 if (unlikely(oldcount < 0))
208 rwsem_downgrade_wake(sem);
209}
210
211static inline void rwsem_atomic_add(long val, struct rw_semaphore *sem)
212{
213#ifndef CONFIG_SMP
214 sem->count += val;
215#else
216 long temp;
217 __asm__ __volatile__(
218 "1: ldq_l %0,%1\n"
219 " addq %0,%2,%0\n"
220 " stq_c %0,%1\n"
221 " beq %0,2f\n"
222 ".subsection 2\n"
223 "2: br 1b\n"
224 ".previous"
225 :"=&r" (temp), "=m" (sem->count)
226 :"Ir" (val), "m" (sem->count));
227#endif
228}
229
230static inline long rwsem_atomic_update(long val, struct rw_semaphore *sem)
231{
232#ifndef CONFIG_SMP
233 sem->count += val;
234 return sem->count;
235#else
236 long ret, temp;
237 __asm__ __volatile__(
238 "1: ldq_l %0,%1\n"
239 " addq %0,%3,%2\n"
240 " addq %0,%3,%0\n"
241 " stq_c %2,%1\n"
242 " beq %2,2f\n"
243 ".subsection 2\n"
244 "2: br 1b\n"
245 ".previous"
246 :"=&r" (ret), "=m" (sem->count), "=&r" (temp)
247 :"Ir" (val), "m" (sem->count));
248
249 return ret;
250#endif
251}
252
253static inline int rwsem_is_locked(struct rw_semaphore *sem)
254{
255 return (sem->count != 0);
256}
257
258#endif /* __KERNEL__ */
259#endif /* _ALPHA_RWSEM_H */
diff --git a/include/asm-alpha/scatterlist.h b/include/asm-alpha/scatterlist.h
deleted file mode 100644
index 440747ca6349..000000000000
--- a/include/asm-alpha/scatterlist.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _ALPHA_SCATTERLIST_H
2#define _ALPHA_SCATTERLIST_H
3
4#include <asm/page.h>
5#include <asm/types.h>
6
7struct scatterlist {
8#ifdef CONFIG_DEBUG_SG
9 unsigned long sg_magic;
10#endif
11 unsigned long page_link;
12 unsigned int offset;
13
14 unsigned int length;
15
16 dma_addr_t dma_address;
17 __u32 dma_length;
18};
19
20#define sg_dma_address(sg) ((sg)->dma_address)
21#define sg_dma_len(sg) ((sg)->dma_length)
22
23#define ISA_DMA_THRESHOLD (~0UL)
24
25#endif /* !(_ALPHA_SCATTERLIST_H) */
diff --git a/include/asm-alpha/sections.h b/include/asm-alpha/sections.h
deleted file mode 100644
index 43b40edd6e44..000000000000
--- a/include/asm-alpha/sections.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ALPHA_SECTIONS_H
2#define _ALPHA_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#endif
diff --git a/include/asm-alpha/segment.h b/include/asm-alpha/segment.h
deleted file mode 100644
index 0453d97daae7..000000000000
--- a/include/asm-alpha/segment.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ALPHA_SEGMENT_H
2#define __ALPHA_SEGMENT_H
3
4/* Only here because we have some old header files that expect it.. */
5
6#endif
diff --git a/include/asm-alpha/sembuf.h b/include/asm-alpha/sembuf.h
deleted file mode 100644
index 7b38b1534784..000000000000
--- a/include/asm-alpha/sembuf.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ALPHA_SEMBUF_H
2#define _ALPHA_SEMBUF_H
3
4/*
5 * The semid64_ds structure for alpha architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 2 miscellaneous 64-bit values
11 */
12
13struct semid64_ds {
14 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
15 __kernel_time_t sem_otime; /* last semop time */
16 __kernel_time_t sem_ctime; /* last change time */
17 unsigned long sem_nsems; /* no. of semaphores in array */
18 unsigned long __unused1;
19 unsigned long __unused2;
20};
21
22#endif /* _ALPHA_SEMBUF_H */
diff --git a/include/asm-alpha/serial.h b/include/asm-alpha/serial.h
deleted file mode 100644
index 9d263e8d8ccc..000000000000
--- a/include/asm-alpha/serial.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * include/asm-alpha/serial.h
3 */
4
5
6/*
7 * This assumes you have a 1.8432 MHz clock for your UART.
8 *
9 * It'd be nice if someone built a serial card with a 24.576 MHz
10 * clock, since the 16550A is capable of handling a top speed of 1.5
11 * megabits/second; but this requires the faster clock.
12 */
13#define BASE_BAUD ( 1843200 / 16 )
14
15/* Standard COM flags (except for COM4, because of the 8514 problem) */
16#ifdef CONFIG_SERIAL_DETECT_IRQ
17#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
18#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
19#else
20#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
21#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
22#endif
23
24#define SERIAL_PORT_DFNS \
25 /* UART CLK PORT IRQ FLAGS */ \
26 { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
27 { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
28 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
29 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
diff --git a/include/asm-alpha/setup.h b/include/asm-alpha/setup.h
deleted file mode 100644
index 2e023a4aa317..000000000000
--- a/include/asm-alpha/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ALPHA_SETUP_H
2#define __ALPHA_SETUP_H
3
4#define COMMAND_LINE_SIZE 256
5
6#endif
diff --git a/include/asm-alpha/sfp-machine.h b/include/asm-alpha/sfp-machine.h
deleted file mode 100644
index 5fe63afbd474..000000000000
--- a/include/asm-alpha/sfp-machine.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/* Machine-dependent software floating-point definitions.
2 Alpha kernel version.
3 Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5 Contributed by Richard Henderson (rth@cygnus.com),
6 Jakub Jelinek (jakub@redhat.com) and
7 David S. Miller (davem@redhat.com).
8
9 The GNU C Library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version.
13
14 The GNU C Library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
18
19 You should have received a copy of the GNU Library General Public
20 License along with the GNU C Library; see the file COPYING.LIB. If
21 not, write to the Free Software Foundation, Inc.,
22 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23
24#ifndef _SFP_MACHINE_H
25#define _SFP_MACHINE_H
26
27#define _FP_W_TYPE_SIZE 64
28#define _FP_W_TYPE unsigned long
29#define _FP_WS_TYPE signed long
30#define _FP_I_TYPE long
31
32#define _FP_MUL_MEAT_S(R,X,Y) \
33 _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
34#define _FP_MUL_MEAT_D(R,X,Y) \
35 _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
36#define _FP_MUL_MEAT_Q(R,X,Y) \
37 _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
38
39#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
40#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv(D,R,X,Y)
41#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
42
43#define _FP_NANFRAC_S _FP_QNANBIT_S
44#define _FP_NANFRAC_D _FP_QNANBIT_D
45#define _FP_NANFRAC_Q _FP_QNANBIT_Q
46#define _FP_NANSIGN_S 1
47#define _FP_NANSIGN_D 1
48#define _FP_NANSIGN_Q 1
49
50#define _FP_KEEPNANFRACP 1
51
52/* Alpha Architecture Handbook, 4.7.10.4 sais that
53 * we should prefer any type of NaN in Fb, then Fa.
54 */
55#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
56 do { \
57 R##_s = Y##_s; \
58 _FP_FRAC_COPY_##wc(R,X); \
59 R##_c = FP_CLS_NAN; \
60 } while (0)
61
62/* Obtain the current rounding mode. */
63#define FP_ROUNDMODE mode
64#define FP_RND_NEAREST (FPCR_DYN_NORMAL >> FPCR_DYN_SHIFT)
65#define FP_RND_ZERO (FPCR_DYN_CHOPPED >> FPCR_DYN_SHIFT)
66#define FP_RND_PINF (FPCR_DYN_PLUS >> FPCR_DYN_SHIFT)
67#define FP_RND_MINF (FPCR_DYN_MINUS >> FPCR_DYN_SHIFT)
68
69/* Exception flags. */
70#define FP_EX_INVALID IEEE_TRAP_ENABLE_INV
71#define FP_EX_OVERFLOW IEEE_TRAP_ENABLE_OVF
72#define FP_EX_UNDERFLOW IEEE_TRAP_ENABLE_UNF
73#define FP_EX_DIVZERO IEEE_TRAP_ENABLE_DZE
74#define FP_EX_INEXACT IEEE_TRAP_ENABLE_INE
75#define FP_EX_DENORM IEEE_TRAP_ENABLE_DNO
76
77#define FP_DENORM_ZERO (swcr & IEEE_MAP_DMZ)
78
79/* We write the results always */
80#define FP_INHIBIT_RESULTS 0
81
82#endif
diff --git a/include/asm-alpha/shmbuf.h b/include/asm-alpha/shmbuf.h
deleted file mode 100644
index 37ee84f05085..000000000000
--- a/include/asm-alpha/shmbuf.h
+++ /dev/null
@@ -1,38 +0,0 @@
1#ifndef _ALPHA_SHMBUF_H
2#define _ALPHA_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for alpha architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 2 miscellaneous 64-bit values
11 */
12
13struct shmid64_ds {
14 struct ipc64_perm shm_perm; /* operation perms */
15 size_t shm_segsz; /* size of segment (bytes) */
16 __kernel_time_t shm_atime; /* last attach time */
17 __kernel_time_t shm_dtime; /* last detach time */
18 __kernel_time_t shm_ctime; /* last change time */
19 __kernel_pid_t shm_cpid; /* pid of creator */
20 __kernel_pid_t shm_lpid; /* pid of last operator */
21 unsigned long shm_nattch; /* no. of current attaches */
22 unsigned long __unused1;
23 unsigned long __unused2;
24};
25
26struct shminfo64 {
27 unsigned long shmmax;
28 unsigned long shmmin;
29 unsigned long shmmni;
30 unsigned long shmseg;
31 unsigned long shmall;
32 unsigned long __unused1;
33 unsigned long __unused2;
34 unsigned long __unused3;
35 unsigned long __unused4;
36};
37
38#endif /* _ALPHA_SHMBUF_H */
diff --git a/include/asm-alpha/shmparam.h b/include/asm-alpha/shmparam.h
deleted file mode 100644
index cc901d58aebb..000000000000
--- a/include/asm-alpha/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASMAXP_SHMPARAM_H
2#define _ASMAXP_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _ASMAXP_SHMPARAM_H */
diff --git a/include/asm-alpha/sigcontext.h b/include/asm-alpha/sigcontext.h
deleted file mode 100644
index 323cdb026198..000000000000
--- a/include/asm-alpha/sigcontext.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef _ASMAXP_SIGCONTEXT_H
2#define _ASMAXP_SIGCONTEXT_H
3
4struct sigcontext {
5 /*
6 * What should we have here? I'd probably better use the same
7 * stack layout as OSF/1, just in case we ever want to try
8 * running their binaries..
9 *
10 * This is the basic layout, but I don't know if we'll ever
11 * actually fill in all the values..
12 */
13 long sc_onstack;
14 long sc_mask;
15 long sc_pc;
16 long sc_ps;
17 long sc_regs[32];
18 long sc_ownedfp;
19 long sc_fpregs[32];
20 unsigned long sc_fpcr;
21 unsigned long sc_fp_control;
22 unsigned long sc_reserved1, sc_reserved2;
23 unsigned long sc_ssize;
24 char * sc_sbase;
25 unsigned long sc_traparg_a0;
26 unsigned long sc_traparg_a1;
27 unsigned long sc_traparg_a2;
28 unsigned long sc_fp_trap_pc;
29 unsigned long sc_fp_trigger_sum;
30 unsigned long sc_fp_trigger_inst;
31};
32
33
34#endif
diff --git a/include/asm-alpha/siginfo.h b/include/asm-alpha/siginfo.h
deleted file mode 100644
index 9822362a8424..000000000000
--- a/include/asm-alpha/siginfo.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ALPHA_SIGINFO_H
2#define _ALPHA_SIGINFO_H
3
4#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
5#define __ARCH_SI_TRAPNO
6
7#include <asm-generic/siginfo.h>
8
9#endif
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
deleted file mode 100644
index 13c2305d35ef..000000000000
--- a/include/asm-alpha/signal.h
+++ /dev/null
@@ -1,172 +0,0 @@
1#ifndef _ASMAXP_SIGNAL_H
2#define _ASMAXP_SIGNAL_H
3
4#include <linux/types.h>
5
6/* Avoid too many header ordering problems. */
7struct siginfo;
8
9#ifdef __KERNEL__
10/* Digital Unix defines 64 signals. Most things should be clean enough
11 to redefine this at will, if care is taken to make libc match. */
12
13#define _NSIG 64
14#define _NSIG_BPW 64
15#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
16
17typedef unsigned long old_sigset_t; /* at least 32 bits */
18
19typedef struct {
20 unsigned long sig[_NSIG_WORDS];
21} sigset_t;
22
23#else
24/* Here we must cater to libcs that poke about in kernel headers. */
25
26#define NSIG 32
27typedef unsigned long sigset_t;
28
29#endif /* __KERNEL__ */
30
31
32/*
33 * Linux/AXP has different signal numbers that Linux/i386: I'm trying
34 * to make it OSF/1 binary compatible, at least for normal binaries.
35 */
36#define SIGHUP 1
37#define SIGINT 2
38#define SIGQUIT 3
39#define SIGILL 4
40#define SIGTRAP 5
41#define SIGABRT 6
42#define SIGEMT 7
43#define SIGFPE 8
44#define SIGKILL 9
45#define SIGBUS 10
46#define SIGSEGV 11
47#define SIGSYS 12
48#define SIGPIPE 13
49#define SIGALRM 14
50#define SIGTERM 15
51#define SIGURG 16
52#define SIGSTOP 17
53#define SIGTSTP 18
54#define SIGCONT 19
55#define SIGCHLD 20
56#define SIGTTIN 21
57#define SIGTTOU 22
58#define SIGIO 23
59#define SIGXCPU 24
60#define SIGXFSZ 25
61#define SIGVTALRM 26
62#define SIGPROF 27
63#define SIGWINCH 28
64#define SIGINFO 29
65#define SIGUSR1 30
66#define SIGUSR2 31
67
68#define SIGPOLL SIGIO
69#define SIGPWR SIGINFO
70#define SIGIOT SIGABRT
71
72/* These should not be considered constants from userland. */
73#define SIGRTMIN 32
74#define SIGRTMAX _NSIG
75
76/*
77 * SA_FLAGS values:
78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_RESTART flag to get restarting signals (which were the default long ago)
81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
82 * SA_RESETHAND clears the handler when the signal is delivered.
83 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
84 * SA_NODEFER prevents the current signal from being masked in the handler.
85 *
86 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
87 * Unix names RESETHAND and NODEFER respectively.
88 */
89
90#define SA_ONSTACK 0x00000001
91#define SA_RESTART 0x00000002
92#define SA_NOCLDSTOP 0x00000004
93#define SA_NODEFER 0x00000008
94#define SA_RESETHAND 0x00000010
95#define SA_NOCLDWAIT 0x00000020
96#define SA_SIGINFO 0x00000040
97
98#define SA_ONESHOT SA_RESETHAND
99#define SA_NOMASK SA_NODEFER
100
101/*
102 * sigaltstack controls
103 */
104#define SS_ONSTACK 1
105#define SS_DISABLE 2
106
107#define MINSIGSTKSZ 4096
108#define SIGSTKSZ 16384
109
110#define SIG_BLOCK 1 /* for blocking signals */
111#define SIG_UNBLOCK 2 /* for unblocking signals */
112#define SIG_SETMASK 3 /* for setting the signal mask */
113
114#include <asm-generic/signal.h>
115
116#ifdef __KERNEL__
117struct osf_sigaction {
118 __sighandler_t sa_handler;
119 old_sigset_t sa_mask;
120 int sa_flags;
121};
122
123struct sigaction {
124 __sighandler_t sa_handler;
125 unsigned long sa_flags;
126 sigset_t sa_mask; /* mask last for extensibility */
127};
128
129struct k_sigaction {
130 struct sigaction sa;
131 __sigrestore_t ka_restorer;
132};
133#else
134/* Here we must cater to libcs that poke about in kernel headers. */
135
136struct sigaction {
137 union {
138 __sighandler_t _sa_handler;
139 void (*_sa_sigaction)(int, struct siginfo *, void *);
140 } _u;
141 sigset_t sa_mask;
142 int sa_flags;
143};
144
145#define sa_handler _u._sa_handler
146#define sa_sigaction _u._sa_sigaction
147
148#endif /* __KERNEL__ */
149
150typedef struct sigaltstack {
151 void __user *ss_sp;
152 int ss_flags;
153 size_t ss_size;
154} stack_t;
155
156/* sigstack(2) is deprecated, and will be withdrawn in a future version
157 of the X/Open CAE Specification. Use sigaltstack instead. It is only
158 implemented here for OSF/1 compatibility. */
159
160struct sigstack {
161 void __user *ss_sp;
162 int ss_onstack;
163};
164
165#ifdef __KERNEL__
166#include <asm/sigcontext.h>
167
168#define ptrace_signal_deliver(regs, cookie) do { } while (0)
169
170#endif
171
172#endif
diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h
deleted file mode 100644
index 544c69af8168..000000000000
--- a/include/asm-alpha/smp.h
+++ /dev/null
@@ -1,62 +0,0 @@
1#ifndef __ASM_SMP_H
2#define __ASM_SMP_H
3
4#include <linux/threads.h>
5#include <linux/cpumask.h>
6#include <linux/bitops.h>
7#include <asm/pal.h>
8
9/* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
10
11static __inline__ unsigned char
12__hard_smp_processor_id(void)
13{
14 register unsigned char __r0 __asm__("$0");
15 __asm__ __volatile__(
16 "call_pal %1 #whami"
17 : "=r"(__r0)
18 :"i" (PAL_whami)
19 : "$1", "$22", "$23", "$24", "$25");
20 return __r0;
21}
22
23#ifdef CONFIG_SMP
24
25#include <asm/irq.h>
26
27struct cpuinfo_alpha {
28 unsigned long loops_per_jiffy;
29 unsigned long last_asn;
30 int need_new_asn;
31 int asn_lock;
32 unsigned long ipi_count;
33 unsigned long prof_multiplier;
34 unsigned long prof_counter;
35 unsigned char mcheck_expected;
36 unsigned char mcheck_taken;
37 unsigned char mcheck_extra;
38} __attribute__((aligned(64)));
39
40extern struct cpuinfo_alpha cpu_data[NR_CPUS];
41
42#define PROC_CHANGE_PENALTY 20
43
44#define hard_smp_processor_id() __hard_smp_processor_id()
45#define raw_smp_processor_id() (current_thread_info()->cpu)
46
47extern int smp_num_cpus;
48#define cpu_possible_map cpu_present_map
49
50extern void arch_send_call_function_single_ipi(int cpu);
51extern void arch_send_call_function_ipi(cpumask_t mask);
52
53#else /* CONFIG_SMP */
54
55#define hard_smp_processor_id() 0
56#define smp_call_function_on_cpu(func,info,wait,cpu) ({ 0; })
57
58#endif /* CONFIG_SMP */
59
60#define NO_PROC_ID (-1)
61
62#endif
diff --git a/include/asm-alpha/socket.h b/include/asm-alpha/socket.h
deleted file mode 100644
index a1057c2d95e7..000000000000
--- a/include/asm-alpha/socket.h
+++ /dev/null
@@ -1,70 +0,0 @@
1#ifndef _ASM_SOCKET_H
2#define _ASM_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockopt(2) */
7/*
8 * Note: we only bother about making the SOL_SOCKET options
9 * same as OSF/1, as that's all that "normal" programs are
10 * likely to set. We don't necessarily want to be binary
11 * compatible with _everything_.
12 */
13#define SOL_SOCKET 0xffff
14
15#define SO_DEBUG 0x0001
16#define SO_REUSEADDR 0x0004
17#define SO_KEEPALIVE 0x0008
18#define SO_DONTROUTE 0x0010
19#define SO_BROADCAST 0x0020
20#define SO_LINGER 0x0080
21#define SO_OOBINLINE 0x0100
22/* To add :#define SO_REUSEPORT 0x0200 */
23
24#define SO_TYPE 0x1008
25#define SO_ERROR 0x1007
26#define SO_SNDBUF 0x1001
27#define SO_RCVBUF 0x1002
28#define SO_SNDBUFFORCE 0x100a
29#define SO_RCVBUFFORCE 0x100b
30#define SO_RCVLOWAT 0x1010
31#define SO_SNDLOWAT 0x1011
32#define SO_RCVTIMEO 0x1012
33#define SO_SNDTIMEO 0x1013
34#define SO_ACCEPTCONN 0x1014
35
36/* linux-specific, might as well be the same as on i386 */
37#define SO_NO_CHECK 11
38#define SO_PRIORITY 12
39#define SO_BSDCOMPAT 14
40
41#define SO_PASSCRED 17
42#define SO_PEERCRED 18
43#define SO_BINDTODEVICE 25
44
45/* Socket filtering */
46#define SO_ATTACH_FILTER 26
47#define SO_DETACH_FILTER 27
48
49#define SO_PEERNAME 28
50#define SO_TIMESTAMP 29
51#define SCM_TIMESTAMP SO_TIMESTAMP
52
53#define SO_PEERSEC 30
54#define SO_PASSSEC 34
55#define SO_TIMESTAMPNS 35
56#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
57
58/* Security levels - as per NRL IPv6 - don't actually do anything */
59#define SO_SECURITY_AUTHENTICATION 19
60#define SO_SECURITY_ENCRYPTION_TRANSPORT 20
61#define SO_SECURITY_ENCRYPTION_NETWORK 21
62
63#define SO_MARK 36
64
65/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
66 * have to define SOCK_NONBLOCK to a different value here.
67 */
68#define SOCK_NONBLOCK 0x40000000
69
70#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-alpha/sockios.h b/include/asm-alpha/sockios.h
deleted file mode 100644
index 7932c7ab4a4d..000000000000
--- a/include/asm-alpha/sockios.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _ASM_ALPHA_SOCKIOS_H
2#define _ASM_ALPHA_SOCKIOS_H
3
4/* Socket-level I/O control calls. */
5
6#define FIOGETOWN _IOR('f', 123, int)
7#define FIOSETOWN _IOW('f', 124, int)
8
9#define SIOCATMARK _IOR('s', 7, int)
10#define SIOCSPGRP _IOW('s', 8, pid_t)
11#define SIOCGPGRP _IOR('s', 9, pid_t)
12
13#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
14#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
15
16#endif /* _ASM_ALPHA_SOCKIOS_H */
diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
deleted file mode 100644
index aeeb125f6851..000000000000
--- a/include/asm-alpha/spinlock.h
+++ /dev/null
@@ -1,173 +0,0 @@
1#ifndef _ALPHA_SPINLOCK_H
2#define _ALPHA_SPINLOCK_H
3
4#include <asm/system.h>
5#include <linux/kernel.h>
6#include <asm/current.h>
7
8/*
9 * Simple spin lock operations. There are two variants, one clears IRQ's
10 * on the local processor, one does not.
11 *
12 * We make no fairness assumptions. They have a cost.
13 */
14
15#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
16#define __raw_spin_is_locked(x) ((x)->lock != 0)
17#define __raw_spin_unlock_wait(x) \
18 do { cpu_relax(); } while ((x)->lock)
19
20static inline void __raw_spin_unlock(raw_spinlock_t * lock)
21{
22 mb();
23 lock->lock = 0;
24}
25
26static inline void __raw_spin_lock(raw_spinlock_t * lock)
27{
28 long tmp;
29
30 __asm__ __volatile__(
31 "1: ldl_l %0,%1\n"
32 " bne %0,2f\n"
33 " lda %0,1\n"
34 " stl_c %0,%1\n"
35 " beq %0,2f\n"
36 " mb\n"
37 ".subsection 2\n"
38 "2: ldl %0,%1\n"
39 " bne %0,2b\n"
40 " br 1b\n"
41 ".previous"
42 : "=&r" (tmp), "=m" (lock->lock)
43 : "m"(lock->lock) : "memory");
44}
45
46static inline int __raw_spin_trylock(raw_spinlock_t *lock)
47{
48 return !test_and_set_bit(0, &lock->lock);
49}
50
51/***********************************************************/
52
53static inline int __raw_read_can_lock(raw_rwlock_t *lock)
54{
55 return (lock->lock & 1) == 0;
56}
57
58static inline int __raw_write_can_lock(raw_rwlock_t *lock)
59{
60 return lock->lock == 0;
61}
62
63static inline void __raw_read_lock(raw_rwlock_t *lock)
64{
65 long regx;
66
67 __asm__ __volatile__(
68 "1: ldl_l %1,%0\n"
69 " blbs %1,6f\n"
70 " subl %1,2,%1\n"
71 " stl_c %1,%0\n"
72 " beq %1,6f\n"
73 " mb\n"
74 ".subsection 2\n"
75 "6: ldl %1,%0\n"
76 " blbs %1,6b\n"
77 " br 1b\n"
78 ".previous"
79 : "=m" (*lock), "=&r" (regx)
80 : "m" (*lock) : "memory");
81}
82
83static inline void __raw_write_lock(raw_rwlock_t *lock)
84{
85 long regx;
86
87 __asm__ __volatile__(
88 "1: ldl_l %1,%0\n"
89 " bne %1,6f\n"
90 " lda %1,1\n"
91 " stl_c %1,%0\n"
92 " beq %1,6f\n"
93 " mb\n"
94 ".subsection 2\n"
95 "6: ldl %1,%0\n"
96 " bne %1,6b\n"
97 " br 1b\n"
98 ".previous"
99 : "=m" (*lock), "=&r" (regx)
100 : "m" (*lock) : "memory");
101}
102
103static inline int __raw_read_trylock(raw_rwlock_t * lock)
104{
105 long regx;
106 int success;
107
108 __asm__ __volatile__(
109 "1: ldl_l %1,%0\n"
110 " lda %2,0\n"
111 " blbs %1,2f\n"
112 " subl %1,2,%2\n"
113 " stl_c %2,%0\n"
114 " beq %2,6f\n"
115 "2: mb\n"
116 ".subsection 2\n"
117 "6: br 1b\n"
118 ".previous"
119 : "=m" (*lock), "=&r" (regx), "=&r" (success)
120 : "m" (*lock) : "memory");
121
122 return success;
123}
124
125static inline int __raw_write_trylock(raw_rwlock_t * lock)
126{
127 long regx;
128 int success;
129
130 __asm__ __volatile__(
131 "1: ldl_l %1,%0\n"
132 " lda %2,0\n"
133 " bne %1,2f\n"
134 " lda %2,1\n"
135 " stl_c %2,%0\n"
136 " beq %2,6f\n"
137 "2: mb\n"
138 ".subsection 2\n"
139 "6: br 1b\n"
140 ".previous"
141 : "=m" (*lock), "=&r" (regx), "=&r" (success)
142 : "m" (*lock) : "memory");
143
144 return success;
145}
146
147static inline void __raw_read_unlock(raw_rwlock_t * lock)
148{
149 long regx;
150 __asm__ __volatile__(
151 " mb\n"
152 "1: ldl_l %1,%0\n"
153 " addl %1,2,%1\n"
154 " stl_c %1,%0\n"
155 " beq %1,6f\n"
156 ".subsection 2\n"
157 "6: br 1b\n"
158 ".previous"
159 : "=m" (*lock), "=&r" (regx)
160 : "m" (*lock) : "memory");
161}
162
163static inline void __raw_write_unlock(raw_rwlock_t * lock)
164{
165 mb();
166 lock->lock = 0;
167}
168
169#define _raw_spin_relax(lock) cpu_relax()
170#define _raw_read_relax(lock) cpu_relax()
171#define _raw_write_relax(lock) cpu_relax()
172
173#endif /* _ALPHA_SPINLOCK_H */
diff --git a/include/asm-alpha/spinlock_types.h b/include/asm-alpha/spinlock_types.h
deleted file mode 100644
index 8141eb5ebf0d..000000000000
--- a/include/asm-alpha/spinlock_types.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _ALPHA_SPINLOCK_TYPES_H
2#define _ALPHA_SPINLOCK_TYPES_H
3
4#ifndef __LINUX_SPINLOCK_TYPES_H
5# error "please don't include this file directly"
6#endif
7
8typedef struct {
9 volatile unsigned int lock;
10} raw_spinlock_t;
11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
13
14typedef struct {
15 volatile unsigned int lock;
16} raw_rwlock_t;
17
18#define __RAW_RW_LOCK_UNLOCKED { 0 }
19
20#endif
diff --git a/include/asm-alpha/stat.h b/include/asm-alpha/stat.h
deleted file mode 100644
index 07ad3e6b3f3e..000000000000
--- a/include/asm-alpha/stat.h
+++ /dev/null
@@ -1,48 +0,0 @@
1#ifndef _ALPHA_STAT_H
2#define _ALPHA_STAT_H
3
4struct stat {
5 unsigned int st_dev;
6 unsigned int st_ino;
7 unsigned int st_mode;
8 unsigned int st_nlink;
9 unsigned int st_uid;
10 unsigned int st_gid;
11 unsigned int st_rdev;
12 long st_size;
13 unsigned long st_atime;
14 unsigned long st_mtime;
15 unsigned long st_ctime;
16 unsigned int st_blksize;
17 unsigned int st_blocks;
18 unsigned int st_flags;
19 unsigned int st_gen;
20};
21
22/* The stat64 structure increases the size of dev_t, blkcnt_t, adds
23 nanosecond resolution times, and padding for expansion. */
24
25struct stat64 {
26 unsigned long st_dev;
27 unsigned long st_ino;
28 unsigned long st_rdev;
29 long st_size;
30 unsigned long st_blocks;
31
32 unsigned int st_mode;
33 unsigned int st_uid;
34 unsigned int st_gid;
35 unsigned int st_blksize;
36 unsigned int st_nlink;
37 unsigned int __pad0;
38
39 unsigned long st_atime;
40 unsigned long st_atime_nsec;
41 unsigned long st_mtime;
42 unsigned long st_mtime_nsec;
43 unsigned long st_ctime;
44 unsigned long st_ctime_nsec;
45 long __unused[3];
46};
47
48#endif
diff --git a/include/asm-alpha/statfs.h b/include/asm-alpha/statfs.h
deleted file mode 100644
index ad15830baefe..000000000000
--- a/include/asm-alpha/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ALPHA_STATFS_H
2#define _ALPHA_STATFS_H
3
4#include <asm-generic/statfs.h>
5
6#endif
diff --git a/include/asm-alpha/string.h b/include/asm-alpha/string.h
deleted file mode 100644
index b02b8a282940..000000000000
--- a/include/asm-alpha/string.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#ifndef __ALPHA_STRING_H__
2#define __ALPHA_STRING_H__
3
4#ifdef __KERNEL__
5
6/*
7 * GCC of any recent vintage doesn't do stupid things with bcopy.
8 * EGCS 1.1 knows all about expanding memcpy inline, others don't.
9 *
10 * Similarly for a memset with data = 0.
11 */
12
13#define __HAVE_ARCH_MEMCPY
14extern void * memcpy(void *, const void *, size_t);
15#define __HAVE_ARCH_MEMMOVE
16extern void * memmove(void *, const void *, size_t);
17
18/* For backward compatibility with modules. Unused otherwise. */
19extern void * __memcpy(void *, const void *, size_t);
20
21#define memcpy __builtin_memcpy
22
23#define __HAVE_ARCH_MEMSET
24extern void * __constant_c_memset(void *, unsigned long, size_t);
25extern void * __memset(void *, int, size_t);
26extern void * memset(void *, int, size_t);
27
28#define memset(s, c, n) \
29(__builtin_constant_p(c) \
30 ? (__builtin_constant_p(n) && (c) == 0 \
31 ? __builtin_memset((s),0,(n)) \
32 : __constant_c_memset((s),0x0101010101010101UL*(unsigned char)(c),(n))) \
33 : __memset((s),(c),(n)))
34
35#define __HAVE_ARCH_STRCPY
36extern char * strcpy(char *,const char *);
37#define __HAVE_ARCH_STRNCPY
38extern char * strncpy(char *, const char *, size_t);
39#define __HAVE_ARCH_STRCAT
40extern char * strcat(char *, const char *);
41#define __HAVE_ARCH_STRNCAT
42extern char * strncat(char *, const char *, size_t);
43#define __HAVE_ARCH_STRCHR
44extern char * strchr(const char *,int);
45#define __HAVE_ARCH_STRRCHR
46extern char * strrchr(const char *,int);
47#define __HAVE_ARCH_STRLEN
48extern size_t strlen(const char *);
49#define __HAVE_ARCH_MEMCHR
50extern void * memchr(const void *, int, size_t);
51
52/* The following routine is like memset except that it writes 16-bit
53 aligned values. The DEST and COUNT parameters must be even for
54 correct operation. */
55
56#define __HAVE_ARCH_MEMSETW
57extern void * __memsetw(void *dest, unsigned short, size_t count);
58
59#define memsetw(s, c, n) \
60(__builtin_constant_p(c) \
61 ? __constant_c_memset((s),0x0001000100010001UL*(unsigned short)(c),(n)) \
62 : __memsetw((s),(c),(n)))
63
64#endif /* __KERNEL__ */
65
66#endif /* __ALPHA_STRING_H__ */
diff --git a/include/asm-alpha/suspend.h b/include/asm-alpha/suspend.h
deleted file mode 100644
index c7042d575851..000000000000
--- a/include/asm-alpha/suspend.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ALPHA_SUSPEND_H
2#define __ALPHA_SUSPEND_H
3
4/* Dummy include. */
5
6#endif /* __ALPHA_SUSPEND_H */
diff --git a/include/asm-alpha/sysinfo.h b/include/asm-alpha/sysinfo.h
deleted file mode 100644
index 086aba284df2..000000000000
--- a/include/asm-alpha/sysinfo.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-alpha/sysinfo.h
3 */
4
5#ifndef __ASM_ALPHA_SYSINFO_H
6#define __ASM_ALPHA_SYSINFO_H
7
8/* This defines the subset of the OSF/1 getsysinfo/setsysinfo calls
9 that we support. */
10
11#define GSI_UACPROC 8
12#define GSI_IEEE_FP_CONTROL 45
13#define GSI_IEEE_STATE_AT_SIGNAL 46
14#define GSI_PROC_TYPE 60
15#define GSI_GET_HWRPB 101
16
17#define SSI_NVPAIRS 1
18#define SSI_IEEE_FP_CONTROL 14
19#define SSI_IEEE_STATE_AT_SIGNAL 15
20#define SSI_IEEE_IGNORE_STATE_AT_SIGNAL 16
21#define SSI_IEEE_RAISE_EXCEPTION 1001 /* linux specific */
22
23#define SSIN_UACPROC 6
24
25#define UAC_BITMASK 7
26#define UAC_NOPRINT 1
27#define UAC_NOFIX 2
28#define UAC_SIGBUS 4
29
30
31#ifdef __KERNEL__
32
33/* This is the shift that is applied to the UAC bits as stored in the
34 per-thread flags. See thread_info.h. */
35#define UAC_SHIFT 6
36
37#endif
38
39#endif /* __ASM_ALPHA_SYSINFO_H */
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
deleted file mode 100644
index afe20fa58c99..000000000000
--- a/include/asm-alpha/system.h
+++ /dev/null
@@ -1,829 +0,0 @@
1#ifndef __ALPHA_SYSTEM_H
2#define __ALPHA_SYSTEM_H
3
4#include <asm/pal.h>
5#include <asm/page.h>
6#include <asm/barrier.h>
7
8/*
9 * System defines.. Note that this is included both from .c and .S
10 * files, so it does only defines, not any C code.
11 */
12
13/*
14 * We leave one page for the initial stack page, and one page for
15 * the initial process structure. Also, the console eats 3 MB for
16 * the initial bootloader (one of which we can reclaim later).
17 */
18#define BOOT_PCB 0x20000000
19#define BOOT_ADDR 0x20000000
20/* Remove when official MILO sources have ELF support: */
21#define BOOT_SIZE (16*1024)
22
23#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
24#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
25#else
26#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
27#endif
28
29#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
30#define SWAPPER_PGD KERNEL_START
31#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
32#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
33#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
34#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
35
36#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
37
38/*
39 * This is setup by the secondary bootstrap loader. Because
40 * the zero page is zeroed out as soon as the vm system is
41 * initialized, we need to copy things out into a more permanent
42 * place.
43 */
44#define PARAM ZERO_PGE
45#define COMMAND_LINE ((char*)(PARAM + 0x0000))
46#define INITRD_START (*(unsigned long *) (PARAM+0x100))
47#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
48
49#ifndef __ASSEMBLY__
50#include <linux/kernel.h>
51#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */
52
53/*
54 * This is the logout header that should be common to all platforms
55 * (assuming they are running OSF/1 PALcode, I guess).
56 */
57struct el_common {
58 unsigned int size; /* size in bytes of logout area */
59 unsigned int sbz1 : 30; /* should be zero */
60 unsigned int err2 : 1; /* second error */
61 unsigned int retry : 1; /* retry flag */
62 unsigned int proc_offset; /* processor-specific offset */
63 unsigned int sys_offset; /* system-specific offset */
64 unsigned int code; /* machine check code */
65 unsigned int frame_rev; /* frame revision */
66};
67
68/* Machine Check Frame for uncorrectable errors (Large format)
69 * --- This is used to log uncorrectable errors such as
70 * double bit ECC errors.
71 * --- These errors are detected by both processor and systems.
72 */
73struct el_common_EV5_uncorrectable_mcheck {
74 unsigned long shadow[8]; /* Shadow reg. 8-14, 25 */
75 unsigned long paltemp[24]; /* PAL TEMP REGS. */
76 unsigned long exc_addr; /* Address of excepting instruction*/
77 unsigned long exc_sum; /* Summary of arithmetic traps. */
78 unsigned long exc_mask; /* Exception mask (from exc_sum). */
79 unsigned long pal_base; /* Base address for PALcode. */
80 unsigned long isr; /* Interrupt Status Reg. */
81 unsigned long icsr; /* CURRENT SETUP OF EV5 IBOX */
82 unsigned long ic_perr_stat; /* I-CACHE Reg. <11> set Data parity
83 <12> set TAG parity*/
84 unsigned long dc_perr_stat; /* D-CACHE error Reg. Bits set to 1:
85 <2> Data error in bank 0
86 <3> Data error in bank 1
87 <4> Tag error in bank 0
88 <5> Tag error in bank 1 */
89 unsigned long va; /* Effective VA of fault or miss. */
90 unsigned long mm_stat; /* Holds the reason for D-stream
91 fault or D-cache parity errors */
92 unsigned long sc_addr; /* Address that was being accessed
93 when EV5 detected Secondary cache
94 failure. */
95 unsigned long sc_stat; /* Helps determine if the error was
96 TAG/Data parity(Secondary Cache)*/
97 unsigned long bc_tag_addr; /* Contents of EV5 BC_TAG_ADDR */
98 unsigned long ei_addr; /* Physical address of any transfer
99 that is logged in EV5 EI_STAT */
100 unsigned long fill_syndrome; /* For correcting ECC errors. */
101 unsigned long ei_stat; /* Helps identify reason of any
102 processor uncorrectable error
103 at its external interface. */
104 unsigned long ld_lock; /* Contents of EV5 LD_LOCK register*/
105};
106
107struct el_common_EV6_mcheck {
108 unsigned int FrameSize; /* Bytes, including this field */
109 unsigned int FrameFlags; /* <31> = Retry, <30> = Second Error */
110 unsigned int CpuOffset; /* Offset to CPU-specific info */
111 unsigned int SystemOffset; /* Offset to system-specific info */
112 unsigned int MCHK_Code;
113 unsigned int MCHK_Frame_Rev;
114 unsigned long I_STAT; /* EV6 Internal Processor Registers */
115 unsigned long DC_STAT; /* (See the 21264 Spec) */
116 unsigned long C_ADDR;
117 unsigned long DC1_SYNDROME;
118 unsigned long DC0_SYNDROME;
119 unsigned long C_STAT;
120 unsigned long C_STS;
121 unsigned long MM_STAT;
122 unsigned long EXC_ADDR;
123 unsigned long IER_CM;
124 unsigned long ISUM;
125 unsigned long RESERVED0;
126 unsigned long PAL_BASE;
127 unsigned long I_CTL;
128 unsigned long PCTX;
129};
130
131extern void halt(void) __attribute__((noreturn));
132#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
133
134#define switch_to(P,N,L) \
135 do { \
136 (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P)); \
137 check_mmu_context(); \
138 } while (0)
139
140struct task_struct;
141extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*);
142
143#define imb() \
144__asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory")
145
146#define draina() \
147__asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory")
148
149enum implver_enum {
150 IMPLVER_EV4,
151 IMPLVER_EV5,
152 IMPLVER_EV6
153};
154
155#ifdef CONFIG_ALPHA_GENERIC
156#define implver() \
157({ unsigned long __implver; \
158 __asm__ ("implver %0" : "=r"(__implver)); \
159 (enum implver_enum) __implver; })
160#else
161/* Try to eliminate some dead code. */
162#ifdef CONFIG_ALPHA_EV4
163#define implver() IMPLVER_EV4
164#endif
165#ifdef CONFIG_ALPHA_EV5
166#define implver() IMPLVER_EV5
167#endif
168#if defined(CONFIG_ALPHA_EV6)
169#define implver() IMPLVER_EV6
170#endif
171#endif
172
173enum amask_enum {
174 AMASK_BWX = (1UL << 0),
175 AMASK_FIX = (1UL << 1),
176 AMASK_CIX = (1UL << 2),
177 AMASK_MAX = (1UL << 8),
178 AMASK_PRECISE_TRAP = (1UL << 9),
179};
180
181#define amask(mask) \
182({ unsigned long __amask, __input = (mask); \
183 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
184 __amask; })
185
186#define __CALL_PAL_R0(NAME, TYPE) \
187extern inline TYPE NAME(void) \
188{ \
189 register TYPE __r0 __asm__("$0"); \
190 __asm__ __volatile__( \
191 "call_pal %1 # " #NAME \
192 :"=r" (__r0) \
193 :"i" (PAL_ ## NAME) \
194 :"$1", "$16", "$22", "$23", "$24", "$25"); \
195 return __r0; \
196}
197
198#define __CALL_PAL_W1(NAME, TYPE0) \
199extern inline void NAME(TYPE0 arg0) \
200{ \
201 register TYPE0 __r16 __asm__("$16") = arg0; \
202 __asm__ __volatile__( \
203 "call_pal %1 # "#NAME \
204 : "=r"(__r16) \
205 : "i"(PAL_ ## NAME), "0"(__r16) \
206 : "$1", "$22", "$23", "$24", "$25"); \
207}
208
209#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \
210extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \
211{ \
212 register TYPE0 __r16 __asm__("$16") = arg0; \
213 register TYPE1 __r17 __asm__("$17") = arg1; \
214 __asm__ __volatile__( \
215 "call_pal %2 # "#NAME \
216 : "=r"(__r16), "=r"(__r17) \
217 : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \
218 : "$1", "$22", "$23", "$24", "$25"); \
219}
220
221#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \
222extern inline RTYPE NAME(TYPE0 arg0) \
223{ \
224 register RTYPE __r0 __asm__("$0"); \
225 register TYPE0 __r16 __asm__("$16") = arg0; \
226 __asm__ __volatile__( \
227 "call_pal %2 # "#NAME \
228 : "=r"(__r16), "=r"(__r0) \
229 : "i"(PAL_ ## NAME), "0"(__r16) \
230 : "$1", "$22", "$23", "$24", "$25"); \
231 return __r0; \
232}
233
234#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \
235extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \
236{ \
237 register RTYPE __r0 __asm__("$0"); \
238 register TYPE0 __r16 __asm__("$16") = arg0; \
239 register TYPE1 __r17 __asm__("$17") = arg1; \
240 __asm__ __volatile__( \
241 "call_pal %3 # "#NAME \
242 : "=r"(__r16), "=r"(__r17), "=r"(__r0) \
243 : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \
244 : "$1", "$22", "$23", "$24", "$25"); \
245 return __r0; \
246}
247
248__CALL_PAL_W1(cflush, unsigned long);
249__CALL_PAL_R0(rdmces, unsigned long);
250__CALL_PAL_R0(rdps, unsigned long);
251__CALL_PAL_R0(rdusp, unsigned long);
252__CALL_PAL_RW1(swpipl, unsigned long, unsigned long);
253__CALL_PAL_R0(whami, unsigned long);
254__CALL_PAL_W2(wrent, void*, unsigned long);
255__CALL_PAL_W1(wripir, unsigned long);
256__CALL_PAL_W1(wrkgp, unsigned long);
257__CALL_PAL_W1(wrmces, unsigned long);
258__CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);
259__CALL_PAL_W1(wrusp, unsigned long);
260__CALL_PAL_W1(wrvptptr, unsigned long);
261
262#define IPL_MIN 0
263#define IPL_SW0 1
264#define IPL_SW1 2
265#define IPL_DEV0 3
266#define IPL_DEV1 4
267#define IPL_TIMER 5
268#define IPL_PERF 6
269#define IPL_POWERFAIL 6
270#define IPL_MCHECK 7
271#define IPL_MAX 7
272
273#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
274#undef IPL_MIN
275#define IPL_MIN __min_ipl
276extern int __min_ipl;
277#endif
278
279#define getipl() (rdps() & 7)
280#define setipl(ipl) ((void) swpipl(ipl))
281
282#define local_irq_disable() do { setipl(IPL_MAX); barrier(); } while(0)
283#define local_irq_enable() do { barrier(); setipl(IPL_MIN); } while(0)
284#define local_save_flags(flags) ((flags) = rdps())
285#define local_irq_save(flags) do { (flags) = swpipl(IPL_MAX); barrier(); } while(0)
286#define local_irq_restore(flags) do { barrier(); setipl(flags); barrier(); } while(0)
287
288#define irqs_disabled() (getipl() == IPL_MAX)
289
290/*
291 * TB routines..
292 */
293#define __tbi(nr,arg,arg1...) \
294({ \
295 register unsigned long __r16 __asm__("$16") = (nr); \
296 register unsigned long __r17 __asm__("$17"); arg; \
297 __asm__ __volatile__( \
298 "call_pal %3 #__tbi" \
299 :"=r" (__r16),"=r" (__r17) \
300 :"0" (__r16),"i" (PAL_tbi) ,##arg1 \
301 :"$0", "$1", "$22", "$23", "$24", "$25"); \
302})
303
304#define tbi(x,y) __tbi(x,__r17=(y),"1" (__r17))
305#define tbisi(x) __tbi(1,__r17=(x),"1" (__r17))
306#define tbisd(x) __tbi(2,__r17=(x),"1" (__r17))
307#define tbis(x) __tbi(3,__r17=(x),"1" (__r17))
308#define tbiap() __tbi(-1, /* no second argument */)
309#define tbia() __tbi(-2, /* no second argument */)
310
311/*
312 * Atomic exchange.
313 * Since it can be used to implement critical sections
314 * it must clobber "memory" (also for interrupts in UP).
315 */
316
317static inline unsigned long
318__xchg_u8(volatile char *m, unsigned long val)
319{
320 unsigned long ret, tmp, addr64;
321
322 __asm__ __volatile__(
323 " andnot %4,7,%3\n"
324 " insbl %1,%4,%1\n"
325 "1: ldq_l %2,0(%3)\n"
326 " extbl %2,%4,%0\n"
327 " mskbl %2,%4,%2\n"
328 " or %1,%2,%2\n"
329 " stq_c %2,0(%3)\n"
330 " beq %2,2f\n"
331#ifdef CONFIG_SMP
332 " mb\n"
333#endif
334 ".subsection 2\n"
335 "2: br 1b\n"
336 ".previous"
337 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
338 : "r" ((long)m), "1" (val) : "memory");
339
340 return ret;
341}
342
343static inline unsigned long
344__xchg_u16(volatile short *m, unsigned long val)
345{
346 unsigned long ret, tmp, addr64;
347
348 __asm__ __volatile__(
349 " andnot %4,7,%3\n"
350 " inswl %1,%4,%1\n"
351 "1: ldq_l %2,0(%3)\n"
352 " extwl %2,%4,%0\n"
353 " mskwl %2,%4,%2\n"
354 " or %1,%2,%2\n"
355 " stq_c %2,0(%3)\n"
356 " beq %2,2f\n"
357#ifdef CONFIG_SMP
358 " mb\n"
359#endif
360 ".subsection 2\n"
361 "2: br 1b\n"
362 ".previous"
363 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
364 : "r" ((long)m), "1" (val) : "memory");
365
366 return ret;
367}
368
369static inline unsigned long
370__xchg_u32(volatile int *m, unsigned long val)
371{
372 unsigned long dummy;
373
374 __asm__ __volatile__(
375 "1: ldl_l %0,%4\n"
376 " bis $31,%3,%1\n"
377 " stl_c %1,%2\n"
378 " beq %1,2f\n"
379#ifdef CONFIG_SMP
380 " mb\n"
381#endif
382 ".subsection 2\n"
383 "2: br 1b\n"
384 ".previous"
385 : "=&r" (val), "=&r" (dummy), "=m" (*m)
386 : "rI" (val), "m" (*m) : "memory");
387
388 return val;
389}
390
391static inline unsigned long
392__xchg_u64(volatile long *m, unsigned long val)
393{
394 unsigned long dummy;
395
396 __asm__ __volatile__(
397 "1: ldq_l %0,%4\n"
398 " bis $31,%3,%1\n"
399 " stq_c %1,%2\n"
400 " beq %1,2f\n"
401#ifdef CONFIG_SMP
402 " mb\n"
403#endif
404 ".subsection 2\n"
405 "2: br 1b\n"
406 ".previous"
407 : "=&r" (val), "=&r" (dummy), "=m" (*m)
408 : "rI" (val), "m" (*m) : "memory");
409
410 return val;
411}
412
413/* This function doesn't exist, so you'll get a linker error
414 if something tries to do an invalid xchg(). */
415extern void __xchg_called_with_bad_pointer(void);
416
417#define __xchg(ptr, x, size) \
418({ \
419 unsigned long __xchg__res; \
420 volatile void *__xchg__ptr = (ptr); \
421 switch (size) { \
422 case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \
423 case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \
424 case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \
425 case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \
426 default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
427 } \
428 __xchg__res; \
429})
430
431#define xchg(ptr,x) \
432 ({ \
433 __typeof__(*(ptr)) _x_ = (x); \
434 (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
435 })
436
437static inline unsigned long
438__xchg_u8_local(volatile char *m, unsigned long val)
439{
440 unsigned long ret, tmp, addr64;
441
442 __asm__ __volatile__(
443 " andnot %4,7,%3\n"
444 " insbl %1,%4,%1\n"
445 "1: ldq_l %2,0(%3)\n"
446 " extbl %2,%4,%0\n"
447 " mskbl %2,%4,%2\n"
448 " or %1,%2,%2\n"
449 " stq_c %2,0(%3)\n"
450 " beq %2,2f\n"
451 ".subsection 2\n"
452 "2: br 1b\n"
453 ".previous"
454 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
455 : "r" ((long)m), "1" (val) : "memory");
456
457 return ret;
458}
459
460static inline unsigned long
461__xchg_u16_local(volatile short *m, unsigned long val)
462{
463 unsigned long ret, tmp, addr64;
464
465 __asm__ __volatile__(
466 " andnot %4,7,%3\n"
467 " inswl %1,%4,%1\n"
468 "1: ldq_l %2,0(%3)\n"
469 " extwl %2,%4,%0\n"
470 " mskwl %2,%4,%2\n"
471 " or %1,%2,%2\n"
472 " stq_c %2,0(%3)\n"
473 " beq %2,2f\n"
474 ".subsection 2\n"
475 "2: br 1b\n"
476 ".previous"
477 : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
478 : "r" ((long)m), "1" (val) : "memory");
479
480 return ret;
481}
482
483static inline unsigned long
484__xchg_u32_local(volatile int *m, unsigned long val)
485{
486 unsigned long dummy;
487
488 __asm__ __volatile__(
489 "1: ldl_l %0,%4\n"
490 " bis $31,%3,%1\n"
491 " stl_c %1,%2\n"
492 " beq %1,2f\n"
493 ".subsection 2\n"
494 "2: br 1b\n"
495 ".previous"
496 : "=&r" (val), "=&r" (dummy), "=m" (*m)
497 : "rI" (val), "m" (*m) : "memory");
498
499 return val;
500}
501
502static inline unsigned long
503__xchg_u64_local(volatile long *m, unsigned long val)
504{
505 unsigned long dummy;
506
507 __asm__ __volatile__(
508 "1: ldq_l %0,%4\n"
509 " bis $31,%3,%1\n"
510 " stq_c %1,%2\n"
511 " beq %1,2f\n"
512 ".subsection 2\n"
513 "2: br 1b\n"
514 ".previous"
515 : "=&r" (val), "=&r" (dummy), "=m" (*m)
516 : "rI" (val), "m" (*m) : "memory");
517
518 return val;
519}
520
521#define __xchg_local(ptr, x, size) \
522({ \
523 unsigned long __xchg__res; \
524 volatile void *__xchg__ptr = (ptr); \
525 switch (size) { \
526 case 1: __xchg__res = __xchg_u8_local(__xchg__ptr, x); break; \
527 case 2: __xchg__res = __xchg_u16_local(__xchg__ptr, x); break; \
528 case 4: __xchg__res = __xchg_u32_local(__xchg__ptr, x); break; \
529 case 8: __xchg__res = __xchg_u64_local(__xchg__ptr, x); break; \
530 default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
531 } \
532 __xchg__res; \
533})
534
535#define xchg_local(ptr,x) \
536 ({ \
537 __typeof__(*(ptr)) _x_ = (x); \
538 (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
539 sizeof(*(ptr))); \
540 })
541
542/*
543 * Atomic compare and exchange. Compare OLD with MEM, if identical,
544 * store NEW in MEM. Return the initial value in MEM. Success is
545 * indicated by comparing RETURN with OLD.
546 *
547 * The memory barrier should be placed in SMP only when we actually
548 * make the change. If we don't change anything (so if the returned
549 * prev is equal to old) then we aren't acquiring anything new and
550 * we don't need any memory barrier as far I can tell.
551 */
552
553#define __HAVE_ARCH_CMPXCHG 1
554
555static inline unsigned long
556__cmpxchg_u8(volatile char *m, long old, long new)
557{
558 unsigned long prev, tmp, cmp, addr64;
559
560 __asm__ __volatile__(
561 " andnot %5,7,%4\n"
562 " insbl %1,%5,%1\n"
563 "1: ldq_l %2,0(%4)\n"
564 " extbl %2,%5,%0\n"
565 " cmpeq %0,%6,%3\n"
566 " beq %3,2f\n"
567 " mskbl %2,%5,%2\n"
568 " or %1,%2,%2\n"
569 " stq_c %2,0(%4)\n"
570 " beq %2,3f\n"
571#ifdef CONFIG_SMP
572 " mb\n"
573#endif
574 "2:\n"
575 ".subsection 2\n"
576 "3: br 1b\n"
577 ".previous"
578 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
579 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
580
581 return prev;
582}
583
584static inline unsigned long
585__cmpxchg_u16(volatile short *m, long old, long new)
586{
587 unsigned long prev, tmp, cmp, addr64;
588
589 __asm__ __volatile__(
590 " andnot %5,7,%4\n"
591 " inswl %1,%5,%1\n"
592 "1: ldq_l %2,0(%4)\n"
593 " extwl %2,%5,%0\n"
594 " cmpeq %0,%6,%3\n"
595 " beq %3,2f\n"
596 " mskwl %2,%5,%2\n"
597 " or %1,%2,%2\n"
598 " stq_c %2,0(%4)\n"
599 " beq %2,3f\n"
600#ifdef CONFIG_SMP
601 " mb\n"
602#endif
603 "2:\n"
604 ".subsection 2\n"
605 "3: br 1b\n"
606 ".previous"
607 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
608 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
609
610 return prev;
611}
612
613static inline unsigned long
614__cmpxchg_u32(volatile int *m, int old, int new)
615{
616 unsigned long prev, cmp;
617
618 __asm__ __volatile__(
619 "1: ldl_l %0,%5\n"
620 " cmpeq %0,%3,%1\n"
621 " beq %1,2f\n"
622 " mov %4,%1\n"
623 " stl_c %1,%2\n"
624 " beq %1,3f\n"
625#ifdef CONFIG_SMP
626 " mb\n"
627#endif
628 "2:\n"
629 ".subsection 2\n"
630 "3: br 1b\n"
631 ".previous"
632 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
633 : "r"((long) old), "r"(new), "m"(*m) : "memory");
634
635 return prev;
636}
637
638static inline unsigned long
639__cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
640{
641 unsigned long prev, cmp;
642
643 __asm__ __volatile__(
644 "1: ldq_l %0,%5\n"
645 " cmpeq %0,%3,%1\n"
646 " beq %1,2f\n"
647 " mov %4,%1\n"
648 " stq_c %1,%2\n"
649 " beq %1,3f\n"
650#ifdef CONFIG_SMP
651 " mb\n"
652#endif
653 "2:\n"
654 ".subsection 2\n"
655 "3: br 1b\n"
656 ".previous"
657 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
658 : "r"((long) old), "r"(new), "m"(*m) : "memory");
659
660 return prev;
661}
662
663/* This function doesn't exist, so you'll get a linker error
664 if something tries to do an invalid cmpxchg(). */
665extern void __cmpxchg_called_with_bad_pointer(void);
666
667static __always_inline unsigned long
668__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
669{
670 switch (size) {
671 case 1:
672 return __cmpxchg_u8(ptr, old, new);
673 case 2:
674 return __cmpxchg_u16(ptr, old, new);
675 case 4:
676 return __cmpxchg_u32(ptr, old, new);
677 case 8:
678 return __cmpxchg_u64(ptr, old, new);
679 }
680 __cmpxchg_called_with_bad_pointer();
681 return old;
682}
683
684#define cmpxchg(ptr, o, n) \
685 ({ \
686 __typeof__(*(ptr)) _o_ = (o); \
687 __typeof__(*(ptr)) _n_ = (n); \
688 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
689 (unsigned long)_n_, sizeof(*(ptr))); \
690 })
691#define cmpxchg64(ptr, o, n) \
692 ({ \
693 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
694 cmpxchg((ptr), (o), (n)); \
695 })
696
697static inline unsigned long
698__cmpxchg_u8_local(volatile char *m, long old, long new)
699{
700 unsigned long prev, tmp, cmp, addr64;
701
702 __asm__ __volatile__(
703 " andnot %5,7,%4\n"
704 " insbl %1,%5,%1\n"
705 "1: ldq_l %2,0(%4)\n"
706 " extbl %2,%5,%0\n"
707 " cmpeq %0,%6,%3\n"
708 " beq %3,2f\n"
709 " mskbl %2,%5,%2\n"
710 " or %1,%2,%2\n"
711 " stq_c %2,0(%4)\n"
712 " beq %2,3f\n"
713 "2:\n"
714 ".subsection 2\n"
715 "3: br 1b\n"
716 ".previous"
717 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
718 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
719
720 return prev;
721}
722
723static inline unsigned long
724__cmpxchg_u16_local(volatile short *m, long old, long new)
725{
726 unsigned long prev, tmp, cmp, addr64;
727
728 __asm__ __volatile__(
729 " andnot %5,7,%4\n"
730 " inswl %1,%5,%1\n"
731 "1: ldq_l %2,0(%4)\n"
732 " extwl %2,%5,%0\n"
733 " cmpeq %0,%6,%3\n"
734 " beq %3,2f\n"
735 " mskwl %2,%5,%2\n"
736 " or %1,%2,%2\n"
737 " stq_c %2,0(%4)\n"
738 " beq %2,3f\n"
739 "2:\n"
740 ".subsection 2\n"
741 "3: br 1b\n"
742 ".previous"
743 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
744 : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
745
746 return prev;
747}
748
749static inline unsigned long
750__cmpxchg_u32_local(volatile int *m, int old, int new)
751{
752 unsigned long prev, cmp;
753
754 __asm__ __volatile__(
755 "1: ldl_l %0,%5\n"
756 " cmpeq %0,%3,%1\n"
757 " beq %1,2f\n"
758 " mov %4,%1\n"
759 " stl_c %1,%2\n"
760 " beq %1,3f\n"
761 "2:\n"
762 ".subsection 2\n"
763 "3: br 1b\n"
764 ".previous"
765 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
766 : "r"((long) old), "r"(new), "m"(*m) : "memory");
767
768 return prev;
769}
770
771static inline unsigned long
772__cmpxchg_u64_local(volatile long *m, unsigned long old, unsigned long new)
773{
774 unsigned long prev, cmp;
775
776 __asm__ __volatile__(
777 "1: ldq_l %0,%5\n"
778 " cmpeq %0,%3,%1\n"
779 " beq %1,2f\n"
780 " mov %4,%1\n"
781 " stq_c %1,%2\n"
782 " beq %1,3f\n"
783 "2:\n"
784 ".subsection 2\n"
785 "3: br 1b\n"
786 ".previous"
787 : "=&r"(prev), "=&r"(cmp), "=m"(*m)
788 : "r"((long) old), "r"(new), "m"(*m) : "memory");
789
790 return prev;
791}
792
793static __always_inline unsigned long
794__cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
795 int size)
796{
797 switch (size) {
798 case 1:
799 return __cmpxchg_u8_local(ptr, old, new);
800 case 2:
801 return __cmpxchg_u16_local(ptr, old, new);
802 case 4:
803 return __cmpxchg_u32_local(ptr, old, new);
804 case 8:
805 return __cmpxchg_u64_local(ptr, old, new);
806 }
807 __cmpxchg_called_with_bad_pointer();
808 return old;
809}
810
811#define cmpxchg_local(ptr, o, n) \
812 ({ \
813 __typeof__(*(ptr)) _o_ = (o); \
814 __typeof__(*(ptr)) _n_ = (n); \
815 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
816 (unsigned long)_n_, sizeof(*(ptr))); \
817 })
818#define cmpxchg64_local(ptr, o, n) \
819 ({ \
820 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
821 cmpxchg_local((ptr), (o), (n)); \
822 })
823
824
825#endif /* __ASSEMBLY__ */
826
827#define arch_align_stack(x) (x)
828
829#endif
diff --git a/include/asm-alpha/termbits.h b/include/asm-alpha/termbits.h
deleted file mode 100644
index ad854a4a3af6..000000000000
--- a/include/asm-alpha/termbits.h
+++ /dev/null
@@ -1,200 +0,0 @@
1#ifndef _ALPHA_TERMBITS_H
2#define _ALPHA_TERMBITS_H
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10/*
11 * termios type and macro definitions. Be careful about adding stuff
12 * to this file since it's used in GNU libc and there are strict rules
13 * concerning namespace pollution.
14 */
15
16#define NCCS 19
17struct termios {
18 tcflag_t c_iflag; /* input mode flags */
19 tcflag_t c_oflag; /* output mode flags */
20 tcflag_t c_cflag; /* control mode flags */
21 tcflag_t c_lflag; /* local mode flags */
22 cc_t c_cc[NCCS]; /* control characters */
23 cc_t c_line; /* line discipline (== c_cc[19]) */
24 speed_t c_ispeed; /* input speed */
25 speed_t c_ospeed; /* output speed */
26};
27
28/* Alpha has matching termios and ktermios */
29
30struct ktermios {
31 tcflag_t c_iflag; /* input mode flags */
32 tcflag_t c_oflag; /* output mode flags */
33 tcflag_t c_cflag; /* control mode flags */
34 tcflag_t c_lflag; /* local mode flags */
35 cc_t c_cc[NCCS]; /* control characters */
36 cc_t c_line; /* line discipline (== c_cc[19]) */
37 speed_t c_ispeed; /* input speed */
38 speed_t c_ospeed; /* output speed */
39};
40
41/* c_cc characters */
42#define VEOF 0
43#define VEOL 1
44#define VEOL2 2
45#define VERASE 3
46#define VWERASE 4
47#define VKILL 5
48#define VREPRINT 6
49#define VSWTC 7
50#define VINTR 8
51#define VQUIT 9
52#define VSUSP 10
53#define VSTART 12
54#define VSTOP 13
55#define VLNEXT 14
56#define VDISCARD 15
57#define VMIN 16
58#define VTIME 17
59
60/* c_iflag bits */
61#define IGNBRK 0000001
62#define BRKINT 0000002
63#define IGNPAR 0000004
64#define PARMRK 0000010
65#define INPCK 0000020
66#define ISTRIP 0000040
67#define INLCR 0000100
68#define IGNCR 0000200
69#define ICRNL 0000400
70#define IXON 0001000
71#define IXOFF 0002000
72#define IXANY 0004000
73#define IUCLC 0010000
74#define IMAXBEL 0020000
75#define IUTF8 0040000
76
77/* c_oflag bits */
78#define OPOST 0000001
79#define ONLCR 0000002
80#define OLCUC 0000004
81
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85
86#define OFILL 00000100
87#define OFDEL 00000200
88#define NLDLY 00001400
89#define NL0 00000000
90#define NL1 00000400
91#define NL2 00001000
92#define NL3 00001400
93#define TABDLY 00006000
94#define TAB0 00000000
95#define TAB1 00002000
96#define TAB2 00004000
97#define TAB3 00006000
98#define CRDLY 00030000
99#define CR0 00000000
100#define CR1 00010000
101#define CR2 00020000
102#define CR3 00030000
103#define FFDLY 00040000
104#define FF0 00000000
105#define FF1 00040000
106#define BSDLY 00100000
107#define BS0 00000000
108#define BS1 00100000
109#define VTDLY 00200000
110#define VT0 00000000
111#define VT1 00200000
112#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
113
114/* c_cflag bit meaning */
115#define CBAUD 0000037
116#define B0 0000000 /* hang up */
117#define B50 0000001
118#define B75 0000002
119#define B110 0000003
120#define B134 0000004
121#define B150 0000005
122#define B200 0000006
123#define B300 0000007
124#define B600 0000010
125#define B1200 0000011
126#define B1800 0000012
127#define B2400 0000013
128#define B4800 0000014
129#define B9600 0000015
130#define B19200 0000016
131#define B38400 0000017
132#define EXTA B19200
133#define EXTB B38400
134#define CBAUDEX 0000000
135#define B57600 00020
136#define B115200 00021
137#define B230400 00022
138#define B460800 00023
139#define B500000 00024
140#define B576000 00025
141#define B921600 00026
142#define B1000000 00027
143#define B1152000 00030
144#define B1500000 00031
145#define B2000000 00032
146#define B2500000 00033
147#define B3000000 00034
148#define B3500000 00035
149#define B4000000 00036
150
151#define CSIZE 00001400
152#define CS5 00000000
153#define CS6 00000400
154#define CS7 00001000
155#define CS8 00001400
156
157#define CSTOPB 00002000
158#define CREAD 00004000
159#define PARENB 00010000
160#define PARODD 00020000
161#define HUPCL 00040000
162
163#define CLOCAL 00100000
164#define CMSPAR 010000000000 /* mark or space (stick) parity */
165#define CRTSCTS 020000000000 /* flow control */
166
167/* c_lflag bits */
168#define ISIG 0x00000080
169#define ICANON 0x00000100
170#define XCASE 0x00004000
171#define ECHO 0x00000008
172#define ECHOE 0x00000002
173#define ECHOK 0x00000004
174#define ECHONL 0x00000010
175#define NOFLSH 0x80000000
176#define TOSTOP 0x00400000
177#define ECHOCTL 0x00000040
178#define ECHOPRT 0x00000020
179#define ECHOKE 0x00000001
180#define FLUSHO 0x00800000
181#define PENDIN 0x20000000
182#define IEXTEN 0x00000400
183
184/* Values for the ACTION argument to `tcflow'. */
185#define TCOOFF 0
186#define TCOON 1
187#define TCIOFF 2
188#define TCION 3
189
190/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
191#define TCIFLUSH 0
192#define TCOFLUSH 1
193#define TCIOFLUSH 2
194
195/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
196#define TCSANOW 0
197#define TCSADRAIN 1
198#define TCSAFLUSH 2
199
200#endif /* _ALPHA_TERMBITS_H */
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h
deleted file mode 100644
index fa13716a11c3..000000000000
--- a/include/asm-alpha/termios.h
+++ /dev/null
@@ -1,146 +0,0 @@
1#ifndef _ALPHA_TERMIOS_H
2#define _ALPHA_TERMIOS_H
3
4#include <asm/ioctls.h>
5#include <asm/termbits.h>
6
7struct sgttyb {
8 char sg_ispeed;
9 char sg_ospeed;
10 char sg_erase;
11 char sg_kill;
12 short sg_flags;
13};
14
15struct tchars {
16 char t_intrc;
17 char t_quitc;
18 char t_startc;
19 char t_stopc;
20 char t_eofc;
21 char t_brkc;
22};
23
24struct ltchars {
25 char t_suspc;
26 char t_dsuspc;
27 char t_rprntc;
28 char t_flushc;
29 char t_werasc;
30 char t_lnextc;
31};
32
33struct winsize {
34 unsigned short ws_row;
35 unsigned short ws_col;
36 unsigned short ws_xpixel;
37 unsigned short ws_ypixel;
38};
39
40#define NCC 8
41struct termio {
42 unsigned short c_iflag; /* input mode flags */
43 unsigned short c_oflag; /* output mode flags */
44 unsigned short c_cflag; /* control mode flags */
45 unsigned short c_lflag; /* local mode flags */
46 unsigned char c_line; /* line discipline */
47 unsigned char c_cc[NCC]; /* control characters */
48};
49
50/*
51 * c_cc characters in the termio structure. Oh, how I love being
52 * backwardly compatible. Notice that character 4 and 5 are
53 * interpreted differently depending on whether ICANON is set in
54 * c_lflag. If it's set, they are used as _VEOF and _VEOL, otherwise
55 * as _VMIN and V_TIME. This is for compatibility with OSF/1 (which
56 * is compatible with sysV)...
57 */
58#define _VINTR 0
59#define _VQUIT 1
60#define _VERASE 2
61#define _VKILL 3
62#define _VEOF 4
63#define _VMIN 4
64#define _VEOL 5
65#define _VTIME 5
66#define _VEOL2 6
67#define _VSWTC 7
68
69#ifdef __KERNEL__
70/* eof=^D eol=\0 eol2=\0 erase=del
71 werase=^W kill=^U reprint=^R sxtc=\0
72 intr=^C quit=^\ susp=^Z <OSF/1 VDSUSP>
73 start=^Q stop=^S lnext=^V discard=^U
74 vmin=\1 vtime=\0
75*/
76#define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\025\001\000"
77
78/*
79 * Translate a "termio" structure into a "termios". Ugh.
80 */
81
82#define user_termio_to_kernel_termios(a_termios, u_termio) \
83({ \
84 struct ktermios *k_termios = (a_termios); \
85 struct termio k_termio; \
86 int canon, ret; \
87 \
88 ret = copy_from_user(&k_termio, u_termio, sizeof(k_termio)); \
89 if (!ret) { \
90 /* Overwrite only the low bits. */ \
91 *(unsigned short *)&k_termios->c_iflag = k_termio.c_iflag; \
92 *(unsigned short *)&k_termios->c_oflag = k_termio.c_oflag; \
93 *(unsigned short *)&k_termios->c_cflag = k_termio.c_cflag; \
94 *(unsigned short *)&k_termios->c_lflag = k_termio.c_lflag; \
95 canon = k_termio.c_lflag & ICANON; \
96 \
97 k_termios->c_cc[VINTR] = k_termio.c_cc[_VINTR]; \
98 k_termios->c_cc[VQUIT] = k_termio.c_cc[_VQUIT]; \
99 k_termios->c_cc[VERASE] = k_termio.c_cc[_VERASE]; \
100 k_termios->c_cc[VKILL] = k_termio.c_cc[_VKILL]; \
101 k_termios->c_cc[VEOL2] = k_termio.c_cc[_VEOL2]; \
102 k_termios->c_cc[VSWTC] = k_termio.c_cc[_VSWTC]; \
103 k_termios->c_cc[canon ? VEOF : VMIN] = k_termio.c_cc[_VEOF]; \
104 k_termios->c_cc[canon ? VEOL : VTIME] = k_termio.c_cc[_VEOL]; \
105 } \
106 ret; \
107})
108
109/*
110 * Translate a "termios" structure into a "termio". Ugh.
111 *
112 * Note the "fun" _VMIN overloading.
113 */
114#define kernel_termios_to_user_termio(u_termio, a_termios) \
115({ \
116 struct ktermios *k_termios = (a_termios); \
117 struct termio k_termio; \
118 int canon; \
119 \
120 k_termio.c_iflag = k_termios->c_iflag; \
121 k_termio.c_oflag = k_termios->c_oflag; \
122 k_termio.c_cflag = k_termios->c_cflag; \
123 canon = (k_termio.c_lflag = k_termios->c_lflag) & ICANON; \
124 \
125 k_termio.c_line = k_termios->c_line; \
126 k_termio.c_cc[_VINTR] = k_termios->c_cc[VINTR]; \
127 k_termio.c_cc[_VQUIT] = k_termios->c_cc[VQUIT]; \
128 k_termio.c_cc[_VERASE] = k_termios->c_cc[VERASE]; \
129 k_termio.c_cc[_VKILL] = k_termios->c_cc[VKILL]; \
130 k_termio.c_cc[_VEOF] = k_termios->c_cc[canon ? VEOF : VMIN]; \
131 k_termio.c_cc[_VEOL] = k_termios->c_cc[canon ? VEOL : VTIME]; \
132 k_termio.c_cc[_VEOL2] = k_termios->c_cc[VEOL2]; \
133 k_termio.c_cc[_VSWTC] = k_termios->c_cc[VSWTC]; \
134 \
135 copy_to_user(u_termio, &k_termio, sizeof(k_termio)); \
136})
137
138#define user_termios_to_kernel_termios(k, u) \
139 copy_from_user(k, u, sizeof(struct termios))
140
141#define kernel_termios_to_user_termios(u, k) \
142 copy_to_user(u, k, sizeof(struct termios))
143
144#endif /* __KERNEL__ */
145
146#endif /* _ALPHA_TERMIOS_H */
diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h
deleted file mode 100644
index 15fda4344424..000000000000
--- a/include/asm-alpha/thread_info.h
+++ /dev/null
@@ -1,114 +0,0 @@
1#ifndef _ALPHA_THREAD_INFO_H
2#define _ALPHA_THREAD_INFO_H
3
4#ifdef __KERNEL__
5
6#ifndef __ASSEMBLY__
7#include <asm/processor.h>
8#include <asm/types.h>
9#include <asm/hwrpb.h>
10#endif
11
12#ifndef __ASSEMBLY__
13struct thread_info {
14 struct pcb_struct pcb; /* palcode state */
15
16 struct task_struct *task; /* main task structure */
17 unsigned int flags; /* low level flags */
18 unsigned int ieee_state; /* see fpu.h */
19
20 struct exec_domain *exec_domain; /* execution domain */
21 mm_segment_t addr_limit; /* thread address space */
22 unsigned cpu; /* current CPU */
23 int preempt_count; /* 0 => preemptable, <0 => BUG */
24
25 int bpt_nsaved;
26 unsigned long bpt_addr[2]; /* breakpoint handling */
27 unsigned int bpt_insn[2];
28
29 struct restart_block restart_block;
30};
31
32/*
33 * Macros/functions for gaining access to the thread information structure.
34 */
35#define INIT_THREAD_INFO(tsk) \
36{ \
37 .task = &tsk, \
38 .exec_domain = &default_exec_domain, \
39 .addr_limit = KERNEL_DS, \
40 .restart_block = { \
41 .fn = do_no_restart_syscall, \
42 }, \
43}
44
45#define init_thread_info (init_thread_union.thread_info)
46#define init_stack (init_thread_union.stack)
47
48/* How to get the thread information struct from C. */
49register struct thread_info *__current_thread_info __asm__("$8");
50#define current_thread_info() __current_thread_info
51
52/* Thread information allocation. */
53#define THREAD_SIZE_ORDER 1
54#define THREAD_SIZE (2*PAGE_SIZE)
55
56#endif /* __ASSEMBLY__ */
57
58#define PREEMPT_ACTIVE 0x40000000
59
60/*
61 * Thread information flags:
62 * - these are process state flags and used from assembly
63 * - pending work-to-be-done flags come first to fit in and immediate operand.
64 *
65 * TIF_SYSCALL_TRACE is known to be 0 via blbs.
66 */
67#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
68#define TIF_SIGPENDING 1 /* signal pending */
69#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
70#define TIF_POLLING_NRFLAG 3 /* poll_idle is polling NEED_RESCHED */
71#define TIF_DIE_IF_KERNEL 4 /* dik recursion lock */
72#define TIF_UAC_NOPRINT 5 /* see sysinfo.h */
73#define TIF_UAC_NOFIX 6
74#define TIF_UAC_SIGBUS 7
75#define TIF_MEMDIE 8
76#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
77
78#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
79#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
80#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
81#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
82#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
83
84/* Work to do on interrupt/exception return. */
85#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
86
87/* Work to do on any return to userspace. */
88#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \
89 | _TIF_SYSCALL_TRACE)
90
91#define ALPHA_UAC_SHIFT 6
92#define ALPHA_UAC_MASK (1 << TIF_UAC_NOPRINT | 1 << TIF_UAC_NOFIX | \
93 1 << TIF_UAC_SIGBUS)
94
95#define SET_UNALIGN_CTL(task,value) ({ \
96 task_thread_info(task)->flags = ((task_thread_info(task)->flags & \
97 ~ALPHA_UAC_MASK) \
98 | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\
99 | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \
100 | (((value) << (ALPHA_UAC_SHIFT - 1)) & (1<<TIF_UAC_NOFIX)));\
101 0; })
102
103#define GET_UNALIGN_CTL(task,value) ({ \
104 put_user((task_thread_info(task)->flags & (1 << TIF_UAC_NOPRINT))\
105 >> ALPHA_UAC_SHIFT \
106 | (task_thread_info(task)->flags & (1 << TIF_UAC_SIGBUS))\
107 >> (ALPHA_UAC_SHIFT + 1) \
108 | (task_thread_info(task)->flags & (1 << TIF_UAC_NOFIX))\
109 >> (ALPHA_UAC_SHIFT - 1), \
110 (int __user *)(value)); \
111 })
112
113#endif /* __KERNEL__ */
114#endif /* _ALPHA_THREAD_INFO_H */
diff --git a/include/asm-alpha/timex.h b/include/asm-alpha/timex.h
deleted file mode 100644
index afa0c45e3e98..000000000000
--- a/include/asm-alpha/timex.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * linux/include/asm-alpha/timex.h
3 *
4 * ALPHA architecture timex specifications
5 */
6#ifndef _ASMALPHA_TIMEX_H
7#define _ASMALPHA_TIMEX_H
8
9/* With only one or two oddballs, we use the RTC as the ticker, selecting
10 the 32.768kHz reference clock, which nicely divides down to our HZ. */
11#define CLOCK_TICK_RATE 32768
12
13/*
14 * Standard way to access the cycle counter.
15 * Currently only used on SMP for scheduling.
16 *
17 * Only the low 32 bits are available as a continuously counting entity.
18 * But this only means we'll force a reschedule every 8 seconds or so,
19 * which isn't an evil thing.
20 */
21
22typedef unsigned int cycles_t;
23
24static inline cycles_t get_cycles (void)
25{
26 cycles_t ret;
27 __asm__ __volatile__ ("rpcc %0" : "=r"(ret));
28 return ret;
29}
30
31#endif
diff --git a/include/asm-alpha/tlb.h b/include/asm-alpha/tlb.h
deleted file mode 100644
index c13636575fba..000000000000
--- a/include/asm-alpha/tlb.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ALPHA_TLB_H
2#define _ALPHA_TLB_H
3
4#define tlb_start_vma(tlb, vma) do { } while (0)
5#define tlb_end_vma(tlb, vma) do { } while (0)
6#define __tlb_remove_tlb_entry(tlb, pte, addr) do { } while (0)
7
8#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
9
10#include <asm-generic/tlb.h>
11
12#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte)
13#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
14
15#endif
diff --git a/include/asm-alpha/tlbflush.h b/include/asm-alpha/tlbflush.h
deleted file mode 100644
index 9d87aaa08c0d..000000000000
--- a/include/asm-alpha/tlbflush.h
+++ /dev/null
@@ -1,151 +0,0 @@
1#ifndef _ALPHA_TLBFLUSH_H
2#define _ALPHA_TLBFLUSH_H
3
4#include <linux/mm.h>
5#include <asm/compiler.h>
6#include <asm/pgalloc.h>
7
8#ifndef __EXTERN_INLINE
9#define __EXTERN_INLINE extern inline
10#define __MMU_EXTERN_INLINE
11#endif
12
13extern void __load_new_mm_context(struct mm_struct *);
14
15
16/* Use a few helper functions to hide the ugly broken ASN
17 numbers on early Alphas (ev4 and ev45). */
18
19__EXTERN_INLINE void
20ev4_flush_tlb_current(struct mm_struct *mm)
21{
22 __load_new_mm_context(mm);
23 tbiap();
24}
25
26__EXTERN_INLINE void
27ev5_flush_tlb_current(struct mm_struct *mm)
28{
29 __load_new_mm_context(mm);
30}
31
32/* Flush just one page in the current TLB set. We need to be very
33 careful about the icache here, there is no way to invalidate a
34 specific icache page. */
35
36__EXTERN_INLINE void
37ev4_flush_tlb_current_page(struct mm_struct * mm,
38 struct vm_area_struct *vma,
39 unsigned long addr)
40{
41 int tbi_flag = 2;
42 if (vma->vm_flags & VM_EXEC) {
43 __load_new_mm_context(mm);
44 tbi_flag = 3;
45 }
46 tbi(tbi_flag, addr);
47}
48
49__EXTERN_INLINE void
50ev5_flush_tlb_current_page(struct mm_struct * mm,
51 struct vm_area_struct *vma,
52 unsigned long addr)
53{
54 if (vma->vm_flags & VM_EXEC)
55 __load_new_mm_context(mm);
56 else
57 tbi(2, addr);
58}
59
60
61#ifdef CONFIG_ALPHA_GENERIC
62# define flush_tlb_current alpha_mv.mv_flush_tlb_current
63# define flush_tlb_current_page alpha_mv.mv_flush_tlb_current_page
64#else
65# ifdef CONFIG_ALPHA_EV4
66# define flush_tlb_current ev4_flush_tlb_current
67# define flush_tlb_current_page ev4_flush_tlb_current_page
68# else
69# define flush_tlb_current ev5_flush_tlb_current
70# define flush_tlb_current_page ev5_flush_tlb_current_page
71# endif
72#endif
73
74#ifdef __MMU_EXTERN_INLINE
75#undef __EXTERN_INLINE
76#undef __MMU_EXTERN_INLINE
77#endif
78
79/* Flush current user mapping. */
80static inline void
81flush_tlb(void)
82{
83 flush_tlb_current(current->active_mm);
84}
85
86/* Flush someone else's user mapping. */
87static inline void
88flush_tlb_other(struct mm_struct *mm)
89{
90 unsigned long *mmc = &mm->context[smp_processor_id()];
91 /* Check it's not zero first to avoid cacheline ping pong
92 when possible. */
93 if (*mmc) *mmc = 0;
94}
95
96#ifndef CONFIG_SMP
97/* Flush everything (kernel mapping may also have changed
98 due to vmalloc/vfree). */
99static inline void flush_tlb_all(void)
100{
101 tbia();
102}
103
104/* Flush a specified user mapping. */
105static inline void
106flush_tlb_mm(struct mm_struct *mm)
107{
108 if (mm == current->active_mm)
109 flush_tlb_current(mm);
110 else
111 flush_tlb_other(mm);
112}
113
114/* Page-granular tlb flush. */
115static inline void
116flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
117{
118 struct mm_struct *mm = vma->vm_mm;
119
120 if (mm == current->active_mm)
121 flush_tlb_current_page(mm, vma, addr);
122 else
123 flush_tlb_other(mm);
124}
125
126/* Flush a specified range of user mapping. On the Alpha we flush
127 the whole user tlb. */
128static inline void
129flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
130 unsigned long end)
131{
132 flush_tlb_mm(vma->vm_mm);
133}
134
135#else /* CONFIG_SMP */
136
137extern void flush_tlb_all(void);
138extern void flush_tlb_mm(struct mm_struct *);
139extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
140extern void flush_tlb_range(struct vm_area_struct *, unsigned long,
141 unsigned long);
142
143#endif /* CONFIG_SMP */
144
145static inline void flush_tlb_kernel_range(unsigned long start,
146 unsigned long end)
147{
148 flush_tlb_all();
149}
150
151#endif /* _ALPHA_TLBFLUSH_H */
diff --git a/include/asm-alpha/topology.h b/include/asm-alpha/topology.h
deleted file mode 100644
index 149532e162c4..000000000000
--- a/include/asm-alpha/topology.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef _ASM_ALPHA_TOPOLOGY_H
2#define _ASM_ALPHA_TOPOLOGY_H
3
4#include <linux/smp.h>
5#include <linux/threads.h>
6#include <asm/machvec.h>
7
8#ifdef CONFIG_NUMA
9static inline int cpu_to_node(int cpu)
10{
11 int node;
12
13 if (!alpha_mv.cpuid_to_nid)
14 return 0;
15
16 node = alpha_mv.cpuid_to_nid(cpu);
17
18#ifdef DEBUG_NUMA
19 BUG_ON(node < 0);
20#endif
21
22 return node;
23}
24
25static inline cpumask_t node_to_cpumask(int node)
26{
27 cpumask_t node_cpu_mask = CPU_MASK_NONE;
28 int cpu;
29
30 for_each_online_cpu(cpu) {
31 if (cpu_to_node(cpu) == node)
32 cpu_set(cpu, node_cpu_mask);
33 }
34
35#ifdef DEBUG_NUMA
36 printk("node %d: cpu_mask: %016lx\n", node, node_cpu_mask);
37#endif
38
39 return node_cpu_mask;
40}
41
42#define pcibus_to_cpumask(bus) (cpu_online_map)
43
44#endif /* !CONFIG_NUMA */
45# include <asm-generic/topology.h>
46
47#endif /* _ASM_ALPHA_TOPOLOGY_H */
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h
deleted file mode 100644
index c1541353ccef..000000000000
--- a/include/asm-alpha/types.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef _ALPHA_TYPES_H
2#define _ALPHA_TYPES_H
3
4/*
5 * This file is never included by application software unless
6 * explicitly requested (e.g., via linux/types.h) in which case the
7 * application is Linux specific so (user-) name space pollution is
8 * not a major issue. However, for interoperability, libraries still
9 * need to be careful to avoid a name clashes.
10 */
11#include <asm-generic/int-l64.h>
12
13#ifndef __ASSEMBLY__
14
15typedef unsigned int umode_t;
16
17#endif /* __ASSEMBLY__ */
18
19/*
20 * These aren't exported outside the kernel to avoid name space clashes
21 */
22#ifdef __KERNEL__
23
24#define BITS_PER_LONG 64
25
26#ifndef __ASSEMBLY__
27
28typedef u64 dma_addr_t;
29typedef u64 dma64_addr_t;
30
31#endif /* __ASSEMBLY__ */
32#endif /* __KERNEL__ */
33#endif /* _ALPHA_TYPES_H */
diff --git a/include/asm-alpha/uaccess.h b/include/asm-alpha/uaccess.h
deleted file mode 100644
index 22de3b434a22..000000000000
--- a/include/asm-alpha/uaccess.h
+++ /dev/null
@@ -1,511 +0,0 @@
1#ifndef __ALPHA_UACCESS_H
2#define __ALPHA_UACCESS_H
3
4#include <linux/errno.h>
5#include <linux/sched.h>
6
7
8/*
9 * The fs value determines whether argument validity checking should be
10 * performed or not. If get_fs() == USER_DS, checking is performed, with
11 * get_fs() == KERNEL_DS, checking is bypassed.
12 *
13 * Or at least it did once upon a time. Nowadays it is a mask that
14 * defines which bits of the address space are off limits. This is a
15 * wee bit faster than the above.
16 *
17 * For historical reasons, these macros are grossly misnamed.
18 */
19
20#define KERNEL_DS ((mm_segment_t) { 0UL })
21#define USER_DS ((mm_segment_t) { -0x40000000000UL })
22
23#define VERIFY_READ 0
24#define VERIFY_WRITE 1
25
26#define get_fs() (current_thread_info()->addr_limit)
27#define get_ds() (KERNEL_DS)
28#define set_fs(x) (current_thread_info()->addr_limit = (x))
29
30#define segment_eq(a,b) ((a).seg == (b).seg)
31
32/*
33 * Is a address valid? This does a straightforward calculation rather
34 * than tests.
35 *
36 * Address valid if:
37 * - "addr" doesn't have any high-bits set
38 * - AND "size" doesn't have any high-bits set
39 * - AND "addr+size" doesn't have any high-bits set
40 * - OR we are in kernel mode.
41 */
42#define __access_ok(addr,size,segment) \
43 (((segment).seg & (addr | size | (addr+size))) == 0)
44
45#define access_ok(type,addr,size) \
46({ \
47 __chk_user_ptr(addr); \
48 __access_ok(((unsigned long)(addr)),(size),get_fs()); \
49})
50
51/*
52 * These are the main single-value transfer routines. They automatically
53 * use the right size if we just have the right pointer type.
54 *
55 * As the alpha uses the same address space for kernel and user
56 * data, we can just do these as direct assignments. (Of course, the
57 * exception handling means that it's no longer "just"...)
58 *
59 * Careful to not
60 * (a) re-use the arguments for side effects (sizeof/typeof is ok)
61 * (b) require any knowledge of processes at this stage
62 */
63#define put_user(x,ptr) \
64 __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)),get_fs())
65#define get_user(x,ptr) \
66 __get_user_check((x),(ptr),sizeof(*(ptr)),get_fs())
67
68/*
69 * The "__xxx" versions do not do address space checking, useful when
70 * doing multiple accesses to the same area (the programmer has to do the
71 * checks by hand with "access_ok()")
72 */
73#define __put_user(x,ptr) \
74 __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
75#define __get_user(x,ptr) \
76 __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
77
78/*
79 * The "lda %1, 2b-1b(%0)" bits are magic to get the assembler to
80 * encode the bits we need for resolving the exception. See the
81 * more extensive comments with fixup_inline_exception below for
82 * more information.
83 */
84
85extern void __get_user_unknown(void);
86
87#define __get_user_nocheck(x,ptr,size) \
88({ \
89 long __gu_err = 0; \
90 unsigned long __gu_val; \
91 __chk_user_ptr(ptr); \
92 switch (size) { \
93 case 1: __get_user_8(ptr); break; \
94 case 2: __get_user_16(ptr); break; \
95 case 4: __get_user_32(ptr); break; \
96 case 8: __get_user_64(ptr); break; \
97 default: __get_user_unknown(); break; \
98 } \
99 (x) = (__typeof__(*(ptr))) __gu_val; \
100 __gu_err; \
101})
102
103#define __get_user_check(x,ptr,size,segment) \
104({ \
105 long __gu_err = -EFAULT; \
106 unsigned long __gu_val = 0; \
107 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
108 if (__access_ok((unsigned long)__gu_addr,size,segment)) { \
109 __gu_err = 0; \
110 switch (size) { \
111 case 1: __get_user_8(__gu_addr); break; \
112 case 2: __get_user_16(__gu_addr); break; \
113 case 4: __get_user_32(__gu_addr); break; \
114 case 8: __get_user_64(__gu_addr); break; \
115 default: __get_user_unknown(); break; \
116 } \
117 } \
118 (x) = (__typeof__(*(ptr))) __gu_val; \
119 __gu_err; \
120})
121
122struct __large_struct { unsigned long buf[100]; };
123#define __m(x) (*(struct __large_struct __user *)(x))
124
125#define __get_user_64(addr) \
126 __asm__("1: ldq %0,%2\n" \
127 "2:\n" \
128 ".section __ex_table,\"a\"\n" \
129 " .long 1b - .\n" \
130 " lda %0, 2b-1b(%1)\n" \
131 ".previous" \
132 : "=r"(__gu_val), "=r"(__gu_err) \
133 : "m"(__m(addr)), "1"(__gu_err))
134
135#define __get_user_32(addr) \
136 __asm__("1: ldl %0,%2\n" \
137 "2:\n" \
138 ".section __ex_table,\"a\"\n" \
139 " .long 1b - .\n" \
140 " lda %0, 2b-1b(%1)\n" \
141 ".previous" \
142 : "=r"(__gu_val), "=r"(__gu_err) \
143 : "m"(__m(addr)), "1"(__gu_err))
144
145#ifdef __alpha_bwx__
146/* Those lucky bastards with ev56 and later CPUs can do byte/word moves. */
147
148#define __get_user_16(addr) \
149 __asm__("1: ldwu %0,%2\n" \
150 "2:\n" \
151 ".section __ex_table,\"a\"\n" \
152 " .long 1b - .\n" \
153 " lda %0, 2b-1b(%1)\n" \
154 ".previous" \
155 : "=r"(__gu_val), "=r"(__gu_err) \
156 : "m"(__m(addr)), "1"(__gu_err))
157
158#define __get_user_8(addr) \
159 __asm__("1: ldbu %0,%2\n" \
160 "2:\n" \
161 ".section __ex_table,\"a\"\n" \
162 " .long 1b - .\n" \
163 " lda %0, 2b-1b(%1)\n" \
164 ".previous" \
165 : "=r"(__gu_val), "=r"(__gu_err) \
166 : "m"(__m(addr)), "1"(__gu_err))
167#else
168/* Unfortunately, we can't get an unaligned access trap for the sub-word
169 load, so we have to do a general unaligned operation. */
170
171#define __get_user_16(addr) \
172{ \
173 long __gu_tmp; \
174 __asm__("1: ldq_u %0,0(%3)\n" \
175 "2: ldq_u %1,1(%3)\n" \
176 " extwl %0,%3,%0\n" \
177 " extwh %1,%3,%1\n" \
178 " or %0,%1,%0\n" \
179 "3:\n" \
180 ".section __ex_table,\"a\"\n" \
181 " .long 1b - .\n" \
182 " lda %0, 3b-1b(%2)\n" \
183 " .long 2b - .\n" \
184 " lda %0, 3b-2b(%2)\n" \
185 ".previous" \
186 : "=&r"(__gu_val), "=&r"(__gu_tmp), "=r"(__gu_err) \
187 : "r"(addr), "2"(__gu_err)); \
188}
189
190#define __get_user_8(addr) \
191 __asm__("1: ldq_u %0,0(%2)\n" \
192 " extbl %0,%2,%0\n" \
193 "2:\n" \
194 ".section __ex_table,\"a\"\n" \
195 " .long 1b - .\n" \
196 " lda %0, 2b-1b(%1)\n" \
197 ".previous" \
198 : "=&r"(__gu_val), "=r"(__gu_err) \
199 : "r"(addr), "1"(__gu_err))
200#endif
201
202extern void __put_user_unknown(void);
203
204#define __put_user_nocheck(x,ptr,size) \
205({ \
206 long __pu_err = 0; \
207 __chk_user_ptr(ptr); \
208 switch (size) { \
209 case 1: __put_user_8(x,ptr); break; \
210 case 2: __put_user_16(x,ptr); break; \
211 case 4: __put_user_32(x,ptr); break; \
212 case 8: __put_user_64(x,ptr); break; \
213 default: __put_user_unknown(); break; \
214 } \
215 __pu_err; \
216})
217
218#define __put_user_check(x,ptr,size,segment) \
219({ \
220 long __pu_err = -EFAULT; \
221 __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
222 if (__access_ok((unsigned long)__pu_addr,size,segment)) { \
223 __pu_err = 0; \
224 switch (size) { \
225 case 1: __put_user_8(x,__pu_addr); break; \
226 case 2: __put_user_16(x,__pu_addr); break; \
227 case 4: __put_user_32(x,__pu_addr); break; \
228 case 8: __put_user_64(x,__pu_addr); break; \
229 default: __put_user_unknown(); break; \
230 } \
231 } \
232 __pu_err; \
233})
234
235/*
236 * The "__put_user_xx()" macros tell gcc they read from memory
237 * instead of writing: this is because they do not write to
238 * any memory gcc knows about, so there are no aliasing issues
239 */
240#define __put_user_64(x,addr) \
241__asm__ __volatile__("1: stq %r2,%1\n" \
242 "2:\n" \
243 ".section __ex_table,\"a\"\n" \
244 " .long 1b - .\n" \
245 " lda $31,2b-1b(%0)\n" \
246 ".previous" \
247 : "=r"(__pu_err) \
248 : "m" (__m(addr)), "rJ" (x), "0"(__pu_err))
249
250#define __put_user_32(x,addr) \
251__asm__ __volatile__("1: stl %r2,%1\n" \
252 "2:\n" \
253 ".section __ex_table,\"a\"\n" \
254 " .long 1b - .\n" \
255 " lda $31,2b-1b(%0)\n" \
256 ".previous" \
257 : "=r"(__pu_err) \
258 : "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
259
260#ifdef __alpha_bwx__
261/* Those lucky bastards with ev56 and later CPUs can do byte/word moves. */
262
263#define __put_user_16(x,addr) \
264__asm__ __volatile__("1: stw %r2,%1\n" \
265 "2:\n" \
266 ".section __ex_table,\"a\"\n" \
267 " .long 1b - .\n" \
268 " lda $31,2b-1b(%0)\n" \
269 ".previous" \
270 : "=r"(__pu_err) \
271 : "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
272
273#define __put_user_8(x,addr) \
274__asm__ __volatile__("1: stb %r2,%1\n" \
275 "2:\n" \
276 ".section __ex_table,\"a\"\n" \
277 " .long 1b - .\n" \
278 " lda $31,2b-1b(%0)\n" \
279 ".previous" \
280 : "=r"(__pu_err) \
281 : "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
282#else
283/* Unfortunately, we can't get an unaligned access trap for the sub-word
284 write, so we have to do a general unaligned operation. */
285
286#define __put_user_16(x,addr) \
287{ \
288 long __pu_tmp1, __pu_tmp2, __pu_tmp3, __pu_tmp4; \
289 __asm__ __volatile__( \
290 "1: ldq_u %2,1(%5)\n" \
291 "2: ldq_u %1,0(%5)\n" \
292 " inswh %6,%5,%4\n" \
293 " inswl %6,%5,%3\n" \
294 " mskwh %2,%5,%2\n" \
295 " mskwl %1,%5,%1\n" \
296 " or %2,%4,%2\n" \
297 " or %1,%3,%1\n" \
298 "3: stq_u %2,1(%5)\n" \
299 "4: stq_u %1,0(%5)\n" \
300 "5:\n" \
301 ".section __ex_table,\"a\"\n" \
302 " .long 1b - .\n" \
303 " lda $31, 5b-1b(%0)\n" \
304 " .long 2b - .\n" \
305 " lda $31, 5b-2b(%0)\n" \
306 " .long 3b - .\n" \
307 " lda $31, 5b-3b(%0)\n" \
308 " .long 4b - .\n" \
309 " lda $31, 5b-4b(%0)\n" \
310 ".previous" \
311 : "=r"(__pu_err), "=&r"(__pu_tmp1), \
312 "=&r"(__pu_tmp2), "=&r"(__pu_tmp3), \
313 "=&r"(__pu_tmp4) \
314 : "r"(addr), "r"((unsigned long)(x)), "0"(__pu_err)); \
315}
316
317#define __put_user_8(x,addr) \
318{ \
319 long __pu_tmp1, __pu_tmp2; \
320 __asm__ __volatile__( \
321 "1: ldq_u %1,0(%4)\n" \
322 " insbl %3,%4,%2\n" \
323 " mskbl %1,%4,%1\n" \
324 " or %1,%2,%1\n" \
325 "2: stq_u %1,0(%4)\n" \
326 "3:\n" \
327 ".section __ex_table,\"a\"\n" \
328 " .long 1b - .\n" \
329 " lda $31, 3b-1b(%0)\n" \
330 " .long 2b - .\n" \
331 " lda $31, 3b-2b(%0)\n" \
332 ".previous" \
333 : "=r"(__pu_err), \
334 "=&r"(__pu_tmp1), "=&r"(__pu_tmp2) \
335 : "r"((unsigned long)(x)), "r"(addr), "0"(__pu_err)); \
336}
337#endif
338
339
340/*
341 * Complex access routines
342 */
343
344/* This little bit of silliness is to get the GP loaded for a function
345 that ordinarily wouldn't. Otherwise we could have it done by the macro
346 directly, which can be optimized the linker. */
347#ifdef MODULE
348#define __module_address(sym) "r"(sym),
349#define __module_call(ra, arg, sym) "jsr $" #ra ",(%" #arg ")," #sym
350#else
351#define __module_address(sym)
352#define __module_call(ra, arg, sym) "bsr $" #ra "," #sym " !samegp"
353#endif
354
355extern void __copy_user(void);
356
357extern inline long
358__copy_tofrom_user_nocheck(void *to, const void *from, long len)
359{
360 register void * __cu_to __asm__("$6") = to;
361 register const void * __cu_from __asm__("$7") = from;
362 register long __cu_len __asm__("$0") = len;
363
364 __asm__ __volatile__(
365 __module_call(28, 3, __copy_user)
366 : "=r" (__cu_len), "=r" (__cu_from), "=r" (__cu_to)
367 : __module_address(__copy_user)
368 "0" (__cu_len), "1" (__cu_from), "2" (__cu_to)
369 : "$1","$2","$3","$4","$5","$28","memory");
370
371 return __cu_len;
372}
373
374extern inline long
375__copy_tofrom_user(void *to, const void *from, long len, const void __user *validate)
376{
377 if (__access_ok((unsigned long)validate, len, get_fs()))
378 len = __copy_tofrom_user_nocheck(to, from, len);
379 return len;
380}
381
382#define __copy_to_user(to,from,n) \
383({ \
384 __chk_user_ptr(to); \
385 __copy_tofrom_user_nocheck((__force void *)(to),(from),(n)); \
386})
387#define __copy_from_user(to,from,n) \
388({ \
389 __chk_user_ptr(from); \
390 __copy_tofrom_user_nocheck((to),(__force void *)(from),(n)); \
391})
392
393#define __copy_to_user_inatomic __copy_to_user
394#define __copy_from_user_inatomic __copy_from_user
395
396
397extern inline long
398copy_to_user(void __user *to, const void *from, long n)
399{
400 return __copy_tofrom_user((__force void *)to, from, n, to);
401}
402
403extern inline long
404copy_from_user(void *to, const void __user *from, long n)
405{
406 return __copy_tofrom_user(to, (__force void *)from, n, from);
407}
408
409extern void __do_clear_user(void);
410
411extern inline long
412__clear_user(void __user *to, long len)
413{
414 register void __user * __cl_to __asm__("$6") = to;
415 register long __cl_len __asm__("$0") = len;
416 __asm__ __volatile__(
417 __module_call(28, 2, __do_clear_user)
418 : "=r"(__cl_len), "=r"(__cl_to)
419 : __module_address(__do_clear_user)
420 "0"(__cl_len), "1"(__cl_to)
421 : "$1","$2","$3","$4","$5","$28","memory");
422 return __cl_len;
423}
424
425extern inline long
426clear_user(void __user *to, long len)
427{
428 if (__access_ok((unsigned long)to, len, get_fs()))
429 len = __clear_user(to, len);
430 return len;
431}
432
433#undef __module_address
434#undef __module_call
435
436/* Returns: -EFAULT if exception before terminator, N if the entire
437 buffer filled, else strlen. */
438
439extern long __strncpy_from_user(char *__to, const char __user *__from, long __to_len);
440
441extern inline long
442strncpy_from_user(char *to, const char __user *from, long n)
443{
444 long ret = -EFAULT;
445 if (__access_ok((unsigned long)from, 0, get_fs()))
446 ret = __strncpy_from_user(to, from, n);
447 return ret;
448}
449
450/* Returns: 0 if bad, string length+1 (memory size) of string if ok */
451extern long __strlen_user(const char __user *);
452
453extern inline long strlen_user(const char __user *str)
454{
455 return access_ok(VERIFY_READ,str,0) ? __strlen_user(str) : 0;
456}
457
458/* Returns: 0 if exception before NUL or reaching the supplied limit (N),
459 * a value greater than N if the limit would be exceeded, else strlen. */
460extern long __strnlen_user(const char __user *, long);
461
462extern inline long strnlen_user(const char __user *str, long n)
463{
464 return access_ok(VERIFY_READ,str,0) ? __strnlen_user(str, n) : 0;
465}
466
467/*
468 * About the exception table:
469 *
470 * - insn is a 32-bit pc-relative offset from the faulting insn.
471 * - nextinsn is a 16-bit offset off of the faulting instruction
472 * (not off of the *next* instruction as branches are).
473 * - errreg is the register in which to place -EFAULT.
474 * - valreg is the final target register for the load sequence
475 * and will be zeroed.
476 *
477 * Either errreg or valreg may be $31, in which case nothing happens.
478 *
479 * The exception fixup information "just so happens" to be arranged
480 * as in a MEM format instruction. This lets us emit our three
481 * values like so:
482 *
483 * lda valreg, nextinsn(errreg)
484 *
485 */
486
487struct exception_table_entry
488{
489 signed int insn;
490 union exception_fixup {
491 unsigned unit;
492 struct {
493 signed int nextinsn : 16;
494 unsigned int errreg : 5;
495 unsigned int valreg : 5;
496 } bits;
497 } fixup;
498};
499
500/* Returns the new pc */
501#define fixup_exception(map_reg, fixup, pc) \
502({ \
503 if ((fixup)->fixup.bits.valreg != 31) \
504 map_reg((fixup)->fixup.bits.valreg) = 0; \
505 if ((fixup)->fixup.bits.errreg != 31) \
506 map_reg((fixup)->fixup.bits.errreg) = -EFAULT; \
507 (pc) + (fixup)->fixup.bits.nextinsn; \
508})
509
510
511#endif /* __ALPHA_UACCESS_H */
diff --git a/include/asm-alpha/ucontext.h b/include/asm-alpha/ucontext.h
deleted file mode 100644
index 47578ab42152..000000000000
--- a/include/asm-alpha/ucontext.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASMAXP_UCONTEXT_H
2#define _ASMAXP_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 old_sigset_t uc_osf_sigmask;
8 stack_t uc_stack;
9 struct sigcontext uc_mcontext;
10 sigset_t uc_sigmask; /* mask last for extensibility */
11};
12
13#endif /* !_ASMAXP_UCONTEXT_H */
diff --git a/include/asm-alpha/unaligned.h b/include/asm-alpha/unaligned.h
deleted file mode 100644
index 3787c60aed3f..000000000000
--- a/include/asm-alpha/unaligned.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _ASM_ALPHA_UNALIGNED_H
2#define _ASM_ALPHA_UNALIGNED_H
3
4#include <linux/unaligned/le_struct.h>
5#include <linux/unaligned/be_byteshift.h>
6#include <linux/unaligned/generic.h>
7
8#define get_unaligned __get_unaligned_le
9#define put_unaligned __put_unaligned_le
10
11#endif /* _ASM_ALPHA_UNALIGNED_H */
diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h
deleted file mode 100644
index 5b5c17485942..000000000000
--- a/include/asm-alpha/unistd.h
+++ /dev/null
@@ -1,464 +0,0 @@
1#ifndef _ALPHA_UNISTD_H
2#define _ALPHA_UNISTD_H
3
4#define __NR_osf_syscall 0 /* not implemented */
5#define __NR_exit 1
6#define __NR_fork 2
7#define __NR_read 3
8#define __NR_write 4
9#define __NR_osf_old_open 5 /* not implemented */
10#define __NR_close 6
11#define __NR_osf_wait4 7
12#define __NR_osf_old_creat 8 /* not implemented */
13#define __NR_link 9
14#define __NR_unlink 10
15#define __NR_osf_execve 11 /* not implemented */
16#define __NR_chdir 12
17#define __NR_fchdir 13
18#define __NR_mknod 14
19#define __NR_chmod 15
20#define __NR_chown 16
21#define __NR_brk 17
22#define __NR_osf_getfsstat 18 /* not implemented */
23#define __NR_lseek 19
24#define __NR_getxpid 20
25#define __NR_osf_mount 21
26#define __NR_umount 22
27#define __NR_setuid 23
28#define __NR_getxuid 24
29#define __NR_exec_with_loader 25 /* not implemented */
30#define __NR_ptrace 26
31#define __NR_osf_nrecvmsg 27 /* not implemented */
32#define __NR_osf_nsendmsg 28 /* not implemented */
33#define __NR_osf_nrecvfrom 29 /* not implemented */
34#define __NR_osf_naccept 30 /* not implemented */
35#define __NR_osf_ngetpeername 31 /* not implemented */
36#define __NR_osf_ngetsockname 32 /* not implemented */
37#define __NR_access 33
38#define __NR_osf_chflags 34 /* not implemented */
39#define __NR_osf_fchflags 35 /* not implemented */
40#define __NR_sync 36
41#define __NR_kill 37
42#define __NR_osf_old_stat 38 /* not implemented */
43#define __NR_setpgid 39
44#define __NR_osf_old_lstat 40 /* not implemented */
45#define __NR_dup 41
46#define __NR_pipe 42
47#define __NR_osf_set_program_attributes 43
48#define __NR_osf_profil 44 /* not implemented */
49#define __NR_open 45
50#define __NR_osf_old_sigaction 46 /* not implemented */
51#define __NR_getxgid 47
52#define __NR_osf_sigprocmask 48
53#define __NR_osf_getlogin 49 /* not implemented */
54#define __NR_osf_setlogin 50 /* not implemented */
55#define __NR_acct 51
56#define __NR_sigpending 52
57
58#define __NR_ioctl 54
59#define __NR_osf_reboot 55 /* not implemented */
60#define __NR_osf_revoke 56 /* not implemented */
61#define __NR_symlink 57
62#define __NR_readlink 58
63#define __NR_execve 59
64#define __NR_umask 60
65#define __NR_chroot 61
66#define __NR_osf_old_fstat 62 /* not implemented */
67#define __NR_getpgrp 63
68#define __NR_getpagesize 64
69#define __NR_osf_mremap 65 /* not implemented */
70#define __NR_vfork 66
71#define __NR_stat 67
72#define __NR_lstat 68
73#define __NR_osf_sbrk 69 /* not implemented */
74#define __NR_osf_sstk 70 /* not implemented */
75#define __NR_mmap 71 /* OSF/1 mmap is superset of Linux */
76#define __NR_osf_old_vadvise 72 /* not implemented */
77#define __NR_munmap 73
78#define __NR_mprotect 74
79#define __NR_madvise 75
80#define __NR_vhangup 76
81#define __NR_osf_kmodcall 77 /* not implemented */
82#define __NR_osf_mincore 78 /* not implemented */
83#define __NR_getgroups 79
84#define __NR_setgroups 80
85#define __NR_osf_old_getpgrp 81 /* not implemented */
86#define __NR_setpgrp 82 /* BSD alias for setpgid */
87#define __NR_osf_setitimer 83
88#define __NR_osf_old_wait 84 /* not implemented */
89#define __NR_osf_table 85 /* not implemented */
90#define __NR_osf_getitimer 86
91#define __NR_gethostname 87
92#define __NR_sethostname 88
93#define __NR_getdtablesize 89
94#define __NR_dup2 90
95#define __NR_fstat 91
96#define __NR_fcntl 92
97#define __NR_osf_select 93
98#define __NR_poll 94
99#define __NR_fsync 95
100#define __NR_setpriority 96
101#define __NR_socket 97
102#define __NR_connect 98
103#define __NR_accept 99
104#define __NR_getpriority 100
105#define __NR_send 101
106#define __NR_recv 102
107#define __NR_sigreturn 103
108#define __NR_bind 104
109#define __NR_setsockopt 105
110#define __NR_listen 106
111#define __NR_osf_plock 107 /* not implemented */
112#define __NR_osf_old_sigvec 108 /* not implemented */
113#define __NR_osf_old_sigblock 109 /* not implemented */
114#define __NR_osf_old_sigsetmask 110 /* not implemented */
115#define __NR_sigsuspend 111
116#define __NR_osf_sigstack 112
117#define __NR_recvmsg 113
118#define __NR_sendmsg 114
119#define __NR_osf_old_vtrace 115 /* not implemented */
120#define __NR_osf_gettimeofday 116
121#define __NR_osf_getrusage 117
122#define __NR_getsockopt 118
123
124#define __NR_readv 120
125#define __NR_writev 121
126#define __NR_osf_settimeofday 122
127#define __NR_fchown 123
128#define __NR_fchmod 124
129#define __NR_recvfrom 125
130#define __NR_setreuid 126
131#define __NR_setregid 127
132#define __NR_rename 128
133#define __NR_truncate 129
134#define __NR_ftruncate 130
135#define __NR_flock 131
136#define __NR_setgid 132
137#define __NR_sendto 133
138#define __NR_shutdown 134
139#define __NR_socketpair 135
140#define __NR_mkdir 136
141#define __NR_rmdir 137
142#define __NR_osf_utimes 138
143#define __NR_osf_old_sigreturn 139 /* not implemented */
144#define __NR_osf_adjtime 140 /* not implemented */
145#define __NR_getpeername 141
146#define __NR_osf_gethostid 142 /* not implemented */
147#define __NR_osf_sethostid 143 /* not implemented */
148#define __NR_getrlimit 144
149#define __NR_setrlimit 145
150#define __NR_osf_old_killpg 146 /* not implemented */
151#define __NR_setsid 147
152#define __NR_quotactl 148
153#define __NR_osf_oldquota 149 /* not implemented */
154#define __NR_getsockname 150
155
156#define __NR_osf_pid_block 153 /* not implemented */
157#define __NR_osf_pid_unblock 154 /* not implemented */
158
159#define __NR_sigaction 156
160#define __NR_osf_sigwaitprim 157 /* not implemented */
161#define __NR_osf_nfssvc 158 /* not implemented */
162#define __NR_osf_getdirentries 159
163#define __NR_osf_statfs 160
164#define __NR_osf_fstatfs 161
165
166#define __NR_osf_asynch_daemon 163 /* not implemented */
167#define __NR_osf_getfh 164 /* not implemented */
168#define __NR_osf_getdomainname 165
169#define __NR_setdomainname 166
170
171#define __NR_osf_exportfs 169 /* not implemented */
172
173#define __NR_osf_alt_plock 181 /* not implemented */
174
175#define __NR_osf_getmnt 184 /* not implemented */
176
177#define __NR_osf_alt_sigpending 187 /* not implemented */
178#define __NR_osf_alt_setsid 188 /* not implemented */
179
180#define __NR_osf_swapon 199
181#define __NR_msgctl 200
182#define __NR_msgget 201
183#define __NR_msgrcv 202
184#define __NR_msgsnd 203
185#define __NR_semctl 204
186#define __NR_semget 205
187#define __NR_semop 206
188#define __NR_osf_utsname 207
189#define __NR_lchown 208
190#define __NR_osf_shmat 209
191#define __NR_shmctl 210
192#define __NR_shmdt 211
193#define __NR_shmget 212
194#define __NR_osf_mvalid 213 /* not implemented */
195#define __NR_osf_getaddressconf 214 /* not implemented */
196#define __NR_osf_msleep 215 /* not implemented */
197#define __NR_osf_mwakeup 216 /* not implemented */
198#define __NR_msync 217
199#define __NR_osf_signal 218 /* not implemented */
200#define __NR_osf_utc_gettime 219 /* not implemented */
201#define __NR_osf_utc_adjtime 220 /* not implemented */
202
203#define __NR_osf_security 222 /* not implemented */
204#define __NR_osf_kloadcall 223 /* not implemented */
205
206#define __NR_getpgid 233
207#define __NR_getsid 234
208#define __NR_sigaltstack 235
209#define __NR_osf_waitid 236 /* not implemented */
210#define __NR_osf_priocntlset 237 /* not implemented */
211#define __NR_osf_sigsendset 238 /* not implemented */
212#define __NR_osf_set_speculative 239 /* not implemented */
213#define __NR_osf_msfs_syscall 240 /* not implemented */
214#define __NR_osf_sysinfo 241
215#define __NR_osf_uadmin 242 /* not implemented */
216#define __NR_osf_fuser 243 /* not implemented */
217#define __NR_osf_proplist_syscall 244
218#define __NR_osf_ntp_adjtime 245 /* not implemented */
219#define __NR_osf_ntp_gettime 246 /* not implemented */
220#define __NR_osf_pathconf 247 /* not implemented */
221#define __NR_osf_fpathconf 248 /* not implemented */
222
223#define __NR_osf_uswitch 250 /* not implemented */
224#define __NR_osf_usleep_thread 251
225#define __NR_osf_audcntl 252 /* not implemented */
226#define __NR_osf_audgen 253 /* not implemented */
227#define __NR_sysfs 254
228#define __NR_osf_subsys_info 255 /* not implemented */
229#define __NR_osf_getsysinfo 256
230#define __NR_osf_setsysinfo 257
231#define __NR_osf_afs_syscall 258 /* not implemented */
232#define __NR_osf_swapctl 259 /* not implemented */
233#define __NR_osf_memcntl 260 /* not implemented */
234#define __NR_osf_fdatasync 261 /* not implemented */
235
236/*
237 * Ignore legacy syscalls that we don't use.
238 */
239#define __IGNORE_alarm
240#define __IGNORE_creat
241#define __IGNORE_getegid
242#define __IGNORE_geteuid
243#define __IGNORE_getgid
244#define __IGNORE_getpid
245#define __IGNORE_getppid
246#define __IGNORE_getuid
247#define __IGNORE_pause
248#define __IGNORE_time
249#define __IGNORE_utime
250
251/*
252 * Linux-specific system calls begin at 300
253 */
254#define __NR_bdflush 300
255#define __NR_sethae 301
256#define __NR_mount 302
257#define __NR_old_adjtimex 303
258#define __NR_swapoff 304
259#define __NR_getdents 305
260#define __NR_create_module 306
261#define __NR_init_module 307
262#define __NR_delete_module 308
263#define __NR_get_kernel_syms 309
264#define __NR_syslog 310
265#define __NR_reboot 311
266#define __NR_clone 312
267#define __NR_uselib 313
268#define __NR_mlock 314
269#define __NR_munlock 315
270#define __NR_mlockall 316
271#define __NR_munlockall 317
272#define __NR_sysinfo 318
273#define __NR__sysctl 319
274/* 320 was sys_idle. */
275#define __NR_oldumount 321
276#define __NR_swapon 322
277#define __NR_times 323
278#define __NR_personality 324
279#define __NR_setfsuid 325
280#define __NR_setfsgid 326
281#define __NR_ustat 327
282#define __NR_statfs 328
283#define __NR_fstatfs 329
284#define __NR_sched_setparam 330
285#define __NR_sched_getparam 331
286#define __NR_sched_setscheduler 332
287#define __NR_sched_getscheduler 333
288#define __NR_sched_yield 334
289#define __NR_sched_get_priority_max 335
290#define __NR_sched_get_priority_min 336
291#define __NR_sched_rr_get_interval 337
292#define __NR_afs_syscall 338
293#define __NR_uname 339
294#define __NR_nanosleep 340
295#define __NR_mremap 341
296#define __NR_nfsservctl 342
297#define __NR_setresuid 343
298#define __NR_getresuid 344
299#define __NR_pciconfig_read 345
300#define __NR_pciconfig_write 346
301#define __NR_query_module 347
302#define __NR_prctl 348
303#define __NR_pread64 349
304#define __NR_pwrite64 350
305#define __NR_rt_sigreturn 351
306#define __NR_rt_sigaction 352
307#define __NR_rt_sigprocmask 353
308#define __NR_rt_sigpending 354
309#define __NR_rt_sigtimedwait 355
310#define __NR_rt_sigqueueinfo 356
311#define __NR_rt_sigsuspend 357
312#define __NR_select 358
313#define __NR_gettimeofday 359
314#define __NR_settimeofday 360
315#define __NR_getitimer 361
316#define __NR_setitimer 362
317#define __NR_utimes 363
318#define __NR_getrusage 364
319#define __NR_wait4 365
320#define __NR_adjtimex 366
321#define __NR_getcwd 367
322#define __NR_capget 368
323#define __NR_capset 369
324#define __NR_sendfile 370
325#define __NR_setresgid 371
326#define __NR_getresgid 372
327#define __NR_dipc 373
328#define __NR_pivot_root 374
329#define __NR_mincore 375
330#define __NR_pciconfig_iobase 376
331#define __NR_getdents64 377
332#define __NR_gettid 378
333#define __NR_readahead 379
334/* 380 is unused */
335#define __NR_tkill 381
336#define __NR_setxattr 382
337#define __NR_lsetxattr 383
338#define __NR_fsetxattr 384
339#define __NR_getxattr 385
340#define __NR_lgetxattr 386
341#define __NR_fgetxattr 387
342#define __NR_listxattr 388
343#define __NR_llistxattr 389
344#define __NR_flistxattr 390
345#define __NR_removexattr 391
346#define __NR_lremovexattr 392
347#define __NR_fremovexattr 393
348#define __NR_futex 394
349#define __NR_sched_setaffinity 395
350#define __NR_sched_getaffinity 396
351#define __NR_tuxcall 397
352#define __NR_io_setup 398
353#define __NR_io_destroy 399
354#define __NR_io_getevents 400
355#define __NR_io_submit 401
356#define __NR_io_cancel 402
357#define __NR_exit_group 405
358#define __NR_lookup_dcookie 406
359#define __NR_epoll_create 407
360#define __NR_epoll_ctl 408
361#define __NR_epoll_wait 409
362/* Feb 2007: These three sys_epoll defines shouldn't be here but culling
363 * them would break userspace apps ... we'll kill them off in 2010 :) */
364#define __NR_sys_epoll_create __NR_epoll_create
365#define __NR_sys_epoll_ctl __NR_epoll_ctl
366#define __NR_sys_epoll_wait __NR_epoll_wait
367#define __NR_remap_file_pages 410
368#define __NR_set_tid_address 411
369#define __NR_restart_syscall 412
370#define __NR_fadvise64 413
371#define __NR_timer_create 414
372#define __NR_timer_settime 415
373#define __NR_timer_gettime 416
374#define __NR_timer_getoverrun 417
375#define __NR_timer_delete 418
376#define __NR_clock_settime 419
377#define __NR_clock_gettime 420
378#define __NR_clock_getres 421
379#define __NR_clock_nanosleep 422
380#define __NR_semtimedop 423
381#define __NR_tgkill 424
382#define __NR_stat64 425
383#define __NR_lstat64 426
384#define __NR_fstat64 427
385#define __NR_vserver 428
386#define __NR_mbind 429
387#define __NR_get_mempolicy 430
388#define __NR_set_mempolicy 431
389#define __NR_mq_open 432
390#define __NR_mq_unlink 433
391#define __NR_mq_timedsend 434
392#define __NR_mq_timedreceive 435
393#define __NR_mq_notify 436
394#define __NR_mq_getsetattr 437
395#define __NR_waitid 438
396#define __NR_add_key 439
397#define __NR_request_key 440
398#define __NR_keyctl 441
399#define __NR_ioprio_set 442
400#define __NR_ioprio_get 443
401#define __NR_inotify_init 444
402#define __NR_inotify_add_watch 445
403#define __NR_inotify_rm_watch 446
404#define __NR_fdatasync 447
405#define __NR_kexec_load 448
406#define __NR_migrate_pages 449
407#define __NR_openat 450
408#define __NR_mkdirat 451
409#define __NR_mknodat 452
410#define __NR_fchownat 453
411#define __NR_futimesat 454
412#define __NR_fstatat64 455
413#define __NR_unlinkat 456
414#define __NR_renameat 457
415#define __NR_linkat 458
416#define __NR_symlinkat 459
417#define __NR_readlinkat 460
418#define __NR_fchmodat 461
419#define __NR_faccessat 462
420#define __NR_pselect6 463
421#define __NR_ppoll 464
422#define __NR_unshare 465
423#define __NR_set_robust_list 466
424#define __NR_get_robust_list 467
425#define __NR_splice 468
426#define __NR_sync_file_range 469
427#define __NR_tee 470
428#define __NR_vmsplice 471
429#define __NR_move_pages 472
430#define __NR_getcpu 473
431#define __NR_epoll_pwait 474
432#define __NR_utimensat 475
433#define __NR_signalfd 476
434#define __NR_timerfd 477
435#define __NR_eventfd 478
436
437#ifdef __KERNEL__
438
439#define NR_SYSCALLS 479
440
441#define __ARCH_WANT_IPC_PARSE_VERSION
442#define __ARCH_WANT_OLD_READDIR
443#define __ARCH_WANT_STAT64
444#define __ARCH_WANT_SYS_GETHOSTNAME
445#define __ARCH_WANT_SYS_FADVISE64
446#define __ARCH_WANT_SYS_GETPGRP
447#define __ARCH_WANT_SYS_OLD_GETRLIMIT
448#define __ARCH_WANT_SYS_OLDUMOUNT
449#define __ARCH_WANT_SYS_SIGPENDING
450
451/* "Conditional" syscalls. What we want is
452
453 __attribute__((weak,alias("sys_ni_syscall")))
454
455 but that raises the problem of what type to give the symbol. If we use
456 a prototype, it'll conflict with the definition given in this file and
457 others. If we use __typeof, we discover that not all symbols actually
458 have declarations. If we use no prototype, then we get warnings from
459 -Wstrict-prototypes. Ho hum. */
460
461#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
462
463#endif /* __KERNEL__ */
464#endif /* _ALPHA_UNISTD_H */
diff --git a/include/asm-alpha/user.h b/include/asm-alpha/user.h
deleted file mode 100644
index a4eb6a4ca8d1..000000000000
--- a/include/asm-alpha/user.h
+++ /dev/null
@@ -1,53 +0,0 @@
1#ifndef _ALPHA_USER_H
2#define _ALPHA_USER_H
3
4#include <linux/sched.h>
5#include <linux/ptrace.h>
6
7#include <asm/page.h>
8#include <asm/reg.h>
9
10/*
11 * Core file format: The core file is written in such a way that gdb
12 * can understand it and provide useful information to the user (under
13 * linux we use the `trad-core' bfd, NOT the osf-core). The file contents
14 * are as follows:
15 *
16 * upage: 1 page consisting of a user struct that tells gdb
17 * what is present in the file. Directly after this is a
18 * copy of the task_struct, which is currently not used by gdb,
19 * but it may come in handy at some point. All of the registers
20 * are stored as part of the upage. The upage should always be
21 * only one page long.
22 * data: The data segment follows next. We use current->end_text to
23 * current->brk to pick up all of the user variables, plus any memory
24 * that may have been sbrk'ed. No attempt is made to determine if a
25 * page is demand-zero or if a page is totally unused, we just cover
26 * the entire range. All of the addresses are rounded in such a way
27 * that an integral number of pages is written.
28 * stack: We need the stack information in order to get a meaningful
29 * backtrace. We need to write the data from usp to
30 * current->start_stack, so we round each of these in order to be able
31 * to write an integer number of pages.
32 */
33struct user {
34 unsigned long regs[EF_SIZE/8+32]; /* integer and fp regs */
35 size_t u_tsize; /* text size (pages) */
36 size_t u_dsize; /* data size (pages) */
37 size_t u_ssize; /* stack size (pages) */
38 unsigned long start_code; /* text starting address */
39 unsigned long start_data; /* data starting address */
40 unsigned long start_stack; /* stack starting address */
41 long int signal; /* signal causing core dump */
42 unsigned long u_ar0; /* help gdb find registers */
43 unsigned long magic; /* identifies a core file */
44 char u_comm[32]; /* user command name */
45};
46
47#define NBPG PAGE_SIZE
48#define UPAGES 1
49#define HOST_TEXT_START_ADDR (u.start_code)
50#define HOST_DATA_START_ADDR (u.start_data)
51#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
52
53#endif /* _ALPHA_USER_H */
diff --git a/include/asm-alpha/vga.h b/include/asm-alpha/vga.h
deleted file mode 100644
index c00106bac521..000000000000
--- a/include/asm-alpha/vga.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Access to VGA videoram
3 *
4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 */
6
7#ifndef _LINUX_ASM_VGA_H_
8#define _LINUX_ASM_VGA_H_
9
10#include <asm/io.h>
11
12#define VT_BUF_HAVE_RW
13#define VT_BUF_HAVE_MEMSETW
14#define VT_BUF_HAVE_MEMCPYW
15
16static inline void scr_writew(u16 val, volatile u16 *addr)
17{
18 if (__is_ioaddr(addr))
19 __raw_writew(val, (volatile u16 __iomem *) addr);
20 else
21 *addr = val;
22}
23
24static inline u16 scr_readw(volatile const u16 *addr)
25{
26 if (__is_ioaddr(addr))
27 return __raw_readw((volatile const u16 __iomem *) addr);
28 else
29 return *addr;
30}
31
32static inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
33{
34 if (__is_ioaddr(s))
35 memsetw_io((u16 __iomem *) s, c, count);
36 else
37 memsetw(s, c, count);
38}
39
40/* Do not trust that the usage will be correct; analyze the arguments. */
41extern void scr_memcpyw(u16 *d, const u16 *s, unsigned int count);
42
43/* ??? These are currently only used for downloading character sets. As
44 such, they don't need memory barriers. Is this all they are intended
45 to be used for? */
46#define vga_readb(a) readb((u8 __iomem *)(a))
47#define vga_writeb(v,a) writeb(v, (u8 __iomem *)(a))
48
49#ifdef CONFIG_VGA_HOSE
50#include <linux/ioport.h>
51#include <linux/pci.h>
52
53extern struct pci_controller *pci_vga_hose;
54
55# define __is_port_vga(a) \
56 (((a) >= 0x3b0) && ((a) < 0x3e0) && \
57 ((a) != 0x3b3) && ((a) != 0x3d3))
58
59# define __is_mem_vga(a) \
60 (((a) >= 0xa0000) && ((a) <= 0xc0000))
61
62# define FIXUP_IOADDR_VGA(a) do { \
63 if (pci_vga_hose && __is_port_vga(a)) \
64 (a) += pci_vga_hose->io_space->start; \
65 } while(0)
66
67# define FIXUP_MEMADDR_VGA(a) do { \
68 if (pci_vga_hose && __is_mem_vga(a)) \
69 (a) += pci_vga_hose->mem_space->start; \
70 } while(0)
71
72#else /* CONFIG_VGA_HOSE */
73# define pci_vga_hose 0
74# define __is_port_vga(a) 0
75# define __is_mem_vga(a) 0
76# define FIXUP_IOADDR_VGA(a)
77# define FIXUP_MEMADDR_VGA(a)
78#endif /* CONFIG_VGA_HOSE */
79
80#define VGA_MAP_MEM(x,s) ((unsigned long) ioremap(x, s))
81
82#endif
diff --git a/include/asm-alpha/xor.h b/include/asm-alpha/xor.h
deleted file mode 100644
index 5ee1c2bc0499..000000000000
--- a/include/asm-alpha/xor.h
+++ /dev/null
@@ -1,855 +0,0 @@
1/*
2 * include/asm-alpha/xor.h
3 *
4 * Optimized RAID-5 checksumming functions for alpha EV5 and EV6
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, or (at your option)
9 * any later version.
10 *
11 * You should have received a copy of the GNU General Public License
12 * (for example /usr/src/linux/COPYING); if not, write to the Free
13 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
14 */
15
16extern void xor_alpha_2(unsigned long, unsigned long *, unsigned long *);
17extern void xor_alpha_3(unsigned long, unsigned long *, unsigned long *,
18 unsigned long *);
19extern void xor_alpha_4(unsigned long, unsigned long *, unsigned long *,
20 unsigned long *, unsigned long *);
21extern void xor_alpha_5(unsigned long, unsigned long *, unsigned long *,
22 unsigned long *, unsigned long *, unsigned long *);
23
24extern void xor_alpha_prefetch_2(unsigned long, unsigned long *,
25 unsigned long *);
26extern void xor_alpha_prefetch_3(unsigned long, unsigned long *,
27 unsigned long *, unsigned long *);
28extern void xor_alpha_prefetch_4(unsigned long, unsigned long *,
29 unsigned long *, unsigned long *,
30 unsigned long *);
31extern void xor_alpha_prefetch_5(unsigned long, unsigned long *,
32 unsigned long *, unsigned long *,
33 unsigned long *, unsigned long *);
34
35asm(" \n\
36 .text \n\
37 .align 3 \n\
38 .ent xor_alpha_2 \n\
39xor_alpha_2: \n\
40 .prologue 0 \n\
41 srl $16, 6, $16 \n\
42 .align 4 \n\
432: \n\
44 ldq $0,0($17) \n\
45 ldq $1,0($18) \n\
46 ldq $2,8($17) \n\
47 ldq $3,8($18) \n\
48 \n\
49 ldq $4,16($17) \n\
50 ldq $5,16($18) \n\
51 ldq $6,24($17) \n\
52 ldq $7,24($18) \n\
53 \n\
54 ldq $19,32($17) \n\
55 ldq $20,32($18) \n\
56 ldq $21,40($17) \n\
57 ldq $22,40($18) \n\
58 \n\
59 ldq $23,48($17) \n\
60 ldq $24,48($18) \n\
61 ldq $25,56($17) \n\
62 xor $0,$1,$0 # 7 cycles from $1 load \n\
63 \n\
64 ldq $27,56($18) \n\
65 xor $2,$3,$2 \n\
66 stq $0,0($17) \n\
67 xor $4,$5,$4 \n\
68 \n\
69 stq $2,8($17) \n\
70 xor $6,$7,$6 \n\
71 stq $4,16($17) \n\
72 xor $19,$20,$19 \n\
73 \n\
74 stq $6,24($17) \n\
75 xor $21,$22,$21 \n\
76 stq $19,32($17) \n\
77 xor $23,$24,$23 \n\
78 \n\
79 stq $21,40($17) \n\
80 xor $25,$27,$25 \n\
81 stq $23,48($17) \n\
82 subq $16,1,$16 \n\
83 \n\
84 stq $25,56($17) \n\
85 addq $17,64,$17 \n\
86 addq $18,64,$18 \n\
87 bgt $16,2b \n\
88 \n\
89 ret \n\
90 .end xor_alpha_2 \n\
91 \n\
92 .align 3 \n\
93 .ent xor_alpha_3 \n\
94xor_alpha_3: \n\
95 .prologue 0 \n\
96 srl $16, 6, $16 \n\
97 .align 4 \n\
983: \n\
99 ldq $0,0($17) \n\
100 ldq $1,0($18) \n\
101 ldq $2,0($19) \n\
102 ldq $3,8($17) \n\
103 \n\
104 ldq $4,8($18) \n\
105 ldq $6,16($17) \n\
106 ldq $7,16($18) \n\
107 ldq $21,24($17) \n\
108 \n\
109 ldq $22,24($18) \n\
110 ldq $24,32($17) \n\
111 ldq $25,32($18) \n\
112 ldq $5,8($19) \n\
113 \n\
114 ldq $20,16($19) \n\
115 ldq $23,24($19) \n\
116 ldq $27,32($19) \n\
117 nop \n\
118 \n\
119 xor $0,$1,$1 # 8 cycles from $0 load \n\
120 xor $3,$4,$4 # 6 cycles from $4 load \n\
121 xor $6,$7,$7 # 6 cycles from $7 load \n\
122 xor $21,$22,$22 # 5 cycles from $22 load \n\
123 \n\
124 xor $1,$2,$2 # 9 cycles from $2 load \n\
125 xor $24,$25,$25 # 5 cycles from $25 load \n\
126 stq $2,0($17) \n\
127 xor $4,$5,$5 # 6 cycles from $5 load \n\
128 \n\
129 stq $5,8($17) \n\
130 xor $7,$20,$20 # 7 cycles from $20 load \n\
131 stq $20,16($17) \n\
132 xor $22,$23,$23 # 7 cycles from $23 load \n\
133 \n\
134 stq $23,24($17) \n\
135 xor $25,$27,$27 # 7 cycles from $27 load \n\
136 stq $27,32($17) \n\
137 nop \n\
138 \n\
139 ldq $0,40($17) \n\
140 ldq $1,40($18) \n\
141 ldq $3,48($17) \n\
142 ldq $4,48($18) \n\
143 \n\
144 ldq $6,56($17) \n\
145 ldq $7,56($18) \n\
146 ldq $2,40($19) \n\
147 ldq $5,48($19) \n\
148 \n\
149 ldq $20,56($19) \n\
150 xor $0,$1,$1 # 4 cycles from $1 load \n\
151 xor $3,$4,$4 # 5 cycles from $4 load \n\
152 xor $6,$7,$7 # 5 cycles from $7 load \n\
153 \n\
154 xor $1,$2,$2 # 4 cycles from $2 load \n\
155 xor $4,$5,$5 # 5 cycles from $5 load \n\
156 stq $2,40($17) \n\
157 xor $7,$20,$20 # 4 cycles from $20 load \n\
158 \n\
159 stq $5,48($17) \n\
160 subq $16,1,$16 \n\
161 stq $20,56($17) \n\
162 addq $19,64,$19 \n\
163 \n\
164 addq $18,64,$18 \n\
165 addq $17,64,$17 \n\
166 bgt $16,3b \n\
167 ret \n\
168 .end xor_alpha_3 \n\
169 \n\
170 .align 3 \n\
171 .ent xor_alpha_4 \n\
172xor_alpha_4: \n\
173 .prologue 0 \n\
174 srl $16, 6, $16 \n\
175 .align 4 \n\
1764: \n\
177 ldq $0,0($17) \n\
178 ldq $1,0($18) \n\
179 ldq $2,0($19) \n\
180 ldq $3,0($20) \n\
181 \n\
182 ldq $4,8($17) \n\
183 ldq $5,8($18) \n\
184 ldq $6,8($19) \n\
185 ldq $7,8($20) \n\
186 \n\
187 ldq $21,16($17) \n\
188 ldq $22,16($18) \n\
189 ldq $23,16($19) \n\
190 ldq $24,16($20) \n\
191 \n\
192 ldq $25,24($17) \n\
193 xor $0,$1,$1 # 6 cycles from $1 load \n\
194 ldq $27,24($18) \n\
195 xor $2,$3,$3 # 6 cycles from $3 load \n\
196 \n\
197 ldq $0,24($19) \n\
198 xor $1,$3,$3 \n\
199 ldq $1,24($20) \n\
200 xor $4,$5,$5 # 7 cycles from $5 load \n\
201 \n\
202 stq $3,0($17) \n\
203 xor $6,$7,$7 \n\
204 xor $21,$22,$22 # 7 cycles from $22 load \n\
205 xor $5,$7,$7 \n\
206 \n\
207 stq $7,8($17) \n\
208 xor $23,$24,$24 # 7 cycles from $24 load \n\
209 ldq $2,32($17) \n\
210 xor $22,$24,$24 \n\
211 \n\
212 ldq $3,32($18) \n\
213 ldq $4,32($19) \n\
214 ldq $5,32($20) \n\
215 xor $25,$27,$27 # 8 cycles from $27 load \n\
216 \n\
217 ldq $6,40($17) \n\
218 ldq $7,40($18) \n\
219 ldq $21,40($19) \n\
220 ldq $22,40($20) \n\
221 \n\
222 stq $24,16($17) \n\
223 xor $0,$1,$1 # 9 cycles from $1 load \n\
224 xor $2,$3,$3 # 5 cycles from $3 load \n\
225 xor $27,$1,$1 \n\
226 \n\
227 stq $1,24($17) \n\
228 xor $4,$5,$5 # 5 cycles from $5 load \n\
229 ldq $23,48($17) \n\
230 ldq $24,48($18) \n\
231 \n\
232 ldq $25,48($19) \n\
233 xor $3,$5,$5 \n\
234 ldq $27,48($20) \n\
235 ldq $0,56($17) \n\
236 \n\
237 ldq $1,56($18) \n\
238 ldq $2,56($19) \n\
239 xor $6,$7,$7 # 8 cycles from $6 load \n\
240 ldq $3,56($20) \n\
241 \n\
242 stq $5,32($17) \n\
243 xor $21,$22,$22 # 8 cycles from $22 load \n\
244 xor $7,$22,$22 \n\
245 xor $23,$24,$24 # 5 cycles from $24 load \n\
246 \n\
247 stq $22,40($17) \n\
248 xor $25,$27,$27 # 5 cycles from $27 load \n\
249 xor $24,$27,$27 \n\
250 xor $0,$1,$1 # 5 cycles from $1 load \n\
251 \n\
252 stq $27,48($17) \n\
253 xor $2,$3,$3 # 4 cycles from $3 load \n\
254 xor $1,$3,$3 \n\
255 subq $16,1,$16 \n\
256 \n\
257 stq $3,56($17) \n\
258 addq $20,64,$20 \n\
259 addq $19,64,$19 \n\
260 addq $18,64,$18 \n\
261 \n\
262 addq $17,64,$17 \n\
263 bgt $16,4b \n\
264 ret \n\
265 .end xor_alpha_4 \n\
266 \n\
267 .align 3 \n\
268 .ent xor_alpha_5 \n\
269xor_alpha_5: \n\
270 .prologue 0 \n\
271 srl $16, 6, $16 \n\
272 .align 4 \n\
2735: \n\
274 ldq $0,0($17) \n\
275 ldq $1,0($18) \n\
276 ldq $2,0($19) \n\
277 ldq $3,0($20) \n\
278 \n\
279 ldq $4,0($21) \n\
280 ldq $5,8($17) \n\
281 ldq $6,8($18) \n\
282 ldq $7,8($19) \n\
283 \n\
284 ldq $22,8($20) \n\
285 ldq $23,8($21) \n\
286 ldq $24,16($17) \n\
287 ldq $25,16($18) \n\
288 \n\
289 ldq $27,16($19) \n\
290 xor $0,$1,$1 # 6 cycles from $1 load \n\
291 ldq $28,16($20) \n\
292 xor $2,$3,$3 # 6 cycles from $3 load \n\
293 \n\
294 ldq $0,16($21) \n\
295 xor $1,$3,$3 \n\
296 ldq $1,24($17) \n\
297 xor $3,$4,$4 # 7 cycles from $4 load \n\
298 \n\
299 stq $4,0($17) \n\
300 xor $5,$6,$6 # 7 cycles from $6 load \n\
301 xor $7,$22,$22 # 7 cycles from $22 load \n\
302 xor $6,$23,$23 # 7 cycles from $23 load \n\
303 \n\
304 ldq $2,24($18) \n\
305 xor $22,$23,$23 \n\
306 ldq $3,24($19) \n\
307 xor $24,$25,$25 # 8 cycles from $25 load \n\
308 \n\
309 stq $23,8($17) \n\
310 xor $25,$27,$27 # 8 cycles from $27 load \n\
311 ldq $4,24($20) \n\
312 xor $28,$0,$0 # 7 cycles from $0 load \n\
313 \n\
314 ldq $5,24($21) \n\
315 xor $27,$0,$0 \n\
316 ldq $6,32($17) \n\
317 ldq $7,32($18) \n\
318 \n\
319 stq $0,16($17) \n\
320 xor $1,$2,$2 # 6 cycles from $2 load \n\
321 ldq $22,32($19) \n\
322 xor $3,$4,$4 # 4 cycles from $4 load \n\
323 \n\
324 ldq $23,32($20) \n\
325 xor $2,$4,$4 \n\
326 ldq $24,32($21) \n\
327 ldq $25,40($17) \n\
328 \n\
329 ldq $27,40($18) \n\
330 ldq $28,40($19) \n\
331 ldq $0,40($20) \n\
332 xor $4,$5,$5 # 7 cycles from $5 load \n\
333 \n\
334 stq $5,24($17) \n\
335 xor $6,$7,$7 # 7 cycles from $7 load \n\
336 ldq $1,40($21) \n\
337 ldq $2,48($17) \n\
338 \n\
339 ldq $3,48($18) \n\
340 xor $7,$22,$22 # 7 cycles from $22 load \n\
341 ldq $4,48($19) \n\
342 xor $23,$24,$24 # 6 cycles from $24 load \n\
343 \n\
344 ldq $5,48($20) \n\
345 xor $22,$24,$24 \n\
346 ldq $6,48($21) \n\
347 xor $25,$27,$27 # 7 cycles from $27 load \n\
348 \n\
349 stq $24,32($17) \n\
350 xor $27,$28,$28 # 8 cycles from $28 load \n\
351 ldq $7,56($17) \n\
352 xor $0,$1,$1 # 6 cycles from $1 load \n\
353 \n\
354 ldq $22,56($18) \n\
355 ldq $23,56($19) \n\
356 ldq $24,56($20) \n\
357 ldq $25,56($21) \n\
358 \n\
359 xor $28,$1,$1 \n\
360 xor $2,$3,$3 # 9 cycles from $3 load \n\
361 xor $3,$4,$4 # 9 cycles from $4 load \n\
362 xor $5,$6,$6 # 8 cycles from $6 load \n\
363 \n\
364 stq $1,40($17) \n\
365 xor $4,$6,$6 \n\
366 xor $7,$22,$22 # 7 cycles from $22 load \n\
367 xor $23,$24,$24 # 6 cycles from $24 load \n\
368 \n\
369 stq $6,48($17) \n\
370 xor $22,$24,$24 \n\
371 subq $16,1,$16 \n\
372 xor $24,$25,$25 # 8 cycles from $25 load \n\
373 \n\
374 stq $25,56($17) \n\
375 addq $21,64,$21 \n\
376 addq $20,64,$20 \n\
377 addq $19,64,$19 \n\
378 \n\
379 addq $18,64,$18 \n\
380 addq $17,64,$17 \n\
381 bgt $16,5b \n\
382 ret \n\
383 .end xor_alpha_5 \n\
384 \n\
385 .align 3 \n\
386 .ent xor_alpha_prefetch_2 \n\
387xor_alpha_prefetch_2: \n\
388 .prologue 0 \n\
389 srl $16, 6, $16 \n\
390 \n\
391 ldq $31, 0($17) \n\
392 ldq $31, 0($18) \n\
393 \n\
394 ldq $31, 64($17) \n\
395 ldq $31, 64($18) \n\
396 \n\
397 ldq $31, 128($17) \n\
398 ldq $31, 128($18) \n\
399 \n\
400 ldq $31, 192($17) \n\
401 ldq $31, 192($18) \n\
402 .align 4 \n\
4032: \n\
404 ldq $0,0($17) \n\
405 ldq $1,0($18) \n\
406 ldq $2,8($17) \n\
407 ldq $3,8($18) \n\
408 \n\
409 ldq $4,16($17) \n\
410 ldq $5,16($18) \n\
411 ldq $6,24($17) \n\
412 ldq $7,24($18) \n\
413 \n\
414 ldq $19,32($17) \n\
415 ldq $20,32($18) \n\
416 ldq $21,40($17) \n\
417 ldq $22,40($18) \n\
418 \n\
419 ldq $23,48($17) \n\
420 ldq $24,48($18) \n\
421 ldq $25,56($17) \n\
422 ldq $27,56($18) \n\
423 \n\
424 ldq $31,256($17) \n\
425 xor $0,$1,$0 # 8 cycles from $1 load \n\
426 ldq $31,256($18) \n\
427 xor $2,$3,$2 \n\
428 \n\
429 stq $0,0($17) \n\
430 xor $4,$5,$4 \n\
431 stq $2,8($17) \n\
432 xor $6,$7,$6 \n\
433 \n\
434 stq $4,16($17) \n\
435 xor $19,$20,$19 \n\
436 stq $6,24($17) \n\
437 xor $21,$22,$21 \n\
438 \n\
439 stq $19,32($17) \n\
440 xor $23,$24,$23 \n\
441 stq $21,40($17) \n\
442 xor $25,$27,$25 \n\
443 \n\
444 stq $23,48($17) \n\
445 subq $16,1,$16 \n\
446 stq $25,56($17) \n\
447 addq $17,64,$17 \n\
448 \n\
449 addq $18,64,$18 \n\
450 bgt $16,2b \n\
451 ret \n\
452 .end xor_alpha_prefetch_2 \n\
453 \n\
454 .align 3 \n\
455 .ent xor_alpha_prefetch_3 \n\
456xor_alpha_prefetch_3: \n\
457 .prologue 0 \n\
458 srl $16, 6, $16 \n\
459 \n\
460 ldq $31, 0($17) \n\
461 ldq $31, 0($18) \n\
462 ldq $31, 0($19) \n\
463 \n\
464 ldq $31, 64($17) \n\
465 ldq $31, 64($18) \n\
466 ldq $31, 64($19) \n\
467 \n\
468 ldq $31, 128($17) \n\
469 ldq $31, 128($18) \n\
470 ldq $31, 128($19) \n\
471 \n\
472 ldq $31, 192($17) \n\
473 ldq $31, 192($18) \n\
474 ldq $31, 192($19) \n\
475 .align 4 \n\
4763: \n\
477 ldq $0,0($17) \n\
478 ldq $1,0($18) \n\
479 ldq $2,0($19) \n\
480 ldq $3,8($17) \n\
481 \n\
482 ldq $4,8($18) \n\
483 ldq $6,16($17) \n\
484 ldq $7,16($18) \n\
485 ldq $21,24($17) \n\
486 \n\
487 ldq $22,24($18) \n\
488 ldq $24,32($17) \n\
489 ldq $25,32($18) \n\
490 ldq $5,8($19) \n\
491 \n\
492 ldq $20,16($19) \n\
493 ldq $23,24($19) \n\
494 ldq $27,32($19) \n\
495 nop \n\
496 \n\
497 xor $0,$1,$1 # 8 cycles from $0 load \n\
498 xor $3,$4,$4 # 7 cycles from $4 load \n\
499 xor $6,$7,$7 # 6 cycles from $7 load \n\
500 xor $21,$22,$22 # 5 cycles from $22 load \n\
501 \n\
502 xor $1,$2,$2 # 9 cycles from $2 load \n\
503 xor $24,$25,$25 # 5 cycles from $25 load \n\
504 stq $2,0($17) \n\
505 xor $4,$5,$5 # 6 cycles from $5 load \n\
506 \n\
507 stq $5,8($17) \n\
508 xor $7,$20,$20 # 7 cycles from $20 load \n\
509 stq $20,16($17) \n\
510 xor $22,$23,$23 # 7 cycles from $23 load \n\
511 \n\
512 stq $23,24($17) \n\
513 xor $25,$27,$27 # 7 cycles from $27 load \n\
514 stq $27,32($17) \n\
515 nop \n\
516 \n\
517 ldq $0,40($17) \n\
518 ldq $1,40($18) \n\
519 ldq $3,48($17) \n\
520 ldq $4,48($18) \n\
521 \n\
522 ldq $6,56($17) \n\
523 ldq $7,56($18) \n\
524 ldq $2,40($19) \n\
525 ldq $5,48($19) \n\
526 \n\
527 ldq $20,56($19) \n\
528 ldq $31,256($17) \n\
529 ldq $31,256($18) \n\
530 ldq $31,256($19) \n\
531 \n\
532 xor $0,$1,$1 # 6 cycles from $1 load \n\
533 xor $3,$4,$4 # 5 cycles from $4 load \n\
534 xor $6,$7,$7 # 5 cycles from $7 load \n\
535 xor $1,$2,$2 # 4 cycles from $2 load \n\
536 \n\
537 xor $4,$5,$5 # 5 cycles from $5 load \n\
538 xor $7,$20,$20 # 4 cycles from $20 load \n\
539 stq $2,40($17) \n\
540 subq $16,1,$16 \n\
541 \n\
542 stq $5,48($17) \n\
543 addq $19,64,$19 \n\
544 stq $20,56($17) \n\
545 addq $18,64,$18 \n\
546 \n\
547 addq $17,64,$17 \n\
548 bgt $16,3b \n\
549 ret \n\
550 .end xor_alpha_prefetch_3 \n\
551 \n\
552 .align 3 \n\
553 .ent xor_alpha_prefetch_4 \n\
554xor_alpha_prefetch_4: \n\
555 .prologue 0 \n\
556 srl $16, 6, $16 \n\
557 \n\
558 ldq $31, 0($17) \n\
559 ldq $31, 0($18) \n\
560 ldq $31, 0($19) \n\
561 ldq $31, 0($20) \n\
562 \n\
563 ldq $31, 64($17) \n\
564 ldq $31, 64($18) \n\
565 ldq $31, 64($19) \n\
566 ldq $31, 64($20) \n\
567 \n\
568 ldq $31, 128($17) \n\
569 ldq $31, 128($18) \n\
570 ldq $31, 128($19) \n\
571 ldq $31, 128($20) \n\
572 \n\
573 ldq $31, 192($17) \n\
574 ldq $31, 192($18) \n\
575 ldq $31, 192($19) \n\
576 ldq $31, 192($20) \n\
577 .align 4 \n\
5784: \n\
579 ldq $0,0($17) \n\
580 ldq $1,0($18) \n\
581 ldq $2,0($19) \n\
582 ldq $3,0($20) \n\
583 \n\
584 ldq $4,8($17) \n\
585 ldq $5,8($18) \n\
586 ldq $6,8($19) \n\
587 ldq $7,8($20) \n\
588 \n\
589 ldq $21,16($17) \n\
590 ldq $22,16($18) \n\
591 ldq $23,16($19) \n\
592 ldq $24,16($20) \n\
593 \n\
594 ldq $25,24($17) \n\
595 xor $0,$1,$1 # 6 cycles from $1 load \n\
596 ldq $27,24($18) \n\
597 xor $2,$3,$3 # 6 cycles from $3 load \n\
598 \n\
599 ldq $0,24($19) \n\
600 xor $1,$3,$3 \n\
601 ldq $1,24($20) \n\
602 xor $4,$5,$5 # 7 cycles from $5 load \n\
603 \n\
604 stq $3,0($17) \n\
605 xor $6,$7,$7 \n\
606 xor $21,$22,$22 # 7 cycles from $22 load \n\
607 xor $5,$7,$7 \n\
608 \n\
609 stq $7,8($17) \n\
610 xor $23,$24,$24 # 7 cycles from $24 load \n\
611 ldq $2,32($17) \n\
612 xor $22,$24,$24 \n\
613 \n\
614 ldq $3,32($18) \n\
615 ldq $4,32($19) \n\
616 ldq $5,32($20) \n\
617 xor $25,$27,$27 # 8 cycles from $27 load \n\
618 \n\
619 ldq $6,40($17) \n\
620 ldq $7,40($18) \n\
621 ldq $21,40($19) \n\
622 ldq $22,40($20) \n\
623 \n\
624 stq $24,16($17) \n\
625 xor $0,$1,$1 # 9 cycles from $1 load \n\
626 xor $2,$3,$3 # 5 cycles from $3 load \n\
627 xor $27,$1,$1 \n\
628 \n\
629 stq $1,24($17) \n\
630 xor $4,$5,$5 # 5 cycles from $5 load \n\
631 ldq $23,48($17) \n\
632 xor $3,$5,$5 \n\
633 \n\
634 ldq $24,48($18) \n\
635 ldq $25,48($19) \n\
636 ldq $27,48($20) \n\
637 ldq $0,56($17) \n\
638 \n\
639 ldq $1,56($18) \n\
640 ldq $2,56($19) \n\
641 ldq $3,56($20) \n\
642 xor $6,$7,$7 # 8 cycles from $6 load \n\
643 \n\
644 ldq $31,256($17) \n\
645 xor $21,$22,$22 # 8 cycles from $22 load \n\
646 ldq $31,256($18) \n\
647 xor $7,$22,$22 \n\
648 \n\
649 ldq $31,256($19) \n\
650 xor $23,$24,$24 # 6 cycles from $24 load \n\
651 ldq $31,256($20) \n\
652 xor $25,$27,$27 # 6 cycles from $27 load \n\
653 \n\
654 stq $5,32($17) \n\
655 xor $24,$27,$27 \n\
656 xor $0,$1,$1 # 7 cycles from $1 load \n\
657 xor $2,$3,$3 # 6 cycles from $3 load \n\
658 \n\
659 stq $22,40($17) \n\
660 xor $1,$3,$3 \n\
661 stq $27,48($17) \n\
662 subq $16,1,$16 \n\
663 \n\
664 stq $3,56($17) \n\
665 addq $20,64,$20 \n\
666 addq $19,64,$19 \n\
667 addq $18,64,$18 \n\
668 \n\
669 addq $17,64,$17 \n\
670 bgt $16,4b \n\
671 ret \n\
672 .end xor_alpha_prefetch_4 \n\
673 \n\
674 .align 3 \n\
675 .ent xor_alpha_prefetch_5 \n\
676xor_alpha_prefetch_5: \n\
677 .prologue 0 \n\
678 srl $16, 6, $16 \n\
679 \n\
680 ldq $31, 0($17) \n\
681 ldq $31, 0($18) \n\
682 ldq $31, 0($19) \n\
683 ldq $31, 0($20) \n\
684 ldq $31, 0($21) \n\
685 \n\
686 ldq $31, 64($17) \n\
687 ldq $31, 64($18) \n\
688 ldq $31, 64($19) \n\
689 ldq $31, 64($20) \n\
690 ldq $31, 64($21) \n\
691 \n\
692 ldq $31, 128($17) \n\
693 ldq $31, 128($18) \n\
694 ldq $31, 128($19) \n\
695 ldq $31, 128($20) \n\
696 ldq $31, 128($21) \n\
697 \n\
698 ldq $31, 192($17) \n\
699 ldq $31, 192($18) \n\
700 ldq $31, 192($19) \n\
701 ldq $31, 192($20) \n\
702 ldq $31, 192($21) \n\
703 .align 4 \n\
7045: \n\
705 ldq $0,0($17) \n\
706 ldq $1,0($18) \n\
707 ldq $2,0($19) \n\
708 ldq $3,0($20) \n\
709 \n\
710 ldq $4,0($21) \n\
711 ldq $5,8($17) \n\
712 ldq $6,8($18) \n\
713 ldq $7,8($19) \n\
714 \n\
715 ldq $22,8($20) \n\
716 ldq $23,8($21) \n\
717 ldq $24,16($17) \n\
718 ldq $25,16($18) \n\
719 \n\
720 ldq $27,16($19) \n\
721 xor $0,$1,$1 # 6 cycles from $1 load \n\
722 ldq $28,16($20) \n\
723 xor $2,$3,$3 # 6 cycles from $3 load \n\
724 \n\
725 ldq $0,16($21) \n\
726 xor $1,$3,$3 \n\
727 ldq $1,24($17) \n\
728 xor $3,$4,$4 # 7 cycles from $4 load \n\
729 \n\
730 stq $4,0($17) \n\
731 xor $5,$6,$6 # 7 cycles from $6 load \n\
732 xor $7,$22,$22 # 7 cycles from $22 load \n\
733 xor $6,$23,$23 # 7 cycles from $23 load \n\
734 \n\
735 ldq $2,24($18) \n\
736 xor $22,$23,$23 \n\
737 ldq $3,24($19) \n\
738 xor $24,$25,$25 # 8 cycles from $25 load \n\
739 \n\
740 stq $23,8($17) \n\
741 xor $25,$27,$27 # 8 cycles from $27 load \n\
742 ldq $4,24($20) \n\
743 xor $28,$0,$0 # 7 cycles from $0 load \n\
744 \n\
745 ldq $5,24($21) \n\
746 xor $27,$0,$0 \n\
747 ldq $6,32($17) \n\
748 ldq $7,32($18) \n\
749 \n\
750 stq $0,16($17) \n\
751 xor $1,$2,$2 # 6 cycles from $2 load \n\
752 ldq $22,32($19) \n\
753 xor $3,$4,$4 # 4 cycles from $4 load \n\
754 \n\
755 ldq $23,32($20) \n\
756 xor $2,$4,$4 \n\
757 ldq $24,32($21) \n\
758 ldq $25,40($17) \n\
759 \n\
760 ldq $27,40($18) \n\
761 ldq $28,40($19) \n\
762 ldq $0,40($20) \n\
763 xor $4,$5,$5 # 7 cycles from $5 load \n\
764 \n\
765 stq $5,24($17) \n\
766 xor $6,$7,$7 # 7 cycles from $7 load \n\
767 ldq $1,40($21) \n\
768 ldq $2,48($17) \n\
769 \n\
770 ldq $3,48($18) \n\
771 xor $7,$22,$22 # 7 cycles from $22 load \n\
772 ldq $4,48($19) \n\
773 xor $23,$24,$24 # 6 cycles from $24 load \n\
774 \n\
775 ldq $5,48($20) \n\
776 xor $22,$24,$24 \n\
777 ldq $6,48($21) \n\
778 xor $25,$27,$27 # 7 cycles from $27 load \n\
779 \n\
780 stq $24,32($17) \n\
781 xor $27,$28,$28 # 8 cycles from $28 load \n\
782 ldq $7,56($17) \n\
783 xor $0,$1,$1 # 6 cycles from $1 load \n\
784 \n\
785 ldq $22,56($18) \n\
786 ldq $23,56($19) \n\
787 ldq $24,56($20) \n\
788 ldq $25,56($21) \n\
789 \n\
790 ldq $31,256($17) \n\
791 xor $28,$1,$1 \n\
792 ldq $31,256($18) \n\
793 xor $2,$3,$3 # 9 cycles from $3 load \n\
794 \n\
795 ldq $31,256($19) \n\
796 xor $3,$4,$4 # 9 cycles from $4 load \n\
797 ldq $31,256($20) \n\
798 xor $5,$6,$6 # 8 cycles from $6 load \n\
799 \n\
800 stq $1,40($17) \n\
801 xor $4,$6,$6 \n\
802 xor $7,$22,$22 # 7 cycles from $22 load \n\
803 xor $23,$24,$24 # 6 cycles from $24 load \n\
804 \n\
805 stq $6,48($17) \n\
806 xor $22,$24,$24 \n\
807 ldq $31,256($21) \n\
808 xor $24,$25,$25 # 8 cycles from $25 load \n\
809 \n\
810 stq $25,56($17) \n\
811 subq $16,1,$16 \n\
812 addq $21,64,$21 \n\
813 addq $20,64,$20 \n\
814 \n\
815 addq $19,64,$19 \n\
816 addq $18,64,$18 \n\
817 addq $17,64,$17 \n\
818 bgt $16,5b \n\
819 \n\
820 ret \n\
821 .end xor_alpha_prefetch_5 \n\
822");
823
824static struct xor_block_template xor_block_alpha = {
825 .name = "alpha",
826 .do_2 = xor_alpha_2,
827 .do_3 = xor_alpha_3,
828 .do_4 = xor_alpha_4,
829 .do_5 = xor_alpha_5,
830};
831
832static struct xor_block_template xor_block_alpha_prefetch = {
833 .name = "alpha prefetch",
834 .do_2 = xor_alpha_prefetch_2,
835 .do_3 = xor_alpha_prefetch_3,
836 .do_4 = xor_alpha_prefetch_4,
837 .do_5 = xor_alpha_prefetch_5,
838};
839
840/* For grins, also test the generic routines. */
841#include <asm-generic/xor.h>
842
843#undef XOR_TRY_TEMPLATES
844#define XOR_TRY_TEMPLATES \
845 do { \
846 xor_speed(&xor_block_8regs); \
847 xor_speed(&xor_block_32regs); \
848 xor_speed(&xor_block_alpha); \
849 xor_speed(&xor_block_alpha_prefetch); \
850 } while (0)
851
852/* Force the use of alpha_prefetch if EV6, as it is significantly
853 faster in the cold cache case. */
854#define XOR_SELECT_TEMPLATE(FASTEST) \
855 (implver() == IMPLVER_EV6 ? &xor_block_alpha_prefetch : FASTEST)
diff --git a/include/asm-arm/plat-orion/cache-feroceon-l2.h b/include/asm-arm/plat-orion/cache-feroceon-l2.h
deleted file mode 100644
index ba4e016d3ec0..000000000000
--- a/include/asm-arm/plat-orion/cache-feroceon-l2.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * include/asm-arm/plat-orion/cache-feroceon-l2.h
3 *
4 * Copyright (C) 2008 Marvell Semiconductor
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11extern void __init feroceon_l2_init(int l2_wt_override);
diff --git a/include/asm-arm/plat-orion/ehci-orion.h b/include/asm-arm/plat-orion/ehci-orion.h
deleted file mode 100644
index 785705651e24..000000000000
--- a/include/asm-arm/plat-orion/ehci-orion.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-arm/plat-orion/ehci-orion.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_PLAT_ORION_EHCI_ORION_H
10#define __ASM_PLAT_ORION_EHCI_ORION_H
11
12#include <linux/mbus.h>
13
14struct orion_ehci_data {
15 struct mbus_dram_target_info *dram;
16};
17
18
19#endif
diff --git a/include/asm-arm/plat-orion/irq.h b/include/asm-arm/plat-orion/irq.h
deleted file mode 100644
index 94aeed919d5b..000000000000
--- a/include/asm-arm/plat-orion/irq.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * include/asm-arm/plat-orion/irq.h
3 *
4 * Marvell Orion SoC IRQ handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_PLAT_ORION_IRQ_H
12#define __ASM_PLAT_ORION_IRQ_H
13
14void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr);
15
16
17#endif
diff --git a/include/asm-arm/plat-orion/mv_xor.h b/include/asm-arm/plat-orion/mv_xor.h
deleted file mode 100644
index c349e8ff5cc0..000000000000
--- a/include/asm-arm/plat-orion/mv_xor.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Marvell XOR platform device data definition file.
3 */
4
5#ifndef __ASM_PLAT_ORION_MV_XOR_H
6#define __ASM_PLAT_ORION_MV_XOR_H
7
8#include <linux/dmaengine.h>
9#include <linux/mbus.h>
10
11#define MV_XOR_SHARED_NAME "mv_xor_shared"
12#define MV_XOR_NAME "mv_xor"
13
14struct mbus_dram_target_info;
15
16struct mv_xor_platform_shared_data {
17 struct mbus_dram_target_info *dram;
18};
19
20struct mv_xor_platform_data {
21 struct platform_device *shared;
22 int hw_id;
23 dma_cap_mask_t cap_mask;
24 size_t pool_size;
25};
26
27
28#endif
diff --git a/include/asm-arm/plat-orion/orion_nand.h b/include/asm-arm/plat-orion/orion_nand.h
deleted file mode 100644
index ad4ce94c1998..000000000000
--- a/include/asm-arm/plat-orion/orion_nand.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * include/asm-arm/plat-orion/orion_nand.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_PLAT_ORION_ORION_NAND_H
10#define __ASM_PLAT_ORION_ORION_NAND_H
11
12/*
13 * Device bus NAND private data
14 */
15struct orion_nand_data {
16 struct mtd_partition *parts;
17 u32 nr_parts;
18 u8 ale; /* address line number connected to ALE */
19 u8 cle; /* address line number connected to CLE */
20 u8 width; /* buswidth */
21 u8 chip_delay;
22};
23
24
25#endif
diff --git a/include/asm-arm/plat-orion/pcie.h b/include/asm-arm/plat-orion/pcie.h
deleted file mode 100644
index e61b7bd97af5..000000000000
--- a/include/asm-arm/plat-orion/pcie.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/plat-orion/pcie.h
3 *
4 * Marvell Orion SoC PCIe handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_PLAT_ORION_PCIE_H
12#define __ASM_PLAT_ORION_PCIE_H
13
14u32 orion_pcie_dev_id(void __iomem *base);
15u32 orion_pcie_rev(void __iomem *base);
16int orion_pcie_link_up(void __iomem *base);
17int orion_pcie_x4_mode(void __iomem *base);
18int orion_pcie_get_local_bus_nr(void __iomem *base);
19void orion_pcie_set_local_bus_nr(void __iomem *base, int nr);
20void orion_pcie_setup(void __iomem *base,
21 struct mbus_dram_target_info *dram);
22int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus,
23 u32 devfn, int where, int size, u32 *val);
24int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus,
25 u32 devfn, int where, int size, u32 *val);
26int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus,
27 u32 devfn, int where, int size, u32 *val);
28int orion_pcie_wr_conf(void __iomem *base, struct pci_bus *bus,
29 u32 devfn, int where, int size, u32 val);
30
31
32#endif
diff --git a/include/asm-arm/plat-orion/time.h b/include/asm-arm/plat-orion/time.h
deleted file mode 100644
index 0e85cc8f44d9..000000000000
--- a/include/asm-arm/plat-orion/time.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * include/asm-arm/plat-orion/time.h
3 *
4 * Marvell Orion SoC time handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_PLAT_ORION_TIME_H
12#define __ASM_PLAT_ORION_TIME_H
13
14void orion_time_init(unsigned int irq, unsigned int tclk);
15
16
17#endif
diff --git a/include/asm-arm/plat-s3c/regs-nand.h b/include/asm-arm/plat-s3c/regs-nand.h
index 09f0b5503f5b..b2caa4bca270 100644
--- a/include/asm-arm/plat-s3c/regs-nand.h
+++ b/include/asm-arm/plat-s3c/regs-nand.h
@@ -11,7 +11,7 @@
11*/ 11*/
12 12
13#ifndef __ASM_ARM_REGS_NAND 13#ifndef __ASM_ARM_REGS_NAND
14#define __ASM_ARM_REGS_NAND "$Id: nand.h,v 1.3 2003/12/09 11:36:29 ben Exp $" 14#define __ASM_ARM_REGS_NAND
15 15
16 16
17#define S3C2410_NFREG(x) (x) 17#define S3C2410_NFREG(x) (x)
diff --git a/include/asm-arm/plat-s3c/regs-timer.h b/include/asm-arm/plat-s3c/regs-timer.h
index b4366ea39677..cc0eedd53e38 100644
--- a/include/asm-arm/plat-s3c/regs-timer.h
+++ b/include/asm-arm/plat-s3c/regs-timer.h
@@ -12,7 +12,7 @@
12 12
13 13
14#ifndef __ASM_ARCH_REGS_TIMER_H 14#ifndef __ASM_ARCH_REGS_TIMER_H
15#define __ASM_ARCH_REGS_TIMER_H "$Id: timer.h,v 1.4 2003/05/06 19:30:50 ben Exp $" 15#define __ASM_ARCH_REGS_TIMER_H
16 16
17#define S3C_TIMERREG(x) (S3C_VA_TIMER + (x)) 17#define S3C_TIMERREG(x) (S3C_VA_TIMER + (x))
18#define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c)) 18#define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c))
diff --git a/include/asm-arm/plat-s3c/regs-watchdog.h b/include/asm-arm/plat-s3c/regs-watchdog.h
index 1229f076c0a0..4938492470f7 100644
--- a/include/asm-arm/plat-s3c/regs-watchdog.h
+++ b/include/asm-arm/plat-s3c/regs-watchdog.h
@@ -12,7 +12,7 @@
12 12
13 13
14#ifndef __ASM_ARCH_REGS_WATCHDOG_H 14#ifndef __ASM_ARCH_REGS_WATCHDOG_H
15#define __ASM_ARCH_REGS_WATCHDOG_H "$Id: watchdog.h,v 1.2 2003/04/29 13:31:09 ben Exp $" 15#define __ASM_ARCH_REGS_WATCHDOG_H
16 16
17#define S3C_WDOGREG(x) ((x) + S3C_VA_WATCHDOG) 17#define S3C_WDOGREG(x) ((x) + S3C_VA_WATCHDOG)
18 18
diff --git a/include/asm-arm/plat-s3c24xx/s3c2410.h b/include/asm-arm/plat-s3c24xx/s3c2410.h
index 36de0b835873..3cd1ec677b3f 100644
--- a/include/asm-arm/plat-s3c24xx/s3c2410.h
+++ b/include/asm-arm/plat-s3c24xx/s3c2410.h
@@ -21,11 +21,11 @@ extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
21 21
22extern void s3c2410_init_clocks(int xtal); 22extern void s3c2410_init_clocks(int xtal);
23 23
24extern int s3c2410_baseclk_add(void);
25
26#else 24#else
27#define s3c2410_init_clocks NULL 25#define s3c2410_init_clocks NULL
28#define s3c2410_init_uarts NULL 26#define s3c2410_init_uarts NULL
29#define s3c2410_map_io NULL 27#define s3c2410_map_io NULL
30#define s3c2410_init NULL 28#define s3c2410_init NULL
31#endif 29#endif
30
31extern int s3c2410_baseclk_add(void);
diff --git a/include/asm-blackfin/.gitignore b/include/asm-blackfin/.gitignore
deleted file mode 100644
index 7858564a4466..000000000000
--- a/include/asm-blackfin/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1+mach
diff --git a/include/asm-blackfin/Kbuild b/include/asm-blackfin/Kbuild
deleted file mode 100644
index 71f8fe783258..000000000000
--- a/include/asm-blackfin/Kbuild
+++ /dev/null
@@ -1,3 +0,0 @@
1include include/asm-generic/Kbuild.asm
2
3header-y += fixed_code.h
diff --git a/include/asm-blackfin/a.out.h b/include/asm-blackfin/a.out.h
deleted file mode 100644
index 6c3d652ebd33..000000000000
--- a/include/asm-blackfin/a.out.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef __BFIN_A_OUT_H__
2#define __BFIN_A_OUT_H__
3
4struct exec {
5 unsigned long a_info; /* Use macros N_MAGIC, etc for access */
6 unsigned a_text; /* length of text, in bytes */
7 unsigned a_data; /* length of data, in bytes */
8 unsigned a_bss; /* length of uninitialized data area for file, in bytes */
9 unsigned a_syms; /* length of symbol table data in file, in bytes */
10 unsigned a_entry; /* start address */
11 unsigned a_trsize; /* length of relocation info for text, in bytes */
12 unsigned a_drsize; /* length of relocation info for data, in bytes */
13};
14
15#define N_TRSIZE(a) ((a).a_trsize)
16#define N_DRSIZE(a) ((a).a_drsize)
17#define N_SYMSIZE(a) ((a).a_syms)
18
19#endif /* __BFIN_A_OUT_H__ */
diff --git a/include/asm-blackfin/atomic.h b/include/asm-blackfin/atomic.h
deleted file mode 100644
index 7cf508718605..000000000000
--- a/include/asm-blackfin/atomic.h
+++ /dev/null
@@ -1,144 +0,0 @@
1#ifndef __ARCH_BLACKFIN_ATOMIC__
2#define __ARCH_BLACKFIN_ATOMIC__
3
4#include <asm/system.h> /* local_irq_XXX() */
5
6/*
7 * Atomic operations that C can't guarantee us. Useful for
8 * resource counting etc..
9 *
10 * Generally we do not concern about SMP BFIN systems, so we don't have
11 * to deal with that.
12 *
13 * Tony Kou (tonyko@lineo.ca) Lineo Inc. 2001
14 */
15
16typedef struct {
17 int counter;
18} atomic_t;
19#define ATOMIC_INIT(i) { (i) }
20
21#define atomic_read(v) ((v)->counter)
22#define atomic_set(v, i) (((v)->counter) = i)
23
24static __inline__ void atomic_add(int i, atomic_t * v)
25{
26 long flags;
27
28 local_irq_save(flags);
29 v->counter += i;
30 local_irq_restore(flags);
31}
32
33static __inline__ void atomic_sub(int i, atomic_t * v)
34{
35 long flags;
36
37 local_irq_save(flags);
38 v->counter -= i;
39 local_irq_restore(flags);
40
41}
42
43static inline int atomic_add_return(int i, atomic_t * v)
44{
45 int __temp = 0;
46 long flags;
47
48 local_irq_save(flags);
49 v->counter += i;
50 __temp = v->counter;
51 local_irq_restore(flags);
52
53
54 return __temp;
55}
56
57#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
58static inline int atomic_sub_return(int i, atomic_t * v)
59{
60 int __temp = 0;
61 long flags;
62
63 local_irq_save(flags);
64 v->counter -= i;
65 __temp = v->counter;
66 local_irq_restore(flags);
67
68 return __temp;
69}
70
71static __inline__ void atomic_inc(volatile atomic_t * v)
72{
73 long flags;
74
75 local_irq_save(flags);
76 v->counter++;
77 local_irq_restore(flags);
78}
79
80#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
81#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
82
83#define atomic_add_unless(v, a, u) \
84({ \
85 int c, old; \
86 c = atomic_read(v); \
87 while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
88 c = old; \
89 c != (u); \
90})
91#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
92
93static __inline__ void atomic_dec(volatile atomic_t * v)
94{
95 long flags;
96
97 local_irq_save(flags);
98 v->counter--;
99 local_irq_restore(flags);
100}
101
102static __inline__ void atomic_clear_mask(unsigned int mask, atomic_t * v)
103{
104 long flags;
105
106 local_irq_save(flags);
107 v->counter &= ~mask;
108 local_irq_restore(flags);
109}
110
111static __inline__ void atomic_set_mask(unsigned int mask, atomic_t * v)
112{
113 long flags;
114
115 local_irq_save(flags);
116 v->counter |= mask;
117 local_irq_restore(flags);
118}
119
120/* Atomic operations are already serializing */
121#define smp_mb__before_atomic_dec() barrier()
122#define smp_mb__after_atomic_dec() barrier()
123#define smp_mb__before_atomic_inc() barrier()
124#define smp_mb__after_atomic_inc() barrier()
125
126#define atomic_dec_return(v) atomic_sub_return(1,(v))
127#define atomic_inc_return(v) atomic_add_return(1,(v))
128
129/*
130 * atomic_inc_and_test - increment and test
131 * @v: pointer of type atomic_t
132 *
133 * Atomically increments @v by 1
134 * and returns true if the result is zero, or false for all
135 * other cases.
136 */
137#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
138
139#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
140#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
141
142#include <asm-generic/atomic.h>
143
144#endif /* __ARCH_BLACKFIN_ATOMIC __ */
diff --git a/include/asm-blackfin/auxvec.h b/include/asm-blackfin/auxvec.h
deleted file mode 100644
index 215506cd87b7..000000000000
--- a/include/asm-blackfin/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASMBFIN_AUXVEC_H
2#define __ASMBFIN_AUXVEC_H
3
4#endif
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h
deleted file mode 100644
index 320aa5e167e9..000000000000
--- a/include/asm-blackfin/bfin-global.h
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2 * File: include/asm-blackfin/bfin-global.h
3 * Based on:
4 * Author: *
5 * Created:
6 * Description: Global extern defines for blackfin
7 *
8 * Modified:
9 * Copyright 2004-2006 Analog Devices Inc.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see the file COPYING, or write
25 * to the Free Software Foundation, Inc.,
26 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 */
28
29#ifndef _BFIN_GLOBAL_H_
30#define _BFIN_GLOBAL_H_
31
32#ifndef __ASSEMBLY__
33
34#include <asm-generic/sections.h>
35#include <asm/ptrace.h>
36#include <asm/user.h>
37#include <linux/linkage.h>
38#include <linux/types.h>
39
40#if defined(CONFIG_DMA_UNCACHED_4M)
41# define DMA_UNCACHED_REGION (4 * 1024 * 1024)
42#elif defined(CONFIG_DMA_UNCACHED_2M)
43# define DMA_UNCACHED_REGION (2 * 1024 * 1024)
44#elif defined(CONFIG_DMA_UNCACHED_1M)
45# define DMA_UNCACHED_REGION (1024 * 1024)
46#else
47# define DMA_UNCACHED_REGION (0)
48#endif
49
50extern unsigned long get_cclk(void);
51extern unsigned long get_sclk(void);
52extern unsigned long sclk_to_usecs(unsigned long sclk);
53extern unsigned long usecs_to_sclk(unsigned long usecs);
54
55extern void dump_bfin_process(struct pt_regs *regs);
56extern void dump_bfin_mem(struct pt_regs *regs);
57extern void dump_bfin_trace_buffer(void);
58
59extern int init_arch_irq(void);
60extern void bfin_reset(void);
61extern void _cplb_hdr(void);
62/* Blackfin cache functions */
63extern void bfin_icache_init(void);
64extern void bfin_dcache_init(void);
65extern int read_iloc(void);
66extern int bfin_console_init(void);
67extern asmlinkage void lower_to_irq14(void);
68extern asmlinkage void bfin_return_from_exception(void);
69extern void init_exception_vectors(void);
70extern void init_dma(void);
71extern void program_IAR(void);
72extern void evt14_softirq(void);
73extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
74extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type);
75extern int bfin_internal_set_wake(unsigned int irq, unsigned int state);
76
77extern asmlinkage void finish_atomic_sections (struct pt_regs *regs);
78extern char fixed_code_start;
79extern char fixed_code_end;
80extern int atomic_xchg32(void);
81extern int atomic_cas32(void);
82extern int atomic_add32(void);
83extern int atomic_sub32(void);
84extern int atomic_ior32(void);
85extern int atomic_and32(void);
86extern int atomic_xor32(void);
87extern void safe_user_instruction(void);
88extern void sigreturn_stub(void);
89
90extern void *l1_data_A_sram_alloc(size_t);
91extern void *l1_data_B_sram_alloc(size_t);
92extern void *l1_inst_sram_alloc(size_t);
93extern void *l1_data_sram_alloc(size_t);
94extern void *l1_data_sram_zalloc(size_t);
95extern void *l2_sram_alloc(size_t);
96extern void *l2_sram_zalloc(size_t);
97extern int l1_data_A_sram_free(const void*);
98extern int l1_data_B_sram_free(const void*);
99extern int l1_inst_sram_free(const void*);
100extern int l1_data_sram_free(const void*);
101extern int l2_sram_free(const void *);
102extern int sram_free(const void*);
103
104#define L1_INST_SRAM 0x00000001
105#define L1_DATA_A_SRAM 0x00000002
106#define L1_DATA_B_SRAM 0x00000004
107#define L1_DATA_SRAM 0x00000006
108#define L2_SRAM 0x00000008
109extern void *sram_alloc_with_lsl(size_t, unsigned long);
110extern int sram_free_with_lsl(const void*);
111
112extern const char bfin_board_name[];
113extern unsigned long wall_jiffies;
114
115extern unsigned long bfin_sic_iwr[];
116extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
117extern struct file_operations dpmc_fops;
118extern unsigned long _ramstart, _ramend, _rambase;
119extern unsigned long memory_start, memory_end, physical_mem_end;
120extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
121 _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[],
122 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
123 _ebss_l2[], _l2_lma_start[];
124
125#ifdef CONFIG_MTD_UCLINUX
126extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
127#endif
128
129#endif
130
131#endif /* _BLACKFIN_H_ */
diff --git a/include/asm-blackfin/bfin5xx_spi.h b/include/asm-blackfin/bfin5xx_spi.h
deleted file mode 100644
index 9fa19158e38d..000000000000
--- a/include/asm-blackfin/bfin5xx_spi.h
+++ /dev/null
@@ -1,137 +0,0 @@
1/************************************************************
2
3* Copyright (C) 2006-2008, Analog Devices. All Rights Reserved
4*
5* FILE bfin5xx_spi.h
6* PROGRAMMER(S): Luke Yang (Analog Devices Inc.)
7*
8*
9* DATE OF CREATION: March. 10th 2006
10*
11* SYNOPSIS:
12*
13* DESCRIPTION: header file for SPI controller driver for Blackfin5xx.
14**************************************************************
15
16* MODIFICATION HISTORY:
17* March 10, 2006 bfin5xx_spi.h Created. (Luke Yang)
18
19************************************************************/
20
21#ifndef _SPI_CHANNEL_H_
22#define _SPI_CHANNEL_H_
23
24#define SPI_READ 0
25#define SPI_WRITE 1
26
27#define SPI_CTRL_OFF 0x0
28#define SPI_FLAG_OFF 0x4
29#define SPI_STAT_OFF 0x8
30#define SPI_TXBUFF_OFF 0xc
31#define SPI_RXBUFF_OFF 0x10
32#define SPI_BAUD_OFF 0x14
33#define SPI_SHAW_OFF 0x18
34
35
36#define BIT_CTL_ENABLE 0x4000
37#define BIT_CTL_OPENDRAIN 0x2000
38#define BIT_CTL_MASTER 0x1000
39#define BIT_CTL_POLAR 0x0800
40#define BIT_CTL_PHASE 0x0400
41#define BIT_CTL_BITORDER 0x0200
42#define BIT_CTL_WORDSIZE 0x0100
43#define BIT_CTL_MISOENABLE 0x0020
44#define BIT_CTL_RXMOD 0x0000
45#define BIT_CTL_TXMOD 0x0001
46#define BIT_CTL_TIMOD_DMA_TX 0x0003
47#define BIT_CTL_TIMOD_DMA_RX 0x0002
48#define BIT_CTL_SENDOPT 0x0004
49#define BIT_CTL_TIMOD 0x0003
50
51#define BIT_STAT_SPIF 0x0001
52#define BIT_STAT_MODF 0x0002
53#define BIT_STAT_TXE 0x0004
54#define BIT_STAT_TXS 0x0008
55#define BIT_STAT_RBSY 0x0010
56#define BIT_STAT_RXS 0x0020
57#define BIT_STAT_TXCOL 0x0040
58#define BIT_STAT_CLR 0xFFFF
59
60#define BIT_STU_SENDOVER 0x0001
61#define BIT_STU_RECVFULL 0x0020
62
63#define CFG_SPI_ENABLE 1
64#define CFG_SPI_DISABLE 0
65
66#define CFG_SPI_OUTENABLE 1
67#define CFG_SPI_OUTDISABLE 0
68
69#define CFG_SPI_ACTLOW 1
70#define CFG_SPI_ACTHIGH 0
71
72#define CFG_SPI_PHASESTART 1
73#define CFG_SPI_PHASEMID 0
74
75#define CFG_SPI_MASTER 1
76#define CFG_SPI_SLAVE 0
77
78#define CFG_SPI_SENELAST 0
79#define CFG_SPI_SENDZERO 1
80
81#define CFG_SPI_RCVFLUSH 1
82#define CFG_SPI_RCVDISCARD 0
83
84#define CFG_SPI_LSBFIRST 1
85#define CFG_SPI_MSBFIRST 0
86
87#define CFG_SPI_WORDSIZE16 1
88#define CFG_SPI_WORDSIZE8 0
89
90#define CFG_SPI_MISOENABLE 1
91#define CFG_SPI_MISODISABLE 0
92
93#define CFG_SPI_READ 0x00
94#define CFG_SPI_WRITE 0x01
95#define CFG_SPI_DMAREAD 0x02
96#define CFG_SPI_DMAWRITE 0x03
97
98#define CFG_SPI_CSCLEARALL 0
99#define CFG_SPI_CHIPSEL1 1
100#define CFG_SPI_CHIPSEL2 2
101#define CFG_SPI_CHIPSEL3 3
102#define CFG_SPI_CHIPSEL4 4
103#define CFG_SPI_CHIPSEL5 5
104#define CFG_SPI_CHIPSEL6 6
105#define CFG_SPI_CHIPSEL7 7
106
107#define CFG_SPI_CS1VALUE 1
108#define CFG_SPI_CS2VALUE 2
109#define CFG_SPI_CS3VALUE 3
110#define CFG_SPI_CS4VALUE 4
111#define CFG_SPI_CS5VALUE 5
112#define CFG_SPI_CS6VALUE 6
113#define CFG_SPI_CS7VALUE 7
114
115#define CMD_SPI_SET_BAUDRATE 2
116#define CMD_SPI_GET_SYSTEMCLOCK 25
117#define CMD_SPI_SET_WRITECONTINUOUS 26
118
119/* device.platform_data for SSP controller devices */
120struct bfin5xx_spi_master {
121 u16 num_chipselect;
122 u8 enable_dma;
123 u16 pin_req[4];
124};
125
126/* spi_board_info.controller_data for SPI slave devices,
127 * copied to spi_device.platform_data ... mostly for dma tuning
128 */
129struct bfin5xx_spi_chip {
130 u16 ctl_reg;
131 u8 enable_dma;
132 u8 bits_per_word;
133 u8 cs_change_per_word;
134 u16 cs_chg_udelay; /* Some devices require 16-bit delays */
135};
136
137#endif /* _SPI_CHANNEL_H_ */
diff --git a/include/asm-blackfin/bfin_simple_timer.h b/include/asm-blackfin/bfin_simple_timer.h
deleted file mode 100644
index fccbb595464a..000000000000
--- a/include/asm-blackfin/bfin_simple_timer.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _bfin_simple_timer_h_
2#define _bfin_simple_timer_h_
3
4#include <linux/ioctl.h>
5
6#define BFIN_SIMPLE_TIMER_IOCTL_MAGIC 't'
7
8#define BFIN_SIMPLE_TIMER_SET_PERIOD _IO (BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 2)
9#define BFIN_SIMPLE_TIMER_START _IO (BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 6)
10#define BFIN_SIMPLE_TIMER_STOP _IO (BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 8)
11#define BFIN_SIMPLE_TIMER_READ _IO (BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 10)
12
13#endif
diff --git a/include/asm-blackfin/bfin_sport.h b/include/asm-blackfin/bfin_sport.h
deleted file mode 100644
index c76ed8def302..000000000000
--- a/include/asm-blackfin/bfin_sport.h
+++ /dev/null
@@ -1,175 +0,0 @@
1/*
2 * File: include/asm-blackfin/bfin_sport.h
3 * Based on:
4 * Author: Roy Huang (roy.huang@analog.com)
5 *
6 * Created: Thu Aug. 24 2006
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#ifndef __BFIN_SPORT_H__
31#define __BFIN_SPORT_H__
32
33#define SPORT_MAJOR 237
34#define SPORT_NR_DEVS 2
35
36/* Sport mode: it can be set to TDM, i2s or others */
37#define NORM_MODE 0x0
38#define TDM_MODE 0x1
39#define I2S_MODE 0x2
40
41/* Data format, normal, a-law or u-law */
42#define NORM_FORMAT 0x0
43#define ALAW_FORMAT 0x2
44#define ULAW_FORMAT 0x3
45struct sport_register;
46
47/* Function driver which use sport must initialize the structure */
48struct sport_config {
49 /*TDM (multichannels), I2S or other mode */
50 unsigned int mode:3;
51
52 /* if TDM mode is selected, channels must be set */
53 int channels; /* Must be in 8 units */
54 unsigned int frame_delay:4; /* Delay between frame sync pulse and first bit */
55
56 /* I2S mode */
57 unsigned int right_first:1; /* Right stereo channel first */
58
59 /* In mormal mode, the following item need to be set */
60 unsigned int lsb_first:1; /* order of transmit or receive data */
61 unsigned int fsync:1; /* Frame sync required */
62 unsigned int data_indep:1; /* data independent frame sync generated */
63 unsigned int act_low:1; /* Active low TFS */
64 unsigned int late_fsync:1; /* Late frame sync */
65 unsigned int tckfe:1;
66 unsigned int sec_en:1; /* Secondary side enabled */
67
68 /* Choose clock source */
69 unsigned int int_clk:1; /* Internal or external clock */
70
71 /* If external clock is used, the following fields are ignored */
72 int serial_clk;
73 int fsync_clk;
74
75 unsigned int data_format:2; /*Normal, u-law or a-law */
76
77 int word_len; /* How length of the word in bits, 3-32 bits */
78 int dma_enabled;
79};
80
81struct sport_register {
82 unsigned short tcr1;
83 unsigned short reserved0;
84 unsigned short tcr2;
85 unsigned short reserved1;
86 unsigned short tclkdiv;
87 unsigned short reserved2;
88 unsigned short tfsdiv;
89 unsigned short reserved3;
90 unsigned long tx;
91 unsigned long reserved_l0;
92 unsigned long rx;
93 unsigned long reserved_l1;
94 unsigned short rcr1;
95 unsigned short reserved4;
96 unsigned short rcr2;
97 unsigned short reserved5;
98 unsigned short rclkdiv;
99 unsigned short reserved6;
100 unsigned short rfsdiv;
101 unsigned short reserved7;
102 unsigned short stat;
103 unsigned short reserved8;
104 unsigned short chnl;
105 unsigned short reserved9;
106 unsigned short mcmc1;
107 unsigned short reserved10;
108 unsigned short mcmc2;
109 unsigned short reserved11;
110 unsigned long mtcs0;
111 unsigned long mtcs1;
112 unsigned long mtcs2;
113 unsigned long mtcs3;
114 unsigned long mrcs0;
115 unsigned long mrcs1;
116 unsigned long mrcs2;
117 unsigned long mrcs3;
118};
119
120#define SPORT_IOC_MAGIC 'P'
121#define SPORT_IOC_CONFIG _IOWR('P', 0x01, struct sport_config)
122
123/* Test purpose */
124#define ENABLE_AD73311 _IOWR('P', 0x02, int)
125
126struct sport_dev {
127 struct cdev cdev; /* Char device structure */
128
129 int sport_num;
130
131 int dma_rx_chan;
132 int dma_tx_chan;
133
134 int rx_irq;
135 unsigned char *rx_buf; /* Buffer store the received data */
136 int rx_len; /* How many bytes will be received */
137 int rx_received; /* How many bytes has been received */
138
139 int tx_irq;
140 const unsigned char *tx_buf;
141 int tx_len;
142 int tx_sent;
143
144 int sport_err_irq;
145
146 struct mutex mutex; /* mutual exclusion semaphore */
147 struct task_struct *task;
148
149 wait_queue_head_t waitq;
150 int wait_con;
151 struct sport_register *regs;
152 struct sport_config config;
153};
154
155#define SPORT_TCR1 0
156#define SPORT_TCR2 1
157#define SPORT_TCLKDIV 2
158#define SPORT_TFSDIV 3
159#define SPORT_RCR1 8
160#define SPORT_RCR2 9
161#define SPORT_RCLKDIV 10
162#define SPORT_RFSDIV 11
163#define SPORT_CHANNEL 13
164#define SPORT_MCMC1 14
165#define SPORT_MCMC2 15
166#define SPORT_MTCS0 16
167#define SPORT_MTCS1 17
168#define SPORT_MTCS2 18
169#define SPORT_MTCS3 19
170#define SPORT_MRCS0 20
171#define SPORT_MRCS1 21
172#define SPORT_MRCS2 22
173#define SPORT_MRCS3 23
174
175#endif /*__BFIN_SPORT_H__*/
diff --git a/include/asm-blackfin/bitops.h b/include/asm-blackfin/bitops.h
deleted file mode 100644
index b39a175c79c1..000000000000
--- a/include/asm-blackfin/bitops.h
+++ /dev/null
@@ -1,218 +0,0 @@
1#ifndef _BLACKFIN_BITOPS_H
2#define _BLACKFIN_BITOPS_H
3
4/*
5 * Copyright 1992, Linus Torvalds.
6 */
7
8#include <linux/compiler.h>
9#include <asm/byteorder.h> /* swab32 */
10#include <asm/system.h> /* save_flags */
11
12#ifdef __KERNEL__
13
14#ifndef _LINUX_BITOPS_H
15#error only <linux/bitops.h> can be included directly
16#endif
17
18#include <asm-generic/bitops/ffs.h>
19#include <asm-generic/bitops/__ffs.h>
20#include <asm-generic/bitops/sched.h>
21#include <asm-generic/bitops/ffz.h>
22
23static __inline__ void set_bit(int nr, volatile unsigned long *addr)
24{
25 int *a = (int *)addr;
26 int mask;
27 unsigned long flags;
28
29 a += nr >> 5;
30 mask = 1 << (nr & 0x1f);
31 local_irq_save(flags);
32 *a |= mask;
33 local_irq_restore(flags);
34}
35
36static __inline__ void __set_bit(int nr, volatile unsigned long *addr)
37{
38 int *a = (int *)addr;
39 int mask;
40
41 a += nr >> 5;
42 mask = 1 << (nr & 0x1f);
43 *a |= mask;
44}
45
46/*
47 * clear_bit() doesn't provide any barrier for the compiler.
48 */
49#define smp_mb__before_clear_bit() barrier()
50#define smp_mb__after_clear_bit() barrier()
51
52static __inline__ void clear_bit(int nr, volatile unsigned long *addr)
53{
54 int *a = (int *)addr;
55 int mask;
56 unsigned long flags;
57 a += nr >> 5;
58 mask = 1 << (nr & 0x1f);
59 local_irq_save(flags);
60 *a &= ~mask;
61 local_irq_restore(flags);
62}
63
64static __inline__ void __clear_bit(int nr, volatile unsigned long *addr)
65{
66 int *a = (int *)addr;
67 int mask;
68
69 a += nr >> 5;
70 mask = 1 << (nr & 0x1f);
71 *a &= ~mask;
72}
73
74static __inline__ void change_bit(int nr, volatile unsigned long *addr)
75{
76 int mask, flags;
77 unsigned long *ADDR = (unsigned long *)addr;
78
79 ADDR += nr >> 5;
80 mask = 1 << (nr & 31);
81 local_irq_save(flags);
82 *ADDR ^= mask;
83 local_irq_restore(flags);
84}
85
86static __inline__ void __change_bit(int nr, volatile unsigned long *addr)
87{
88 int mask;
89 unsigned long *ADDR = (unsigned long *)addr;
90
91 ADDR += nr >> 5;
92 mask = 1 << (nr & 31);
93 *ADDR ^= mask;
94}
95
96static __inline__ int test_and_set_bit(int nr, void *addr)
97{
98 int mask, retval;
99 volatile unsigned int *a = (volatile unsigned int *)addr;
100 unsigned long flags;
101
102 a += nr >> 5;
103 mask = 1 << (nr & 0x1f);
104 local_irq_save(flags);
105 retval = (mask & *a) != 0;
106 *a |= mask;
107 local_irq_restore(flags);
108
109 return retval;
110}
111
112static __inline__ int __test_and_set_bit(int nr, volatile unsigned long *addr)
113{
114 int mask, retval;
115 volatile unsigned int *a = (volatile unsigned int *)addr;
116
117 a += nr >> 5;
118 mask = 1 << (nr & 0x1f);
119 retval = (mask & *a) != 0;
120 *a |= mask;
121 return retval;
122}
123
124static __inline__ int test_and_clear_bit(int nr, volatile unsigned long *addr)
125{
126 int mask, retval;
127 volatile unsigned int *a = (volatile unsigned int *)addr;
128 unsigned long flags;
129
130 a += nr >> 5;
131 mask = 1 << (nr & 0x1f);
132 local_irq_save(flags);
133 retval = (mask & *a) != 0;
134 *a &= ~mask;
135 local_irq_restore(flags);
136
137 return retval;
138}
139
140static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
141{
142 int mask, retval;
143 volatile unsigned int *a = (volatile unsigned int *)addr;
144
145 a += nr >> 5;
146 mask = 1 << (nr & 0x1f);
147 retval = (mask & *a) != 0;
148 *a &= ~mask;
149 return retval;
150}
151
152static __inline__ int test_and_change_bit(int nr, volatile unsigned long *addr)
153{
154 int mask, retval;
155 volatile unsigned int *a = (volatile unsigned int *)addr;
156 unsigned long flags;
157
158 a += nr >> 5;
159 mask = 1 << (nr & 0x1f);
160 local_irq_save(flags);
161 retval = (mask & *a) != 0;
162 *a ^= mask;
163 local_irq_restore(flags);
164 return retval;
165}
166
167static __inline__ int __test_and_change_bit(int nr,
168 volatile unsigned long *addr)
169{
170 int mask, retval;
171 volatile unsigned int *a = (volatile unsigned int *)addr;
172
173 a += nr >> 5;
174 mask = 1 << (nr & 0x1f);
175 retval = (mask & *a) != 0;
176 *a ^= mask;
177 return retval;
178}
179
180/*
181 * This routine doesn't need to be atomic.
182 */
183static __inline__ int __constant_test_bit(int nr, const void *addr)
184{
185 return ((1UL << (nr & 31)) &
186 (((const volatile unsigned int *)addr)[nr >> 5])) != 0;
187}
188
189static __inline__ int __test_bit(int nr, const void *addr)
190{
191 int *a = (int *)addr;
192 int mask;
193
194 a += nr >> 5;
195 mask = 1 << (nr & 0x1f);
196 return ((mask & *a) != 0);
197}
198
199#define test_bit(nr,addr) \
200(__builtin_constant_p(nr) ? \
201 __constant_test_bit((nr),(addr)) : \
202 __test_bit((nr),(addr)))
203
204#include <asm-generic/bitops/find.h>
205#include <asm-generic/bitops/hweight.h>
206#include <asm-generic/bitops/lock.h>
207
208#include <asm-generic/bitops/ext2-atomic.h>
209#include <asm-generic/bitops/ext2-non-atomic.h>
210
211#include <asm-generic/bitops/minix.h>
212
213#endif /* __KERNEL__ */
214
215#include <asm-generic/bitops/fls.h>
216#include <asm-generic/bitops/fls64.h>
217
218#endif /* _BLACKFIN_BITOPS_H */
diff --git a/include/asm-blackfin/blackfin.h b/include/asm-blackfin/blackfin.h
deleted file mode 100644
index 984b74f0a2ec..000000000000
--- a/include/asm-blackfin/blackfin.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * Common header file for blackfin family of processors.
3 *
4 */
5
6#ifndef _BLACKFIN_H_
7#define _BLACKFIN_H_
8
9#define LO(con32) ((con32) & 0xFFFF)
10#define lo(con32) ((con32) & 0xFFFF)
11#define HI(con32) (((con32) >> 16) & 0xFFFF)
12#define hi(con32) (((con32) >> 16) & 0xFFFF)
13
14#include <asm/mach/anomaly.h>
15
16#ifndef __ASSEMBLY__
17
18/* SSYNC implementation for C file */
19static inline void SSYNC(void)
20{
21 int _tmp;
22 if (ANOMALY_05000312)
23 __asm__ __volatile__(
24 "cli %0;"
25 "nop;"
26 "nop;"
27 "ssync;"
28 "sti %0;"
29 : "=d" (_tmp)
30 );
31 else if (ANOMALY_05000244)
32 __asm__ __volatile__(
33 "nop;"
34 "nop;"
35 "nop;"
36 "ssync;"
37 );
38 else
39 __asm__ __volatile__("ssync;");
40}
41
42/* CSYNC implementation for C file */
43static inline void CSYNC(void)
44{
45 int _tmp;
46 if (ANOMALY_05000312)
47 __asm__ __volatile__(
48 "cli %0;"
49 "nop;"
50 "nop;"
51 "csync;"
52 "sti %0;"
53 : "=d" (_tmp)
54 );
55 else if (ANOMALY_05000244)
56 __asm__ __volatile__(
57 "nop;"
58 "nop;"
59 "nop;"
60 "csync;"
61 );
62 else
63 __asm__ __volatile__("csync;");
64}
65
66#else /* __ASSEMBLY__ */
67
68/* SSYNC & CSYNC implementations for assembly files */
69
70#define ssync(x) SSYNC(x)
71#define csync(x) CSYNC(x)
72
73#if ANOMALY_05000312
74#define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
75#define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
76
77#elif ANOMALY_05000244
78#define SSYNC(scratch) nop; nop; nop; SSYNC;
79#define CSYNC(scratch) nop; nop; nop; CSYNC;
80
81#else
82#define SSYNC(scratch) SSYNC;
83#define CSYNC(scratch) CSYNC;
84
85#endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
86
87#endif /* __ASSEMBLY__ */
88
89#include <asm/mach/blackfin.h>
90#include <asm/bfin-global.h>
91
92#endif /* _BLACKFIN_H_ */
diff --git a/include/asm-blackfin/bug.h b/include/asm-blackfin/bug.h
deleted file mode 100644
index 6d3e11b1fc57..000000000000
--- a/include/asm-blackfin/bug.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef _BLACKFIN_BUG_H
2#define _BLACKFIN_BUG_H
3
4#ifdef CONFIG_BUG
5#define HAVE_ARCH_BUG
6
7#define BUG() do { \
8 dump_bfin_trace_buffer(); \
9 printk(KERN_EMERG "BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
10 panic("BUG!"); \
11} while (0)
12
13#endif
14
15#include <asm-generic/bug.h>
16
17#endif
diff --git a/include/asm-blackfin/bugs.h b/include/asm-blackfin/bugs.h
deleted file mode 100644
index 9093c9c1fb81..000000000000
--- a/include/asm-blackfin/bugs.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-blackfin/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14static void check_bugs(void)
15{
16}
diff --git a/include/asm-blackfin/byteorder.h b/include/asm-blackfin/byteorder.h
deleted file mode 100644
index 6a673d42da18..000000000000
--- a/include/asm-blackfin/byteorder.h
+++ /dev/null
@@ -1,48 +0,0 @@
1#ifndef _BLACKFIN_BYTEORDER_H
2#define _BLACKFIN_BYTEORDER_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6
7#ifdef __GNUC__
8
9static __inline__ __attribute_const__ __u32 ___arch__swahb32(__u32 xx)
10{
11 __u32 tmp;
12 __asm__("%1 = %0 >> 8 (V);\n\t"
13 "%0 = %0 << 8 (V);\n\t"
14 "%0 = %0 | %1;\n\t"
15 : "+d"(xx), "=&d"(tmp));
16 return xx;
17}
18
19static __inline__ __attribute_const__ __u32 ___arch__swahw32(__u32 xx)
20{
21 __u32 rv;
22 __asm__("%0 = PACK(%1.L, %1.H);\n\t": "=d"(rv): "d"(xx));
23 return rv;
24}
25
26#define __arch__swahb32(x) ___arch__swahb32(x)
27#define __arch__swahw32(x) ___arch__swahw32(x)
28#define __arch__swab32(x) ___arch__swahb32(___arch__swahw32(x))
29
30static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 xx)
31{
32 __u32 xw = xx;
33 __asm__("%0 <<= 8;\n %0.L = %0.L + %0.H (NS);\n": "+d"(xw));
34 return (__u16)xw;
35}
36
37#define __arch__swab16(x) ___arch__swab16(x)
38
39#endif
40
41#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
42# define __BYTEORDER_HAS_U64__
43# define __SWAB_64_THRU_32__
44#endif
45
46#include <linux/byteorder/little_endian.h>
47
48#endif /* _BLACKFIN_BYTEORDER_H */
diff --git a/include/asm-blackfin/cache.h b/include/asm-blackfin/cache.h
deleted file mode 100644
index 023d72133b5a..000000000000
--- a/include/asm-blackfin/cache.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * include/asm-blackfin/cache.h
3 */
4#ifndef __ARCH_BLACKFIN_CACHE_H
5#define __ARCH_BLACKFIN_CACHE_H
6
7/*
8 * Bytes per L1 cache line
9 * Blackfin loads 32 bytes for cache
10 */
11#define L1_CACHE_SHIFT 5
12#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
13#define SMP_CACHE_BYTES L1_CACHE_BYTES
14
15/*
16 * Put cacheline_aliged data to L1 data memory
17 */
18#ifdef CONFIG_CACHELINE_ALIGNED_L1
19#define __cacheline_aligned \
20 __attribute__((__aligned__(L1_CACHE_BYTES), \
21 __section__(".data_l1.cacheline_aligned")))
22#endif
23
24/*
25 * largest L1 which this arch supports
26 */
27#define L1_CACHE_SHIFT_MAX 5
28
29#endif
diff --git a/include/asm-blackfin/cacheflush.h b/include/asm-blackfin/cacheflush.h
deleted file mode 100644
index d81a77545a04..000000000000
--- a/include/asm-blackfin/cacheflush.h
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * File: include/asm-blackfin/cacheflush.h
3 * Based on: include/asm-m68knommu/cacheflush.h
4 * Author: LG Soft India
5 * Copyright (C) 2004 Analog Devices Inc.
6 * Created: Tue Sep 21 2004
7 * Description: Blackfin low-level cache routines adapted from the i386
8 * and PPC versions by Greg Ungerer (gerg@snapgear.com)
9 *
10 * Modified:
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, or (at your option)
17 * 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; see the file COPYING.
26 * If not, write to the Free Software Foundation,
27 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 */
29
30#ifndef _BLACKFIN_CACHEFLUSH_H
31#define _BLACKFIN_CACHEFLUSH_H
32
33#include <asm/cplb.h>
34
35extern void blackfin_icache_dcache_flush_range(unsigned int, unsigned int);
36extern void blackfin_icache_flush_range(unsigned int, unsigned int);
37extern void blackfin_dcache_flush_range(unsigned int, unsigned int);
38extern void blackfin_dcache_invalidate_range(unsigned int, unsigned int);
39extern void blackfin_dflush_page(void *);
40
41#define flush_dcache_mmap_lock(mapping) do { } while (0)
42#define flush_dcache_mmap_unlock(mapping) do { } while (0)
43#define flush_cache_mm(mm) do { } while (0)
44#define flush_cache_range(vma, start, end) do { } while (0)
45#define flush_cache_page(vma, vmaddr) do { } while (0)
46#define flush_cache_vmap(start, end) do { } while (0)
47#define flush_cache_vunmap(start, end) do { } while (0)
48
49static inline void flush_icache_range(unsigned start, unsigned end)
50{
51#if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_ICACHE)
52
53# if defined(CONFIG_BFIN_WT)
54 blackfin_icache_flush_range((start), (end));
55# else
56 blackfin_icache_dcache_flush_range((start), (end));
57# endif
58
59#else
60
61# if defined(CONFIG_BFIN_ICACHE)
62 blackfin_icache_flush_range((start), (end));
63# endif
64# if defined(CONFIG_BFIN_DCACHE)
65 blackfin_dcache_flush_range((start), (end));
66# endif
67
68#endif
69}
70
71#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
72do { memcpy(dst, src, len); \
73 flush_icache_range ((unsigned) (dst), (unsigned) (dst) + (len)); \
74} while (0)
75#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
76
77#if defined(CONFIG_BFIN_DCACHE)
78# define invalidate_dcache_range(start,end) blackfin_dcache_invalidate_range((start), (end))
79#else
80# define invalidate_dcache_range(start,end) do { } while (0)
81#endif
82#if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_WB)
83# define flush_dcache_range(start,end) blackfin_dcache_flush_range((start), (end))
84# define flush_dcache_page(page) blackfin_dflush_page(page_address(page))
85#else
86# define flush_dcache_range(start,end) do { } while (0)
87# define flush_dcache_page(page) do { } while (0)
88#endif
89
90#endif /* _BLACKFIN_ICACHEFLUSH_H */
diff --git a/include/asm-blackfin/checksum.h b/include/asm-blackfin/checksum.h
deleted file mode 100644
index 6f6af2b8e9e0..000000000000
--- a/include/asm-blackfin/checksum.h
+++ /dev/null
@@ -1,100 +0,0 @@
1#ifndef _BFIN_CHECKSUM_H
2#define _BFIN_CHECKSUM_H
3
4/*
5 * MODIFIED FOR BFIN April 30, 2001 akbar.hussain@lineo.com
6 *
7 * computes the checksum of a memory block at buff, length len,
8 * and adds in "sum" (32-bit)
9 *
10 * returns a 32-bit number suitable for feeding into itself
11 * or csum_tcpudp_magic
12 *
13 * this function must be called with even lengths, except
14 * for the last fragment, which may be odd
15 *
16 * it's best to have buff aligned on a 32-bit boundary
17 */
18__wsum csum_partial(const void *buff, int len, __wsum sum);
19
20/*
21 * the same as csum_partial, but copies from src while it
22 * checksums
23 *
24 * here even more important to align src and dst on a 32-bit (or even
25 * better 64-bit) boundary
26 */
27
28__wsum csum_partial_copy(const void *src, void *dst,
29 int len, __wsum sum);
30
31/*
32 * the same as csum_partial_copy, but copies from user space.
33 *
34 * here even more important to align src and dst on a 32-bit (or even
35 * better 64-bit) boundary
36 */
37
38extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
39 int len, __wsum sum, int *csum_err);
40
41#define csum_partial_copy_nocheck(src, dst, len, sum) \
42 csum_partial_copy((src), (dst), (len), (sum))
43
44__sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl);
45
46/*
47 * Fold a partial checksum
48 */
49
50static inline __sum16 csum_fold(__wsum sum)
51{
52 while (sum >> 16)
53 sum = (sum & 0xffff) + (sum >> 16);
54 return ((~(sum << 16)) >> 16);
55}
56
57/*
58 * computes the checksum of the TCP/UDP pseudo-header
59 * returns a 16-bit checksum, already complemented
60 */
61
62static inline __wsum
63csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
64 unsigned short proto, __wsum sum)
65{
66
67 __asm__ ("%0 = %0 + %1;\n\t"
68 "CC = AC0;\n\t"
69 "if !CC jump 4;\n\t"
70 "%0 = %0 + %4;\n\t"
71 "%0 = %0 + %2;\n\t"
72 "CC = AC0;\n\t"
73 "if !CC jump 4;\n\t"
74 "%0 = %0 + %4;\n\t"
75 "%0 = %0 + %3;\n\t"
76 "CC = AC0;\n\t"
77 "if !CC jump 4;\n\t"
78 "%0 = %0 + %4;\n\t"
79 "NOP;\n\t"
80 : "=d" (sum)
81 : "d" (daddr), "d" (saddr), "d" ((ntohs(len)<<16)+proto*256), "d" (1), "0"(sum));
82
83 return (sum);
84}
85
86static inline __sum16
87csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
88 unsigned short proto, __wsum sum)
89{
90 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
91}
92
93/*
94 * this routine is used for miscellaneous IP-like checksums, mainly
95 * in icmp.c
96 */
97
98extern __sum16 ip_compute_csum(const void *buff, int len);
99
100#endif /* _BFIN_CHECKSUM_H */
diff --git a/include/asm-blackfin/cplb-mpu.h b/include/asm-blackfin/cplb-mpu.h
deleted file mode 100644
index 75c67b99d607..000000000000
--- a/include/asm-blackfin/cplb-mpu.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * File: include/asm-blackfin/cplbinit.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2006 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#ifndef __ASM_BFIN_CPLB_MPU_H
30#define __ASM_BFIN_CPLB_MPU_H
31
32struct cplb_entry {
33 unsigned long data, addr;
34};
35
36struct mem_region {
37 unsigned long start, end;
38 unsigned long dcplb_data;
39 unsigned long icplb_data;
40};
41
42extern struct cplb_entry dcplb_tbl[MAX_CPLBS];
43extern struct cplb_entry icplb_tbl[MAX_CPLBS];
44extern int first_switched_icplb;
45extern int first_mask_dcplb;
46extern int first_switched_dcplb;
47
48extern int nr_dcplb_miss, nr_icplb_miss, nr_icplb_supv_miss, nr_dcplb_prot;
49extern int nr_cplb_flush;
50
51extern int page_mask_order;
52extern int page_mask_nelts;
53
54extern unsigned long *current_rwx_mask;
55
56extern void flush_switched_cplbs(void);
57extern void set_mask_dcplbs(unsigned long *);
58
59extern void __noreturn panic_cplb_error(int seqstat, struct pt_regs *);
60
61#endif /* __ASM_BFIN_CPLB_MPU_H */
diff --git a/include/asm-blackfin/cplb.h b/include/asm-blackfin/cplb.h
deleted file mode 100644
index 5b0da9a69b67..000000000000
--- a/include/asm-blackfin/cplb.h
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2 * File: include/asm-blackfin/cplb.h
3 * Based on: include/asm-blackfin/mach-bf537/bf537.h
4 * Author: Robin Getz <rgetz@blackfin.uclinux.org>
5 *
6 * Created: 2000
7 * Description: Common CPLB definitions for CPLB init
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 _CPLB_H
31#define _CPLB_H
32
33#include <asm/blackfin.h>
34#include <asm/mach/anomaly.h>
35
36#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
37#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
38#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
39#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
40
41/*Use the menuconfig cache policy here - CONFIG_BFIN_WT/CONFIG_BFIN_WB*/
42
43#if ANOMALY_05000158
44#define ANOMALY_05000158_WORKAROUND 0x200
45#else
46#define ANOMALY_05000158_WORKAROUND 0x0
47#endif
48
49#define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
50
51#ifdef CONFIG_BFIN_WB /*Write Back Policy */
52#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON)
53#else /*Write Through */
54#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON)
55#endif
56
57#define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON)
58#define L2_MEMORY (CPLB_COMMON)
59#define SDRAM_DNON_CHBL (CPLB_COMMON)
60#define SDRAM_EBIU (CPLB_COMMON)
61#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
62
63#define SIZE_1K 0x00000400 /* 1K */
64#define SIZE_4K 0x00001000 /* 4K */
65#define SIZE_1M 0x00100000 /* 1M */
66#define SIZE_4M 0x00400000 /* 4M */
67
68#ifdef CONFIG_MPU
69#define MAX_CPLBS 16
70#else
71#define MAX_CPLBS (16 * 2)
72#endif
73
74#define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \
75 ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M)
76
77#define CPLB_ENABLE_ICACHE_P 0
78#define CPLB_ENABLE_DCACHE_P 1
79#define CPLB_ENABLE_DCACHE2_P 2
80#define CPLB_ENABLE_CPLBS_P 3 /* Deprecated! */
81#define CPLB_ENABLE_ICPLBS_P 4
82#define CPLB_ENABLE_DCPLBS_P 5
83
84#define CPLB_ENABLE_ICACHE (1<<CPLB_ENABLE_ICACHE_P)
85#define CPLB_ENABLE_DCACHE (1<<CPLB_ENABLE_DCACHE_P)
86#define CPLB_ENABLE_DCACHE2 (1<<CPLB_ENABLE_DCACHE2_P)
87#define CPLB_ENABLE_CPLBS (1<<CPLB_ENABLE_CPLBS_P)
88#define CPLB_ENABLE_ICPLBS (1<<CPLB_ENABLE_ICPLBS_P)
89#define CPLB_ENABLE_DCPLBS (1<<CPLB_ENABLE_DCPLBS_P)
90#define CPLB_ENABLE_ANY_CPLBS CPLB_ENABLE_CPLBS | \
91 CPLB_ENABLE_ICPLBS | \
92 CPLB_ENABLE_DCPLBS
93
94#define CPLB_RELOADED 0x0000
95#define CPLB_NO_UNLOCKED 0x0001
96#define CPLB_NO_ADDR_MATCH 0x0002
97#define CPLB_PROT_VIOL 0x0003
98#define CPLB_UNKNOWN_ERR 0x0004
99
100#define CPLB_DEF_CACHE CPLB_L1_CHBL | CPLB_WT
101#define CPLB_CACHE_ENABLED CPLB_L1_CHBL | CPLB_DIRTY
102
103#define CPLB_I_PAGE_MGMT CPLB_LOCK | CPLB_VALID
104#define CPLB_D_PAGE_MGMT CPLB_LOCK | CPLB_ALL_ACCESS | CPLB_VALID
105#define CPLB_DNOCACHE CPLB_ALL_ACCESS | CPLB_VALID
106#define CPLB_DDOCACHE CPLB_DNOCACHE | CPLB_DEF_CACHE
107#define CPLB_INOCACHE CPLB_USER_RD | CPLB_VALID
108#define CPLB_IDOCACHE CPLB_INOCACHE | CPLB_L1_CHBL
109
110#endif /* _CPLB_H */
diff --git a/include/asm-blackfin/cplbinit.h b/include/asm-blackfin/cplbinit.h
deleted file mode 100644
index 0eb1c1b685a7..000000000000
--- a/include/asm-blackfin/cplbinit.h
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * File: include/asm-blackfin/cplbinit.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2006 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 __ASM_CPLBINIT_H__
31#define __ASM_CPLBINIT_H__
32
33#include <asm/blackfin.h>
34#include <asm/cplb.h>
35
36#ifdef CONFIG_MPU
37
38#include <asm/cplb-mpu.h>
39
40#else
41
42#define INITIAL_T 0x1
43#define SWITCH_T 0x2
44#define I_CPLB 0x4
45#define D_CPLB 0x8
46
47#define IN_KERNEL 1
48
49enum
50{ZERO_P, L1I_MEM, L1D_MEM, SDRAM_KERN , SDRAM_RAM_MTD, SDRAM_DMAZ, RES_MEM, ASYNC_MEM, L2_MEM};
51
52struct cplb_desc {
53 u32 start; /* start address */
54 u32 end; /* end address */
55 u32 psize; /* prefered size if any otherwise 1MB or 4MB*/
56 u16 attr;/* attributes */
57 u16 i_conf;/* I-CPLB DATA */
58 u16 d_conf;/* D-CPLB DATA */
59 u16 valid;/* valid */
60 const s8 name[30];/* name */
61};
62
63struct cplb_tab {
64 u_long *tab;
65 u16 pos;
66 u16 size;
67};
68
69extern u_long icplb_table[];
70extern u_long dcplb_table[];
71
72/* Till here we are discussing about the static memory management model.
73 * However, the operating envoronments commonly define more CPLB
74 * descriptors to cover the entire addressable memory than will fit into
75 * the available on-chip 16 CPLB MMRs. When this happens, the below table
76 * will be used which will hold all the potentially required CPLB descriptors
77 *
78 * This is how Page descriptor Table is implemented in uClinux/Blackfin.
79 */
80
81extern u_long ipdt_table[];
82extern u_long dpdt_table[];
83#ifdef CONFIG_CPLB_INFO
84extern u_long ipdt_swapcount_table[];
85extern u_long dpdt_swapcount_table[];
86#endif
87
88#endif /* CONFIG_MPU */
89
90extern unsigned long reserved_mem_dcache_on;
91extern unsigned long reserved_mem_icache_on;
92
93extern void generate_cpl_tables(void);
94
95#endif
diff --git a/include/asm-blackfin/cpumask.h b/include/asm-blackfin/cpumask.h
deleted file mode 100644
index b20a8e9012cb..000000000000
--- a/include/asm-blackfin/cpumask.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_BLACKFIN_CPUMASK_H
2#define _ASM_BLACKFIN_CPUMASK_H
3
4#include <asm-generic/cpumask.h>
5
6#endif /* _ASM_BLACKFIN_CPUMASK_H */
diff --git a/include/asm-blackfin/cputime.h b/include/asm-blackfin/cputime.h
deleted file mode 100644
index 2b19705f9885..000000000000
--- a/include/asm-blackfin/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __BLACKFIN_CPUTIME_H
2#define __BLACKFIN_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __BLACKFIN_CPUTIME_H */
diff --git a/include/asm-blackfin/current.h b/include/asm-blackfin/current.h
deleted file mode 100644
index 31918d29122c..000000000000
--- a/include/asm-blackfin/current.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef _BLACKFIN_CURRENT_H
2#define _BLACKFIN_CURRENT_H
3/*
4 * current.h
5 * (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com>
6 *
7 * rather than dedicate a register (as the m68k source does), we
8 * just keep a global, we should probably just change it all to be
9 * current and lose _current_task.
10 */
11#include <linux/thread_info.h>
12
13struct task_struct;
14
15static inline struct task_struct *get_current(void) __attribute__ ((__const__));
16static inline struct task_struct *get_current(void)
17{
18 return (current_thread_info()->task);
19}
20
21#define current (get_current())
22
23#endif /* _BLACKFIN_CURRENT_H */
diff --git a/include/asm-blackfin/delay.h b/include/asm-blackfin/delay.h
deleted file mode 100644
index 473a8113277f..000000000000
--- a/include/asm-blackfin/delay.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * delay.h - delay functions
3 *
4 * Copyright (c) 2004-2007 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __ASM_DELAY_H__
10#define __ASM_DELAY_H__
11
12#include <asm/mach/anomaly.h>
13
14static inline void __delay(unsigned long loops)
15{
16 if (ANOMALY_05000312) {
17 /* Interrupted loads to loop registers -> bad */
18 unsigned long tmp;
19 __asm__ __volatile__(
20 "[--SP] = LC0;"
21 "[--SP] = LT0;"
22 "[--SP] = LB0;"
23 "LSETUP (1f,1f) LC0 = %1;"
24 "1: NOP;"
25 /* We take advantage of the fact that LC0 is 0 at
26 * the end of the loop. Otherwise we'd need some
27 * NOPs after the CLI here.
28 */
29 "CLI %0;"
30 "LB0 = [SP++];"
31 "LT0 = [SP++];"
32 "LC0 = [SP++];"
33 "STI %0;"
34 : "=d" (tmp)
35 : "a" (loops)
36 );
37 } else
38 __asm__ __volatile__ (
39 "LSETUP(1f, 1f) LC0 = %0;"
40 "1: NOP;"
41 :
42 : "a" (loops)
43 : "LT0", "LB0", "LC0"
44 );
45}
46
47#include <linux/param.h> /* needed for HZ */
48
49/*
50 * Use only for very small delays ( < 1 msec). Should probably use a
51 * lookup table, really, as the multiplications take much too long with
52 * short delays. This is a "reasonable" implementation, though (and the
53 * first constant multiplications gets optimized away if the delay is
54 * a constant)
55 */
56static inline void udelay(unsigned long usecs)
57{
58 extern unsigned long loops_per_jiffy;
59 __delay(usecs * loops_per_jiffy / (1000000 / HZ));
60}
61
62#endif
diff --git a/include/asm-blackfin/device.h b/include/asm-blackfin/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-blackfin/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-blackfin/div64.h b/include/asm-blackfin/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/include/asm-blackfin/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/include/asm-blackfin/dma-mapping.h b/include/asm-blackfin/dma-mapping.h
deleted file mode 100644
index 1a13c2fc3667..000000000000
--- a/include/asm-blackfin/dma-mapping.h
+++ /dev/null
@@ -1,83 +0,0 @@
1#ifndef _BLACKFIN_DMA_MAPPING_H
2#define _BLACKFIN_DMA_MAPPING_H
3
4#include <asm/scatterlist.h>
5
6void dma_alloc_init(unsigned long start, unsigned long end);
7void *dma_alloc_coherent(struct device *dev, size_t size,
8 dma_addr_t *dma_handle, gfp_t gfp);
9void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
10 dma_addr_t dma_handle);
11
12/*
13 * Now for the API extensions over the pci_ one
14 */
15#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
16#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
17
18#define dma_mapping_error
19
20/*
21 * Map a single buffer of the indicated size for DMA in streaming mode.
22 * The 32-bit bus address to use is returned.
23 *
24 * Once the device is given the dma address, the device owns this memory
25 * until either pci_unmap_single or pci_dma_sync_single is performed.
26 */
27extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
28 enum dma_data_direction direction);
29
30static inline dma_addr_t
31dma_map_page(struct device *dev, struct page *page,
32 unsigned long offset, size_t size,
33 enum dma_data_direction dir)
34{
35 return dma_map_single(dev, page_address(page) + offset, size, dir);
36}
37
38/*
39 * Unmap a single streaming mode DMA translation. The dma_addr and size
40 * must match what was provided for in a previous pci_map_single call. All
41 * other usages are undefined.
42 *
43 * After this call, reads by the cpu to the buffer are guarenteed to see
44 * whatever the device wrote there.
45 */
46extern void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
47 enum dma_data_direction direction);
48
49static inline void
50dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size,
51 enum dma_data_direction dir)
52{
53 dma_unmap_single(dev, dma_addr, size, dir);
54}
55
56/*
57 * Map a set of buffers described by scatterlist in streaming
58 * mode for DMA. This is the scather-gather version of the
59 * above pci_map_single interface. Here the scatter gather list
60 * elements are each tagged with the appropriate dma address
61 * and length. They are obtained via sg_dma_{address,length}(SG).
62 *
63 * NOTE: An implementation may be able to use a smaller number of
64 * DMA address/length pairs than there are SG table elements.
65 * (for example via virtual mapping capabilities)
66 * The routine returns the number of addr/length pairs actually
67 * used, at most nents.
68 *
69 * Device ownership issues as mentioned above for pci_map_single are
70 * the same here.
71 */
72extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
73 enum dma_data_direction direction);
74
75/*
76 * Unmap a set of streaming mode DMA translations.
77 * Again, cpu read rules concerning calls here are the same as for
78 * pci_unmap_single() above.
79 */
80extern void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
81 int nhwentries, enum dma_data_direction direction);
82
83#endif /* _BLACKFIN_DMA_MAPPING_H */
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h
deleted file mode 100644
index 3cd4b522aa3f..000000000000
--- a/include/asm-blackfin/dma.h
+++ /dev/null
@@ -1,205 +0,0 @@
1/*
2 * File: include/asm-blackfin/simple_bf533_dma.h
3 * Based on: none - original work
4 * Author: LG Soft India
5 * Copyright (C) 2004-2005 Analog Devices Inc.
6 * Created: Tue Sep 21 2004
7 * Description: This file contains the major Data structures and constants
8 * used for DMA Implementation in BF533
9 * Modified:
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; see the file COPYING.
25 * If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29#ifndef _BLACKFIN_DMA_H_
30#define _BLACKFIN_DMA_H_
31
32#include <asm/io.h>
33#include <linux/slab.h>
34#include <asm/irq.h>
35#include <asm/signal.h>
36
37#include <linux/kernel.h>
38#include <asm/mach/dma.h>
39#include <linux/mm.h>
40#include <linux/interrupt.h>
41#include <asm/blackfin.h>
42
43#define MAX_DMA_ADDRESS PAGE_OFFSET
44
45/*****************************************************************************
46* Generic DMA Declarations
47*
48****************************************************************************/
49enum dma_chan_status {
50 DMA_CHANNEL_FREE,
51 DMA_CHANNEL_REQUESTED,
52 DMA_CHANNEL_ENABLED,
53};
54
55/*-------------------------
56 * config reg bits value
57 *-------------------------*/
58#define DATA_SIZE_8 0
59#define DATA_SIZE_16 1
60#define DATA_SIZE_32 2
61
62#define DMA_FLOW_STOP 0
63#define DMA_FLOW_AUTO 1
64#define DMA_FLOW_ARRAY 4
65#define DMA_FLOW_SMALL 6
66#define DMA_FLOW_LARGE 7
67
68#define DIMENSION_LINEAR 0
69#define DIMENSION_2D 1
70
71#define DIR_READ 0
72#define DIR_WRITE 1
73
74#define INTR_DISABLE 0
75#define INTR_ON_BUF 2
76#define INTR_ON_ROW 3
77
78#define DMA_NOSYNC_KEEP_DMA_BUF 0
79#define DMA_SYNC_RESTART 1
80
81struct dmasg {
82 unsigned long next_desc_addr;
83 unsigned long start_addr;
84 unsigned short cfg;
85 unsigned short x_count;
86 short x_modify;
87 unsigned short y_count;
88 short y_modify;
89} __attribute__((packed));
90
91struct dma_register {
92 unsigned long next_desc_ptr; /* DMA Next Descriptor Pointer register */
93 unsigned long start_addr; /* DMA Start address register */
94
95 unsigned short cfg; /* DMA Configuration register */
96 unsigned short dummy1; /* DMA Configuration register */
97
98 unsigned long reserved;
99
100 unsigned short x_count; /* DMA x_count register */
101 unsigned short dummy2;
102
103 short x_modify; /* DMA x_modify register */
104 unsigned short dummy3;
105
106 unsigned short y_count; /* DMA y_count register */
107 unsigned short dummy4;
108
109 short y_modify; /* DMA y_modify register */
110 unsigned short dummy5;
111
112 unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer
113 register */
114 unsigned long curr_addr_ptr; /* DMA Current Address Pointer
115 register */
116 unsigned short irq_status; /* DMA irq status register */
117 unsigned short dummy6;
118
119 unsigned short peripheral_map; /* DMA peripheral map register */
120 unsigned short dummy7;
121
122 unsigned short curr_x_count; /* DMA Current x-count register */
123 unsigned short dummy8;
124
125 unsigned long reserved2;
126
127 unsigned short curr_y_count; /* DMA Current y-count register */
128 unsigned short dummy9;
129
130 unsigned long reserved3;
131
132};
133
134typedef irqreturn_t(*dma_interrupt_t) (int irq, void *dev_id);
135
136struct dma_channel {
137 struct mutex dmalock;
138 char *device_id;
139 enum dma_chan_status chan_status;
140 struct dma_register *regs;
141 struct dmasg *sg; /* large mode descriptor */
142 unsigned int ctrl_num; /* controller number */
143 dma_interrupt_t irq_callback;
144 void *data;
145 unsigned int dma_enable_flag;
146 unsigned int loopback_flag;
147#ifdef CONFIG_PM
148 unsigned short saved_peripheral_map;
149#endif
150};
151
152#ifdef CONFIG_PM
153int blackfin_dma_suspend(void);
154void blackfin_dma_resume(void);
155#endif
156
157/*******************************************************************************
158* DMA API's
159*******************************************************************************/
160/* functions to set register mode */
161void set_dma_start_addr(unsigned int channel, unsigned long addr);
162void set_dma_next_desc_addr(unsigned int channel, unsigned long addr);
163void set_dma_curr_desc_addr(unsigned int channel, unsigned long addr);
164void set_dma_x_count(unsigned int channel, unsigned short x_count);
165void set_dma_x_modify(unsigned int channel, short x_modify);
166void set_dma_y_count(unsigned int channel, unsigned short y_count);
167void set_dma_y_modify(unsigned int channel, short y_modify);
168void set_dma_config(unsigned int channel, unsigned short config);
169unsigned short set_bfin_dma_config(char direction, char flow_mode,
170 char intr_mode, char dma_mode, char width,
171 char syncmode);
172void set_dma_curr_addr(unsigned int channel, unsigned long addr);
173
174/* get curr status for polling */
175unsigned short get_dma_curr_irqstat(unsigned int channel);
176unsigned short get_dma_curr_xcount(unsigned int channel);
177unsigned short get_dma_curr_ycount(unsigned int channel);
178unsigned long get_dma_next_desc_ptr(unsigned int channel);
179unsigned long get_dma_curr_desc_ptr(unsigned int channel);
180unsigned long get_dma_curr_addr(unsigned int channel);
181
182/* set large DMA mode descriptor */
183void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg);
184
185/* check if current channel is in use */
186int dma_channel_active(unsigned int channel);
187
188/* common functions must be called in any mode */
189void free_dma(unsigned int channel);
190int dma_channel_active(unsigned int channel); /* check if a channel is in use */
191void disable_dma(unsigned int channel);
192void enable_dma(unsigned int channel);
193int request_dma(unsigned int channel, char *device_id);
194int set_dma_callback(unsigned int channel, dma_interrupt_t callback,
195 void *data);
196void dma_disable_irq(unsigned int channel);
197void dma_enable_irq(unsigned int channel);
198void clear_dma_irqstat(unsigned int channel);
199void *dma_memcpy(void *dest, const void *src, size_t count);
200void *safe_dma_memcpy(void *dest, const void *src, size_t count);
201
202extern int channel2irq(unsigned int channel);
203extern struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL];
204
205#endif
diff --git a/include/asm-blackfin/dpmc.h b/include/asm-blackfin/dpmc.h
deleted file mode 100644
index de28e6e018b3..000000000000
--- a/include/asm-blackfin/dpmc.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * include/asm-blackfin/dpmc.h - Miscellaneous IOCTL commands for Dynamic Power
3 * Management Controller Driver.
4 * Copyright (C) 2004-2008 Analog Device Inc.
5 *
6 */
7#ifndef _BLACKFIN_DPMC_H_
8#define _BLACKFIN_DPMC_H_
9
10#ifdef __KERNEL__
11#ifndef __ASSEMBLY__
12
13void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
14void deep_sleep(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
15void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
16void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
17void do_hibernate(int wakeup);
18void set_dram_srfs(void);
19void unset_dram_srfs(void);
20
21#define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16))
22
23struct bfin_dpmc_platform_data {
24 const unsigned int *tuple_tab;
25 unsigned short tabsize;
26 unsigned short vr_settling_time; /* in us */
27};
28
29#else
30
31#define PM_PUSH(x) \
32 R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\
33 [--SP] = R0;\
34
35#define PM_POP(x) \
36 R0 = [SP++];\
37 [P0 + (x - SRAM_BASE_ADDRESS)] = R0;\
38
39#define PM_SYS_PUSH(x) \
40 R0 = [P0 + (x - PLL_CTL)];\
41 [--SP] = R0;\
42
43#define PM_SYS_POP(x) \
44 R0 = [SP++];\
45 [P0 + (x - PLL_CTL)] = R0;\
46
47#define PM_SYS_PUSH16(x) \
48 R0 = w[P0 + (x - PLL_CTL)];\
49 [--SP] = R0;\
50
51#define PM_SYS_POP16(x) \
52 R0 = [SP++];\
53 w[P0 + (x - PLL_CTL)] = R0;\
54
55#endif
56#endif /* __KERNEL__ */
57
58#endif /*_BLACKFIN_DPMC_H_*/
diff --git a/include/asm-blackfin/early_printk.h b/include/asm-blackfin/early_printk.h
deleted file mode 100644
index 110f1c1f845c..000000000000
--- a/include/asm-blackfin/early_printk.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * File: include/asm-blackfin/early_printk.h
3 * Author: Robin Getz <rgetz@blackfin.uclinux.org
4 *
5 * Created: 14Aug2007
6 * Description: function prototpyes for early printk
7 *
8 * Modified:
9 * Copyright 2004-2007 Analog Devices Inc.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 */
23
24#ifdef CONFIG_EARLY_PRINTK
25extern int setup_early_printk(char *);
26#else
27#define setup_early_printk(fmt) do { } while (0)
28#endif /* CONFIG_EARLY_PRINTK */
diff --git a/include/asm-blackfin/elf.h b/include/asm-blackfin/elf.h
deleted file mode 100644
index 67a03a8a353e..000000000000
--- a/include/asm-blackfin/elf.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/* Changes made by LG Soft Oct 2004*/
2
3#ifndef __ASMBFIN_ELF_H
4#define __ASMBFIN_ELF_H
5
6/*
7 * ELF register definitions..
8 */
9
10#include <asm/ptrace.h>
11#include <asm/user.h>
12
13/* Processor specific flags for the ELF header e_flags field. */
14#define EF_BFIN_PIC 0x00000001 /* -fpic */
15#define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */
16#define EF_BFIN_CODE_IN_L1 0x00000010 /* --code-in-l1 */
17#define EF_BFIN_DATA_IN_L1 0x00000020 /* --data-in-l1 */
18#define EF_BFIN_CODE_IN_L2 0x00000040 /* --code-in-l2 */
19#define EF_BFIN_DATA_IN_L2 0x00000080 /* --data-in-l2 */
20
21typedef unsigned long elf_greg_t;
22
23#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
24typedef elf_greg_t elf_gregset_t[ELF_NGREG];
25
26typedef struct user_bfinfp_struct elf_fpregset_t;
27/*
28 * This is used to ensure we don't load something for the wrong architecture.
29 */
30#define elf_check_arch(x) ((x)->e_machine == EM_BLACKFIN)
31
32#define elf_check_fdpic(x) ((x)->e_flags & EF_BFIN_FDPIC /* && !((x)->e_flags & EF_FRV_NON_PIC_RELOCS) */)
33#define elf_check_const_displacement(x) ((x)->e_flags & EF_BFIN_PIC)
34
35/* EM_BLACKFIN defined in linux/elf.h */
36
37/*
38 * These are used to set parameters in the core dumps.
39 */
40#define ELF_CLASS ELFCLASS32
41#define ELF_DATA ELFDATA2LSB
42#define ELF_ARCH EM_BLACKFIN
43
44#define ELF_PLAT_INIT(_r) _r->p1 = 0
45
46#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map_addr, _interp_map_addr, _dynamic_addr) \
47do { \
48 _regs->r7 = 0; \
49 _regs->p0 = _exec_map_addr; \
50 _regs->p1 = _interp_map_addr; \
51 _regs->p2 = _dynamic_addr; \
52} while(0)
53
54#define USE_ELF_CORE_DUMP
55#define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC
56#define ELF_EXEC_PAGESIZE 4096
57
58#define R_unused0 0 /* relocation type 0 is not defined */
59#define R_pcrel5m2 1 /*LSETUP part a */
60#define R_unused1 2 /* relocation type 2 is not defined */
61#define R_pcrel10 3 /* type 3, if cc jump <target> */
62#define R_pcrel12_jump 4 /* type 4, jump <target> */
63#define R_rimm16 5 /* type 0x5, rN = <target> */
64#define R_luimm16 6 /* # 0x6, preg.l=<target> Load imm 16 to lower half */
65#define R_huimm16 7 /* # 0x7, preg.h=<target> Load imm 16 to upper half */
66#define R_pcrel12_jump_s 8 /* # 0x8 jump.s <target> */
67#define R_pcrel24_jump_x 9 /* # 0x9 jump.x <target> */
68#define R_pcrel24 10 /* # 0xa call <target> , not expandable */
69#define R_unusedb 11 /* # 0xb not generated */
70#define R_unusedc 12 /* # 0xc not used */
71#define R_pcrel24_jump_l 13 /*0xd jump.l <target> */
72#define R_pcrel24_call_x 14 /* 0xE, call.x <target> if <target> is above 24 bit limit call through P1 */
73#define R_var_eq_symb 15 /* 0xf, linker should treat it same as 0x12 */
74#define R_byte_data 16 /* 0x10, .byte var = symbol */
75#define R_byte2_data 17 /* 0x11, .byte2 var = symbol */
76#define R_byte4_data 18 /* 0x12, .byte4 var = symbol and .var var=symbol */
77#define R_pcrel11 19 /* 0x13, lsetup part b */
78#define R_unused14 20 /* 0x14, undefined */
79#define R_unused15 21 /* not generated by VDSP 3.5 */
80
81/* arithmetic relocations */
82#define R_push 0xE0
83#define R_const 0xE1
84#define R_add 0xE2
85#define R_sub 0xE3
86#define R_mult 0xE4
87#define R_div 0xE5
88#define R_mod 0xE6
89#define R_lshift 0xE7
90#define R_rshift 0xE8
91#define R_and 0xE9
92#define R_or 0xEA
93#define R_xor 0xEB
94#define R_land 0xEC
95#define R_lor 0xED
96#define R_len 0xEE
97#define R_neg 0xEF
98#define R_comp 0xF0
99#define R_page 0xF1
100#define R_hwpage 0xF2
101#define R_addr 0xF3
102
103/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
104 use of this is to invoke "./ld.so someprog" to test out a new version of
105 the loader. We need to make sure that it is out of the way of the program
106 that it will "exec", and that there is sufficient room for the brk. */
107
108#define ELF_ET_DYN_BASE 0xD0000000UL
109
110#define ELF_CORE_COPY_REGS(pr_reg, regs) \
111 memcpy((char *) &pr_reg, (char *)regs, \
112 sizeof(struct pt_regs));
113
114/* This yields a mask that user programs can use to figure out what
115 instruction set this cpu supports. */
116
117#define ELF_HWCAP (0)
118
119/* This yields a string that ld.so will use to load implementation
120 specific libraries for optimization. This is more specific in
121 intent than poking at uname or /proc/cpuinfo. */
122
123#define ELF_PLATFORM (NULL)
124
125#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
126
127#endif
diff --git a/include/asm-blackfin/emergency-restart.h b/include/asm-blackfin/emergency-restart.h
deleted file mode 100644
index 27f6c785d103..000000000000
--- a/include/asm-blackfin/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-blackfin/entry.h b/include/asm-blackfin/entry.h
deleted file mode 100644
index c4f721e0d00d..000000000000
--- a/include/asm-blackfin/entry.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef __BFIN_ENTRY_H
2#define __BFIN_ENTRY_H
3
4#include <asm/setup.h>
5#include <asm/page.h>
6
7#ifdef __ASSEMBLY__
8
9#define LFLUSH_I_AND_D 0x00000808
10#define LSIGTRAP 5
11
12/* process bits for task_struct.flags */
13#define PF_TRACESYS_OFF 3
14#define PF_TRACESYS_BIT 5
15#define PF_PTRACED_OFF 3
16#define PF_PTRACED_BIT 4
17#define PF_DTRACE_OFF 1
18#define PF_DTRACE_BIT 5
19
20/*
21 * NOTE! The single-stepping code assumes that all interrupt handlers
22 * start by saving SYSCFG on the stack with their first instruction.
23 */
24
25/* This one is used for exceptions, emulation, and NMI. It doesn't push
26 RETI and doesn't do cli. */
27#define SAVE_ALL_SYS save_context_no_interrupts
28/* This is used for all normal interrupts. It saves a minimum of registers
29 to the stack, loads the IRQ number, and jumps to common code. */
30#define INTERRUPT_ENTRY(N) \
31 [--sp] = SYSCFG; \
32 \
33 [--sp] = P0; /*orig_p0*/ \
34 [--sp] = R0; /*orig_r0*/ \
35 [--sp] = (R7:0,P5:0); \
36 R0 = (N); \
37 jump __common_int_entry;
38
39/* For timer interrupts, we need to save IPEND, since the user_mode
40 macro accesses it to determine where to account time. */
41#define TIMER_INTERRUPT_ENTRY(N) \
42 [--sp] = SYSCFG; \
43 \
44 [--sp] = P0; /*orig_p0*/ \
45 [--sp] = R0; /*orig_r0*/ \
46 [--sp] = (R7:0,P5:0); \
47 p0.l = lo(IPEND); \
48 p0.h = hi(IPEND); \
49 r1 = [p0]; \
50 R0 = (N); \
51 jump __common_int_entry;
52
53/* This one pushes RETI without using CLI. Interrupts are enabled. */
54#define SAVE_CONTEXT_SYSCALL save_context_syscall
55#define SAVE_CONTEXT save_context_with_interrupts
56
57#define RESTORE_ALL_SYS restore_context_no_interrupts
58#define RESTORE_CONTEXT restore_context_with_interrupts
59
60#endif /* __ASSEMBLY__ */
61#endif /* __BFIN_ENTRY_H */
diff --git a/include/asm-blackfin/errno.h b/include/asm-blackfin/errno.h
deleted file mode 100644
index 164e4f39bb57..000000000000
--- a/include/asm-blackfin/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _BFIN_ERRNO_H
2#define _BFIN_ERRNO_H
3
4#include<asm-generic/errno.h>
5
6#endif /* _BFIN_ERRNO_H */
diff --git a/include/asm-blackfin/fb.h b/include/asm-blackfin/fb.h
deleted file mode 100644
index c7df38030992..000000000000
--- a/include/asm-blackfin/fb.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4
5#define fb_pgprotect(...) do {} while (0)
6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-blackfin/fcntl.h b/include/asm-blackfin/fcntl.h
deleted file mode 100644
index 9c4037127857..000000000000
--- a/include/asm-blackfin/fcntl.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _BFIN_FCNTL_H
2#define _BFIN_FCNTL_H
3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_DIRECTORY 040000 /* must be a directory */
7#define O_NOFOLLOW 0100000 /* don't follow links */
8#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
9#define O_LARGEFILE 0400000
10
11#include <asm-generic/fcntl.h>
12
13#endif
diff --git a/include/asm-blackfin/fixed_code.h b/include/asm-blackfin/fixed_code.h
deleted file mode 100644
index 37db66c7030d..000000000000
--- a/include/asm-blackfin/fixed_code.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/* This file defines the fixed addresses where userspace programs can find
2 atomic code sequences. */
3
4#define FIXED_CODE_START 0x400
5
6#define SIGRETURN_STUB 0x400
7
8#define ATOMIC_SEQS_START 0x410
9
10#define ATOMIC_XCHG32 0x410
11#define ATOMIC_CAS32 0x420
12#define ATOMIC_ADD32 0x430
13#define ATOMIC_SUB32 0x440
14#define ATOMIC_IOR32 0x450
15#define ATOMIC_AND32 0x460
16#define ATOMIC_XOR32 0x470
17
18#define ATOMIC_SEQS_END 0x480
19
20#define SAFE_USER_INSTRUCTION 0x480
21
22#define FIXED_CODE_END 0x490
diff --git a/include/asm-blackfin/flat.h b/include/asm-blackfin/flat.h
deleted file mode 100644
index e70074e05f4e..000000000000
--- a/include/asm-blackfin/flat.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * include/asm-blackfin/flat.h -- uClinux flat-format executables
3 *
4 * Copyright (C) 2003,
5 *
6 */
7
8#ifndef __BLACKFIN_FLAT_H__
9#define __BLACKFIN_FLAT_H__
10
11#include <asm/unaligned.h>
12
13#define flat_stack_align(sp) /* nothing needed */
14#define flat_argvp_envp_on_stack() 0
15#define flat_old_ram_flag(flags) (flags)
16
17extern unsigned long bfin_get_addr_from_rp (unsigned long *ptr,
18 unsigned long relval,
19 unsigned long flags,
20 unsigned long *persistent);
21
22extern void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
23 unsigned long relval);
24
25/* The amount by which a relocation can exceed the program image limits
26 without being regarded as an error. */
27
28#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
29
30#define flat_get_addr_from_rp(rp, relval, flags, persistent) \
31 bfin_get_addr_from_rp(rp, relval, flags, persistent)
32#define flat_put_addr_at_rp(rp, val, relval) \
33 bfin_put_addr_at_rp(rp, val, relval)
34
35/* Convert a relocation entry into an address. */
36static inline unsigned long
37flat_get_relocate_addr (unsigned long relval)
38{
39 return relval & 0x03ffffff; /* Mask out top 6 bits */
40}
41
42static inline int flat_set_persistent(unsigned long relval,
43 unsigned long *persistent)
44{
45 int type = (relval >> 26) & 7;
46 if (type == 3) {
47 *persistent = relval << 16;
48 return 1;
49 }
50 return 0;
51}
52
53static inline int flat_addr_absolute(unsigned long relval)
54{
55 return (relval & (1 << 29)) != 0;
56}
57
58#endif /* __BLACKFIN_FLAT_H__ */
diff --git a/include/asm-blackfin/futex.h b/include/asm-blackfin/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/include/asm-blackfin/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h
deleted file mode 100644
index 168f1251eb4d..000000000000
--- a/include/asm-blackfin/gpio.h
+++ /dev/null
@@ -1,456 +0,0 @@
1/*
2 * File: arch/blackfin/kernel/bfin_gpio.h
3 * Based on:
4 * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2008 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/*
31* Number BF537/6/4 BF561 BF533/2/1
32* BF527/5/2
33*
34* GPIO_0 PF0 PF0 PF0
35* GPIO_1 PF1 PF1 PF1
36* GPIO_2 PF2 PF2 PF2
37* GPIO_3 PF3 PF3 PF3
38* GPIO_4 PF4 PF4 PF4
39* GPIO_5 PF5 PF5 PF5
40* GPIO_6 PF6 PF6 PF6
41* GPIO_7 PF7 PF7 PF7
42* GPIO_8 PF8 PF8 PF8
43* GPIO_9 PF9 PF9 PF9
44* GPIO_10 PF10 PF10 PF10
45* GPIO_11 PF11 PF11 PF11
46* GPIO_12 PF12 PF12 PF12
47* GPIO_13 PF13 PF13 PF13
48* GPIO_14 PF14 PF14 PF14
49* GPIO_15 PF15 PF15 PF15
50* GPIO_16 PG0 PF16
51* GPIO_17 PG1 PF17
52* GPIO_18 PG2 PF18
53* GPIO_19 PG3 PF19
54* GPIO_20 PG4 PF20
55* GPIO_21 PG5 PF21
56* GPIO_22 PG6 PF22
57* GPIO_23 PG7 PF23
58* GPIO_24 PG8 PF24
59* GPIO_25 PG9 PF25
60* GPIO_26 PG10 PF26
61* GPIO_27 PG11 PF27
62* GPIO_28 PG12 PF28
63* GPIO_29 PG13 PF29
64* GPIO_30 PG14 PF30
65* GPIO_31 PG15 PF31
66* GPIO_32 PH0 PF32
67* GPIO_33 PH1 PF33
68* GPIO_34 PH2 PF34
69* GPIO_35 PH3 PF35
70* GPIO_36 PH4 PF36
71* GPIO_37 PH5 PF37
72* GPIO_38 PH6 PF38
73* GPIO_39 PH7 PF39
74* GPIO_40 PH8 PF40
75* GPIO_41 PH9 PF41
76* GPIO_42 PH10 PF42
77* GPIO_43 PH11 PF43
78* GPIO_44 PH12 PF44
79* GPIO_45 PH13 PF45
80* GPIO_46 PH14 PF46
81* GPIO_47 PH15 PF47
82*/
83
84#ifndef __ARCH_BLACKFIN_GPIO_H__
85#define __ARCH_BLACKFIN_GPIO_H__
86
87#define gpio_bank(x) ((x) >> 4)
88#define gpio_bit(x) (1<<((x) & 0xF))
89#define gpio_sub_n(x) ((x) & 0xF)
90
91#define GPIO_BANKSIZE 16
92
93#define GPIO_0 0
94#define GPIO_1 1
95#define GPIO_2 2
96#define GPIO_3 3
97#define GPIO_4 4
98#define GPIO_5 5
99#define GPIO_6 6
100#define GPIO_7 7
101#define GPIO_8 8
102#define GPIO_9 9
103#define GPIO_10 10
104#define GPIO_11 11
105#define GPIO_12 12
106#define GPIO_13 13
107#define GPIO_14 14
108#define GPIO_15 15
109#define GPIO_16 16
110#define GPIO_17 17
111#define GPIO_18 18
112#define GPIO_19 19
113#define GPIO_20 20
114#define GPIO_21 21
115#define GPIO_22 22
116#define GPIO_23 23
117#define GPIO_24 24
118#define GPIO_25 25
119#define GPIO_26 26
120#define GPIO_27 27
121#define GPIO_28 28
122#define GPIO_29 29
123#define GPIO_30 30
124#define GPIO_31 31
125#define GPIO_32 32
126#define GPIO_33 33
127#define GPIO_34 34
128#define GPIO_35 35
129#define GPIO_36 36
130#define GPIO_37 37
131#define GPIO_38 38
132#define GPIO_39 39
133#define GPIO_40 40
134#define GPIO_41 41
135#define GPIO_42 42
136#define GPIO_43 43
137#define GPIO_44 44
138#define GPIO_45 45
139#define GPIO_46 46
140#define GPIO_47 47
141
142
143#define PERIPHERAL_USAGE 1
144#define GPIO_USAGE 0
145
146#ifdef BF533_FAMILY
147#define MAX_BLACKFIN_GPIOS 16
148
149#define GPIO_PF0 0
150#define GPIO_PF1 1
151#define GPIO_PF2 2
152#define GPIO_PF3 3
153#define GPIO_PF4 4
154#define GPIO_PF5 5
155#define GPIO_PF6 6
156#define GPIO_PF7 7
157#define GPIO_PF8 8
158#define GPIO_PF9 9
159#define GPIO_PF10 10
160#define GPIO_PF11 11
161#define GPIO_PF12 12
162#define GPIO_PF13 13
163#define GPIO_PF14 14
164#define GPIO_PF15 15
165
166#endif
167
168#if defined(BF527_FAMILY) || defined(BF537_FAMILY)
169#define MAX_BLACKFIN_GPIOS 48
170
171#define GPIO_PF0 0
172#define GPIO_PF1 1
173#define GPIO_PF2 2
174#define GPIO_PF3 3
175#define GPIO_PF4 4
176#define GPIO_PF5 5
177#define GPIO_PF6 6
178#define GPIO_PF7 7
179#define GPIO_PF8 8
180#define GPIO_PF9 9
181#define GPIO_PF10 10
182#define GPIO_PF11 11
183#define GPIO_PF12 12
184#define GPIO_PF13 13
185#define GPIO_PF14 14
186#define GPIO_PF15 15
187#define GPIO_PG0 16
188#define GPIO_PG1 17
189#define GPIO_PG2 18
190#define GPIO_PG3 19
191#define GPIO_PG4 20
192#define GPIO_PG5 21
193#define GPIO_PG6 22
194#define GPIO_PG7 23
195#define GPIO_PG8 24
196#define GPIO_PG9 25
197#define GPIO_PG10 26
198#define GPIO_PG11 27
199#define GPIO_PG12 28
200#define GPIO_PG13 29
201#define GPIO_PG14 30
202#define GPIO_PG15 31
203#define GPIO_PH0 32
204#define GPIO_PH1 33
205#define GPIO_PH2 34
206#define GPIO_PH3 35
207#define GPIO_PH4 36
208#define GPIO_PH5 37
209#define GPIO_PH6 38
210#define GPIO_PH7 39
211#define GPIO_PH8 40
212#define GPIO_PH9 41
213#define GPIO_PH10 42
214#define GPIO_PH11 43
215#define GPIO_PH12 44
216#define GPIO_PH13 45
217#define GPIO_PH14 46
218#define GPIO_PH15 47
219
220#define PORT_F GPIO_PF0
221#define PORT_G GPIO_PG0
222#define PORT_H GPIO_PH0
223
224#endif
225
226#ifdef BF548_FAMILY
227#include <asm-blackfin/mach-bf548/gpio.h>
228#endif
229
230#ifdef BF561_FAMILY
231#define MAX_BLACKFIN_GPIOS 48
232
233#define GPIO_PF0 0
234#define GPIO_PF1 1
235#define GPIO_PF2 2
236#define GPIO_PF3 3
237#define GPIO_PF4 4
238#define GPIO_PF5 5
239#define GPIO_PF6 6
240#define GPIO_PF7 7
241#define GPIO_PF8 8
242#define GPIO_PF9 9
243#define GPIO_PF10 10
244#define GPIO_PF11 11
245#define GPIO_PF12 12
246#define GPIO_PF13 13
247#define GPIO_PF14 14
248#define GPIO_PF15 15
249#define GPIO_PF16 16
250#define GPIO_PF17 17
251#define GPIO_PF18 18
252#define GPIO_PF19 19
253#define GPIO_PF20 20
254#define GPIO_PF21 21
255#define GPIO_PF22 22
256#define GPIO_PF23 23
257#define GPIO_PF24 24
258#define GPIO_PF25 25
259#define GPIO_PF26 26
260#define GPIO_PF27 27
261#define GPIO_PF28 28
262#define GPIO_PF29 29
263#define GPIO_PF30 30
264#define GPIO_PF31 31
265#define GPIO_PF32 32
266#define GPIO_PF33 33
267#define GPIO_PF34 34
268#define GPIO_PF35 35
269#define GPIO_PF36 36
270#define GPIO_PF37 37
271#define GPIO_PF38 38
272#define GPIO_PF39 39
273#define GPIO_PF40 40
274#define GPIO_PF41 41
275#define GPIO_PF42 42
276#define GPIO_PF43 43
277#define GPIO_PF44 44
278#define GPIO_PF45 45
279#define GPIO_PF46 46
280#define GPIO_PF47 47
281
282#define PORT_FIO0 GPIO_0
283#define PORT_FIO1 GPIO_16
284#define PORT_FIO2 GPIO_32
285#endif
286
287#ifndef __ASSEMBLY__
288
289/***********************************************************
290*
291* FUNCTIONS: Blackfin General Purpose Ports Access Functions
292*
293* INPUTS/OUTPUTS:
294* gpio - GPIO Number between 0 and MAX_BLACKFIN_GPIOS
295*
296*
297* DESCRIPTION: These functions abstract direct register access
298* to Blackfin processor General Purpose
299* Ports Regsiters
300*
301* CAUTION: These functions do not belong to the GPIO Driver API
302*************************************************************
303* MODIFICATION HISTORY :
304**************************************************************/
305
306#ifndef BF548_FAMILY
307void set_gpio_dir(unsigned, unsigned short);
308void set_gpio_inen(unsigned, unsigned short);
309void set_gpio_polar(unsigned, unsigned short);
310void set_gpio_edge(unsigned, unsigned short);
311void set_gpio_both(unsigned, unsigned short);
312void set_gpio_data(unsigned, unsigned short);
313void set_gpio_maska(unsigned, unsigned short);
314void set_gpio_maskb(unsigned, unsigned short);
315void set_gpio_toggle(unsigned);
316void set_gpiop_dir(unsigned, unsigned short);
317void set_gpiop_inen(unsigned, unsigned short);
318void set_gpiop_polar(unsigned, unsigned short);
319void set_gpiop_edge(unsigned, unsigned short);
320void set_gpiop_both(unsigned, unsigned short);
321void set_gpiop_data(unsigned, unsigned short);
322void set_gpiop_maska(unsigned, unsigned short);
323void set_gpiop_maskb(unsigned, unsigned short);
324unsigned short get_gpio_dir(unsigned);
325unsigned short get_gpio_inen(unsigned);
326unsigned short get_gpio_polar(unsigned);
327unsigned short get_gpio_edge(unsigned);
328unsigned short get_gpio_both(unsigned);
329unsigned short get_gpio_maska(unsigned);
330unsigned short get_gpio_maskb(unsigned);
331unsigned short get_gpio_data(unsigned);
332unsigned short get_gpiop_dir(unsigned);
333unsigned short get_gpiop_inen(unsigned);
334unsigned short get_gpiop_polar(unsigned);
335unsigned short get_gpiop_edge(unsigned);
336unsigned short get_gpiop_both(unsigned);
337unsigned short get_gpiop_maska(unsigned);
338unsigned short get_gpiop_maskb(unsigned);
339unsigned short get_gpiop_data(unsigned);
340
341struct gpio_port_t {
342 unsigned short data;
343 unsigned short dummy1;
344 unsigned short data_clear;
345 unsigned short dummy2;
346 unsigned short data_set;
347 unsigned short dummy3;
348 unsigned short toggle;
349 unsigned short dummy4;
350 unsigned short maska;
351 unsigned short dummy5;
352 unsigned short maska_clear;
353 unsigned short dummy6;
354 unsigned short maska_set;
355 unsigned short dummy7;
356 unsigned short maska_toggle;
357 unsigned short dummy8;
358 unsigned short maskb;
359 unsigned short dummy9;
360 unsigned short maskb_clear;
361 unsigned short dummy10;
362 unsigned short maskb_set;
363 unsigned short dummy11;
364 unsigned short maskb_toggle;
365 unsigned short dummy12;
366 unsigned short dir;
367 unsigned short dummy13;
368 unsigned short polar;
369 unsigned short dummy14;
370 unsigned short edge;
371 unsigned short dummy15;
372 unsigned short both;
373 unsigned short dummy16;
374 unsigned short inen;
375};
376#endif
377
378#ifdef CONFIG_PM
379
380unsigned int bfin_pm_standby_setup(void);
381void bfin_pm_standby_restore(void);
382
383void bfin_gpio_pm_hibernate_restore(void);
384void bfin_gpio_pm_hibernate_suspend(void);
385
386#ifndef CONFIG_BF54x
387#define PM_WAKE_RISING 0x1
388#define PM_WAKE_FALLING 0x2
389#define PM_WAKE_HIGH 0x4
390#define PM_WAKE_LOW 0x8
391#define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING)
392#define PM_WAKE_IGNORE 0xF0
393
394int gpio_pm_wakeup_request(unsigned gpio, unsigned char type);
395void gpio_pm_wakeup_free(unsigned gpio);
396
397struct gpio_port_s {
398 unsigned short data;
399 unsigned short maska;
400 unsigned short maskb;
401 unsigned short dir;
402 unsigned short polar;
403 unsigned short edge;
404 unsigned short both;
405 unsigned short inen;
406
407 unsigned short fer;
408 unsigned short reserved;
409 unsigned short mux;
410};
411#endif /*CONFIG_BF54x*/
412#endif /*CONFIG_PM*/
413/***********************************************************
414*
415* FUNCTIONS: Blackfin GPIO Driver
416*
417* INPUTS/OUTPUTS:
418* gpio - GPIO Number between 0 and MAX_BLACKFIN_GPIOS
419*
420*
421* DESCRIPTION: Blackfin GPIO Driver API
422*
423* CAUTION:
424*************************************************************
425* MODIFICATION HISTORY :
426**************************************************************/
427
428int gpio_request(unsigned, const char *);
429void gpio_free(unsigned);
430
431void gpio_set_value(unsigned gpio, int arg);
432int gpio_get_value(unsigned gpio);
433
434#ifndef BF548_FAMILY
435#define gpio_set_value(gpio, value) set_gpio_data(gpio, value)
436#endif
437
438int gpio_direction_input(unsigned gpio);
439int gpio_direction_output(unsigned gpio, int value);
440
441#include <asm-generic/gpio.h> /* cansleep wrappers */
442#include <asm/irq.h>
443
444static inline int gpio_to_irq(unsigned gpio)
445{
446 return (gpio + GPIO_IRQ_BASE);
447}
448
449static inline int irq_to_gpio(unsigned irq)
450{
451 return (irq - GPIO_IRQ_BASE);
452}
453
454#endif /* __ASSEMBLY__ */
455
456#endif /* __ARCH_BLACKFIN_GPIO_H__ */
diff --git a/include/asm-blackfin/gptimers.h b/include/asm-blackfin/gptimers.h
deleted file mode 100644
index 0520d2aac8f3..000000000000
--- a/include/asm-blackfin/gptimers.h
+++ /dev/null
@@ -1,191 +0,0 @@
1/*
2 * gptimers.h - Blackfin General Purpose Timer structs/defines/prototypes
3 *
4 * Copyright (c) 2005-2008 Analog Devices Inc.
5 * Copyright (C) 2005 John DeHority
6 * Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de)
7 *
8 * Licensed under the GPL-2.
9 */
10
11#ifndef _BLACKFIN_TIMERS_H_
12#define _BLACKFIN_TIMERS_H_
13
14#include <linux/types.h>
15#include <asm/blackfin.h>
16
17/*
18 * BF537/BF527: 8 timers:
19 */
20#if defined(BF527_FAMILY) || defined(BF537_FAMILY)
21# define MAX_BLACKFIN_GPTIMERS 8
22# define TIMER0_GROUP_REG TIMER_ENABLE
23#endif
24/*
25 * BF54x: 11 timers (BF542: 8 timers):
26 */
27#if defined(BF548_FAMILY)
28# ifdef CONFIG_BF542
29# define MAX_BLACKFIN_GPTIMERS 8
30# else
31# define MAX_BLACKFIN_GPTIMERS 11
32# define TIMER8_GROUP_REG TIMER_ENABLE1
33# endif
34# define TIMER0_GROUP_REG TIMER_ENABLE0
35#endif
36/*
37 * BF561: 12 timers:
38 */
39#if defined(CONFIG_BF561)
40# define MAX_BLACKFIN_GPTIMERS 12
41# define TIMER0_GROUP_REG TMRS8_ENABLE
42# define TIMER8_GROUP_REG TMRS4_ENABLE
43#endif
44/*
45 * All others: 3 timers:
46 */
47#if !defined(MAX_BLACKFIN_GPTIMERS)
48# define MAX_BLACKFIN_GPTIMERS 3
49# define TIMER0_GROUP_REG TIMER_ENABLE
50#endif
51
52#define BLACKFIN_GPTIMER_IDMASK ((1UL << MAX_BLACKFIN_GPTIMERS) - 1)
53#define BFIN_TIMER_OCTET(x) ((x) >> 3)
54
55/* used in masks for timer_enable() and timer_disable() */
56#define TIMER0bit 0x0001 /* 0001b */
57#define TIMER1bit 0x0002 /* 0010b */
58#define TIMER2bit 0x0004 /* 0100b */
59#define TIMER3bit 0x0008
60#define TIMER4bit 0x0010
61#define TIMER5bit 0x0020
62#define TIMER6bit 0x0040
63#define TIMER7bit 0x0080
64#define TIMER8bit 0x0100
65#define TIMER9bit 0x0200
66#define TIMER10bit 0x0400
67#define TIMER11bit 0x0800
68
69#define TIMER0_id 0
70#define TIMER1_id 1
71#define TIMER2_id 2
72#define TIMER3_id 3
73#define TIMER4_id 4
74#define TIMER5_id 5
75#define TIMER6_id 6
76#define TIMER7_id 7
77#define TIMER8_id 8
78#define TIMER9_id 9
79#define TIMER10_id 10
80#define TIMER11_id 11
81
82/* associated timers for ppi framesync: */
83
84#if defined(CONFIG_BF561)
85# define FS0_1_TIMER_ID TIMER8_id
86# define FS0_2_TIMER_ID TIMER9_id
87# define FS1_1_TIMER_ID TIMER10_id
88# define FS1_2_TIMER_ID TIMER11_id
89# define FS0_1_TIMER_BIT TIMER8bit
90# define FS0_2_TIMER_BIT TIMER9bit
91# define FS1_1_TIMER_BIT TIMER10bit
92# define FS1_2_TIMER_BIT TIMER11bit
93# undef FS1_TIMER_ID
94# undef FS2_TIMER_ID
95# undef FS1_TIMER_BIT
96# undef FS2_TIMER_BIT
97#else
98# define FS1_TIMER_ID TIMER0_id
99# define FS2_TIMER_ID TIMER1_id
100# define FS1_TIMER_BIT TIMER0bit
101# define FS2_TIMER_BIT TIMER1bit
102#endif
103
104/*
105 * Timer Configuration Register Bits
106 */
107#define TIMER_ERR 0xC000
108#define TIMER_ERR_OVFL 0x4000
109#define TIMER_ERR_PROG_PER 0x8000
110#define TIMER_ERR_PROG_PW 0xC000
111#define TIMER_EMU_RUN 0x0200
112#define TIMER_TOGGLE_HI 0x0100
113#define TIMER_CLK_SEL 0x0080
114#define TIMER_OUT_DIS 0x0040
115#define TIMER_TIN_SEL 0x0020
116#define TIMER_IRQ_ENA 0x0010
117#define TIMER_PERIOD_CNT 0x0008
118#define TIMER_PULSE_HI 0x0004
119#define TIMER_MODE 0x0003
120#define TIMER_MODE_PWM 0x0001
121#define TIMER_MODE_WDTH 0x0002
122#define TIMER_MODE_EXT_CLK 0x0003
123
124/*
125 * Timer Status Register Bits
126 */
127#define TIMER_STATUS_TIMIL0 0x0001
128#define TIMER_STATUS_TIMIL1 0x0002
129#define TIMER_STATUS_TIMIL2 0x0004
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#define TIMER_STATUS_TIMIL8 0x0001
136#define TIMER_STATUS_TIMIL9 0x0002
137#define TIMER_STATUS_TIMIL10 0x0004
138#define TIMER_STATUS_TIMIL11 0x0008
139
140#define TIMER_STATUS_TOVF0 0x0010 /* timer 0 overflow error */
141#define TIMER_STATUS_TOVF1 0x0020
142#define TIMER_STATUS_TOVF2 0x0040
143#define TIMER_STATUS_TOVF3 0x00000080
144#define TIMER_STATUS_TOVF4 0x00100000
145#define TIMER_STATUS_TOVF5 0x00200000
146#define TIMER_STATUS_TOVF6 0x00400000
147#define TIMER_STATUS_TOVF7 0x00800000
148#define TIMER_STATUS_TOVF8 0x0010
149#define TIMER_STATUS_TOVF9 0x0020
150#define TIMER_STATUS_TOVF10 0x0040
151#define TIMER_STATUS_TOVF11 0x0080
152
153/*
154 * Timer Slave Enable Status : write 1 to clear
155 */
156#define TIMER_STATUS_TRUN0 0x1000
157#define TIMER_STATUS_TRUN1 0x2000
158#define TIMER_STATUS_TRUN2 0x4000
159#define TIMER_STATUS_TRUN3 0x00008000
160#define TIMER_STATUS_TRUN4 0x10000000
161#define TIMER_STATUS_TRUN5 0x20000000
162#define TIMER_STATUS_TRUN6 0x40000000
163#define TIMER_STATUS_TRUN7 0x80000000
164#define TIMER_STATUS_TRUN 0xF000F000
165#define TIMER_STATUS_TRUN8 0x1000
166#define TIMER_STATUS_TRUN9 0x2000
167#define TIMER_STATUS_TRUN10 0x4000
168#define TIMER_STATUS_TRUN11 0x8000
169
170/* The actual gptimer API */
171
172void set_gptimer_pwidth (int timer_id, uint32_t width);
173uint32_t get_gptimer_pwidth (int timer_id);
174void set_gptimer_period (int timer_id, uint32_t period);
175uint32_t get_gptimer_period (int timer_id);
176uint32_t get_gptimer_count (int timer_id);
177uint16_t get_gptimer_intr (int timer_id);
178void clear_gptimer_intr (int timer_id);
179uint16_t get_gptimer_over (int timer_id);
180void clear_gptimer_over (int timer_id);
181void set_gptimer_config (int timer_id, uint16_t config);
182uint16_t get_gptimer_config (int timer_id);
183void set_gptimer_pulse_hi (int timer_id);
184void clear_gptimer_pulse_hi(int timer_id);
185void enable_gptimers (uint16_t mask);
186void disable_gptimers (uint16_t mask);
187uint16_t get_enabled_gptimers (void);
188uint32_t get_gptimer_status (int group);
189void set_gptimer_status (int group, uint32_t value);
190
191#endif
diff --git a/include/asm-blackfin/hardirq.h b/include/asm-blackfin/hardirq.h
deleted file mode 100644
index b6b19f1b9dab..000000000000
--- a/include/asm-blackfin/hardirq.h
+++ /dev/null
@@ -1,45 +0,0 @@
1#ifndef __BFIN_HARDIRQ_H
2#define __BFIN_HARDIRQ_H
3
4#include <linux/cache.h>
5#include <linux/threads.h>
6#include <asm/irq.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10 unsigned int __syscall_count;
11 struct task_struct *__ksoftirqd_task;
12} ____cacheline_aligned irq_cpustat_t;
13
14#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
15
16/*
17 * We put the hardirq and softirq counter into the preemption
18 * counter. The bitmask has the following meaning:
19 *
20 * - bits 0-7 are the preemption count (max preemption depth: 256)
21 * - bits 8-15 are the softirq count (max # of softirqs: 256)
22 * - bits 16-23 are the hardirq count (max # of hardirqs: 256)
23 *
24 * - ( bit 26 is the PREEMPT_ACTIVE flag. )
25 *
26 * PREEMPT_MASK: 0x000000ff
27 * HARDIRQ_MASK: 0x0000ff00
28 * SOFTIRQ_MASK: 0x00ff0000
29 */
30
31#if NR_IRQS > 256
32#define HARDIRQ_BITS 9
33#else
34#define HARDIRQ_BITS 8
35#endif
36
37#ifdef NR_IRQS
38# if (1 << HARDIRQ_BITS) < NR_IRQS
39# error HARDIRQ_BITS is too low!
40# endif
41#endif
42
43#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
44
45#endif
diff --git a/include/asm-blackfin/hw_irq.h b/include/asm-blackfin/hw_irq.h
deleted file mode 100644
index 5b51eaec012c..000000000000
--- a/include/asm-blackfin/hw_irq.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_BFIN_HW_IRQ_H
2#define __ASM_BFIN_HW_IRQ_H
3
4/* Dummy include. */
5
6#endif
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h
deleted file mode 100644
index cbbf7ffdbbff..000000000000
--- a/include/asm-blackfin/io.h
+++ /dev/null
@@ -1,212 +0,0 @@
1#ifndef _BFIN_IO_H
2#define _BFIN_IO_H
3
4#ifdef __KERNEL__
5
6#ifndef __ASSEMBLY__
7#include <linux/types.h>
8#endif
9#include <linux/compiler.h>
10
11/*
12 * These are for ISA/PCI shared memory _only_ and should never be used
13 * on any other type of memory, including Zorro memory. They are meant to
14 * access the bus in the bus byte order which is little-endian!.
15 *
16 * readX/writeX() are used to access memory mapped devices. On some
17 * architectures the memory mapped IO stuff needs to be accessed
18 * differently. On the bfin architecture, we just read/write the
19 * memory location directly.
20 */
21#ifndef __ASSEMBLY__
22
23static inline unsigned char readb(const volatile void __iomem *addr)
24{
25 unsigned int val;
26 int tmp;
27
28 __asm__ __volatile__ ("cli %1;\n\t"
29 "NOP; NOP; SSYNC;\n\t"
30 "%0 = b [%2] (z);\n\t"
31 "sti %1;\n\t"
32 : "=d"(val), "=d"(tmp): "a"(addr)
33 );
34
35 return (unsigned char) val;
36}
37
38static inline unsigned short readw(const volatile void __iomem *addr)
39{
40 unsigned int val;
41 int tmp;
42
43 __asm__ __volatile__ ("cli %1;\n\t"
44 "NOP; NOP; SSYNC;\n\t"
45 "%0 = w [%2] (z);\n\t"
46 "sti %1;\n\t"
47 : "=d"(val), "=d"(tmp): "a"(addr)
48 );
49
50 return (unsigned short) val;
51}
52
53static inline unsigned int readl(const volatile void __iomem *addr)
54{
55 unsigned int val;
56 int tmp;
57
58 __asm__ __volatile__ ("cli %1;\n\t"
59 "NOP; NOP; SSYNC;\n\t"
60 "%0 = [%2];\n\t"
61 "sti %1;\n\t"
62 : "=d"(val), "=d"(tmp): "a"(addr)
63 );
64 return val;
65}
66
67#endif /* __ASSEMBLY__ */
68
69#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
70#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
71#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
72
73#define __raw_readb readb
74#define __raw_readw readw
75#define __raw_readl readl
76#define __raw_writeb writeb
77#define __raw_writew writew
78#define __raw_writel writel
79#define memset_io(a,b,c) memset((void *)(a),(b),(c))
80#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
81#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
82
83#define inb(addr) readb(addr)
84#define inw(addr) readw(addr)
85#define inl(addr) readl(addr)
86#define outb(x,addr) ((void) writeb(x,addr))
87#define outw(x,addr) ((void) writew(x,addr))
88#define outl(x,addr) ((void) writel(x,addr))
89
90#define inb_p(addr) inb(addr)
91#define inw_p(addr) inw(addr)
92#define inl_p(addr) inl(addr)
93#define outb_p(x,addr) outb(x,addr)
94#define outw_p(x,addr) outw(x,addr)
95#define outl_p(x,addr) outl(x,addr)
96
97#define ioread8_rep(a,d,c) insb(a,d,c)
98#define ioread16_rep(a,d,c) insw(a,d,c)
99#define ioread32_rep(a,d,c) insl(a,d,c)
100#define iowrite8_rep(a,s,c) outsb(a,s,c)
101#define iowrite16_rep(a,s,c) outsw(a,s,c)
102#define iowrite32_rep(a,s,c) outsl(a,s,c)
103
104#define ioread8(X) readb(X)
105#define ioread16(X) readw(X)
106#define ioread32(X) readl(X)
107#define iowrite8(val,X) writeb(val,X)
108#define iowrite16(val,X) writew(val,X)
109#define iowrite32(val,X) writel(val,X)
110
111#define IO_SPACE_LIMIT 0xffffffff
112
113/* Values for nocacheflag and cmode */
114#define IOMAP_NOCACHE_SER 1
115
116#ifndef __ASSEMBLY__
117
118extern void outsb(unsigned long port, const void *addr, unsigned long count);
119extern void outsw(unsigned long port, const void *addr, unsigned long count);
120extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
121extern void outsl(unsigned long port, const void *addr, unsigned long count);
122
123extern void insb(unsigned long port, void *addr, unsigned long count);
124extern void insw(unsigned long port, void *addr, unsigned long count);
125extern void insw_8(unsigned long port, void *addr, unsigned long count);
126extern void insl(unsigned long port, void *addr, unsigned long count);
127extern void insl_16(unsigned long port, void *addr, unsigned long count);
128
129extern void dma_outsb(unsigned long port, const void *addr, unsigned short count);
130extern void dma_outsw(unsigned long port, const void *addr, unsigned short count);
131extern void dma_outsl(unsigned long port, const void *addr, unsigned short count);
132
133extern void dma_insb(unsigned long port, void *addr, unsigned short count);
134extern void dma_insw(unsigned long port, void *addr, unsigned short count);
135extern void dma_insl(unsigned long port, void *addr, unsigned short count);
136
137/*
138 * Map some physical address range into the kernel address space.
139 */
140static inline void __iomem *__ioremap(unsigned long physaddr, unsigned long size,
141 int cacheflag)
142{
143 return (void __iomem *)physaddr;
144}
145
146/*
147 * Unmap a ioremap()ed region again
148 */
149static inline void iounmap(void *addr)
150{
151}
152
153/*
154 * __iounmap unmaps nearly everything, so be careful
155 * it doesn't free currently pointer/page tables anymore but it
156 * wans't used anyway and might be added later.
157 */
158static inline void __iounmap(void *addr, unsigned long size)
159{
160}
161
162/*
163 * Set new cache mode for some kernel address space.
164 * The caller must push data for that range itself, if such data may already
165 * be in the cache.
166 */
167static inline void kernel_set_cachemode(void *addr, unsigned long size,
168 int cmode)
169{
170}
171
172static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
173{
174 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
175}
176static inline void __iomem *ioremap_nocache(unsigned long physaddr,
177 unsigned long size)
178{
179 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
180}
181
182extern void blkfin_inv_cache_all(void);
183
184#endif
185
186#define ioport_map(port, nr) ((void __iomem*)(port))
187#define ioport_unmap(addr)
188
189/* Pages to physical address... */
190#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
191#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT)
192
193#define phys_to_virt(vaddr) ((void *) (vaddr))
194#define virt_to_phys(vaddr) ((unsigned long) (vaddr))
195
196#define virt_to_bus virt_to_phys
197#define bus_to_virt phys_to_virt
198
199/*
200 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
201 * access
202 */
203#define xlate_dev_mem_ptr(p) __va(p)
204
205/*
206 * Convert a virtual cached pointer to an uncached pointer
207 */
208#define xlate_dev_kmem_ptr(p) p
209
210#endif /* __KERNEL__ */
211
212#endif /* _BFIN_IO_H */
diff --git a/include/asm-blackfin/ioctl.h b/include/asm-blackfin/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/include/asm-blackfin/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/include/asm-blackfin/ioctls.h b/include/asm-blackfin/ioctls.h
deleted file mode 100644
index 895e3173165d..000000000000
--- a/include/asm-blackfin/ioctls.h
+++ /dev/null
@@ -1,87 +0,0 @@
1#ifndef __ARCH_BFIN_IOCTLS_H__
2#define __ARCH_BFIN_IOCTLS_H__
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS 0x5401
9#define TCSETS 0x5402
10#define TCSETSW 0x5403
11#define TCSETSF 0x5404
12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TCGETS2 _IOR('T', 0x2A, struct termios2)
51#define TCSETS2 _IOW('T', 0x2B, struct termios2)
52#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
53#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
54/* Get Pty Number (of pty-mux device) */
55#define TIOCGPTN _IOR('T', 0x30, unsigned int)
56#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
57
58#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
59#define FIOCLEX 0x5451
60#define FIOASYNC 0x5452
61#define TIOCSERCONFIG 0x5453
62#define TIOCSERGWILD 0x5454
63#define TIOCSERSWILD 0x5455
64#define TIOCGLCKTRMIOS 0x5456
65#define TIOCSLCKTRMIOS 0x5457
66#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
67#define TIOCSERGETLSR 0x5459 /* Get line status register */
68#define TIOCSERGETMULTI 0x545A /* Get multiport config */
69#define TIOCSERSETMULTI 0x545B /* Set multiport config */
70
71#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
72#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
73
74#define FIOQSIZE 0x545E
75
76/* Used for packet mode */
77#define TIOCPKT_DATA 0
78#define TIOCPKT_FLUSHREAD 1
79#define TIOCPKT_FLUSHWRITE 2
80#define TIOCPKT_STOP 4
81#define TIOCPKT_START 8
82#define TIOCPKT_NOSTOP 16
83#define TIOCPKT_DOSTOP 32
84
85#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
86
87#endif /* __ARCH_BFIN_IOCTLS_H__ */
diff --git a/include/asm-blackfin/ipcbuf.h b/include/asm-blackfin/ipcbuf.h
deleted file mode 100644
index 8f0899cdf4d2..000000000000
--- a/include/asm-blackfin/ipcbuf.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/* Changes origined from m68k version. Lineo Inc. May 2001 */
2
3#ifndef __BFIN_IPCBUF_H__
4#define __BFIN_IPCBUF_H__
5
6/*
7 * The user_ipc_perm structure for m68k architecture.
8 * Note extra padding because this structure is passed back and forth
9 * between kernel and user space.
10 *
11 * Pad space is left for:
12 * - 32-bit mode_t and seq
13 * - 2 miscellaneous 32-bit values
14 */
15
16struct ipc64_perm {
17 __kernel_key_t key;
18 __kernel_uid32_t uid;
19 __kernel_gid32_t gid;
20 __kernel_uid32_t cuid;
21 __kernel_gid32_t cgid;
22 __kernel_mode_t mode;
23 unsigned short __pad1;
24 unsigned short seq;
25 unsigned short __pad2;
26 unsigned long __unused1;
27 unsigned long __unused2;
28};
29
30#endif /* __BFIN_IPCBUF_H__ */
diff --git a/include/asm-blackfin/irq.h b/include/asm-blackfin/irq.h
deleted file mode 100644
index 86b67834354d..000000000000
--- a/include/asm-blackfin/irq.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file COPYING in the main directory of this archive
4 * for more details.
5 *
6 * Changed by HuTao Apr18, 2003
7 *
8 * Copyright was missing when I got the code so took from MIPS arch ...MaTed---
9 * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
10 * Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 by Ralf Baechle
11 *
12 * Adapted for BlackFin (ADI) by Ted Ma <mated@sympatico.ca>
13 * Copyright (c) 2002 Arcturus Networks Inc. (www.arcturusnetworks.com)
14 * Copyright (c) 2002 Lineo, Inc. <mattw@lineo.com>
15 */
16
17#ifndef _BFIN_IRQ_H_
18#define _BFIN_IRQ_H_
19
20#include <asm/mach/irq.h>
21#include <asm/ptrace.h>
22
23/*******************************************************************************
24 ***** INTRODUCTION ***********
25 * On the Blackfin, the interrupt structure allows remmapping of the hardware
26 * levels.
27 * - I'm going to assume that the H/W level is going to stay at the default
28 * settings. If someone wants to go through and abstart this out, feel free
29 * to mod the interrupt numbering scheme.
30 * - I'm abstracting the interrupts so that uClinux does not know anything
31 * about the H/W levels. If you want to change the H/W AND keep the abstracted
32 * levels that uClinux sees, you should be able to do most of it here.
33 * - I've left the "abstract" numbering sparce in case someone wants to pull the
34 * interrupts apart (just the TX/RX for the various devices)
35 *******************************************************************************/
36
37/* SYS_IRQS and NR_IRQS are defined in <asm/mach-bf5xx/irq.h>*/
38
39/*
40 * Machine specific interrupt sources.
41 *
42 * Adding an interrupt service routine for a source with this bit
43 * set indicates a special machine specific interrupt source.
44 * The machine specific files define these sources.
45 *
46 * The IRQ_MACHSPEC bit is now gone - the only thing it did was to
47 * introduce unnecessary overhead.
48 *
49 * All interrupt handling is actually machine specific so it is better
50 * to use function pointers, as used by the Sparc port, and select the
51 * interrupt handling functions when initializing the kernel. This way
52 * we save some unnecessary overhead at run-time.
53 * 01/11/97 - Jes
54 */
55
56extern void ack_bad_irq(unsigned int irq);
57
58static __inline__ int irq_canonicalize(int irq)
59{
60 return irq;
61}
62
63/* count of spurious interrupts */
64/* extern volatile unsigned int num_spurious; */
65
66#ifndef NO_IRQ
67#define NO_IRQ ((unsigned int)(-1))
68#endif
69
70#define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1))
71
72#endif /* _BFIN_IRQ_H_ */
diff --git a/include/asm-blackfin/irq_handler.h b/include/asm-blackfin/irq_handler.h
deleted file mode 100644
index 139b5208f9d8..000000000000
--- a/include/asm-blackfin/irq_handler.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef _IRQ_HANDLER_H
2#define _IRQ_HANDLER_H
3
4#include <linux/types.h>
5#include <linux/linkage.h>
6
7/* BASE LEVEL interrupt handler routines */
8asmlinkage void evt_exception(void);
9asmlinkage void trap(void);
10asmlinkage void evt_ivhw(void);
11asmlinkage void evt_timer(void);
12asmlinkage void evt_nmi(void);
13asmlinkage void evt_evt7(void);
14asmlinkage void evt_evt8(void);
15asmlinkage void evt_evt9(void);
16asmlinkage void evt_evt10(void);
17asmlinkage void evt_evt11(void);
18asmlinkage void evt_evt12(void);
19asmlinkage void evt_evt13(void);
20asmlinkage void evt_soft_int1(void);
21asmlinkage void evt_system_call(void);
22asmlinkage void init_exception_buff(void);
23asmlinkage void trap_c(struct pt_regs *fp);
24asmlinkage void ex_replaceable(void);
25asmlinkage void early_trap(void);
26
27extern void *ex_table[];
28extern void return_from_exception(void);
29
30extern int bfin_request_exception(unsigned int exception, void (*handler)(void));
31extern int bfin_free_exception(unsigned int exception, void (*handler)(void));
32
33#endif
diff --git a/include/asm-blackfin/irq_regs.h b/include/asm-blackfin/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-blackfin/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-blackfin/kdebug.h b/include/asm-blackfin/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-blackfin/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-blackfin/kgdb.h b/include/asm-blackfin/kgdb.h
deleted file mode 100644
index 0f73847fd6bc..000000000000
--- a/include/asm-blackfin/kgdb.h
+++ /dev/null
@@ -1,184 +0,0 @@
1/*
2 * File: include/asm-blackfin/kgdb.h
3 * Based on:
4 * Author: Sonic Zhang
5 *
6 * Created:
7 * Description:
8 *
9 * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $
10 *
11 * Modified:
12 * Copyright 2005-2006 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 of the License, or
19 * (at your option) 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; if not, see the file COPYING, or write
28 * to the Free Software Foundation, Inc.,
29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 */
31
32#ifndef __ASM_BLACKFIN_KGDB_H__
33#define __ASM_BLACKFIN_KGDB_H__
34
35#include <linux/ptrace.h>
36
37/* gdb locks */
38#define KGDB_MAX_NO_CPUS 8
39
40/************************************************************************/
41/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
42/* at least NUMREGBYTES*2 are needed for register packets */
43/* Longer buffer is needed to list all threads */
44#define BUFMAX 2048
45
46/*
47 * Note that this register image is different from
48 * the register image that Linux produces at interrupt time.
49 *
50 * Linux's register image is defined by struct pt_regs in ptrace.h.
51 */
52enum regnames {
53 /* Core Registers */
54 BFIN_R0 = 0,
55 BFIN_R1,
56 BFIN_R2,
57 BFIN_R3,
58 BFIN_R4,
59 BFIN_R5,
60 BFIN_R6,
61 BFIN_R7,
62 BFIN_P0,
63 BFIN_P1,
64 BFIN_P2,
65 BFIN_P3,
66 BFIN_P4,
67 BFIN_P5,
68 BFIN_SP,
69 BFIN_FP,
70 BFIN_I0,
71 BFIN_I1,
72 BFIN_I2,
73 BFIN_I3,
74 BFIN_M0,
75 BFIN_M1,
76 BFIN_M2,
77 BFIN_M3,
78 BFIN_B0,
79 BFIN_B1,
80 BFIN_B2,
81 BFIN_B3,
82 BFIN_L0,
83 BFIN_L1,
84 BFIN_L2,
85 BFIN_L3,
86 BFIN_A0_DOT_X,
87 BFIN_A0_DOT_W,
88 BFIN_A1_DOT_X,
89 BFIN_A1_DOT_W,
90 BFIN_ASTAT,
91 BFIN_RETS,
92 BFIN_LC0,
93 BFIN_LT0,
94 BFIN_LB0,
95 BFIN_LC1,
96 BFIN_LT1,
97 BFIN_LB1,
98 BFIN_CYCLES,
99 BFIN_CYCLES2,
100 BFIN_USP,
101 BFIN_SEQSTAT,
102 BFIN_SYSCFG,
103 BFIN_RETI,
104 BFIN_RETX,
105 BFIN_RETN,
106 BFIN_RETE,
107
108 /* Pseudo Registers */
109 BFIN_PC,
110 BFIN_CC,
111 BFIN_EXTRA1, /* Address of .text section. */
112 BFIN_EXTRA2, /* Address of .data section. */
113 BFIN_EXTRA3, /* Address of .bss section. */
114 BFIN_FDPIC_EXEC,
115 BFIN_FDPIC_INTERP,
116
117 /* MMRs */
118 BFIN_IPEND,
119
120 /* LAST ENTRY SHOULD NOT BE CHANGED. */
121 BFIN_NUM_REGS /* The number of all registers. */
122};
123
124/* Number of bytes of registers. */
125#define NUMREGBYTES BFIN_NUM_REGS*4
126
127#define BREAKPOINT() asm(" EXCPT 2;");
128#define BREAK_INSTR_SIZE 2
129#define HW_BREAKPOINT_NUM 6
130
131/* Instruction watchpoint address control register bits mask */
132#define WPPWR 0x1
133#define WPIREN01 0x2
134#define WPIRINV01 0x4
135#define WPIAEN0 0x8
136#define WPIAEN1 0x10
137#define WPICNTEN0 0x20
138#define WPICNTEN1 0x40
139#define EMUSW0 0x80
140#define EMUSW1 0x100
141#define WPIREN23 0x200
142#define WPIRINV23 0x400
143#define WPIAEN2 0x800
144#define WPIAEN3 0x1000
145#define WPICNTEN2 0x2000
146#define WPICNTEN3 0x4000
147#define EMUSW2 0x8000
148#define EMUSW3 0x10000
149#define WPIREN45 0x20000
150#define WPIRINV45 0x40000
151#define WPIAEN4 0x80000
152#define WPIAEN5 0x100000
153#define WPICNTEN4 0x200000
154#define WPICNTEN5 0x400000
155#define EMUSW4 0x800000
156#define EMUSW5 0x1000000
157#define WPAND 0x2000000
158
159/* Data watchpoint address control register bits mask */
160#define WPDREN01 0x1
161#define WPDRINV01 0x2
162#define WPDAEN0 0x4
163#define WPDAEN1 0x8
164#define WPDCNTEN0 0x10
165#define WPDCNTEN1 0x20
166#define WPDSRC0 0xc0
167#define WPDACC0 0x300
168#define WPDSRC1 0xc00
169#define WPDACC1 0x3000
170
171/* Watchpoint status register bits mask */
172#define STATIA0 0x1
173#define STATIA1 0x2
174#define STATIA2 0x4
175#define STATIA3 0x8
176#define STATIA4 0x10
177#define STATIA5 0x20
178#define STATDA0 0x40
179#define STATDA1 0x80
180
181extern void kgdb_print(const char *fmt, ...);
182extern void init_kgdb_uart(void);
183
184#endif
diff --git a/include/asm-blackfin/kmap_types.h b/include/asm-blackfin/kmap_types.h
deleted file mode 100644
index e215f7104974..000000000000
--- a/include/asm-blackfin/kmap_types.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4enum km_type {
5 KM_BOUNCE_READ,
6 KM_SKB_SUNRPC_DATA,
7 KM_SKB_DATA_SOFTIRQ,
8 KM_USER0,
9 KM_USER1,
10 KM_BIO_SRC_IRQ,
11 KM_BIO_DST_IRQ,
12 KM_PTE0,
13 KM_PTE1,
14 KM_IRQ0,
15 KM_IRQ1,
16 KM_SOFTIRQ0,
17 KM_SOFTIRQ1,
18 KM_TYPE_NR
19};
20
21#endif
diff --git a/include/asm-blackfin/l1layout.h b/include/asm-blackfin/l1layout.h
deleted file mode 100644
index c13ded777828..000000000000
--- a/include/asm-blackfin/l1layout.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * l1layout.h
3 * Defines a layout of L1 scratchpad memory that userspace can rely on.
4 */
5
6#ifndef _L1LAYOUT_H_
7#define _L1LAYOUT_H_
8
9#include <asm/blackfin.h>
10
11#ifndef __ASSEMBLY__
12
13/* Data that is "mapped" into the process VM at the start of the L1 scratch
14 memory, so that each process can access it at a fixed address. Used for
15 stack checking. */
16struct l1_scratch_task_info
17{
18 /* Points to the start of the stack. */
19 void *stack_start;
20 /* Not updated by the kernel; a user process can modify this to
21 keep track of the lowest address of the stack pointer during its
22 runtime. */
23 void *lowest_sp;
24};
25
26/* A pointer to the structure in memory. */
27#define L1_SCRATCH_TASK_INFO ((struct l1_scratch_task_info *)L1_SCRATCH_START)
28
29#endif
30
31#endif
diff --git a/include/asm-blackfin/linkage.h b/include/asm-blackfin/linkage.h
deleted file mode 100644
index 5a822bb790f7..000000000000
--- a/include/asm-blackfin/linkage.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_LINKAGE_H
2#define __ASM_LINKAGE_H
3
4#define __ALIGN .align 4
5#define __ALIGN_STR ".align 4"
6
7#endif
diff --git a/include/asm-blackfin/local.h b/include/asm-blackfin/local.h
deleted file mode 100644
index 75afffbc6421..000000000000
--- a/include/asm-blackfin/local.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __BLACKFIN_LOCAL_H
2#define __BLACKFIN_LOCAL_H
3
4#include <asm-generic/local.h>
5
6#endif /* __BLACKFIN_LOCAL_H */
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h
deleted file mode 100644
index b7b166f4f064..000000000000
--- a/include/asm-blackfin/mach-bf527/anomaly.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 *
5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8
9/* This file shoule be up to date with:
10 * - Revision C, 01/25/2008; ADSP-BF527 Blackfin Processor Anomaly List
11 */
12
13#ifndef _MACH_ANOMALY_H_
14#define _MACH_ANOMALY_H_
15
16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */
17#define ANOMALY_05000074 (1)
18/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
19#define ANOMALY_05000119 (1)
20/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
21#define ANOMALY_05000122 (1)
22/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
23#define ANOMALY_05000245 (1)
24/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
25#define ANOMALY_05000265 (1)
26/* New Feature: EMAC TX DMA Word Alignment */
27#define ANOMALY_05000285 (1)
28/* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
29#define ANOMALY_05000312 (1)
30/* Incorrect Access of OTP_STATUS During otp_write() Function */
31#define ANOMALY_05000328 (1)
32/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
33#define ANOMALY_05000337 (1)
34/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
35#define ANOMALY_05000341 (1)
36/* TWI May Not Operate Correctly Under Certain Signal Termination Conditions */
37#define ANOMALY_05000342 (1)
38/* USB Calibration Value Is Not Initialized */
39#define ANOMALY_05000346 (1)
40/* Preboot Routine Incorrectly Alters Reset Value of USB Register */
41#define ANOMALY_05000347 (1)
42/* Security Features Are Not Functional */
43#define ANOMALY_05000348 (__SILICON_REVISION__ < 1)
44/* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */
45#define ANOMALY_05000355 (1)
46/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
47#define ANOMALY_05000357 (1)
48/* Incorrect Revision Number in DSPID Register */
49#define ANOMALY_05000364 (__SILICON_REVISION__ > 0)
50/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
51#define ANOMALY_05000366 (1)
52/* New Feature: Higher Default CCLK Rate */
53#define ANOMALY_05000368 (1)
54/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
55#define ANOMALY_05000371 (1)
56/* Authentication Fails To Initiate */
57#define ANOMALY_05000376 (__SILICON_REVISION__ > 0)
58/* Data Read From L3 Memory by USB DMA May be Corrupted */
59#define ANOMALY_05000380 (1)
60/* USB Full-speed Mode not Fully Tested */
61#define ANOMALY_05000381 (1)
62/* New Feature: Boot from OTP Memory */
63#define ANOMALY_05000385 (1)
64/* New Feature: bfrom_SysControl() Routine */
65#define ANOMALY_05000386 (1)
66/* New Feature: Programmable Preboot Settings */
67#define ANOMALY_05000387 (1)
68/* Reset Vector Must Not Be in SDRAM Memory Space */
69#define ANOMALY_05000389 (1)
70/* New Feature: pTempCurrent Added to ADI_BOOT_DATA Structure */
71#define ANOMALY_05000392 (1)
72/* New Feature: dTempByteCount Value Increased in ADI_BOOT_DATA Structure */
73#define ANOMALY_05000393 (1)
74/* New Feature: Log Buffer Functionality */
75#define ANOMALY_05000394 (1)
76/* New Feature: Hook Routine Functionality */
77#define ANOMALY_05000395 (1)
78/* New Feature: Header Indirect Bit */
79#define ANOMALY_05000396 (1)
80/* New Feature: BK_ONES, BK_ZEROS, and BK_DATECODE Constants */
81#define ANOMALY_05000397 (1)
82/* New Feature: SWRESET, DFRESET and WDRESET Bits Added to SYSCR Register */
83#define ANOMALY_05000398 (1)
84/* New Feature: BCODE_NOBOOT Added to BCODE Field of SYSCR Register */
85#define ANOMALY_05000399 (1)
86/* PPI Data Signals D0 and D8 do not Tristate After Disabling PPI */
87#define ANOMALY_05000401 (1)
88
89/* Anomalies that don't exist on this proc */
90#define ANOMALY_05000125 (0)
91#define ANOMALY_05000158 (0)
92#define ANOMALY_05000183 (0)
93#define ANOMALY_05000198 (0)
94#define ANOMALY_05000230 (0)
95#define ANOMALY_05000244 (0)
96#define ANOMALY_05000261 (0)
97#define ANOMALY_05000263 (0)
98#define ANOMALY_05000266 (0)
99#define ANOMALY_05000273 (0)
100#define ANOMALY_05000311 (0)
101#define ANOMALY_05000323 (0)
102#define ANOMALY_05000363 (0)
103
104#endif
diff --git a/include/asm-blackfin/mach-bf527/bf527.h b/include/asm-blackfin/mach-bf527/bf527.h
deleted file mode 100644
index 056eb4b9cd25..000000000000
--- a/include/asm-blackfin/mach-bf527/bf527.h
+++ /dev/null
@@ -1,127 +0,0 @@
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
deleted file mode 100644
index 2526b6ed6faa..000000000000
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ /dev/null
@@ -1,195 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * blackfin serial driver head file
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#include <linux/serial.h>
33#include <asm/dma.h>
34#include <asm/portmux.h>
35
36#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
37#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
38#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER))
39#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
40#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
41#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
42#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
43
44#define UART_PUT_CHAR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_THR), v)
45#define UART_PUT_DLL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLL), v)
46#define UART_PUT_IER(uart, v) bfin_write16(((uart)->port.membase + OFFSET_IER), v)
47#define UART_SET_IER(uart, v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v))
48#define UART_CLEAR_IER(uart, v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v))
49#define UART_PUT_DLH(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLH), v)
50#define UART_PUT_LCR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_LCR), v)
51#define UART_PUT_GCTL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_GCTL), v)
52
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
62#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
63# define CONFIG_SERIAL_BFIN_CTSRTS
64
65# ifndef CONFIG_UART0_CTS_PIN
66# define CONFIG_UART0_CTS_PIN -1
67# endif
68
69# ifndef CONFIG_UART0_RTS_PIN
70# define CONFIG_UART0_RTS_PIN -1
71# endif
72
73# ifndef CONFIG_UART1_CTS_PIN
74# define CONFIG_UART1_CTS_PIN -1
75# endif
76
77# ifndef CONFIG_UART1_RTS_PIN
78# define CONFIG_UART1_RTS_PIN -1
79# endif
80#endif
81/*
82 * The pin configuration is different from schematic
83 */
84struct bfin_serial_port {
85 struct uart_port port;
86 unsigned int old_status;
87 unsigned int lsr;
88#ifdef CONFIG_SERIAL_BFIN_DMA
89 int tx_done;
90 int tx_count;
91 struct circ_buf rx_dma_buf;
92 struct timer_list rx_dma_timer;
93 int rx_dma_nrows;
94 unsigned int tx_dma_channel;
95 unsigned int rx_dma_channel;
96 struct work_struct tx_dma_workqueue;
97#endif
98#ifdef CONFIG_SERIAL_BFIN_CTSRTS
99 struct timer_list cts_timer;
100 int cts_pin;
101 int rts_pin;
102#endif
103};
104
105/* The hardware clears the LSR bits upon read, so we need to cache
106 * some of the more fun bits in software so they don't get lost
107 * when checking the LSR in other code paths (TX).
108 */
109static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
110{
111 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
112 uart->lsr |= (lsr & (BI|FE|PE|OE));
113 return lsr | uart->lsr;
114}
115
116static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
117{
118 uart->lsr = 0;
119 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
120}
121
122struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS];
123struct bfin_serial_res {
124 unsigned long uart_base_addr;
125 int uart_irq;
126#ifdef CONFIG_SERIAL_BFIN_DMA
127 unsigned int uart_tx_dma_channel;
128 unsigned int uart_rx_dma_channel;
129#endif
130#ifdef CONFIG_SERIAL_BFIN_CTSRTS
131 int uart_cts_pin;
132 int uart_rts_pin;
133#endif
134};
135
136struct bfin_serial_res bfin_serial_resource[] = {
137#ifdef CONFIG_SERIAL_BFIN_UART0
138 {
139 0xFFC00400,
140 IRQ_UART0_RX,
141#ifdef CONFIG_SERIAL_BFIN_DMA
142 CH_UART0_TX,
143 CH_UART0_RX,
144#endif
145#ifdef CONFIG_BFIN_UART0_CTSRTS
146 CONFIG_UART0_CTS_PIN,
147 CONFIG_UART0_RTS_PIN,
148#endif
149 },
150#endif
151#ifdef CONFIG_SERIAL_BFIN_UART1
152 {
153 0xFFC02000,
154 IRQ_UART1_RX,
155#ifdef CONFIG_SERIAL_BFIN_DMA
156 CH_UART1_TX,
157 CH_UART1_RX,
158#endif
159#ifdef CONFIG_BFIN_UART1_CTSRTS
160 CONFIG_UART1_CTS_PIN,
161 CONFIG_UART1_RTS_PIN,
162#endif
163 },
164#endif
165};
166
167int nr_ports = ARRAY_SIZE(bfin_serial_resource);
168
169#define DRIVER_NAME "bfin-uart"
170
171static void bfin_serial_hw_init(struct bfin_serial_port *uart)
172{
173
174#ifdef CONFIG_SERIAL_BFIN_UART0
175 peripheral_request(P_UART0_TX, DRIVER_NAME);
176 peripheral_request(P_UART0_RX, DRIVER_NAME);
177#endif
178
179#ifdef CONFIG_SERIAL_BFIN_UART1
180 peripheral_request(P_UART1_TX, DRIVER_NAME);
181 peripheral_request(P_UART1_RX, DRIVER_NAME);
182#endif
183
184#ifdef CONFIG_SERIAL_BFIN_CTSRTS
185 if (uart->cts_pin >= 0) {
186 gpio_request(uart->cts_pin, DRIVER_NAME);
187 gpio_direction_input(uart->cts_pin);
188 }
189
190 if (uart->rts_pin >= 0) {
191 gpio_request(uart->rts_pin, DRIVER_NAME);
192 gpio_direction_output(uart->rts_pin, 0);
193 }
194#endif
195}
diff --git a/include/asm-blackfin/mach-bf527/bfin_sir.h b/include/asm-blackfin/mach-bf527/bfin_sir.h
deleted file mode 100644
index cfd8ad4f1f2c..000000000000
--- a/include/asm-blackfin/mach-bf527/bfin_sir.h
+++ /dev/null
@@ -1,142 +0,0 @@
1/*
2 * Blackfin Infra-red Driver
3 *
4 * Copyright 2006-2008 Analog Devices Inc.
5 *
6 * Enter bugs at http://blackfin.uclinux.org/
7 *
8 * Licensed under the GPL-2 or later.
9 *
10 */
11
12#include <linux/serial.h>
13#include <asm/dma.h>
14#include <asm/portmux.h>
15
16#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR)
17#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL)
18#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER)
19#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH)
20#define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR)
21#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR)
22#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
23
24#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
25#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
26#define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v)
27#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
28#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
29#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
30
31#ifdef CONFIG_SIR_BFIN_DMA
32struct dma_rx_buf {
33 char *buf;
34 int head;
35 int tail;
36 };
37#endif /* CONFIG_SIR_BFIN_DMA */
38
39struct bfin_sir_port {
40 unsigned char __iomem *membase;
41 unsigned int irq;
42 unsigned int lsr;
43 unsigned long clk;
44 struct net_device *dev;
45#ifdef CONFIG_SIR_BFIN_DMA
46 int tx_done;
47 struct dma_rx_buf rx_dma_buf;
48 struct timer_list rx_dma_timer;
49 int rx_dma_nrows;
50#endif /* CONFIG_SIR_BFIN_DMA */
51 unsigned int tx_dma_channel;
52 unsigned int rx_dma_channel;
53};
54
55struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS];
56
57struct bfin_sir_port_res {
58 unsigned long base_addr;
59 int irq;
60 unsigned int rx_dma_channel;
61 unsigned int tx_dma_channel;
62};
63
64struct bfin_sir_port_res bfin_sir_port_resource[] = {
65#ifdef CONFIG_BFIN_SIR0
66 {
67 0xFFC00400,
68 IRQ_UART0_RX,
69 CH_UART0_RX,
70 CH_UART0_TX,
71 },
72#endif
73#ifdef CONFIG_BFIN_SIR1
74 {
75 0xFFC02000,
76 IRQ_UART1_RX,
77 CH_UART1_RX,
78 CH_UART1_TX,
79 },
80#endif
81};
82
83int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource);
84
85struct bfin_sir_self {
86 struct bfin_sir_port *sir_port;
87 spinlock_t lock;
88 unsigned int open;
89 int speed;
90 int newspeed;
91
92 struct sk_buff *txskb;
93 struct sk_buff *rxskb;
94 struct net_device_stats stats;
95 struct device *dev;
96 struct irlap_cb *irlap;
97 struct qos_info qos;
98
99 iobuff_t tx_buff;
100 iobuff_t rx_buff;
101
102 struct work_struct work;
103 int mtt;
104};
105
106static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port)
107{
108 unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR);
109 port->lsr |= (lsr & (BI|FE|PE|OE));
110 return lsr | port->lsr;
111}
112
113static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
114{
115 port->lsr = 0;
116 bfin_read16(port->membase + OFFSET_LSR);
117}
118
119#define DRIVER_NAME "bfin_sir"
120
121static int bfin_sir_hw_init(void)
122{
123 int ret = -ENODEV;
124#ifdef CONFIG_BFIN_SIR0
125 ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
126 if (ret)
127 return ret;
128 ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
129 if (ret)
130 return ret;
131#endif
132
133#ifdef CONFIG_BFIN_SIR1
134 ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
135 if (ret)
136 return ret;
137 ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
138 if (ret)
139 return ret;
140#endif
141 return ret;
142}
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h
deleted file mode 100644
index 297821e2d79a..000000000000
--- a/include/asm-blackfin/mach-bf527/blackfin.h
+++ /dev/null
@@ -1,93 +0,0 @@
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) || defined(CONFIG_BF526)
43#include "defBF527.h"
44#endif
45
46#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
47#include "defBF525.h"
48#endif
49
50#if !defined(__ASSEMBLY__)
51#include "cdefBF522.h"
52
53#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
54#include "cdefBF527.h"
55#endif
56
57#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
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#define BFIN_UART_NR_PORTS 2
68
69#define OFFSET_THR 0x00 /* Transmit Holding register */
70#define OFFSET_RBR 0x00 /* Receive Buffer register */
71#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
72#define OFFSET_IER 0x04 /* Interrupt Enable Register */
73#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
74#define OFFSET_IIR 0x08 /* Interrupt Identification Register */
75#define OFFSET_LCR 0x0C /* Line Control Register */
76#define OFFSET_MCR 0x10 /* Modem Control Register */
77#define OFFSET_LSR 0x14 /* Line Status Register */
78#define OFFSET_MSR 0x18 /* Modem Status Register */
79#define OFFSET_SCR 0x1C /* SCR Scratch Register */
80#define OFFSET_GCTL 0x24 /* Global Control Register */
81
82/* DPMC*/
83#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
84#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
85#define STOPCK_OFF STOPCK
86
87/* PLL_DIV Masks */
88#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
89#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
90#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
91#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
92
93#endif
diff --git a/include/asm-blackfin/mach-bf527/cdefBF522.h b/include/asm-blackfin/mach-bf527/cdefBF522.h
deleted file mode 100644
index 52c06494b886..000000000000
--- a/include/asm-blackfin/mach-bf527/cdefBF522.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/cdefbf522.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: system mmr register map
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 _CDEF_BF522_H
33#define _CDEF_BF522_H
34
35/* include all Core registers and bit definitions */
36#include "defBF522.h"
37
38/* include core specific register pointer definitions */
39#include <asm/mach-common/cdef_LPBlackfin.h>
40
41/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF522 */
42
43/* include cdefBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
44#include "cdefBF52x_base.h"
45
46#endif /* _CDEF_BF522_H */
diff --git a/include/asm-blackfin/mach-bf527/cdefBF525.h b/include/asm-blackfin/mach-bf527/cdefBF525.h
deleted file mode 100644
index 2cc67e4b4d86..000000000000
--- a/include/asm-blackfin/mach-bf527/cdefBF525.h
+++ /dev/null
@@ -1,461 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/cdefbf525.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: system mmr register map
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 _CDEF_BF525_H
33#define _CDEF_BF525_H
34
35/* include all Core registers and bit definitions */
36#include "defBF525.h"
37
38/* include core specific register pointer definitions */
39#include <asm/mach-common/cdef_LPBlackfin.h>
40
41/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF525 */
42
43/* include cdefBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
44#include "cdefBF52x_base.h"
45
46/* The following are the #defines needed by ADSP-BF525 that are not in the common header */
47
48/* USB Control Registers */
49
50#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
51#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
52#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
53#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
54#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
55#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
56#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
57#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
58#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
59#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
60#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
61#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
62#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
63#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
64#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
65#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
66#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
67#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
68#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
69#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
70#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
71#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
72#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
73#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
74#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
75#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
76
77/* USB Packet Control Registers */
78
79#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
80#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
81#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
82#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
83#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
84#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
85#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
86#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
87#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
88#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
89#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
90#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
91#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
92#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
93#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
94#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
95#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
96#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
97#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
98#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
99#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
100#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
101#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
102#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
103#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
104#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
105
106/* USB Endpoint FIFO Registers */
107
108#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
109#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
110#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
111#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
112#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
113#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
114#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
115#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
116#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
117#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
118#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
119#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
120#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
121#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
122#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
123#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
124
125/* USB OTG Control Registers */
126
127#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
128#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
129#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
130#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
131#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
132#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
133
134/* USB Phy Control Registers */
135
136#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
137#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
138#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
139#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
140#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
141#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
142#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
143#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
144#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
145#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
146
147/* (APHY_CNTRL is for ADI usage only) */
148
149#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
150#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
151
152/* (APHY_CALIB is for ADI usage only) */
153
154#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
155#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
156
157#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
158#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
159
160/* (PHY_TEST is for ADI usage only) */
161
162#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
163#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
164
165#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
166#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
167#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
168#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
169
170/* USB Endpoint 0 Control Registers */
171
172#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
173#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
174#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
175#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
176#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
177#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
178#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
179#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
180#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
181#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
182#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
183#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
184#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
185#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
186#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
187#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
188#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
189#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
190#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
191#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
192
193/* USB Endpoint 1 Control Registers */
194
195#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
196#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
197#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
198#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
199#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
200#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
201#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
202#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
203#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
204#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
205#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
206#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
207#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
208#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
209#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
210#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
211#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
212#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
213#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
214#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
215
216/* USB Endpoint 2 Control Registers */
217
218#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
219#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
220#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
221#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
222#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
223#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
224#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
225#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
226#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
227#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
228#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
229#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
230#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
231#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
232#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
233#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
234#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
235#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
236#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
237#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
238
239/* USB Endpoint 3 Control Registers */
240
241#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
242#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
243#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
244#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
245#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
246#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
247#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
248#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
249#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
250#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
251#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
252#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
253#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
254#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
255#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
256#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
257#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
258#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
259#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
260#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
261
262/* USB Endpoint 4 Control Registers */
263
264#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
265#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
266#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
267#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
268#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
269#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
270#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
271#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
272#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
273#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
274#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
275#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
276#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
277#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
278#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
279#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
280#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
281#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
282#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
283#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
284
285/* USB Endpoint 5 Control Registers */
286
287#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
288#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
289#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
290#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
291#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
292#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
293#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
294#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
295#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
296#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
297#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
298#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
299#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
300#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
301#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
302#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
303#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
304#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
305#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
306#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
307
308/* USB Endpoint 6 Control Registers */
309
310#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
311#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
312#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
313#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
314#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
315#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
316#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
317#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
318#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
319#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
320#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
321#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
322#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
323#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
324#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
325#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
326#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
327#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
328#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
329#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
330
331/* USB Endpoint 7 Control Registers */
332
333#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
334#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
335#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
336#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
337#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
338#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
339#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
340#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
341#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
342#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
343#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
344#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
345#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
346#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
347#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
348#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
349#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
350#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
351#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
352#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
353
354#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
355#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
356
357/* USB Channel 0 Config Registers */
358
359#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
360#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
361#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
362#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
363#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
364#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
365#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
366#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
367#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
368#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
369
370/* USB Channel 1 Config Registers */
371
372#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
373#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
374#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
375#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
376#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
377#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
378#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
379#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
380#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
381#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
382
383/* USB Channel 2 Config Registers */
384
385#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
386#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
387#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
388#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
389#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
390#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
391#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
392#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
393#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
394#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
395
396/* USB Channel 3 Config Registers */
397
398#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
399#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
400#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
401#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
402#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
403#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
404#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
405#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
406#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
407#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
408
409/* USB Channel 4 Config Registers */
410
411#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
412#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
413#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
414#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
415#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
416#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
417#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
418#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
419#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
420#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
421
422/* USB Channel 5 Config Registers */
423
424#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
425#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
426#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
427#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
428#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
429#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
430#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
431#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
432#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
433#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
434
435/* USB Channel 6 Config Registers */
436
437#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
438#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
439#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
440#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
441#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
442#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
443#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
444#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
445#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
446#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
447
448/* USB Channel 7 Config Registers */
449
450#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
451#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
452#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
453#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
454#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
455#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
456#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
457#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
458#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
459#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
460
461#endif /* _CDEF_BF525_H */
diff --git a/include/asm-blackfin/mach-bf527/cdefBF527.h b/include/asm-blackfin/mach-bf527/cdefBF527.h
deleted file mode 100644
index 5bd1a8601743..000000000000
--- a/include/asm-blackfin/mach-bf527/cdefBF527.h
+++ /dev/null
@@ -1,626 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/cdefbf527.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: system mmr register map
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 _CDEF_BF527_H
33#define _CDEF_BF527_H
34
35/* include all Core registers and bit definitions */
36#include "defBF527.h"
37
38/* include core specific register pointer definitions */
39#include <asm/mach-common/cdef_LPBlackfin.h>
40
41/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF527 */
42
43/* include cdefBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
44#include "cdefBF52x_base.h"
45
46/* The following are the #defines needed by ADSP-BF527 that are not in the common header */
47
48/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
49
50#define bfin_read_EMAC_OPMODE() bfin_read32(EMAC_OPMODE)
51#define bfin_write_EMAC_OPMODE(val) bfin_write32(EMAC_OPMODE, val)
52#define bfin_read_EMAC_ADDRLO() bfin_read32(EMAC_ADDRLO)
53#define bfin_write_EMAC_ADDRLO(val) bfin_write32(EMAC_ADDRLO, val)
54#define bfin_read_EMAC_ADDRHI() bfin_read32(EMAC_ADDRHI)
55#define bfin_write_EMAC_ADDRHI(val) bfin_write32(EMAC_ADDRHI, val)
56#define bfin_read_EMAC_HASHLO() bfin_read32(EMAC_HASHLO)
57#define bfin_write_EMAC_HASHLO(val) bfin_write32(EMAC_HASHLO, val)
58#define bfin_read_EMAC_HASHHI() bfin_read32(EMAC_HASHHI)
59#define bfin_write_EMAC_HASHHI(val) bfin_write32(EMAC_HASHHI, val)
60#define bfin_read_EMAC_STAADD() bfin_read32(EMAC_STAADD)
61#define bfin_write_EMAC_STAADD(val) bfin_write32(EMAC_STAADD, val)
62#define bfin_read_EMAC_STADAT() bfin_read32(EMAC_STADAT)
63#define bfin_write_EMAC_STADAT(val) bfin_write32(EMAC_STADAT, val)
64#define bfin_read_EMAC_FLC() bfin_read32(EMAC_FLC)
65#define bfin_write_EMAC_FLC(val) bfin_write32(EMAC_FLC, val)
66#define bfin_read_EMAC_VLAN1() bfin_read32(EMAC_VLAN1)
67#define bfin_write_EMAC_VLAN1(val) bfin_write32(EMAC_VLAN1, val)
68#define bfin_read_EMAC_VLAN2() bfin_read32(EMAC_VLAN2)
69#define bfin_write_EMAC_VLAN2(val) bfin_write32(EMAC_VLAN2, val)
70#define bfin_read_EMAC_WKUP_CTL() bfin_read32(EMAC_WKUP_CTL)
71#define bfin_write_EMAC_WKUP_CTL(val) bfin_write32(EMAC_WKUP_CTL, val)
72#define bfin_read_EMAC_WKUP_FFMSK0() bfin_read32(EMAC_WKUP_FFMSK0)
73#define bfin_write_EMAC_WKUP_FFMSK0(val) bfin_write32(EMAC_WKUP_FFMSK0, val)
74#define bfin_read_EMAC_WKUP_FFMSK1() bfin_read32(EMAC_WKUP_FFMSK1)
75#define bfin_write_EMAC_WKUP_FFMSK1(val) bfin_write32(EMAC_WKUP_FFMSK1, val)
76#define bfin_read_EMAC_WKUP_FFMSK2() bfin_read32(EMAC_WKUP_FFMSK2)
77#define bfin_write_EMAC_WKUP_FFMSK2(val) bfin_write32(EMAC_WKUP_FFMSK2, val)
78#define bfin_read_EMAC_WKUP_FFMSK3() bfin_read32(EMAC_WKUP_FFMSK3)
79#define bfin_write_EMAC_WKUP_FFMSK3(val) bfin_write32(EMAC_WKUP_FFMSK3, val)
80#define bfin_read_EMAC_WKUP_FFCMD() bfin_read32(EMAC_WKUP_FFCMD)
81#define bfin_write_EMAC_WKUP_FFCMD(val) bfin_write32(EMAC_WKUP_FFCMD, val)
82#define bfin_read_EMAC_WKUP_FFOFF() bfin_read32(EMAC_WKUP_FFOFF)
83#define bfin_write_EMAC_WKUP_FFOFF(val) bfin_write32(EMAC_WKUP_FFOFF, val)
84#define bfin_read_EMAC_WKUP_FFCRC0() bfin_read32(EMAC_WKUP_FFCRC0)
85#define bfin_write_EMAC_WKUP_FFCRC0(val) bfin_write32(EMAC_WKUP_FFCRC0, val)
86#define bfin_read_EMAC_WKUP_FFCRC1() bfin_read32(EMAC_WKUP_FFCRC1)
87#define bfin_write_EMAC_WKUP_FFCRC1(val) bfin_write32(EMAC_WKUP_FFCRC1, val)
88
89#define bfin_read_EMAC_SYSCTL() bfin_read32(EMAC_SYSCTL)
90#define bfin_write_EMAC_SYSCTL(val) bfin_write32(EMAC_SYSCTL, val)
91#define bfin_read_EMAC_SYSTAT() bfin_read32(EMAC_SYSTAT)
92#define bfin_write_EMAC_SYSTAT(val) bfin_write32(EMAC_SYSTAT, val)
93#define bfin_read_EMAC_RX_STAT() bfin_read32(EMAC_RX_STAT)
94#define bfin_write_EMAC_RX_STAT(val) bfin_write32(EMAC_RX_STAT, val)
95#define bfin_read_EMAC_RX_STKY() bfin_read32(EMAC_RX_STKY)
96#define bfin_write_EMAC_RX_STKY(val) bfin_write32(EMAC_RX_STKY, val)
97#define bfin_read_EMAC_RX_IRQE() bfin_read32(EMAC_RX_IRQE)
98#define bfin_write_EMAC_RX_IRQE(val) bfin_write32(EMAC_RX_IRQE, val)
99#define bfin_read_EMAC_TX_STAT() bfin_read32(EMAC_TX_STAT)
100#define bfin_write_EMAC_TX_STAT(val) bfin_write32(EMAC_TX_STAT, val)
101#define bfin_read_EMAC_TX_STKY() bfin_read32(EMAC_TX_STKY)
102#define bfin_write_EMAC_TX_STKY(val) bfin_write32(EMAC_TX_STKY, val)
103#define bfin_read_EMAC_TX_IRQE() bfin_read32(EMAC_TX_IRQE)
104#define bfin_write_EMAC_TX_IRQE(val) bfin_write32(EMAC_TX_IRQE, val)
105
106#define bfin_read_EMAC_MMC_CTL() bfin_read32(EMAC_MMC_CTL)
107#define bfin_write_EMAC_MMC_CTL(val) bfin_write32(EMAC_MMC_CTL, val)
108#define bfin_read_EMAC_MMC_RIRQS() bfin_read32(EMAC_MMC_RIRQS)
109#define bfin_write_EMAC_MMC_RIRQS(val) bfin_write32(EMAC_MMC_RIRQS, val)
110#define bfin_read_EMAC_MMC_RIRQE() bfin_read32(EMAC_MMC_RIRQE)
111#define bfin_write_EMAC_MMC_RIRQE(val) bfin_write32(EMAC_MMC_RIRQE, val)
112#define bfin_read_EMAC_MMC_TIRQS() bfin_read32(EMAC_MMC_TIRQS)
113#define bfin_write_EMAC_MMC_TIRQS(val) bfin_write32(EMAC_MMC_TIRQS, val)
114#define bfin_read_EMAC_MMC_TIRQE() bfin_read32(EMAC_MMC_TIRQE)
115#define bfin_write_EMAC_MMC_TIRQE(val) bfin_write32(EMAC_MMC_TIRQE, val)
116
117#define bfin_read_EMAC_RXC_OK() bfin_read32(EMAC_RXC_OK)
118#define bfin_write_EMAC_RXC_OK(val) bfin_write32(EMAC_RXC_OK, val)
119#define bfin_read_EMAC_RXC_FCS() bfin_read32(EMAC_RXC_FCS)
120#define bfin_write_EMAC_RXC_FCS(val) bfin_write32(EMAC_RXC_FCS, val)
121#define bfin_read_EMAC_RXC_ALIGN() bfin_read32(EMAC_RXC_ALIGN)
122#define bfin_write_EMAC_RXC_ALIGN(val) bfin_write32(EMAC_RXC_ALIGN, val)
123#define bfin_read_EMAC_RXC_OCTET() bfin_read32(EMAC_RXC_OCTET)
124#define bfin_write_EMAC_RXC_OCTET(val) bfin_write32(EMAC_RXC_OCTET, val)
125#define bfin_read_EMAC_RXC_DMAOVF() bfin_read32(EMAC_RXC_DMAOVF)
126#define bfin_write_EMAC_RXC_DMAOVF(val) bfin_write32(EMAC_RXC_DMAOVF, val)
127#define bfin_read_EMAC_RXC_UNICST() bfin_read32(EMAC_RXC_UNICST)
128#define bfin_write_EMAC_RXC_UNICST(val) bfin_write32(EMAC_RXC_UNICST, val)
129#define bfin_read_EMAC_RXC_MULTI() bfin_read32(EMAC_RXC_MULTI)
130#define bfin_write_EMAC_RXC_MULTI(val) bfin_write32(EMAC_RXC_MULTI, val)
131#define bfin_read_EMAC_RXC_BROAD() bfin_read32(EMAC_RXC_BROAD)
132#define bfin_write_EMAC_RXC_BROAD(val) bfin_write32(EMAC_RXC_BROAD, val)
133#define bfin_read_EMAC_RXC_LNERRI() bfin_read32(EMAC_RXC_LNERRI)
134#define bfin_write_EMAC_RXC_LNERRI(val) bfin_write32(EMAC_RXC_LNERRI, val)
135#define bfin_read_EMAC_RXC_LNERRO() bfin_read32(EMAC_RXC_LNERRO)
136#define bfin_write_EMAC_RXC_LNERRO(val) bfin_write32(EMAC_RXC_LNERRO, val)
137#define bfin_read_EMAC_RXC_LONG() bfin_read32(EMAC_RXC_LONG)
138#define bfin_write_EMAC_RXC_LONG(val) bfin_write32(EMAC_RXC_LONG, val)
139#define bfin_read_EMAC_RXC_MACCTL() bfin_read32(EMAC_RXC_MACCTL)
140#define bfin_write_EMAC_RXC_MACCTL(val) bfin_write32(EMAC_RXC_MACCTL, val)
141#define bfin_read_EMAC_RXC_OPCODE() bfin_read32(EMAC_RXC_OPCODE)
142#define bfin_write_EMAC_RXC_OPCODE(val) bfin_write32(EMAC_RXC_OPCODE, val)
143#define bfin_read_EMAC_RXC_PAUSE() bfin_read32(EMAC_RXC_PAUSE)
144#define bfin_write_EMAC_RXC_PAUSE(val) bfin_write32(EMAC_RXC_PAUSE, val)
145#define bfin_read_EMAC_RXC_ALLFRM() bfin_read32(EMAC_RXC_ALLFRM)
146#define bfin_write_EMAC_RXC_ALLFRM(val) bfin_write32(EMAC_RXC_ALLFRM, val)
147#define bfin_read_EMAC_RXC_ALLOCT() bfin_read32(EMAC_RXC_ALLOCT)
148#define bfin_write_EMAC_RXC_ALLOCT(val) bfin_write32(EMAC_RXC_ALLOCT, val)
149#define bfin_read_EMAC_RXC_TYPED() bfin_read32(EMAC_RXC_TYPED)
150#define bfin_write_EMAC_RXC_TYPED(val) bfin_write32(EMAC_RXC_TYPED, val)
151#define bfin_read_EMAC_RXC_SHORT() bfin_read32(EMAC_RXC_SHORT)
152#define bfin_write_EMAC_RXC_SHORT(val) bfin_write32(EMAC_RXC_SHORT, val)
153#define bfin_read_EMAC_RXC_EQ64() bfin_read32(EMAC_RXC_EQ64)
154#define bfin_write_EMAC_RXC_EQ64(val) bfin_write32(EMAC_RXC_EQ64, val)
155#define bfin_read_EMAC_RXC_LT128() bfin_read32(EMAC_RXC_LT128)
156#define bfin_write_EMAC_RXC_LT128(val) bfin_write32(EMAC_RXC_LT128, val)
157#define bfin_read_EMAC_RXC_LT256() bfin_read32(EMAC_RXC_LT256)
158#define bfin_write_EMAC_RXC_LT256(val) bfin_write32(EMAC_RXC_LT256, val)
159#define bfin_read_EMAC_RXC_LT512() bfin_read32(EMAC_RXC_LT512)
160#define bfin_write_EMAC_RXC_LT512(val) bfin_write32(EMAC_RXC_LT512, val)
161#define bfin_read_EMAC_RXC_LT1024() bfin_read32(EMAC_RXC_LT1024)
162#define bfin_write_EMAC_RXC_LT1024(val) bfin_write32(EMAC_RXC_LT1024, val)
163#define bfin_read_EMAC_RXC_GE1024() bfin_read32(EMAC_RXC_GE1024)
164#define bfin_write_EMAC_RXC_GE1024(val) bfin_write32(EMAC_RXC_GE1024, val)
165
166#define bfin_read_EMAC_TXC_OK() bfin_read32(EMAC_TXC_OK)
167#define bfin_write_EMAC_TXC_OK(val) bfin_write32(EMAC_TXC_OK, val)
168#define bfin_read_EMAC_TXC_1COL() bfin_read32(EMAC_TXC_1COL)
169#define bfin_write_EMAC_TXC_1COL(val) bfin_write32(EMAC_TXC_1COL, val)
170#define bfin_read_EMAC_TXC_GT1COL() bfin_read32(EMAC_TXC_GT1COL)
171#define bfin_write_EMAC_TXC_GT1COL(val) bfin_write32(EMAC_TXC_GT1COL, val)
172#define bfin_read_EMAC_TXC_OCTET() bfin_read32(EMAC_TXC_OCTET)
173#define bfin_write_EMAC_TXC_OCTET(val) bfin_write32(EMAC_TXC_OCTET, val)
174#define bfin_read_EMAC_TXC_DEFER() bfin_read32(EMAC_TXC_DEFER)
175#define bfin_write_EMAC_TXC_DEFER(val) bfin_write32(EMAC_TXC_DEFER, val)
176#define bfin_read_EMAC_TXC_LATECL() bfin_read32(EMAC_TXC_LATECL)
177#define bfin_write_EMAC_TXC_LATECL(val) bfin_write32(EMAC_TXC_LATECL, val)
178#define bfin_read_EMAC_TXC_XS_COL() bfin_read32(EMAC_TXC_XS_COL)
179#define bfin_write_EMAC_TXC_XS_COL(val) bfin_write32(EMAC_TXC_XS_COL, val)
180#define bfin_read_EMAC_TXC_DMAUND() bfin_read32(EMAC_TXC_DMAUND)
181#define bfin_write_EMAC_TXC_DMAUND(val) bfin_write32(EMAC_TXC_DMAUND, val)
182#define bfin_read_EMAC_TXC_CRSERR() bfin_read32(EMAC_TXC_CRSERR)
183#define bfin_write_EMAC_TXC_CRSERR(val) bfin_write32(EMAC_TXC_CRSERR, val)
184#define bfin_read_EMAC_TXC_UNICST() bfin_read32(EMAC_TXC_UNICST)
185#define bfin_write_EMAC_TXC_UNICST(val) bfin_write32(EMAC_TXC_UNICST, val)
186#define bfin_read_EMAC_TXC_MULTI() bfin_read32(EMAC_TXC_MULTI)
187#define bfin_write_EMAC_TXC_MULTI(val) bfin_write32(EMAC_TXC_MULTI, val)
188#define bfin_read_EMAC_TXC_BROAD() bfin_read32(EMAC_TXC_BROAD)
189#define bfin_write_EMAC_TXC_BROAD(val) bfin_write32(EMAC_TXC_BROAD, val)
190#define bfin_read_EMAC_TXC_XS_DFR() bfin_read32(EMAC_TXC_XS_DFR)
191#define bfin_write_EMAC_TXC_XS_DFR(val) bfin_write32(EMAC_TXC_XS_DFR, val)
192#define bfin_read_EMAC_TXC_MACCTL() bfin_read32(EMAC_TXC_MACCTL)
193#define bfin_write_EMAC_TXC_MACCTL(val) bfin_write32(EMAC_TXC_MACCTL, val)
194#define bfin_read_EMAC_TXC_ALLFRM() bfin_read32(EMAC_TXC_ALLFRM)
195#define bfin_write_EMAC_TXC_ALLFRM(val) bfin_write32(EMAC_TXC_ALLFRM, val)
196#define bfin_read_EMAC_TXC_ALLOCT() bfin_read32(EMAC_TXC_ALLOCT)
197#define bfin_write_EMAC_TXC_ALLOCT(val) bfin_write32(EMAC_TXC_ALLOCT, val)
198#define bfin_read_EMAC_TXC_EQ64() bfin_read32(EMAC_TXC_EQ64)
199#define bfin_write_EMAC_TXC_EQ64(val) bfin_write32(EMAC_TXC_EQ64, val)
200#define bfin_read_EMAC_TXC_LT128() bfin_read32(EMAC_TXC_LT128)
201#define bfin_write_EMAC_TXC_LT128(val) bfin_write32(EMAC_TXC_LT128, val)
202#define bfin_read_EMAC_TXC_LT256() bfin_read32(EMAC_TXC_LT256)
203#define bfin_write_EMAC_TXC_LT256(val) bfin_write32(EMAC_TXC_LT256, val)
204#define bfin_read_EMAC_TXC_LT512() bfin_read32(EMAC_TXC_LT512)
205#define bfin_write_EMAC_TXC_LT512(val) bfin_write32(EMAC_TXC_LT512, val)
206#define bfin_read_EMAC_TXC_LT1024() bfin_read32(EMAC_TXC_LT1024)
207#define bfin_write_EMAC_TXC_LT1024(val) bfin_write32(EMAC_TXC_LT1024, val)
208#define bfin_read_EMAC_TXC_GE1024() bfin_read32(EMAC_TXC_GE1024)
209#define bfin_write_EMAC_TXC_GE1024(val) bfin_write32(EMAC_TXC_GE1024, val)
210#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT)
211#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT, val)
212
213/* USB Control Registers */
214
215#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
216#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
217#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
218#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
219#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
220#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
221#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
222#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
223#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
224#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
225#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
226#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
227#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
228#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
229#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
230#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
231#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
232#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
233#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
234#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
235#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
236#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
237#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
238#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
239#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
240#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
241
242/* USB Packet Control Registers */
243
244#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
245#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
246#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
247#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
248#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
249#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
250#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
251#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
252#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
253#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
254#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
255#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
256#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
257#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
258#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
259#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
260#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
261#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
262#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
263#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
264#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
265#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
266#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
267#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
268#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
269#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
270
271/* USB Endpoint FIFO Registers */
272
273#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
274#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
275#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
276#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
277#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
278#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
279#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
280#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
281#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
282#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
283#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
284#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
285#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
286#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
287#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
288#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
289
290/* USB OTG Control Registers */
291
292#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
293#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
294#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
295#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
296#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
297#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
298
299/* USB Phy Control Registers */
300
301#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
302#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
303#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
304#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
305#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
306#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
307#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
308#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
309#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
310#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
311
312/* (APHY_CNTRL is for ADI usage only) */
313
314#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
315#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
316
317/* (APHY_CALIB is for ADI usage only) */
318
319#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
320#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
321
322#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
323#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
324
325/* (PHY_TEST is for ADI usage only) */
326
327#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
328#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
329
330#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
331#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
332#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
333#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
334
335/* USB Endpoint 0 Control Registers */
336
337#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
338#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
339#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
340#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
341#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
342#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
343#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
344#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
345#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
346#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
347#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
348#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
349#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
350#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
351#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
352#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
353#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
354#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
355#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
356#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
357
358/* USB Endpoint 1 Control Registers */
359
360#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
361#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
362#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
363#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
364#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
365#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
366#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
367#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
368#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
369#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
370#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
371#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
372#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
373#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
374#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
375#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
376#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
377#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
378#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
379#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
380
381/* USB Endpoint 2 Control Registers */
382
383#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
384#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
385#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
386#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
387#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
388#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
389#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
390#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
391#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
392#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
393#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
394#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
395#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
396#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
397#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
398#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
399#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
400#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
401#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
402#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
403
404/* USB Endpoint 3 Control Registers */
405
406#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
407#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
408#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
409#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
410#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
411#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
412#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
413#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
414#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
415#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
416#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
417#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
418#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
419#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
420#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
421#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
422#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
423#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
424#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
425#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
426
427/* USB Endpoint 4 Control Registers */
428
429#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
430#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
431#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
432#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
433#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
434#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
435#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
436#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
437#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
438#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
439#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
440#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
441#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
442#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
443#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
444#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
445#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
446#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
447#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
448#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
449
450/* USB Endpoint 5 Control Registers */
451
452#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
453#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
454#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
455#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
456#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
457#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
458#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
459#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
460#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
461#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
462#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
463#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
464#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
465#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
466#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
467#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
468#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
469#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
470#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
471#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
472
473/* USB Endpoint 6 Control Registers */
474
475#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
476#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
477#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
478#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
479#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
480#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
481#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
482#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
483#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
484#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
485#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
486#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
487#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
488#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
489#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
490#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
491#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
492#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
493#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
494#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
495
496/* USB Endpoint 7 Control Registers */
497
498#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
499#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
500#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
501#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
502#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
503#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
504#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
505#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
506#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
507#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
508#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
509#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
510#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
511#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
512#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
513#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
514#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
515#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
516#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
517#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
518
519#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
520#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
521
522/* USB Channel 0 Config Registers */
523
524#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
525#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
526#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
527#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
528#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
529#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
530#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
531#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
532#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
533#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
534
535/* USB Channel 1 Config Registers */
536
537#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
538#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
539#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
540#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
541#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
542#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
543#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
544#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
545#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
546#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
547
548/* USB Channel 2 Config Registers */
549
550#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
551#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
552#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
553#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
554#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
555#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
556#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
557#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
558#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
559#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
560
561/* USB Channel 3 Config Registers */
562
563#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
564#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
565#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
566#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
567#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
568#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
569#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
570#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
571#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
572#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
573
574/* USB Channel 4 Config Registers */
575
576#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
577#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
578#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
579#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
580#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
581#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
582#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
583#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
584#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
585#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
586
587/* USB Channel 5 Config Registers */
588
589#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
590#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
591#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
592#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
593#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
594#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
595#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
596#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
597#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
598#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
599
600/* USB Channel 6 Config Registers */
601
602#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
603#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
604#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
605#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
606#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
607#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
608#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
609#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
610#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
611#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
612
613/* USB Channel 7 Config Registers */
614
615#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
616#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
617#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
618#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
619#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
620#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
621#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
622#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
623#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
624#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
625
626#endif /* _CDEF_BF527_H */
diff --git a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h
deleted file mode 100644
index 9dbdbec8ea1b..000000000000
--- a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h
+++ /dev/null
@@ -1,1204 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/cdefBF52x_base.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF52X_H
32#define _CDEF_BF52X_H
33
34#include <asm/system.h>
35#include <asm/blackfin.h>
36
37#include "defBF52x_base.h"
38
39/* Include core specific register pointer definitions */
40#include <asm/mach-common/cdef_LPBlackfin.h>
41
42/* ==== begin from cdefBF534.h ==== */
43
44/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
45#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
46/* Writing to PLL_CTL initiates a PLL relock sequence. */
47static __inline__ void bfin_write_PLL_CTL(unsigned int val)
48{
49 unsigned long flags, iwr0, iwr1;
50
51 if (val == bfin_read_PLL_CTL())
52 return;
53
54 local_irq_save(flags);
55 /* Enable the PLL Wakeup bit in SIC IWR */
56 iwr0 = bfin_read32(SIC_IWR0);
57 iwr1 = bfin_read32(SIC_IWR1);
58 /* Only allow PPL Wakeup) */
59 bfin_write32(SIC_IWR0, IWR_ENABLE(0));
60 bfin_write32(SIC_IWR1, 0);
61
62 bfin_write16(PLL_CTL, val);
63 SSYNC();
64 asm("IDLE;");
65
66 bfin_write32(SIC_IWR0, iwr0);
67 bfin_write32(SIC_IWR1, iwr1);
68 local_irq_restore(flags);
69}
70#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
71#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val)
72#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
73/* Writing to VR_CTL initiates a PLL relock sequence. */
74static __inline__ void bfin_write_VR_CTL(unsigned int val)
75{
76 unsigned long flags, iwr0, iwr1;
77
78 if (val == bfin_read_VR_CTL())
79 return;
80
81 local_irq_save(flags);
82 /* Enable the PLL Wakeup bit in SIC IWR */
83 iwr0 = bfin_read32(SIC_IWR0);
84 iwr1 = bfin_read32(SIC_IWR1);
85 /* Only allow PPL Wakeup) */
86 bfin_write32(SIC_IWR0, IWR_ENABLE(0));
87 bfin_write32(SIC_IWR1, 0);
88
89 bfin_write16(VR_CTL, val);
90 SSYNC();
91 asm("IDLE;");
92
93 bfin_write32(SIC_IWR0, iwr0);
94 bfin_write32(SIC_IWR1, iwr1);
95 local_irq_restore(flags);
96}
97#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
98#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val)
99#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
100#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT, val)
101#define bfin_read_CHIPID() bfin_read32(CHIPID)
102#define bfin_write_CHIPID(val) bfin_write32(CHIPID, val)
103
104
105/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
106#define bfin_read_SWRST() bfin_read16(SWRST)
107#define bfin_write_SWRST(val) bfin_write16(SWRST, val)
108#define bfin_read_SYSCR() bfin_read16(SYSCR)
109#define bfin_write_SYSCR(val) bfin_write16(SYSCR, val)
110
111#define bfin_read_SIC_RVECT() bfin_read32(SIC_RVECT)
112#define bfin_write_SIC_RVECT(val) bfin_write32(SIC_RVECT, val)
113#define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0)
114#define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0, val)
115#define bfin_read_SIC_IMASK(x) bfin_read32(SIC_IMASK0 + (x << 6))
116#define bfin_write_SIC_IMASK(x, val) bfin_write32((SIC_IMASK0 + (x << 6)), val)
117
118#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
119#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0, val)
120#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
121#define bfin_write_SIC_IAR1(val) bfin_write32(SIC_IAR1, val)
122#define bfin_read_SIC_IAR2() bfin_read32(SIC_IAR2)
123#define bfin_write_SIC_IAR2(val) bfin_write32(SIC_IAR2, val)
124#define bfin_read_SIC_IAR3() bfin_read32(SIC_IAR3)
125#define bfin_write_SIC_IAR3(val) bfin_write32(SIC_IAR3, val)
126
127#define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0)
128#define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val)
129#define bfin_read_SIC_ISR(x) bfin_read32(SIC_ISR0 + (x << 6))
130#define bfin_write_SIC_ISR(x, val) bfin_write32((SIC_ISR0 + (x << 6)), val)
131
132#define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0)
133#define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val)
134#define bfin_read_SIC_IWR(x) bfin_read32(SIC_IWR0 + (x << 6))
135#define bfin_write_SIC_IWR(x, val) bfin_write32((SIC_IWR0 + (x << 6)), val)
136
137/* SIC Additions to ADSP-BF52x (0xFFC0014C - 0xFFC00162) */
138
139#define bfin_read_SIC_IMASK1() bfin_read32(SIC_IMASK1)
140#define bfin_write_SIC_IMASK1(val) bfin_write32(SIC_IMASK1, val)
141#define bfin_read_SIC_IAR4() bfin_read32(SIC_IAR4)
142#define bfin_write_SIC_IAR4(val) bfin_write32(SIC_IAR4, val)
143#define bfin_read_SIC_IAR5() bfin_read32(SIC_IAR5)
144#define bfin_write_SIC_IAR5(val) bfin_write32(SIC_IAR5, val)
145#define bfin_read_SIC_IAR6() bfin_read32(SIC_IAR6)
146#define bfin_write_SIC_IAR6(val) bfin_write32(SIC_IAR6, val)
147#define bfin_read_SIC_IAR7() bfin_read32(SIC_IAR7)
148#define bfin_write_SIC_IAR7(val) bfin_write32(SIC_IAR7, val)
149#define bfin_read_SIC_ISR1() bfin_read32(SIC_ISR1)
150#define bfin_write_SIC_ISR1(val) bfin_write32(SIC_ISR1, val)
151#define bfin_read_SIC_IWR1() bfin_read32(SIC_IWR1)
152#define bfin_write_SIC_IWR1(val) bfin_write32(SIC_IWR1, val)
153
154/* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */
155#define bfin_read_WDOG_CTL() bfin_read16(WDOG_CTL)
156#define bfin_write_WDOG_CTL(val) bfin_write16(WDOG_CTL, val)
157#define bfin_read_WDOG_CNT() bfin_read32(WDOG_CNT)
158#define bfin_write_WDOG_CNT(val) bfin_write32(WDOG_CNT, val)
159#define bfin_read_WDOG_STAT() bfin_read32(WDOG_STAT)
160#define bfin_write_WDOG_STAT(val) bfin_write32(WDOG_STAT, val)
161
162
163/* Real Time Clock (0xFFC00300 - 0xFFC003FF) */
164#define bfin_read_RTC_STAT() bfin_read32(RTC_STAT)
165#define bfin_write_RTC_STAT(val) bfin_write32(RTC_STAT, val)
166#define bfin_read_RTC_ICTL() bfin_read16(RTC_ICTL)
167#define bfin_write_RTC_ICTL(val) bfin_write16(RTC_ICTL, val)
168#define bfin_read_RTC_ISTAT() bfin_read16(RTC_ISTAT)
169#define bfin_write_RTC_ISTAT(val) bfin_write16(RTC_ISTAT, val)
170#define bfin_read_RTC_SWCNT() bfin_read16(RTC_SWCNT)
171#define bfin_write_RTC_SWCNT(val) bfin_write16(RTC_SWCNT, val)
172#define bfin_read_RTC_ALARM() bfin_read32(RTC_ALARM)
173#define bfin_write_RTC_ALARM(val) bfin_write32(RTC_ALARM, val)
174#define bfin_read_RTC_FAST() bfin_read16(RTC_FAST)
175#define bfin_write_RTC_FAST(val) bfin_write16(RTC_FAST, val)
176#define bfin_read_RTC_PREN() bfin_read16(RTC_PREN)
177#define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN, val)
178
179
180/* UART0 Controller (0xFFC00400 - 0xFFC004FF) */
181#define bfin_read_UART0_THR() bfin_read16(UART0_THR)
182#define bfin_write_UART0_THR(val) bfin_write16(UART0_THR, val)
183#define bfin_read_UART0_RBR() bfin_read16(UART0_RBR)
184#define bfin_write_UART0_RBR(val) bfin_write16(UART0_RBR, val)
185#define bfin_read_UART0_DLL() bfin_read16(UART0_DLL)
186#define bfin_write_UART0_DLL(val) bfin_write16(UART0_DLL, val)
187#define bfin_read_UART0_IER() bfin_read16(UART0_IER)
188#define bfin_write_UART0_IER(val) bfin_write16(UART0_IER, val)
189#define bfin_read_UART0_DLH() bfin_read16(UART0_DLH)
190#define bfin_write_UART0_DLH(val) bfin_write16(UART0_DLH, val)
191#define bfin_read_UART0_IIR() bfin_read16(UART0_IIR)
192#define bfin_write_UART0_IIR(val) bfin_write16(UART0_IIR, val)
193#define bfin_read_UART0_LCR() bfin_read16(UART0_LCR)
194#define bfin_write_UART0_LCR(val) bfin_write16(UART0_LCR, val)
195#define bfin_read_UART0_MCR() bfin_read16(UART0_MCR)
196#define bfin_write_UART0_MCR(val) bfin_write16(UART0_MCR, val)
197#define bfin_read_UART0_LSR() bfin_read16(UART0_LSR)
198#define bfin_write_UART0_LSR(val) bfin_write16(UART0_LSR, val)
199#define bfin_read_UART0_MSR() bfin_read16(UART0_MSR)
200#define bfin_write_UART0_MSR(val) bfin_write16(UART0_MSR, val)
201#define bfin_read_UART0_SCR() bfin_read16(UART0_SCR)
202#define bfin_write_UART0_SCR(val) bfin_write16(UART0_SCR, val)
203#define bfin_read_UART0_GCTL() bfin_read16(UART0_GCTL)
204#define bfin_write_UART0_GCTL(val) bfin_write16(UART0_GCTL, val)
205
206
207/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
208#define bfin_read_SPI_CTL() bfin_read16(SPI_CTL)
209#define bfin_write_SPI_CTL(val) bfin_write16(SPI_CTL, val)
210#define bfin_read_SPI_FLG() bfin_read16(SPI_FLG)
211#define bfin_write_SPI_FLG(val) bfin_write16(SPI_FLG, val)
212#define bfin_read_SPI_STAT() bfin_read16(SPI_STAT)
213#define bfin_write_SPI_STAT(val) bfin_write16(SPI_STAT, val)
214#define bfin_read_SPI_TDBR() bfin_read16(SPI_TDBR)
215#define bfin_write_SPI_TDBR(val) bfin_write16(SPI_TDBR, val)
216#define bfin_read_SPI_RDBR() bfin_read16(SPI_RDBR)
217#define bfin_write_SPI_RDBR(val) bfin_write16(SPI_RDBR, val)
218#define bfin_read_SPI_BAUD() bfin_read16(SPI_BAUD)
219#define bfin_write_SPI_BAUD(val) bfin_write16(SPI_BAUD, val)
220#define bfin_read_SPI_SHADOW() bfin_read16(SPI_SHADOW)
221#define bfin_write_SPI_SHADOW(val) bfin_write16(SPI_SHADOW, val)
222
223
224/* TIMER0-7 Registers (0xFFC00600 - 0xFFC006FF) */
225#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
226#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG, val)
227#define bfin_read_TIMER0_COUNTER() bfin_read32(TIMER0_COUNTER)
228#define bfin_write_TIMER0_COUNTER(val) bfin_write32(TIMER0_COUNTER, val)
229#define bfin_read_TIMER0_PERIOD() bfin_read32(TIMER0_PERIOD)
230#define bfin_write_TIMER0_PERIOD(val) bfin_write32(TIMER0_PERIOD, val)
231#define bfin_read_TIMER0_WIDTH() bfin_read32(TIMER0_WIDTH)
232#define bfin_write_TIMER0_WIDTH(val) bfin_write32(TIMER0_WIDTH, val)
233
234#define bfin_read_TIMER1_CONFIG() bfin_read16(TIMER1_CONFIG)
235#define bfin_write_TIMER1_CONFIG(val) bfin_write16(TIMER1_CONFIG, val)
236#define bfin_read_TIMER1_COUNTER() bfin_read32(TIMER1_COUNTER)
237#define bfin_write_TIMER1_COUNTER(val) bfin_write32(TIMER1_COUNTER, val)
238#define bfin_read_TIMER1_PERIOD() bfin_read32(TIMER1_PERIOD)
239#define bfin_write_TIMER1_PERIOD(val) bfin_write32(TIMER1_PERIOD, val)
240#define bfin_read_TIMER1_WIDTH() bfin_read32(TIMER1_WIDTH)
241#define bfin_write_TIMER1_WIDTH(val) bfin_write32(TIMER1_WIDTH, val)
242
243#define bfin_read_TIMER2_CONFIG() bfin_read16(TIMER2_CONFIG)
244#define bfin_write_TIMER2_CONFIG(val) bfin_write16(TIMER2_CONFIG, val)
245#define bfin_read_TIMER2_COUNTER() bfin_read32(TIMER2_COUNTER)
246#define bfin_write_TIMER2_COUNTER(val) bfin_write32(TIMER2_COUNTER, val)
247#define bfin_read_TIMER2_PERIOD() bfin_read32(TIMER2_PERIOD)
248#define bfin_write_TIMER2_PERIOD(val) bfin_write32(TIMER2_PERIOD, val)
249#define bfin_read_TIMER2_WIDTH() bfin_read32(TIMER2_WIDTH)
250#define bfin_write_TIMER2_WIDTH(val) bfin_write32(TIMER2_WIDTH, val)
251
252#define bfin_read_TIMER3_CONFIG() bfin_read16(TIMER3_CONFIG)
253#define bfin_write_TIMER3_CONFIG(val) bfin_write16(TIMER3_CONFIG, val)
254#define bfin_read_TIMER3_COUNTER() bfin_read32(TIMER3_COUNTER)
255#define bfin_write_TIMER3_COUNTER(val) bfin_write32(TIMER3_COUNTER, val)
256#define bfin_read_TIMER3_PERIOD() bfin_read32(TIMER3_PERIOD)
257#define bfin_write_TIMER3_PERIOD(val) bfin_write32(TIMER3_PERIOD, val)
258#define bfin_read_TIMER3_WIDTH() bfin_read32(TIMER3_WIDTH)
259#define bfin_write_TIMER3_WIDTH(val) bfin_write32(TIMER3_WIDTH, val)
260
261#define bfin_read_TIMER4_CONFIG() bfin_read16(TIMER4_CONFIG)
262#define bfin_write_TIMER4_CONFIG(val) bfin_write16(TIMER4_CONFIG, val)
263#define bfin_read_TIMER4_COUNTER() bfin_read32(TIMER4_COUNTER)
264#define bfin_write_TIMER4_COUNTER(val) bfin_write32(TIMER4_COUNTER, val)
265#define bfin_read_TIMER4_PERIOD() bfin_read32(TIMER4_PERIOD)
266#define bfin_write_TIMER4_PERIOD(val) bfin_write32(TIMER4_PERIOD, val)
267#define bfin_read_TIMER4_WIDTH() bfin_read32(TIMER4_WIDTH)
268#define bfin_write_TIMER4_WIDTH(val) bfin_write32(TIMER4_WIDTH, val)
269
270#define bfin_read_TIMER5_CONFIG() bfin_read16(TIMER5_CONFIG)
271#define bfin_write_TIMER5_CONFIG(val) bfin_write16(TIMER5_CONFIG, val)
272#define bfin_read_TIMER5_COUNTER() bfin_read32(TIMER5_COUNTER)
273#define bfin_write_TIMER5_COUNTER(val) bfin_write32(TIMER5_COUNTER, val)
274#define bfin_read_TIMER5_PERIOD() bfin_read32(TIMER5_PERIOD)
275#define bfin_write_TIMER5_PERIOD(val) bfin_write32(TIMER5_PERIOD, val)
276#define bfin_read_TIMER5_WIDTH() bfin_read32(TIMER5_WIDTH)
277#define bfin_write_TIMER5_WIDTH(val) bfin_write32(TIMER5_WIDTH, val)
278
279#define bfin_read_TIMER6_CONFIG() bfin_read16(TIMER6_CONFIG)
280#define bfin_write_TIMER6_CONFIG(val) bfin_write16(TIMER6_CONFIG, val)
281#define bfin_read_TIMER6_COUNTER() bfin_read32(TIMER6_COUNTER)
282#define bfin_write_TIMER6_COUNTER(val) bfin_write32(TIMER6_COUNTER, val)
283#define bfin_read_TIMER6_PERIOD() bfin_read32(TIMER6_PERIOD)
284#define bfin_write_TIMER6_PERIOD(val) bfin_write32(TIMER6_PERIOD, val)
285#define bfin_read_TIMER6_WIDTH() bfin_read32(TIMER6_WIDTH)
286#define bfin_write_TIMER6_WIDTH(val) bfin_write32(TIMER6_WIDTH, val)
287
288#define bfin_read_TIMER7_CONFIG() bfin_read16(TIMER7_CONFIG)
289#define bfin_write_TIMER7_CONFIG(val) bfin_write16(TIMER7_CONFIG, val)
290#define bfin_read_TIMER7_COUNTER() bfin_read32(TIMER7_COUNTER)
291#define bfin_write_TIMER7_COUNTER(val) bfin_write32(TIMER7_COUNTER, val)
292#define bfin_read_TIMER7_PERIOD() bfin_read32(TIMER7_PERIOD)
293#define bfin_write_TIMER7_PERIOD(val) bfin_write32(TIMER7_PERIOD, val)
294#define bfin_read_TIMER7_WIDTH() bfin_read32(TIMER7_WIDTH)
295#define bfin_write_TIMER7_WIDTH(val) bfin_write32(TIMER7_WIDTH, val)
296
297#define bfin_read_TIMER_ENABLE() bfin_read16(TIMER_ENABLE)
298#define bfin_write_TIMER_ENABLE(val) bfin_write16(TIMER_ENABLE, val)
299#define bfin_read_TIMER_DISABLE() bfin_read16(TIMER_DISABLE)
300#define bfin_write_TIMER_DISABLE(val) bfin_write16(TIMER_DISABLE, val)
301#define bfin_read_TIMER_STATUS() bfin_read32(TIMER_STATUS)
302#define bfin_write_TIMER_STATUS(val) bfin_write32(TIMER_STATUS, val)
303
304
305/* General Purpose I/O Port F (0xFFC00700 - 0xFFC007FF) */
306#define bfin_read_PORTFIO() bfin_read16(PORTFIO)
307#define bfin_write_PORTFIO(val) bfin_write16(PORTFIO, val)
308#define bfin_read_PORTFIO_CLEAR() bfin_read16(PORTFIO_CLEAR)
309#define bfin_write_PORTFIO_CLEAR(val) bfin_write16(PORTFIO_CLEAR, val)
310#define bfin_read_PORTFIO_SET() bfin_read16(PORTFIO_SET)
311#define bfin_write_PORTFIO_SET(val) bfin_write16(PORTFIO_SET, val)
312#define bfin_read_PORTFIO_TOGGLE() bfin_read16(PORTFIO_TOGGLE)
313#define bfin_write_PORTFIO_TOGGLE(val) bfin_write16(PORTFIO_TOGGLE, val)
314#define bfin_read_PORTFIO_MASKA() bfin_read16(PORTFIO_MASKA)
315#define bfin_write_PORTFIO_MASKA(val) bfin_write16(PORTFIO_MASKA, val)
316#define bfin_read_PORTFIO_MASKA_CLEAR() bfin_read16(PORTFIO_MASKA_CLEAR)
317#define bfin_write_PORTFIO_MASKA_CLEAR(val) bfin_write16(PORTFIO_MASKA_CLEAR, val)
318#define bfin_read_PORTFIO_MASKA_SET() bfin_read16(PORTFIO_MASKA_SET)
319#define bfin_write_PORTFIO_MASKA_SET(val) bfin_write16(PORTFIO_MASKA_SET, val)
320#define bfin_read_PORTFIO_MASKA_TOGGLE() bfin_read16(PORTFIO_MASKA_TOGGLE)
321#define bfin_write_PORTFIO_MASKA_TOGGLE(val) bfin_write16(PORTFIO_MASKA_TOGGLE, val)
322#define bfin_read_PORTFIO_MASKB() bfin_read16(PORTFIO_MASKB)
323#define bfin_write_PORTFIO_MASKB(val) bfin_write16(PORTFIO_MASKB, val)
324#define bfin_read_PORTFIO_MASKB_CLEAR() bfin_read16(PORTFIO_MASKB_CLEAR)
325#define bfin_write_PORTFIO_MASKB_CLEAR(val) bfin_write16(PORTFIO_MASKB_CLEAR, val)
326#define bfin_read_PORTFIO_MASKB_SET() bfin_read16(PORTFIO_MASKB_SET)
327#define bfin_write_PORTFIO_MASKB_SET(val) bfin_write16(PORTFIO_MASKB_SET, val)
328#define bfin_read_PORTFIO_MASKB_TOGGLE() bfin_read16(PORTFIO_MASKB_TOGGLE)
329#define bfin_write_PORTFIO_MASKB_TOGGLE(val) bfin_write16(PORTFIO_MASKB_TOGGLE, val)
330#define bfin_read_PORTFIO_DIR() bfin_read16(PORTFIO_DIR)
331#define bfin_write_PORTFIO_DIR(val) bfin_write16(PORTFIO_DIR, val)
332#define bfin_read_PORTFIO_POLAR() bfin_read16(PORTFIO_POLAR)
333#define bfin_write_PORTFIO_POLAR(val) bfin_write16(PORTFIO_POLAR, val)
334#define bfin_read_PORTFIO_EDGE() bfin_read16(PORTFIO_EDGE)
335#define bfin_write_PORTFIO_EDGE(val) bfin_write16(PORTFIO_EDGE, val)
336#define bfin_read_PORTFIO_BOTH() bfin_read16(PORTFIO_BOTH)
337#define bfin_write_PORTFIO_BOTH(val) bfin_write16(PORTFIO_BOTH, val)
338#define bfin_read_PORTFIO_INEN() bfin_read16(PORTFIO_INEN)
339#define bfin_write_PORTFIO_INEN(val) bfin_write16(PORTFIO_INEN, val)
340
341
342/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
343#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
344#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1, val)
345#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
346#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2, val)
347#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
348#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV, val)
349#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
350#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV, val)
351#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
352#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
353#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
354#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
355#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX32)
356#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX32, val)
357#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX32)
358#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX32, val)
359#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX16)
360#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX16, val)
361#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX16)
362#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX16, val)
363#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
364#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
365#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
366#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2, val)
367#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
368#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV, val)
369#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
370#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV, val)
371#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
372#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT, val)
373#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
374#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL, val)
375#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
376#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1, val)
377#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
378#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2, val)
379#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
380#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0, val)
381#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
382#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1, val)
383#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
384#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2, val)
385#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
386#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3, val)
387#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
388#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0, val)
389#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
390#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1, val)
391#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
392#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2, val)
393#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
394#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3, val)
395
396
397/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
398#define bfin_read_SPORT1_TCR1() bfin_read16(SPORT1_TCR1)
399#define bfin_write_SPORT1_TCR1(val) bfin_write16(SPORT1_TCR1, val)
400#define bfin_read_SPORT1_TCR2() bfin_read16(SPORT1_TCR2)
401#define bfin_write_SPORT1_TCR2(val) bfin_write16(SPORT1_TCR2, val)
402#define bfin_read_SPORT1_TCLKDIV() bfin_read16(SPORT1_TCLKDIV)
403#define bfin_write_SPORT1_TCLKDIV(val) bfin_write16(SPORT1_TCLKDIV, val)
404#define bfin_read_SPORT1_TFSDIV() bfin_read16(SPORT1_TFSDIV)
405#define bfin_write_SPORT1_TFSDIV(val) bfin_write16(SPORT1_TFSDIV, val)
406#define bfin_read_SPORT1_TX() bfin_read32(SPORT1_TX)
407#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX, val)
408#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
409#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX, val)
410#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX32)
411#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX32, val)
412#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX32)
413#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX32, val)
414#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX16)
415#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX16, val)
416#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX16)
417#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX16, val)
418#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
419#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1, val)
420#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
421#define bfin_write_SPORT1_RCR2(val) bfin_write16(SPORT1_RCR2, val)
422#define bfin_read_SPORT1_RCLKDIV() bfin_read16(SPORT1_RCLKDIV)
423#define bfin_write_SPORT1_RCLKDIV(val) bfin_write16(SPORT1_RCLKDIV, val)
424#define bfin_read_SPORT1_RFSDIV() bfin_read16(SPORT1_RFSDIV)
425#define bfin_write_SPORT1_RFSDIV(val) bfin_write16(SPORT1_RFSDIV, val)
426#define bfin_read_SPORT1_STAT() bfin_read16(SPORT1_STAT)
427#define bfin_write_SPORT1_STAT(val) bfin_write16(SPORT1_STAT, val)
428#define bfin_read_SPORT1_CHNL() bfin_read16(SPORT1_CHNL)
429#define bfin_write_SPORT1_CHNL(val) bfin_write16(SPORT1_CHNL, val)
430#define bfin_read_SPORT1_MCMC1() bfin_read16(SPORT1_MCMC1)
431#define bfin_write_SPORT1_MCMC1(val) bfin_write16(SPORT1_MCMC1, val)
432#define bfin_read_SPORT1_MCMC2() bfin_read16(SPORT1_MCMC2)
433#define bfin_write_SPORT1_MCMC2(val) bfin_write16(SPORT1_MCMC2, val)
434#define bfin_read_SPORT1_MTCS0() bfin_read32(SPORT1_MTCS0)
435#define bfin_write_SPORT1_MTCS0(val) bfin_write32(SPORT1_MTCS0, val)
436#define bfin_read_SPORT1_MTCS1() bfin_read32(SPORT1_MTCS1)
437#define bfin_write_SPORT1_MTCS1(val) bfin_write32(SPORT1_MTCS1, val)
438#define bfin_read_SPORT1_MTCS2() bfin_read32(SPORT1_MTCS2)
439#define bfin_write_SPORT1_MTCS2(val) bfin_write32(SPORT1_MTCS2, val)
440#define bfin_read_SPORT1_MTCS3() bfin_read32(SPORT1_MTCS3)
441#define bfin_write_SPORT1_MTCS3(val) bfin_write32(SPORT1_MTCS3, val)
442#define bfin_read_SPORT1_MRCS0() bfin_read32(SPORT1_MRCS0)
443#define bfin_write_SPORT1_MRCS0(val) bfin_write32(SPORT1_MRCS0, val)
444#define bfin_read_SPORT1_MRCS1() bfin_read32(SPORT1_MRCS1)
445#define bfin_write_SPORT1_MRCS1(val) bfin_write32(SPORT1_MRCS1, val)
446#define bfin_read_SPORT1_MRCS2() bfin_read32(SPORT1_MRCS2)
447#define bfin_write_SPORT1_MRCS2(val) bfin_write32(SPORT1_MRCS2, val)
448#define bfin_read_SPORT1_MRCS3() bfin_read32(SPORT1_MRCS3)
449#define bfin_write_SPORT1_MRCS3(val) bfin_write32(SPORT1_MRCS3, val)
450
451
452/* External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
453#define bfin_read_EBIU_AMGCTL() bfin_read16(EBIU_AMGCTL)
454#define bfin_write_EBIU_AMGCTL(val) bfin_write16(EBIU_AMGCTL, val)
455#define bfin_read_EBIU_AMBCTL0() bfin_read32(EBIU_AMBCTL0)
456#define bfin_write_EBIU_AMBCTL0(val) bfin_write32(EBIU_AMBCTL0, val)
457#define bfin_read_EBIU_AMBCTL1() bfin_read32(EBIU_AMBCTL1)
458#define bfin_write_EBIU_AMBCTL1(val) bfin_write32(EBIU_AMBCTL1, val)
459#define bfin_read_EBIU_SDGCTL() bfin_read32(EBIU_SDGCTL)
460#define bfin_write_EBIU_SDGCTL(val) bfin_write32(EBIU_SDGCTL, val)
461#define bfin_read_EBIU_SDBCTL() bfin_read16(EBIU_SDBCTL)
462#define bfin_write_EBIU_SDBCTL(val) bfin_write16(EBIU_SDBCTL, val)
463#define bfin_read_EBIU_SDRRC() bfin_read16(EBIU_SDRRC)
464#define bfin_write_EBIU_SDRRC(val) bfin_write16(EBIU_SDRRC, val)
465#define bfin_read_EBIU_SDSTAT() bfin_read16(EBIU_SDSTAT)
466#define bfin_write_EBIU_SDSTAT(val) bfin_write16(EBIU_SDSTAT, val)
467
468
469/* DMA Traffic Control Registers */
470#define bfin_read_DMA_TC_PER() bfin_read16(DMA_TC_PER)
471#define bfin_write_DMA_TC_PER(val) bfin_write16(DMA_TC_PER, val)
472#define bfin_read_DMA_TC_CNT() bfin_read16(DMA_TC_CNT)
473#define bfin_write_DMA_TC_CNT(val) bfin_write16(DMA_TC_CNT, val)
474
475/* Alternate deprecated register names (below) provided for backwards code compatibility */
476#define bfin_read_DMA_TCPER() bfin_read16(DMA_TCPER)
477#define bfin_write_DMA_TCPER(val) bfin_write16(DMA_TCPER, val)
478#define bfin_read_DMA_TCCNT() bfin_read16(DMA_TCCNT)
479#define bfin_write_DMA_TCCNT(val) bfin_write16(DMA_TCCNT, val)
480
481/* DMA Controller */
482#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
483#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG, val)
484#define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR)
485#define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR, val)
486#define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR)
487#define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR, val)
488#define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT)
489#define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT, val)
490#define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT)
491#define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT, val)
492#define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY)
493#define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY, val)
494#define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY)
495#define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY, val)
496#define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR)
497#define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR, val)
498#define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR)
499#define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR, val)
500#define bfin_read_DMA0_CURR_X_COUNT() bfin_read16(DMA0_CURR_X_COUNT)
501#define bfin_write_DMA0_CURR_X_COUNT(val) bfin_write16(DMA0_CURR_X_COUNT, val)
502#define bfin_read_DMA0_CURR_Y_COUNT() bfin_read16(DMA0_CURR_Y_COUNT)
503#define bfin_write_DMA0_CURR_Y_COUNT(val) bfin_write16(DMA0_CURR_Y_COUNT, val)
504#define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS)
505#define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS, val)
506#define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP)
507#define bfin_write_DMA0_PERIPHERAL_MAP(val) bfin_write16(DMA0_PERIPHERAL_MAP, val)
508
509#define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG)
510#define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG, val)
511#define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR)
512#define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR, val)
513#define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR)
514#define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR, val)
515#define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT)
516#define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT, val)
517#define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT)
518#define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT, val)
519#define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY)
520#define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY, val)
521#define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY)
522#define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY, val)
523#define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR)
524#define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR, val)
525#define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR)
526#define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR, val)
527#define bfin_read_DMA1_CURR_X_COUNT() bfin_read16(DMA1_CURR_X_COUNT)
528#define bfin_write_DMA1_CURR_X_COUNT(val) bfin_write16(DMA1_CURR_X_COUNT, val)
529#define bfin_read_DMA1_CURR_Y_COUNT() bfin_read16(DMA1_CURR_Y_COUNT)
530#define bfin_write_DMA1_CURR_Y_COUNT(val) bfin_write16(DMA1_CURR_Y_COUNT, val)
531#define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS)
532#define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS, val)
533#define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP)
534#define bfin_write_DMA1_PERIPHERAL_MAP(val) bfin_write16(DMA1_PERIPHERAL_MAP, val)
535
536#define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG)
537#define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG, val)
538#define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR)
539#define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR, val)
540#define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR)
541#define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR, val)
542#define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT)
543#define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT, val)
544#define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT)
545#define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT, val)
546#define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY)
547#define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY, val)
548#define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY)
549#define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY, val)
550#define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR)
551#define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR, val)
552#define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR)
553#define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR, val)
554#define bfin_read_DMA2_CURR_X_COUNT() bfin_read16(DMA2_CURR_X_COUNT)
555#define bfin_write_DMA2_CURR_X_COUNT(val) bfin_write16(DMA2_CURR_X_COUNT, val)
556#define bfin_read_DMA2_CURR_Y_COUNT() bfin_read16(DMA2_CURR_Y_COUNT)
557#define bfin_write_DMA2_CURR_Y_COUNT(val) bfin_write16(DMA2_CURR_Y_COUNT, val)
558#define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS)
559#define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS, val)
560#define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP)
561#define bfin_write_DMA2_PERIPHERAL_MAP(val) bfin_write16(DMA2_PERIPHERAL_MAP, val)
562
563#define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG)
564#define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG, val)
565#define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR)
566#define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR, val)
567#define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR)
568#define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR, val)
569#define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT)
570#define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT, val)
571#define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT)
572#define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT, val)
573#define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY)
574#define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY, val)
575#define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY)
576#define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY, val)
577#define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR)
578#define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR, val)
579#define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR)
580#define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR, val)
581#define bfin_read_DMA3_CURR_X_COUNT() bfin_read16(DMA3_CURR_X_COUNT)
582#define bfin_write_DMA3_CURR_X_COUNT(val) bfin_write16(DMA3_CURR_X_COUNT, val)
583#define bfin_read_DMA3_CURR_Y_COUNT() bfin_read16(DMA3_CURR_Y_COUNT)
584#define bfin_write_DMA3_CURR_Y_COUNT(val) bfin_write16(DMA3_CURR_Y_COUNT, val)
585#define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS)
586#define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS, val)
587#define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP)
588#define bfin_write_DMA3_PERIPHERAL_MAP(val) bfin_write16(DMA3_PERIPHERAL_MAP, val)
589
590#define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG)
591#define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG, val)
592#define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR)
593#define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR, val)
594#define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR)
595#define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR, val)
596#define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT)
597#define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT, val)
598#define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT)
599#define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT, val)
600#define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY)
601#define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY, val)
602#define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY)
603#define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY, val)
604#define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR)
605#define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR, val)
606#define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR)
607#define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR, val)
608#define bfin_read_DMA4_CURR_X_COUNT() bfin_read16(DMA4_CURR_X_COUNT)
609#define bfin_write_DMA4_CURR_X_COUNT(val) bfin_write16(DMA4_CURR_X_COUNT, val)
610#define bfin_read_DMA4_CURR_Y_COUNT() bfin_read16(DMA4_CURR_Y_COUNT)
611#define bfin_write_DMA4_CURR_Y_COUNT(val) bfin_write16(DMA4_CURR_Y_COUNT, val)
612#define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS)
613#define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS, val)
614#define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP)
615#define bfin_write_DMA4_PERIPHERAL_MAP(val) bfin_write16(DMA4_PERIPHERAL_MAP, val)
616
617#define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG)
618#define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG, val)
619#define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR)
620#define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR, val)
621#define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR)
622#define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR, val)
623#define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT)
624#define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT, val)
625#define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT)
626#define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT, val)
627#define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY)
628#define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY, val)
629#define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY)
630#define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY, val)
631#define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR)
632#define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR, val)
633#define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR)
634#define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR, val)
635#define bfin_read_DMA5_CURR_X_COUNT() bfin_read16(DMA5_CURR_X_COUNT)
636#define bfin_write_DMA5_CURR_X_COUNT(val) bfin_write16(DMA5_CURR_X_COUNT, val)
637#define bfin_read_DMA5_CURR_Y_COUNT() bfin_read16(DMA5_CURR_Y_COUNT)
638#define bfin_write_DMA5_CURR_Y_COUNT(val) bfin_write16(DMA5_CURR_Y_COUNT, val)
639#define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS)
640#define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS, val)
641#define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP)
642#define bfin_write_DMA5_PERIPHERAL_MAP(val) bfin_write16(DMA5_PERIPHERAL_MAP, val)
643
644#define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG)
645#define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG, val)
646#define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR)
647#define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR, val)
648#define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR)
649#define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR, val)
650#define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT)
651#define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT, val)
652#define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT)
653#define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT, val)
654#define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY)
655#define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY, val)
656#define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY)
657#define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY, val)
658#define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR)
659#define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR, val)
660#define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR)
661#define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR, val)
662#define bfin_read_DMA6_CURR_X_COUNT() bfin_read16(DMA6_CURR_X_COUNT)
663#define bfin_write_DMA6_CURR_X_COUNT(val) bfin_write16(DMA6_CURR_X_COUNT, val)
664#define bfin_read_DMA6_CURR_Y_COUNT() bfin_read16(DMA6_CURR_Y_COUNT)
665#define bfin_write_DMA6_CURR_Y_COUNT(val) bfin_write16(DMA6_CURR_Y_COUNT, val)
666#define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS)
667#define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS, val)
668#define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP)
669#define bfin_write_DMA6_PERIPHERAL_MAP(val) bfin_write16(DMA6_PERIPHERAL_MAP, val)
670
671#define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG)
672#define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG, val)
673#define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR)
674#define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR, val)
675#define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR)
676#define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR, val)
677#define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT)
678#define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT, val)
679#define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT)
680#define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT, val)
681#define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY)
682#define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY, val)
683#define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY)
684#define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY, val)
685#define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR)
686#define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR, val)
687#define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR)
688#define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR, val)
689#define bfin_read_DMA7_CURR_X_COUNT() bfin_read16(DMA7_CURR_X_COUNT)
690#define bfin_write_DMA7_CURR_X_COUNT(val) bfin_write16(DMA7_CURR_X_COUNT, val)
691#define bfin_read_DMA7_CURR_Y_COUNT() bfin_read16(DMA7_CURR_Y_COUNT)
692#define bfin_write_DMA7_CURR_Y_COUNT(val) bfin_write16(DMA7_CURR_Y_COUNT, val)
693#define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS)
694#define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS, val)
695#define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP)
696#define bfin_write_DMA7_PERIPHERAL_MAP(val) bfin_write16(DMA7_PERIPHERAL_MAP, val)
697
698#define bfin_read_DMA8_CONFIG() bfin_read16(DMA8_CONFIG)
699#define bfin_write_DMA8_CONFIG(val) bfin_write16(DMA8_CONFIG, val)
700#define bfin_read_DMA8_NEXT_DESC_PTR() bfin_read32(DMA8_NEXT_DESC_PTR)
701#define bfin_write_DMA8_NEXT_DESC_PTR(val) bfin_write32(DMA8_NEXT_DESC_PTR, val)
702#define bfin_read_DMA8_START_ADDR() bfin_read32(DMA8_START_ADDR)
703#define bfin_write_DMA8_START_ADDR(val) bfin_write32(DMA8_START_ADDR, val)
704#define bfin_read_DMA8_X_COUNT() bfin_read16(DMA8_X_COUNT)
705#define bfin_write_DMA8_X_COUNT(val) bfin_write16(DMA8_X_COUNT, val)
706#define bfin_read_DMA8_Y_COUNT() bfin_read16(DMA8_Y_COUNT)
707#define bfin_write_DMA8_Y_COUNT(val) bfin_write16(DMA8_Y_COUNT, val)
708#define bfin_read_DMA8_X_MODIFY() bfin_read16(DMA8_X_MODIFY)
709#define bfin_write_DMA8_X_MODIFY(val) bfin_write16(DMA8_X_MODIFY, val)
710#define bfin_read_DMA8_Y_MODIFY() bfin_read16(DMA8_Y_MODIFY)
711#define bfin_write_DMA8_Y_MODIFY(val) bfin_write16(DMA8_Y_MODIFY, val)
712#define bfin_read_DMA8_CURR_DESC_PTR() bfin_read32(DMA8_CURR_DESC_PTR)
713#define bfin_write_DMA8_CURR_DESC_PTR(val) bfin_write32(DMA8_CURR_DESC_PTR, val)
714#define bfin_read_DMA8_CURR_ADDR() bfin_read32(DMA8_CURR_ADDR)
715#define bfin_write_DMA8_CURR_ADDR(val) bfin_write32(DMA8_CURR_ADDR, val)
716#define bfin_read_DMA8_CURR_X_COUNT() bfin_read16(DMA8_CURR_X_COUNT)
717#define bfin_write_DMA8_CURR_X_COUNT(val) bfin_write16(DMA8_CURR_X_COUNT, val)
718#define bfin_read_DMA8_CURR_Y_COUNT() bfin_read16(DMA8_CURR_Y_COUNT)
719#define bfin_write_DMA8_CURR_Y_COUNT(val) bfin_write16(DMA8_CURR_Y_COUNT, val)
720#define bfin_read_DMA8_IRQ_STATUS() bfin_read16(DMA8_IRQ_STATUS)
721#define bfin_write_DMA8_IRQ_STATUS(val) bfin_write16(DMA8_IRQ_STATUS, val)
722#define bfin_read_DMA8_PERIPHERAL_MAP() bfin_read16(DMA8_PERIPHERAL_MAP)
723#define bfin_write_DMA8_PERIPHERAL_MAP(val) bfin_write16(DMA8_PERIPHERAL_MAP, val)
724
725#define bfin_read_DMA9_CONFIG() bfin_read16(DMA9_CONFIG)
726#define bfin_write_DMA9_CONFIG(val) bfin_write16(DMA9_CONFIG, val)
727#define bfin_read_DMA9_NEXT_DESC_PTR() bfin_read32(DMA9_NEXT_DESC_PTR)
728#define bfin_write_DMA9_NEXT_DESC_PTR(val) bfin_write32(DMA9_NEXT_DESC_PTR, val)
729#define bfin_read_DMA9_START_ADDR() bfin_read32(DMA9_START_ADDR)
730#define bfin_write_DMA9_START_ADDR(val) bfin_write32(DMA9_START_ADDR, val)
731#define bfin_read_DMA9_X_COUNT() bfin_read16(DMA9_X_COUNT)
732#define bfin_write_DMA9_X_COUNT(val) bfin_write16(DMA9_X_COUNT, val)
733#define bfin_read_DMA9_Y_COUNT() bfin_read16(DMA9_Y_COUNT)
734#define bfin_write_DMA9_Y_COUNT(val) bfin_write16(DMA9_Y_COUNT, val)
735#define bfin_read_DMA9_X_MODIFY() bfin_read16(DMA9_X_MODIFY)
736#define bfin_write_DMA9_X_MODIFY(val) bfin_write16(DMA9_X_MODIFY, val)
737#define bfin_read_DMA9_Y_MODIFY() bfin_read16(DMA9_Y_MODIFY)
738#define bfin_write_DMA9_Y_MODIFY(val) bfin_write16(DMA9_Y_MODIFY, val)
739#define bfin_read_DMA9_CURR_DESC_PTR() bfin_read32(DMA9_CURR_DESC_PTR)
740#define bfin_write_DMA9_CURR_DESC_PTR(val) bfin_write32(DMA9_CURR_DESC_PTR, val)
741#define bfin_read_DMA9_CURR_ADDR() bfin_read32(DMA9_CURR_ADDR)
742#define bfin_write_DMA9_CURR_ADDR(val) bfin_write32(DMA9_CURR_ADDR, val)
743#define bfin_read_DMA9_CURR_X_COUNT() bfin_read16(DMA9_CURR_X_COUNT)
744#define bfin_write_DMA9_CURR_X_COUNT(val) bfin_write16(DMA9_CURR_X_COUNT, val)
745#define bfin_read_DMA9_CURR_Y_COUNT() bfin_read16(DMA9_CURR_Y_COUNT)
746#define bfin_write_DMA9_CURR_Y_COUNT(val) bfin_write16(DMA9_CURR_Y_COUNT, val)
747#define bfin_read_DMA9_IRQ_STATUS() bfin_read16(DMA9_IRQ_STATUS)
748#define bfin_write_DMA9_IRQ_STATUS(val) bfin_write16(DMA9_IRQ_STATUS, val)
749#define bfin_read_DMA9_PERIPHERAL_MAP() bfin_read16(DMA9_PERIPHERAL_MAP)
750#define bfin_write_DMA9_PERIPHERAL_MAP(val) bfin_write16(DMA9_PERIPHERAL_MAP, val)
751
752#define bfin_read_DMA10_CONFIG() bfin_read16(DMA10_CONFIG)
753#define bfin_write_DMA10_CONFIG(val) bfin_write16(DMA10_CONFIG, val)
754#define bfin_read_DMA10_NEXT_DESC_PTR() bfin_read32(DMA10_NEXT_DESC_PTR)
755#define bfin_write_DMA10_NEXT_DESC_PTR(val) bfin_write32(DMA10_NEXT_DESC_PTR, val)
756#define bfin_read_DMA10_START_ADDR() bfin_read32(DMA10_START_ADDR)
757#define bfin_write_DMA10_START_ADDR(val) bfin_write32(DMA10_START_ADDR, val)
758#define bfin_read_DMA10_X_COUNT() bfin_read16(DMA10_X_COUNT)
759#define bfin_write_DMA10_X_COUNT(val) bfin_write16(DMA10_X_COUNT, val)
760#define bfin_read_DMA10_Y_COUNT() bfin_read16(DMA10_Y_COUNT)
761#define bfin_write_DMA10_Y_COUNT(val) bfin_write16(DMA10_Y_COUNT, val)
762#define bfin_read_DMA10_X_MODIFY() bfin_read16(DMA10_X_MODIFY)
763#define bfin_write_DMA10_X_MODIFY(val) bfin_write16(DMA10_X_MODIFY, val)
764#define bfin_read_DMA10_Y_MODIFY() bfin_read16(DMA10_Y_MODIFY)
765#define bfin_write_DMA10_Y_MODIFY(val) bfin_write16(DMA10_Y_MODIFY, val)
766#define bfin_read_DMA10_CURR_DESC_PTR() bfin_read32(DMA10_CURR_DESC_PTR)
767#define bfin_write_DMA10_CURR_DESC_PTR(val) bfin_write32(DMA10_CURR_DESC_PTR, val)
768#define bfin_read_DMA10_CURR_ADDR() bfin_read32(DMA10_CURR_ADDR)
769#define bfin_write_DMA10_CURR_ADDR(val) bfin_write32(DMA10_CURR_ADDR, val)
770#define bfin_read_DMA10_CURR_X_COUNT() bfin_read16(DMA10_CURR_X_COUNT)
771#define bfin_write_DMA10_CURR_X_COUNT(val) bfin_write16(DMA10_CURR_X_COUNT, val)
772#define bfin_read_DMA10_CURR_Y_COUNT() bfin_read16(DMA10_CURR_Y_COUNT)
773#define bfin_write_DMA10_CURR_Y_COUNT(val) bfin_write16(DMA10_CURR_Y_COUNT, val)
774#define bfin_read_DMA10_IRQ_STATUS() bfin_read16(DMA10_IRQ_STATUS)
775#define bfin_write_DMA10_IRQ_STATUS(val) bfin_write16(DMA10_IRQ_STATUS, val)
776#define bfin_read_DMA10_PERIPHERAL_MAP() bfin_read16(DMA10_PERIPHERAL_MAP)
777#define bfin_write_DMA10_PERIPHERAL_MAP(val) bfin_write16(DMA10_PERIPHERAL_MAP, val)
778
779#define bfin_read_DMA11_CONFIG() bfin_read16(DMA11_CONFIG)
780#define bfin_write_DMA11_CONFIG(val) bfin_write16(DMA11_CONFIG, val)
781#define bfin_read_DMA11_NEXT_DESC_PTR() bfin_read32(DMA11_NEXT_DESC_PTR)
782#define bfin_write_DMA11_NEXT_DESC_PTR(val) bfin_write32(DMA11_NEXT_DESC_PTR, val)
783#define bfin_read_DMA11_START_ADDR() bfin_read32(DMA11_START_ADDR)
784#define bfin_write_DMA11_START_ADDR(val) bfin_write32(DMA11_START_ADDR, val)
785#define bfin_read_DMA11_X_COUNT() bfin_read16(DMA11_X_COUNT)
786#define bfin_write_DMA11_X_COUNT(val) bfin_write16(DMA11_X_COUNT, val)
787#define bfin_read_DMA11_Y_COUNT() bfin_read16(DMA11_Y_COUNT)
788#define bfin_write_DMA11_Y_COUNT(val) bfin_write16(DMA11_Y_COUNT, val)
789#define bfin_read_DMA11_X_MODIFY() bfin_read16(DMA11_X_MODIFY)
790#define bfin_write_DMA11_X_MODIFY(val) bfin_write16(DMA11_X_MODIFY, val)
791#define bfin_read_DMA11_Y_MODIFY() bfin_read16(DMA11_Y_MODIFY)
792#define bfin_write_DMA11_Y_MODIFY(val) bfin_write16(DMA11_Y_MODIFY, val)
793#define bfin_read_DMA11_CURR_DESC_PTR() bfin_read32(DMA11_CURR_DESC_PTR)
794#define bfin_write_DMA11_CURR_DESC_PTR(val) bfin_write32(DMA11_CURR_DESC_PTR, val)
795#define bfin_read_DMA11_CURR_ADDR() bfin_read32(DMA11_CURR_ADDR)
796#define bfin_write_DMA11_CURR_ADDR(val) bfin_write32(DMA11_CURR_ADDR, val)
797#define bfin_read_DMA11_CURR_X_COUNT() bfin_read16(DMA11_CURR_X_COUNT)
798#define bfin_write_DMA11_CURR_X_COUNT(val) bfin_write16(DMA11_CURR_X_COUNT, val)
799#define bfin_read_DMA11_CURR_Y_COUNT() bfin_read16(DMA11_CURR_Y_COUNT)
800#define bfin_write_DMA11_CURR_Y_COUNT(val) bfin_write16(DMA11_CURR_Y_COUNT, val)
801#define bfin_read_DMA11_IRQ_STATUS() bfin_read16(DMA11_IRQ_STATUS)
802#define bfin_write_DMA11_IRQ_STATUS(val) bfin_write16(DMA11_IRQ_STATUS, val)
803#define bfin_read_DMA11_PERIPHERAL_MAP() bfin_read16(DMA11_PERIPHERAL_MAP)
804#define bfin_write_DMA11_PERIPHERAL_MAP(val) bfin_write16(DMA11_PERIPHERAL_MAP, val)
805
806#define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG)
807#define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG, val)
808#define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR)
809#define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR, val)
810#define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR)
811#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR, val)
812#define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT)
813#define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT, val)
814#define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT)
815#define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT, val)
816#define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY)
817#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY, val)
818#define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY)
819#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY, val)
820#define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR)
821#define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR, val)
822#define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR)
823#define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR, val)
824#define bfin_read_MDMA_D0_CURR_X_COUNT() bfin_read16(MDMA_D0_CURR_X_COUNT)
825#define bfin_write_MDMA_D0_CURR_X_COUNT(val) bfin_write16(MDMA_D0_CURR_X_COUNT, val)
826#define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT)
827#define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT, val)
828#define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS)
829#define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS, val)
830#define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP)
831#define bfin_write_MDMA_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA_D0_PERIPHERAL_MAP, val)
832
833#define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG)
834#define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG, val)
835#define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR)
836#define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR, val)
837#define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR)
838#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR, val)
839#define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT)
840#define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT, val)
841#define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT)
842#define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT, val)
843#define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY)
844#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY, val)
845#define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY)
846#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY, val)
847#define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR)
848#define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR, val)
849#define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR)
850#define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR, val)
851#define bfin_read_MDMA_S0_CURR_X_COUNT() bfin_read16(MDMA_S0_CURR_X_COUNT)
852#define bfin_write_MDMA_S0_CURR_X_COUNT(val) bfin_write16(MDMA_S0_CURR_X_COUNT, val)
853#define bfin_read_MDMA_S0_CURR_Y_COUNT() bfin_read16(MDMA_S0_CURR_Y_COUNT)
854#define bfin_write_MDMA_S0_CURR_Y_COUNT(val) bfin_write16(MDMA_S0_CURR_Y_COUNT, val)
855#define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS)
856#define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS, val)
857#define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP)
858#define bfin_write_MDMA_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA_S0_PERIPHERAL_MAP, val)
859
860#define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG)
861#define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG, val)
862#define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR)
863#define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR, val)
864#define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR)
865#define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR, val)
866#define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT)
867#define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT, val)
868#define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT)
869#define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT, val)
870#define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY)
871#define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY, val)
872#define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY)
873#define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY, val)
874#define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR)
875#define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR, val)
876#define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR)
877#define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR, val)
878#define bfin_read_MDMA_D1_CURR_X_COUNT() bfin_read16(MDMA_D1_CURR_X_COUNT)
879#define bfin_write_MDMA_D1_CURR_X_COUNT(val) bfin_write16(MDMA_D1_CURR_X_COUNT, val)
880#define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT)
881#define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT, val)
882#define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS)
883#define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS, val)
884#define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP)
885#define bfin_write_MDMA_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA_D1_PERIPHERAL_MAP, val)
886
887#define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG)
888#define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG, val)
889#define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR)
890#define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR, val)
891#define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR)
892#define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR, val)
893#define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT)
894#define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT, val)
895#define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT)
896#define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT, val)
897#define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY)
898#define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY, val)
899#define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY)
900#define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY, val)
901#define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR)
902#define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR, val)
903#define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR)
904#define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR, val)
905#define bfin_read_MDMA_S1_CURR_X_COUNT() bfin_read16(MDMA_S1_CURR_X_COUNT)
906#define bfin_write_MDMA_S1_CURR_X_COUNT(val) bfin_write16(MDMA_S1_CURR_X_COUNT, val)
907#define bfin_read_MDMA_S1_CURR_Y_COUNT() bfin_read16(MDMA_S1_CURR_Y_COUNT)
908#define bfin_write_MDMA_S1_CURR_Y_COUNT(val) bfin_write16(MDMA_S1_CURR_Y_COUNT, val)
909#define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS)
910#define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS, val)
911#define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP)
912#define bfin_write_MDMA_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA_S1_PERIPHERAL_MAP, val)
913
914
915/* Parallel Peripheral Interface (0xFFC01000 - 0xFFC010FF) */
916#define bfin_read_PPI_CONTROL() bfin_read16(PPI_CONTROL)
917#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val)
918#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
919#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val)
920#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
921#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val)
922#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
923#define bfin_write_PPI_COUNT(val) bfin_write16(PPI_COUNT, val)
924#define bfin_read_PPI_FRAME() bfin_read16(PPI_FRAME)
925#define bfin_write_PPI_FRAME(val) bfin_write16(PPI_FRAME, val)
926
927
928/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
929
930/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */
931#define bfin_read_PORTGIO() bfin_read16(PORTGIO)
932#define bfin_write_PORTGIO(val) bfin_write16(PORTGIO, val)
933#define bfin_read_PORTGIO_CLEAR() bfin_read16(PORTGIO_CLEAR)
934#define bfin_write_PORTGIO_CLEAR(val) bfin_write16(PORTGIO_CLEAR, val)
935#define bfin_read_PORTGIO_SET() bfin_read16(PORTGIO_SET)
936#define bfin_write_PORTGIO_SET(val) bfin_write16(PORTGIO_SET, val)
937#define bfin_read_PORTGIO_TOGGLE() bfin_read16(PORTGIO_TOGGLE)
938#define bfin_write_PORTGIO_TOGGLE(val) bfin_write16(PORTGIO_TOGGLE, val)
939#define bfin_read_PORTGIO_MASKA() bfin_read16(PORTGIO_MASKA)
940#define bfin_write_PORTGIO_MASKA(val) bfin_write16(PORTGIO_MASKA, val)
941#define bfin_read_PORTGIO_MASKA_CLEAR() bfin_read16(PORTGIO_MASKA_CLEAR)
942#define bfin_write_PORTGIO_MASKA_CLEAR(val) bfin_write16(PORTGIO_MASKA_CLEAR, val)
943#define bfin_read_PORTGIO_MASKA_SET() bfin_read16(PORTGIO_MASKA_SET)
944#define bfin_write_PORTGIO_MASKA_SET(val) bfin_write16(PORTGIO_MASKA_SET, val)
945#define bfin_read_PORTGIO_MASKA_TOGGLE() bfin_read16(PORTGIO_MASKA_TOGGLE)
946#define bfin_write_PORTGIO_MASKA_TOGGLE(val) bfin_write16(PORTGIO_MASKA_TOGGLE, val)
947#define bfin_read_PORTGIO_MASKB() bfin_read16(PORTGIO_MASKB)
948#define bfin_write_PORTGIO_MASKB(val) bfin_write16(PORTGIO_MASKB, val)
949#define bfin_read_PORTGIO_MASKB_CLEAR() bfin_read16(PORTGIO_MASKB_CLEAR)
950#define bfin_write_PORTGIO_MASKB_CLEAR(val) bfin_write16(PORTGIO_MASKB_CLEAR, val)
951#define bfin_read_PORTGIO_MASKB_SET() bfin_read16(PORTGIO_MASKB_SET)
952#define bfin_write_PORTGIO_MASKB_SET(val) bfin_write16(PORTGIO_MASKB_SET, val)
953#define bfin_read_PORTGIO_MASKB_TOGGLE() bfin_read16(PORTGIO_MASKB_TOGGLE)
954#define bfin_write_PORTGIO_MASKB_TOGGLE(val) bfin_write16(PORTGIO_MASKB_TOGGLE, val)
955#define bfin_read_PORTGIO_DIR() bfin_read16(PORTGIO_DIR)
956#define bfin_write_PORTGIO_DIR(val) bfin_write16(PORTGIO_DIR, val)
957#define bfin_read_PORTGIO_POLAR() bfin_read16(PORTGIO_POLAR)
958#define bfin_write_PORTGIO_POLAR(val) bfin_write16(PORTGIO_POLAR, val)
959#define bfin_read_PORTGIO_EDGE() bfin_read16(PORTGIO_EDGE)
960#define bfin_write_PORTGIO_EDGE(val) bfin_write16(PORTGIO_EDGE, val)
961#define bfin_read_PORTGIO_BOTH() bfin_read16(PORTGIO_BOTH)
962#define bfin_write_PORTGIO_BOTH(val) bfin_write16(PORTGIO_BOTH, val)
963#define bfin_read_PORTGIO_INEN() bfin_read16(PORTGIO_INEN)
964#define bfin_write_PORTGIO_INEN(val) bfin_write16(PORTGIO_INEN, val)
965
966
967/* General Purpose I/O Port H (0xFFC01700 - 0xFFC017FF) */
968#define bfin_read_PORTHIO() bfin_read16(PORTHIO)
969#define bfin_write_PORTHIO(val) bfin_write16(PORTHIO, val)
970#define bfin_read_PORTHIO_CLEAR() bfin_read16(PORTHIO_CLEAR)
971#define bfin_write_PORTHIO_CLEAR(val) bfin_write16(PORTHIO_CLEAR, val)
972#define bfin_read_PORTHIO_SET() bfin_read16(PORTHIO_SET)
973#define bfin_write_PORTHIO_SET(val) bfin_write16(PORTHIO_SET, val)
974#define bfin_read_PORTHIO_TOGGLE() bfin_read16(PORTHIO_TOGGLE)
975#define bfin_write_PORTHIO_TOGGLE(val) bfin_write16(PORTHIO_TOGGLE, val)
976#define bfin_read_PORTHIO_MASKA() bfin_read16(PORTHIO_MASKA)
977#define bfin_write_PORTHIO_MASKA(val) bfin_write16(PORTHIO_MASKA, val)
978#define bfin_read_PORTHIO_MASKA_CLEAR() bfin_read16(PORTHIO_MASKA_CLEAR)
979#define bfin_write_PORTHIO_MASKA_CLEAR(val) bfin_write16(PORTHIO_MASKA_CLEAR, val)
980#define bfin_read_PORTHIO_MASKA_SET() bfin_read16(PORTHIO_MASKA_SET)
981#define bfin_write_PORTHIO_MASKA_SET(val) bfin_write16(PORTHIO_MASKA_SET, val)
982#define bfin_read_PORTHIO_MASKA_TOGGLE() bfin_read16(PORTHIO_MASKA_TOGGLE)
983#define bfin_write_PORTHIO_MASKA_TOGGLE(val) bfin_write16(PORTHIO_MASKA_TOGGLE, val)
984#define bfin_read_PORTHIO_MASKB() bfin_read16(PORTHIO_MASKB)
985#define bfin_write_PORTHIO_MASKB(val) bfin_write16(PORTHIO_MASKB, val)
986#define bfin_read_PORTHIO_MASKB_CLEAR() bfin_read16(PORTHIO_MASKB_CLEAR)
987#define bfin_write_PORTHIO_MASKB_CLEAR(val) bfin_write16(PORTHIO_MASKB_CLEAR, val)
988#define bfin_read_PORTHIO_MASKB_SET() bfin_read16(PORTHIO_MASKB_SET)
989#define bfin_write_PORTHIO_MASKB_SET(val) bfin_write16(PORTHIO_MASKB_SET, val)
990#define bfin_read_PORTHIO_MASKB_TOGGLE() bfin_read16(PORTHIO_MASKB_TOGGLE)
991#define bfin_write_PORTHIO_MASKB_TOGGLE(val) bfin_write16(PORTHIO_MASKB_TOGGLE, val)
992#define bfin_read_PORTHIO_DIR() bfin_read16(PORTHIO_DIR)
993#define bfin_write_PORTHIO_DIR(val) bfin_write16(PORTHIO_DIR, val)
994#define bfin_read_PORTHIO_POLAR() bfin_read16(PORTHIO_POLAR)
995#define bfin_write_PORTHIO_POLAR(val) bfin_write16(PORTHIO_POLAR, val)
996#define bfin_read_PORTHIO_EDGE() bfin_read16(PORTHIO_EDGE)
997#define bfin_write_PORTHIO_EDGE(val) bfin_write16(PORTHIO_EDGE, val)
998#define bfin_read_PORTHIO_BOTH() bfin_read16(PORTHIO_BOTH)
999#define bfin_write_PORTHIO_BOTH(val) bfin_write16(PORTHIO_BOTH, val)
1000#define bfin_read_PORTHIO_INEN() bfin_read16(PORTHIO_INEN)
1001#define bfin_write_PORTHIO_INEN(val) bfin_write16(PORTHIO_INEN, val)
1002
1003
1004/* UART1 Controller (0xFFC02000 - 0xFFC020FF) */
1005#define bfin_read_UART1_THR() bfin_read16(UART1_THR)
1006#define bfin_write_UART1_THR(val) bfin_write16(UART1_THR, val)
1007#define bfin_read_UART1_RBR() bfin_read16(UART1_RBR)
1008#define bfin_write_UART1_RBR(val) bfin_write16(UART1_RBR, val)
1009#define bfin_read_UART1_DLL() bfin_read16(UART1_DLL)
1010#define bfin_write_UART1_DLL(val) bfin_write16(UART1_DLL, val)
1011#define bfin_read_UART1_IER() bfin_read16(UART1_IER)
1012#define bfin_write_UART1_IER(val) bfin_write16(UART1_IER, val)
1013#define bfin_read_UART1_DLH() bfin_read16(UART1_DLH)
1014#define bfin_write_UART1_DLH(val) bfin_write16(UART1_DLH, val)
1015#define bfin_read_UART1_IIR() bfin_read16(UART1_IIR)
1016#define bfin_write_UART1_IIR(val) bfin_write16(UART1_IIR, val)
1017#define bfin_read_UART1_LCR() bfin_read16(UART1_LCR)
1018#define bfin_write_UART1_LCR(val) bfin_write16(UART1_LCR, val)
1019#define bfin_read_UART1_MCR() bfin_read16(UART1_MCR)
1020#define bfin_write_UART1_MCR(val) bfin_write16(UART1_MCR, val)
1021#define bfin_read_UART1_LSR() bfin_read16(UART1_LSR)
1022#define bfin_write_UART1_LSR(val) bfin_write16(UART1_LSR, val)
1023#define bfin_read_UART1_MSR() bfin_read16(UART1_MSR)
1024#define bfin_write_UART1_MSR(val) bfin_write16(UART1_MSR, val)
1025#define bfin_read_UART1_SCR() bfin_read16(UART1_SCR)
1026#define bfin_write_UART1_SCR(val) bfin_write16(UART1_SCR, val)
1027#define bfin_read_UART1_GCTL() bfin_read16(UART1_GCTL)
1028#define bfin_write_UART1_GCTL(val) bfin_write16(UART1_GCTL, val)
1029
1030/* Omit CAN register sets from the cdefBF534.h (CAN is not in the ADSP-BF52x processor) */
1031
1032/* Pin Control Registers (0xFFC03200 - 0xFFC032FF) */
1033#define bfin_read_PORTF_FER() bfin_read16(PORTF_FER)
1034#define bfin_write_PORTF_FER(val) bfin_write16(PORTF_FER, val)
1035#define bfin_read_PORTG_FER() bfin_read16(PORTG_FER)
1036#define bfin_write_PORTG_FER(val) bfin_write16(PORTG_FER, val)
1037#define bfin_read_PORTH_FER() bfin_read16(PORTH_FER)
1038#define bfin_write_PORTH_FER(val) bfin_write16(PORTH_FER, val)
1039#define bfin_read_PORT_MUX() bfin_read16(PORT_MUX)
1040#define bfin_write_PORT_MUX(val) bfin_write16(PORT_MUX, val)
1041
1042
1043/* Handshake MDMA Registers (0xFFC03300 - 0xFFC033FF) */
1044#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
1045#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
1046#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
1047#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
1048#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
1049#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
1050#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
1051#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
1052#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
1053#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
1054#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
1055#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
1056#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
1057#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
1058
1059#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
1060#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
1061#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
1062#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
1063#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
1064#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
1065#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
1066#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
1067#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
1068#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
1069#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
1070#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
1071#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
1072#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
1073
1074/* ==== end from cdefBF534.h ==== */
1075
1076/* GPIO PIN mux (0xFFC03210 - OxFFC03288) */
1077
1078#define bfin_read_PORTF_MUX() bfin_read16(PORTF_MUX)
1079#define bfin_write_PORTF_MUX(val) bfin_write16(PORTF_MUX, val)
1080#define bfin_read_PORTG_MUX() bfin_read16(PORTG_MUX)
1081#define bfin_write_PORTG_MUX(val) bfin_write16(PORTG_MUX, val)
1082#define bfin_read_PORTH_MUX() bfin_read16(PORTH_MUX)
1083#define bfin_write_PORTH_MUX(val) bfin_write16(PORTH_MUX, val)
1084
1085#define bfin_read_PORTF_DRIVE() bfin_read16(PORTF_DRIVE)
1086#define bfin_write_PORTF_DRIVE(val) bfin_write16(PORTF_DRIVE, val)
1087#define bfin_read_PORTG_DRIVE() bfin_read16(PORTG_DRIVE)
1088#define bfin_write_PORTG_DRIVE(val) bfin_write16(PORTG_DRIVE, val)
1089#define bfin_read_PORTH_DRIVE() bfin_read16(PORTH_DRIVE)
1090#define bfin_write_PORTH_DRIVE(val) bfin_write16(PORTH_DRIVE, val)
1091#define bfin_read_PORTF_SLEW() bfin_read16(PORTF_SLEW)
1092#define bfin_write_PORTF_SLEW(val) bfin_write16(PORTF_SLEW, val)
1093#define bfin_read_PORTG_SLEW() bfin_read16(PORTG_SLEW)
1094#define bfin_write_PORTG_SLEW(val) bfin_write16(PORTG_SLEW, val)
1095#define bfin_read_PORTH_SLEW() bfin_read16(PORTH_SLEW)
1096#define bfin_write_PORTH_SLEW(val) bfin_write16(PORTH_SLEW, val)
1097#define bfin_read_PORTF_HYSTERISIS() bfin_read16(PORTF_HYSTERISIS)
1098#define bfin_write_PORTF_HYSTERISIS(val) bfin_write16(PORTF_HYSTERISIS, val)
1099#define bfin_read_PORTG_HYSTERISIS() bfin_read16(PORTG_HYSTERISIS)
1100#define bfin_write_PORTG_HYSTERISIS(val) bfin_write16(PORTG_HYSTERISIS, val)
1101#define bfin_read_PORTH_HYSTERISIS() bfin_read16(PORTH_HYSTERISIS)
1102#define bfin_write_PORTH_HYSTERISIS(val) bfin_write16(PORTH_HYSTERISIS, val)
1103#define bfin_read_MISCPORT_DRIVE() bfin_read16(MISCPORT_DRIVE)
1104#define bfin_write_MISCPORT_DRIVE(val) bfin_write16(MISCPORT_DRIVE, val)
1105#define bfin_read_MISCPORT_SLEW() bfin_read16(MISCPORT_SLEW)
1106#define bfin_write_MISCPORT_SLEW(val) bfin_write16(MISCPORT_SLEW, val)
1107#define bfin_read_MISCPORT_HYSTERISIS() bfin_read16(MISCPORT_HYSTERISIS)
1108#define bfin_write_MISCPORT_HYSTERISIS(val) bfin_write16(MISCPORT_HYSTERISIS, val)
1109
1110/* HOST Port Registers */
1111
1112#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
1113#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
1114#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
1115#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
1116#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
1117#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
1118
1119/* Counter Registers */
1120
1121#define bfin_read_CNT_CONFIG() bfin_read16(CNT_CONFIG)
1122#define bfin_write_CNT_CONFIG(val) bfin_write16(CNT_CONFIG, val)
1123#define bfin_read_CNT_IMASK() bfin_read16(CNT_IMASK)
1124#define bfin_write_CNT_IMASK(val) bfin_write16(CNT_IMASK, val)
1125#define bfin_read_CNT_STATUS() bfin_read16(CNT_STATUS)
1126#define bfin_write_CNT_STATUS(val) bfin_write16(CNT_STATUS, val)
1127#define bfin_read_CNT_COMMAND() bfin_read16(CNT_COMMAND)
1128#define bfin_write_CNT_COMMAND(val) bfin_write16(CNT_COMMAND, val)
1129#define bfin_read_CNT_DEBOUNCE() bfin_read16(CNT_DEBOUNCE)
1130#define bfin_write_CNT_DEBOUNCE(val) bfin_write16(CNT_DEBOUNCE, val)
1131#define bfin_read_CNT_COUNTER() bfin_read32(CNT_COUNTER)
1132#define bfin_write_CNT_COUNTER(val) bfin_write32(CNT_COUNTER, val)
1133#define bfin_read_CNT_MAX() bfin_read32(CNT_MAX)
1134#define bfin_write_CNT_MAX(val) bfin_write32(CNT_MAX, val)
1135#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN)
1136#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val)
1137
1138/* OTP/FUSE Registers */
1139
1140#define bfin_read_OTP_CONTROL() bfin_read16(OTP_CONTROL)
1141#define bfin_write_OTP_CONTROL(val) bfin_write16(OTP_CONTROL, val)
1142#define bfin_read_OTP_BEN() bfin_read16(OTP_BEN)
1143#define bfin_write_OTP_BEN(val) bfin_write16(OTP_BEN, val)
1144#define bfin_read_OTP_STATUS() bfin_read16(OTP_STATUS)
1145#define bfin_write_OTP_STATUS(val) bfin_write16(OTP_STATUS, val)
1146#define bfin_read_OTP_TIMING() bfin_read32(OTP_TIMING)
1147#define bfin_write_OTP_TIMING(val) bfin_write32(OTP_TIMING, val)
1148
1149/* Security Registers */
1150
1151#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT)
1152#define bfin_write_SECURE_SYSSWT(val) bfin_write32(SECURE_SYSSWT, val)
1153#define bfin_read_SECURE_CONTROL() bfin_read16(SECURE_CONTROL)
1154#define bfin_write_SECURE_CONTROL(val) bfin_write16(SECURE_CONTROL, val)
1155#define bfin_read_SECURE_STATUS() bfin_read16(SECURE_STATUS)
1156#define bfin_write_SECURE_STATUS(val) bfin_write16(SECURE_STATUS, val)
1157
1158/* OTP Read/Write Data Buffer Registers */
1159
1160#define bfin_read_OTP_DATA0() bfin_read32(OTP_DATA0)
1161#define bfin_write_OTP_DATA0(val) bfin_write32(OTP_DATA0, val)
1162#define bfin_read_OTP_DATA1() bfin_read32(OTP_DATA1)
1163#define bfin_write_OTP_DATA1(val) bfin_write32(OTP_DATA1, val)
1164#define bfin_read_OTP_DATA2() bfin_read32(OTP_DATA2)
1165#define bfin_write_OTP_DATA2(val) bfin_write32(OTP_DATA2, val)
1166#define bfin_read_OTP_DATA3() bfin_read32(OTP_DATA3)
1167#define bfin_write_OTP_DATA3(val) bfin_write32(OTP_DATA3, val)
1168
1169/* NFC Registers */
1170
1171#define bfin_read_NFC_CTL() bfin_read16(NFC_CTL)
1172#define bfin_write_NFC_CTL(val) bfin_write16(NFC_CTL, val)
1173#define bfin_read_NFC_STAT() bfin_read16(NFC_STAT)
1174#define bfin_write_NFC_STAT(val) bfin_write16(NFC_STAT, val)
1175#define bfin_read_NFC_IRQSTAT() bfin_read16(NFC_IRQSTAT)
1176#define bfin_write_NFC_IRQSTAT(val) bfin_write16(NFC_IRQSTAT, val)
1177#define bfin_read_NFC_IRQMASK() bfin_read16(NFC_IRQMASK)
1178#define bfin_write_NFC_IRQMASK(val) bfin_write16(NFC_IRQMASK, val)
1179#define bfin_read_NFC_ECC0() bfin_read16(NFC_ECC0)
1180#define bfin_write_NFC_ECC0(val) bfin_write16(NFC_ECC0, val)
1181#define bfin_read_NFC_ECC1() bfin_read16(NFC_ECC1)
1182#define bfin_write_NFC_ECC1(val) bfin_write16(NFC_ECC1, val)
1183#define bfin_read_NFC_ECC2() bfin_read16(NFC_ECC2)
1184#define bfin_write_NFC_ECC2(val) bfin_write16(NFC_ECC2, val)
1185#define bfin_read_NFC_ECC3() bfin_read16(NFC_ECC3)
1186#define bfin_write_NFC_ECC3(val) bfin_write16(NFC_ECC3, val)
1187#define bfin_read_NFC_COUNT() bfin_read16(NFC_COUNT)
1188#define bfin_write_NFC_COUNT(val) bfin_write16(NFC_COUNT, val)
1189#define bfin_read_NFC_RST() bfin_read16(NFC_RST)
1190#define bfin_write_NFC_RST(val) bfin_write16(NFC_RST, val)
1191#define bfin_read_NFC_PGCTL() bfin_read16(NFC_PGCTL)
1192#define bfin_write_NFC_PGCTL(val) bfin_write16(NFC_PGCTL, val)
1193#define bfin_read_NFC_READ() bfin_read16(NFC_READ)
1194#define bfin_write_NFC_READ(val) bfin_write16(NFC_READ, val)
1195#define bfin_read_NFC_ADDR() bfin_read16(NFC_ADDR)
1196#define bfin_write_NFC_ADDR(val) bfin_write16(NFC_ADDR, val)
1197#define bfin_read_NFC_CMD() bfin_read16(NFC_CMD)
1198#define bfin_write_NFC_CMD(val) bfin_write16(NFC_CMD, val)
1199#define bfin_read_NFC_DATA_WR() bfin_read16(NFC_DATA_WR)
1200#define bfin_write_NFC_DATA_WR(val) bfin_write16(NFC_DATA_WR, val)
1201#define bfin_read_NFC_DATA_RD() bfin_read16(NFC_DATA_RD)
1202#define bfin_write_NFC_DATA_RD(val) bfin_write16(NFC_DATA_RD, val)
1203
1204#endif /* _CDEF_BF52X_H */
diff --git a/include/asm-blackfin/mach-bf527/defBF522.h b/include/asm-blackfin/mach-bf527/defBF522.h
deleted file mode 100644
index 9671d8f2c5ef..000000000000
--- a/include/asm-blackfin/mach-bf527/defBF522.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/defBF522.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF522_H
32#define _DEF_BF522_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF522 */
38
39/* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
40#include "defBF52x_base.h"
41
42#endif /* _DEF_BF522_H */
diff --git a/include/asm-blackfin/mach-bf527/defBF525.h b/include/asm-blackfin/mach-bf527/defBF525.h
deleted file mode 100644
index 6a375a084acc..000000000000
--- a/include/asm-blackfin/mach-bf527/defBF525.h
+++ /dev/null
@@ -1,713 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/defBF525.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF525_H
32#define _DEF_BF525_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF525 */
38
39/* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
40#include "defBF52x_base.h"
41
42/* The following are the #defines needed by ADSP-BF525 that are not in the common header */
43
44/* USB Control Registers */
45
46#define USB_FADDR 0xffc03800 /* Function address register */
47#define USB_POWER 0xffc03804 /* Power management register */
48#define USB_INTRTX 0xffc03808 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
49#define USB_INTRRX 0xffc0380c /* Interrupt register for Rx endpoints 1 to 7 */
50#define USB_INTRTXE 0xffc03810 /* Interrupt enable register for IntrTx */
51#define USB_INTRRXE 0xffc03814 /* Interrupt enable register for IntrRx */
52#define USB_INTRUSB 0xffc03818 /* Interrupt register for common USB interrupts */
53#define USB_INTRUSBE 0xffc0381c /* Interrupt enable register for IntrUSB */
54#define USB_FRAME 0xffc03820 /* USB frame number */
55#define USB_INDEX 0xffc03824 /* Index register for selecting the indexed endpoint registers */
56#define USB_TESTMODE 0xffc03828 /* Enabled USB 20 test modes */
57#define USB_GLOBINTR 0xffc0382c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
58#define USB_GLOBAL_CTL 0xffc03830 /* Global Clock Control for the core */
59
60/* USB Packet Control Registers */
61
62#define USB_TX_MAX_PACKET 0xffc03840 /* Maximum packet size for Host Tx endpoint */
63#define USB_CSR0 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
64#define USB_TXCSR 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
65#define USB_RX_MAX_PACKET 0xffc03848 /* Maximum packet size for Host Rx endpoint */
66#define USB_RXCSR 0xffc0384c /* Control Status register for Host Rx endpoint */
67#define USB_COUNT0 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
68#define USB_RXCOUNT 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
69#define USB_TXTYPE 0xffc03854 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
70#define USB_NAKLIMIT0 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
71#define USB_TXINTERVAL 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
72#define USB_RXTYPE 0xffc0385c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
73#define USB_RXINTERVAL 0xffc03860 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
74#define USB_TXCOUNT 0xffc03868 /* Number of bytes to be written to the selected endpoint Tx FIFO */
75
76/* USB Endpoint FIFO Registers */
77
78#define USB_EP0_FIFO 0xffc03880 /* Endpoint 0 FIFO */
79#define USB_EP1_FIFO 0xffc03888 /* Endpoint 1 FIFO */
80#define USB_EP2_FIFO 0xffc03890 /* Endpoint 2 FIFO */
81#define USB_EP3_FIFO 0xffc03898 /* Endpoint 3 FIFO */
82#define USB_EP4_FIFO 0xffc038a0 /* Endpoint 4 FIFO */
83#define USB_EP5_FIFO 0xffc038a8 /* Endpoint 5 FIFO */
84#define USB_EP6_FIFO 0xffc038b0 /* Endpoint 6 FIFO */
85#define USB_EP7_FIFO 0xffc038b8 /* Endpoint 7 FIFO */
86
87/* USB OTG Control Registers */
88
89#define USB_OTG_DEV_CTL 0xffc03900 /* OTG Device Control Register */
90#define USB_OTG_VBUS_IRQ 0xffc03904 /* OTG VBUS Control Interrupts */
91#define USB_OTG_VBUS_MASK 0xffc03908 /* VBUS Control Interrupt Enable */
92
93/* USB Phy Control Registers */
94
95#define USB_LINKINFO 0xffc03948 /* Enables programming of some PHY-side delays */
96#define USB_VPLEN 0xffc0394c /* Determines duration of VBUS pulse for VBUS charging */
97#define USB_HS_EOF1 0xffc03950 /* Time buffer for High-Speed transactions */
98#define USB_FS_EOF1 0xffc03954 /* Time buffer for Full-Speed transactions */
99#define USB_LS_EOF1 0xffc03958 /* Time buffer for Low-Speed transactions */
100
101/* (APHY_CNTRL is for ADI usage only) */
102
103#define USB_APHY_CNTRL 0xffc039e0 /* Register that increases visibility of Analog PHY */
104
105/* (APHY_CALIB is for ADI usage only) */
106
107#define USB_APHY_CALIB 0xffc039e4 /* Register used to set some calibration values */
108
109#define USB_APHY_CNTRL2 0xffc039e8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
110
111/* (PHY_TEST is for ADI usage only) */
112
113#define USB_PHY_TEST 0xffc039ec /* Used for reducing simulation time and simplifies FIFO testability */
114
115#define USB_PLLOSC_CTRL 0xffc039f0 /* Used to program different parameters for USB PLL and Oscillator */
116#define USB_SRP_CLKDIV 0xffc039f4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
117
118/* USB Endpoint 0 Control Registers */
119
120#define USB_EP_NI0_TXMAXP 0xffc03a00 /* Maximum packet size for Host Tx endpoint0 */
121#define USB_EP_NI0_TXCSR 0xffc03a04 /* Control Status register for endpoint 0 */
122#define USB_EP_NI0_RXMAXP 0xffc03a08 /* Maximum packet size for Host Rx endpoint0 */
123#define USB_EP_NI0_RXCSR 0xffc03a0c /* Control Status register for Host Rx endpoint0 */
124#define USB_EP_NI0_RXCOUNT 0xffc03a10 /* Number of bytes received in endpoint 0 FIFO */
125#define USB_EP_NI0_TXTYPE 0xffc03a14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
126#define USB_EP_NI0_TXINTERVAL 0xffc03a18 /* Sets the NAK response timeout on Endpoint 0 */
127#define USB_EP_NI0_RXTYPE 0xffc03a1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
128#define USB_EP_NI0_RXINTERVAL 0xffc03a20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
129#define USB_EP_NI0_TXCOUNT 0xffc03a28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
130
131/* USB Endpoint 1 Control Registers */
132
133#define USB_EP_NI1_TXMAXP 0xffc03a40 /* Maximum packet size for Host Tx endpoint1 */
134#define USB_EP_NI1_TXCSR 0xffc03a44 /* Control Status register for endpoint1 */
135#define USB_EP_NI1_RXMAXP 0xffc03a48 /* Maximum packet size for Host Rx endpoint1 */
136#define USB_EP_NI1_RXCSR 0xffc03a4c /* Control Status register for Host Rx endpoint1 */
137#define USB_EP_NI1_RXCOUNT 0xffc03a50 /* Number of bytes received in endpoint1 FIFO */
138#define USB_EP_NI1_TXTYPE 0xffc03a54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
139#define USB_EP_NI1_TXINTERVAL 0xffc03a58 /* Sets the NAK response timeout on Endpoint1 */
140#define USB_EP_NI1_RXTYPE 0xffc03a5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
141#define USB_EP_NI1_RXINTERVAL 0xffc03a60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
142#define USB_EP_NI1_TXCOUNT 0xffc03a68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
143
144/* USB Endpoint 2 Control Registers */
145
146#define USB_EP_NI2_TXMAXP 0xffc03a80 /* Maximum packet size for Host Tx endpoint2 */
147#define USB_EP_NI2_TXCSR 0xffc03a84 /* Control Status register for endpoint2 */
148#define USB_EP_NI2_RXMAXP 0xffc03a88 /* Maximum packet size for Host Rx endpoint2 */
149#define USB_EP_NI2_RXCSR 0xffc03a8c /* Control Status register for Host Rx endpoint2 */
150#define USB_EP_NI2_RXCOUNT 0xffc03a90 /* Number of bytes received in endpoint2 FIFO */
151#define USB_EP_NI2_TXTYPE 0xffc03a94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
152#define USB_EP_NI2_TXINTERVAL 0xffc03a98 /* Sets the NAK response timeout on Endpoint2 */
153#define USB_EP_NI2_RXTYPE 0xffc03a9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
154#define USB_EP_NI2_RXINTERVAL 0xffc03aa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
155#define USB_EP_NI2_TXCOUNT 0xffc03aa8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
156
157/* USB Endpoint 3 Control Registers */
158
159#define USB_EP_NI3_TXMAXP 0xffc03ac0 /* Maximum packet size for Host Tx endpoint3 */
160#define USB_EP_NI3_TXCSR 0xffc03ac4 /* Control Status register for endpoint3 */
161#define USB_EP_NI3_RXMAXP 0xffc03ac8 /* Maximum packet size for Host Rx endpoint3 */
162#define USB_EP_NI3_RXCSR 0xffc03acc /* Control Status register for Host Rx endpoint3 */
163#define USB_EP_NI3_RXCOUNT 0xffc03ad0 /* Number of bytes received in endpoint3 FIFO */
164#define USB_EP_NI3_TXTYPE 0xffc03ad4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
165#define USB_EP_NI3_TXINTERVAL 0xffc03ad8 /* Sets the NAK response timeout on Endpoint3 */
166#define USB_EP_NI3_RXTYPE 0xffc03adc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
167#define USB_EP_NI3_RXINTERVAL 0xffc03ae0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
168#define USB_EP_NI3_TXCOUNT 0xffc03ae8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
169
170/* USB Endpoint 4 Control Registers */
171
172#define USB_EP_NI4_TXMAXP 0xffc03b00 /* Maximum packet size for Host Tx endpoint4 */
173#define USB_EP_NI4_TXCSR 0xffc03b04 /* Control Status register for endpoint4 */
174#define USB_EP_NI4_RXMAXP 0xffc03b08 /* Maximum packet size for Host Rx endpoint4 */
175#define USB_EP_NI4_RXCSR 0xffc03b0c /* Control Status register for Host Rx endpoint4 */
176#define USB_EP_NI4_RXCOUNT 0xffc03b10 /* Number of bytes received in endpoint4 FIFO */
177#define USB_EP_NI4_TXTYPE 0xffc03b14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
178#define USB_EP_NI4_TXINTERVAL 0xffc03b18 /* Sets the NAK response timeout on Endpoint4 */
179#define USB_EP_NI4_RXTYPE 0xffc03b1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
180#define USB_EP_NI4_RXINTERVAL 0xffc03b20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
181#define USB_EP_NI4_TXCOUNT 0xffc03b28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
182
183/* USB Endpoint 5 Control Registers */
184
185#define USB_EP_NI5_TXMAXP 0xffc03b40 /* Maximum packet size for Host Tx endpoint5 */
186#define USB_EP_NI5_TXCSR 0xffc03b44 /* Control Status register for endpoint5 */
187#define USB_EP_NI5_RXMAXP 0xffc03b48 /* Maximum packet size for Host Rx endpoint5 */
188#define USB_EP_NI5_RXCSR 0xffc03b4c /* Control Status register for Host Rx endpoint5 */
189#define USB_EP_NI5_RXCOUNT 0xffc03b50 /* Number of bytes received in endpoint5 FIFO */
190#define USB_EP_NI5_TXTYPE 0xffc03b54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
191#define USB_EP_NI5_TXINTERVAL 0xffc03b58 /* Sets the NAK response timeout on Endpoint5 */
192#define USB_EP_NI5_RXTYPE 0xffc03b5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
193#define USB_EP_NI5_RXINTERVAL 0xffc03b60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
194#define USB_EP_NI5_TXCOUNT 0xffc03b68 /* Number of bytes to be written to the endpoint5 Tx FIFO */
195
196/* USB Endpoint 6 Control Registers */
197
198#define USB_EP_NI6_TXMAXP 0xffc03b80 /* Maximum packet size for Host Tx endpoint6 */
199#define USB_EP_NI6_TXCSR 0xffc03b84 /* Control Status register for endpoint6 */
200#define USB_EP_NI6_RXMAXP 0xffc03b88 /* Maximum packet size for Host Rx endpoint6 */
201#define USB_EP_NI6_RXCSR 0xffc03b8c /* Control Status register for Host Rx endpoint6 */
202#define USB_EP_NI6_RXCOUNT 0xffc03b90 /* Number of bytes received in endpoint6 FIFO */
203#define USB_EP_NI6_TXTYPE 0xffc03b94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
204#define USB_EP_NI6_TXINTERVAL 0xffc03b98 /* Sets the NAK response timeout on Endpoint6 */
205#define USB_EP_NI6_RXTYPE 0xffc03b9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
206#define USB_EP_NI6_RXINTERVAL 0xffc03ba0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
207#define USB_EP_NI6_TXCOUNT 0xffc03ba8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
208
209/* USB Endpoint 7 Control Registers */
210
211#define USB_EP_NI7_TXMAXP 0xffc03bc0 /* Maximum packet size for Host Tx endpoint7 */
212#define USB_EP_NI7_TXCSR 0xffc03bc4 /* Control Status register for endpoint7 */
213#define USB_EP_NI7_RXMAXP 0xffc03bc8 /* Maximum packet size for Host Rx endpoint7 */
214#define USB_EP_NI7_RXCSR 0xffc03bcc /* Control Status register for Host Rx endpoint7 */
215#define USB_EP_NI7_RXCOUNT 0xffc03bd0 /* Number of bytes received in endpoint7 FIFO */
216#define USB_EP_NI7_TXTYPE 0xffc03bd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
217#define USB_EP_NI7_TXINTERVAL 0xffc03bd8 /* Sets the NAK response timeout on Endpoint7 */
218#define USB_EP_NI7_RXTYPE 0xffc03bdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
219#define USB_EP_NI7_RXINTERVAL 0xffc03bf0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
220#define USB_EP_NI7_TXCOUNT 0xffc03bf8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
221
222#define USB_DMA_INTERRUPT 0xffc03c00 /* Indicates pending interrupts for the DMA channels */
223
224/* USB Channel 0 Config Registers */
225
226#define USB_DMA0CONTROL 0xffc03c04 /* DMA master channel 0 configuration */
227#define USB_DMA0ADDRLOW 0xffc03c08 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
228#define USB_DMA0ADDRHIGH 0xffc03c0c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
229#define USB_DMA0COUNTLOW 0xffc03c10 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
230#define USB_DMA0COUNTHIGH 0xffc03c14 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
231
232/* USB Channel 1 Config Registers */
233
234#define USB_DMA1CONTROL 0xffc03c24 /* DMA master channel 1 configuration */
235#define USB_DMA1ADDRLOW 0xffc03c28 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
236#define USB_DMA1ADDRHIGH 0xffc03c2c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
237#define USB_DMA1COUNTLOW 0xffc03c30 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
238#define USB_DMA1COUNTHIGH 0xffc03c34 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
239
240/* USB Channel 2 Config Registers */
241
242#define USB_DMA2CONTROL 0xffc03c44 /* DMA master channel 2 configuration */
243#define USB_DMA2ADDRLOW 0xffc03c48 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
244#define USB_DMA2ADDRHIGH 0xffc03c4c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
245#define USB_DMA2COUNTLOW 0xffc03c50 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
246#define USB_DMA2COUNTHIGH 0xffc03c54 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
247
248/* USB Channel 3 Config Registers */
249
250#define USB_DMA3CONTROL 0xffc03c64 /* DMA master channel 3 configuration */
251#define USB_DMA3ADDRLOW 0xffc03c68 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
252#define USB_DMA3ADDRHIGH 0xffc03c6c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
253#define USB_DMA3COUNTLOW 0xffc03c70 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
254#define USB_DMA3COUNTHIGH 0xffc03c74 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
255
256/* USB Channel 4 Config Registers */
257
258#define USB_DMA4CONTROL 0xffc03c84 /* DMA master channel 4 configuration */
259#define USB_DMA4ADDRLOW 0xffc03c88 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
260#define USB_DMA4ADDRHIGH 0xffc03c8c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
261#define USB_DMA4COUNTLOW 0xffc03c90 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
262#define USB_DMA4COUNTHIGH 0xffc03c94 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
263
264/* USB Channel 5 Config Registers */
265
266#define USB_DMA5CONTROL 0xffc03ca4 /* DMA master channel 5 configuration */
267#define USB_DMA5ADDRLOW 0xffc03ca8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
268#define USB_DMA5ADDRHIGH 0xffc03cac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
269#define USB_DMA5COUNTLOW 0xffc03cb0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
270#define USB_DMA5COUNTHIGH 0xffc03cb4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
271
272/* USB Channel 6 Config Registers */
273
274#define USB_DMA6CONTROL 0xffc03cc4 /* DMA master channel 6 configuration */
275#define USB_DMA6ADDRLOW 0xffc03cc8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
276#define USB_DMA6ADDRHIGH 0xffc03ccc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
277#define USB_DMA6COUNTLOW 0xffc03cd0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
278#define USB_DMA6COUNTHIGH 0xffc03cd4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
279
280/* USB Channel 7 Config Registers */
281
282#define USB_DMA7CONTROL 0xffc03ce4 /* DMA master channel 7 configuration */
283#define USB_DMA7ADDRLOW 0xffc03ce8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
284#define USB_DMA7ADDRHIGH 0xffc03cec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
285#define USB_DMA7COUNTLOW 0xffc03cf0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
286#define USB_DMA7COUNTHIGH 0xffc03cf4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
287
288/* Bit masks for USB_FADDR */
289
290#define FUNCTION_ADDRESS 0x7f /* Function address */
291
292/* Bit masks for USB_POWER */
293
294#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
295#define nENABLE_SUSPENDM 0x0
296#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
297#define nSUSPEND_MODE 0x0
298#define RESUME_MODE 0x4 /* DMA Mode */
299#define nRESUME_MODE 0x0
300#define RESET 0x8 /* Reset indicator */
301#define nRESET 0x0
302#define HS_MODE 0x10 /* High Speed mode indicator */
303#define nHS_MODE 0x0
304#define HS_ENABLE 0x20 /* high Speed Enable */
305#define nHS_ENABLE 0x0
306#define SOFT_CONN 0x40 /* Soft connect */
307#define nSOFT_CONN 0x0
308#define ISO_UPDATE 0x80 /* Isochronous update */
309#define nISO_UPDATE 0x0
310
311/* Bit masks for USB_INTRTX */
312
313#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
314#define nEP0_TX 0x0
315#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
316#define nEP1_TX 0x0
317#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
318#define nEP2_TX 0x0
319#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
320#define nEP3_TX 0x0
321#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
322#define nEP4_TX 0x0
323#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
324#define nEP5_TX 0x0
325#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
326#define nEP6_TX 0x0
327#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
328#define nEP7_TX 0x0
329
330/* Bit masks for USB_INTRRX */
331
332#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
333#define nEP1_RX 0x0
334#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
335#define nEP2_RX 0x0
336#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
337#define nEP3_RX 0x0
338#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
339#define nEP4_RX 0x0
340#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
341#define nEP5_RX 0x0
342#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
343#define nEP6_RX 0x0
344#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
345#define nEP7_RX 0x0
346
347/* Bit masks for USB_INTRTXE */
348
349#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
350#define nEP0_TX_E 0x0
351#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
352#define nEP1_TX_E 0x0
353#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
354#define nEP2_TX_E 0x0
355#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
356#define nEP3_TX_E 0x0
357#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
358#define nEP4_TX_E 0x0
359#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
360#define nEP5_TX_E 0x0
361#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
362#define nEP6_TX_E 0x0
363#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
364#define nEP7_TX_E 0x0
365
366/* Bit masks for USB_INTRRXE */
367
368#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
369#define nEP1_RX_E 0x0
370#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
371#define nEP2_RX_E 0x0
372#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
373#define nEP3_RX_E 0x0
374#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
375#define nEP4_RX_E 0x0
376#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
377#define nEP5_RX_E 0x0
378#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
379#define nEP6_RX_E 0x0
380#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
381#define nEP7_RX_E 0x0
382
383/* Bit masks for USB_INTRUSB */
384
385#define SUSPEND_B 0x1 /* Suspend indicator */
386#define nSUSPEND_B 0x0
387#define RESUME_B 0x2 /* Resume indicator */
388#define nRESUME_B 0x0
389#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
390#define nRESET_OR_BABLE_B 0x0
391#define SOF_B 0x8 /* Start of frame */
392#define nSOF_B 0x0
393#define CONN_B 0x10 /* Connection indicator */
394#define nCONN_B 0x0
395#define DISCON_B 0x20 /* Disconnect indicator */
396#define nDISCON_B 0x0
397#define SESSION_REQ_B 0x40 /* Session Request */
398#define nSESSION_REQ_B 0x0
399#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
400#define nVBUS_ERROR_B 0x0
401
402/* Bit masks for USB_INTRUSBE */
403
404#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
405#define nSUSPEND_BE 0x0
406#define RESUME_BE 0x2 /* Resume indicator int enable */
407#define nRESUME_BE 0x0
408#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
409#define nRESET_OR_BABLE_BE 0x0
410#define SOF_BE 0x8 /* Start of frame int enable */
411#define nSOF_BE 0x0
412#define CONN_BE 0x10 /* Connection indicator int enable */
413#define nCONN_BE 0x0
414#define DISCON_BE 0x20 /* Disconnect indicator int enable */
415#define nDISCON_BE 0x0
416#define SESSION_REQ_BE 0x40 /* Session Request int enable */
417#define nSESSION_REQ_BE 0x0
418#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
419#define nVBUS_ERROR_BE 0x0
420
421/* Bit masks for USB_FRAME */
422
423#define FRAME_NUMBER 0x7ff /* Frame number */
424
425/* Bit masks for USB_INDEX */
426
427#define SELECTED_ENDPOINT 0xf /* selected endpoint */
428
429/* Bit masks for USB_GLOBAL_CTL */
430
431#define GLOBAL_ENA 0x1 /* enables USB module */
432#define nGLOBAL_ENA 0x0
433#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
434#define nEP1_TX_ENA 0x0
435#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
436#define nEP2_TX_ENA 0x0
437#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
438#define nEP3_TX_ENA 0x0
439#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
440#define nEP4_TX_ENA 0x0
441#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
442#define nEP5_TX_ENA 0x0
443#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
444#define nEP6_TX_ENA 0x0
445#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
446#define nEP7_TX_ENA 0x0
447#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
448#define nEP1_RX_ENA 0x0
449#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
450#define nEP2_RX_ENA 0x0
451#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
452#define nEP3_RX_ENA 0x0
453#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
454#define nEP4_RX_ENA 0x0
455#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
456#define nEP5_RX_ENA 0x0
457#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
458#define nEP6_RX_ENA 0x0
459#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
460#define nEP7_RX_ENA 0x0
461
462/* Bit masks for USB_OTG_DEV_CTL */
463
464#define SESSION 0x1 /* session indicator */
465#define nSESSION 0x0
466#define HOST_REQ 0x2 /* Host negotiation request */
467#define nHOST_REQ 0x0
468#define HOST_MODE 0x4 /* indicates USBDRC is a host */
469#define nHOST_MODE 0x0
470#define VBUS0 0x8 /* Vbus level indicator[0] */
471#define nVBUS0 0x0
472#define VBUS1 0x10 /* Vbus level indicator[1] */
473#define nVBUS1 0x0
474#define LSDEV 0x20 /* Low-speed indicator */
475#define nLSDEV 0x0
476#define FSDEV 0x40 /* Full or High-speed indicator */
477#define nFSDEV 0x0
478#define B_DEVICE 0x80 /* A' or 'B' device indicator */
479#define nB_DEVICE 0x0
480
481/* Bit masks for USB_OTG_VBUS_IRQ */
482
483#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
484#define nDRIVE_VBUS_ON 0x0
485#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
486#define nDRIVE_VBUS_OFF 0x0
487#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
488#define nCHRG_VBUS_START 0x0
489#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
490#define nCHRG_VBUS_END 0x0
491#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
492#define nDISCHRG_VBUS_START 0x0
493#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
494#define nDISCHRG_VBUS_END 0x0
495
496/* Bit masks for USB_OTG_VBUS_MASK */
497
498#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
499#define nDRIVE_VBUS_ON_ENA 0x0
500#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
501#define nDRIVE_VBUS_OFF_ENA 0x0
502#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
503#define nCHRG_VBUS_START_ENA 0x0
504#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
505#define nCHRG_VBUS_END_ENA 0x0
506#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
507#define nDISCHRG_VBUS_START_ENA 0x0
508#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
509#define nDISCHRG_VBUS_END_ENA 0x0
510
511/* Bit masks for USB_CSR0 */
512
513#define RXPKTRDY 0x1 /* data packet receive indicator */
514#define nRXPKTRDY 0x0
515#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
516#define nTXPKTRDY 0x0
517#define STALL_SENT 0x4 /* STALL handshake sent */
518#define nSTALL_SENT 0x0
519#define DATAEND 0x8 /* Data end indicator */
520#define nDATAEND 0x0
521#define SETUPEND 0x10 /* Setup end */
522#define nSETUPEND 0x0
523#define SENDSTALL 0x20 /* Send STALL handshake */
524#define nSENDSTALL 0x0
525#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
526#define nSERVICED_RXPKTRDY 0x0
527#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
528#define nSERVICED_SETUPEND 0x0
529#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
530#define nFLUSHFIFO 0x0
531#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
532#define nSTALL_RECEIVED_H 0x0
533#define SETUPPKT_H 0x8 /* send Setup token host mode */
534#define nSETUPPKT_H 0x0
535#define ERROR_H 0x10 /* timeout error indicator host mode */
536#define nERROR_H 0x0
537#define REQPKT_H 0x20 /* Request an IN transaction host mode */
538#define nREQPKT_H 0x0
539#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
540#define nSTATUSPKT_H 0x0
541#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
542#define nNAK_TIMEOUT_H 0x0
543
544/* Bit masks for USB_COUNT0 */
545
546#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
547
548/* Bit masks for USB_NAKLIMIT0 */
549
550#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
551
552/* Bit masks for USB_TX_MAX_PACKET */
553
554#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
555
556/* Bit masks for USB_RX_MAX_PACKET */
557
558#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
559
560/* Bit masks for USB_TXCSR */
561
562#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
563#define nTXPKTRDY_T 0x0
564#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
565#define nFIFO_NOT_EMPTY_T 0x0
566#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
567#define nUNDERRUN_T 0x0
568#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
569#define nFLUSHFIFO_T 0x0
570#define STALL_SEND_T 0x10 /* issue a Stall handshake */
571#define nSTALL_SEND_T 0x0
572#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
573#define nSTALL_SENT_T 0x0
574#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
575#define nCLEAR_DATATOGGLE_T 0x0
576#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
577#define nINCOMPTX_T 0x0
578#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
579#define nDMAREQMODE_T 0x0
580#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
581#define nFORCE_DATATOGGLE_T 0x0
582#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
583#define nDMAREQ_ENA_T 0x0
584#define ISO_T 0x4000 /* enable Isochronous transfers */
585#define nISO_T 0x0
586#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
587#define nAUTOSET_T 0x0
588#define ERROR_TH 0x4 /* error condition host mode */
589#define nERROR_TH 0x0
590#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
591#define nSTALL_RECEIVED_TH 0x0
592#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
593#define nNAK_TIMEOUT_TH 0x0
594
595/* Bit masks for USB_TXCOUNT */
596
597#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
598
599/* Bit masks for USB_RXCSR */
600
601#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
602#define nRXPKTRDY_R 0x0
603#define FIFO_FULL_R 0x2 /* FIFO not empty */
604#define nFIFO_FULL_R 0x0
605#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
606#define nOVERRUN_R 0x0
607#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
608#define nDATAERROR_R 0x0
609#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
610#define nFLUSHFIFO_R 0x0
611#define STALL_SEND_R 0x20 /* issue a Stall handshake */
612#define nSTALL_SEND_R 0x0
613#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
614#define nSTALL_SENT_R 0x0
615#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
616#define nCLEAR_DATATOGGLE_R 0x0
617#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
618#define nINCOMPRX_R 0x0
619#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
620#define nDMAREQMODE_R 0x0
621#define DISNYET_R 0x1000 /* disable Nyet handshakes */
622#define nDISNYET_R 0x0
623#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
624#define nDMAREQ_ENA_R 0x0
625#define ISO_R 0x4000 /* enable Isochronous transfers */
626#define nISO_R 0x0
627#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
628#define nAUTOCLEAR_R 0x0
629#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
630#define nERROR_RH 0x0
631#define REQPKT_RH 0x20 /* request an IN transaction host mode */
632#define nREQPKT_RH 0x0
633#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
634#define nSTALL_RECEIVED_RH 0x0
635#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
636#define nINCOMPRX_RH 0x0
637#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
638#define nDMAREQMODE_RH 0x0
639#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
640#define nAUTOREQ_RH 0x0
641
642/* Bit masks for USB_RXCOUNT */
643
644#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
645
646/* Bit masks for USB_TXTYPE */
647
648#define TARGET_EP_NO_T 0xf /* EP number */
649#define PROTOCOL_T 0xc /* transfer type */
650
651/* Bit masks for USB_TXINTERVAL */
652
653#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
654
655/* Bit masks for USB_RXTYPE */
656
657#define TARGET_EP_NO_R 0xf /* EP number */
658#define PROTOCOL_R 0xc /* transfer type */
659
660/* Bit masks for USB_RXINTERVAL */
661
662#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
663
664/* Bit masks for USB_DMA_INTERRUPT */
665
666#define DMA0_INT 0x1 /* DMA0 pending interrupt */
667#define nDMA0_INT 0x0
668#define DMA1_INT 0x2 /* DMA1 pending interrupt */
669#define nDMA1_INT 0x0
670#define DMA2_INT 0x4 /* DMA2 pending interrupt */
671#define nDMA2_INT 0x0
672#define DMA3_INT 0x8 /* DMA3 pending interrupt */
673#define nDMA3_INT 0x0
674#define DMA4_INT 0x10 /* DMA4 pending interrupt */
675#define nDMA4_INT 0x0
676#define DMA5_INT 0x20 /* DMA5 pending interrupt */
677#define nDMA5_INT 0x0
678#define DMA6_INT 0x40 /* DMA6 pending interrupt */
679#define nDMA6_INT 0x0
680#define DMA7_INT 0x80 /* DMA7 pending interrupt */
681#define nDMA7_INT 0x0
682
683/* Bit masks for USB_DMAxCONTROL */
684
685#define DMA_ENA 0x1 /* DMA enable */
686#define nDMA_ENA 0x0
687#define DIRECTION 0x2 /* direction of DMA transfer */
688#define nDIRECTION 0x0
689#define MODE 0x4 /* DMA Bus error */
690#define nMODE 0x0
691#define INT_ENA 0x8 /* Interrupt enable */
692#define nINT_ENA 0x0
693#define EPNUM 0xf0 /* EP number */
694#define BUSERROR 0x100 /* DMA Bus error */
695#define nBUSERROR 0x0
696
697/* Bit masks for USB_DMAxADDRHIGH */
698
699#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
700
701/* Bit masks for USB_DMAxADDRLOW */
702
703#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
704
705/* Bit masks for USB_DMAxCOUNTHIGH */
706
707#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
708
709/* Bit masks for USB_DMAxCOUNTLOW */
710
711#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
712
713#endif /* _DEF_BF525_H */
diff --git a/include/asm-blackfin/mach-bf527/defBF527.h b/include/asm-blackfin/mach-bf527/defBF527.h
deleted file mode 100644
index f1a70db70cb8..000000000000
--- a/include/asm-blackfin/mach-bf527/defBF527.h
+++ /dev/null
@@ -1,1090 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/defBF527.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF527_H
32#define _DEF_BF527_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF527 */
38
39/* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
40#include "defBF52x_base.h"
41
42/* The following are the #defines needed by ADSP-BF527 that are not in the common header */
43/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
44
45#define EMAC_OPMODE 0xFFC03000 /* Operating Mode Register */
46#define EMAC_ADDRLO 0xFFC03004 /* Address Low (32 LSBs) Register */
47#define EMAC_ADDRHI 0xFFC03008 /* Address High (16 MSBs) Register */
48#define EMAC_HASHLO 0xFFC0300C /* Multicast Hash Table Low (Bins 31-0) Register */
49#define EMAC_HASHHI 0xFFC03010 /* Multicast Hash Table High (Bins 63-32) Register */
50#define EMAC_STAADD 0xFFC03014 /* Station Management Address Register */
51#define EMAC_STADAT 0xFFC03018 /* Station Management Data Register */
52#define EMAC_FLC 0xFFC0301C /* Flow Control Register */
53#define EMAC_VLAN1 0xFFC03020 /* VLAN1 Tag Register */
54#define EMAC_VLAN2 0xFFC03024 /* VLAN2 Tag Register */
55#define EMAC_WKUP_CTL 0xFFC0302C /* Wake-Up Control/Status Register */
56#define EMAC_WKUP_FFMSK0 0xFFC03030 /* Wake-Up Frame Filter 0 Byte Mask Register */
57#define EMAC_WKUP_FFMSK1 0xFFC03034 /* Wake-Up Frame Filter 1 Byte Mask Register */
58#define EMAC_WKUP_FFMSK2 0xFFC03038 /* Wake-Up Frame Filter 2 Byte Mask Register */
59#define EMAC_WKUP_FFMSK3 0xFFC0303C /* Wake-Up Frame Filter 3 Byte Mask Register */
60#define EMAC_WKUP_FFCMD 0xFFC03040 /* Wake-Up Frame Filter Commands Register */
61#define EMAC_WKUP_FFOFF 0xFFC03044 /* Wake-Up Frame Filter Offsets Register */
62#define EMAC_WKUP_FFCRC0 0xFFC03048 /* Wake-Up Frame Filter 0,1 CRC-16 Register */
63#define EMAC_WKUP_FFCRC1 0xFFC0304C /* Wake-Up Frame Filter 2,3 CRC-16 Register */
64
65#define EMAC_SYSCTL 0xFFC03060 /* EMAC System Control Register */
66#define EMAC_SYSTAT 0xFFC03064 /* EMAC System Status Register */
67#define EMAC_RX_STAT 0xFFC03068 /* RX Current Frame Status Register */
68#define EMAC_RX_STKY 0xFFC0306C /* RX Sticky Frame Status Register */
69#define EMAC_RX_IRQE 0xFFC03070 /* RX Frame Status Interrupt Enables Register */
70#define EMAC_TX_STAT 0xFFC03074 /* TX Current Frame Status Register */
71#define EMAC_TX_STKY 0xFFC03078 /* TX Sticky Frame Status Register */
72#define EMAC_TX_IRQE 0xFFC0307C /* TX Frame Status Interrupt Enables Register */
73
74#define EMAC_MMC_CTL 0xFFC03080 /* MMC Counter Control Register */
75#define EMAC_MMC_RIRQS 0xFFC03084 /* MMC RX Interrupt Status Register */
76#define EMAC_MMC_RIRQE 0xFFC03088 /* MMC RX Interrupt Enables Register */
77#define EMAC_MMC_TIRQS 0xFFC0308C /* MMC TX Interrupt Status Register */
78#define EMAC_MMC_TIRQE 0xFFC03090 /* MMC TX Interrupt Enables Register */
79
80#define EMAC_RXC_OK 0xFFC03100 /* RX Frame Successful Count */
81#define EMAC_RXC_FCS 0xFFC03104 /* RX Frame FCS Failure Count */
82#define EMAC_RXC_ALIGN 0xFFC03108 /* RX Alignment Error Count */
83#define EMAC_RXC_OCTET 0xFFC0310C /* RX Octets Successfully Received Count */
84#define EMAC_RXC_DMAOVF 0xFFC03110 /* Internal MAC Sublayer Error RX Frame Count */
85#define EMAC_RXC_UNICST 0xFFC03114 /* Unicast RX Frame Count */
86#define EMAC_RXC_MULTI 0xFFC03118 /* Multicast RX Frame Count */
87#define EMAC_RXC_BROAD 0xFFC0311C /* Broadcast RX Frame Count */
88#define EMAC_RXC_LNERRI 0xFFC03120 /* RX Frame In Range Error Count */
89#define EMAC_RXC_LNERRO 0xFFC03124 /* RX Frame Out Of Range Error Count */
90#define EMAC_RXC_LONG 0xFFC03128 /* RX Frame Too Long Count */
91#define EMAC_RXC_MACCTL 0xFFC0312C /* MAC Control RX Frame Count */
92#define EMAC_RXC_OPCODE 0xFFC03130 /* Unsupported Op-Code RX Frame Count */
93#define EMAC_RXC_PAUSE 0xFFC03134 /* MAC Control Pause RX Frame Count */
94#define EMAC_RXC_ALLFRM 0xFFC03138 /* Overall RX Frame Count */
95#define EMAC_RXC_ALLOCT 0xFFC0313C /* Overall RX Octet Count */
96#define EMAC_RXC_TYPED 0xFFC03140 /* Type/Length Consistent RX Frame Count */
97#define EMAC_RXC_SHORT 0xFFC03144 /* RX Frame Fragment Count - Byte Count x < 64 */
98#define EMAC_RXC_EQ64 0xFFC03148 /* Good RX Frame Count - Byte Count x = 64 */
99#define EMAC_RXC_LT128 0xFFC0314C /* Good RX Frame Count - Byte Count 64 < x < 128 */
100#define EMAC_RXC_LT256 0xFFC03150 /* Good RX Frame Count - Byte Count 128 <= x < 256 */
101#define EMAC_RXC_LT512 0xFFC03154 /* Good RX Frame Count - Byte Count 256 <= x < 512 */
102#define EMAC_RXC_LT1024 0xFFC03158 /* Good RX Frame Count - Byte Count 512 <= x < 1024 */
103#define EMAC_RXC_GE1024 0xFFC0315C /* Good RX Frame Count - Byte Count x >= 1024 */
104
105#define EMAC_TXC_OK 0xFFC03180 /* TX Frame Successful Count */
106#define EMAC_TXC_1COL 0xFFC03184 /* TX Frames Successful After Single Collision Count */
107#define EMAC_TXC_GT1COL 0xFFC03188 /* TX Frames Successful After Multiple Collisions Count */
108#define EMAC_TXC_OCTET 0xFFC0318C /* TX Octets Successfully Received Count */
109#define EMAC_TXC_DEFER 0xFFC03190 /* TX Frame Delayed Due To Busy Count */
110#define EMAC_TXC_LATECL 0xFFC03194 /* Late TX Collisions Count */
111#define EMAC_TXC_XS_COL 0xFFC03198 /* TX Frame Failed Due To Excessive Collisions Count */
112#define EMAC_TXC_DMAUND 0xFFC0319C /* Internal MAC Sublayer Error TX Frame Count */
113#define EMAC_TXC_CRSERR 0xFFC031A0 /* Carrier Sense Deasserted During TX Frame Count */
114#define EMAC_TXC_UNICST 0xFFC031A4 /* Unicast TX Frame Count */
115#define EMAC_TXC_MULTI 0xFFC031A8 /* Multicast TX Frame Count */
116#define EMAC_TXC_BROAD 0xFFC031AC /* Broadcast TX Frame Count */
117#define EMAC_TXC_XS_DFR 0xFFC031B0 /* TX Frames With Excessive Deferral Count */
118#define EMAC_TXC_MACCTL 0xFFC031B4 /* MAC Control TX Frame Count */
119#define EMAC_TXC_ALLFRM 0xFFC031B8 /* Overall TX Frame Count */
120#define EMAC_TXC_ALLOCT 0xFFC031BC /* Overall TX Octet Count */
121#define EMAC_TXC_EQ64 0xFFC031C0 /* Good TX Frame Count - Byte Count x = 64 */
122#define EMAC_TXC_LT128 0xFFC031C4 /* Good TX Frame Count - Byte Count 64 < x < 128 */
123#define EMAC_TXC_LT256 0xFFC031C8 /* Good TX Frame Count - Byte Count 128 <= x < 256 */
124#define EMAC_TXC_LT512 0xFFC031CC /* Good TX Frame Count - Byte Count 256 <= x < 512 */
125#define EMAC_TXC_LT1024 0xFFC031D0 /* Good TX Frame Count - Byte Count 512 <= x < 1024 */
126#define EMAC_TXC_GE1024 0xFFC031D4 /* Good TX Frame Count - Byte Count x >= 1024 */
127#define EMAC_TXC_ABORT 0xFFC031D8 /* Total TX Frames Aborted Count */
128
129/* Listing for IEEE-Supported Count Registers */
130
131#define FramesReceivedOK EMAC_RXC_OK /* RX Frame Successful Count */
132#define FrameCheckSequenceErrors EMAC_RXC_FCS /* RX Frame FCS Failure Count */
133#define AlignmentErrors EMAC_RXC_ALIGN /* RX Alignment Error Count */
134#define OctetsReceivedOK EMAC_RXC_OCTET /* RX Octets Successfully Received Count */
135#define FramesLostDueToIntMACRcvError EMAC_RXC_DMAOVF /* Internal MAC Sublayer Error RX Frame Count */
136#define UnicastFramesReceivedOK EMAC_RXC_UNICST /* Unicast RX Frame Count */
137#define MulticastFramesReceivedOK EMAC_RXC_MULTI /* Multicast RX Frame Count */
138#define BroadcastFramesReceivedOK EMAC_RXC_BROAD /* Broadcast RX Frame Count */
139#define InRangeLengthErrors EMAC_RXC_LNERRI /* RX Frame In Range Error Count */
140#define OutOfRangeLengthField EMAC_RXC_LNERRO /* RX Frame Out Of Range Error Count */
141#define FrameTooLongErrors EMAC_RXC_LONG /* RX Frame Too Long Count */
142#define MACControlFramesReceived EMAC_RXC_MACCTL /* MAC Control RX Frame Count */
143#define UnsupportedOpcodesReceived EMAC_RXC_OPCODE /* Unsupported Op-Code RX Frame Count */
144#define PAUSEMACCtrlFramesReceived EMAC_RXC_PAUSE /* MAC Control Pause RX Frame Count */
145#define FramesReceivedAll EMAC_RXC_ALLFRM /* Overall RX Frame Count */
146#define OctetsReceivedAll EMAC_RXC_ALLOCT /* Overall RX Octet Count */
147#define TypedFramesReceived EMAC_RXC_TYPED /* Type/Length Consistent RX Frame Count */
148#define FramesLenLt64Received EMAC_RXC_SHORT /* RX Frame Fragment Count - Byte Count x < 64 */
149#define FramesLenEq64Received EMAC_RXC_EQ64 /* Good RX Frame Count - Byte Count x = 64 */
150#define FramesLen65_127Received EMAC_RXC_LT128 /* Good RX Frame Count - Byte Count 64 < x < 128 */
151#define FramesLen128_255Received EMAC_RXC_LT256 /* Good RX Frame Count - Byte Count 128 <= x < 256 */
152#define FramesLen256_511Received EMAC_RXC_LT512 /* Good RX Frame Count - Byte Count 256 <= x < 512 */
153#define FramesLen512_1023Received EMAC_RXC_LT1024 /* Good RX Frame Count - Byte Count 512 <= x < 1024 */
154#define FramesLen1024_MaxReceived EMAC_RXC_GE1024 /* Good RX Frame Count - Byte Count x >= 1024 */
155
156#define FramesTransmittedOK EMAC_TXC_OK /* TX Frame Successful Count */
157#define SingleCollisionFrames EMAC_TXC_1COL /* TX Frames Successful After Single Collision Count */
158#define MultipleCollisionFrames EMAC_TXC_GT1COL /* TX Frames Successful After Multiple Collisions Count */
159#define OctetsTransmittedOK EMAC_TXC_OCTET /* TX Octets Successfully Received Count */
160#define FramesWithDeferredXmissions EMAC_TXC_DEFER /* TX Frame Delayed Due To Busy Count */
161#define LateCollisions EMAC_TXC_LATECL /* Late TX Collisions Count */
162#define FramesAbortedDueToXSColls EMAC_TXC_XS_COL /* TX Frame Failed Due To Excessive Collisions Count */
163#define FramesLostDueToIntMacXmitError EMAC_TXC_DMAUND /* Internal MAC Sublayer Error TX Frame Count */
164#define CarrierSenseErrors EMAC_TXC_CRSERR /* Carrier Sense Deasserted During TX Frame Count */
165#define UnicastFramesXmittedOK EMAC_TXC_UNICST /* Unicast TX Frame Count */
166#define MulticastFramesXmittedOK EMAC_TXC_MULTI /* Multicast TX Frame Count */
167#define BroadcastFramesXmittedOK EMAC_TXC_BROAD /* Broadcast TX Frame Count */
168#define FramesWithExcessiveDeferral EMAC_TXC_XS_DFR /* TX Frames With Excessive Deferral Count */
169#define MACControlFramesTransmitted EMAC_TXC_MACCTL /* MAC Control TX Frame Count */
170#define FramesTransmittedAll EMAC_TXC_ALLFRM /* Overall TX Frame Count */
171#define OctetsTransmittedAll EMAC_TXC_ALLOCT /* Overall TX Octet Count */
172#define FramesLenEq64Transmitted EMAC_TXC_EQ64 /* Good TX Frame Count - Byte Count x = 64 */
173#define FramesLen65_127Transmitted EMAC_TXC_LT128 /* Good TX Frame Count - Byte Count 64 < x < 128 */
174#define FramesLen128_255Transmitted EMAC_TXC_LT256 /* Good TX Frame Count - Byte Count 128 <= x < 256 */
175#define FramesLen256_511Transmitted EMAC_TXC_LT512 /* Good TX Frame Count - Byte Count 256 <= x < 512 */
176#define FramesLen512_1023Transmitted EMAC_TXC_LT1024 /* Good TX Frame Count - Byte Count 512 <= x < 1024 */
177#define FramesLen1024_MaxTransmitted EMAC_TXC_GE1024 /* Good TX Frame Count - Byte Count x >= 1024 */
178#define TxAbortedFrames EMAC_TXC_ABORT /* Total TX Frames Aborted Count */
179
180/***********************************************************************************
181** System MMR Register Bits And Macros
182**
183** Disclaimer: All macros are intended to make C and Assembly code more readable.
184** Use these macros carefully, as any that do left shifts for field
185** depositing will result in the lower order bits being destroyed. Any
186** macro that shifts left to properly position the bit-field should be
187** used as part of an OR to initialize a register and NOT as a dynamic
188** modifier UNLESS the lower order bits are saved and ORed back in when
189** the macro is used.
190*************************************************************************************/
191
192/************************ ETHERNET 10/100 CONTROLLER MASKS ************************/
193
194/* EMAC_OPMODE Masks */
195
196#define RE 0x00000001 /* Receiver Enable */
197#define ASTP 0x00000002 /* Enable Automatic Pad Stripping On RX Frames */
198#define HU 0x00000010 /* Hash Filter Unicast Address */
199#define HM 0x00000020 /* Hash Filter Multicast Address */
200#define PAM 0x00000040 /* Pass-All-Multicast Mode Enable */
201#define PR 0x00000080 /* Promiscuous Mode Enable */
202#define IFE 0x00000100 /* Inverse Filtering Enable */
203#define DBF 0x00000200 /* Disable Broadcast Frame Reception */
204#define PBF 0x00000400 /* Pass Bad Frames Enable */
205#define PSF 0x00000800 /* Pass Short Frames Enable */
206#define RAF 0x00001000 /* Receive-All Mode */
207#define TE 0x00010000 /* Transmitter Enable */
208#define DTXPAD 0x00020000 /* Disable Automatic TX Padding */
209#define DTXCRC 0x00040000 /* Disable Automatic TX CRC Generation */
210#define DC 0x00080000 /* Deferral Check */
211#define BOLMT 0x00300000 /* Back-Off Limit */
212#define BOLMT_10 0x00000000 /* 10-bit range */
213#define BOLMT_8 0x00100000 /* 8-bit range */
214#define BOLMT_4 0x00200000 /* 4-bit range */
215#define BOLMT_1 0x00300000 /* 1-bit range */
216#define DRTY 0x00400000 /* Disable TX Retry On Collision */
217#define LCTRE 0x00800000 /* Enable TX Retry On Late Collision */
218#define RMII 0x01000000 /* RMII/MII* Mode */
219#define RMII_10 0x02000000 /* Speed Select for RMII Port (10MBit/100MBit*) */
220#define FDMODE 0x04000000 /* Duplex Mode Enable (Full/Half*) */
221#define LB 0x08000000 /* Internal Loopback Enable */
222#define DRO 0x10000000 /* Disable Receive Own Frames (Half-Duplex Mode) */
223
224/* EMAC_STAADD Masks */
225
226#define STABUSY 0x00000001 /* Initiate Station Mgt Reg Access / STA Busy Stat */
227#define STAOP 0x00000002 /* Station Management Operation Code (Write/Read*) */
228#define STADISPRE 0x00000004 /* Disable Preamble Generation */
229#define STAIE 0x00000008 /* Station Mgt. Transfer Done Interrupt Enable */
230#define REGAD 0x000007C0 /* STA Register Address */
231#define PHYAD 0x0000F800 /* PHY Device Address */
232
233#define SET_REGAD(x) (((x)&0x1F)<< 6 ) /* Set STA Register Address */
234#define SET_PHYAD(x) (((x)&0x1F)<< 11 ) /* Set PHY Device Address */
235
236/* EMAC_STADAT Mask */
237
238#define STADATA 0x0000FFFF /* Station Management Data */
239
240/* EMAC_FLC Masks */
241
242#define FLCBUSY 0x00000001 /* Send Flow Ctrl Frame / Flow Ctrl Busy Status */
243#define FLCE 0x00000002 /* Flow Control Enable */
244#define PCF 0x00000004 /* Pass Control Frames */
245#define BKPRSEN 0x00000008 /* Enable Backpressure */
246#define FLCPAUSE 0xFFFF0000 /* Pause Time */
247
248#define SET_FLCPAUSE(x) (((x)&0xFFFF)<< 16) /* Set Pause Time */
249
250/* EMAC_WKUP_CTL Masks */
251
252#define CAPWKFRM 0x00000001 /* Capture Wake-Up Frames */
253#define MPKE 0x00000002 /* Magic Packet Enable */
254#define RWKE 0x00000004 /* Remote Wake-Up Frame Enable */
255#define GUWKE 0x00000008 /* Global Unicast Wake Enable */
256#define MPKS 0x00000020 /* Magic Packet Received Status */
257#define RWKS 0x00000F00 /* Wake-Up Frame Received Status, Filters 3:0 */
258
259/* EMAC_WKUP_FFCMD Masks */
260
261#define WF0_E 0x00000001 /* Enable Wake-Up Filter 0 */
262#define WF0_T 0x00000008 /* Wake-Up Filter 0 Addr Type (Multicast/Unicast*) */
263#define WF1_E 0x00000100 /* Enable Wake-Up Filter 1 */
264#define WF1_T 0x00000800 /* Wake-Up Filter 1 Addr Type (Multicast/Unicast*) */
265#define WF2_E 0x00010000 /* Enable Wake-Up Filter 2 */
266#define WF2_T 0x00080000 /* Wake-Up Filter 2 Addr Type (Multicast/Unicast*) */
267#define WF3_E 0x01000000 /* Enable Wake-Up Filter 3 */
268#define WF3_T 0x08000000 /* Wake-Up Filter 3 Addr Type (Multicast/Unicast*) */
269
270/* EMAC_WKUP_FFOFF Masks */
271
272#define WF0_OFF 0x000000FF /* Wake-Up Filter 0 Pattern Offset */
273#define WF1_OFF 0x0000FF00 /* Wake-Up Filter 1 Pattern Offset */
274#define WF2_OFF 0x00FF0000 /* Wake-Up Filter 2 Pattern Offset */
275#define WF3_OFF 0xFF000000 /* Wake-Up Filter 3 Pattern Offset */
276
277#define SET_WF0_OFF(x) (((x)&0xFF)<< 0 ) /* Set Wake-Up Filter 0 Byte Offset */
278#define SET_WF1_OFF(x) (((x)&0xFF)<< 8 ) /* Set Wake-Up Filter 1 Byte Offset */
279#define SET_WF2_OFF(x) (((x)&0xFF)<< 16 ) /* Set Wake-Up Filter 2 Byte Offset */
280#define SET_WF3_OFF(x) (((x)&0xFF)<< 24 ) /* Set Wake-Up Filter 3 Byte Offset */
281/* Set ALL Offsets */
282#define SET_WF_OFFS(x0,x1,x2,x3) (SET_WF0_OFF((x0))|SET_WF1_OFF((x1))|SET_WF2_OFF((x2))|SET_WF3_OFF((x3)))
283
284/* EMAC_WKUP_FFCRC0 Masks */
285
286#define WF0_CRC 0x0000FFFF /* Wake-Up Filter 0 Pattern CRC */
287#define WF1_CRC 0xFFFF0000 /* Wake-Up Filter 1 Pattern CRC */
288
289#define SET_WF0_CRC(x) (((x)&0xFFFF)<< 0 ) /* Set Wake-Up Filter 0 Target CRC */
290#define SET_WF1_CRC(x) (((x)&0xFFFF)<< 16 ) /* Set Wake-Up Filter 1 Target CRC */
291
292/* EMAC_WKUP_FFCRC1 Masks */
293
294#define WF2_CRC 0x0000FFFF /* Wake-Up Filter 2 Pattern CRC */
295#define WF3_CRC 0xFFFF0000 /* Wake-Up Filter 3 Pattern CRC */
296
297#define SET_WF2_CRC(x) (((x)&0xFFFF)<< 0 ) /* Set Wake-Up Filter 2 Target CRC */
298#define SET_WF3_CRC(x) (((x)&0xFFFF)<< 16 ) /* Set Wake-Up Filter 3 Target CRC */
299
300/* EMAC_SYSCTL Masks */
301
302#define PHYIE 0x00000001 /* PHY_INT Interrupt Enable */
303#define RXDWA 0x00000002 /* Receive Frame DMA Word Alignment (Odd/Even*) */
304#define RXCKS 0x00000004 /* Enable RX Frame TCP/UDP Checksum Computation */
305#define TXDWA 0x00000010 /* Transmit Frame DMA Word Alignment (Odd/Even*) */
306#define MDCDIV 0x00003F00 /* SCLK:MDC Clock Divisor [MDC=SCLK/(2*(N+1))] */
307
308#define SET_MDCDIV(x) (((x)&0x3F)<< 8) /* Set MDC Clock Divisor */
309
310/* EMAC_SYSTAT Masks */
311
312#define PHYINT 0x00000001 /* PHY_INT Interrupt Status */
313#define MMCINT 0x00000002 /* MMC Counter Interrupt Status */
314#define RXFSINT 0x00000004 /* RX Frame-Status Interrupt Status */
315#define TXFSINT 0x00000008 /* TX Frame-Status Interrupt Status */
316#define WAKEDET 0x00000010 /* Wake-Up Detected Status */
317#define RXDMAERR 0x00000020 /* RX DMA Direction Error Status */
318#define TXDMAERR 0x00000040 /* TX DMA Direction Error Status */
319#define STMDONE 0x00000080 /* Station Mgt. Transfer Done Interrupt Status */
320
321/* EMAC_RX_STAT, EMAC_RX_STKY, and EMAC_RX_IRQE Masks */
322
323#define RX_FRLEN 0x000007FF /* Frame Length In Bytes */
324#define RX_COMP 0x00001000 /* RX Frame Complete */
325#define RX_OK 0x00002000 /* RX Frame Received With No Errors */
326#define RX_LONG 0x00004000 /* RX Frame Too Long Error */
327#define RX_ALIGN 0x00008000 /* RX Frame Alignment Error */
328#define RX_CRC 0x00010000 /* RX Frame CRC Error */
329#define RX_LEN 0x00020000 /* RX Frame Length Error */
330#define RX_FRAG 0x00040000 /* RX Frame Fragment Error */
331#define RX_ADDR 0x00080000 /* RX Frame Address Filter Failed Error */
332#define RX_DMAO 0x00100000 /* RX Frame DMA Overrun Error */
333#define RX_PHY 0x00200000 /* RX Frame PHY Error */
334#define RX_LATE 0x00400000 /* RX Frame Late Collision Error */
335#define RX_RANGE 0x00800000 /* RX Frame Length Field Out of Range Error */
336#define RX_MULTI 0x01000000 /* RX Multicast Frame Indicator */
337#define RX_BROAD 0x02000000 /* RX Broadcast Frame Indicator */
338#define RX_CTL 0x04000000 /* RX Control Frame Indicator */
339#define RX_UCTL 0x08000000 /* Unsupported RX Control Frame Indicator */
340#define RX_TYPE 0x10000000 /* RX Typed Frame Indicator */
341#define RX_VLAN1 0x20000000 /* RX VLAN1 Frame Indicator */
342#define RX_VLAN2 0x40000000 /* RX VLAN2 Frame Indicator */
343#define RX_ACCEPT 0x80000000 /* RX Frame Accepted Indicator */
344
345/* EMAC_TX_STAT, EMAC_TX_STKY, and EMAC_TX_IRQE Masks */
346
347#define TX_COMP 0x00000001 /* TX Frame Complete */
348#define TX_OK 0x00000002 /* TX Frame Sent With No Errors */
349#define TX_ECOLL 0x00000004 /* TX Frame Excessive Collision Error */
350#define TX_LATE 0x00000008 /* TX Frame Late Collision Error */
351#define TX_DMAU 0x00000010 /* TX Frame DMA Underrun Error (STAT) */
352#define TX_MACE 0x00000010 /* Internal MAC Error Detected (STKY and IRQE) */
353#define TX_EDEFER 0x00000020 /* TX Frame Excessive Deferral Error */
354#define TX_BROAD 0x00000040 /* TX Broadcast Frame Indicator */
355#define TX_MULTI 0x00000080 /* TX Multicast Frame Indicator */
356#define TX_CCNT 0x00000F00 /* TX Frame Collision Count */
357#define TX_DEFER 0x00001000 /* TX Frame Deferred Indicator */
358#define TX_CRS 0x00002000 /* TX Frame Carrier Sense Not Asserted Error */
359#define TX_LOSS 0x00004000 /* TX Frame Carrier Lost During TX Error */
360#define TX_RETRY 0x00008000 /* TX Frame Successful After Retry */
361#define TX_FRLEN 0x07FF0000 /* TX Frame Length (Bytes) */
362
363/* EMAC_MMC_CTL Masks */
364#define RSTC 0x00000001 /* Reset All Counters */
365#define CROLL 0x00000002 /* Counter Roll-Over Enable */
366#define CCOR 0x00000004 /* Counter Clear-On-Read Mode Enable */
367#define MMCE 0x00000008 /* Enable MMC Counter Operation */
368
369/* EMAC_MMC_RIRQS and EMAC_MMC_RIRQE Masks */
370#define RX_OK_CNT 0x00000001 /* RX Frames Received With No Errors */
371#define RX_FCS_CNT 0x00000002 /* RX Frames W/Frame Check Sequence Errors */
372#define RX_ALIGN_CNT 0x00000004 /* RX Frames With Alignment Errors */
373#define RX_OCTET_CNT 0x00000008 /* RX Octets Received OK */
374#define RX_LOST_CNT 0x00000010 /* RX Frames Lost Due To Internal MAC RX Error */
375#define RX_UNI_CNT 0x00000020 /* Unicast RX Frames Received OK */
376#define RX_MULTI_CNT 0x00000040 /* Multicast RX Frames Received OK */
377#define RX_BROAD_CNT 0x00000080 /* Broadcast RX Frames Received OK */
378#define RX_IRL_CNT 0x00000100 /* RX Frames With In-Range Length Errors */
379#define RX_ORL_CNT 0x00000200 /* RX Frames With Out-Of-Range Length Errors */
380#define RX_LONG_CNT 0x00000400 /* RX Frames With Frame Too Long Errors */
381#define RX_MACCTL_CNT 0x00000800 /* MAC Control RX Frames Received */
382#define RX_OPCODE_CTL 0x00001000 /* Unsupported Op-Code RX Frames Received */
383#define RX_PAUSE_CNT 0x00002000 /* PAUSEMAC Control RX Frames Received */
384#define RX_ALLF_CNT 0x00004000 /* All RX Frames Received */
385#define RX_ALLO_CNT 0x00008000 /* All RX Octets Received */
386#define RX_TYPED_CNT 0x00010000 /* Typed RX Frames Received */
387#define RX_SHORT_CNT 0x00020000 /* RX Frame Fragments (< 64 Bytes) Received */
388#define RX_EQ64_CNT 0x00040000 /* 64-Byte RX Frames Received */
389#define RX_LT128_CNT 0x00080000 /* 65-127-Byte RX Frames Received */
390#define RX_LT256_CNT 0x00100000 /* 128-255-Byte RX Frames Received */
391#define RX_LT512_CNT 0x00200000 /* 256-511-Byte RX Frames Received */
392#define RX_LT1024_CNT 0x00400000 /* 512-1023-Byte RX Frames Received */
393#define RX_GE1024_CNT 0x00800000 /* 1024-Max-Byte RX Frames Received */
394
395/* EMAC_MMC_TIRQS and EMAC_MMC_TIRQE Masks */
396
397#define TX_OK_CNT 0x00000001 /* TX Frames Sent OK */
398#define TX_SCOLL_CNT 0x00000002 /* TX Frames With Single Collisions */
399#define TX_MCOLL_CNT 0x00000004 /* TX Frames With Multiple Collisions */
400#define TX_OCTET_CNT 0x00000008 /* TX Octets Sent OK */
401#define TX_DEFER_CNT 0x00000010 /* TX Frames With Deferred Transmission */
402#define TX_LATE_CNT 0x00000020 /* TX Frames With Late Collisions */
403#define TX_ABORTC_CNT 0x00000040 /* TX Frames Aborted Due To Excess Collisions */
404#define TX_LOST_CNT 0x00000080 /* TX Frames Lost Due To Internal MAC TX Error */
405#define TX_CRS_CNT 0x00000100 /* TX Frames With Carrier Sense Errors */
406#define TX_UNI_CNT 0x00000200 /* Unicast TX Frames Sent */
407#define TX_MULTI_CNT 0x00000400 /* Multicast TX Frames Sent */
408#define TX_BROAD_CNT 0x00000800 /* Broadcast TX Frames Sent */
409#define TX_EXDEF_CTL 0x00001000 /* TX Frames With Excessive Deferral */
410#define TX_MACCTL_CNT 0x00002000 /* MAC Control TX Frames Sent */
411#define TX_ALLF_CNT 0x00004000 /* All TX Frames Sent */
412#define TX_ALLO_CNT 0x00008000 /* All TX Octets Sent */
413#define TX_EQ64_CNT 0x00010000 /* 64-Byte TX Frames Sent */
414#define TX_LT128_CNT 0x00020000 /* 65-127-Byte TX Frames Sent */
415#define TX_LT256_CNT 0x00040000 /* 128-255-Byte TX Frames Sent */
416#define TX_LT512_CNT 0x00080000 /* 256-511-Byte TX Frames Sent */
417#define TX_LT1024_CNT 0x00100000 /* 512-1023-Byte TX Frames Sent */
418#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */
419#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */
420
421/* USB Control Registers */
422
423#define USB_FADDR 0xffc03800 /* Function address register */
424#define USB_POWER 0xffc03804 /* Power management register */
425#define USB_INTRTX 0xffc03808 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
426#define USB_INTRRX 0xffc0380c /* Interrupt register for Rx endpoints 1 to 7 */
427#define USB_INTRTXE 0xffc03810 /* Interrupt enable register for IntrTx */
428#define USB_INTRRXE 0xffc03814 /* Interrupt enable register for IntrRx */
429#define USB_INTRUSB 0xffc03818 /* Interrupt register for common USB interrupts */
430#define USB_INTRUSBE 0xffc0381c /* Interrupt enable register for IntrUSB */
431#define USB_FRAME 0xffc03820 /* USB frame number */
432#define USB_INDEX 0xffc03824 /* Index register for selecting the indexed endpoint registers */
433#define USB_TESTMODE 0xffc03828 /* Enabled USB 20 test modes */
434#define USB_GLOBINTR 0xffc0382c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
435#define USB_GLOBAL_CTL 0xffc03830 /* Global Clock Control for the core */
436
437/* USB Packet Control Registers */
438
439#define USB_TX_MAX_PACKET 0xffc03840 /* Maximum packet size for Host Tx endpoint */
440#define USB_CSR0 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
441#define USB_TXCSR 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
442#define USB_RX_MAX_PACKET 0xffc03848 /* Maximum packet size for Host Rx endpoint */
443#define USB_RXCSR 0xffc0384c /* Control Status register for Host Rx endpoint */
444#define USB_COUNT0 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
445#define USB_RXCOUNT 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
446#define USB_TXTYPE 0xffc03854 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
447#define USB_NAKLIMIT0 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
448#define USB_TXINTERVAL 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
449#define USB_RXTYPE 0xffc0385c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
450#define USB_RXINTERVAL 0xffc03860 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
451#define USB_TXCOUNT 0xffc03868 /* Number of bytes to be written to the selected endpoint Tx FIFO */
452
453/* USB Endpoint FIFO Registers */
454
455#define USB_EP0_FIFO 0xffc03880 /* Endpoint 0 FIFO */
456#define USB_EP1_FIFO 0xffc03888 /* Endpoint 1 FIFO */
457#define USB_EP2_FIFO 0xffc03890 /* Endpoint 2 FIFO */
458#define USB_EP3_FIFO 0xffc03898 /* Endpoint 3 FIFO */
459#define USB_EP4_FIFO 0xffc038a0 /* Endpoint 4 FIFO */
460#define USB_EP5_FIFO 0xffc038a8 /* Endpoint 5 FIFO */
461#define USB_EP6_FIFO 0xffc038b0 /* Endpoint 6 FIFO */
462#define USB_EP7_FIFO 0xffc038b8 /* Endpoint 7 FIFO */
463
464/* USB OTG Control Registers */
465
466#define USB_OTG_DEV_CTL 0xffc03900 /* OTG Device Control Register */
467#define USB_OTG_VBUS_IRQ 0xffc03904 /* OTG VBUS Control Interrupts */
468#define USB_OTG_VBUS_MASK 0xffc03908 /* VBUS Control Interrupt Enable */
469
470/* USB Phy Control Registers */
471
472#define USB_LINKINFO 0xffc03948 /* Enables programming of some PHY-side delays */
473#define USB_VPLEN 0xffc0394c /* Determines duration of VBUS pulse for VBUS charging */
474#define USB_HS_EOF1 0xffc03950 /* Time buffer for High-Speed transactions */
475#define USB_FS_EOF1 0xffc03954 /* Time buffer for Full-Speed transactions */
476#define USB_LS_EOF1 0xffc03958 /* Time buffer for Low-Speed transactions */
477
478/* (APHY_CNTRL is for ADI usage only) */
479
480#define USB_APHY_CNTRL 0xffc039e0 /* Register that increases visibility of Analog PHY */
481
482/* (APHY_CALIB is for ADI usage only) */
483
484#define USB_APHY_CALIB 0xffc039e4 /* Register used to set some calibration values */
485
486#define USB_APHY_CNTRL2 0xffc039e8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
487
488/* (PHY_TEST is for ADI usage only) */
489
490#define USB_PHY_TEST 0xffc039ec /* Used for reducing simulation time and simplifies FIFO testability */
491
492#define USB_PLLOSC_CTRL 0xffc039f0 /* Used to program different parameters for USB PLL and Oscillator */
493#define USB_SRP_CLKDIV 0xffc039f4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
494
495/* USB Endpoint 0 Control Registers */
496
497#define USB_EP_NI0_TXMAXP 0xffc03a00 /* Maximum packet size for Host Tx endpoint0 */
498#define USB_EP_NI0_TXCSR 0xffc03a04 /* Control Status register for endpoint 0 */
499#define USB_EP_NI0_RXMAXP 0xffc03a08 /* Maximum packet size for Host Rx endpoint0 */
500#define USB_EP_NI0_RXCSR 0xffc03a0c /* Control Status register for Host Rx endpoint0 */
501#define USB_EP_NI0_RXCOUNT 0xffc03a10 /* Number of bytes received in endpoint 0 FIFO */
502#define USB_EP_NI0_TXTYPE 0xffc03a14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
503#define USB_EP_NI0_TXINTERVAL 0xffc03a18 /* Sets the NAK response timeout on Endpoint 0 */
504#define USB_EP_NI0_RXTYPE 0xffc03a1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
505#define USB_EP_NI0_RXINTERVAL 0xffc03a20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
506#define USB_EP_NI0_TXCOUNT 0xffc03a28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
507
508/* USB Endpoint 1 Control Registers */
509
510#define USB_EP_NI1_TXMAXP 0xffc03a40 /* Maximum packet size for Host Tx endpoint1 */
511#define USB_EP_NI1_TXCSR 0xffc03a44 /* Control Status register for endpoint1 */
512#define USB_EP_NI1_RXMAXP 0xffc03a48 /* Maximum packet size for Host Rx endpoint1 */
513#define USB_EP_NI1_RXCSR 0xffc03a4c /* Control Status register for Host Rx endpoint1 */
514#define USB_EP_NI1_RXCOUNT 0xffc03a50 /* Number of bytes received in endpoint1 FIFO */
515#define USB_EP_NI1_TXTYPE 0xffc03a54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
516#define USB_EP_NI1_TXINTERVAL 0xffc03a58 /* Sets the NAK response timeout on Endpoint1 */
517#define USB_EP_NI1_RXTYPE 0xffc03a5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
518#define USB_EP_NI1_RXINTERVAL 0xffc03a60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
519#define USB_EP_NI1_TXCOUNT 0xffc03a68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
520
521/* USB Endpoint 2 Control Registers */
522
523#define USB_EP_NI2_TXMAXP 0xffc03a80 /* Maximum packet size for Host Tx endpoint2 */
524#define USB_EP_NI2_TXCSR 0xffc03a84 /* Control Status register for endpoint2 */
525#define USB_EP_NI2_RXMAXP 0xffc03a88 /* Maximum packet size for Host Rx endpoint2 */
526#define USB_EP_NI2_RXCSR 0xffc03a8c /* Control Status register for Host Rx endpoint2 */
527#define USB_EP_NI2_RXCOUNT 0xffc03a90 /* Number of bytes received in endpoint2 FIFO */
528#define USB_EP_NI2_TXTYPE 0xffc03a94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
529#define USB_EP_NI2_TXINTERVAL 0xffc03a98 /* Sets the NAK response timeout on Endpoint2 */
530#define USB_EP_NI2_RXTYPE 0xffc03a9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
531#define USB_EP_NI2_RXINTERVAL 0xffc03aa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
532#define USB_EP_NI2_TXCOUNT 0xffc03aa8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
533
534/* USB Endpoint 3 Control Registers */
535
536#define USB_EP_NI3_TXMAXP 0xffc03ac0 /* Maximum packet size for Host Tx endpoint3 */
537#define USB_EP_NI3_TXCSR 0xffc03ac4 /* Control Status register for endpoint3 */
538#define USB_EP_NI3_RXMAXP 0xffc03ac8 /* Maximum packet size for Host Rx endpoint3 */
539#define USB_EP_NI3_RXCSR 0xffc03acc /* Control Status register for Host Rx endpoint3 */
540#define USB_EP_NI3_RXCOUNT 0xffc03ad0 /* Number of bytes received in endpoint3 FIFO */
541#define USB_EP_NI3_TXTYPE 0xffc03ad4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
542#define USB_EP_NI3_TXINTERVAL 0xffc03ad8 /* Sets the NAK response timeout on Endpoint3 */
543#define USB_EP_NI3_RXTYPE 0xffc03adc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
544#define USB_EP_NI3_RXINTERVAL 0xffc03ae0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
545#define USB_EP_NI3_TXCOUNT 0xffc03ae8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
546
547/* USB Endpoint 4 Control Registers */
548
549#define USB_EP_NI4_TXMAXP 0xffc03b00 /* Maximum packet size for Host Tx endpoint4 */
550#define USB_EP_NI4_TXCSR 0xffc03b04 /* Control Status register for endpoint4 */
551#define USB_EP_NI4_RXMAXP 0xffc03b08 /* Maximum packet size for Host Rx endpoint4 */
552#define USB_EP_NI4_RXCSR 0xffc03b0c /* Control Status register for Host Rx endpoint4 */
553#define USB_EP_NI4_RXCOUNT 0xffc03b10 /* Number of bytes received in endpoint4 FIFO */
554#define USB_EP_NI4_TXTYPE 0xffc03b14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
555#define USB_EP_NI4_TXINTERVAL 0xffc03b18 /* Sets the NAK response timeout on Endpoint4 */
556#define USB_EP_NI4_RXTYPE 0xffc03b1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
557#define USB_EP_NI4_RXINTERVAL 0xffc03b20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
558#define USB_EP_NI4_TXCOUNT 0xffc03b28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
559
560/* USB Endpoint 5 Control Registers */
561
562#define USB_EP_NI5_TXMAXP 0xffc03b40 /* Maximum packet size for Host Tx endpoint5 */
563#define USB_EP_NI5_TXCSR 0xffc03b44 /* Control Status register for endpoint5 */
564#define USB_EP_NI5_RXMAXP 0xffc03b48 /* Maximum packet size for Host Rx endpoint5 */
565#define USB_EP_NI5_RXCSR 0xffc03b4c /* Control Status register for Host Rx endpoint5 */
566#define USB_EP_NI5_RXCOUNT 0xffc03b50 /* Number of bytes received in endpoint5 FIFO */
567#define USB_EP_NI5_TXTYPE 0xffc03b54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
568#define USB_EP_NI5_TXINTERVAL 0xffc03b58 /* Sets the NAK response timeout on Endpoint5 */
569#define USB_EP_NI5_RXTYPE 0xffc03b5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
570#define USB_EP_NI5_RXINTERVAL 0xffc03b60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
571#define USB_EP_NI5_TXCOUNT 0xffc03b68 /* Number of bytes to be written to the endpoint5 Tx FIFO */
572
573/* USB Endpoint 6 Control Registers */
574
575#define USB_EP_NI6_TXMAXP 0xffc03b80 /* Maximum packet size for Host Tx endpoint6 */
576#define USB_EP_NI6_TXCSR 0xffc03b84 /* Control Status register for endpoint6 */
577#define USB_EP_NI6_RXMAXP 0xffc03b88 /* Maximum packet size for Host Rx endpoint6 */
578#define USB_EP_NI6_RXCSR 0xffc03b8c /* Control Status register for Host Rx endpoint6 */
579#define USB_EP_NI6_RXCOUNT 0xffc03b90 /* Number of bytes received in endpoint6 FIFO */
580#define USB_EP_NI6_TXTYPE 0xffc03b94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
581#define USB_EP_NI6_TXINTERVAL 0xffc03b98 /* Sets the NAK response timeout on Endpoint6 */
582#define USB_EP_NI6_RXTYPE 0xffc03b9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
583#define USB_EP_NI6_RXINTERVAL 0xffc03ba0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
584#define USB_EP_NI6_TXCOUNT 0xffc03ba8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
585
586/* USB Endpoint 7 Control Registers */
587
588#define USB_EP_NI7_TXMAXP 0xffc03bc0 /* Maximum packet size for Host Tx endpoint7 */
589#define USB_EP_NI7_TXCSR 0xffc03bc4 /* Control Status register for endpoint7 */
590#define USB_EP_NI7_RXMAXP 0xffc03bc8 /* Maximum packet size for Host Rx endpoint7 */
591#define USB_EP_NI7_RXCSR 0xffc03bcc /* Control Status register for Host Rx endpoint7 */
592#define USB_EP_NI7_RXCOUNT 0xffc03bd0 /* Number of bytes received in endpoint7 FIFO */
593#define USB_EP_NI7_TXTYPE 0xffc03bd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
594#define USB_EP_NI7_TXINTERVAL 0xffc03bd8 /* Sets the NAK response timeout on Endpoint7 */
595#define USB_EP_NI7_RXTYPE 0xffc03bdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
596#define USB_EP_NI7_RXINTERVAL 0xffc03bf0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
597#define USB_EP_NI7_TXCOUNT 0xffc03bf8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
598
599#define USB_DMA_INTERRUPT 0xffc03c00 /* Indicates pending interrupts for the DMA channels */
600
601/* USB Channel 0 Config Registers */
602
603#define USB_DMA0CONTROL 0xffc03c04 /* DMA master channel 0 configuration */
604#define USB_DMA0ADDRLOW 0xffc03c08 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
605#define USB_DMA0ADDRHIGH 0xffc03c0c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
606#define USB_DMA0COUNTLOW 0xffc03c10 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
607#define USB_DMA0COUNTHIGH 0xffc03c14 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
608
609/* USB Channel 1 Config Registers */
610
611#define USB_DMA1CONTROL 0xffc03c24 /* DMA master channel 1 configuration */
612#define USB_DMA1ADDRLOW 0xffc03c28 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
613#define USB_DMA1ADDRHIGH 0xffc03c2c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
614#define USB_DMA1COUNTLOW 0xffc03c30 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
615#define USB_DMA1COUNTHIGH 0xffc03c34 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
616
617/* USB Channel 2 Config Registers */
618
619#define USB_DMA2CONTROL 0xffc03c44 /* DMA master channel 2 configuration */
620#define USB_DMA2ADDRLOW 0xffc03c48 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
621#define USB_DMA2ADDRHIGH 0xffc03c4c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
622#define USB_DMA2COUNTLOW 0xffc03c50 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
623#define USB_DMA2COUNTHIGH 0xffc03c54 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
624
625/* USB Channel 3 Config Registers */
626
627#define USB_DMA3CONTROL 0xffc03c64 /* DMA master channel 3 configuration */
628#define USB_DMA3ADDRLOW 0xffc03c68 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
629#define USB_DMA3ADDRHIGH 0xffc03c6c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
630#define USB_DMA3COUNTLOW 0xffc03c70 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
631#define USB_DMA3COUNTHIGH 0xffc03c74 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
632
633/* USB Channel 4 Config Registers */
634
635#define USB_DMA4CONTROL 0xffc03c84 /* DMA master channel 4 configuration */
636#define USB_DMA4ADDRLOW 0xffc03c88 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
637#define USB_DMA4ADDRHIGH 0xffc03c8c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
638#define USB_DMA4COUNTLOW 0xffc03c90 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
639#define USB_DMA4COUNTHIGH 0xffc03c94 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
640
641/* USB Channel 5 Config Registers */
642
643#define USB_DMA5CONTROL 0xffc03ca4 /* DMA master channel 5 configuration */
644#define USB_DMA5ADDRLOW 0xffc03ca8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
645#define USB_DMA5ADDRHIGH 0xffc03cac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
646#define USB_DMA5COUNTLOW 0xffc03cb0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
647#define USB_DMA5COUNTHIGH 0xffc03cb4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
648
649/* USB Channel 6 Config Registers */
650
651#define USB_DMA6CONTROL 0xffc03cc4 /* DMA master channel 6 configuration */
652#define USB_DMA6ADDRLOW 0xffc03cc8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
653#define USB_DMA6ADDRHIGH 0xffc03ccc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
654#define USB_DMA6COUNTLOW 0xffc03cd0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
655#define USB_DMA6COUNTHIGH 0xffc03cd4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
656
657/* USB Channel 7 Config Registers */
658
659#define USB_DMA7CONTROL 0xffc03ce4 /* DMA master channel 7 configuration */
660#define USB_DMA7ADDRLOW 0xffc03ce8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
661#define USB_DMA7ADDRHIGH 0xffc03cec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
662#define USB_DMA7COUNTLOW 0xffc03cf0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
663#define USB_DMA7COUNTHIGH 0xffc03cf4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
664
665/* Bit masks for USB_FADDR */
666
667#define FUNCTION_ADDRESS 0x7f /* Function address */
668
669/* Bit masks for USB_POWER */
670
671#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
672#define nENABLE_SUSPENDM 0x0
673#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
674#define nSUSPEND_MODE 0x0
675#define RESUME_MODE 0x4 /* DMA Mode */
676#define nRESUME_MODE 0x0
677#define RESET 0x8 /* Reset indicator */
678#define nRESET 0x0
679#define HS_MODE 0x10 /* High Speed mode indicator */
680#define nHS_MODE 0x0
681#define HS_ENABLE 0x20 /* high Speed Enable */
682#define nHS_ENABLE 0x0
683#define SOFT_CONN 0x40 /* Soft connect */
684#define nSOFT_CONN 0x0
685#define ISO_UPDATE 0x80 /* Isochronous update */
686#define nISO_UPDATE 0x0
687
688/* Bit masks for USB_INTRTX */
689
690#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
691#define nEP0_TX 0x0
692#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
693#define nEP1_TX 0x0
694#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
695#define nEP2_TX 0x0
696#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
697#define nEP3_TX 0x0
698#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
699#define nEP4_TX 0x0
700#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
701#define nEP5_TX 0x0
702#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
703#define nEP6_TX 0x0
704#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
705#define nEP7_TX 0x0
706
707/* Bit masks for USB_INTRRX */
708
709#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
710#define nEP1_RX 0x0
711#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
712#define nEP2_RX 0x0
713#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
714#define nEP3_RX 0x0
715#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
716#define nEP4_RX 0x0
717#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
718#define nEP5_RX 0x0
719#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
720#define nEP6_RX 0x0
721#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
722#define nEP7_RX 0x0
723
724/* Bit masks for USB_INTRTXE */
725
726#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
727#define nEP0_TX_E 0x0
728#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
729#define nEP1_TX_E 0x0
730#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
731#define nEP2_TX_E 0x0
732#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
733#define nEP3_TX_E 0x0
734#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
735#define nEP4_TX_E 0x0
736#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
737#define nEP5_TX_E 0x0
738#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
739#define nEP6_TX_E 0x0
740#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
741#define nEP7_TX_E 0x0
742
743/* Bit masks for USB_INTRRXE */
744
745#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
746#define nEP1_RX_E 0x0
747#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
748#define nEP2_RX_E 0x0
749#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
750#define nEP3_RX_E 0x0
751#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
752#define nEP4_RX_E 0x0
753#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
754#define nEP5_RX_E 0x0
755#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
756#define nEP6_RX_E 0x0
757#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
758#define nEP7_RX_E 0x0
759
760/* Bit masks for USB_INTRUSB */
761
762#define SUSPEND_B 0x1 /* Suspend indicator */
763#define nSUSPEND_B 0x0
764#define RESUME_B 0x2 /* Resume indicator */
765#define nRESUME_B 0x0
766#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
767#define nRESET_OR_BABLE_B 0x0
768#define SOF_B 0x8 /* Start of frame */
769#define nSOF_B 0x0
770#define CONN_B 0x10 /* Connection indicator */
771#define nCONN_B 0x0
772#define DISCON_B 0x20 /* Disconnect indicator */
773#define nDISCON_B 0x0
774#define SESSION_REQ_B 0x40 /* Session Request */
775#define nSESSION_REQ_B 0x0
776#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
777#define nVBUS_ERROR_B 0x0
778
779/* Bit masks for USB_INTRUSBE */
780
781#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
782#define nSUSPEND_BE 0x0
783#define RESUME_BE 0x2 /* Resume indicator int enable */
784#define nRESUME_BE 0x0
785#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
786#define nRESET_OR_BABLE_BE 0x0
787#define SOF_BE 0x8 /* Start of frame int enable */
788#define nSOF_BE 0x0
789#define CONN_BE 0x10 /* Connection indicator int enable */
790#define nCONN_BE 0x0
791#define DISCON_BE 0x20 /* Disconnect indicator int enable */
792#define nDISCON_BE 0x0
793#define SESSION_REQ_BE 0x40 /* Session Request int enable */
794#define nSESSION_REQ_BE 0x0
795#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
796#define nVBUS_ERROR_BE 0x0
797
798/* Bit masks for USB_FRAME */
799
800#define FRAME_NUMBER 0x7ff /* Frame number */
801
802/* Bit masks for USB_INDEX */
803
804#define SELECTED_ENDPOINT 0xf /* selected endpoint */
805
806/* Bit masks for USB_GLOBAL_CTL */
807
808#define GLOBAL_ENA 0x1 /* enables USB module */
809#define nGLOBAL_ENA 0x0
810#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
811#define nEP1_TX_ENA 0x0
812#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
813#define nEP2_TX_ENA 0x0
814#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
815#define nEP3_TX_ENA 0x0
816#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
817#define nEP4_TX_ENA 0x0
818#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
819#define nEP5_TX_ENA 0x0
820#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
821#define nEP6_TX_ENA 0x0
822#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
823#define nEP7_TX_ENA 0x0
824#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
825#define nEP1_RX_ENA 0x0
826#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
827#define nEP2_RX_ENA 0x0
828#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
829#define nEP3_RX_ENA 0x0
830#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
831#define nEP4_RX_ENA 0x0
832#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
833#define nEP5_RX_ENA 0x0
834#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
835#define nEP6_RX_ENA 0x0
836#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
837#define nEP7_RX_ENA 0x0
838
839/* Bit masks for USB_OTG_DEV_CTL */
840
841#define SESSION 0x1 /* session indicator */
842#define nSESSION 0x0
843#define HOST_REQ 0x2 /* Host negotiation request */
844#define nHOST_REQ 0x0
845#define HOST_MODE 0x4 /* indicates USBDRC is a host */
846#define nHOST_MODE 0x0
847#define VBUS0 0x8 /* Vbus level indicator[0] */
848#define nVBUS0 0x0
849#define VBUS1 0x10 /* Vbus level indicator[1] */
850#define nVBUS1 0x0
851#define LSDEV 0x20 /* Low-speed indicator */
852#define nLSDEV 0x0
853#define FSDEV 0x40 /* Full or High-speed indicator */
854#define nFSDEV 0x0
855#define B_DEVICE 0x80 /* A' or 'B' device indicator */
856#define nB_DEVICE 0x0
857
858/* Bit masks for USB_OTG_VBUS_IRQ */
859
860#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
861#define nDRIVE_VBUS_ON 0x0
862#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
863#define nDRIVE_VBUS_OFF 0x0
864#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
865#define nCHRG_VBUS_START 0x0
866#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
867#define nCHRG_VBUS_END 0x0
868#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
869#define nDISCHRG_VBUS_START 0x0
870#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
871#define nDISCHRG_VBUS_END 0x0
872
873/* Bit masks for USB_OTG_VBUS_MASK */
874
875#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
876#define nDRIVE_VBUS_ON_ENA 0x0
877#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
878#define nDRIVE_VBUS_OFF_ENA 0x0
879#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
880#define nCHRG_VBUS_START_ENA 0x0
881#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
882#define nCHRG_VBUS_END_ENA 0x0
883#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
884#define nDISCHRG_VBUS_START_ENA 0x0
885#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
886#define nDISCHRG_VBUS_END_ENA 0x0
887
888/* Bit masks for USB_CSR0 */
889
890#define RXPKTRDY 0x1 /* data packet receive indicator */
891#define nRXPKTRDY 0x0
892#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
893#define nTXPKTRDY 0x0
894#define STALL_SENT 0x4 /* STALL handshake sent */
895#define nSTALL_SENT 0x0
896#define DATAEND 0x8 /* Data end indicator */
897#define nDATAEND 0x0
898#define SETUPEND 0x10 /* Setup end */
899#define nSETUPEND 0x0
900#define SENDSTALL 0x20 /* Send STALL handshake */
901#define nSENDSTALL 0x0
902#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
903#define nSERVICED_RXPKTRDY 0x0
904#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
905#define nSERVICED_SETUPEND 0x0
906#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
907#define nFLUSHFIFO 0x0
908#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
909#define nSTALL_RECEIVED_H 0x0
910#define SETUPPKT_H 0x8 /* send Setup token host mode */
911#define nSETUPPKT_H 0x0
912#define ERROR_H 0x10 /* timeout error indicator host mode */
913#define nERROR_H 0x0
914#define REQPKT_H 0x20 /* Request an IN transaction host mode */
915#define nREQPKT_H 0x0
916#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
917#define nSTATUSPKT_H 0x0
918#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
919#define nNAK_TIMEOUT_H 0x0
920
921/* Bit masks for USB_COUNT0 */
922
923#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
924
925/* Bit masks for USB_NAKLIMIT0 */
926
927#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
928
929/* Bit masks for USB_TX_MAX_PACKET */
930
931#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
932
933/* Bit masks for USB_RX_MAX_PACKET */
934
935#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
936
937/* Bit masks for USB_TXCSR */
938
939#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
940#define nTXPKTRDY_T 0x0
941#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
942#define nFIFO_NOT_EMPTY_T 0x0
943#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
944#define nUNDERRUN_T 0x0
945#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
946#define nFLUSHFIFO_T 0x0
947#define STALL_SEND_T 0x10 /* issue a Stall handshake */
948#define nSTALL_SEND_T 0x0
949#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
950#define nSTALL_SENT_T 0x0
951#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
952#define nCLEAR_DATATOGGLE_T 0x0
953#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
954#define nINCOMPTX_T 0x0
955#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
956#define nDMAREQMODE_T 0x0
957#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
958#define nFORCE_DATATOGGLE_T 0x0
959#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
960#define nDMAREQ_ENA_T 0x0
961#define ISO_T 0x4000 /* enable Isochronous transfers */
962#define nISO_T 0x0
963#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
964#define nAUTOSET_T 0x0
965#define ERROR_TH 0x4 /* error condition host mode */
966#define nERROR_TH 0x0
967#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
968#define nSTALL_RECEIVED_TH 0x0
969#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
970#define nNAK_TIMEOUT_TH 0x0
971
972/* Bit masks for USB_TXCOUNT */
973
974#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
975
976/* Bit masks for USB_RXCSR */
977
978#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
979#define nRXPKTRDY_R 0x0
980#define FIFO_FULL_R 0x2 /* FIFO not empty */
981#define nFIFO_FULL_R 0x0
982#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
983#define nOVERRUN_R 0x0
984#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
985#define nDATAERROR_R 0x0
986#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
987#define nFLUSHFIFO_R 0x0
988#define STALL_SEND_R 0x20 /* issue a Stall handshake */
989#define nSTALL_SEND_R 0x0
990#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
991#define nSTALL_SENT_R 0x0
992#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
993#define nCLEAR_DATATOGGLE_R 0x0
994#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
995#define nINCOMPRX_R 0x0
996#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
997#define nDMAREQMODE_R 0x0
998#define DISNYET_R 0x1000 /* disable Nyet handshakes */
999#define nDISNYET_R 0x0
1000#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
1001#define nDMAREQ_ENA_R 0x0
1002#define ISO_R 0x4000 /* enable Isochronous transfers */
1003#define nISO_R 0x0
1004#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
1005#define nAUTOCLEAR_R 0x0
1006#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
1007#define nERROR_RH 0x0
1008#define REQPKT_RH 0x20 /* request an IN transaction host mode */
1009#define nREQPKT_RH 0x0
1010#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
1011#define nSTALL_RECEIVED_RH 0x0
1012#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
1013#define nINCOMPRX_RH 0x0
1014#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
1015#define nDMAREQMODE_RH 0x0
1016#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
1017#define nAUTOREQ_RH 0x0
1018
1019/* Bit masks for USB_RXCOUNT */
1020
1021#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
1022
1023/* Bit masks for USB_TXTYPE */
1024
1025#define TARGET_EP_NO_T 0xf /* EP number */
1026#define PROTOCOL_T 0xc /* transfer type */
1027
1028/* Bit masks for USB_TXINTERVAL */
1029
1030#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
1031
1032/* Bit masks for USB_RXTYPE */
1033
1034#define TARGET_EP_NO_R 0xf /* EP number */
1035#define PROTOCOL_R 0xc /* transfer type */
1036
1037/* Bit masks for USB_RXINTERVAL */
1038
1039#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
1040
1041/* Bit masks for USB_DMA_INTERRUPT */
1042
1043#define DMA0_INT 0x1 /* DMA0 pending interrupt */
1044#define nDMA0_INT 0x0
1045#define DMA1_INT 0x2 /* DMA1 pending interrupt */
1046#define nDMA1_INT 0x0
1047#define DMA2_INT 0x4 /* DMA2 pending interrupt */
1048#define nDMA2_INT 0x0
1049#define DMA3_INT 0x8 /* DMA3 pending interrupt */
1050#define nDMA3_INT 0x0
1051#define DMA4_INT 0x10 /* DMA4 pending interrupt */
1052#define nDMA4_INT 0x0
1053#define DMA5_INT 0x20 /* DMA5 pending interrupt */
1054#define nDMA5_INT 0x0
1055#define DMA6_INT 0x40 /* DMA6 pending interrupt */
1056#define nDMA6_INT 0x0
1057#define DMA7_INT 0x80 /* DMA7 pending interrupt */
1058#define nDMA7_INT 0x0
1059
1060/* Bit masks for USB_DMAxCONTROL */
1061
1062#define DMA_ENA 0x1 /* DMA enable */
1063#define nDMA_ENA 0x0
1064#define DIRECTION 0x2 /* direction of DMA transfer */
1065#define nDIRECTION 0x0
1066#define MODE 0x4 /* DMA Bus error */
1067#define nMODE 0x0
1068#define INT_ENA 0x8 /* Interrupt enable */
1069#define nINT_ENA 0x0
1070#define EPNUM 0xf0 /* EP number */
1071#define BUSERROR 0x100 /* DMA Bus error */
1072#define nBUSERROR 0x0
1073
1074/* Bit masks for USB_DMAxADDRHIGH */
1075
1076#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
1077
1078/* Bit masks for USB_DMAxADDRLOW */
1079
1080#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
1081
1082/* Bit masks for USB_DMAxCOUNTHIGH */
1083
1084#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
1085
1086/* Bit masks for USB_DMAxCOUNTLOW */
1087
1088#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
1089
1090#endif /* _DEF_BF527_H */
diff --git a/include/asm-blackfin/mach-bf527/defBF52x_base.h b/include/asm-blackfin/mach-bf527/defBF52x_base.h
deleted file mode 100644
index fc69cf93f149..000000000000
--- a/include/asm-blackfin/mach-bf527/defBF52x_base.h
+++ /dev/null
@@ -1,2014 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/defBF52x_base.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF52X_H
32#define _DEF_BF52X_H
33
34
35/* ************************************************************** */
36/* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF52x */
37/* ************************************************************** */
38
39/* ==== begin from defBF534.h ==== */
40
41/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
42#define PLL_CTL 0xFFC00000 /* PLL Control Register */
43#define PLL_DIV 0xFFC00004 /* PLL Divide Register */
44#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register */
45#define PLL_STAT 0xFFC0000C /* PLL Status Register */
46#define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count Register */
47#define CHIPID 0xFFC00014 /* Device ID Register */
48
49
50/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
51#define SWRST 0xFFC00100 /* Software Reset Register */
52#define SYSCR 0xFFC00104 /* System Configuration Register */
53#define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */
54
55#define SIC_IMASK0 0xFFC0010C /* Interrupt Mask Register */
56#define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */
57#define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */
58#define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */
59#define SIC_IAR3 0xFFC0011C /* Interrupt Assignment Register 3 */
60#define SIC_ISR0 0xFFC00120 /* Interrupt Status Register */
61#define SIC_IWR0 0xFFC00124 /* Interrupt Wakeup Register */
62
63/* SIC Additions to ADSP-BF52x (0xFFC0014C - 0xFFC00162) */
64#define SIC_IMASK1 0xFFC0014C /* Interrupt Mask register of SIC2 */
65#define SIC_IAR4 0xFFC00150 /* Interrupt Assignment register4 */
66#define SIC_IAR5 0xFFC00154 /* Interrupt Assignment register5 */
67#define SIC_IAR6 0xFFC00158 /* Interrupt Assignment register6 */
68#define SIC_IAR7 0xFFC0015C /* Interrupt Assignment register7 */
69#define SIC_ISR1 0xFFC00160 /* Interrupt Statur register */
70#define SIC_IWR1 0xFFC00164 /* Interrupt Wakeup register */
71
72
73/* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */
74#define WDOG_CTL 0xFFC00200 /* Watchdog Control Register */
75#define WDOG_CNT 0xFFC00204 /* Watchdog Count Register */
76#define WDOG_STAT 0xFFC00208 /* Watchdog Status Register */
77
78
79/* Real Time Clock (0xFFC00300 - 0xFFC003FF) */
80#define RTC_STAT 0xFFC00300 /* RTC Status Register */
81#define RTC_ICTL 0xFFC00304 /* RTC Interrupt Control Register */
82#define RTC_ISTAT 0xFFC00308 /* RTC Interrupt Status Register */
83#define RTC_SWCNT 0xFFC0030C /* RTC Stopwatch Count Register */
84#define RTC_ALARM 0xFFC00310 /* RTC Alarm Time Register */
85#define RTC_FAST 0xFFC00314 /* RTC Prescaler Enable Register */
86#define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Alternate Macro */
87
88
89/* UART0 Controller (0xFFC00400 - 0xFFC004FF) */
90#define UART0_THR 0xFFC00400 /* Transmit Holding register */
91#define UART0_RBR 0xFFC00400 /* Receive Buffer register */
92#define UART0_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */
93#define UART0_IER 0xFFC00404 /* Interrupt Enable Register */
94#define UART0_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */
95#define UART0_IIR 0xFFC00408 /* Interrupt Identification Register */
96#define UART0_LCR 0xFFC0040C /* Line Control Register */
97#define UART0_MCR 0xFFC00410 /* Modem Control Register */
98#define UART0_LSR 0xFFC00414 /* Line Status Register */
99#define UART0_MSR 0xFFC00418 /* Modem Status Register */
100#define UART0_SCR 0xFFC0041C /* SCR Scratch Register */
101#define UART0_GCTL 0xFFC00424 /* Global Control Register */
102
103
104/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
105#define SPI0_REGBASE 0xFFC00500
106#define SPI_CTL 0xFFC00500 /* SPI Control Register */
107#define SPI_FLG 0xFFC00504 /* SPI Flag register */
108#define SPI_STAT 0xFFC00508 /* SPI Status register */
109#define SPI_TDBR 0xFFC0050C /* SPI Transmit Data Buffer Register */
110#define SPI_RDBR 0xFFC00510 /* SPI Receive Data Buffer Register */
111#define SPI_BAUD 0xFFC00514 /* SPI Baud rate Register */
112#define SPI_SHADOW 0xFFC00518 /* SPI_RDBR Shadow Register */
113
114
115/* TIMER0-7 Registers (0xFFC00600 - 0xFFC006FF) */
116#define TIMER0_CONFIG 0xFFC00600 /* Timer 0 Configuration Register */
117#define TIMER0_COUNTER 0xFFC00604 /* Timer 0 Counter Register */
118#define TIMER0_PERIOD 0xFFC00608 /* Timer 0 Period Register */
119#define TIMER0_WIDTH 0xFFC0060C /* Timer 0 Width Register */
120
121#define TIMER1_CONFIG 0xFFC00610 /* Timer 1 Configuration Register */
122#define TIMER1_COUNTER 0xFFC00614 /* Timer 1 Counter Register */
123#define TIMER1_PERIOD 0xFFC00618 /* Timer 1 Period Register */
124#define TIMER1_WIDTH 0xFFC0061C /* Timer 1 Width Register */
125
126#define TIMER2_CONFIG 0xFFC00620 /* Timer 2 Configuration Register */
127#define TIMER2_COUNTER 0xFFC00624 /* Timer 2 Counter Register */
128#define TIMER2_PERIOD 0xFFC00628 /* Timer 2 Period Register */
129#define TIMER2_WIDTH 0xFFC0062C /* Timer 2 Width Register */
130
131#define TIMER3_CONFIG 0xFFC00630 /* Timer 3 Configuration Register */
132#define TIMER3_COUNTER 0xFFC00634 /* Timer 3 Counter Register */
133#define TIMER3_PERIOD 0xFFC00638 /* Timer 3 Period Register */
134#define TIMER3_WIDTH 0xFFC0063C /* Timer 3 Width Register */
135
136#define TIMER4_CONFIG 0xFFC00640 /* Timer 4 Configuration Register */
137#define TIMER4_COUNTER 0xFFC00644 /* Timer 4 Counter Register */
138#define TIMER4_PERIOD 0xFFC00648 /* Timer 4 Period Register */
139#define TIMER4_WIDTH 0xFFC0064C /* Timer 4 Width Register */
140
141#define TIMER5_CONFIG 0xFFC00650 /* Timer 5 Configuration Register */
142#define TIMER5_COUNTER 0xFFC00654 /* Timer 5 Counter Register */
143#define TIMER5_PERIOD 0xFFC00658 /* Timer 5 Period Register */
144#define TIMER5_WIDTH 0xFFC0065C /* Timer 5 Width Register */
145
146#define TIMER6_CONFIG 0xFFC00660 /* Timer 6 Configuration Register */
147#define TIMER6_COUNTER 0xFFC00664 /* Timer 6 Counter Register */
148#define TIMER6_PERIOD 0xFFC00668 /* Timer 6 Period Register */
149#define TIMER6_WIDTH 0xFFC0066C /* Timer 6 Width Register */
150
151#define TIMER7_CONFIG 0xFFC00670 /* Timer 7 Configuration Register */
152#define TIMER7_COUNTER 0xFFC00674 /* Timer 7 Counter Register */
153#define TIMER7_PERIOD 0xFFC00678 /* Timer 7 Period Register */
154#define TIMER7_WIDTH 0xFFC0067C /* Timer 7 Width Register */
155
156#define TIMER_ENABLE 0xFFC00680 /* Timer Enable Register */
157#define TIMER_DISABLE 0xFFC00684 /* Timer Disable Register */
158#define TIMER_STATUS 0xFFC00688 /* Timer Status Register */
159
160
161/* General Purpose I/O Port F (0xFFC00700 - 0xFFC007FF) */
162#define PORTFIO 0xFFC00700 /* Port F I/O Pin State Specify Register */
163#define PORTFIO_CLEAR 0xFFC00704 /* Port F I/O Peripheral Interrupt Clear Register */
164#define PORTFIO_SET 0xFFC00708 /* Port F I/O Peripheral Interrupt Set Register */
165#define PORTFIO_TOGGLE 0xFFC0070C /* Port F I/O Pin State Toggle Register */
166#define PORTFIO_MASKA 0xFFC00710 /* Port F I/O Mask State Specify Interrupt A Register */
167#define PORTFIO_MASKA_CLEAR 0xFFC00714 /* Port F I/O Mask Disable Interrupt A Register */
168#define PORTFIO_MASKA_SET 0xFFC00718 /* Port F I/O Mask Enable Interrupt A Register */
169#define PORTFIO_MASKA_TOGGLE 0xFFC0071C /* Port F I/O Mask Toggle Enable Interrupt A Register */
170#define PORTFIO_MASKB 0xFFC00720 /* Port F I/O Mask State Specify Interrupt B Register */
171#define PORTFIO_MASKB_CLEAR 0xFFC00724 /* Port F I/O Mask Disable Interrupt B Register */
172#define PORTFIO_MASKB_SET 0xFFC00728 /* Port F I/O Mask Enable Interrupt B Register */
173#define PORTFIO_MASKB_TOGGLE 0xFFC0072C /* Port F I/O Mask Toggle Enable Interrupt B Register */
174#define PORTFIO_DIR 0xFFC00730 /* Port F I/O Direction Register */
175#define PORTFIO_POLAR 0xFFC00734 /* Port F I/O Source Polarity Register */
176#define PORTFIO_EDGE 0xFFC00738 /* Port F I/O Source Sensitivity Register */
177#define PORTFIO_BOTH 0xFFC0073C /* Port F I/O Set on BOTH Edges Register */
178#define PORTFIO_INEN 0xFFC00740 /* Port F I/O Input Enable Register */
179
180
181/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
182#define SPORT0_TCR1 0xFFC00800 /* SPORT0 Transmit Configuration 1 Register */
183#define SPORT0_TCR2 0xFFC00804 /* SPORT0 Transmit Configuration 2 Register */
184#define SPORT0_TCLKDIV 0xFFC00808 /* SPORT0 Transmit Clock Divider */
185#define SPORT0_TFSDIV 0xFFC0080C /* SPORT0 Transmit Frame Sync Divider */
186#define SPORT0_TX 0xFFC00810 /* SPORT0 TX Data Register */
187#define SPORT0_RX 0xFFC00818 /* SPORT0 RX Data Register */
188#define SPORT0_RCR1 0xFFC00820 /* SPORT0 Transmit Configuration 1 Register */
189#define SPORT0_RCR2 0xFFC00824 /* SPORT0 Transmit Configuration 2 Register */
190#define SPORT0_RCLKDIV 0xFFC00828 /* SPORT0 Receive Clock Divider */
191#define SPORT0_RFSDIV 0xFFC0082C /* SPORT0 Receive Frame Sync Divider */
192#define SPORT0_STAT 0xFFC00830 /* SPORT0 Status Register */
193#define SPORT0_CHNL 0xFFC00834 /* SPORT0 Current Channel Register */
194#define SPORT0_MCMC1 0xFFC00838 /* SPORT0 Multi-Channel Configuration Register 1 */
195#define SPORT0_MCMC2 0xFFC0083C /* SPORT0 Multi-Channel Configuration Register 2 */
196#define SPORT0_MTCS0 0xFFC00840 /* SPORT0 Multi-Channel Transmit Select Register 0 */
197#define SPORT0_MTCS1 0xFFC00844 /* SPORT0 Multi-Channel Transmit Select Register 1 */
198#define SPORT0_MTCS2 0xFFC00848 /* SPORT0 Multi-Channel Transmit Select Register 2 */
199#define SPORT0_MTCS3 0xFFC0084C /* SPORT0 Multi-Channel Transmit Select Register 3 */
200#define SPORT0_MRCS0 0xFFC00850 /* SPORT0 Multi-Channel Receive Select Register 0 */
201#define SPORT0_MRCS1 0xFFC00854 /* SPORT0 Multi-Channel Receive Select Register 1 */
202#define SPORT0_MRCS2 0xFFC00858 /* SPORT0 Multi-Channel Receive Select Register 2 */
203#define SPORT0_MRCS3 0xFFC0085C /* SPORT0 Multi-Channel Receive Select Register 3 */
204
205
206/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
207#define SPORT1_TCR1 0xFFC00900 /* SPORT1 Transmit Configuration 1 Register */
208#define SPORT1_TCR2 0xFFC00904 /* SPORT1 Transmit Configuration 2 Register */
209#define SPORT1_TCLKDIV 0xFFC00908 /* SPORT1 Transmit Clock Divider */
210#define SPORT1_TFSDIV 0xFFC0090C /* SPORT1 Transmit Frame Sync Divider */
211#define SPORT1_TX 0xFFC00910 /* SPORT1 TX Data Register */
212#define SPORT1_RX 0xFFC00918 /* SPORT1 RX Data Register */
213#define SPORT1_RCR1 0xFFC00920 /* SPORT1 Transmit Configuration 1 Register */
214#define SPORT1_RCR2 0xFFC00924 /* SPORT1 Transmit Configuration 2 Register */
215#define SPORT1_RCLKDIV 0xFFC00928 /* SPORT1 Receive Clock Divider */
216#define SPORT1_RFSDIV 0xFFC0092C /* SPORT1 Receive Frame Sync Divider */
217#define SPORT1_STAT 0xFFC00930 /* SPORT1 Status Register */
218#define SPORT1_CHNL 0xFFC00934 /* SPORT1 Current Channel Register */
219#define SPORT1_MCMC1 0xFFC00938 /* SPORT1 Multi-Channel Configuration Register 1 */
220#define SPORT1_MCMC2 0xFFC0093C /* SPORT1 Multi-Channel Configuration Register 2 */
221#define SPORT1_MTCS0 0xFFC00940 /* SPORT1 Multi-Channel Transmit Select Register 0 */
222#define SPORT1_MTCS1 0xFFC00944 /* SPORT1 Multi-Channel Transmit Select Register 1 */
223#define SPORT1_MTCS2 0xFFC00948 /* SPORT1 Multi-Channel Transmit Select Register 2 */
224#define SPORT1_MTCS3 0xFFC0094C /* SPORT1 Multi-Channel Transmit Select Register 3 */
225#define SPORT1_MRCS0 0xFFC00950 /* SPORT1 Multi-Channel Receive Select Register 0 */
226#define SPORT1_MRCS1 0xFFC00954 /* SPORT1 Multi-Channel Receive Select Register 1 */
227#define SPORT1_MRCS2 0xFFC00958 /* SPORT1 Multi-Channel Receive Select Register 2 */
228#define SPORT1_MRCS3 0xFFC0095C /* SPORT1 Multi-Channel Receive Select Register 3 */
229
230
231/* External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
232#define EBIU_AMGCTL 0xFFC00A00 /* Asynchronous Memory Global Control Register */
233#define EBIU_AMBCTL0 0xFFC00A04 /* Asynchronous Memory Bank Control Register 0 */
234#define EBIU_AMBCTL1 0xFFC00A08 /* Asynchronous Memory Bank Control Register 1 */
235#define EBIU_SDGCTL 0xFFC00A10 /* SDRAM Global Control Register */
236#define EBIU_SDBCTL 0xFFC00A14 /* SDRAM Bank Control Register */
237#define EBIU_SDRRC 0xFFC00A18 /* SDRAM Refresh Rate Control Register */
238#define EBIU_SDSTAT 0xFFC00A1C /* SDRAM Status Register */
239
240
241/* DMA Traffic Control Registers */
242#define DMA_TC_PER 0xFFC00B0C /* Traffic Control Periods Register */
243#define DMA_TC_CNT 0xFFC00B10 /* Traffic Control Current Counts Register */
244
245/* Alternate deprecated register names (below) provided for backwards code compatibility */
246#define DMA_TCPER 0xFFC00B0C /* Traffic Control Periods Register */
247#define DMA_TCCNT 0xFFC00B10 /* Traffic Control Current Counts Register */
248
249/* DMA Controller (0xFFC00C00 - 0xFFC00FFF) */
250#define DMA0_NEXT_DESC_PTR 0xFFC00C00 /* DMA Channel 0 Next Descriptor Pointer Register */
251#define DMA0_START_ADDR 0xFFC00C04 /* DMA Channel 0 Start Address Register */
252#define DMA0_CONFIG 0xFFC00C08 /* DMA Channel 0 Configuration Register */
253#define DMA0_X_COUNT 0xFFC00C10 /* DMA Channel 0 X Count Register */
254#define DMA0_X_MODIFY 0xFFC00C14 /* DMA Channel 0 X Modify Register */
255#define DMA0_Y_COUNT 0xFFC00C18 /* DMA Channel 0 Y Count Register */
256#define DMA0_Y_MODIFY 0xFFC00C1C /* DMA Channel 0 Y Modify Register */
257#define DMA0_CURR_DESC_PTR 0xFFC00C20 /* DMA Channel 0 Current Descriptor Pointer Register */
258#define DMA0_CURR_ADDR 0xFFC00C24 /* DMA Channel 0 Current Address Register */
259#define DMA0_IRQ_STATUS 0xFFC00C28 /* DMA Channel 0 Interrupt/Status Register */
260#define DMA0_PERIPHERAL_MAP 0xFFC00C2C /* DMA Channel 0 Peripheral Map Register */
261#define DMA0_CURR_X_COUNT 0xFFC00C30 /* DMA Channel 0 Current X Count Register */
262#define DMA0_CURR_Y_COUNT 0xFFC00C38 /* DMA Channel 0 Current Y Count Register */
263
264#define DMA1_NEXT_DESC_PTR 0xFFC00C40 /* DMA Channel 1 Next Descriptor Pointer Register */
265#define DMA1_START_ADDR 0xFFC00C44 /* DMA Channel 1 Start Address Register */
266#define DMA1_CONFIG 0xFFC00C48 /* DMA Channel 1 Configuration Register */
267#define DMA1_X_COUNT 0xFFC00C50 /* DMA Channel 1 X Count Register */
268#define DMA1_X_MODIFY 0xFFC00C54 /* DMA Channel 1 X Modify Register */
269#define DMA1_Y_COUNT 0xFFC00C58 /* DMA Channel 1 Y Count Register */
270#define DMA1_Y_MODIFY 0xFFC00C5C /* DMA Channel 1 Y Modify Register */
271#define DMA1_CURR_DESC_PTR 0xFFC00C60 /* DMA Channel 1 Current Descriptor Pointer Register */
272#define DMA1_CURR_ADDR 0xFFC00C64 /* DMA Channel 1 Current Address Register */
273#define DMA1_IRQ_STATUS 0xFFC00C68 /* DMA Channel 1 Interrupt/Status Register */
274#define DMA1_PERIPHERAL_MAP 0xFFC00C6C /* DMA Channel 1 Peripheral Map Register */
275#define DMA1_CURR_X_COUNT 0xFFC00C70 /* DMA Channel 1 Current X Count Register */
276#define DMA1_CURR_Y_COUNT 0xFFC00C78 /* DMA Channel 1 Current Y Count Register */
277
278#define DMA2_NEXT_DESC_PTR 0xFFC00C80 /* DMA Channel 2 Next Descriptor Pointer Register */
279#define DMA2_START_ADDR 0xFFC00C84 /* DMA Channel 2 Start Address Register */
280#define DMA2_CONFIG 0xFFC00C88 /* DMA Channel 2 Configuration Register */
281#define DMA2_X_COUNT 0xFFC00C90 /* DMA Channel 2 X Count Register */
282#define DMA2_X_MODIFY 0xFFC00C94 /* DMA Channel 2 X Modify Register */
283#define DMA2_Y_COUNT 0xFFC00C98 /* DMA Channel 2 Y Count Register */
284#define DMA2_Y_MODIFY 0xFFC00C9C /* DMA Channel 2 Y Modify Register */
285#define DMA2_CURR_DESC_PTR 0xFFC00CA0 /* DMA Channel 2 Current Descriptor Pointer Register */
286#define DMA2_CURR_ADDR 0xFFC00CA4 /* DMA Channel 2 Current Address Register */
287#define DMA2_IRQ_STATUS 0xFFC00CA8 /* DMA Channel 2 Interrupt/Status Register */
288#define DMA2_PERIPHERAL_MAP 0xFFC00CAC /* DMA Channel 2 Peripheral Map Register */
289#define DMA2_CURR_X_COUNT 0xFFC00CB0 /* DMA Channel 2 Current X Count Register */
290#define DMA2_CURR_Y_COUNT 0xFFC00CB8 /* DMA Channel 2 Current Y Count Register */
291
292#define DMA3_NEXT_DESC_PTR 0xFFC00CC0 /* DMA Channel 3 Next Descriptor Pointer Register */
293#define DMA3_START_ADDR 0xFFC00CC4 /* DMA Channel 3 Start Address Register */
294#define DMA3_CONFIG 0xFFC00CC8 /* DMA Channel 3 Configuration Register */
295#define DMA3_X_COUNT 0xFFC00CD0 /* DMA Channel 3 X Count Register */
296#define DMA3_X_MODIFY 0xFFC00CD4 /* DMA Channel 3 X Modify Register */
297#define DMA3_Y_COUNT 0xFFC00CD8 /* DMA Channel 3 Y Count Register */
298#define DMA3_Y_MODIFY 0xFFC00CDC /* DMA Channel 3 Y Modify Register */
299#define DMA3_CURR_DESC_PTR 0xFFC00CE0 /* DMA Channel 3 Current Descriptor Pointer Register */
300#define DMA3_CURR_ADDR 0xFFC00CE4 /* DMA Channel 3 Current Address Register */
301#define DMA3_IRQ_STATUS 0xFFC00CE8 /* DMA Channel 3 Interrupt/Status Register */
302#define DMA3_PERIPHERAL_MAP 0xFFC00CEC /* DMA Channel 3 Peripheral Map Register */
303#define DMA3_CURR_X_COUNT 0xFFC00CF0 /* DMA Channel 3 Current X Count Register */
304#define DMA3_CURR_Y_COUNT 0xFFC00CF8 /* DMA Channel 3 Current Y Count Register */
305
306#define DMA4_NEXT_DESC_PTR 0xFFC00D00 /* DMA Channel 4 Next Descriptor Pointer Register */
307#define DMA4_START_ADDR 0xFFC00D04 /* DMA Channel 4 Start Address Register */
308#define DMA4_CONFIG 0xFFC00D08 /* DMA Channel 4 Configuration Register */
309#define DMA4_X_COUNT 0xFFC00D10 /* DMA Channel 4 X Count Register */
310#define DMA4_X_MODIFY 0xFFC00D14 /* DMA Channel 4 X Modify Register */
311#define DMA4_Y_COUNT 0xFFC00D18 /* DMA Channel 4 Y Count Register */
312#define DMA4_Y_MODIFY 0xFFC00D1C /* DMA Channel 4 Y Modify Register */
313#define DMA4_CURR_DESC_PTR 0xFFC00D20 /* DMA Channel 4 Current Descriptor Pointer Register */
314#define DMA4_CURR_ADDR 0xFFC00D24 /* DMA Channel 4 Current Address Register */
315#define DMA4_IRQ_STATUS 0xFFC00D28 /* DMA Channel 4 Interrupt/Status Register */
316#define DMA4_PERIPHERAL_MAP 0xFFC00D2C /* DMA Channel 4 Peripheral Map Register */
317#define DMA4_CURR_X_COUNT 0xFFC00D30 /* DMA Channel 4 Current X Count Register */
318#define DMA4_CURR_Y_COUNT 0xFFC00D38 /* DMA Channel 4 Current Y Count Register */
319
320#define DMA5_NEXT_DESC_PTR 0xFFC00D40 /* DMA Channel 5 Next Descriptor Pointer Register */
321#define DMA5_START_ADDR 0xFFC00D44 /* DMA Channel 5 Start Address Register */
322#define DMA5_CONFIG 0xFFC00D48 /* DMA Channel 5 Configuration Register */
323#define DMA5_X_COUNT 0xFFC00D50 /* DMA Channel 5 X Count Register */
324#define DMA5_X_MODIFY 0xFFC00D54 /* DMA Channel 5 X Modify Register */
325#define DMA5_Y_COUNT 0xFFC00D58 /* DMA Channel 5 Y Count Register */
326#define DMA5_Y_MODIFY 0xFFC00D5C /* DMA Channel 5 Y Modify Register */
327#define DMA5_CURR_DESC_PTR 0xFFC00D60 /* DMA Channel 5 Current Descriptor Pointer Register */
328#define DMA5_CURR_ADDR 0xFFC00D64 /* DMA Channel 5 Current Address Register */
329#define DMA5_IRQ_STATUS 0xFFC00D68 /* DMA Channel 5 Interrupt/Status Register */
330#define DMA5_PERIPHERAL_MAP 0xFFC00D6C /* DMA Channel 5 Peripheral Map Register */
331#define DMA5_CURR_X_COUNT 0xFFC00D70 /* DMA Channel 5 Current X Count Register */
332#define DMA5_CURR_Y_COUNT 0xFFC00D78 /* DMA Channel 5 Current Y Count Register */
333
334#define DMA6_NEXT_DESC_PTR 0xFFC00D80 /* DMA Channel 6 Next Descriptor Pointer Register */
335#define DMA6_START_ADDR 0xFFC00D84 /* DMA Channel 6 Start Address Register */
336#define DMA6_CONFIG 0xFFC00D88 /* DMA Channel 6 Configuration Register */
337#define DMA6_X_COUNT 0xFFC00D90 /* DMA Channel 6 X Count Register */
338#define DMA6_X_MODIFY 0xFFC00D94 /* DMA Channel 6 X Modify Register */
339#define DMA6_Y_COUNT 0xFFC00D98 /* DMA Channel 6 Y Count Register */
340#define DMA6_Y_MODIFY 0xFFC00D9C /* DMA Channel 6 Y Modify Register */
341#define DMA6_CURR_DESC_PTR 0xFFC00DA0 /* DMA Channel 6 Current Descriptor Pointer Register */
342#define DMA6_CURR_ADDR 0xFFC00DA4 /* DMA Channel 6 Current Address Register */
343#define DMA6_IRQ_STATUS 0xFFC00DA8 /* DMA Channel 6 Interrupt/Status Register */
344#define DMA6_PERIPHERAL_MAP 0xFFC00DAC /* DMA Channel 6 Peripheral Map Register */
345#define DMA6_CURR_X_COUNT 0xFFC00DB0 /* DMA Channel 6 Current X Count Register */
346#define DMA6_CURR_Y_COUNT 0xFFC00DB8 /* DMA Channel 6 Current Y Count Register */
347
348#define DMA7_NEXT_DESC_PTR 0xFFC00DC0 /* DMA Channel 7 Next Descriptor Pointer Register */
349#define DMA7_START_ADDR 0xFFC00DC4 /* DMA Channel 7 Start Address Register */
350#define DMA7_CONFIG 0xFFC00DC8 /* DMA Channel 7 Configuration Register */
351#define DMA7_X_COUNT 0xFFC00DD0 /* DMA Channel 7 X Count Register */
352#define DMA7_X_MODIFY 0xFFC00DD4 /* DMA Channel 7 X Modify Register */
353#define DMA7_Y_COUNT 0xFFC00DD8 /* DMA Channel 7 Y Count Register */
354#define DMA7_Y_MODIFY 0xFFC00DDC /* DMA Channel 7 Y Modify Register */
355#define DMA7_CURR_DESC_PTR 0xFFC00DE0 /* DMA Channel 7 Current Descriptor Pointer Register */
356#define DMA7_CURR_ADDR 0xFFC00DE4 /* DMA Channel 7 Current Address Register */
357#define DMA7_IRQ_STATUS 0xFFC00DE8 /* DMA Channel 7 Interrupt/Status Register */
358#define DMA7_PERIPHERAL_MAP 0xFFC00DEC /* DMA Channel 7 Peripheral Map Register */
359#define DMA7_CURR_X_COUNT 0xFFC00DF0 /* DMA Channel 7 Current X Count Register */
360#define DMA7_CURR_Y_COUNT 0xFFC00DF8 /* DMA Channel 7 Current Y Count Register */
361
362#define DMA8_NEXT_DESC_PTR 0xFFC00E00 /* DMA Channel 8 Next Descriptor Pointer Register */
363#define DMA8_START_ADDR 0xFFC00E04 /* DMA Channel 8 Start Address Register */
364#define DMA8_CONFIG 0xFFC00E08 /* DMA Channel 8 Configuration Register */
365#define DMA8_X_COUNT 0xFFC00E10 /* DMA Channel 8 X Count Register */
366#define DMA8_X_MODIFY 0xFFC00E14 /* DMA Channel 8 X Modify Register */
367#define DMA8_Y_COUNT 0xFFC00E18 /* DMA Channel 8 Y Count Register */
368#define DMA8_Y_MODIFY 0xFFC00E1C /* DMA Channel 8 Y Modify Register */
369#define DMA8_CURR_DESC_PTR 0xFFC00E20 /* DMA Channel 8 Current Descriptor Pointer Register */
370#define DMA8_CURR_ADDR 0xFFC00E24 /* DMA Channel 8 Current Address Register */
371#define DMA8_IRQ_STATUS 0xFFC00E28 /* DMA Channel 8 Interrupt/Status Register */
372#define DMA8_PERIPHERAL_MAP 0xFFC00E2C /* DMA Channel 8 Peripheral Map Register */
373#define DMA8_CURR_X_COUNT 0xFFC00E30 /* DMA Channel 8 Current X Count Register */
374#define DMA8_CURR_Y_COUNT 0xFFC00E38 /* DMA Channel 8 Current Y Count Register */
375
376#define DMA9_NEXT_DESC_PTR 0xFFC00E40 /* DMA Channel 9 Next Descriptor Pointer Register */
377#define DMA9_START_ADDR 0xFFC00E44 /* DMA Channel 9 Start Address Register */
378#define DMA9_CONFIG 0xFFC00E48 /* DMA Channel 9 Configuration Register */
379#define DMA9_X_COUNT 0xFFC00E50 /* DMA Channel 9 X Count Register */
380#define DMA9_X_MODIFY 0xFFC00E54 /* DMA Channel 9 X Modify Register */
381#define DMA9_Y_COUNT 0xFFC00E58 /* DMA Channel 9 Y Count Register */
382#define DMA9_Y_MODIFY 0xFFC00E5C /* DMA Channel 9 Y Modify Register */
383#define DMA9_CURR_DESC_PTR 0xFFC00E60 /* DMA Channel 9 Current Descriptor Pointer Register */
384#define DMA9_CURR_ADDR 0xFFC00E64 /* DMA Channel 9 Current Address Register */
385#define DMA9_IRQ_STATUS 0xFFC00E68 /* DMA Channel 9 Interrupt/Status Register */
386#define DMA9_PERIPHERAL_MAP 0xFFC00E6C /* DMA Channel 9 Peripheral Map Register */
387#define DMA9_CURR_X_COUNT 0xFFC00E70 /* DMA Channel 9 Current X Count Register */
388#define DMA9_CURR_Y_COUNT 0xFFC00E78 /* DMA Channel 9 Current Y Count Register */
389
390#define DMA10_NEXT_DESC_PTR 0xFFC00E80 /* DMA Channel 10 Next Descriptor Pointer Register */
391#define DMA10_START_ADDR 0xFFC00E84 /* DMA Channel 10 Start Address Register */
392#define DMA10_CONFIG 0xFFC00E88 /* DMA Channel 10 Configuration Register */
393#define DMA10_X_COUNT 0xFFC00E90 /* DMA Channel 10 X Count Register */
394#define DMA10_X_MODIFY 0xFFC00E94 /* DMA Channel 10 X Modify Register */
395#define DMA10_Y_COUNT 0xFFC00E98 /* DMA Channel 10 Y Count Register */
396#define DMA10_Y_MODIFY 0xFFC00E9C /* DMA Channel 10 Y Modify Register */
397#define DMA10_CURR_DESC_PTR 0xFFC00EA0 /* DMA Channel 10 Current Descriptor Pointer Register */
398#define DMA10_CURR_ADDR 0xFFC00EA4 /* DMA Channel 10 Current Address Register */
399#define DMA10_IRQ_STATUS 0xFFC00EA8 /* DMA Channel 10 Interrupt/Status Register */
400#define DMA10_PERIPHERAL_MAP 0xFFC00EAC /* DMA Channel 10 Peripheral Map Register */
401#define DMA10_CURR_X_COUNT 0xFFC00EB0 /* DMA Channel 10 Current X Count Register */
402#define DMA10_CURR_Y_COUNT 0xFFC00EB8 /* DMA Channel 10 Current Y Count Register */
403
404#define DMA11_NEXT_DESC_PTR 0xFFC00EC0 /* DMA Channel 11 Next Descriptor Pointer Register */
405#define DMA11_START_ADDR 0xFFC00EC4 /* DMA Channel 11 Start Address Register */
406#define DMA11_CONFIG 0xFFC00EC8 /* DMA Channel 11 Configuration Register */
407#define DMA11_X_COUNT 0xFFC00ED0 /* DMA Channel 11 X Count Register */
408#define DMA11_X_MODIFY 0xFFC00ED4 /* DMA Channel 11 X Modify Register */
409#define DMA11_Y_COUNT 0xFFC00ED8 /* DMA Channel 11 Y Count Register */
410#define DMA11_Y_MODIFY 0xFFC00EDC /* DMA Channel 11 Y Modify Register */
411#define DMA11_CURR_DESC_PTR 0xFFC00EE0 /* DMA Channel 11 Current Descriptor Pointer Register */
412#define DMA11_CURR_ADDR 0xFFC00EE4 /* DMA Channel 11 Current Address Register */
413#define DMA11_IRQ_STATUS 0xFFC00EE8 /* DMA Channel 11 Interrupt/Status Register */
414#define DMA11_PERIPHERAL_MAP 0xFFC00EEC /* DMA Channel 11 Peripheral Map Register */
415#define DMA11_CURR_X_COUNT 0xFFC00EF0 /* DMA Channel 11 Current X Count Register */
416#define DMA11_CURR_Y_COUNT 0xFFC00EF8 /* DMA Channel 11 Current Y Count Register */
417
418#define MDMA_D0_NEXT_DESC_PTR 0xFFC00F00 /* MemDMA Stream 0 Destination Next Descriptor Pointer Register */
419#define MDMA_D0_START_ADDR 0xFFC00F04 /* MemDMA Stream 0 Destination Start Address Register */
420#define MDMA_D0_CONFIG 0xFFC00F08 /* MemDMA Stream 0 Destination Configuration Register */
421#define MDMA_D0_X_COUNT 0xFFC00F10 /* MemDMA Stream 0 Destination X Count Register */
422#define MDMA_D0_X_MODIFY 0xFFC00F14 /* MemDMA Stream 0 Destination X Modify Register */
423#define MDMA_D0_Y_COUNT 0xFFC00F18 /* MemDMA Stream 0 Destination Y Count Register */
424#define MDMA_D0_Y_MODIFY 0xFFC00F1C /* MemDMA Stream 0 Destination Y Modify Register */
425#define MDMA_D0_CURR_DESC_PTR 0xFFC00F20 /* MemDMA Stream 0 Destination Current Descriptor Pointer Register */
426#define MDMA_D0_CURR_ADDR 0xFFC00F24 /* MemDMA Stream 0 Destination Current Address Register */
427#define MDMA_D0_IRQ_STATUS 0xFFC00F28 /* MemDMA Stream 0 Destination Interrupt/Status Register */
428#define MDMA_D0_PERIPHERAL_MAP 0xFFC00F2C /* MemDMA Stream 0 Destination Peripheral Map Register */
429#define MDMA_D0_CURR_X_COUNT 0xFFC00F30 /* MemDMA Stream 0 Destination Current X Count Register */
430#define MDMA_D0_CURR_Y_COUNT 0xFFC00F38 /* MemDMA Stream 0 Destination Current Y Count Register */
431
432#define MDMA_S0_NEXT_DESC_PTR 0xFFC00F40 /* MemDMA Stream 0 Source Next Descriptor Pointer Register */
433#define MDMA_S0_START_ADDR 0xFFC00F44 /* MemDMA Stream 0 Source Start Address Register */
434#define MDMA_S0_CONFIG 0xFFC00F48 /* MemDMA Stream 0 Source Configuration Register */
435#define MDMA_S0_X_COUNT 0xFFC00F50 /* MemDMA Stream 0 Source X Count Register */
436#define MDMA_S0_X_MODIFY 0xFFC00F54 /* MemDMA Stream 0 Source X Modify Register */
437#define MDMA_S0_Y_COUNT 0xFFC00F58 /* MemDMA Stream 0 Source Y Count Register */
438#define MDMA_S0_Y_MODIFY 0xFFC00F5C /* MemDMA Stream 0 Source Y Modify Register */
439#define MDMA_S0_CURR_DESC_PTR 0xFFC00F60 /* MemDMA Stream 0 Source Current Descriptor Pointer Register */
440#define MDMA_S0_CURR_ADDR 0xFFC00F64 /* MemDMA Stream 0 Source Current Address Register */
441#define MDMA_S0_IRQ_STATUS 0xFFC00F68 /* MemDMA Stream 0 Source Interrupt/Status Register */
442#define MDMA_S0_PERIPHERAL_MAP 0xFFC00F6C /* MemDMA Stream 0 Source Peripheral Map Register */
443#define MDMA_S0_CURR_X_COUNT 0xFFC00F70 /* MemDMA Stream 0 Source Current X Count Register */
444#define MDMA_S0_CURR_Y_COUNT 0xFFC00F78 /* MemDMA Stream 0 Source Current Y Count Register */
445
446#define MDMA_D1_NEXT_DESC_PTR 0xFFC00F80 /* MemDMA Stream 1 Destination Next Descriptor Pointer Register */
447#define MDMA_D1_START_ADDR 0xFFC00F84 /* MemDMA Stream 1 Destination Start Address Register */
448#define MDMA_D1_CONFIG 0xFFC00F88 /* MemDMA Stream 1 Destination Configuration Register */
449#define MDMA_D1_X_COUNT 0xFFC00F90 /* MemDMA Stream 1 Destination X Count Register */
450#define MDMA_D1_X_MODIFY 0xFFC00F94 /* MemDMA Stream 1 Destination X Modify Register */
451#define MDMA_D1_Y_COUNT 0xFFC00F98 /* MemDMA Stream 1 Destination Y Count Register */
452#define MDMA_D1_Y_MODIFY 0xFFC00F9C /* MemDMA Stream 1 Destination Y Modify Register */
453#define MDMA_D1_CURR_DESC_PTR 0xFFC00FA0 /* MemDMA Stream 1 Destination Current Descriptor Pointer Register */
454#define MDMA_D1_CURR_ADDR 0xFFC00FA4 /* MemDMA Stream 1 Destination Current Address Register */
455#define MDMA_D1_IRQ_STATUS 0xFFC00FA8 /* MemDMA Stream 1 Destination Interrupt/Status Register */
456#define MDMA_D1_PERIPHERAL_MAP 0xFFC00FAC /* MemDMA Stream 1 Destination Peripheral Map Register */
457#define MDMA_D1_CURR_X_COUNT 0xFFC00FB0 /* MemDMA Stream 1 Destination Current X Count Register */
458#define MDMA_D1_CURR_Y_COUNT 0xFFC00FB8 /* MemDMA Stream 1 Destination Current Y Count Register */
459
460#define MDMA_S1_NEXT_DESC_PTR 0xFFC00FC0 /* MemDMA Stream 1 Source Next Descriptor Pointer Register */
461#define MDMA_S1_START_ADDR 0xFFC00FC4 /* MemDMA Stream 1 Source Start Address Register */
462#define MDMA_S1_CONFIG 0xFFC00FC8 /* MemDMA Stream 1 Source Configuration Register */
463#define MDMA_S1_X_COUNT 0xFFC00FD0 /* MemDMA Stream 1 Source X Count Register */
464#define MDMA_S1_X_MODIFY 0xFFC00FD4 /* MemDMA Stream 1 Source X Modify Register */
465#define MDMA_S1_Y_COUNT 0xFFC00FD8 /* MemDMA Stream 1 Source Y Count Register */
466#define MDMA_S1_Y_MODIFY 0xFFC00FDC /* MemDMA Stream 1 Source Y Modify Register */
467#define MDMA_S1_CURR_DESC_PTR 0xFFC00FE0 /* MemDMA Stream 1 Source Current Descriptor Pointer Register */
468#define MDMA_S1_CURR_ADDR 0xFFC00FE4 /* MemDMA Stream 1 Source Current Address Register */
469#define MDMA_S1_IRQ_STATUS 0xFFC00FE8 /* MemDMA Stream 1 Source Interrupt/Status Register */
470#define MDMA_S1_PERIPHERAL_MAP 0xFFC00FEC /* MemDMA Stream 1 Source Peripheral Map Register */
471#define MDMA_S1_CURR_X_COUNT 0xFFC00FF0 /* MemDMA Stream 1 Source Current X Count Register */
472#define MDMA_S1_CURR_Y_COUNT 0xFFC00FF8 /* MemDMA Stream 1 Source Current Y Count Register */
473
474
475/* Parallel Peripheral Interface (0xFFC01000 - 0xFFC010FF) */
476#define PPI_CONTROL 0xFFC01000 /* PPI Control Register */
477#define PPI_STATUS 0xFFC01004 /* PPI Status Register */
478#define PPI_COUNT 0xFFC01008 /* PPI Transfer Count Register */
479#define PPI_DELAY 0xFFC0100C /* PPI Delay Count Register */
480#define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */
481
482
483/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
484#define TWI0_REGBASE 0xFFC01400
485#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */
486#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */
487#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */
488#define TWI_SLAVE_STAT 0xFFC0140C /* Slave Mode Status Register */
489#define TWI_SLAVE_ADDR 0xFFC01410 /* Slave Mode Address Register */
490#define TWI_MASTER_CTL 0xFFC01414 /* Master Mode Control Register */
491#define TWI_MASTER_STAT 0xFFC01418 /* Master Mode Status Register */
492#define TWI_MASTER_ADDR 0xFFC0141C /* Master Mode Address Register */
493#define TWI_INT_STAT 0xFFC01420 /* TWI Interrupt Status Register */
494#define TWI_INT_MASK 0xFFC01424 /* TWI Master Interrupt Mask Register */
495#define TWI_FIFO_CTL 0xFFC01428 /* FIFO Control Register */
496#define TWI_FIFO_STAT 0xFFC0142C /* FIFO Status Register */
497#define TWI_XMT_DATA8 0xFFC01480 /* FIFO Transmit Data Single Byte Register */
498#define TWI_XMT_DATA16 0xFFC01484 /* FIFO Transmit Data Double Byte Register */
499#define TWI_RCV_DATA8 0xFFC01488 /* FIFO Receive Data Single Byte Register */
500#define TWI_RCV_DATA16 0xFFC0148C /* FIFO Receive Data Double Byte Register */
501
502
503/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */
504#define PORTGIO 0xFFC01500 /* Port G I/O Pin State Specify Register */
505#define PORTGIO_CLEAR 0xFFC01504 /* Port G I/O Peripheral Interrupt Clear Register */
506#define PORTGIO_SET 0xFFC01508 /* Port G I/O Peripheral Interrupt Set Register */
507#define PORTGIO_TOGGLE 0xFFC0150C /* Port G I/O Pin State Toggle Register */
508#define PORTGIO_MASKA 0xFFC01510 /* Port G I/O Mask State Specify Interrupt A Register */
509#define PORTGIO_MASKA_CLEAR 0xFFC01514 /* Port G I/O Mask Disable Interrupt A Register */
510#define PORTGIO_MASKA_SET 0xFFC01518 /* Port G I/O Mask Enable Interrupt A Register */
511#define PORTGIO_MASKA_TOGGLE 0xFFC0151C /* Port G I/O Mask Toggle Enable Interrupt A Register */
512#define PORTGIO_MASKB 0xFFC01520 /* Port G I/O Mask State Specify Interrupt B Register */
513#define PORTGIO_MASKB_CLEAR 0xFFC01524 /* Port G I/O Mask Disable Interrupt B Register */
514#define PORTGIO_MASKB_SET 0xFFC01528 /* Port G I/O Mask Enable Interrupt B Register */
515#define PORTGIO_MASKB_TOGGLE 0xFFC0152C /* Port G I/O Mask Toggle Enable Interrupt B Register */
516#define PORTGIO_DIR 0xFFC01530 /* Port G I/O Direction Register */
517#define PORTGIO_POLAR 0xFFC01534 /* Port G I/O Source Polarity Register */
518#define PORTGIO_EDGE 0xFFC01538 /* Port G I/O Source Sensitivity Register */
519#define PORTGIO_BOTH 0xFFC0153C /* Port G I/O Set on BOTH Edges Register */
520#define PORTGIO_INEN 0xFFC01540 /* Port G I/O Input Enable Register */
521
522
523/* General Purpose I/O Port H (0xFFC01700 - 0xFFC017FF) */
524#define PORTHIO 0xFFC01700 /* Port H I/O Pin State Specify Register */
525#define PORTHIO_CLEAR 0xFFC01704 /* Port H I/O Peripheral Interrupt Clear Register */
526#define PORTHIO_SET 0xFFC01708 /* Port H I/O Peripheral Interrupt Set Register */
527#define PORTHIO_TOGGLE 0xFFC0170C /* Port H I/O Pin State Toggle Register */
528#define PORTHIO_MASKA 0xFFC01710 /* Port H I/O Mask State Specify Interrupt A Register */
529#define PORTHIO_MASKA_CLEAR 0xFFC01714 /* Port H I/O Mask Disable Interrupt A Register */
530#define PORTHIO_MASKA_SET 0xFFC01718 /* Port H I/O Mask Enable Interrupt A Register */
531#define PORTHIO_MASKA_TOGGLE 0xFFC0171C /* Port H I/O Mask Toggle Enable Interrupt A Register */
532#define PORTHIO_MASKB 0xFFC01720 /* Port H I/O Mask State Specify Interrupt B Register */
533#define PORTHIO_MASKB_CLEAR 0xFFC01724 /* Port H I/O Mask Disable Interrupt B Register */
534#define PORTHIO_MASKB_SET 0xFFC01728 /* Port H I/O Mask Enable Interrupt B Register */
535#define PORTHIO_MASKB_TOGGLE 0xFFC0172C /* Port H I/O Mask Toggle Enable Interrupt B Register */
536#define PORTHIO_DIR 0xFFC01730 /* Port H I/O Direction Register */
537#define PORTHIO_POLAR 0xFFC01734 /* Port H I/O Source Polarity Register */
538#define PORTHIO_EDGE 0xFFC01738 /* Port H I/O Source Sensitivity Register */
539#define PORTHIO_BOTH 0xFFC0173C /* Port H I/O Set on BOTH Edges Register */
540#define PORTHIO_INEN 0xFFC01740 /* Port H I/O Input Enable Register */
541
542
543/* UART1 Controller (0xFFC02000 - 0xFFC020FF) */
544#define UART1_THR 0xFFC02000 /* Transmit Holding register */
545#define UART1_RBR 0xFFC02000 /* Receive Buffer register */
546#define UART1_DLL 0xFFC02000 /* Divisor Latch (Low-Byte) */
547#define UART1_IER 0xFFC02004 /* Interrupt Enable Register */
548#define UART1_DLH 0xFFC02004 /* Divisor Latch (High-Byte) */
549#define UART1_IIR 0xFFC02008 /* Interrupt Identification Register */
550#define UART1_LCR 0xFFC0200C /* Line Control Register */
551#define UART1_MCR 0xFFC02010 /* Modem Control Register */
552#define UART1_LSR 0xFFC02014 /* Line Status Register */
553#define UART1_MSR 0xFFC02018 /* Modem Status Register */
554#define UART1_SCR 0xFFC0201C /* SCR Scratch Register */
555#define UART1_GCTL 0xFFC02024 /* Global Control Register */
556
557
558/* Omit CAN register sets from the defBF534.h (CAN is not in the ADSP-BF52x processor) */
559
560/* Pin Control Registers (0xFFC03200 - 0xFFC032FF) */
561#define PORTF_FER 0xFFC03200 /* Port F Function Enable Register (Alternate/Flag*) */
562#define PORTG_FER 0xFFC03204 /* Port G Function Enable Register (Alternate/Flag*) */
563#define PORTH_FER 0xFFC03208 /* Port H Function Enable Register (Alternate/Flag*) */
564#define BFIN_PORT_MUX 0xFFC0320C /* Port Multiplexer Control Register */
565
566
567/* Handshake MDMA Registers (0xFFC03300 - 0xFFC033FF) */
568#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */
569#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */
570#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */
571#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshhold Register */
572#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */
573#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */
574#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */
575
576#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */
577#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */
578#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */
579#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshhold Register */
580#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */
581#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */
582#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */
583
584/* GPIO PIN mux (0xFFC03210 - OxFFC03288) */
585#define PORTF_MUX 0xFFC03210 /* Port F mux control */
586#define PORTG_MUX 0xFFC03214 /* Port G mux control */
587#define PORTH_MUX 0xFFC03218 /* Port H mux control */
588#define PORTF_DRIVE 0xFFC03220 /* Port F drive strength control */
589#define PORTG_DRIVE 0xFFC03224 /* Port G drive strength control */
590#define PORTH_DRIVE 0xFFC03228 /* Port H drive strength control */
591#define PORTF_SLEW 0xFFC03230 /* Port F slew control */
592#define PORTG_SLEW 0xFFC03234 /* Port G slew control */
593#define PORTH_SLEW 0xFFC03238 /* Port H slew control */
594#define PORTF_HYSTERISIS 0xFFC03240 /* Port F Schmitt trigger control */
595#define PORTG_HYSTERISIS 0xFFC03244 /* Port G Schmitt trigger control */
596#define PORTH_HYSTERISIS 0xFFC03248 /* Port H Schmitt trigger control */
597#define MISCPORT_DRIVE 0xFFC03280 /* Misc Port drive strength control */
598#define MISCPORT_SLEW 0xFFC03284 /* Misc Port slew control */
599#define MISCPORT_HYSTERISIS 0xFFC03288 /* Misc Port Schmitt trigger control */
600
601
602/***********************************************************************************
603** System MMR Register Bits And Macros
604**
605** Disclaimer: All macros are intended to make C and Assembly code more readable.
606** Use these macros carefully, as any that do left shifts for field
607** depositing will result in the lower order bits being destroyed. Any
608** macro that shifts left to properly position the bit-field should be
609** used as part of an OR to initialize a register and NOT as a dynamic
610** modifier UNLESS the lower order bits are saved and ORed back in when
611** the macro is used.
612*************************************************************************************/
613/*
614** ********************* PLL AND RESET MASKS ****************************************/
615/* PLL_CTL Masks */
616#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
617#define PLL_OFF 0x0002 /* PLL Not Powered */
618#define STOPCK 0x0008 /* Core Clock Off */
619#define PDWN 0x0020 /* Enter Deep Sleep Mode */
620#define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
621#define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
622#define BYPASS 0x0100 /* Bypass the PLL */
623#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
624/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
625#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
626
627/* PLL_DIV Masks */
628#define SSEL 0x000F /* System Select */
629#define CSEL 0x0030 /* Core Select */
630#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
631#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
632#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
633#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
634/* PLL_DIV Macros */
635#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
636
637/* VR_CTL Masks */
638#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
639#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
640#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
641#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
642#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
643
644#define GAIN 0x000C /* Voltage Level Gain */
645#define GAIN_5 0x0000 /* GAIN = 5 */
646#define GAIN_10 0x0004 /* GAIN = 10 */
647#define GAIN_20 0x0008 /* GAIN = 20 */
648#define GAIN_50 0x000C /* GAIN = 50 */
649
650#define VLEV 0x00F0 /* Internal Voltage Level */
651#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
652#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
653#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
654#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
655#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
656#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
657#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
658#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
659#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
660#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
661
662#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
663#define CANWE 0x0200 /* Enable CAN Wakeup From Hibernate */
664#define PHYWE 0x0400 /* Enable PHY Wakeup From Hibernate */
665#define CLKBUFOE 0x4000 /* CLKIN Buffer Output Enable */
666#define PHYCLKOE CLKBUFOE /* Alternative legacy name for the above */
667#define SCKELOW 0x8000 /* Enable Drive CKE Low During Reset */
668
669/* PLL_STAT Masks */
670#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
671#define FULL_ON 0x0002 /* Processor In Full On Mode */
672#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
673#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
674
675/* CHIPID Masks */
676#define CHIPID_VERSION 0xF0000000
677#define CHIPID_FAMILY 0x0FFFF000
678#define CHIPID_MANUFACTURE 0x00000FFE
679
680/* SWRST Masks */
681#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
682#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
683#define RESET_DOUBLE 0x2000 /* SW Reset Generated By Core Double-Fault */
684#define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */
685#define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */
686
687/* SYSCR Masks */
688#define BMODE 0x0007 /* Boot Mode - Latched During HW Reset From Mode Pins */
689#define NOBOOT 0x0010 /* Execute From L1 or ASYNC Bank 0 When BMODE = 0 */
690
691
692/* ************* SYSTEM INTERRUPT CONTROLLER MASKS *************************************/
693/* Peripheral Masks For SIC_ISR, SIC_IWR, SIC_IMASK */
694
695#if 0
696#define IRQ_PLL_WAKEUP 0x00000001 /* PLL Wakeup Interrupt */
697
698#define IRQ_ERROR1 0x00000002 /* Error Interrupt (DMA, DMARx Block, DMARx Overflow) */
699#define IRQ_ERROR2 0x00000004 /* Error Interrupt (CAN, Ethernet, SPORTx, PPI, SPI, UARTx) */
700#define IRQ_RTC 0x00000008 /* Real Time Clock Interrupt */
701#define IRQ_DMA0 0x00000010 /* DMA Channel 0 (PPI) Interrupt */
702#define IRQ_DMA3 0x00000020 /* DMA Channel 3 (SPORT0 RX) Interrupt */
703#define IRQ_DMA4 0x00000040 /* DMA Channel 4 (SPORT0 TX) Interrupt */
704#define IRQ_DMA5 0x00000080 /* DMA Channel 5 (SPORT1 RX) Interrupt */
705
706#define IRQ_DMA6 0x00000100 /* DMA Channel 6 (SPORT1 TX) Interrupt */
707#define IRQ_TWI 0x00000200 /* TWI Interrupt */
708#define IRQ_DMA7 0x00000400 /* DMA Channel 7 (SPI) Interrupt */
709#define IRQ_DMA8 0x00000800 /* DMA Channel 8 (UART0 RX) Interrupt */
710#define IRQ_DMA9 0x00001000 /* DMA Channel 9 (UART0 TX) Interrupt */
711#define IRQ_DMA10 0x00002000 /* DMA Channel 10 (UART1 RX) Interrupt */
712#define IRQ_DMA11 0x00004000 /* DMA Channel 11 (UART1 TX) Interrupt */
713#define IRQ_CAN_RX 0x00008000 /* CAN Receive Interrupt */
714
715#define IRQ_CAN_TX 0x00010000 /* CAN Transmit Interrupt */
716#define IRQ_DMA1 0x00020000 /* DMA Channel 1 (Ethernet RX) Interrupt */
717#define IRQ_PFA_PORTH 0x00020000 /* PF Port H (PF47:32) Interrupt A */
718#define IRQ_DMA2 0x00040000 /* DMA Channel 2 (Ethernet TX) Interrupt */
719#define IRQ_PFB_PORTH 0x00040000 /* PF Port H (PF47:32) Interrupt B */
720#define IRQ_TIMER0 0x00080000 /* Timer 0 Interrupt */
721#define IRQ_TIMER1 0x00100000 /* Timer 1 Interrupt */
722#define IRQ_TIMER2 0x00200000 /* Timer 2 Interrupt */
723#define IRQ_TIMER3 0x00400000 /* Timer 3 Interrupt */
724#define IRQ_TIMER4 0x00800000 /* Timer 4 Interrupt */
725
726#define IRQ_TIMER5 0x01000000 /* Timer 5 Interrupt */
727#define IRQ_TIMER6 0x02000000 /* Timer 6 Interrupt */
728#define IRQ_TIMER7 0x04000000 /* Timer 7 Interrupt */
729#define IRQ_PFA_PORTFG 0x08000000 /* PF Ports F&G (PF31:0) Interrupt A */
730#define IRQ_PFB_PORTF 0x80000000 /* PF Port F (PF15:0) Interrupt B */
731#define IRQ_DMA12 0x20000000 /* DMA Channels 12 (MDMA1 Source) RX Interrupt */
732#define IRQ_DMA13 0x20000000 /* DMA Channels 13 (MDMA1 Destination) TX Interrupt */
733#define IRQ_DMA14 0x40000000 /* DMA Channels 14 (MDMA0 Source) RX Interrupt */
734#define IRQ_DMA15 0x40000000 /* DMA Channels 15 (MDMA0 Destination) TX Interrupt */
735#define IRQ_WDOG 0x80000000 /* Software Watchdog Timer Interrupt */
736#define IRQ_PFB_PORTG 0x10000000 /* PF Port G (PF31:16) Interrupt B */
737#endif
738
739/* SIC_IAR0 Macros */
740#define P0_IVG(x) (((x)&0xF)-7) /* Peripheral #0 assigned IVG #x */
741#define P1_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #1 assigned IVG #x */
742#define P2_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #2 assigned IVG #x */
743#define P3_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #3 assigned IVG #x */
744#define P4_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #4 assigned IVG #x */
745#define P5_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #5 assigned IVG #x */
746#define P6_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #6 assigned IVG #x */
747#define P7_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #7 assigned IVG #x */
748
749/* SIC_IAR1 Macros */
750#define P8_IVG(x) (((x)&0xF)-7) /* Peripheral #8 assigned IVG #x */
751#define P9_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #9 assigned IVG #x */
752#define P10_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #10 assigned IVG #x */
753#define P11_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #11 assigned IVG #x */
754#define P12_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #12 assigned IVG #x */
755#define P13_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #13 assigned IVG #x */
756#define P14_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #14 assigned IVG #x */
757#define P15_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #15 assigned IVG #x */
758
759/* SIC_IAR2 Macros */
760#define P16_IVG(x) (((x)&0xF)-7) /* Peripheral #16 assigned IVG #x */
761#define P17_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #17 assigned IVG #x */
762#define P18_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #18 assigned IVG #x */
763#define P19_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #19 assigned IVG #x */
764#define P20_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #20 assigned IVG #x */
765#define P21_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #21 assigned IVG #x */
766#define P22_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #22 assigned IVG #x */
767#define P23_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #23 assigned IVG #x */
768
769/* SIC_IAR3 Macros */
770#define P24_IVG(x) (((x)&0xF)-7) /* Peripheral #24 assigned IVG #x */
771#define P25_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #25 assigned IVG #x */
772#define P26_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #26 assigned IVG #x */
773#define P27_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #27 assigned IVG #x */
774#define P28_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #28 assigned IVG #x */
775#define P29_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #29 assigned IVG #x */
776#define P30_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #30 assigned IVG #x */
777#define P31_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #31 assigned IVG #x */
778
779
780/* SIC_IMASK Masks */
781#define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
782#define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
783#define SIC_MASK(x) (1 << ((x)&0x1F)) /* Mask Peripheral #x interrupt */
784#define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Unmask Peripheral #x interrupt */
785
786/* SIC_IWR Masks */
787#define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
788#define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
789#define IWR_ENABLE(x) (1 << ((x)&0x1F)) /* Wakeup Enable Peripheral #x */
790#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */
791
792
793/* ********* WATCHDOG TIMER MASKS ******************** */
794
795/* Watchdog Timer WDOG_CTL Register Masks */
796
797#define WDEV(x) (((x)<<1) & 0x0006) /* event generated on roll over */
798#define WDEV_RESET 0x0000 /* generate reset event on roll over */
799#define WDEV_NMI 0x0002 /* generate NMI event on roll over */
800#define WDEV_GPI 0x0004 /* generate GP IRQ on roll over */
801#define WDEV_NONE 0x0006 /* no event on roll over */
802#define WDEN 0x0FF0 /* enable watchdog */
803#define WDDIS 0x0AD0 /* disable watchdog */
804#define WDRO 0x8000 /* watchdog rolled over latch */
805
806/* depreciated WDOG_CTL Register Masks for legacy code */
807
808
809#define ICTL WDEV
810#define ENABLE_RESET WDEV_RESET
811#define WDOG_RESET WDEV_RESET
812#define ENABLE_NMI WDEV_NMI
813#define WDOG_NMI WDEV_NMI
814#define ENABLE_GPI WDEV_GPI
815#define WDOG_GPI WDEV_GPI
816#define DISABLE_EVT WDEV_NONE
817#define WDOG_NONE WDEV_NONE
818
819#define TMR_EN WDEN
820#define TMR_DIS WDDIS
821#define TRO WDRO
822#define ICTL_P0 0x01
823 #define ICTL_P1 0x02
824#define TRO_P 0x0F
825
826
827
828/* *************** REAL TIME CLOCK MASKS **************************/
829/* RTC_STAT and RTC_ALARM Masks */
830#define RTC_SEC 0x0000003F /* Real-Time Clock Seconds */
831#define RTC_MIN 0x00000FC0 /* Real-Time Clock Minutes */
832#define RTC_HR 0x0001F000 /* Real-Time Clock Hours */
833#define RTC_DAY 0xFFFE0000 /* Real-Time Clock Days */
834
835/* RTC_ALARM Macro z=day y=hr x=min w=sec */
836#define SET_ALARM(z,y,x,w) ((((z)&0x7FFF)<<0x11)|(((y)&0x1F)<<0xC)|(((x)&0x3F)<<0x6)|((w)&0x3F))
837
838/* RTC_ICTL and RTC_ISTAT Masks */
839#define STOPWATCH 0x0001 /* Stopwatch Interrupt Enable */
840#define ALARM 0x0002 /* Alarm Interrupt Enable */
841#define SECOND 0x0004 /* Seconds (1 Hz) Interrupt Enable */
842#define MINUTE 0x0008 /* Minutes Interrupt Enable */
843#define HOUR 0x0010 /* Hours Interrupt Enable */
844#define DAY 0x0020 /* 24 Hours (Days) Interrupt Enable */
845#define DAY_ALARM 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Interrupt Enable */
846#define WRITE_PENDING 0x4000 /* Write Pending Status */
847#define WRITE_COMPLETE 0x8000 /* Write Complete Interrupt Enable */
848
849/* RTC_FAST / RTC_PREN Mask */
850#define PREN 0x0001 /* Enable Prescaler, RTC Runs @1 Hz */
851
852
853/* ************** UART CONTROLLER MASKS *************************/
854/* UARTx_LCR Masks */
855#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */
856#define STB 0x04 /* Stop Bits */
857#define PEN 0x08 /* Parity Enable */
858#define EPS 0x10 /* Even Parity Select */
859#define STP 0x20 /* Stick Parity */
860#define SB 0x40 /* Set Break */
861#define DLAB 0x80 /* Divisor Latch Access */
862
863/* UARTx_MCR Mask */
864#define LOOP_ENA 0x10 /* Loopback Mode Enable */
865#define LOOP_ENA_P 0x04
866
867/* UARTx_LSR Masks */
868#define DR 0x01 /* Data Ready */
869#define OE 0x02 /* Overrun Error */
870#define PE 0x04 /* Parity Error */
871#define FE 0x08 /* Framing Error */
872#define BI 0x10 /* Break Interrupt */
873#define THRE 0x20 /* THR Empty */
874#define TEMT 0x40 /* TSR and UART_THR Empty */
875
876/* UARTx_IER Masks */
877#define ERBFI 0x01 /* Enable Receive Buffer Full Interrupt */
878#define ETBEI 0x02 /* Enable Transmit Buffer Empty Interrupt */
879#define ELSI 0x04 /* Enable RX Status Interrupt */
880
881/* UARTx_IIR Masks */
882#define NINT 0x01 /* Pending Interrupt */
883#define IIR_TX_READY 0x02 /* UART_THR empty */
884#define IIR_RX_READY 0x04 /* Receive data ready */
885#define IIR_LINE_CHANGE 0x06 /* Receive line status */
886#define IIR_STATUS 0x06 /* Highest Priority Pending Interrupt */
887
888/* UARTx_GCTL Masks */
889#define UCEN 0x01 /* Enable UARTx Clocks */
890#define IREN 0x02 /* Enable IrDA Mode */
891#define TPOLC 0x04 /* IrDA TX Polarity Change */
892#define RPOLC 0x08 /* IrDA RX Polarity Change */
893#define FPE 0x10 /* Force Parity Error On Transmit */
894#define FFE 0x20 /* Force Framing Error On Transmit */
895
896
897/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS ****************************/
898/* SPI_CTL Masks */
899#define TIMOD 0x0003 /* Transfer Initiate Mode */
900#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
901#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
902#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
903#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
904#define SZ 0x0004 /* Send Zero (When TDBR Empty, Send Zero/Last*) */
905#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
906#define PSSE 0x0010 /* Slave-Select Input Enable */
907#define EMISO 0x0020 /* Enable MISO As Output */
908#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
909#define LSBF 0x0200 /* LSB First */
910#define CPHA 0x0400 /* Clock Phase */
911#define CPOL 0x0800 /* Clock Polarity */
912#define MSTR 0x1000 /* Master/Slave* */
913#define WOM 0x2000 /* Write Open Drain Master */
914#define SPE 0x4000 /* SPI Enable */
915
916/* SPI_FLG Masks */
917#define FLS1 0x0002 /* Enables SPI_FLOUT1 as SPI Slave-Select Output */
918#define FLS2 0x0004 /* Enables SPI_FLOUT2 as SPI Slave-Select Output */
919#define FLS3 0x0008 /* Enables SPI_FLOUT3 as SPI Slave-Select Output */
920#define FLS4 0x0010 /* Enables SPI_FLOUT4 as SPI Slave-Select Output */
921#define FLS5 0x0020 /* Enables SPI_FLOUT5 as SPI Slave-Select Output */
922#define FLS6 0x0040 /* Enables SPI_FLOUT6 as SPI Slave-Select Output */
923#define FLS7 0x0080 /* Enables SPI_FLOUT7 as SPI Slave-Select Output */
924#define FLG1 0xFDFF /* Activates SPI_FLOUT1 */
925#define FLG2 0xFBFF /* Activates SPI_FLOUT2 */
926#define FLG3 0xF7FF /* Activates SPI_FLOUT3 */
927#define FLG4 0xEFFF /* Activates SPI_FLOUT4 */
928#define FLG5 0xDFFF /* Activates SPI_FLOUT5 */
929#define FLG6 0xBFFF /* Activates SPI_FLOUT6 */
930#define FLG7 0x7FFF /* Activates SPI_FLOUT7 */
931
932/* SPI_STAT Masks */
933#define SPIF 0x0001 /* SPI Finished (Single-Word Transfer Complete) */
934#define MODF 0x0002 /* Mode Fault Error (Another Device Tried To Become Master) */
935#define TXE 0x0004 /* Transmission Error (Data Sent With No New Data In TDBR) */
936#define TXS 0x0008 /* SPI_TDBR Data Buffer Status (Full/Empty*) */
937#define RBSY 0x0010 /* Receive Error (Data Received With RDBR Full) */
938#define RXS 0x0020 /* SPI_RDBR Data Buffer Status (Full/Empty*) */
939#define TXCOL 0x0040 /* Transmit Collision Error (Corrupt Data May Have Been Sent) */
940
941
942/* **************** GENERAL PURPOSE TIMER MASKS **********************/
943/* TIMER_ENABLE Masks */
944#define TIMEN0 0x0001 /* Enable Timer 0 */
945#define TIMEN1 0x0002 /* Enable Timer 1 */
946#define TIMEN2 0x0004 /* Enable Timer 2 */
947#define TIMEN3 0x0008 /* Enable Timer 3 */
948#define TIMEN4 0x0010 /* Enable Timer 4 */
949#define TIMEN5 0x0020 /* Enable Timer 5 */
950#define TIMEN6 0x0040 /* Enable Timer 6 */
951#define TIMEN7 0x0080 /* Enable Timer 7 */
952
953/* TIMER_DISABLE Masks */
954#define TIMDIS0 TIMEN0 /* Disable Timer 0 */
955#define TIMDIS1 TIMEN1 /* Disable Timer 1 */
956#define TIMDIS2 TIMEN2 /* Disable Timer 2 */
957#define TIMDIS3 TIMEN3 /* Disable Timer 3 */
958#define TIMDIS4 TIMEN4 /* Disable Timer 4 */
959#define TIMDIS5 TIMEN5 /* Disable Timer 5 */
960#define TIMDIS6 TIMEN6 /* Disable Timer 6 */
961#define TIMDIS7 TIMEN7 /* Disable Timer 7 */
962
963/* TIMER_STATUS Masks */
964#define TIMIL0 0x00000001 /* Timer 0 Interrupt */
965#define TIMIL1 0x00000002 /* Timer 1 Interrupt */
966#define TIMIL2 0x00000004 /* Timer 2 Interrupt */
967#define TIMIL3 0x00000008 /* Timer 3 Interrupt */
968#define TOVF_ERR0 0x00000010 /* Timer 0 Counter Overflow */
969#define TOVF_ERR1 0x00000020 /* Timer 1 Counter Overflow */
970#define TOVF_ERR2 0x00000040 /* Timer 2 Counter Overflow */
971#define TOVF_ERR3 0x00000080 /* Timer 3 Counter Overflow */
972#define TRUN0 0x00001000 /* Timer 0 Slave Enable Status */
973#define TRUN1 0x00002000 /* Timer 1 Slave Enable Status */
974#define TRUN2 0x00004000 /* Timer 2 Slave Enable Status */
975#define TRUN3 0x00008000 /* Timer 3 Slave Enable Status */
976#define TIMIL4 0x00010000 /* Timer 4 Interrupt */
977#define TIMIL5 0x00020000 /* Timer 5 Interrupt */
978#define TIMIL6 0x00040000 /* Timer 6 Interrupt */
979#define TIMIL7 0x00080000 /* Timer 7 Interrupt */
980#define TOVF_ERR4 0x00100000 /* Timer 4 Counter Overflow */
981#define TOVF_ERR5 0x00200000 /* Timer 5 Counter Overflow */
982#define TOVF_ERR6 0x00400000 /* Timer 6 Counter Overflow */
983#define TOVF_ERR7 0x00800000 /* Timer 7 Counter Overflow */
984#define TRUN4 0x10000000 /* Timer 4 Slave Enable Status */
985#define TRUN5 0x20000000 /* Timer 5 Slave Enable Status */
986#define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */
987#define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */
988
989/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
990#define TOVL_ERR0 TOVF_ERR0
991#define TOVL_ERR1 TOVF_ERR1
992#define TOVL_ERR2 TOVF_ERR2
993#define TOVL_ERR3 TOVF_ERR3
994#define TOVL_ERR4 TOVF_ERR4
995#define TOVL_ERR5 TOVF_ERR5
996#define TOVL_ERR6 TOVF_ERR6
997#define TOVL_ERR7 TOVF_ERR7
998
999/* TIMERx_CONFIG Masks */
1000#define PWM_OUT 0x0001 /* Pulse-Width Modulation Output Mode */
1001#define WDTH_CAP 0x0002 /* Width Capture Input Mode */
1002#define EXT_CLK 0x0003 /* External Clock Mode */
1003#define PULSE_HI 0x0004 /* Action Pulse (Positive/Negative*) */
1004#define PERIOD_CNT 0x0008 /* Period Count */
1005#define IRQ_ENA 0x0010 /* Interrupt Request Enable */
1006#define TIN_SEL 0x0020 /* Timer Input Select */
1007#define OUT_DIS 0x0040 /* Output Pad Disable */
1008#define CLK_SEL 0x0080 /* Timer Clock Select */
1009#define TOGGLE_HI 0x0100 /* PWM_OUT PULSE_HI Toggle Mode */
1010#define EMU_RUN 0x0200 /* Emulation Behavior Select */
1011#define ERR_TYP 0xC000 /* Error Type */
1012
1013
1014/* ****************** GPIO PORTS F, G, H MASKS ***********************/
1015/* General Purpose IO (0xFFC00700 - 0xFFC007FF) Masks */
1016/* Port F Masks */
1017#define PF0 0x0001
1018#define PF1 0x0002
1019#define PF2 0x0004
1020#define PF3 0x0008
1021#define PF4 0x0010
1022#define PF5 0x0020
1023#define PF6 0x0040
1024#define PF7 0x0080
1025#define PF8 0x0100
1026#define PF9 0x0200
1027#define PF10 0x0400
1028#define PF11 0x0800
1029#define PF12 0x1000
1030#define PF13 0x2000
1031#define PF14 0x4000
1032#define PF15 0x8000
1033
1034/* Port G Masks */
1035#define PG0 0x0001
1036#define PG1 0x0002
1037#define PG2 0x0004
1038#define PG3 0x0008
1039#define PG4 0x0010
1040#define PG5 0x0020
1041#define PG6 0x0040
1042#define PG7 0x0080
1043#define PG8 0x0100
1044#define PG9 0x0200
1045#define PG10 0x0400
1046#define PG11 0x0800
1047#define PG12 0x1000
1048#define PG13 0x2000
1049#define PG14 0x4000
1050#define PG15 0x8000
1051
1052/* Port H Masks */
1053#define PH0 0x0001
1054#define PH1 0x0002
1055#define PH2 0x0004
1056#define PH3 0x0008
1057#define PH4 0x0010
1058#define PH5 0x0020
1059#define PH6 0x0040
1060#define PH7 0x0080
1061#define PH8 0x0100
1062#define PH9 0x0200
1063#define PH10 0x0400
1064#define PH11 0x0800
1065#define PH12 0x1000
1066#define PH13 0x2000
1067#define PH14 0x4000
1068#define PH15 0x8000
1069
1070
1071/* ******************* SERIAL PORT MASKS **************************************/
1072/* SPORTx_TCR1 Masks */
1073#define TSPEN 0x0001 /* Transmit Enable */
1074#define ITCLK 0x0002 /* Internal Transmit Clock Select */
1075#define DTYPE_NORM 0x0004 /* Data Format Normal */
1076#define DTYPE_ULAW 0x0008 /* Compand Using u-Law */
1077#define DTYPE_ALAW 0x000C /* Compand Using A-Law */
1078#define TLSBIT 0x0010 /* Transmit Bit Order */
1079#define ITFS 0x0200 /* Internal Transmit Frame Sync Select */
1080#define TFSR 0x0400 /* Transmit Frame Sync Required Select */
1081#define DITFS 0x0800 /* Data-Independent Transmit Frame Sync Select */
1082#define LTFS 0x1000 /* Low Transmit Frame Sync Select */
1083#define LATFS 0x2000 /* Late Transmit Frame Sync Select */
1084#define TCKFE 0x4000 /* Clock Falling Edge Select */
1085
1086/* SPORTx_TCR2 Masks and Macro */
1087#define SLEN(x) ((x)&0x1F) /* SPORT TX Word Length (2 - 31) */
1088#define TXSE 0x0100 /* TX Secondary Enable */
1089#define TSFSE 0x0200 /* Transmit Stereo Frame Sync Enable */
1090#define TRFST 0x0400 /* Left/Right Order (1 = Right Channel 1st) */
1091
1092/* SPORTx_RCR1 Masks */
1093#define RSPEN 0x0001 /* Receive Enable */
1094#define IRCLK 0x0002 /* Internal Receive Clock Select */
1095#define DTYPE_NORM 0x0004 /* Data Format Normal */
1096#define DTYPE_ULAW 0x0008 /* Compand Using u-Law */
1097#define DTYPE_ALAW 0x000C /* Compand Using A-Law */
1098#define RLSBIT 0x0010 /* Receive Bit Order */
1099#define IRFS 0x0200 /* Internal Receive Frame Sync Select */
1100#define RFSR 0x0400 /* Receive Frame Sync Required Select */
1101#define LRFS 0x1000 /* Low Receive Frame Sync Select */
1102#define LARFS 0x2000 /* Late Receive Frame Sync Select */
1103#define RCKFE 0x4000 /* Clock Falling Edge Select */
1104
1105/* SPORTx_RCR2 Masks */
1106#define SLEN(x) ((x)&0x1F) /* SPORT RX Word Length (2 - 31) */
1107#define RXSE 0x0100 /* RX Secondary Enable */
1108#define RSFSE 0x0200 /* RX Stereo Frame Sync Enable */
1109#define RRFST 0x0400 /* Right-First Data Order */
1110
1111/* SPORTx_STAT Masks */
1112#define RXNE 0x0001 /* Receive FIFO Not Empty Status */
1113#define RUVF 0x0002 /* Sticky Receive Underflow Status */
1114#define ROVF 0x0004 /* Sticky Receive Overflow Status */
1115#define TXF 0x0008 /* Transmit FIFO Full Status */
1116#define TUVF 0x0010 /* Sticky Transmit Underflow Status */
1117#define TOVF 0x0020 /* Sticky Transmit Overflow Status */
1118#define TXHRE 0x0040 /* Transmit Hold Register Empty */
1119
1120/* SPORTx_MCMC1 Macros */
1121#define SP_WOFF(x) ((x) & 0x3FF) /* Multichannel Window Offset Field */
1122
1123/* Only use WSIZE Macro With Logic OR While Setting Lower Order Bits */
1124#define SP_WSIZE(x) (((((x)>>0x3)-1)&0xF) << 0xC) /* Multichannel Window Size = (x/8)-1 */
1125
1126/* SPORTx_MCMC2 Masks */
1127#define REC_BYPASS 0x0000 /* Bypass Mode (No Clock Recovery) */
1128#define REC_2FROM4 0x0002 /* Recover 2 MHz Clock from 4 MHz Clock */
1129#define REC_8FROM16 0x0003 /* Recover 8 MHz Clock from 16 MHz Clock */
1130#define MCDTXPE 0x0004 /* Multichannel DMA Transmit Packing */
1131#define MCDRXPE 0x0008 /* Multichannel DMA Receive Packing */
1132#define MCMEN 0x0010 /* Multichannel Frame Mode Enable */
1133#define FSDR 0x0080 /* Multichannel Frame Sync to Data Relationship */
1134#define MFD_0 0x0000 /* Multichannel Frame Delay = 0 */
1135#define MFD_1 0x1000 /* Multichannel Frame Delay = 1 */
1136#define MFD_2 0x2000 /* Multichannel Frame Delay = 2 */
1137#define MFD_3 0x3000 /* Multichannel Frame Delay = 3 */
1138#define MFD_4 0x4000 /* Multichannel Frame Delay = 4 */
1139#define MFD_5 0x5000 /* Multichannel Frame Delay = 5 */
1140#define MFD_6 0x6000 /* Multichannel Frame Delay = 6 */
1141#define MFD_7 0x7000 /* Multichannel Frame Delay = 7 */
1142#define MFD_8 0x8000 /* Multichannel Frame Delay = 8 */
1143#define MFD_9 0x9000 /* Multichannel Frame Delay = 9 */
1144#define MFD_10 0xA000 /* Multichannel Frame Delay = 10 */
1145#define MFD_11 0xB000 /* Multichannel Frame Delay = 11 */
1146#define MFD_12 0xC000 /* Multichannel Frame Delay = 12 */
1147#define MFD_13 0xD000 /* Multichannel Frame Delay = 13 */
1148#define MFD_14 0xE000 /* Multichannel Frame Delay = 14 */
1149#define MFD_15 0xF000 /* Multichannel Frame Delay = 15 */
1150
1151
1152/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS *************************/
1153/* EBIU_AMGCTL Masks */
1154#define AMCKEN 0x0001 /* Enable CLKOUT */
1155#define AMBEN_NONE 0x0000 /* All Banks Disabled */
1156#define AMBEN_B0 0x0002 /* Enable Async Memory Bank 0 only */
1157#define AMBEN_B0_B1 0x0004 /* Enable Async Memory Banks 0 & 1 only */
1158#define AMBEN_B0_B1_B2 0x0006 /* Enable Async Memory Banks 0, 1, and 2 */
1159#define AMBEN_ALL 0x0008 /* Enable Async Memory Banks (all) 0, 1, 2, and 3 */
1160
1161/* EBIU_AMBCTL0 Masks */
1162#define B0RDYEN 0x00000001 /* Bank 0 (B0) RDY Enable */
1163#define B0RDYPOL 0x00000002 /* B0 RDY Active High */
1164#define B0TT_1 0x00000004 /* B0 Transition Time (Read to Write) = 1 cycle */
1165#define B0TT_2 0x00000008 /* B0 Transition Time (Read to Write) = 2 cycles */
1166#define B0TT_3 0x0000000C /* B0 Transition Time (Read to Write) = 3 cycles */
1167#define B0TT_4 0x00000000 /* B0 Transition Time (Read to Write) = 4 cycles */
1168#define B0ST_1 0x00000010 /* B0 Setup Time (AOE to Read/Write) = 1 cycle */
1169#define B0ST_2 0x00000020 /* B0 Setup Time (AOE to Read/Write) = 2 cycles */
1170#define B0ST_3 0x00000030 /* B0 Setup Time (AOE to Read/Write) = 3 cycles */
1171#define B0ST_4 0x00000000 /* B0 Setup Time (AOE to Read/Write) = 4 cycles */
1172#define B0HT_1 0x00000040 /* B0 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1173#define B0HT_2 0x00000080 /* B0 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1174#define B0HT_3 0x000000C0 /* B0 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1175#define B0HT_0 0x00000000 /* B0 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1176#define B0RAT_1 0x00000100 /* B0 Read Access Time = 1 cycle */
1177#define B0RAT_2 0x00000200 /* B0 Read Access Time = 2 cycles */
1178#define B0RAT_3 0x00000300 /* B0 Read Access Time = 3 cycles */
1179#define B0RAT_4 0x00000400 /* B0 Read Access Time = 4 cycles */
1180#define B0RAT_5 0x00000500 /* B0 Read Access Time = 5 cycles */
1181#define B0RAT_6 0x00000600 /* B0 Read Access Time = 6 cycles */
1182#define B0RAT_7 0x00000700 /* B0 Read Access Time = 7 cycles */
1183#define B0RAT_8 0x00000800 /* B0 Read Access Time = 8 cycles */
1184#define B0RAT_9 0x00000900 /* B0 Read Access Time = 9 cycles */
1185#define B0RAT_10 0x00000A00 /* B0 Read Access Time = 10 cycles */
1186#define B0RAT_11 0x00000B00 /* B0 Read Access Time = 11 cycles */
1187#define B0RAT_12 0x00000C00 /* B0 Read Access Time = 12 cycles */
1188#define B0RAT_13 0x00000D00 /* B0 Read Access Time = 13 cycles */
1189#define B0RAT_14 0x00000E00 /* B0 Read Access Time = 14 cycles */
1190#define B0RAT_15 0x00000F00 /* B0 Read Access Time = 15 cycles */
1191#define B0WAT_1 0x00001000 /* B0 Write Access Time = 1 cycle */
1192#define B0WAT_2 0x00002000 /* B0 Write Access Time = 2 cycles */
1193#define B0WAT_3 0x00003000 /* B0 Write Access Time = 3 cycles */
1194#define B0WAT_4 0x00004000 /* B0 Write Access Time = 4 cycles */
1195#define B0WAT_5 0x00005000 /* B0 Write Access Time = 5 cycles */
1196#define B0WAT_6 0x00006000 /* B0 Write Access Time = 6 cycles */
1197#define B0WAT_7 0x00007000 /* B0 Write Access Time = 7 cycles */
1198#define B0WAT_8 0x00008000 /* B0 Write Access Time = 8 cycles */
1199#define B0WAT_9 0x00009000 /* B0 Write Access Time = 9 cycles */
1200#define B0WAT_10 0x0000A000 /* B0 Write Access Time = 10 cycles */
1201#define B0WAT_11 0x0000B000 /* B0 Write Access Time = 11 cycles */
1202#define B0WAT_12 0x0000C000 /* B0 Write Access Time = 12 cycles */
1203#define B0WAT_13 0x0000D000 /* B0 Write Access Time = 13 cycles */
1204#define B0WAT_14 0x0000E000 /* B0 Write Access Time = 14 cycles */
1205#define B0WAT_15 0x0000F000 /* B0 Write Access Time = 15 cycles */
1206
1207#define B1RDYEN 0x00010000 /* Bank 1 (B1) RDY Enable */
1208#define B1RDYPOL 0x00020000 /* B1 RDY Active High */
1209#define B1TT_1 0x00040000 /* B1 Transition Time (Read to Write) = 1 cycle */
1210#define B1TT_2 0x00080000 /* B1 Transition Time (Read to Write) = 2 cycles */
1211#define B1TT_3 0x000C0000 /* B1 Transition Time (Read to Write) = 3 cycles */
1212#define B1TT_4 0x00000000 /* B1 Transition Time (Read to Write) = 4 cycles */
1213#define B1ST_1 0x00100000 /* B1 Setup Time (AOE to Read/Write) = 1 cycle */
1214#define B1ST_2 0x00200000 /* B1 Setup Time (AOE to Read/Write) = 2 cycles */
1215#define B1ST_3 0x00300000 /* B1 Setup Time (AOE to Read/Write) = 3 cycles */
1216#define B1ST_4 0x00000000 /* B1 Setup Time (AOE to Read/Write) = 4 cycles */
1217#define B1HT_1 0x00400000 /* B1 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1218#define B1HT_2 0x00800000 /* B1 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1219#define B1HT_3 0x00C00000 /* B1 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1220#define B1HT_0 0x00000000 /* B1 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1221#define B1RAT_1 0x01000000 /* B1 Read Access Time = 1 cycle */
1222#define B1RAT_2 0x02000000 /* B1 Read Access Time = 2 cycles */
1223#define B1RAT_3 0x03000000 /* B1 Read Access Time = 3 cycles */
1224#define B1RAT_4 0x04000000 /* B1 Read Access Time = 4 cycles */
1225#define B1RAT_5 0x05000000 /* B1 Read Access Time = 5 cycles */
1226#define B1RAT_6 0x06000000 /* B1 Read Access Time = 6 cycles */
1227#define B1RAT_7 0x07000000 /* B1 Read Access Time = 7 cycles */
1228#define B1RAT_8 0x08000000 /* B1 Read Access Time = 8 cycles */
1229#define B1RAT_9 0x09000000 /* B1 Read Access Time = 9 cycles */
1230#define B1RAT_10 0x0A000000 /* B1 Read Access Time = 10 cycles */
1231#define B1RAT_11 0x0B000000 /* B1 Read Access Time = 11 cycles */
1232#define B1RAT_12 0x0C000000 /* B1 Read Access Time = 12 cycles */
1233#define B1RAT_13 0x0D000000 /* B1 Read Access Time = 13 cycles */
1234#define B1RAT_14 0x0E000000 /* B1 Read Access Time = 14 cycles */
1235#define B1RAT_15 0x0F000000 /* B1 Read Access Time = 15 cycles */
1236#define B1WAT_1 0x10000000 /* B1 Write Access Time = 1 cycle */
1237#define B1WAT_2 0x20000000 /* B1 Write Access Time = 2 cycles */
1238#define B1WAT_3 0x30000000 /* B1 Write Access Time = 3 cycles */
1239#define B1WAT_4 0x40000000 /* B1 Write Access Time = 4 cycles */
1240#define B1WAT_5 0x50000000 /* B1 Write Access Time = 5 cycles */
1241#define B1WAT_6 0x60000000 /* B1 Write Access Time = 6 cycles */
1242#define B1WAT_7 0x70000000 /* B1 Write Access Time = 7 cycles */
1243#define B1WAT_8 0x80000000 /* B1 Write Access Time = 8 cycles */
1244#define B1WAT_9 0x90000000 /* B1 Write Access Time = 9 cycles */
1245#define B1WAT_10 0xA0000000 /* B1 Write Access Time = 10 cycles */
1246#define B1WAT_11 0xB0000000 /* B1 Write Access Time = 11 cycles */
1247#define B1WAT_12 0xC0000000 /* B1 Write Access Time = 12 cycles */
1248#define B1WAT_13 0xD0000000 /* B1 Write Access Time = 13 cycles */
1249#define B1WAT_14 0xE0000000 /* B1 Write Access Time = 14 cycles */
1250#define B1WAT_15 0xF0000000 /* B1 Write Access Time = 15 cycles */
1251
1252/* EBIU_AMBCTL1 Masks */
1253#define B2RDYEN 0x00000001 /* Bank 2 (B2) RDY Enable */
1254#define B2RDYPOL 0x00000002 /* B2 RDY Active High */
1255#define B2TT_1 0x00000004 /* B2 Transition Time (Read to Write) = 1 cycle */
1256#define B2TT_2 0x00000008 /* B2 Transition Time (Read to Write) = 2 cycles */
1257#define B2TT_3 0x0000000C /* B2 Transition Time (Read to Write) = 3 cycles */
1258#define B2TT_4 0x00000000 /* B2 Transition Time (Read to Write) = 4 cycles */
1259#define B2ST_1 0x00000010 /* B2 Setup Time (AOE to Read/Write) = 1 cycle */
1260#define B2ST_2 0x00000020 /* B2 Setup Time (AOE to Read/Write) = 2 cycles */
1261#define B2ST_3 0x00000030 /* B2 Setup Time (AOE to Read/Write) = 3 cycles */
1262#define B2ST_4 0x00000000 /* B2 Setup Time (AOE to Read/Write) = 4 cycles */
1263#define B2HT_1 0x00000040 /* B2 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1264#define B2HT_2 0x00000080 /* B2 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1265#define B2HT_3 0x000000C0 /* B2 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1266#define B2HT_0 0x00000000 /* B2 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1267#define B2RAT_1 0x00000100 /* B2 Read Access Time = 1 cycle */
1268#define B2RAT_2 0x00000200 /* B2 Read Access Time = 2 cycles */
1269#define B2RAT_3 0x00000300 /* B2 Read Access Time = 3 cycles */
1270#define B2RAT_4 0x00000400 /* B2 Read Access Time = 4 cycles */
1271#define B2RAT_5 0x00000500 /* B2 Read Access Time = 5 cycles */
1272#define B2RAT_6 0x00000600 /* B2 Read Access Time = 6 cycles */
1273#define B2RAT_7 0x00000700 /* B2 Read Access Time = 7 cycles */
1274#define B2RAT_8 0x00000800 /* B2 Read Access Time = 8 cycles */
1275#define B2RAT_9 0x00000900 /* B2 Read Access Time = 9 cycles */
1276#define B2RAT_10 0x00000A00 /* B2 Read Access Time = 10 cycles */
1277#define B2RAT_11 0x00000B00 /* B2 Read Access Time = 11 cycles */
1278#define B2RAT_12 0x00000C00 /* B2 Read Access Time = 12 cycles */
1279#define B2RAT_13 0x00000D00 /* B2 Read Access Time = 13 cycles */
1280#define B2RAT_14 0x00000E00 /* B2 Read Access Time = 14 cycles */
1281#define B2RAT_15 0x00000F00 /* B2 Read Access Time = 15 cycles */
1282#define B2WAT_1 0x00001000 /* B2 Write Access Time = 1 cycle */
1283#define B2WAT_2 0x00002000 /* B2 Write Access Time = 2 cycles */
1284#define B2WAT_3 0x00003000 /* B2 Write Access Time = 3 cycles */
1285#define B2WAT_4 0x00004000 /* B2 Write Access Time = 4 cycles */
1286#define B2WAT_5 0x00005000 /* B2 Write Access Time = 5 cycles */
1287#define B2WAT_6 0x00006000 /* B2 Write Access Time = 6 cycles */
1288#define B2WAT_7 0x00007000 /* B2 Write Access Time = 7 cycles */
1289#define B2WAT_8 0x00008000 /* B2 Write Access Time = 8 cycles */
1290#define B2WAT_9 0x00009000 /* B2 Write Access Time = 9 cycles */
1291#define B2WAT_10 0x0000A000 /* B2 Write Access Time = 10 cycles */
1292#define B2WAT_11 0x0000B000 /* B2 Write Access Time = 11 cycles */
1293#define B2WAT_12 0x0000C000 /* B2 Write Access Time = 12 cycles */
1294#define B2WAT_13 0x0000D000 /* B2 Write Access Time = 13 cycles */
1295#define B2WAT_14 0x0000E000 /* B2 Write Access Time = 14 cycles */
1296#define B2WAT_15 0x0000F000 /* B2 Write Access Time = 15 cycles */
1297
1298#define B3RDYEN 0x00010000 /* Bank 3 (B3) RDY Enable */
1299#define B3RDYPOL 0x00020000 /* B3 RDY Active High */
1300#define B3TT_1 0x00040000 /* B3 Transition Time (Read to Write) = 1 cycle */
1301#define B3TT_2 0x00080000 /* B3 Transition Time (Read to Write) = 2 cycles */
1302#define B3TT_3 0x000C0000 /* B3 Transition Time (Read to Write) = 3 cycles */
1303#define B3TT_4 0x00000000 /* B3 Transition Time (Read to Write) = 4 cycles */
1304#define B3ST_1 0x00100000 /* B3 Setup Time (AOE to Read/Write) = 1 cycle */
1305#define B3ST_2 0x00200000 /* B3 Setup Time (AOE to Read/Write) = 2 cycles */
1306#define B3ST_3 0x00300000 /* B3 Setup Time (AOE to Read/Write) = 3 cycles */
1307#define B3ST_4 0x00000000 /* B3 Setup Time (AOE to Read/Write) = 4 cycles */
1308#define B3HT_1 0x00400000 /* B3 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1309#define B3HT_2 0x00800000 /* B3 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1310#define B3HT_3 0x00C00000 /* B3 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1311#define B3HT_0 0x00000000 /* B3 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1312#define B3RAT_1 0x01000000 /* B3 Read Access Time = 1 cycle */
1313#define B3RAT_2 0x02000000 /* B3 Read Access Time = 2 cycles */
1314#define B3RAT_3 0x03000000 /* B3 Read Access Time = 3 cycles */
1315#define B3RAT_4 0x04000000 /* B3 Read Access Time = 4 cycles */
1316#define B3RAT_5 0x05000000 /* B3 Read Access Time = 5 cycles */
1317#define B3RAT_6 0x06000000 /* B3 Read Access Time = 6 cycles */
1318#define B3RAT_7 0x07000000 /* B3 Read Access Time = 7 cycles */
1319#define B3RAT_8 0x08000000 /* B3 Read Access Time = 8 cycles */
1320#define B3RAT_9 0x09000000 /* B3 Read Access Time = 9 cycles */
1321#define B3RAT_10 0x0A000000 /* B3 Read Access Time = 10 cycles */
1322#define B3RAT_11 0x0B000000 /* B3 Read Access Time = 11 cycles */
1323#define B3RAT_12 0x0C000000 /* B3 Read Access Time = 12 cycles */
1324#define B3RAT_13 0x0D000000 /* B3 Read Access Time = 13 cycles */
1325#define B3RAT_14 0x0E000000 /* B3 Read Access Time = 14 cycles */
1326#define B3RAT_15 0x0F000000 /* B3 Read Access Time = 15 cycles */
1327#define B3WAT_1 0x10000000 /* B3 Write Access Time = 1 cycle */
1328#define B3WAT_2 0x20000000 /* B3 Write Access Time = 2 cycles */
1329#define B3WAT_3 0x30000000 /* B3 Write Access Time = 3 cycles */
1330#define B3WAT_4 0x40000000 /* B3 Write Access Time = 4 cycles */
1331#define B3WAT_5 0x50000000 /* B3 Write Access Time = 5 cycles */
1332#define B3WAT_6 0x60000000 /* B3 Write Access Time = 6 cycles */
1333#define B3WAT_7 0x70000000 /* B3 Write Access Time = 7 cycles */
1334#define B3WAT_8 0x80000000 /* B3 Write Access Time = 8 cycles */
1335#define B3WAT_9 0x90000000 /* B3 Write Access Time = 9 cycles */
1336#define B3WAT_10 0xA0000000 /* B3 Write Access Time = 10 cycles */
1337#define B3WAT_11 0xB0000000 /* B3 Write Access Time = 11 cycles */
1338#define B3WAT_12 0xC0000000 /* B3 Write Access Time = 12 cycles */
1339#define B3WAT_13 0xD0000000 /* B3 Write Access Time = 13 cycles */
1340#define B3WAT_14 0xE0000000 /* B3 Write Access Time = 14 cycles */
1341#define B3WAT_15 0xF0000000 /* B3 Write Access Time = 15 cycles */
1342
1343
1344/* ********************** SDRAM CONTROLLER MASKS **********************************************/
1345/* EBIU_SDGCTL Masks */
1346#define SCTLE 0x00000001 /* Enable SDRAM Signals */
1347#define CL_2 0x00000008 /* SDRAM CAS Latency = 2 cycles */
1348#define CL_3 0x0000000C /* SDRAM CAS Latency = 3 cycles */
1349#define PASR_ALL 0x00000000 /* All 4 SDRAM Banks Refreshed In Self-Refresh */
1350#define PASR_B0_B1 0x00000010 /* SDRAM Banks 0 and 1 Are Refreshed In Self-Refresh */
1351#define PASR_B0 0x00000020 /* Only SDRAM Bank 0 Is Refreshed In Self-Refresh */
1352#define TRAS_1 0x00000040 /* SDRAM tRAS = 1 cycle */
1353#define TRAS_2 0x00000080 /* SDRAM tRAS = 2 cycles */
1354#define TRAS_3 0x000000C0 /* SDRAM tRAS = 3 cycles */
1355#define TRAS_4 0x00000100 /* SDRAM tRAS = 4 cycles */
1356#define TRAS_5 0x00000140 /* SDRAM tRAS = 5 cycles */
1357#define TRAS_6 0x00000180 /* SDRAM tRAS = 6 cycles */
1358#define TRAS_7 0x000001C0 /* SDRAM tRAS = 7 cycles */
1359#define TRAS_8 0x00000200 /* SDRAM tRAS = 8 cycles */
1360#define TRAS_9 0x00000240 /* SDRAM tRAS = 9 cycles */
1361#define TRAS_10 0x00000280 /* SDRAM tRAS = 10 cycles */
1362#define TRAS_11 0x000002C0 /* SDRAM tRAS = 11 cycles */
1363#define TRAS_12 0x00000300 /* SDRAM tRAS = 12 cycles */
1364#define TRAS_13 0x00000340 /* SDRAM tRAS = 13 cycles */
1365#define TRAS_14 0x00000380 /* SDRAM tRAS = 14 cycles */
1366#define TRAS_15 0x000003C0 /* SDRAM tRAS = 15 cycles */
1367#define TRP_1 0x00000800 /* SDRAM tRP = 1 cycle */
1368#define TRP_2 0x00001000 /* SDRAM tRP = 2 cycles */
1369#define TRP_3 0x00001800 /* SDRAM tRP = 3 cycles */
1370#define TRP_4 0x00002000 /* SDRAM tRP = 4 cycles */
1371#define TRP_5 0x00002800 /* SDRAM tRP = 5 cycles */
1372#define TRP_6 0x00003000 /* SDRAM tRP = 6 cycles */
1373#define TRP_7 0x00003800 /* SDRAM tRP = 7 cycles */
1374#define TRCD_1 0x00008000 /* SDRAM tRCD = 1 cycle */
1375#define TRCD_2 0x00010000 /* SDRAM tRCD = 2 cycles */
1376#define TRCD_3 0x00018000 /* SDRAM tRCD = 3 cycles */
1377#define TRCD_4 0x00020000 /* SDRAM tRCD = 4 cycles */
1378#define TRCD_5 0x00028000 /* SDRAM tRCD = 5 cycles */
1379#define TRCD_6 0x00030000 /* SDRAM tRCD = 6 cycles */
1380#define TRCD_7 0x00038000 /* SDRAM tRCD = 7 cycles */
1381#define TWR_1 0x00080000 /* SDRAM tWR = 1 cycle */
1382#define TWR_2 0x00100000 /* SDRAM tWR = 2 cycles */
1383#define TWR_3 0x00180000 /* SDRAM tWR = 3 cycles */
1384#define PUPSD 0x00200000 /* Power-Up Start Delay (15 SCLK Cycles Delay) */
1385#define PSM 0x00400000 /* Power-Up Sequence (Mode Register Before/After* Refresh) */
1386#define PSS 0x00800000 /* Enable Power-Up Sequence on Next SDRAM Access */
1387#define SRFS 0x01000000 /* Enable SDRAM Self-Refresh Mode */
1388#define EBUFE 0x02000000 /* Enable External Buffering Timing */
1389#define FBBRW 0x04000000 /* Enable Fast Back-To-Back Read To Write */
1390#define EMREN 0x10000000 /* Extended Mode Register Enable */
1391#define TCSR 0x20000000 /* Temp-Compensated Self-Refresh Value (85/45* Deg C) */
1392#define CDDBG 0x40000000 /* Tristate SDRAM Controls During Bus Grant */
1393
1394/* EBIU_SDBCTL Masks */
1395#define EBE 0x0001 /* Enable SDRAM External Bank */
1396#define EBSZ_16 0x0000 /* SDRAM External Bank Size = 16MB */
1397#define EBSZ_32 0x0002 /* SDRAM External Bank Size = 32MB */
1398#define EBSZ_64 0x0004 /* SDRAM External Bank Size = 64MB */
1399#define EBSZ_128 0x0006 /* SDRAM External Bank Size = 128MB */
1400#define EBSZ_256 0x0008 /* SDRAM External Bank Size = 256MB */
1401#define EBSZ_512 0x000A /* SDRAM External Bank Size = 512MB */
1402#define EBCAW_8 0x0000 /* SDRAM External Bank Column Address Width = 8 Bits */
1403#define EBCAW_9 0x0010 /* SDRAM External Bank Column Address Width = 9 Bits */
1404#define EBCAW_10 0x0020 /* SDRAM External Bank Column Address Width = 10 Bits */
1405#define EBCAW_11 0x0030 /* SDRAM External Bank Column Address Width = 11 Bits */
1406
1407/* EBIU_SDSTAT Masks */
1408#define SDCI 0x0001 /* SDRAM Controller Idle */
1409#define SDSRA 0x0002 /* SDRAM Self-Refresh Active */
1410#define SDPUA 0x0004 /* SDRAM Power-Up Active */
1411#define SDRS 0x0008 /* SDRAM Will Power-Up On Next Access */
1412#define SDEASE 0x0010 /* SDRAM EAB Sticky Error Status */
1413#define BGSTAT 0x0020 /* Bus Grant Status */
1414
1415
1416/* ************************** DMA CONTROLLER MASKS ********************************/
1417/* DMAx_CONFIG, MDMA_yy_CONFIG Masks */
1418#define DMAEN 0x0001 /* DMA Channel Enable */
1419#define WNR 0x0002 /* Channel Direction (W/R*) */
1420#define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */
1421#define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */
1422#define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */
1423#define DMA2D 0x0010 /* DMA Mode (2D/1D*) */
1424#define RESTART 0x0020 /* DMA Buffer Clear */
1425#define DI_SEL 0x0040 /* Data Interrupt Timing Select */
1426#define DI_EN 0x0080 /* Data Interrupt Enable */
1427#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1428#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1429#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1430#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1431#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1432#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1433#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1434#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1435#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1436#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1437#define NDSIZE 0x0900 /* Next Descriptor Size */
1438#define DMAFLOW 0x7000 /* Flow Control */
1439#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1440#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1441#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1442#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1443#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1444
1445/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
1446#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */
1447#define PMAP 0xF000 /* Peripheral Mapped To This Channel */
1448#define PMAP_PPI 0x0000 /* PPI Port DMA */
1449#define PMAP_EMACRX 0x1000 /* Ethernet Receive DMA */
1450#define PMAP_EMACTX 0x2000 /* Ethernet Transmit DMA */
1451#define PMAP_SPORT0RX 0x3000 /* SPORT0 Receive DMA */
1452#define PMAP_SPORT0TX 0x4000 /* SPORT0 Transmit DMA */
1453#define PMAP_SPORT1RX 0x5000 /* SPORT1 Receive DMA */
1454#define PMAP_SPORT1TX 0x6000 /* SPORT1 Transmit DMA */
1455#define PMAP_SPI 0x7000 /* SPI Port DMA */
1456#define PMAP_UART0RX 0x8000 /* UART0 Port Receive DMA */
1457#define PMAP_UART0TX 0x9000 /* UART0 Port Transmit DMA */
1458#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */
1459#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */
1460
1461/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
1462#define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */
1463#define DMA_ERR 0x0002 /* DMA Error Interrupt Status */
1464#define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */
1465#define DMA_RUN 0x0008 /* DMA Channel Running Indicator */
1466
1467
1468/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/
1469/* PPI_CONTROL Masks */
1470#define PORT_EN 0x0001 /* PPI Port Enable */
1471#define PORT_DIR 0x0002 /* PPI Port Direction */
1472#define XFR_TYPE 0x000C /* PPI Transfer Type */
1473#define PORT_CFG 0x0030 /* PPI Port Configuration */
1474#define FLD_SEL 0x0040 /* PPI Active Field Select */
1475#define PACK_EN 0x0080 /* PPI Packing Mode */
1476#define DMA32 0x0100 /* PPI 32-bit DMA Enable */
1477#define SKIP_EN 0x0200 /* PPI Skip Element Enable */
1478#define SKIP_EO 0x0400 /* PPI Skip Even/Odd Elements */
1479#define DLEN_8 0x0000 /* Data Length = 8 Bits */
1480#define DLEN_10 0x0800 /* Data Length = 10 Bits */
1481#define DLEN_11 0x1000 /* Data Length = 11 Bits */
1482#define DLEN_12 0x1800 /* Data Length = 12 Bits */
1483#define DLEN_13 0x2000 /* Data Length = 13 Bits */
1484#define DLEN_14 0x2800 /* Data Length = 14 Bits */
1485#define DLEN_15 0x3000 /* Data Length = 15 Bits */
1486#define DLEN_16 0x3800 /* Data Length = 16 Bits */
1487#define DLENGTH 0x3800 /* PPI Data Length */
1488#define POLC 0x4000 /* PPI Clock Polarity */
1489#define POLS 0x8000 /* PPI Frame Sync Polarity */
1490
1491/* PPI_STATUS Masks */
1492#define FLD 0x0400 /* Field Indicator */
1493#define FT_ERR 0x0800 /* Frame Track Error */
1494#define OVR 0x1000 /* FIFO Overflow Error */
1495#define UNDR 0x2000 /* FIFO Underrun Error */
1496#define ERR_DET 0x4000 /* Error Detected Indicator */
1497#define ERR_NCOR 0x8000 /* Error Not Corrected Indicator */
1498
1499
1500/* ******************** TWO-WIRE INTERFACE (TWI) MASKS ***********************/
1501/* TWI_CLKDIV Macros (Use: *pTWI_CLKDIV = CLKLOW(x)|CLKHI(y); ) */
1502#define CLKLOW(x) ((x) & 0xFF) /* Periods Clock Is Held Low */
1503#define CLKHI(y) (((y)&0xFF)<<0x8) /* Periods Before New Clock Low */
1504
1505/* TWI_PRESCALE Masks */
1506#define PRESCALE 0x007F /* SCLKs Per Internal Time Reference (10MHz) */
1507#define TWI_ENA 0x0080 /* TWI Enable */
1508#define SCCB 0x0200 /* SCCB Compatibility Enable */
1509
1510/* TWI_SLAVE_CTRL Masks */
1511#define SEN 0x0001 /* Slave Enable */
1512#define SADD_LEN 0x0002 /* Slave Address Length */
1513#define STDVAL 0x0004 /* Slave Transmit Data Valid */
1514#define NAK 0x0008 /* NAK/ACK* Generated At Conclusion Of Transfer */
1515#define GEN 0x0010 /* General Call Adrress Matching Enabled */
1516
1517/* TWI_SLAVE_STAT Masks */
1518#define SDIR 0x0001 /* Slave Transfer Direction (Transmit/Receive*) */
1519#define GCALL 0x0002 /* General Call Indicator */
1520
1521/* TWI_MASTER_CTRL Masks */
1522#define MEN 0x0001 /* Master Mode Enable */
1523#define MADD_LEN 0x0002 /* Master Address Length */
1524#define MDIR 0x0004 /* Master Transmit Direction (RX/TX*) */
1525#define FAST 0x0008 /* Use Fast Mode Timing Specs */
1526#define STOP 0x0010 /* Issue Stop Condition */
1527#define RSTART 0x0020 /* Repeat Start or Stop* At End Of Transfer */
1528#define DCNT 0x3FC0 /* Data Bytes To Transfer */
1529#define SDAOVR 0x4000 /* Serial Data Override */
1530#define SCLOVR 0x8000 /* Serial Clock Override */
1531
1532/* TWI_MASTER_STAT Masks */
1533#define MPROG 0x0001 /* Master Transfer In Progress */
1534#define LOSTARB 0x0002 /* Lost Arbitration Indicator (Xfer Aborted) */
1535#define ANAK 0x0004 /* Address Not Acknowledged */
1536#define DNAK 0x0008 /* Data Not Acknowledged */
1537#define BUFRDERR 0x0010 /* Buffer Read Error */
1538#define BUFWRERR 0x0020 /* Buffer Write Error */
1539#define SDASEN 0x0040 /* Serial Data Sense */
1540#define SCLSEN 0x0080 /* Serial Clock Sense */
1541#define BUSBUSY 0x0100 /* Bus Busy Indicator */
1542
1543/* TWI_INT_SRC and TWI_INT_ENABLE Masks */
1544#define SINIT 0x0001 /* Slave Transfer Initiated */
1545#define SCOMP 0x0002 /* Slave Transfer Complete */
1546#define SERR 0x0004 /* Slave Transfer Error */
1547#define SOVF 0x0008 /* Slave Overflow */
1548#define MCOMP 0x0010 /* Master Transfer Complete */
1549#define MERR 0x0020 /* Master Transfer Error */
1550#define XMTSERV 0x0040 /* Transmit FIFO Service */
1551#define RCVSERV 0x0080 /* Receive FIFO Service */
1552
1553/* TWI_FIFO_CTRL Masks */
1554#define XMTFLUSH 0x0001 /* Transmit Buffer Flush */
1555#define RCVFLUSH 0x0002 /* Receive Buffer Flush */
1556#define XMTINTLEN 0x0004 /* Transmit Buffer Interrupt Length */
1557#define RCVINTLEN 0x0008 /* Receive Buffer Interrupt Length */
1558
1559/* TWI_FIFO_STAT Masks */
1560#define XMTSTAT 0x0003 /* Transmit FIFO Status */
1561#define XMT_EMPTY 0x0000 /* Transmit FIFO Empty */
1562#define XMT_HALF 0x0001 /* Transmit FIFO Has 1 Byte To Write */
1563#define XMT_FULL 0x0003 /* Transmit FIFO Full (2 Bytes To Write) */
1564
1565#define RCVSTAT 0x000C /* Receive FIFO Status */
1566#define RCV_EMPTY 0x0000 /* Receive FIFO Empty */
1567#define RCV_HALF 0x0004 /* Receive FIFO Has 1 Byte To Read */
1568#define RCV_FULL 0x000C /* Receive FIFO Full (2 Bytes To Read) */
1569
1570
1571/* Omit CAN masks from defBF534.h */
1572
1573/* ******************* PIN CONTROL REGISTER MASKS ************************/
1574/* PORT_MUX Masks */
1575#define PJSE 0x0001 /* Port J SPI/SPORT Enable */
1576#define PJSE_SPORT 0x0000 /* Enable TFS0/DT0PRI */
1577#define PJSE_SPI 0x0001 /* Enable SPI_SSEL3:2 */
1578
1579#define PJCE(x) (((x)&0x3)<<1) /* Port J CAN/SPI/SPORT Enable */
1580#define PJCE_SPORT 0x0000 /* Enable DR0SEC/DT0SEC */
1581#define PJCE_CAN 0x0002 /* Enable CAN RX/TX */
1582#define PJCE_SPI 0x0004 /* Enable SPI_SSEL7 */
1583
1584#define PFDE 0x0008 /* Port F DMA Request Enable */
1585#define PFDE_UART 0x0000 /* Enable UART0 RX/TX */
1586#define PFDE_DMA 0x0008 /* Enable DMAR1:0 */
1587
1588#define PFTE 0x0010 /* Port F Timer Enable */
1589#define PFTE_UART 0x0000 /* Enable UART1 RX/TX */
1590#define PFTE_TIMER 0x0010 /* Enable TMR7:6 */
1591
1592#define PFS6E 0x0020 /* Port F SPI SSEL 6 Enable */
1593#define PFS6E_TIMER 0x0000 /* Enable TMR5 */
1594#define PFS6E_SPI 0x0020 /* Enable SPI_SSEL6 */
1595
1596#define PFS5E 0x0040 /* Port F SPI SSEL 5 Enable */
1597#define PFS5E_TIMER 0x0000 /* Enable TMR4 */
1598#define PFS5E_SPI 0x0040 /* Enable SPI_SSEL5 */
1599
1600#define PFS4E 0x0080 /* Port F SPI SSEL 4 Enable */
1601#define PFS4E_TIMER 0x0000 /* Enable TMR3 */
1602#define PFS4E_SPI 0x0080 /* Enable SPI_SSEL4 */
1603
1604#define PFFE 0x0100 /* Port F PPI Frame Sync Enable */
1605#define PFFE_TIMER 0x0000 /* Enable TMR2 */
1606#define PFFE_PPI 0x0100 /* Enable PPI FS3 */
1607
1608#define PGSE 0x0200 /* Port G SPORT1 Secondary Enable */
1609#define PGSE_PPI 0x0000 /* Enable PPI D9:8 */
1610#define PGSE_SPORT 0x0200 /* Enable DR1SEC/DT1SEC */
1611
1612#define PGRE 0x0400 /* Port G SPORT1 Receive Enable */
1613#define PGRE_PPI 0x0000 /* Enable PPI D12:10 */
1614#define PGRE_SPORT 0x0400 /* Enable DR1PRI/RFS1/RSCLK1 */
1615
1616#define PGTE 0x0800 /* Port G SPORT1 Transmit Enable */
1617#define PGTE_PPI 0x0000 /* Enable PPI D15:13 */
1618#define PGTE_SPORT 0x0800 /* Enable DT1PRI/TFS1/TSCLK1 */
1619
1620
1621/* ****************** HANDSHAKE DMA (HDMA) MASKS *********************/
1622/* HDMAx_CTL Masks */
1623#define HMDMAEN 0x0001 /* Enable Handshake DMA 0/1 */
1624#define REP 0x0002 /* HDMA Request Polarity */
1625#define UTE 0x0004 /* Urgency Threshold Enable */
1626#define OIE 0x0010 /* Overflow Interrupt Enable */
1627#define BDIE 0x0020 /* Block Done Interrupt Enable */
1628#define MBDI 0x0040 /* Mask Block Done IRQ If Pending ECNT */
1629#define DRQ 0x0300 /* HDMA Request Type */
1630#define DRQ_NONE 0x0000 /* No Request */
1631#define DRQ_SINGLE 0x0100 /* Channels Request Single */
1632#define DRQ_MULTI 0x0200 /* Channels Request Multi (Default) */
1633#define DRQ_URGENT 0x0300 /* Channels Request Multi Urgent */
1634#define RBC 0x1000 /* Reload BCNT With IBCNT */
1635#define PS 0x2000 /* HDMA Pin Status */
1636#define OI 0x4000 /* Overflow Interrupt Generated */
1637#define BDI 0x8000 /* Block Done Interrupt Generated */
1638
1639/* entry addresses of the user-callable Boot ROM functions */
1640
1641#define _BOOTROM_RESET 0xEF000000
1642#define _BOOTROM_FINAL_INIT 0xEF000002
1643#define _BOOTROM_DO_MEMORY_DMA 0xEF000006
1644#define _BOOTROM_BOOT_DXE_FLASH 0xEF000008
1645#define _BOOTROM_BOOT_DXE_SPI 0xEF00000A
1646#define _BOOTROM_BOOT_DXE_TWI 0xEF00000C
1647#define _BOOTROM_GET_DXE_ADDRESS_FLASH 0xEF000010
1648#define _BOOTROM_GET_DXE_ADDRESS_SPI 0xEF000012
1649#define _BOOTROM_GET_DXE_ADDRESS_TWI 0xEF000014
1650
1651/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
1652#define PGDE_UART PFDE_UART
1653#define PGDE_DMA PFDE_DMA
1654#define CKELOW SCKELOW
1655
1656/* ==== end from defBF534.h ==== */
1657
1658/* HOST Port Registers */
1659
1660#define HOST_CONTROL 0xffc03400 /* HOST Control Register */
1661#define HOST_STATUS 0xffc03404 /* HOST Status Register */
1662#define HOST_TIMEOUT 0xffc03408 /* HOST Acknowledge Mode Timeout Register */
1663
1664/* Counter Registers */
1665
1666#define CNT_CONFIG 0xffc03500 /* Configuration Register */
1667#define CNT_IMASK 0xffc03504 /* Interrupt Mask Register */
1668#define CNT_STATUS 0xffc03508 /* Status Register */
1669#define CNT_COMMAND 0xffc0350c /* Command Register */
1670#define CNT_DEBOUNCE 0xffc03510 /* Debounce Register */
1671#define CNT_COUNTER 0xffc03514 /* Counter Register */
1672#define CNT_MAX 0xffc03518 /* Maximal Count Register */
1673#define CNT_MIN 0xffc0351c /* Minimal Count Register */
1674
1675/* OTP/FUSE Registers */
1676
1677#define OTP_CONTROL 0xffc03600 /* OTP/Fuse Control Register */
1678#define OTP_BEN 0xffc03604 /* OTP/Fuse Byte Enable */
1679#define OTP_STATUS 0xffc03608 /* OTP/Fuse Status */
1680#define OTP_TIMING 0xffc0360c /* OTP/Fuse Access Timing */
1681
1682/* Security Registers */
1683
1684#define SECURE_SYSSWT 0xffc03620 /* Secure System Switches */
1685#define SECURE_CONTROL 0xffc03624 /* Secure Control */
1686#define SECURE_STATUS 0xffc03628 /* Secure Status */
1687
1688/* OTP Read/Write Data Buffer Registers */
1689
1690#define OTP_DATA0 0xffc03680 /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1691#define OTP_DATA1 0xffc03684 /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1692#define OTP_DATA2 0xffc03688 /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1693#define OTP_DATA3 0xffc0368c /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1694
1695/* NFC Registers */
1696
1697#define NFC_CTL 0xffc03700 /* NAND Control Register */
1698#define NFC_STAT 0xffc03704 /* NAND Status Register */
1699#define NFC_IRQSTAT 0xffc03708 /* NAND Interrupt Status Register */
1700#define NFC_IRQMASK 0xffc0370c /* NAND Interrupt Mask Register */
1701#define NFC_ECC0 0xffc03710 /* NAND ECC Register 0 */
1702#define NFC_ECC1 0xffc03714 /* NAND ECC Register 1 */
1703#define NFC_ECC2 0xffc03718 /* NAND ECC Register 2 */
1704#define NFC_ECC3 0xffc0371c /* NAND ECC Register 3 */
1705#define NFC_COUNT 0xffc03720 /* NAND ECC Count Register */
1706#define NFC_RST 0xffc03724 /* NAND ECC Reset Register */
1707#define NFC_PGCTL 0xffc03728 /* NAND Page Control Register */
1708#define NFC_READ 0xffc0372c /* NAND Read Data Register */
1709#define NFC_ADDR 0xffc03740 /* NAND Address Register */
1710#define NFC_CMD 0xffc03744 /* NAND Command Register */
1711#define NFC_DATA_WR 0xffc03748 /* NAND Data Write Register */
1712#define NFC_DATA_RD 0xffc0374c /* NAND Data Read Register */
1713
1714/* ********************************************************** */
1715/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
1716/* and MULTI BIT READ MACROS */
1717/* ********************************************************** */
1718
1719/* Bit masks for HOST_CONTROL */
1720
1721#define HOST_CNTR_HOST_EN 0x1 /* Host Enable */
1722#define HOST_CNTR_nHOST_EN 0x0
1723#define HOST_CNTR_HOST_END 0x2 /* Host Endianess */
1724#define HOST_CNTR_nHOST_END 0x0
1725#define HOST_CNTR_DATA_SIZE 0x4 /* Data Size */
1726#define HOST_CNTR_nDATA_SIZE 0x0
1727#define HOST_CNTR_HOST_RST 0x8 /* Host Reset */
1728#define HOST_CNTR_nHOST_RST 0x0
1729#define HOST_CNTR_HRDY_OVR 0x20 /* Host Ready Override */
1730#define HOST_CNTR_nHRDY_OVR 0x0
1731#define HOST_CNTR_INT_MODE 0x40 /* Interrupt Mode */
1732#define HOST_CNTR_nINT_MODE 0x0
1733#define HOST_CNTR_BT_EN 0x80 /* Bus Timeout Enable */
1734#define HOST_CNTR_ nBT_EN 0x0
1735#define HOST_CNTR_EHW 0x100 /* Enable Host Write */
1736#define HOST_CNTR_nEHW 0x0
1737#define HOST_CNTR_EHR 0x200 /* Enable Host Read */
1738#define HOST_CNTR_nEHR 0x0
1739#define HOST_CNTR_BDR 0x400 /* Burst DMA Requests */
1740#define HOST_CNTR_nBDR 0x0
1741
1742/* Bit masks for HOST_STATUS */
1743
1744#define HOST_STAT_READY 0x1 /* DMA Ready */
1745#define HOST_STAT_nREADY 0x0
1746#define HOST_STAT_FIFOFULL 0x2 /* FIFO Full */
1747#define HOST_STAT_nFIFOFULL 0x0
1748#define HOST_STAT_FIFOEMPTY 0x4 /* FIFO Empty */
1749#define HOST_STAT_nFIFOEMPTY 0x0
1750#define HOST_STAT_COMPLETE 0x8 /* DMA Complete */
1751#define HOST_STAT_nCOMPLETE 0x0
1752#define HOST_STAT_HSHK 0x10 /* Host Handshake */
1753#define HOST_STAT_nHSHK 0x0
1754#define HOST_STAT_TIMEOUT 0x20 /* Host Timeout */
1755#define HOST_STAT_nTIMEOUT 0x0
1756#define HOST_STAT_HIRQ 0x40 /* Host Interrupt Request */
1757#define HOST_STAT_nHIRQ 0x0
1758#define HOST_STAT_ALLOW_CNFG 0x80 /* Allow New Configuration */
1759#define HOST_STAT_nALLOW_CNFG 0x0
1760#define HOST_STAT_DMA_DIR 0x100 /* DMA Direction */
1761#define HOST_STAT_nDMA_DIR 0x0
1762#define HOST_STAT_BTE 0x200 /* Bus Timeout Enabled */
1763#define HOST_STAT_nBTE 0x0
1764#define HOST_STAT_HOSTRD_DONE 0x8000 /* Host Read Completion Interrupt */
1765#define HOST_STAT_nHOSTRD_DONE 0x0
1766
1767/* Bit masks for HOST_TIMEOUT */
1768
1769#define HOST_COUNT_TIMEOUT 0x7ff /* Host Timeout count */
1770
1771/* Bit masks for CNT_CONFIG */
1772
1773#define CNTE 0x1 /* Counter Enable */
1774#define nCNTE 0x0
1775#define DEBE 0x2 /* Debounce Enable */
1776#define nDEBE 0x0
1777#define CDGINV 0x10 /* CDG Pin Polarity Invert */
1778#define nCDGINV 0x0
1779#define CUDINV 0x20 /* CUD Pin Polarity Invert */
1780#define nCUDINV 0x0
1781#define CZMINV 0x40 /* CZM Pin Polarity Invert */
1782#define nCZMINV 0x0
1783#define CNTMODE 0x700 /* Counter Operating Mode */
1784#define ZMZC 0x800 /* CZM Zeroes Counter Enable */
1785#define nZMZC 0x0
1786#define BNDMODE 0x3000 /* Boundary register Mode */
1787#define INPDIS 0x8000 /* CUG and CDG Input Disable */
1788#define nINPDIS 0x0
1789
1790/* Bit masks for CNT_IMASK */
1791
1792#define ICIE 0x1 /* Illegal Gray/Binary Code Interrupt Enable */
1793#define nICIE 0x0
1794#define UCIE 0x2 /* Up count Interrupt Enable */
1795#define nUCIE 0x0
1796#define DCIE 0x4 /* Down count Interrupt Enable */
1797#define nDCIE 0x0
1798#define MINCIE 0x8 /* Min Count Interrupt Enable */
1799#define nMINCIE 0x0
1800#define MAXCIE 0x10 /* Max Count Interrupt Enable */
1801#define nMAXCIE 0x0
1802#define COV31IE 0x20 /* Bit 31 Overflow Interrupt Enable */
1803#define nCOV31IE 0x0
1804#define COV15IE 0x40 /* Bit 15 Overflow Interrupt Enable */
1805#define nCOV15IE 0x0
1806#define CZEROIE 0x80 /* Count to Zero Interrupt Enable */
1807#define nCZEROIE 0x0
1808#define CZMIE 0x100 /* CZM Pin Interrupt Enable */
1809#define nCZMIE 0x0
1810#define CZMEIE 0x200 /* CZM Error Interrupt Enable */
1811#define nCZMEIE 0x0
1812#define CZMZIE 0x400 /* CZM Zeroes Counter Interrupt Enable */
1813#define nCZMZIE 0x0
1814
1815/* Bit masks for CNT_STATUS */
1816
1817#define ICII 0x1 /* Illegal Gray/Binary Code Interrupt Identifier */
1818#define nICII 0x0
1819#define UCII 0x2 /* Up count Interrupt Identifier */
1820#define nUCII 0x0
1821#define DCII 0x4 /* Down count Interrupt Identifier */
1822#define nDCII 0x0
1823#define MINCII 0x8 /* Min Count Interrupt Identifier */
1824#define nMINCII 0x0
1825#define MAXCII 0x10 /* Max Count Interrupt Identifier */
1826#define nMAXCII 0x0
1827#define COV31II 0x20 /* Bit 31 Overflow Interrupt Identifier */
1828#define nCOV31II 0x0
1829#define COV15II 0x40 /* Bit 15 Overflow Interrupt Identifier */
1830#define nCOV15II 0x0
1831#define CZEROII 0x80 /* Count to Zero Interrupt Identifier */
1832#define nCZEROII 0x0
1833#define CZMII 0x100 /* CZM Pin Interrupt Identifier */
1834#define nCZMII 0x0
1835#define CZMEII 0x200 /* CZM Error Interrupt Identifier */
1836#define nCZMEII 0x0
1837#define CZMZII 0x400 /* CZM Zeroes Counter Interrupt Identifier */
1838#define nCZMZII 0x0
1839
1840/* Bit masks for CNT_COMMAND */
1841
1842#define W1LCNT 0xf /* Load Counter Register */
1843#define W1LMIN 0xf0 /* Load Min Register */
1844#define W1LMAX 0xf00 /* Load Max Register */
1845#define W1ZMONCE 0x1000 /* Enable CZM Clear Counter Once */
1846#define nW1ZMONCE 0x0
1847
1848/* Bit masks for CNT_DEBOUNCE */
1849
1850#define DPRESCALE 0xf /* Load Counter Register */
1851
1852/* Bit masks for OTP_CONTROL */
1853
1854#define FUSE_FADDR 0x1ff /* OTP/Fuse Address */
1855#define FIEN 0x800 /* OTP/Fuse Interrupt Enable */
1856#define nFIEN 0x0
1857#define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */
1858#define nFTESTDEC 0x0
1859#define FWRTEST 0x2000 /* OTP/Fuse Write Test */
1860#define nFWRTEST 0x0
1861#define FRDEN 0x4000 /* OTP/Fuse Read Enable */
1862#define nFRDEN 0x0
1863#define FWREN 0x8000 /* OTP/Fuse Write Enable */
1864#define nFWREN 0x0
1865
1866/* Bit masks for OTP_BEN */
1867
1868#define FBEN 0xffff /* OTP/Fuse Byte Enable */
1869
1870/* Bit masks for OTP_STATUS */
1871
1872#define FCOMP 0x1 /* OTP/Fuse Access Complete */
1873#define nFCOMP 0x0
1874#define FERROR 0x2 /* OTP/Fuse Access Error */
1875#define nFERROR 0x0
1876#define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */
1877#define nMMRGLOAD 0x0
1878#define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */
1879#define nMMRGLOCK 0x0
1880#define FPGMEN 0x40 /* OTP/Fuse Program Enable */
1881#define nFPGMEN 0x0
1882
1883/* Bit masks for OTP_TIMING */
1884
1885#define USECDIV 0xff /* Micro Second Divider */
1886#define READACC 0x7f00 /* Read Access Time */
1887#define CPUMPRL 0x38000 /* Charge Pump Release Time */
1888#define CPUMPSU 0xc0000 /* Charge Pump Setup Time */
1889#define CPUMPHD 0xf00000 /* Charge Pump Hold Time */
1890#define PGMTIME 0xff000000 /* Program Time */
1891
1892/* Bit masks for SECURE_SYSSWT */
1893
1894#define EMUDABL 0x1 /* Emulation Disable. */
1895#define nEMUDABL 0x0
1896#define RSTDABL 0x2 /* Reset Disable */
1897#define nRSTDABL 0x0
1898#define L1IDABL 0x1c /* L1 Instruction Memory Disable. */
1899#define L1DADABL 0xe0 /* L1 Data Bank A Memory Disable. */
1900#define L1DBDABL 0x700 /* L1 Data Bank B Memory Disable. */
1901#define DMA0OVR 0x800 /* DMA0 Memory Access Override */
1902#define nDMA0OVR 0x0
1903#define DMA1OVR 0x1000 /* DMA1 Memory Access Override */
1904#define nDMA1OVR 0x0
1905#define EMUOVR 0x4000 /* Emulation Override */
1906#define nEMUOVR 0x0
1907#define OTPSEN 0x8000 /* OTP Secrets Enable. */
1908#define nOTPSEN 0x0
1909#define L2DABL 0x70000 /* L2 Memory Disable. */
1910
1911/* Bit masks for SECURE_CONTROL */
1912
1913#define SECURE0 0x1 /* SECURE 0 */
1914#define nSECURE0 0x0
1915#define SECURE1 0x2 /* SECURE 1 */
1916#define nSECURE1 0x0
1917#define SECURE2 0x4 /* SECURE 2 */
1918#define nSECURE2 0x0
1919#define SECURE3 0x8 /* SECURE 3 */
1920#define nSECURE3 0x0
1921
1922/* Bit masks for SECURE_STATUS */
1923
1924#define SECMODE 0x3 /* Secured Mode Control State */
1925#define NMI 0x4 /* Non Maskable Interrupt */
1926#define nNMI 0x0
1927#define AFVALID 0x8 /* Authentication Firmware Valid */
1928#define nAFVALID 0x0
1929#define AFEXIT 0x10 /* Authentication Firmware Exit */
1930#define nAFEXIT 0x0
1931#define SECSTAT 0xe0 /* Secure Status */
1932
1933/* Bit masks for NFC_CTL */
1934
1935#define WR_DLY 0xf /* Write Strobe Delay */
1936#define RD_DLY 0xf0 /* Read Strobe Delay */
1937#define NWIDTH 0x100 /* NAND Data Width */
1938#define nNWIDTH 0x0
1939#define PG_SIZE 0x200 /* Page Size */
1940#define nPG_SIZE 0x0
1941
1942/* Bit masks for NFC_STAT */
1943
1944#define NBUSY 0x1 /* Not Busy */
1945#define nNBUSY 0x0
1946#define WB_FULL 0x2 /* Write Buffer Full */
1947#define nWB_FULL 0x0
1948#define PG_WR_STAT 0x4 /* Page Write Pending */
1949#define nPG_WR_STAT 0x0
1950#define PG_RD_STAT 0x8 /* Page Read Pending */
1951#define nPG_RD_STAT 0x0
1952#define WB_EMPTY 0x10 /* Write Buffer Empty */
1953#define nWB_EMPTY 0x0
1954
1955/* Bit masks for NFC_IRQSTAT */
1956
1957#define NBUSYIRQ 0x1 /* Not Busy IRQ */
1958#define nNBUSYIRQ 0x0
1959#define WB_OVF 0x2 /* Write Buffer Overflow */
1960#define nWB_OVF 0x0
1961#define WB_EDGE 0x4 /* Write Buffer Edge Detect */
1962#define nWB_EDGE 0x0
1963#define RD_RDY 0x8 /* Read Data Ready */
1964#define nRD_RDY 0x0
1965#define WR_DONE 0x10 /* Page Write Done */
1966#define nWR_DONE 0x0
1967
1968/* Bit masks for NFC_IRQMASK */
1969
1970#define MASK_BUSYIRQ 0x1 /* Mask Not Busy IRQ */
1971#define nMASK_BUSYIRQ 0x0
1972#define MASK_WBOVF 0x2 /* Mask Write Buffer Overflow */
1973#define nMASK_WBOVF 0x0
1974#define MASK_WBEMPTY 0x4 /* Mask Write Buffer Empty */
1975#define nMASK_WBEMPTY 0x0
1976#define MASK_RDRDY 0x8 /* Mask Read Data Ready */
1977#define nMASK_RDRDY 0x0
1978#define MASK_WRDONE 0x10 /* Mask Write Done */
1979#define nMASK_WRDONE 0x0
1980
1981/* Bit masks for NFC_RST */
1982
1983#define ECC_RST 0x1 /* ECC (and NFC counters) Reset */
1984#define nECC_RST 0x0
1985
1986/* Bit masks for NFC_PGCTL */
1987
1988#define PG_RD_START 0x1 /* Page Read Start */
1989#define nPG_RD_START 0x0
1990#define PG_WR_START 0x2 /* Page Write Start */
1991#define nPG_WR_START 0x0
1992
1993/* Bit masks for NFC_ECC0 */
1994
1995#define ECC0 0x7ff /* Parity Calculation Result0 */
1996
1997/* Bit masks for NFC_ECC1 */
1998
1999#define ECC1 0x7ff /* Parity Calculation Result1 */
2000
2001/* Bit masks for NFC_ECC2 */
2002
2003#define ECC2 0x7ff /* Parity Calculation Result2 */
2004
2005/* Bit masks for NFC_ECC3 */
2006
2007#define ECC3 0x7ff /* Parity Calculation Result3 */
2008
2009/* Bit masks for NFC_COUNT */
2010
2011#define ECCCNT 0x3ff /* Transfer Count */
2012
2013
2014#endif /* _DEF_BF52X_H */
diff --git a/include/asm-blackfin/mach-bf527/dma.h b/include/asm-blackfin/mach-bf527/dma.h
deleted file mode 100644
index 49dd693223e8..000000000000
--- a/include/asm-blackfin/mach-bf527/dma.h
+++ /dev/null
@@ -1,62 +0,0 @@
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_EMAC_RX 1 /* Ethernet MAC receive or HOSTDP */
39#define CH_EMAC_HOSTDP 1 /* Ethernet MAC receive or HOSTDP */
40#define CH_EMAC_TX 2 /* Ethernet MAC transmit or NFC */
41#define CH_SPORT0_RX 3 /* SPORT0 receive */
42#define CH_SPORT0_TX 4 /* SPORT0 transmit */
43#define CH_SPORT1_RX 5 /* SPORT1 receive */
44#define CH_SPORT1_TX 6 /* SPORT1 transmit */
45#define CH_SPI 7 /* SPI transmit/receive */
46#define CH_UART0_RX 8 /* UART0 receive */
47#define CH_UART0_TX 9 /* UART0 transmit */
48#define CH_UART1_RX 10 /* UART1 receive */
49#define CH_UART1_TX 11 /* UART1 transmit */
50
51#define CH_MEM_STREAM0_DEST 12 /* TX */
52#define CH_MEM_STREAM0_SRC 13 /* RX */
53#define CH_MEM_STREAM1_DEST 14 /* TX */
54#define CH_MEM_STREAM1_SRC 15 /* RX */
55
56#if defined(CONFIG_BF527_NAND_D_PORTF)
57#define CH_NFC CH_PPI /* PPI receive/transmit or NFC */
58#elif defined(CONFIG_BF527_NAND_D_PORTH)
59#define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */
60#endif
61
62#endif
diff --git a/include/asm-blackfin/mach-bf527/irq.h b/include/asm-blackfin/mach-bf527/irq.h
deleted file mode 100644
index 4e2b3f2020e5..000000000000
--- a/include/asm-blackfin/mach-bf527/irq.h
+++ /dev/null
@@ -1,259 +0,0 @@
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#define NR_IRQS (IRQ_PH15+1)
180
181#define IVG7 7
182#define IVG8 8
183#define IVG9 9
184#define IVG10 10
185#define IVG11 11
186#define IVG12 12
187#define IVG13 13
188#define IVG14 14
189#define IVG15 15
190
191/* IAR0 BIT FIELDS */
192#define IRQ_PLL_WAKEUP_POS 0
193#define IRQ_DMA0_ERROR_POS 4
194#define IRQ_DMAR0_BLK_POS 8
195#define IRQ_DMAR1_BLK_POS 12
196#define IRQ_DMAR0_OVR_POS 16
197#define IRQ_DMAR1_OVR_POS 20
198#define IRQ_PPI_ERROR_POS 24
199#define IRQ_MAC_ERROR_POS 28
200
201/* IAR1 BIT FIELDS */
202#define IRQ_SPORT0_ERROR_POS 0
203#define IRQ_SPORT1_ERROR_POS 4
204#define IRQ_UART0_ERROR_POS 16
205#define IRQ_UART1_ERROR_POS 20
206#define IRQ_RTC_POS 24
207#define IRQ_PPI_POS 28
208
209/* IAR2 BIT FIELDS */
210#define IRQ_SPORT0_RX_POS 0
211#define IRQ_SPORT0_TX_POS 4
212#define IRQ_SPORT1_RX_POS 8
213#define IRQ_SPORT1_TX_POS 12
214#define IRQ_TWI_POS 16
215#define IRQ_SPI_POS 20
216#define IRQ_UART0_RX_POS 24
217#define IRQ_UART0_TX_POS 28
218
219/* IAR3 BIT FIELDS */
220#define IRQ_UART1_RX_POS 0
221#define IRQ_UART1_TX_POS 4
222#define IRQ_OPTSEC_POS 8
223#define IRQ_CNT_POS 12
224#define IRQ_MAC_RX_POS 16
225#define IRQ_PORTH_INTA_POS 20
226#define IRQ_MAC_TX_POS 24
227#define IRQ_PORTH_INTB_POS 28
228
229/* IAR4 BIT FIELDS */
230#define IRQ_TMR0_POS 0
231#define IRQ_TMR1_POS 4
232#define IRQ_TMR2_POS 8
233#define IRQ_TMR3_POS 12
234#define IRQ_TMR4_POS 16
235#define IRQ_TMR5_POS 20
236#define IRQ_TMR6_POS 24
237#define IRQ_TMR7_POS 28
238
239/* IAR5 BIT FIELDS */
240#define IRQ_PORTG_INTA_POS 0
241#define IRQ_PORTG_INTB_POS 4
242#define IRQ_MEM_DMA0_POS 8
243#define IRQ_MEM_DMA1_POS 12
244#define IRQ_WATCH_POS 16
245#define IRQ_PORTF_INTA_POS 20
246#define IRQ_PORTF_INTB_POS 24
247#define IRQ_SPI_ERROR_POS 28
248
249/* IAR6 BIT FIELDS */
250#define IRQ_NFC_ERROR_POS 0
251#define IRQ_HDMA_ERROR_POS 4
252#define IRQ_HDMA_POS 8
253#define IRQ_USB_EINT_POS 12
254#define IRQ_USB_INT0_POS 16
255#define IRQ_USB_INT1_POS 20
256#define IRQ_USB_INT2_POS 24
257#define IRQ_USB_DMA_POS 28
258
259#endif /* _BF527_IRQ_H_ */
diff --git a/include/asm-blackfin/mach-bf527/mem_init.h b/include/asm-blackfin/mach-bf527/mem_init.h
deleted file mode 100644
index cbe03f4a5698..000000000000
--- a/include/asm-blackfin/mach-bf527/mem_init.h
+++ /dev/null
@@ -1,310 +0,0 @@
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/* Equation from section 17 (p17-46) of BF533 HRM */
150#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
151
152/* Enable SCLK Out */
153#define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS)
154
155#if defined CONFIG_CLKIN_HALF
156#define CLKIN_HALF 1
157#else
158#define CLKIN_HALF 0
159#endif
160
161#if defined CONFIG_PLL_BYPASS
162#define PLL_BYPASS 1
163#else
164#define PLL_BYPASS 0
165#endif
166
167/***************************************Currently Not Being Used *********************************/
168#define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
169#define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
170#define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ))
171#define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
172#define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
173
174#if (flash_EBIU_AMBCTL_TT > 3)
175#define flash_EBIU_AMBCTL0_TT B0TT_4
176#endif
177#if (flash_EBIU_AMBCTL_TT == 3)
178#define flash_EBIU_AMBCTL0_TT B0TT_3
179#endif
180#if (flash_EBIU_AMBCTL_TT == 2)
181#define flash_EBIU_AMBCTL0_TT B0TT_2
182#endif
183#if (flash_EBIU_AMBCTL_TT < 2)
184#define flash_EBIU_AMBCTL0_TT B0TT_1
185#endif
186
187#if (flash_EBIU_AMBCTL_ST > 3)
188#define flash_EBIU_AMBCTL0_ST B0ST_4
189#endif
190#if (flash_EBIU_AMBCTL_ST == 3)
191#define flash_EBIU_AMBCTL0_ST B0ST_3
192#endif
193#if (flash_EBIU_AMBCTL_ST == 2)
194#define flash_EBIU_AMBCTL0_ST B0ST_2
195#endif
196#if (flash_EBIU_AMBCTL_ST < 2)
197#define flash_EBIU_AMBCTL0_ST B0ST_1
198#endif
199
200#if (flash_EBIU_AMBCTL_HT > 2)
201#define flash_EBIU_AMBCTL0_HT B0HT_3
202#endif
203#if (flash_EBIU_AMBCTL_HT == 2)
204#define flash_EBIU_AMBCTL0_HT B0HT_2
205#endif
206#if (flash_EBIU_AMBCTL_HT == 1)
207#define flash_EBIU_AMBCTL0_HT B0HT_1
208#endif
209#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0)
210#define flash_EBIU_AMBCTL0_HT B0HT_0
211#endif
212#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0)
213#define flash_EBIU_AMBCTL0_HT B0HT_1
214#endif
215
216#if (flash_EBIU_AMBCTL_WAT > 14)
217#define flash_EBIU_AMBCTL0_WAT B0WAT_15
218#endif
219#if (flash_EBIU_AMBCTL_WAT == 14)
220#define flash_EBIU_AMBCTL0_WAT B0WAT_14
221#endif
222#if (flash_EBIU_AMBCTL_WAT == 13)
223#define flash_EBIU_AMBCTL0_WAT B0WAT_13
224#endif
225#if (flash_EBIU_AMBCTL_WAT == 12)
226#define flash_EBIU_AMBCTL0_WAT B0WAT_12
227#endif
228#if (flash_EBIU_AMBCTL_WAT == 11)
229#define flash_EBIU_AMBCTL0_WAT B0WAT_11
230#endif
231#if (flash_EBIU_AMBCTL_WAT == 10)
232#define flash_EBIU_AMBCTL0_WAT B0WAT_10
233#endif
234#if (flash_EBIU_AMBCTL_WAT == 9)
235#define flash_EBIU_AMBCTL0_WAT B0WAT_9
236#endif
237#if (flash_EBIU_AMBCTL_WAT == 8)
238#define flash_EBIU_AMBCTL0_WAT B0WAT_8
239#endif
240#if (flash_EBIU_AMBCTL_WAT == 7)
241#define flash_EBIU_AMBCTL0_WAT B0WAT_7
242#endif
243#if (flash_EBIU_AMBCTL_WAT == 6)
244#define flash_EBIU_AMBCTL0_WAT B0WAT_6
245#endif
246#if (flash_EBIU_AMBCTL_WAT == 5)
247#define flash_EBIU_AMBCTL0_WAT B0WAT_5
248#endif
249#if (flash_EBIU_AMBCTL_WAT == 4)
250#define flash_EBIU_AMBCTL0_WAT B0WAT_4
251#endif
252#if (flash_EBIU_AMBCTL_WAT == 3)
253#define flash_EBIU_AMBCTL0_WAT B0WAT_3
254#endif
255#if (flash_EBIU_AMBCTL_WAT == 2)
256#define flash_EBIU_AMBCTL0_WAT B0WAT_2
257#endif
258#if (flash_EBIU_AMBCTL_WAT == 1)
259#define flash_EBIU_AMBCTL0_WAT B0WAT_1
260#endif
261
262#if (flash_EBIU_AMBCTL_RAT > 14)
263#define flash_EBIU_AMBCTL0_RAT B0RAT_15
264#endif
265#if (flash_EBIU_AMBCTL_RAT == 14)
266#define flash_EBIU_AMBCTL0_RAT B0RAT_14
267#endif
268#if (flash_EBIU_AMBCTL_RAT == 13)
269#define flash_EBIU_AMBCTL0_RAT B0RAT_13
270#endif
271#if (flash_EBIU_AMBCTL_RAT == 12)
272#define flash_EBIU_AMBCTL0_RAT B0RAT_12
273#endif
274#if (flash_EBIU_AMBCTL_RAT == 11)
275#define flash_EBIU_AMBCTL0_RAT B0RAT_11
276#endif
277#if (flash_EBIU_AMBCTL_RAT == 10)
278#define flash_EBIU_AMBCTL0_RAT B0RAT_10
279#endif
280#if (flash_EBIU_AMBCTL_RAT == 9)
281#define flash_EBIU_AMBCTL0_RAT B0RAT_9
282#endif
283#if (flash_EBIU_AMBCTL_RAT == 8)
284#define flash_EBIU_AMBCTL0_RAT B0RAT_8
285#endif
286#if (flash_EBIU_AMBCTL_RAT == 7)
287#define flash_EBIU_AMBCTL0_RAT B0RAT_7
288#endif
289#if (flash_EBIU_AMBCTL_RAT == 6)
290#define flash_EBIU_AMBCTL0_RAT B0RAT_6
291#endif
292#if (flash_EBIU_AMBCTL_RAT == 5)
293#define flash_EBIU_AMBCTL0_RAT B0RAT_5
294#endif
295#if (flash_EBIU_AMBCTL_RAT == 4)
296#define flash_EBIU_AMBCTL0_RAT B0RAT_4
297#endif
298#if (flash_EBIU_AMBCTL_RAT == 3)
299#define flash_EBIU_AMBCTL0_RAT B0RAT_3
300#endif
301#if (flash_EBIU_AMBCTL_RAT == 2)
302#define flash_EBIU_AMBCTL0_RAT B0RAT_2
303#endif
304#if (flash_EBIU_AMBCTL_RAT == 1)
305#define flash_EBIU_AMBCTL0_RAT B0RAT_1
306#endif
307
308#define flash_EBIU_AMBCTL0 \
309 (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \
310 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
deleted file mode 100644
index 193082deaa4e..000000000000
--- a/include/asm-blackfin/mach-bf527/mem_map.h
+++ /dev/null
@@ -1,97 +0,0 @@
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#define BOOT_ROM_LENGTH 0x8000
51
52/* Level 1 Memory */
53
54/* Memory Map for ADSP-BF527 ADSP-BF525 ADSP-BF522 processors */
55
56#ifdef CONFIG_BFIN_ICACHE
57#define BFIN_ICACHESIZE (16*1024)
58#else
59#define BFIN_ICACHESIZE (0*1024)
60#endif
61
62#define L1_CODE_START 0xFFA00000
63#define L1_DATA_A_START 0xFF800000
64#define L1_DATA_B_START 0xFF900000
65
66#define L1_CODE_LENGTH 0xC000
67
68#ifdef CONFIG_BFIN_DCACHE
69
70#ifdef CONFIG_BFIN_DCACHE_BANKA
71#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
72#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
73#define L1_DATA_B_LENGTH 0x8000
74#define BFIN_DCACHESIZE (16*1024)
75#define BFIN_DSUPBANKS 1
76#else
77#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
78#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
79#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
80#define BFIN_DCACHESIZE (32*1024)
81#define BFIN_DSUPBANKS 2
82#endif
83
84#else
85#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
86#define L1_DATA_A_LENGTH 0x8000
87#define L1_DATA_B_LENGTH 0x8000
88#define BFIN_DCACHESIZE (0*1024)
89#define BFIN_DSUPBANKS 0
90#endif /*CONFIG_BFIN_DCACHE */
91
92/* Scratch Pad Memory */
93
94#define L1_SCRATCH_START 0xFFB00000
95#define L1_SCRATCH_LENGTH 0x1000
96
97#endif /* _MEM_MAP_527_H_ */
diff --git a/include/asm-blackfin/mach-bf527/portmux.h b/include/asm-blackfin/mach-bf527/portmux.h
deleted file mode 100644
index ae4d205bfcf5..000000000000
--- a/include/asm-blackfin/mach-bf527/portmux.h
+++ /dev/null
@@ -1,207 +0,0 @@
1#ifndef _MACH_PORTMUX_H_
2#define _MACH_PORTMUX_H_
3
4#define MAX_RESOURCES MAX_BLACKFIN_GPIOS
5
6#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0))
7#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0))
8#define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0))
9#define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0))
10#define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0))
11#define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0))
12#define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0))
13#define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0))
14#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0))
15#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0))
16#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0))
17#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0))
18#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0))
19#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0))
20#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0))
21#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0))
22
23#if defined(CONFIG_BF527_SPORT0_PORTF)
24#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1))
25#define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1))
26#define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1))
27#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1))
28#define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1))
29#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1))
30#define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1))
31#define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1))
32#elif defined(CONFIG_BF527_SPORT0_PORTG)
33#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0))
34#define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1))
35#define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(1))
36#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1))
37#define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(1))
38#define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(1))
39#if defined(CONFIG_BF527_SPORT0_TSCLK_PG10)
40#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(1))
41#elif defined(CONFIG_BF527_SPORT0_TSCLK_PG14)
42#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0))
43#endif
44#define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0))
45#endif
46
47#define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1))
48#define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1))
49#define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(1))
50#define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(1))
51#define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(1))
52#define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(1))
53#define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1))
54#define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1))
55
56#define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2))
57#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2))
58
59#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2))
60#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2))
61
62#if defined(CONFIG_BF527_UART1_PORTF)
63#define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2))
64#define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2))
65#elif defined(CONFIG_BF527_UART1_PORTG)
66#define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1))
67#define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1))
68#endif
69
70#define P_HWAIT (P_DONTCARE)
71
72#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))
73#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2))
74#define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2))
75#define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(2))
76#define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(2))
77#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0))
78#define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0))
79#define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0))
80#define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0))
81#define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0))
82#define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0))
83/* #define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0)) */
84#define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0))
85#define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0))
86#define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1))
87#define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1))
88#define P_MDC (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1))
89#define P_RMII0_MDINT (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1))
90#define P_MII0_PHYINT (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1))
91
92#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2))
93#define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2))
94#define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(2))
95
96#define P_HOST_WR (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(2))
97#define P_HOST_ACK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(2))
98#define P_HOST_ADDR (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(2))
99#define P_HOST_RD (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2))
100#define P_HOST_CE (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(2))
101
102#if defined(CONFIG_BF527_NAND_D_PORTF)
103#define P_NAND_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(2))
104#define P_NAND_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2))
105#define P_NAND_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2))
106#define P_NAND_D3 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2))
107#define P_NAND_D4 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2))
108#define P_NAND_D5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2))
109#define P_NAND_D6 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2))
110#define P_NAND_D7 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2))
111#elif defined(CONFIG_BF527_NAND_D_PORTH)
112#define P_NAND_D0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0))
113#define P_NAND_D1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0))
114#define P_NAND_D2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0))
115#define P_NAND_D3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0))
116#define P_NAND_D4 (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0))
117#define P_NAND_D5 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0))
118#define P_NAND_D6 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0))
119#define P_NAND_D7 (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0))
120#endif
121
122#define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0))
123#define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0))
124#define P_NAND_CE (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0))
125#define P_NAND_WE (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0))
126#define P_NAND_RE (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0))
127#define P_NAND_RB (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0))
128#define P_NAND_CLE (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(0))
129#define P_NAND_ALE (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(0))
130
131#define P_HOST_D0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(2))
132#define P_HOST_D1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(2))
133#define P_HOST_D2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(2))
134#define P_HOST_D3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(2))
135#define P_HOST_D4 (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(2))
136#define P_HOST_D5 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(2))
137#define P_HOST_D6 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(2))
138#define P_HOST_D7 (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(2))
139#define P_HOST_D8 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(2))
140#define P_HOST_D9 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(2))
141#define P_HOST_D10 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(2))
142#define P_HOST_D11 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(2))
143#define P_HOST_D12 (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(2))
144#define P_HOST_D13 (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(2))
145#define P_HOST_D14 (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(2))
146#define P_HOST_D15 (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(2))
147
148#define P_MII0_ETxD0 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1))
149#define P_MII0_ETxD1 (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1))
150#define P_MII0_ETxD2 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(1))
151#define P_MII0_ETxD3 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(1))
152#define P_MII0_ETxEN (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(1))
153#define P_MII0_TxCLK (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(1))
154#define P_MII0_COL (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(1))
155#define P_MII0_ERxD0 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1))
156#define P_MII0_ERxD1 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(1))
157#define P_MII0_ERxD2 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(1))
158#define P_MII0_ERxD3 (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(1))
159#define P_MII0_ERxDV (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(1))
160#define P_MII0_ERxCLK (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(1))
161#define P_MII0_ERxER (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(1))
162#define P_MII0_CRS (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(1))
163#define P_RMII0_REF_CLK (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(1))
164#define P_RMII0_CRS_DV (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(1))
165#define P_MDIO (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(1))
166
167#define P_TWI0_SCL (P_DONTCARE)
168#define P_TWI0_SDA (P_DONTCARE)
169#define P_PPI0_FS1 (P_DONTCARE)
170#define P_TMR0 (P_DONTCARE)
171#define P_TMRCLK (P_DONTCARE)
172#define P_PPI0_CLK (P_DONTCARE)
173
174#define P_MII0 {\
175 P_MII0_ETxD0, \
176 P_MII0_ETxD1, \
177 P_MII0_ETxD2, \
178 P_MII0_ETxD3, \
179 P_MII0_ETxEN, \
180 P_MII0_TxCLK, \
181 P_MII0_PHYINT, \
182 P_MII0_COL, \
183 P_MII0_ERxD0, \
184 P_MII0_ERxD1, \
185 P_MII0_ERxD2, \
186 P_MII0_ERxD3, \
187 P_MII0_ERxDV, \
188 P_MII0_ERxCLK, \
189 P_MII0_ERxER, \
190 P_MII0_CRS, \
191 P_MDC, \
192 P_MDIO, 0}
193
194#define P_RMII0 {\
195 P_MII0_ETxD0, \
196 P_MII0_ETxD1, \
197 P_MII0_ETxEN, \
198 P_MII0_ERxD0, \
199 P_MII0_ERxD1, \
200 P_MII0_ERxER, \
201 P_RMII0_REF_CLK, \
202 P_RMII0_MDINT, \
203 P_RMII0_CRS_DV, \
204 P_MDC, \
205 P_MDIO, 0}
206
207#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h
deleted file mode 100644
index 8f7ea112fd3a..000000000000
--- a/include/asm-blackfin/mach-bf533/anomaly.h
+++ /dev/null
@@ -1,272 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 *
5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8
9/* This file shoule be up to date with:
10 * - Revision C, 02/08/2008; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List
11 */
12
13#ifndef _MACH_ANOMALY_H_
14#define _MACH_ANOMALY_H_
15
16/* We do not support 0.1 or 0.2 silicon - sorry */
17#if __SILICON_REVISION__ < 3
18# error will not work on BF533 silicon version 0.0, 0.1, or 0.2
19#endif
20
21#if defined(__ADSPBF531__)
22# define ANOMALY_BF531 1
23#else
24# define ANOMALY_BF531 0
25#endif
26#if defined(__ADSPBF532__)
27# define ANOMALY_BF532 1
28#else
29# define ANOMALY_BF532 0
30#endif
31#if defined(__ADSPBF533__)
32# define ANOMALY_BF533 1
33#else
34# define ANOMALY_BF533 0
35#endif
36
37/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */
38#define ANOMALY_05000074 (1)
39/* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */
40#define ANOMALY_05000099 (__SILICON_REVISION__ < 5)
41/* Watchpoint Status Register (WPSTAT) Bits Are Set on Every Corresponding Match */
42#define ANOMALY_05000105 (1)
43/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
44#define ANOMALY_05000119 (1)
45/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
46#define ANOMALY_05000122 (1)
47/* Instruction DMA Can Cause Data Cache Fills to Fail (Boot Implications) */
48#define ANOMALY_05000158 (__SILICON_REVISION__ < 5)
49/* PPI Data Lengths Between 8 and 16 Do Not Zero Out Upper Bits */
50#define ANOMALY_05000166 (1)
51/* Turning Serial Ports on with External Frame Syncs */
52#define ANOMALY_05000167 (1)
53/* PPI_COUNT Cannot Be Programmed to 0 in General Purpose TX or RX Modes */
54#define ANOMALY_05000179 (__SILICON_REVISION__ < 5)
55/* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */
56#define ANOMALY_05000180 (1)
57/* Timer Pin Limitations for PPI TX Modes with External Frame Syncs */
58#define ANOMALY_05000183 (__SILICON_REVISION__ < 4)
59/* False Protection Exceptions */
60#define ANOMALY_05000189 (__SILICON_REVISION__ < 4)
61/* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */
62#define ANOMALY_05000193 (__SILICON_REVISION__ < 4)
63/* Restarting SPORT in Specific Modes May Cause Data Corruption */
64#define ANOMALY_05000194 (__SILICON_REVISION__ < 4)
65/* Failing MMR Accesses When Stalled by Preceding Memory Read */
66#define ANOMALY_05000198 (__SILICON_REVISION__ < 5)
67/* Current DMA Address Shows Wrong Value During Carry Fix */
68#define ANOMALY_05000199 (__SILICON_REVISION__ < 4)
69/* SPORT TFS and DT Are Incorrectly Driven During Inactive Channels in Certain Conditions */
70#define ANOMALY_05000200 (__SILICON_REVISION__ < 5)
71/* Receive Frame Sync Not Ignored During Active Frames in SPORT Multi-Channel Mode */
72#define ANOMALY_05000201 (__SILICON_REVISION__ < 4)
73/* Possible Infinite Stall with Specific Dual-DAG Situation */
74#define ANOMALY_05000202 (__SILICON_REVISION__ < 5)
75/* Specific Sequence That Can Cause DMA Error or DMA Stopping */
76#define ANOMALY_05000203 (__SILICON_REVISION__ < 4)
77/* Incorrect data read with write-through cache and allocate cache lines on reads only mode */
78#define ANOMALY_05000204 (__SILICON_REVISION__ < 4 && ANOMALY_BF533)
79/* Recovery from "Brown-Out" Condition */
80#define ANOMALY_05000207 (__SILICON_REVISION__ < 4)
81/* VSTAT Status Bit in PLL_STAT Register Is Not Functional */
82#define ANOMALY_05000208 (1)
83/* Speed Path in Computational Unit Affects Certain Instructions */
84#define ANOMALY_05000209 (__SILICON_REVISION__ < 4)
85/* UART TX Interrupt Masked Erroneously */
86#define ANOMALY_05000215 (__SILICON_REVISION__ < 5)
87/* NMI Event at Boot Time Results in Unpredictable State */
88#define ANOMALY_05000219 (1)
89/* Incorrect Pulse-Width of UART Start Bit */
90#define ANOMALY_05000225 (__SILICON_REVISION__ < 5)
91/* Scratchpad Memory Bank Reads May Return Incorrect Data */
92#define ANOMALY_05000227 (__SILICON_REVISION__ < 5)
93/* SPI Slave Boot Mode Modifies Registers from Reset Value */
94#define ANOMALY_05000229 (1)
95/* UART Receiver is Less Robust Against Baudrate Differences in Certain Conditions */
96#define ANOMALY_05000230 (__SILICON_REVISION__ < 5)
97/* UART STB Bit Incorrectly Affects Receiver Setting */
98#define ANOMALY_05000231 (__SILICON_REVISION__ < 5)
99/* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */
100#define ANOMALY_05000233 (__SILICON_REVISION__ < 4)
101/* Incorrect Revision Number in DSPID Register */
102#define ANOMALY_05000234 (__SILICON_REVISION__ == 4)
103/* DF Bit in PLL_CTL Register Does Not Respond to Hardware Reset */
104#define ANOMALY_05000242 (__SILICON_REVISION__ < 4)
105/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
106#define ANOMALY_05000244 (__SILICON_REVISION__ < 5)
107/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
108#define ANOMALY_05000245 (1)
109/* Data CPLBs Should Prevent Spurious Hardware Errors */
110#define ANOMALY_05000246 (__SILICON_REVISION__ < 5)
111/* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */
112#define ANOMALY_05000250 (__SILICON_REVISION__ == 4)
113/* Maximum External Clock Speed for Timers */
114#define ANOMALY_05000253 (__SILICON_REVISION__ < 5)
115/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */
116#define ANOMALY_05000254 (__SILICON_REVISION__ > 4)
117/* Entering Hibernate State with RTC Seconds Interrupt Not Functional */
118#define ANOMALY_05000255 (__SILICON_REVISION__ < 5)
119/* Interrupt/Exception During Short Hardware Loop May Cause Bad Instruction Fetches */
120#define ANOMALY_05000257 (__SILICON_REVISION__ < 5)
121/* Instruction Cache Is Corrupted When Bits 9 and 12 of the ICPLB Data Registers Differ */
122#define ANOMALY_05000258 (__SILICON_REVISION__ < 5)
123/* ICPLB_STATUS MMR Register May Be Corrupted */
124#define ANOMALY_05000260 (__SILICON_REVISION__ < 5)
125/* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */
126#define ANOMALY_05000261 (__SILICON_REVISION__ < 5)
127/* Stores To Data Cache May Be Lost */
128#define ANOMALY_05000262 (__SILICON_REVISION__ < 5)
129/* Hardware Loop Corrupted When Taking an ICPLB Exception */
130#define ANOMALY_05000263 (__SILICON_REVISION__ < 5)
131/* CSYNC/SSYNC/IDLE Causes Infinite Stall in Penultimate Instruction in Hardware Loop */
132#define ANOMALY_05000264 (__SILICON_REVISION__ < 5)
133/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
134#define ANOMALY_05000265 (__SILICON_REVISION__ < 5)
135/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Increase */
136#define ANOMALY_05000269 (__SILICON_REVISION__ < 5)
137/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */
138#define ANOMALY_05000270 (__SILICON_REVISION__ < 5)
139/* Spontaneous Reset of Internal Voltage Regulator */
140#define ANOMALY_05000271 (__SILICON_REVISION__ < 4)
141/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
142#define ANOMALY_05000272 (1)
143/* Writes to Synchronous SDRAM Memory May Be Lost */
144#define ANOMALY_05000273 (1)
145/* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */
146#define ANOMALY_05000276 (1)
147/* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */
148#define ANOMALY_05000277 (1)
149/* Disabling Peripherals with DMA Running May Cause DMA System Instability */
150#define ANOMALY_05000278 (1)
151/* False Hardware Error Exception When ISR Context Is Not Restored */
152#define ANOMALY_05000281 (1)
153/* Memory DMA Corruption with 32-Bit Data and Traffic Control */
154#define ANOMALY_05000282 (1)
155/* System MMR Write Is Stalled Indefinitely When Killed in a Particular Stage */
156#define ANOMALY_05000283 (1)
157/* SPORTs May Receive Bad Data If FIFOs Fill Up */
158#define ANOMALY_05000288 (1)
159/* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */
160#define ANOMALY_05000301 (1)
161/* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */
162#define ANOMALY_05000302 (__SILICON_REVISION__ < 5)
163/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
164#define ANOMALY_05000305 (__SILICON_REVISION__ < 5)
165/* New Feature: Additional PPI Frame Sync Sampling Options (Not Available On Older Silicon) */
166#define ANOMALY_05000306 (__SILICON_REVISION__ < 5)
167/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
168#define ANOMALY_05000310 (1)
169/* Erroneous Flag (GPIO) Pin Operations under Specific Sequences */
170#define ANOMALY_05000311 (1)
171/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
172#define ANOMALY_05000312 (1)
173/* PPI Is Level-Sensitive on First Transfer */
174#define ANOMALY_05000313 (1)
175/* Killed System MMR Write Completes Erroneously On Next System MMR Access */
176#define ANOMALY_05000315 (1)
177/* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */
178#define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532)
179/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
180#define ANOMALY_05000357 (1)
181/* UART Break Signal Issues */
182#define ANOMALY_05000363 (__SILICON_REVISION__ < 5)
183/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
184#define ANOMALY_05000366 (1)
185/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
186#define ANOMALY_05000371 (1)
187/* PPI Does Not Start Properly In Specific Mode */
188#define ANOMALY_05000400 (__SILICON_REVISION__ >= 5)
189/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
190#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5)
191/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
192#define ANOMALY_05000403 (1)
193
194
195/* These anomalies have been "phased" out of analog.com anomaly sheets and are
196 * here to show running on older silicon just isn't feasible.
197 */
198
199/* Watchpoints (Hardware Breakpoints) are not supported */
200#define ANOMALY_05000067 (__SILICON_REVISION__ < 3)
201/* Reserved bits in SYSCFG register not set at power on */
202#define ANOMALY_05000109 (__SILICON_REVISION__ < 3)
203/* Trace Buffers may record discontinuities into emulation mode and/or exception, NMI, reset handlers */
204#define ANOMALY_05000116 (__SILICON_REVISION__ < 3)
205/* DTEST_COMMAND initiated memory access may be incorrect if data cache or DMA is active */
206#define ANOMALY_05000123 (__SILICON_REVISION__ < 3)
207/* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */
208#define ANOMALY_05000124 (__SILICON_REVISION__ < 3)
209/* Erroneous exception when enabling cache */
210#define ANOMALY_05000125 (__SILICON_REVISION__ < 3)
211/* SPI clock polarity and phase bits incorrect during booting */
212#define ANOMALY_05000126 (__SILICON_REVISION__ < 3)
213/* DMEM_CONTROL is not set on Reset */
214#define ANOMALY_05000137 (__SILICON_REVISION__ < 3)
215/* SPI boot will not complete if there is a zero fill block in the loader file */
216#define ANOMALY_05000138 (__SILICON_REVISION__ < 3)
217/* Allowing the SPORT RX FIFO to fill will cause an overflow */
218#define ANOMALY_05000140 (__SILICON_REVISION__ < 3)
219/* An Infinite Stall occurs with a particular sequence of consecutive dual dag events */
220#define ANOMALY_05000141 (__SILICON_REVISION__ < 3)
221/* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */
222#define ANOMALY_05000142 (__SILICON_REVISION__ < 3)
223/* A read from external memory may return a wrong value with data cache enabled */
224#define ANOMALY_05000143 (__SILICON_REVISION__ < 3)
225/* DMA and TESTSET conflict when both are accessing external memory */
226#define ANOMALY_05000144 (__SILICON_REVISION__ < 3)
227/* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */
228#define ANOMALY_05000145 (__SILICON_REVISION__ < 3)
229/* MDMA may lose the first few words of a descriptor chain */
230#define ANOMALY_05000146 (__SILICON_REVISION__ < 3)
231/* The source MDMA descriptor may stop with a DMA Error */
232#define ANOMALY_05000147 (__SILICON_REVISION__ < 3)
233/* When booting from a 16-bit asynchronous memory device, the upper 8-bits of each word must be 0x00 */
234#define ANOMALY_05000148 (__SILICON_REVISION__ < 3)
235/* Frame Delay in SPORT Multichannel Mode */
236#define ANOMALY_05000153 (__SILICON_REVISION__ < 3)
237/* SPORT TFS signal is active in Multi-channel mode outside of valid channels */
238#define ANOMALY_05000154 (__SILICON_REVISION__ < 3)
239/* Timer1 can not be used for PWMOUT mode when a certain PPI mode is in use */
240#define ANOMALY_05000155 (__SILICON_REVISION__ < 3)
241/* A killed 32-bit System MMR write will lead to the next system MMR access thinking it should be 32-bit. */
242#define ANOMALY_05000157 (__SILICON_REVISION__ < 3)
243/* SPORT transmit data is not gated by external frame sync in certain conditions */
244#define ANOMALY_05000163 (__SILICON_REVISION__ < 3)
245/* SDRAM auto-refresh and subsequent Power Ups */
246#define ANOMALY_05000168 (__SILICON_REVISION__ < 3)
247/* DATA CPLB page miss can result in lost write-through cache data writes */
248#define ANOMALY_05000169 (__SILICON_REVISION__ < 3)
249/* DMA vs Core accesses to external memory */
250#define ANOMALY_05000173 (__SILICON_REVISION__ < 3)
251/* Cache Fill Buffer Data lost */
252#define ANOMALY_05000174 (__SILICON_REVISION__ < 3)
253/* Overlapping Sequencer and Memory Stalls */
254#define ANOMALY_05000175 (__SILICON_REVISION__ < 3)
255/* Multiplication of (-1) by (-1) followed by an accumulator saturation */
256#define ANOMALY_05000176 (__SILICON_REVISION__ < 3)
257/* Disabling the PPI resets the PPI configuration registers */
258#define ANOMALY_05000181 (__SILICON_REVISION__ < 3)
259/* PPI TX Mode with 2 External Frame Syncs */
260#define ANOMALY_05000185 (__SILICON_REVISION__ < 3)
261/* PPI does not invert the Driving PPICLK edge in Transmit Modes */
262#define ANOMALY_05000191 (__SILICON_REVISION__ < 3)
263/* In PPI Transmit Modes with External Frame Syncs POLC */
264#define ANOMALY_05000192 (__SILICON_REVISION__ < 3)
265/* Internal Voltage Regulator may not start up */
266#define ANOMALY_05000206 (__SILICON_REVISION__ < 3)
267
268/* Anomalies that don't exist on this proc */
269#define ANOMALY_05000266 (0)
270#define ANOMALY_05000323 (0)
271
272#endif
diff --git a/include/asm-blackfin/mach-bf533/bf533.h b/include/asm-blackfin/mach-bf533/bf533.h
deleted file mode 100644
index 12a416931991..000000000000
--- a/include/asm-blackfin/mach-bf533/bf533.h
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/bf533.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF561
8 *
9 * Modified:
10 * Copyright 2004-2006 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_BF533_H__
31#define __MACH_BF533_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
55#define BFIN_DSUBBANKS 4
56#define BFIN_DWAYS 2
57#define BFIN_DLINES 64
58#define BFIN_ISUBBANKS 4
59#define BFIN_IWAYS 4
60#define BFIN_ILINES 32
61
62#define WAY0_L 0x1
63#define WAY1_L 0x2
64#define WAY01_L 0x3
65#define WAY2_L 0x4
66#define WAY02_L 0x5
67#define WAY12_L 0x6
68#define WAY012_L 0x7
69
70#define WAY3_L 0x8
71#define WAY03_L 0x9
72#define WAY13_L 0xA
73#define WAY013_L 0xB
74
75#define WAY32_L 0xC
76#define WAY320_L 0xD
77#define WAY321_L 0xE
78#define WAYALL_L 0xF
79
80#define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
81
82/* IAR0 BIT FIELDS*/
83#define RTC_ERROR_BIT 0x0FFFFFFF
84#define UART_ERROR_BIT 0xF0FFFFFF
85#define SPORT1_ERROR_BIT 0xFF0FFFFF
86#define SPI_ERROR_BIT 0xFFF0FFFF
87#define SPORT0_ERROR_BIT 0xFFFF0FFF
88#define PPI_ERROR_BIT 0xFFFFF0FF
89#define DMA_ERROR_BIT 0xFFFFFF0F
90#define PLLWAKE_ERROR_BIT 0xFFFFFFFF
91
92/* IAR1 BIT FIELDS*/
93#define DMA7_UARTTX_BIT 0x0FFFFFFF
94#define DMA6_UARTRX_BIT 0xF0FFFFFF
95#define DMA5_SPI_BIT 0xFF0FFFFF
96#define DMA4_SPORT1TX_BIT 0xFFF0FFFF
97#define DMA3_SPORT1RX_BIT 0xFFFF0FFF
98#define DMA2_SPORT0TX_BIT 0xFFFFF0FF
99#define DMA1_SPORT0RX_BIT 0xFFFFFF0F
100#define DMA0_PPI_BIT 0xFFFFFFFF
101
102/* IAR2 BIT FIELDS*/
103#define WDTIMER_BIT 0x0FFFFFFF
104#define MEMDMA1_BIT 0xF0FFFFFF
105#define MEMDMA0_BIT 0xFF0FFFFF
106#define PFB_BIT 0xFFF0FFFF
107#define PFA_BIT 0xFFFF0FFF
108#define TIMER2_BIT 0xFFFFF0FF
109#define TIMER1_BIT 0xFFFFFF0F
110#define TIMER0_BIT 0xFFFFFFFF
111
112/********************************* EBIU Settings ************************************/
113#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
114#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
115
116#ifdef CONFIG_C_AMBEN_ALL
117#define V_AMBEN AMBEN_ALL
118#endif
119#ifdef CONFIG_C_AMBEN
120#define V_AMBEN 0x0
121#endif
122#ifdef CONFIG_C_AMBEN_B0
123#define V_AMBEN AMBEN_B0
124#endif
125#ifdef CONFIG_C_AMBEN_B0_B1
126#define V_AMBEN AMBEN_B0_B1
127#endif
128#ifdef CONFIG_C_AMBEN_B0_B1_B2
129#define V_AMBEN AMBEN_B0_B1_B2
130#endif
131#ifdef CONFIG_C_AMCKEN
132#define V_AMCKEN AMCKEN
133#else
134#define V_AMCKEN 0x0
135#endif
136#ifdef CONFIG_C_CDPRIO
137#define V_CDPRIO 0x100
138#else
139#define V_CDPRIO 0x0
140#endif
141
142#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
143
144#ifdef CONFIG_BF533
145#define CPU "BF533"
146#define CPUID 0x027a5000
147#endif
148#ifdef CONFIG_BF532
149#define CPU "BF532"
150#define CPUID 0x0275A000
151#endif
152#ifdef CONFIG_BF531
153#define CPU "BF531"
154#define CPUID 0x027a5000
155#endif
156#ifndef CPU
157#define CPU "UNKNOWN"
158#define CPUID 0x0
159#endif
160
161#endif /* __MACH_BF533_H__ */
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
deleted file mode 100644
index ebf592b59aab..000000000000
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ /dev/null
@@ -1,164 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * blackfin serial driver head file
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#include <linux/serial.h>
33#include <asm/dma.h>
34#include <asm/portmux.h>
35
36#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
37#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
38#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER))
39#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
40#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
41#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
42#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
43
44#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
45#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
46#define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v)
47#define UART_SET_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v))
48#define UART_CLEAR_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v))
49#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
50#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
51#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
52
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
62#ifdef CONFIG_BFIN_UART0_CTSRTS
63# define CONFIG_SERIAL_BFIN_CTSRTS
64# ifndef CONFIG_UART0_CTS_PIN
65# define CONFIG_UART0_CTS_PIN -1
66# endif
67# ifndef CONFIG_UART0_RTS_PIN
68# define CONFIG_UART0_RTS_PIN -1
69# endif
70#endif
71
72struct bfin_serial_port {
73 struct uart_port port;
74 unsigned int old_status;
75 unsigned int lsr;
76#ifdef CONFIG_SERIAL_BFIN_DMA
77 int tx_done;
78 int tx_count;
79 struct circ_buf rx_dma_buf;
80 struct timer_list rx_dma_timer;
81 int rx_dma_nrows;
82 unsigned int tx_dma_channel;
83 unsigned int rx_dma_channel;
84 struct work_struct tx_dma_workqueue;
85#else
86# if ANOMALY_05000230
87 unsigned int anomaly_threshold;
88# endif
89#endif
90#ifdef CONFIG_SERIAL_BFIN_CTSRTS
91 struct timer_list cts_timer;
92 int cts_pin;
93 int rts_pin;
94#endif
95};
96
97/* The hardware clears the LSR bits upon read, so we need to cache
98 * some of the more fun bits in software so they don't get lost
99 * when checking the LSR in other code paths (TX).
100 */
101static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
102{
103 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
104 uart->lsr |= (lsr & (BI|FE|PE|OE));
105 return lsr | uart->lsr;
106}
107
108static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
109{
110 uart->lsr = 0;
111 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
112}
113
114struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS];
115struct bfin_serial_res {
116 unsigned long uart_base_addr;
117 int uart_irq;
118#ifdef CONFIG_SERIAL_BFIN_DMA
119 unsigned int uart_tx_dma_channel;
120 unsigned int uart_rx_dma_channel;
121#endif
122#ifdef CONFIG_SERIAL_BFIN_CTSRTS
123 int uart_cts_pin;
124 int uart_rts_pin;
125#endif
126};
127
128struct bfin_serial_res bfin_serial_resource[] = {
129 {
130 0xFFC00400,
131 IRQ_UART_RX,
132#ifdef CONFIG_SERIAL_BFIN_DMA
133 CH_UART_TX,
134 CH_UART_RX,
135#endif
136#ifdef CONFIG_BFIN_UART0_CTSRTS
137 CONFIG_UART0_CTS_PIN,
138 CONFIG_UART0_RTS_PIN,
139#endif
140 }
141};
142
143#define DRIVER_NAME "bfin-uart"
144
145int nr_ports = BFIN_UART_NR_PORTS;
146static void bfin_serial_hw_init(struct bfin_serial_port *uart)
147{
148
149#ifdef CONFIG_SERIAL_BFIN_UART0
150 peripheral_request(P_UART0_TX, DRIVER_NAME);
151 peripheral_request(P_UART0_RX, DRIVER_NAME);
152#endif
153
154#ifdef CONFIG_SERIAL_BFIN_CTSRTS
155 if (uart->cts_pin >= 0) {
156 gpio_request(uart->cts_pin, DRIVER_NAME);
157 gpio_direction_input(uart->cts_pin);
158 }
159 if (uart->rts_pin >= 0) {
160 gpio_request(uart->rts_pin, DRIVER_NAME);
161 gpio_direction_input(uart->rts_pin, 0);
162 }
163#endif
164}
diff --git a/include/asm-blackfin/mach-bf533/bfin_sir.h b/include/asm-blackfin/mach-bf533/bfin_sir.h
deleted file mode 100644
index 9bb87e9e2e9b..000000000000
--- a/include/asm-blackfin/mach-bf533/bfin_sir.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 * Blackfin Infra-red Driver
3 *
4 * Copyright 2006-2008 Analog Devices Inc.
5 *
6 * Enter bugs at http://blackfin.uclinux.org/
7 *
8 * Licensed under the GPL-2 or later.
9 *
10 */
11
12#include <linux/serial.h>
13#include <asm/dma.h>
14#include <asm/portmux.h>
15
16#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR)
17#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL)
18#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER)
19#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH)
20#define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR)
21#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR)
22#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
23
24#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
25#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
26#define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v)
27#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
28#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
29#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
30
31#ifdef CONFIG_SIR_BFIN_DMA
32struct dma_rx_buf {
33 char *buf;
34 int head;
35 int tail;
36 };
37#endif /* CONFIG_SIR_BFIN_DMA */
38
39struct bfin_sir_port {
40 unsigned char __iomem *membase;
41 unsigned int irq;
42 unsigned int lsr;
43 unsigned long clk;
44 struct net_device *dev;
45#ifdef CONFIG_SIR_BFIN_DMA
46 int tx_done;
47 struct dma_rx_buf rx_dma_buf;
48 struct timer_list rx_dma_timer;
49 int rx_dma_nrows;
50#endif /* CONFIG_SIR_BFIN_DMA */
51 unsigned int tx_dma_channel;
52 unsigned int rx_dma_channel;
53};
54
55struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS];
56
57struct bfin_sir_port_res {
58 unsigned long base_addr;
59 int irq;
60 unsigned int rx_dma_channel;
61 unsigned int tx_dma_channel;
62};
63
64struct bfin_sir_port_res bfin_sir_port_resource[] = {
65#ifdef CONFIG_BFIN_SIR0
66 {
67 0xFFC00400,
68 IRQ_UART_RX,
69 CH_UART_RX,
70 CH_UART_TX,
71 },
72#endif
73};
74
75int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource);
76
77struct bfin_sir_self {
78 struct bfin_sir_port *sir_port;
79 spinlock_t lock;
80 unsigned int open;
81 int speed;
82 int newspeed;
83
84 struct sk_buff *txskb;
85 struct sk_buff *rxskb;
86 struct net_device_stats stats;
87 struct device *dev;
88 struct irlap_cb *irlap;
89 struct qos_info qos;
90
91 iobuff_t tx_buff;
92 iobuff_t rx_buff;
93
94 struct work_struct work;
95 int mtt;
96};
97
98static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port)
99{
100 unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR);
101 port->lsr |= (lsr & (BI|FE|PE|OE));
102 return lsr | port->lsr;
103}
104
105static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
106{
107 port->lsr = 0;
108 bfin_read16(port->membase + OFFSET_LSR);
109}
110
111#define DRIVER_NAME "bfin_sir"
112
113static int bfin_sir_hw_init(void)
114{
115 int ret = -ENODEV;
116#ifdef CONFIG_BFIN_SIR0
117 ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
118 if (ret)
119 return ret;
120 ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
121 if (ret)
122 return ret;
123#endif
124 return ret;
125}
diff --git a/include/asm-blackfin/mach-bf533/blackfin.h b/include/asm-blackfin/mach-bf533/blackfin.h
deleted file mode 100644
index d80971b4e3aa..000000000000
--- a/include/asm-blackfin/mach-bf533/blackfin.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/blackfin.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _MACH_BLACKFIN_H_
32#define _MACH_BLACKFIN_H_
33
34#define BF533_FAMILY
35
36#include "bf533.h"
37#include "mem_map.h"
38#include "defBF532.h"
39#include "anomaly.h"
40
41#if !defined(__ASSEMBLY__)
42#include "cdefBF532.h"
43#endif
44
45#define BFIN_UART_NR_PORTS 1
46
47#define OFFSET_THR 0x00 /* Transmit Holding register */
48#define OFFSET_RBR 0x00 /* Receive Buffer register */
49#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
50#define OFFSET_IER 0x04 /* Interrupt Enable Register */
51#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
52#define OFFSET_IIR 0x08 /* Interrupt Identification Register */
53#define OFFSET_LCR 0x0C /* Line Control Register */
54#define OFFSET_MCR 0x10 /* Modem Control Register */
55#define OFFSET_LSR 0x14 /* Line Status Register */
56#define OFFSET_MSR 0x18 /* Modem Status Register */
57#define OFFSET_SCR 0x1C /* SCR Scratch Register */
58#define OFFSET_GCTL 0x24 /* Global Control Register */
59
60#endif /* _MACH_BLACKFIN_H_ */
diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h
deleted file mode 100644
index 154655452d4c..000000000000
--- a/include/asm-blackfin/mach-bf533/cdefBF532.h
+++ /dev/null
@@ -1,767 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/cdefBF532.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF532_H
32#define _CDEF_BF532_H
33
34#include <asm/blackfin.h>
35
36/*include all Core registers and bit definitions*/
37#include "defBF532.h"
38
39/*include core specific register pointer definitions*/
40#include <asm/mach-common/cdef_LPBlackfin.h>
41
42#include <asm/system.h>
43
44/* Clock and System Control (0xFFC0 0400-0xFFC0 07FF) */
45#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
46/* Writing to PLL_CTL initiates a PLL relock sequence. */
47static __inline__ void bfin_write_PLL_CTL(unsigned int val)
48{
49 unsigned long flags, iwr;
50
51 if (val == bfin_read_PLL_CTL())
52 return;
53
54 local_irq_save(flags);
55 /* Enable the PLL Wakeup bit in SIC IWR */
56 iwr = bfin_read32(SIC_IWR);
57 /* Only allow PPL Wakeup) */
58 bfin_write32(SIC_IWR, IWR_ENABLE(0));
59
60 bfin_write16(PLL_CTL, val);
61 SSYNC();
62 asm("IDLE;");
63
64 bfin_write32(SIC_IWR, iwr);
65 local_irq_restore(flags);
66}
67#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
68#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val)
69#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
70#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val)
71#define bfin_read_CHIPID() bfin_read32(CHIPID)
72#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
73#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val)
74#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
75/* Writing to VR_CTL initiates a PLL relock sequence. */
76static __inline__ void bfin_write_VR_CTL(unsigned int val)
77{
78 unsigned long flags, iwr;
79
80 if (val == bfin_read_VR_CTL())
81 return;
82
83 local_irq_save(flags);
84 /* Enable the PLL Wakeup bit in SIC IWR */
85 iwr = bfin_read32(SIC_IWR);
86 /* Only allow PPL Wakeup) */
87 bfin_write32(SIC_IWR, IWR_ENABLE(0));
88
89 bfin_write16(VR_CTL, val);
90 SSYNC();
91 asm("IDLE;");
92
93 bfin_write32(SIC_IWR, iwr);
94 local_irq_restore(flags);
95}
96
97/* System Interrupt Controller (0xFFC0 0C00-0xFFC0 0FFF) */
98#define bfin_read_SWRST() bfin_read16(SWRST)
99#define bfin_write_SWRST(val) bfin_write16(SWRST,val)
100#define bfin_read_SYSCR() bfin_read16(SYSCR)
101#define bfin_write_SYSCR(val) bfin_write16(SYSCR,val)
102#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
103#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0,val)
104#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
105#define bfin_write_SIC_IAR1(val) bfin_write32(SIC_IAR1,val)
106#define bfin_read_SIC_IAR2() bfin_read32(SIC_IAR2)
107#define bfin_write_SIC_IAR2(val) bfin_write32(SIC_IAR2,val)
108#define bfin_read_SIC_IAR3() bfin_read32(SIC_IAR3)
109#define bfin_write_SIC_IAR3(val) bfin_write32(SIC_IAR3,val)
110#define bfin_read_SIC_IMASK() bfin_read32(SIC_IMASK)
111#define bfin_write_SIC_IMASK(val) bfin_write32(SIC_IMASK,val)
112#define bfin_read_SIC_ISR() bfin_read32(SIC_ISR)
113#define bfin_write_SIC_ISR(val) bfin_write32(SIC_ISR,val)
114#define bfin_read_SIC_IWR() bfin_read32(SIC_IWR)
115#define bfin_write_SIC_IWR(val) bfin_write32(SIC_IWR,val)
116
117/* Watchdog Timer (0xFFC0 1000-0xFFC0 13FF) */
118#define bfin_read_WDOG_CTL() bfin_read16(WDOG_CTL)
119#define bfin_write_WDOG_CTL(val) bfin_write16(WDOG_CTL,val)
120#define bfin_read_WDOG_CNT() bfin_read32(WDOG_CNT)
121#define bfin_write_WDOG_CNT(val) bfin_write32(WDOG_CNT,val)
122#define bfin_read_WDOG_STAT() bfin_read32(WDOG_STAT)
123#define bfin_write_WDOG_STAT(val) bfin_write32(WDOG_STAT,val)
124
125/* Real Time Clock (0xFFC0 1400-0xFFC0 17FF) */
126#define bfin_read_RTC_STAT() bfin_read32(RTC_STAT)
127#define bfin_write_RTC_STAT(val) bfin_write32(RTC_STAT,val)
128#define bfin_read_RTC_ICTL() bfin_read16(RTC_ICTL)
129#define bfin_write_RTC_ICTL(val) bfin_write16(RTC_ICTL,val)
130#define bfin_read_RTC_ISTAT() bfin_read16(RTC_ISTAT)
131#define bfin_write_RTC_ISTAT(val) bfin_write16(RTC_ISTAT,val)
132#define bfin_read_RTC_SWCNT() bfin_read16(RTC_SWCNT)
133#define bfin_write_RTC_SWCNT(val) bfin_write16(RTC_SWCNT,val)
134#define bfin_read_RTC_ALARM() bfin_read32(RTC_ALARM)
135#define bfin_write_RTC_ALARM(val) bfin_write32(RTC_ALARM,val)
136#define bfin_read_RTC_FAST() bfin_read16(RTC_FAST)
137#define bfin_write_RTC_FAST(val) bfin_write16(RTC_FAST,val)
138#define bfin_read_RTC_PREN() bfin_read16(RTC_PREN)
139#define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN,val)
140
141/* DMA Traffic controls */
142#define bfin_read_DMA_TCPER() bfin_read16(DMA_TCPER)
143#define bfin_write_DMA_TCPER(val) bfin_write16(DMA_TCPER,val)
144#define bfin_read_DMA_TCCNT() bfin_read16(DMA_TCCNT)
145#define bfin_write_DMA_TCCNT(val) bfin_write16(DMA_TCCNT,val)
146
147/* Alternate deprecated register names (below) provided for backwards code compatibility */
148#define bfin_read_DMA_TC_PER() bfin_read16(DMA_TC_PER)
149#define bfin_write_DMA_TC_PER(val) bfin_write16(DMA_TC_PER,val)
150#define bfin_read_DMA_TC_CNT() bfin_read16(DMA_TC_CNT)
151#define bfin_write_DMA_TC_CNT(val) bfin_write16(DMA_TC_CNT,val)
152
153/* General Purpose IO (0xFFC0 2400-0xFFC0 27FF) */
154#define bfin_read_FIO_DIR() bfin_read16(FIO_DIR)
155#define bfin_write_FIO_DIR(val) bfin_write16(FIO_DIR,val)
156#define bfin_read_FIO_MASKA_C() bfin_read16(FIO_MASKA_C)
157#define bfin_write_FIO_MASKA_C(val) bfin_write16(FIO_MASKA_C,val)
158#define bfin_read_FIO_MASKA_S() bfin_read16(FIO_MASKA_S)
159#define bfin_write_FIO_MASKA_S(val) bfin_write16(FIO_MASKA_S,val)
160#define bfin_read_FIO_MASKB_C() bfin_read16(FIO_MASKB_C)
161#define bfin_write_FIO_MASKB_C(val) bfin_write16(FIO_MASKB_C,val)
162#define bfin_read_FIO_MASKB_S() bfin_read16(FIO_MASKB_S)
163#define bfin_write_FIO_MASKB_S(val) bfin_write16(FIO_MASKB_S,val)
164#define bfin_read_FIO_POLAR() bfin_read16(FIO_POLAR)
165#define bfin_write_FIO_POLAR(val) bfin_write16(FIO_POLAR,val)
166#define bfin_read_FIO_EDGE() bfin_read16(FIO_EDGE)
167#define bfin_write_FIO_EDGE(val) bfin_write16(FIO_EDGE,val)
168#define bfin_read_FIO_BOTH() bfin_read16(FIO_BOTH)
169#define bfin_write_FIO_BOTH(val) bfin_write16(FIO_BOTH,val)
170#define bfin_read_FIO_INEN() bfin_read16(FIO_INEN)
171#define bfin_write_FIO_INEN(val) bfin_write16(FIO_INEN,val)
172#define bfin_read_FIO_MASKA_D() bfin_read16(FIO_MASKA_D)
173#define bfin_write_FIO_MASKA_D(val) bfin_write16(FIO_MASKA_D,val)
174#define bfin_read_FIO_MASKA_T() bfin_read16(FIO_MASKA_T)
175#define bfin_write_FIO_MASKA_T(val) bfin_write16(FIO_MASKA_T,val)
176#define bfin_read_FIO_MASKB_D() bfin_read16(FIO_MASKB_D)
177#define bfin_write_FIO_MASKB_D(val) bfin_write16(FIO_MASKB_D,val)
178#define bfin_read_FIO_MASKB_T() bfin_read16(FIO_MASKB_T)
179#define bfin_write_FIO_MASKB_T(val) bfin_write16(FIO_MASKB_T,val)
180
181
182#if ANOMALY_05000311
183#define BFIN_WRITE_FIO_FLAG(name) \
184static __inline__ void bfin_write_FIO_FLAG_ ## name (unsigned short val)\
185{\
186 unsigned long flags;\
187 local_irq_save(flags);\
188 bfin_write16(FIO_FLAG_ ## name,val);\
189 bfin_read_CHIPID();\
190 local_irq_restore(flags);\
191}
192BFIN_WRITE_FIO_FLAG(D)
193BFIN_WRITE_FIO_FLAG(C)
194BFIN_WRITE_FIO_FLAG(S)
195BFIN_WRITE_FIO_FLAG(T)
196
197#define BFIN_READ_FIO_FLAG(name) \
198static __inline__ unsigned short bfin_read_FIO_FLAG_ ## name (void)\
199{\
200 unsigned long flags;\
201 unsigned short ret;\
202 local_irq_save(flags);\
203 ret = bfin_read16(FIO_FLAG_ ## name);\
204 bfin_read_CHIPID();\
205 local_irq_restore(flags);\
206 return ret;\
207}
208BFIN_READ_FIO_FLAG(D)
209BFIN_READ_FIO_FLAG(C)
210BFIN_READ_FIO_FLAG(S)
211BFIN_READ_FIO_FLAG(T)
212
213#else
214#define bfin_write_FIO_FLAG_D(val) bfin_write16(FIO_FLAG_D,val)
215#define bfin_write_FIO_FLAG_C(val) bfin_write16(FIO_FLAG_C,val)
216#define bfin_write_FIO_FLAG_S(val) bfin_write16(FIO_FLAG_S,val)
217#define bfin_write_FIO_FLAG_T(val) bfin_write16(FIO_FLAG_T,val)
218#define bfin_read_FIO_FLAG_T() bfin_read16(FIO_FLAG_T)
219#define bfin_read_FIO_FLAG_C() bfin_read16(FIO_FLAG_C)
220#define bfin_read_FIO_FLAG_S() bfin_read16(FIO_FLAG_S)
221#define bfin_read_FIO_FLAG_D() bfin_read16(FIO_FLAG_D)
222#endif
223
224
225/* DMA Controller */
226#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
227#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val)
228#define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR)
229#define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR,val)
230#define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR)
231#define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR,val)
232#define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT)
233#define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT,val)
234#define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT)
235#define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT,val)
236#define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY)
237#define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY,val)
238#define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY)
239#define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY,val)
240#define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR)
241#define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR,val)
242#define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR)
243#define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR,val)
244#define bfin_read_DMA0_CURR_X_COUNT() bfin_read16(DMA0_CURR_X_COUNT)
245#define bfin_write_DMA0_CURR_X_COUNT(val) bfin_write16(DMA0_CURR_X_COUNT,val)
246#define bfin_read_DMA0_CURR_Y_COUNT() bfin_read16(DMA0_CURR_Y_COUNT)
247#define bfin_write_DMA0_CURR_Y_COUNT(val) bfin_write16(DMA0_CURR_Y_COUNT,val)
248#define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS)
249#define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS,val)
250#define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP)
251#define bfin_write_DMA0_PERIPHERAL_MAP(val) bfin_write16(DMA0_PERIPHERAL_MAP,val)
252
253#define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG)
254#define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG,val)
255#define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR)
256#define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR,val)
257#define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR)
258#define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR,val)
259#define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT)
260#define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT,val)
261#define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT)
262#define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT,val)
263#define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY)
264#define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY,val)
265#define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY)
266#define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY,val)
267#define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR)
268#define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR,val)
269#define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR)
270#define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR,val)
271#define bfin_read_DMA1_CURR_X_COUNT() bfin_read16(DMA1_CURR_X_COUNT)
272#define bfin_write_DMA1_CURR_X_COUNT(val) bfin_write16(DMA1_CURR_X_COUNT,val)
273#define bfin_read_DMA1_CURR_Y_COUNT() bfin_read16(DMA1_CURR_Y_COUNT)
274#define bfin_write_DMA1_CURR_Y_COUNT(val) bfin_write16(DMA1_CURR_Y_COUNT,val)
275#define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS)
276#define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS,val)
277#define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP)
278#define bfin_write_DMA1_PERIPHERAL_MAP(val) bfin_write16(DMA1_PERIPHERAL_MAP,val)
279
280#define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG)
281#define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG,val)
282#define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR)
283#define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR,val)
284#define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR)
285#define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR,val)
286#define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT)
287#define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT,val)
288#define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT)
289#define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT,val)
290#define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY)
291#define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY,val)
292#define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY)
293#define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY,val)
294#define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR)
295#define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR,val)
296#define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR)
297#define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR,val)
298#define bfin_read_DMA2_CURR_X_COUNT() bfin_read16(DMA2_CURR_X_COUNT)
299#define bfin_write_DMA2_CURR_X_COUNT(val) bfin_write16(DMA2_CURR_X_COUNT,val)
300#define bfin_read_DMA2_CURR_Y_COUNT() bfin_read16(DMA2_CURR_Y_COUNT)
301#define bfin_write_DMA2_CURR_Y_COUNT(val) bfin_write16(DMA2_CURR_Y_COUNT,val)
302#define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS)
303#define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS,val)
304#define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP)
305#define bfin_write_DMA2_PERIPHERAL_MAP(val) bfin_write16(DMA2_PERIPHERAL_MAP,val)
306
307#define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG)
308#define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG,val)
309#define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR)
310#define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR,val)
311#define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR)
312#define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR,val)
313#define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT)
314#define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT,val)
315#define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT)
316#define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT,val)
317#define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY)
318#define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY,val)
319#define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY)
320#define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY,val)
321#define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR)
322#define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR,val)
323#define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR)
324#define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR,val)
325#define bfin_read_DMA3_CURR_X_COUNT() bfin_read16(DMA3_CURR_X_COUNT)
326#define bfin_write_DMA3_CURR_X_COUNT(val) bfin_write16(DMA3_CURR_X_COUNT,val)
327#define bfin_read_DMA3_CURR_Y_COUNT() bfin_read16(DMA3_CURR_Y_COUNT)
328#define bfin_write_DMA3_CURR_Y_COUNT(val) bfin_write16(DMA3_CURR_Y_COUNT,val)
329#define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS)
330#define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS,val)
331#define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP)
332#define bfin_write_DMA3_PERIPHERAL_MAP(val) bfin_write16(DMA3_PERIPHERAL_MAP,val)
333
334#define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG)
335#define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG,val)
336#define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR)
337#define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR,val)
338#define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR)
339#define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR,val)
340#define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT)
341#define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT,val)
342#define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT)
343#define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT,val)
344#define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY)
345#define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY,val)
346#define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY)
347#define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY,val)
348#define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR)
349#define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR,val)
350#define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR)
351#define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR,val)
352#define bfin_read_DMA4_CURR_X_COUNT() bfin_read16(DMA4_CURR_X_COUNT)
353#define bfin_write_DMA4_CURR_X_COUNT(val) bfin_write16(DMA4_CURR_X_COUNT,val)
354#define bfin_read_DMA4_CURR_Y_COUNT() bfin_read16(DMA4_CURR_Y_COUNT)
355#define bfin_write_DMA4_CURR_Y_COUNT(val) bfin_write16(DMA4_CURR_Y_COUNT,val)
356#define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS)
357#define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS,val)
358#define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP)
359#define bfin_write_DMA4_PERIPHERAL_MAP(val) bfin_write16(DMA4_PERIPHERAL_MAP,val)
360
361#define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG)
362#define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG,val)
363#define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR)
364#define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR,val)
365#define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR)
366#define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR,val)
367#define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT)
368#define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT,val)
369#define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT)
370#define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT,val)
371#define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY)
372#define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY,val)
373#define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY)
374#define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY,val)
375#define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR)
376#define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR,val)
377#define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR)
378#define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR,val)
379#define bfin_read_DMA5_CURR_X_COUNT() bfin_read16(DMA5_CURR_X_COUNT)
380#define bfin_write_DMA5_CURR_X_COUNT(val) bfin_write16(DMA5_CURR_X_COUNT,val)
381#define bfin_read_DMA5_CURR_Y_COUNT() bfin_read16(DMA5_CURR_Y_COUNT)
382#define bfin_write_DMA5_CURR_Y_COUNT(val) bfin_write16(DMA5_CURR_Y_COUNT,val)
383#define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS)
384#define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS,val)
385#define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP)
386#define bfin_write_DMA5_PERIPHERAL_MAP(val) bfin_write16(DMA5_PERIPHERAL_MAP,val)
387
388#define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG)
389#define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG,val)
390#define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR)
391#define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR,val)
392#define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR)
393#define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR,val)
394#define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT)
395#define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT,val)
396#define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT)
397#define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT,val)
398#define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY)
399#define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY,val)
400#define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY)
401#define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY,val)
402#define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR)
403#define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR,val)
404#define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR)
405#define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR,val)
406#define bfin_read_DMA6_CURR_X_COUNT() bfin_read16(DMA6_CURR_X_COUNT)
407#define bfin_write_DMA6_CURR_X_COUNT(val) bfin_write16(DMA6_CURR_X_COUNT,val)
408#define bfin_read_DMA6_CURR_Y_COUNT() bfin_read16(DMA6_CURR_Y_COUNT)
409#define bfin_write_DMA6_CURR_Y_COUNT(val) bfin_write16(DMA6_CURR_Y_COUNT,val)
410#define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS)
411#define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS,val)
412#define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP)
413#define bfin_write_DMA6_PERIPHERAL_MAP(val) bfin_write16(DMA6_PERIPHERAL_MAP,val)
414
415#define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG)
416#define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG,val)
417#define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR)
418#define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR,val)
419#define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR)
420#define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR,val)
421#define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT)
422#define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT,val)
423#define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT)
424#define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT,val)
425#define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY)
426#define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY,val)
427#define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY)
428#define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY,val)
429#define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR)
430#define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR,val)
431#define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR)
432#define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR,val)
433#define bfin_read_DMA7_CURR_X_COUNT() bfin_read16(DMA7_CURR_X_COUNT)
434#define bfin_write_DMA7_CURR_X_COUNT(val) bfin_write16(DMA7_CURR_X_COUNT,val)
435#define bfin_read_DMA7_CURR_Y_COUNT() bfin_read16(DMA7_CURR_Y_COUNT)
436#define bfin_write_DMA7_CURR_Y_COUNT(val) bfin_write16(DMA7_CURR_Y_COUNT,val)
437#define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS)
438#define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS,val)
439#define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP)
440#define bfin_write_DMA7_PERIPHERAL_MAP(val) bfin_write16(DMA7_PERIPHERAL_MAP,val)
441
442#define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG)
443#define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG,val)
444#define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR)
445#define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR,val)
446#define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR)
447#define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR,val)
448#define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT)
449#define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT,val)
450#define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT)
451#define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT,val)
452#define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY)
453#define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY,val)
454#define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY)
455#define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY,val)
456#define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR)
457#define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR,val)
458#define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR)
459#define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR,val)
460#define bfin_read_MDMA_D1_CURR_X_COUNT() bfin_read16(MDMA_D1_CURR_X_COUNT)
461#define bfin_write_MDMA_D1_CURR_X_COUNT(val) bfin_write16(MDMA_D1_CURR_X_COUNT,val)
462#define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT)
463#define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT,val)
464#define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS)
465#define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS,val)
466#define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP)
467#define bfin_write_MDMA_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA_D1_PERIPHERAL_MAP,val)
468
469#define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG)
470#define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG,val)
471#define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR)
472#define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR,val)
473#define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR)
474#define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR,val)
475#define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT)
476#define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT,val)
477#define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT)
478#define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT,val)
479#define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY)
480#define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY,val)
481#define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY)
482#define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY,val)
483#define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR)
484#define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR,val)
485#define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR)
486#define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR,val)
487#define bfin_read_MDMA_S1_CURR_X_COUNT() bfin_read16(MDMA_S1_CURR_X_COUNT)
488#define bfin_write_MDMA_S1_CURR_X_COUNT(val) bfin_write16(MDMA_S1_CURR_X_COUNT,val)
489#define bfin_read_MDMA_S1_CURR_Y_COUNT() bfin_read16(MDMA_S1_CURR_Y_COUNT)
490#define bfin_write_MDMA_S1_CURR_Y_COUNT(val) bfin_write16(MDMA_S1_CURR_Y_COUNT,val)
491#define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS)
492#define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS,val)
493#define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP)
494#define bfin_write_MDMA_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA_S1_PERIPHERAL_MAP,val)
495
496#define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG)
497#define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG,val)
498#define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR)
499#define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR,val)
500#define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR)
501#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR,val)
502#define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT)
503#define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT,val)
504#define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT)
505#define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT,val)
506#define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY)
507#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY,val)
508#define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY)
509#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY,val)
510#define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR)
511#define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR,val)
512#define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR)
513#define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR,val)
514#define bfin_read_MDMA_D0_CURR_X_COUNT() bfin_read16(MDMA_D0_CURR_X_COUNT)
515#define bfin_write_MDMA_D0_CURR_X_COUNT(val) bfin_write16(MDMA_D0_CURR_X_COUNT,val)
516#define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT)
517#define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT,val)
518#define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS)
519#define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS,val)
520#define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP)
521#define bfin_write_MDMA_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA_D0_PERIPHERAL_MAP,val)
522
523#define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG)
524#define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG,val)
525#define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR)
526#define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR,val)
527#define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR)
528#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR,val)
529#define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT)
530#define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT,val)
531#define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT)
532#define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT,val)
533#define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY)
534#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY,val)
535#define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY)
536#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY,val)
537#define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR)
538#define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR,val)
539#define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR)
540#define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR,val)
541#define bfin_read_MDMA_S0_CURR_X_COUNT() bfin_read16(MDMA_S0_CURR_X_COUNT)
542#define bfin_write_MDMA_S0_CURR_X_COUNT(val) bfin_write16(MDMA_S0_CURR_X_COUNT,val)
543#define bfin_read_MDMA_S0_CURR_Y_COUNT() bfin_read16(MDMA_S0_CURR_Y_COUNT)
544#define bfin_write_MDMA_S0_CURR_Y_COUNT(val) bfin_write16(MDMA_S0_CURR_Y_COUNT,val)
545#define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS)
546#define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS,val)
547#define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP)
548#define bfin_write_MDMA_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA_S0_PERIPHERAL_MAP,val)
549
550/* Aysnchronous Memory Controller - External Bus Interface Unit (0xFFC0 3C00-0xFFC0 3FFF) */
551#define bfin_read_EBIU_AMGCTL() bfin_read16(EBIU_AMGCTL)
552#define bfin_write_EBIU_AMGCTL(val) bfin_write16(EBIU_AMGCTL,val)
553#define bfin_read_EBIU_AMBCTL0() bfin_read32(EBIU_AMBCTL0)
554#define bfin_write_EBIU_AMBCTL0(val) bfin_write32(EBIU_AMBCTL0,val)
555#define bfin_read_EBIU_AMBCTL1() bfin_read32(EBIU_AMBCTL1)
556#define bfin_write_EBIU_AMBCTL1(val) bfin_write32(EBIU_AMBCTL1,val)
557
558/* SDRAM Controller External Bus Interface Unit (0xFFC0 4C00-0xFFC0 4FFF) */
559#define bfin_read_EBIU_SDGCTL() bfin_read32(EBIU_SDGCTL)
560#define bfin_write_EBIU_SDGCTL(val) bfin_write32(EBIU_SDGCTL,val)
561#define bfin_read_EBIU_SDRRC() bfin_read16(EBIU_SDRRC)
562#define bfin_write_EBIU_SDRRC(val) bfin_write16(EBIU_SDRRC,val)
563#define bfin_read_EBIU_SDSTAT() bfin_read16(EBIU_SDSTAT)
564#define bfin_write_EBIU_SDSTAT(val) bfin_write16(EBIU_SDSTAT,val)
565#define bfin_read_EBIU_SDBCTL() bfin_read16(EBIU_SDBCTL)
566#define bfin_write_EBIU_SDBCTL(val) bfin_write16(EBIU_SDBCTL,val)
567
568/* UART Controller */
569#define bfin_read_UART_THR() bfin_read16(UART_THR)
570#define bfin_write_UART_THR(val) bfin_write16(UART_THR,val)
571#define bfin_read_UART_RBR() bfin_read16(UART_RBR)
572#define bfin_write_UART_RBR(val) bfin_write16(UART_RBR,val)
573#define bfin_read_UART_DLL() bfin_read16(UART_DLL)
574#define bfin_write_UART_DLL(val) bfin_write16(UART_DLL,val)
575#define bfin_read_UART_IER() bfin_read16(UART_IER)
576#define bfin_write_UART_IER(val) bfin_write16(UART_IER,val)
577#define bfin_read_UART_DLH() bfin_read16(UART_DLH)
578#define bfin_write_UART_DLH(val) bfin_write16(UART_DLH,val)
579#define bfin_read_UART_IIR() bfin_read16(UART_IIR)
580#define bfin_write_UART_IIR(val) bfin_write16(UART_IIR,val)
581#define bfin_read_UART_LCR() bfin_read16(UART_LCR)
582#define bfin_write_UART_LCR(val) bfin_write16(UART_LCR,val)
583#define bfin_read_UART_MCR() bfin_read16(UART_MCR)
584#define bfin_write_UART_MCR(val) bfin_write16(UART_MCR,val)
585#define bfin_read_UART_LSR() bfin_read16(UART_LSR)
586#define bfin_write_UART_LSR(val) bfin_write16(UART_LSR,val)
587/*
588#define UART_MSR
589*/
590#define bfin_read_UART_SCR() bfin_read16(UART_SCR)
591#define bfin_write_UART_SCR(val) bfin_write16(UART_SCR,val)
592#define bfin_read_UART_GCTL() bfin_read16(UART_GCTL)
593#define bfin_write_UART_GCTL(val) bfin_write16(UART_GCTL,val)
594
595/* SPI Controller */
596#define bfin_read_SPI_CTL() bfin_read16(SPI_CTL)
597#define bfin_write_SPI_CTL(val) bfin_write16(SPI_CTL,val)
598#define bfin_read_SPI_FLG() bfin_read16(SPI_FLG)
599#define bfin_write_SPI_FLG(val) bfin_write16(SPI_FLG,val)
600#define bfin_read_SPI_STAT() bfin_read16(SPI_STAT)
601#define bfin_write_SPI_STAT(val) bfin_write16(SPI_STAT,val)
602#define bfin_read_SPI_TDBR() bfin_read16(SPI_TDBR)
603#define bfin_write_SPI_TDBR(val) bfin_write16(SPI_TDBR,val)
604#define bfin_read_SPI_RDBR() bfin_read16(SPI_RDBR)
605#define bfin_write_SPI_RDBR(val) bfin_write16(SPI_RDBR,val)
606#define bfin_read_SPI_BAUD() bfin_read16(SPI_BAUD)
607#define bfin_write_SPI_BAUD(val) bfin_write16(SPI_BAUD,val)
608#define bfin_read_SPI_SHADOW() bfin_read16(SPI_SHADOW)
609#define bfin_write_SPI_SHADOW(val) bfin_write16(SPI_SHADOW,val)
610
611/* TIMER 0, 1, 2 Registers */
612#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
613#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG,val)
614#define bfin_read_TIMER0_COUNTER() bfin_read32(TIMER0_COUNTER)
615#define bfin_write_TIMER0_COUNTER(val) bfin_write32(TIMER0_COUNTER,val)
616#define bfin_read_TIMER0_PERIOD() bfin_read32(TIMER0_PERIOD)
617#define bfin_write_TIMER0_PERIOD(val) bfin_write32(TIMER0_PERIOD,val)
618#define bfin_read_TIMER0_WIDTH() bfin_read32(TIMER0_WIDTH)
619#define bfin_write_TIMER0_WIDTH(val) bfin_write32(TIMER0_WIDTH,val)
620
621#define bfin_read_TIMER1_CONFIG() bfin_read16(TIMER1_CONFIG)
622#define bfin_write_TIMER1_CONFIG(val) bfin_write16(TIMER1_CONFIG,val)
623#define bfin_read_TIMER1_COUNTER() bfin_read32(TIMER1_COUNTER)
624#define bfin_write_TIMER1_COUNTER(val) bfin_write32(TIMER1_COUNTER,val)
625#define bfin_read_TIMER1_PERIOD() bfin_read32(TIMER1_PERIOD)
626#define bfin_write_TIMER1_PERIOD(val) bfin_write32(TIMER1_PERIOD,val)
627#define bfin_read_TIMER1_WIDTH() bfin_read32(TIMER1_WIDTH)
628#define bfin_write_TIMER1_WIDTH(val) bfin_write32(TIMER1_WIDTH,val)
629
630#define bfin_read_TIMER2_CONFIG() bfin_read16(TIMER2_CONFIG)
631#define bfin_write_TIMER2_CONFIG(val) bfin_write16(TIMER2_CONFIG,val)
632#define bfin_read_TIMER2_COUNTER() bfin_read32(TIMER2_COUNTER)
633#define bfin_write_TIMER2_COUNTER(val) bfin_write32(TIMER2_COUNTER,val)
634#define bfin_read_TIMER2_PERIOD() bfin_read32(TIMER2_PERIOD)
635#define bfin_write_TIMER2_PERIOD(val) bfin_write32(TIMER2_PERIOD,val)
636#define bfin_read_TIMER2_WIDTH() bfin_read32(TIMER2_WIDTH)
637#define bfin_write_TIMER2_WIDTH(val) bfin_write32(TIMER2_WIDTH,val)
638
639#define bfin_read_TIMER_ENABLE() bfin_read16(TIMER_ENABLE)
640#define bfin_write_TIMER_ENABLE(val) bfin_write16(TIMER_ENABLE,val)
641#define bfin_read_TIMER_DISABLE() bfin_read16(TIMER_DISABLE)
642#define bfin_write_TIMER_DISABLE(val) bfin_write16(TIMER_DISABLE,val)
643#define bfin_read_TIMER_STATUS() bfin_read16(TIMER_STATUS)
644#define bfin_write_TIMER_STATUS(val) bfin_write16(TIMER_STATUS,val)
645
646/* SPORT0 Controller */
647#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
648#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1,val)
649#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
650#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2,val)
651#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
652#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV,val)
653#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
654#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV,val)
655#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
656#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX,val)
657#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
658#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX,val)
659#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX)
660#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX,val)
661#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX)
662#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX,val)
663#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX)
664#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX,val)
665#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX)
666#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX,val)
667#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
668#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1,val)
669#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
670#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2,val)
671#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
672#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV,val)
673#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
674#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV,val)
675#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
676#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT,val)
677#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
678#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL,val)
679#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
680#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1,val)
681#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
682#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2,val)
683#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
684#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0,val)
685#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
686#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1,val)
687#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
688#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2,val)
689#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
690#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3,val)
691#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
692#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0,val)
693#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
694#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1,val)
695#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
696#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2,val)
697#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
698#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3,val)
699
700/* SPORT1 Controller */
701#define bfin_read_SPORT1_TCR1() bfin_read16(SPORT1_TCR1)
702#define bfin_write_SPORT1_TCR1(val) bfin_write16(SPORT1_TCR1,val)
703#define bfin_read_SPORT1_TCR2() bfin_read16(SPORT1_TCR2)
704#define bfin_write_SPORT1_TCR2(val) bfin_write16(SPORT1_TCR2,val)
705#define bfin_read_SPORT1_TCLKDIV() bfin_read16(SPORT1_TCLKDIV)
706#define bfin_write_SPORT1_TCLKDIV(val) bfin_write16(SPORT1_TCLKDIV,val)
707#define bfin_read_SPORT1_TFSDIV() bfin_read16(SPORT1_TFSDIV)
708#define bfin_write_SPORT1_TFSDIV(val) bfin_write16(SPORT1_TFSDIV,val)
709#define bfin_read_SPORT1_TX() bfin_read32(SPORT1_TX)
710#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX,val)
711#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
712#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX,val)
713#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX)
714#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX,val)
715#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX)
716#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX,val)
717#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX)
718#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX,val)
719#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX)
720#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX,val)
721#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
722#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1,val)
723#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
724#define bfin_write_SPORT1_RCR2(val) bfin_write16(SPORT1_RCR2,val)
725#define bfin_read_SPORT1_RCLKDIV() bfin_read16(SPORT1_RCLKDIV)
726#define bfin_write_SPORT1_RCLKDIV(val) bfin_write16(SPORT1_RCLKDIV,val)
727#define bfin_read_SPORT1_RFSDIV() bfin_read16(SPORT1_RFSDIV)
728#define bfin_write_SPORT1_RFSDIV(val) bfin_write16(SPORT1_RFSDIV,val)
729#define bfin_read_SPORT1_STAT() bfin_read16(SPORT1_STAT)
730#define bfin_write_SPORT1_STAT(val) bfin_write16(SPORT1_STAT,val)
731#define bfin_read_SPORT1_CHNL() bfin_read16(SPORT1_CHNL)
732#define bfin_write_SPORT1_CHNL(val) bfin_write16(SPORT1_CHNL,val)
733#define bfin_read_SPORT1_MCMC1() bfin_read16(SPORT1_MCMC1)
734#define bfin_write_SPORT1_MCMC1(val) bfin_write16(SPORT1_MCMC1,val)
735#define bfin_read_SPORT1_MCMC2() bfin_read16(SPORT1_MCMC2)
736#define bfin_write_SPORT1_MCMC2(val) bfin_write16(SPORT1_MCMC2,val)
737#define bfin_read_SPORT1_MTCS0() bfin_read32(SPORT1_MTCS0)
738#define bfin_write_SPORT1_MTCS0(val) bfin_write32(SPORT1_MTCS0,val)
739#define bfin_read_SPORT1_MTCS1() bfin_read32(SPORT1_MTCS1)
740#define bfin_write_SPORT1_MTCS1(val) bfin_write32(SPORT1_MTCS1,val)
741#define bfin_read_SPORT1_MTCS2() bfin_read32(SPORT1_MTCS2)
742#define bfin_write_SPORT1_MTCS2(val) bfin_write32(SPORT1_MTCS2,val)
743#define bfin_read_SPORT1_MTCS3() bfin_read32(SPORT1_MTCS3)
744#define bfin_write_SPORT1_MTCS3(val) bfin_write32(SPORT1_MTCS3,val)
745#define bfin_read_SPORT1_MRCS0() bfin_read32(SPORT1_MRCS0)
746#define bfin_write_SPORT1_MRCS0(val) bfin_write32(SPORT1_MRCS0,val)
747#define bfin_read_SPORT1_MRCS1() bfin_read32(SPORT1_MRCS1)
748#define bfin_write_SPORT1_MRCS1(val) bfin_write32(SPORT1_MRCS1,val)
749#define bfin_read_SPORT1_MRCS2() bfin_read32(SPORT1_MRCS2)
750#define bfin_write_SPORT1_MRCS2(val) bfin_write32(SPORT1_MRCS2,val)
751#define bfin_read_SPORT1_MRCS3() bfin_read32(SPORT1_MRCS3)
752#define bfin_write_SPORT1_MRCS3(val) bfin_write32(SPORT1_MRCS3,val)
753
754/* Parallel Peripheral Interface (PPI) */
755#define bfin_read_PPI_CONTROL() bfin_read16(PPI_CONTROL)
756#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL,val)
757#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
758#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS,val)
759#define bfin_clear_PPI_STATUS() bfin_read_PPI_STATUS()
760#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
761#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY,val)
762#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
763#define bfin_write_PPI_COUNT(val) bfin_write16(PPI_COUNT,val)
764#define bfin_read_PPI_FRAME() bfin_read16(PPI_FRAME)
765#define bfin_write_PPI_FRAME(val) bfin_write16(PPI_FRAME,val)
766
767#endif /* _CDEF_BF532_H */
diff --git a/include/asm-blackfin/mach-bf533/defBF532.h b/include/asm-blackfin/mach-bf533/defBF532.h
deleted file mode 100644
index 0ab4dd7494cf..000000000000
--- a/include/asm-blackfin/mach-bf533/defBF532.h
+++ /dev/null
@@ -1,1266 +0,0 @@
1/************************************************************************
2 *
3 * This file is subject to the terms and conditions of the GNU Public
4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details.
6 *
7 * Non-GPL License also available as part of VisualDSP++
8 * http://www.analog.com/processors/resources/crosscore/visualDspDevSoftware.html
9 *
10 * (c) Copyright 2001-2005 Analog Devices, Inc. All rights reserved
11 *
12 * This file under source code control, please send bugs or changes to:
13 * dsptools.support@analog.com
14 *
15 ************************************************************************/
16/*
17 * File: include/asm-blackfin/mach-bf533/defBF532.h
18 * Based on:
19 * Author:
20 *
21 * Created:
22 * Description:
23 *
24 * Rev:
25 *
26 * Modified:
27 *
28 * Bugs: Enter bugs at http://blackfin.uclinux.org/
29 *
30 * This program is free software; you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License as published by
32 * the Free Software Foundation; either version 2, or (at your option)
33 * any later version.
34 *
35 * This program is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
39 *
40 * You should have received a copy of the GNU General Public License
41 * along with this program; see the file COPYING.
42 * If not, write to the Free Software Foundation,
43 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
44 */
45/* SYSTEM & MM REGISTER BIT & ADDRESS DEFINITIONS FOR ADSP-BF532 */
46
47#ifndef _DEF_BF532_H
48#define _DEF_BF532_H
49
50/* include all Core registers and bit definitions */
51#include <asm/mach-common/def_LPBlackfin.h>
52
53/*********************************************************************************** */
54/* System MMR Register Map */
55/*********************************************************************************** */
56/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
57
58#define PLL_CTL 0xFFC00000 /* PLL Control register (16-bit) */
59#define PLL_DIV 0xFFC00004 /* PLL Divide Register (16-bit) */
60#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register (16-bit) */
61#define PLL_STAT 0xFFC0000C /* PLL Status register (16-bit) */
62#define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */
63#define CHIPID 0xFFC00014 /* Chip ID Register */
64
65/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
66#define SWRST 0xFFC00100 /* Software Reset Register (16-bit) */
67#define SYSCR 0xFFC00104 /* System Configuration registe */
68#define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */
69#define SIC_IMASK 0xFFC0010C /* Interrupt Mask Register */
70#define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */
71#define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */
72#define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */
73#define SIC_ISR 0xFFC00120 /* Interrupt Status Register */
74#define SIC_IWR 0xFFC00124 /* Interrupt Wakeup Register */
75
76/* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */
77#define WDOG_CTL 0xFFC00200 /* Watchdog Control Register */
78#define WDOG_CNT 0xFFC00204 /* Watchdog Count Register */
79#define WDOG_STAT 0xFFC00208 /* Watchdog Status Register */
80
81/* Real Time Clock (0xFFC00300 - 0xFFC003FF) */
82#define RTC_STAT 0xFFC00300 /* RTC Status Register */
83#define RTC_ICTL 0xFFC00304 /* RTC Interrupt Control Register */
84#define RTC_ISTAT 0xFFC00308 /* RTC Interrupt Status Register */
85#define RTC_SWCNT 0xFFC0030C /* RTC Stopwatch Count Register */
86#define RTC_ALARM 0xFFC00310 /* RTC Alarm Time Register */
87#define RTC_FAST 0xFFC00314 /* RTC Prescaler Enable Register */
88#define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Register (alternate macro) */
89
90/* UART Controller (0xFFC00400 - 0xFFC004FF) */
91
92/*
93 * Because include/linux/serial_reg.h have defined UART_*,
94 * So we define blackfin uart regs to BFIN_UART_*.
95 */
96#define BFIN_UART_THR 0xFFC00400 /* Transmit Holding register */
97#define BFIN_UART_RBR 0xFFC00400 /* Receive Buffer register */
98#define BFIN_UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */
99#define BFIN_UART_IER 0xFFC00404 /* Interrupt Enable Register */
100#define BFIN_UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */
101#define BFIN_UART_IIR 0xFFC00408 /* Interrupt Identification Register */
102#define BFIN_UART_LCR 0xFFC0040C /* Line Control Register */
103#define BFIN_UART_MCR 0xFFC00410 /* Modem Control Register */
104#define BFIN_UART_LSR 0xFFC00414 /* Line Status Register */
105#if 0
106#define BFIN_UART_MSR 0xFFC00418 /* Modem Status Register (UNUSED in ADSP-BF532) */
107#endif
108#define BFIN_UART_SCR 0xFFC0041C /* SCR Scratch Register */
109#define BFIN_UART_GCTL 0xFFC00424 /* Global Control Register */
110
111/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
112#define SPI0_REGBASE 0xFFC00500
113#define SPI_CTL 0xFFC00500 /* SPI Control Register */
114#define SPI_FLG 0xFFC00504 /* SPI Flag register */
115#define SPI_STAT 0xFFC00508 /* SPI Status register */
116#define SPI_TDBR 0xFFC0050C /* SPI Transmit Data Buffer Register */
117#define SPI_RDBR 0xFFC00510 /* SPI Receive Data Buffer Register */
118#define SPI_BAUD 0xFFC00514 /* SPI Baud rate Register */
119#define SPI_SHADOW 0xFFC00518 /* SPI_RDBR Shadow Register */
120
121/* TIMER 0, 1, 2 Registers (0xFFC00600 - 0xFFC006FF) */
122
123#define TIMER0_CONFIG 0xFFC00600 /* Timer 0 Configuration Register */
124#define TIMER0_COUNTER 0xFFC00604 /* Timer 0 Counter Register */
125#define TIMER0_PERIOD 0xFFC00608 /* Timer 0 Period Register */
126#define TIMER0_WIDTH 0xFFC0060C /* Timer 0 Width Register */
127
128#define TIMER1_CONFIG 0xFFC00610 /* Timer 1 Configuration Register */
129#define TIMER1_COUNTER 0xFFC00614 /* Timer 1 Counter Register */
130#define TIMER1_PERIOD 0xFFC00618 /* Timer 1 Period Register */
131#define TIMER1_WIDTH 0xFFC0061C /* Timer 1 Width Register */
132
133#define TIMER2_CONFIG 0xFFC00620 /* Timer 2 Configuration Register */
134#define TIMER2_COUNTER 0xFFC00624 /* Timer 2 Counter Register */
135#define TIMER2_PERIOD 0xFFC00628 /* Timer 2 Period Register */
136#define TIMER2_WIDTH 0xFFC0062C /* Timer 2 Width Register */
137
138#define TIMER_ENABLE 0xFFC00640 /* Timer Enable Register */
139#define TIMER_DISABLE 0xFFC00644 /* Timer Disable Register */
140#define TIMER_STATUS 0xFFC00648 /* Timer Status Register */
141
142/* General Purpose IO (0xFFC00700 - 0xFFC007FF) */
143
144#define FIO_FLAG_D 0xFFC00700 /* Flag Mask to directly specify state of pins */
145#define FIO_FLAG_C 0xFFC00704 /* Peripheral Interrupt Flag Register (clear) */
146#define FIO_FLAG_S 0xFFC00708 /* Peripheral Interrupt Flag Register (set) */
147#define FIO_FLAG_T 0xFFC0070C /* Flag Mask to directly toggle state of pins */
148#define FIO_MASKA_D 0xFFC00710 /* Flag Mask Interrupt A Register (set directly) */
149#define FIO_MASKA_C 0xFFC00714 /* Flag Mask Interrupt A Register (clear) */
150#define FIO_MASKA_S 0xFFC00718 /* Flag Mask Interrupt A Register (set) */
151#define FIO_MASKA_T 0xFFC0071C /* Flag Mask Interrupt A Register (toggle) */
152#define FIO_MASKB_D 0xFFC00720 /* Flag Mask Interrupt B Register (set directly) */
153#define FIO_MASKB_C 0xFFC00724 /* Flag Mask Interrupt B Register (clear) */
154#define FIO_MASKB_S 0xFFC00728 /* Flag Mask Interrupt B Register (set) */
155#define FIO_MASKB_T 0xFFC0072C /* Flag Mask Interrupt B Register (toggle) */
156#define FIO_DIR 0xFFC00730 /* Peripheral Flag Direction Register */
157#define FIO_POLAR 0xFFC00734 /* Flag Source Polarity Register */
158#define FIO_EDGE 0xFFC00738 /* Flag Source Sensitivity Register */
159#define FIO_BOTH 0xFFC0073C /* Flag Set on BOTH Edges Register */
160#define FIO_INEN 0xFFC00740 /* Flag Input Enable Register */
161
162/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
163#define SPORT0_TCR1 0xFFC00800 /* SPORT0 Transmit Configuration 1 Register */
164#define SPORT0_TCR2 0xFFC00804 /* SPORT0 Transmit Configuration 2 Register */
165#define SPORT0_TCLKDIV 0xFFC00808 /* SPORT0 Transmit Clock Divider */
166#define SPORT0_TFSDIV 0xFFC0080C /* SPORT0 Transmit Frame Sync Divider */
167#define SPORT0_TX 0xFFC00810 /* SPORT0 TX Data Register */
168#define SPORT0_RX 0xFFC00818 /* SPORT0 RX Data Register */
169#define SPORT0_RCR1 0xFFC00820 /* SPORT0 Transmit Configuration 1 Register */
170#define SPORT0_RCR2 0xFFC00824 /* SPORT0 Transmit Configuration 2 Register */
171#define SPORT0_RCLKDIV 0xFFC00828 /* SPORT0 Receive Clock Divider */
172#define SPORT0_RFSDIV 0xFFC0082C /* SPORT0 Receive Frame Sync Divider */
173#define SPORT0_STAT 0xFFC00830 /* SPORT0 Status Register */
174#define SPORT0_CHNL 0xFFC00834 /* SPORT0 Current Channel Register */
175#define SPORT0_MCMC1 0xFFC00838 /* SPORT0 Multi-Channel Configuration Register 1 */
176#define SPORT0_MCMC2 0xFFC0083C /* SPORT0 Multi-Channel Configuration Register 2 */
177#define SPORT0_MTCS0 0xFFC00840 /* SPORT0 Multi-Channel Transmit Select Register 0 */
178#define SPORT0_MTCS1 0xFFC00844 /* SPORT0 Multi-Channel Transmit Select Register 1 */
179#define SPORT0_MTCS2 0xFFC00848 /* SPORT0 Multi-Channel Transmit Select Register 2 */
180#define SPORT0_MTCS3 0xFFC0084C /* SPORT0 Multi-Channel Transmit Select Register 3 */
181#define SPORT0_MRCS0 0xFFC00850 /* SPORT0 Multi-Channel Receive Select Register 0 */
182#define SPORT0_MRCS1 0xFFC00854 /* SPORT0 Multi-Channel Receive Select Register 1 */
183#define SPORT0_MRCS2 0xFFC00858 /* SPORT0 Multi-Channel Receive Select Register 2 */
184#define SPORT0_MRCS3 0xFFC0085C /* SPORT0 Multi-Channel Receive Select Register 3 */
185
186/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
187#define SPORT1_TCR1 0xFFC00900 /* SPORT1 Transmit Configuration 1 Register */
188#define SPORT1_TCR2 0xFFC00904 /* SPORT1 Transmit Configuration 2 Register */
189#define SPORT1_TCLKDIV 0xFFC00908 /* SPORT1 Transmit Clock Divider */
190#define SPORT1_TFSDIV 0xFFC0090C /* SPORT1 Transmit Frame Sync Divider */
191#define SPORT1_TX 0xFFC00910 /* SPORT1 TX Data Register */
192#define SPORT1_RX 0xFFC00918 /* SPORT1 RX Data Register */
193#define SPORT1_RCR1 0xFFC00920 /* SPORT1 Transmit Configuration 1 Register */
194#define SPORT1_RCR2 0xFFC00924 /* SPORT1 Transmit Configuration 2 Register */
195#define SPORT1_RCLKDIV 0xFFC00928 /* SPORT1 Receive Clock Divider */
196#define SPORT1_RFSDIV 0xFFC0092C /* SPORT1 Receive Frame Sync Divider */
197#define SPORT1_STAT 0xFFC00930 /* SPORT1 Status Register */
198#define SPORT1_CHNL 0xFFC00934 /* SPORT1 Current Channel Register */
199#define SPORT1_MCMC1 0xFFC00938 /* SPORT1 Multi-Channel Configuration Register 1 */
200#define SPORT1_MCMC2 0xFFC0093C /* SPORT1 Multi-Channel Configuration Register 2 */
201#define SPORT1_MTCS0 0xFFC00940 /* SPORT1 Multi-Channel Transmit Select Register 0 */
202#define SPORT1_MTCS1 0xFFC00944 /* SPORT1 Multi-Channel Transmit Select Register 1 */
203#define SPORT1_MTCS2 0xFFC00948 /* SPORT1 Multi-Channel Transmit Select Register 2 */
204#define SPORT1_MTCS3 0xFFC0094C /* SPORT1 Multi-Channel Transmit Select Register 3 */
205#define SPORT1_MRCS0 0xFFC00950 /* SPORT1 Multi-Channel Receive Select Register 0 */
206#define SPORT1_MRCS1 0xFFC00954 /* SPORT1 Multi-Channel Receive Select Register 1 */
207#define SPORT1_MRCS2 0xFFC00958 /* SPORT1 Multi-Channel Receive Select Register 2 */
208#define SPORT1_MRCS3 0xFFC0095C /* SPORT1 Multi-Channel Receive Select Register 3 */
209
210/* Asynchronous Memory Controller - External Bus Interface Unit */
211#define EBIU_AMGCTL 0xFFC00A00 /* Asynchronous Memory Global Control Register */
212#define EBIU_AMBCTL0 0xFFC00A04 /* Asynchronous Memory Bank Control Register 0 */
213#define EBIU_AMBCTL1 0xFFC00A08 /* Asynchronous Memory Bank Control Register 1 */
214
215/* SDRAM Controller External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
216
217#define EBIU_SDGCTL 0xFFC00A10 /* SDRAM Global Control Register */
218#define EBIU_SDBCTL 0xFFC00A14 /* SDRAM Bank Control Register */
219#define EBIU_SDRRC 0xFFC00A18 /* SDRAM Refresh Rate Control Register */
220#define EBIU_SDSTAT 0xFFC00A1C /* SDRAM Status Register */
221
222/* DMA Traffic controls */
223#define DMA_TC_PER 0xFFC00B0C /* Traffic Control Periods Register */
224#define DMA_TC_CNT 0xFFC00B10 /* Traffic Control Current Counts Register */
225
226/* Alternate deprecated register names (below) provided for backwards code compatibility */
227#define DMA_TCPER 0xFFC00B0C /* Traffic Control Periods Register */
228#define DMA_TCCNT 0xFFC00B10 /* Traffic Control Current Counts Register */
229
230/* DMA Controller (0xFFC00C00 - 0xFFC00FFF) */
231#define DMA0_CONFIG 0xFFC00C08 /* DMA Channel 0 Configuration Register */
232#define DMA0_NEXT_DESC_PTR 0xFFC00C00 /* DMA Channel 0 Next Descriptor Pointer Register */
233#define DMA0_START_ADDR 0xFFC00C04 /* DMA Channel 0 Start Address Register */
234#define DMA0_X_COUNT 0xFFC00C10 /* DMA Channel 0 X Count Register */
235#define DMA0_Y_COUNT 0xFFC00C18 /* DMA Channel 0 Y Count Register */
236#define DMA0_X_MODIFY 0xFFC00C14 /* DMA Channel 0 X Modify Register */
237#define DMA0_Y_MODIFY 0xFFC00C1C /* DMA Channel 0 Y Modify Register */
238#define DMA0_CURR_DESC_PTR 0xFFC00C20 /* DMA Channel 0 Current Descriptor Pointer Register */
239#define DMA0_CURR_ADDR 0xFFC00C24 /* DMA Channel 0 Current Address Register */
240#define DMA0_CURR_X_COUNT 0xFFC00C30 /* DMA Channel 0 Current X Count Register */
241#define DMA0_CURR_Y_COUNT 0xFFC00C38 /* DMA Channel 0 Current Y Count Register */
242#define DMA0_IRQ_STATUS 0xFFC00C28 /* DMA Channel 0 Interrupt/Status Register */
243#define DMA0_PERIPHERAL_MAP 0xFFC00C2C /* DMA Channel 0 Peripheral Map Register */
244
245#define DMA1_CONFIG 0xFFC00C48 /* DMA Channel 1 Configuration Register */
246#define DMA1_NEXT_DESC_PTR 0xFFC00C40 /* DMA Channel 1 Next Descriptor Pointer Register */
247#define DMA1_START_ADDR 0xFFC00C44 /* DMA Channel 1 Start Address Register */
248#define DMA1_X_COUNT 0xFFC00C50 /* DMA Channel 1 X Count Register */
249#define DMA1_Y_COUNT 0xFFC00C58 /* DMA Channel 1 Y Count Register */
250#define DMA1_X_MODIFY 0xFFC00C54 /* DMA Channel 1 X Modify Register */
251#define DMA1_Y_MODIFY 0xFFC00C5C /* DMA Channel 1 Y Modify Register */
252#define DMA1_CURR_DESC_PTR 0xFFC00C60 /* DMA Channel 1 Current Descriptor Pointer Register */
253#define DMA1_CURR_ADDR 0xFFC00C64 /* DMA Channel 1 Current Address Register */
254#define DMA1_CURR_X_COUNT 0xFFC00C70 /* DMA Channel 1 Current X Count Register */
255#define DMA1_CURR_Y_COUNT 0xFFC00C78 /* DMA Channel 1 Current Y Count Register */
256#define DMA1_IRQ_STATUS 0xFFC00C68 /* DMA Channel 1 Interrupt/Status Register */
257#define DMA1_PERIPHERAL_MAP 0xFFC00C6C /* DMA Channel 1 Peripheral Map Register */
258
259#define DMA2_CONFIG 0xFFC00C88 /* DMA Channel 2 Configuration Register */
260#define DMA2_NEXT_DESC_PTR 0xFFC00C80 /* DMA Channel 2 Next Descriptor Pointer Register */
261#define DMA2_START_ADDR 0xFFC00C84 /* DMA Channel 2 Start Address Register */
262#define DMA2_X_COUNT 0xFFC00C90 /* DMA Channel 2 X Count Register */
263#define DMA2_Y_COUNT 0xFFC00C98 /* DMA Channel 2 Y Count Register */
264#define DMA2_X_MODIFY 0xFFC00C94 /* DMA Channel 2 X Modify Register */
265#define DMA2_Y_MODIFY 0xFFC00C9C /* DMA Channel 2 Y Modify Register */
266#define DMA2_CURR_DESC_PTR 0xFFC00CA0 /* DMA Channel 2 Current Descriptor Pointer Register */
267#define DMA2_CURR_ADDR 0xFFC00CA4 /* DMA Channel 2 Current Address Register */
268#define DMA2_CURR_X_COUNT 0xFFC00CB0 /* DMA Channel 2 Current X Count Register */
269#define DMA2_CURR_Y_COUNT 0xFFC00CB8 /* DMA Channel 2 Current Y Count Register */
270#define DMA2_IRQ_STATUS 0xFFC00CA8 /* DMA Channel 2 Interrupt/Status Register */
271#define DMA2_PERIPHERAL_MAP 0xFFC00CAC /* DMA Channel 2 Peripheral Map Register */
272
273#define DMA3_CONFIG 0xFFC00CC8 /* DMA Channel 3 Configuration Register */
274#define DMA3_NEXT_DESC_PTR 0xFFC00CC0 /* DMA Channel 3 Next Descriptor Pointer Register */
275#define DMA3_START_ADDR 0xFFC00CC4 /* DMA Channel 3 Start Address Register */
276#define DMA3_X_COUNT 0xFFC00CD0 /* DMA Channel 3 X Count Register */
277#define DMA3_Y_COUNT 0xFFC00CD8 /* DMA Channel 3 Y Count Register */
278#define DMA3_X_MODIFY 0xFFC00CD4 /* DMA Channel 3 X Modify Register */
279#define DMA3_Y_MODIFY 0xFFC00CDC /* DMA Channel 3 Y Modify Register */
280#define DMA3_CURR_DESC_PTR 0xFFC00CE0 /* DMA Channel 3 Current Descriptor Pointer Register */
281#define DMA3_CURR_ADDR 0xFFC00CE4 /* DMA Channel 3 Current Address Register */
282#define DMA3_CURR_X_COUNT 0xFFC00CF0 /* DMA Channel 3 Current X Count Register */
283#define DMA3_CURR_Y_COUNT 0xFFC00CF8 /* DMA Channel 3 Current Y Count Register */
284#define DMA3_IRQ_STATUS 0xFFC00CE8 /* DMA Channel 3 Interrupt/Status Register */
285#define DMA3_PERIPHERAL_MAP 0xFFC00CEC /* DMA Channel 3 Peripheral Map Register */
286
287#define DMA4_CONFIG 0xFFC00D08 /* DMA Channel 4 Configuration Register */
288#define DMA4_NEXT_DESC_PTR 0xFFC00D00 /* DMA Channel 4 Next Descriptor Pointer Register */
289#define DMA4_START_ADDR 0xFFC00D04 /* DMA Channel 4 Start Address Register */
290#define DMA4_X_COUNT 0xFFC00D10 /* DMA Channel 4 X Count Register */
291#define DMA4_Y_COUNT 0xFFC00D18 /* DMA Channel 4 Y Count Register */
292#define DMA4_X_MODIFY 0xFFC00D14 /* DMA Channel 4 X Modify Register */
293#define DMA4_Y_MODIFY 0xFFC00D1C /* DMA Channel 4 Y Modify Register */
294#define DMA4_CURR_DESC_PTR 0xFFC00D20 /* DMA Channel 4 Current Descriptor Pointer Register */
295#define DMA4_CURR_ADDR 0xFFC00D24 /* DMA Channel 4 Current Address Register */
296#define DMA4_CURR_X_COUNT 0xFFC00D30 /* DMA Channel 4 Current X Count Register */
297#define DMA4_CURR_Y_COUNT 0xFFC00D38 /* DMA Channel 4 Current Y Count Register */
298#define DMA4_IRQ_STATUS 0xFFC00D28 /* DMA Channel 4 Interrupt/Status Register */
299#define DMA4_PERIPHERAL_MAP 0xFFC00D2C /* DMA Channel 4 Peripheral Map Register */
300
301#define DMA5_CONFIG 0xFFC00D48 /* DMA Channel 5 Configuration Register */
302#define DMA5_NEXT_DESC_PTR 0xFFC00D40 /* DMA Channel 5 Next Descriptor Pointer Register */
303#define DMA5_START_ADDR 0xFFC00D44 /* DMA Channel 5 Start Address Register */
304#define DMA5_X_COUNT 0xFFC00D50 /* DMA Channel 5 X Count Register */
305#define DMA5_Y_COUNT 0xFFC00D58 /* DMA Channel 5 Y Count Register */
306#define DMA5_X_MODIFY 0xFFC00D54 /* DMA Channel 5 X Modify Register */
307#define DMA5_Y_MODIFY 0xFFC00D5C /* DMA Channel 5 Y Modify Register */
308#define DMA5_CURR_DESC_PTR 0xFFC00D60 /* DMA Channel 5 Current Descriptor Pointer Register */
309#define DMA5_CURR_ADDR 0xFFC00D64 /* DMA Channel 5 Current Address Register */
310#define DMA5_CURR_X_COUNT 0xFFC00D70 /* DMA Channel 5 Current X Count Register */
311#define DMA5_CURR_Y_COUNT 0xFFC00D78 /* DMA Channel 5 Current Y Count Register */
312#define DMA5_IRQ_STATUS 0xFFC00D68 /* DMA Channel 5 Interrupt/Status Register */
313#define DMA5_PERIPHERAL_MAP 0xFFC00D6C /* DMA Channel 5 Peripheral Map Register */
314
315#define DMA6_CONFIG 0xFFC00D88 /* DMA Channel 6 Configuration Register */
316#define DMA6_NEXT_DESC_PTR 0xFFC00D80 /* DMA Channel 6 Next Descriptor Pointer Register */
317#define DMA6_START_ADDR 0xFFC00D84 /* DMA Channel 6 Start Address Register */
318#define DMA6_X_COUNT 0xFFC00D90 /* DMA Channel 6 X Count Register */
319#define DMA6_Y_COUNT 0xFFC00D98 /* DMA Channel 6 Y Count Register */
320#define DMA6_X_MODIFY 0xFFC00D94 /* DMA Channel 6 X Modify Register */
321#define DMA6_Y_MODIFY 0xFFC00D9C /* DMA Channel 6 Y Modify Register */
322#define DMA6_CURR_DESC_PTR 0xFFC00DA0 /* DMA Channel 6 Current Descriptor Pointer Register */
323#define DMA6_CURR_ADDR 0xFFC00DA4 /* DMA Channel 6 Current Address Register */
324#define DMA6_CURR_X_COUNT 0xFFC00DB0 /* DMA Channel 6 Current X Count Register */
325#define DMA6_CURR_Y_COUNT 0xFFC00DB8 /* DMA Channel 6 Current Y Count Register */
326#define DMA6_IRQ_STATUS 0xFFC00DA8 /* DMA Channel 6 Interrupt/Status Register */
327#define DMA6_PERIPHERAL_MAP 0xFFC00DAC /* DMA Channel 6 Peripheral Map Register */
328
329#define DMA7_CONFIG 0xFFC00DC8 /* DMA Channel 7 Configuration Register */
330#define DMA7_NEXT_DESC_PTR 0xFFC00DC0 /* DMA Channel 7 Next Descriptor Pointer Register */
331#define DMA7_START_ADDR 0xFFC00DC4 /* DMA Channel 7 Start Address Register */
332#define DMA7_X_COUNT 0xFFC00DD0 /* DMA Channel 7 X Count Register */
333#define DMA7_Y_COUNT 0xFFC00DD8 /* DMA Channel 7 Y Count Register */
334#define DMA7_X_MODIFY 0xFFC00DD4 /* DMA Channel 7 X Modify Register */
335#define DMA7_Y_MODIFY 0xFFC00DDC /* DMA Channel 7 Y Modify Register */
336#define DMA7_CURR_DESC_PTR 0xFFC00DE0 /* DMA Channel 7 Current Descriptor Pointer Register */
337#define DMA7_CURR_ADDR 0xFFC00DE4 /* DMA Channel 7 Current Address Register */
338#define DMA7_CURR_X_COUNT 0xFFC00DF0 /* DMA Channel 7 Current X Count Register */
339#define DMA7_CURR_Y_COUNT 0xFFC00DF8 /* DMA Channel 7 Current Y Count Register */
340#define DMA7_IRQ_STATUS 0xFFC00DE8 /* DMA Channel 7 Interrupt/Status Register */
341#define DMA7_PERIPHERAL_MAP 0xFFC00DEC /* DMA Channel 7 Peripheral Map Register */
342
343#define MDMA_D1_CONFIG 0xFFC00E88 /* MemDMA Stream 1 Destination Configuration Register */
344#define MDMA_D1_NEXT_DESC_PTR 0xFFC00E80 /* MemDMA Stream 1 Destination Next Descriptor Pointer Register */
345#define MDMA_D1_START_ADDR 0xFFC00E84 /* MemDMA Stream 1 Destination Start Address Register */
346#define MDMA_D1_X_COUNT 0xFFC00E90 /* MemDMA Stream 1 Destination X Count Register */
347#define MDMA_D1_Y_COUNT 0xFFC00E98 /* MemDMA Stream 1 Destination Y Count Register */
348#define MDMA_D1_X_MODIFY 0xFFC00E94 /* MemDMA Stream 1 Destination X Modify Register */
349#define MDMA_D1_Y_MODIFY 0xFFC00E9C /* MemDMA Stream 1 Destination Y Modify Register */
350#define MDMA_D1_CURR_DESC_PTR 0xFFC00EA0 /* MemDMA Stream 1 Destination Current Descriptor Pointer Register */
351#define MDMA_D1_CURR_ADDR 0xFFC00EA4 /* MemDMA Stream 1 Destination Current Address Register */
352#define MDMA_D1_CURR_X_COUNT 0xFFC00EB0 /* MemDMA Stream 1 Destination Current X Count Register */
353#define MDMA_D1_CURR_Y_COUNT 0xFFC00EB8 /* MemDMA Stream 1 Destination Current Y Count Register */
354#define MDMA_D1_IRQ_STATUS 0xFFC00EA8 /* MemDMA Stream 1 Destination Interrupt/Status Register */
355#define MDMA_D1_PERIPHERAL_MAP 0xFFC00EAC /* MemDMA Stream 1 Destination Peripheral Map Register */
356
357#define MDMA_S1_CONFIG 0xFFC00EC8 /* MemDMA Stream 1 Source Configuration Register */
358#define MDMA_S1_NEXT_DESC_PTR 0xFFC00EC0 /* MemDMA Stream 1 Source Next Descriptor Pointer Register */
359#define MDMA_S1_START_ADDR 0xFFC00EC4 /* MemDMA Stream 1 Source Start Address Register */
360#define MDMA_S1_X_COUNT 0xFFC00ED0 /* MemDMA Stream 1 Source X Count Register */
361#define MDMA_S1_Y_COUNT 0xFFC00ED8 /* MemDMA Stream 1 Source Y Count Register */
362#define MDMA_S1_X_MODIFY 0xFFC00ED4 /* MemDMA Stream 1 Source X Modify Register */
363#define MDMA_S1_Y_MODIFY 0xFFC00EDC /* MemDMA Stream 1 Source Y Modify Register */
364#define MDMA_S1_CURR_DESC_PTR 0xFFC00EE0 /* MemDMA Stream 1 Source Current Descriptor Pointer Register */
365#define MDMA_S1_CURR_ADDR 0xFFC00EE4 /* MemDMA Stream 1 Source Current Address Register */
366#define MDMA_S1_CURR_X_COUNT 0xFFC00EF0 /* MemDMA Stream 1 Source Current X Count Register */
367#define MDMA_S1_CURR_Y_COUNT 0xFFC00EF8 /* MemDMA Stream 1 Source Current Y Count Register */
368#define MDMA_S1_IRQ_STATUS 0xFFC00EE8 /* MemDMA Stream 1 Source Interrupt/Status Register */
369#define MDMA_S1_PERIPHERAL_MAP 0xFFC00EEC /* MemDMA Stream 1 Source Peripheral Map Register */
370
371#define MDMA_D0_CONFIG 0xFFC00E08 /* MemDMA Stream 0 Destination Configuration Register */
372#define MDMA_D0_NEXT_DESC_PTR 0xFFC00E00 /* MemDMA Stream 0 Destination Next Descriptor Pointer Register */
373#define MDMA_D0_START_ADDR 0xFFC00E04 /* MemDMA Stream 0 Destination Start Address Register */
374#define MDMA_D0_X_COUNT 0xFFC00E10 /* MemDMA Stream 0 Destination X Count Register */
375#define MDMA_D0_Y_COUNT 0xFFC00E18 /* MemDMA Stream 0 Destination Y Count Register */
376#define MDMA_D0_X_MODIFY 0xFFC00E14 /* MemDMA Stream 0 Destination X Modify Register */
377#define MDMA_D0_Y_MODIFY 0xFFC00E1C /* MemDMA Stream 0 Destination Y Modify Register */
378#define MDMA_D0_CURR_DESC_PTR 0xFFC00E20 /* MemDMA Stream 0 Destination Current Descriptor Pointer Register */
379#define MDMA_D0_CURR_ADDR 0xFFC00E24 /* MemDMA Stream 0 Destination Current Address Register */
380#define MDMA_D0_CURR_X_COUNT 0xFFC00E30 /* MemDMA Stream 0 Destination Current X Count Register */
381#define MDMA_D0_CURR_Y_COUNT 0xFFC00E38 /* MemDMA Stream 0 Destination Current Y Count Register */
382#define MDMA_D0_IRQ_STATUS 0xFFC00E28 /* MemDMA Stream 0 Destination Interrupt/Status Register */
383#define MDMA_D0_PERIPHERAL_MAP 0xFFC00E2C /* MemDMA Stream 0 Destination Peripheral Map Register */
384
385#define MDMA_S0_CONFIG 0xFFC00E48 /* MemDMA Stream 0 Source Configuration Register */
386#define MDMA_S0_NEXT_DESC_PTR 0xFFC00E40 /* MemDMA Stream 0 Source Next Descriptor Pointer Register */
387#define MDMA_S0_START_ADDR 0xFFC00E44 /* MemDMA Stream 0 Source Start Address Register */
388#define MDMA_S0_X_COUNT 0xFFC00E50 /* MemDMA Stream 0 Source X Count Register */
389#define MDMA_S0_Y_COUNT 0xFFC00E58 /* MemDMA Stream 0 Source Y Count Register */
390#define MDMA_S0_X_MODIFY 0xFFC00E54 /* MemDMA Stream 0 Source X Modify Register */
391#define MDMA_S0_Y_MODIFY 0xFFC00E5C /* MemDMA Stream 0 Source Y Modify Register */
392#define MDMA_S0_CURR_DESC_PTR 0xFFC00E60 /* MemDMA Stream 0 Source Current Descriptor Pointer Register */
393#define MDMA_S0_CURR_ADDR 0xFFC00E64 /* MemDMA Stream 0 Source Current Address Register */
394#define MDMA_S0_CURR_X_COUNT 0xFFC00E70 /* MemDMA Stream 0 Source Current X Count Register */
395#define MDMA_S0_CURR_Y_COUNT 0xFFC00E78 /* MemDMA Stream 0 Source Current Y Count Register */
396#define MDMA_S0_IRQ_STATUS 0xFFC00E68 /* MemDMA Stream 0 Source Interrupt/Status Register */
397#define MDMA_S0_PERIPHERAL_MAP 0xFFC00E6C /* MemDMA Stream 0 Source Peripheral Map Register */
398
399/* Parallel Peripheral Interface (PPI) (0xFFC01000 - 0xFFC010FF) */
400
401#define PPI_CONTROL 0xFFC01000 /* PPI Control Register */
402#define PPI_STATUS 0xFFC01004 /* PPI Status Register */
403#define PPI_COUNT 0xFFC01008 /* PPI Transfer Count Register */
404#define PPI_DELAY 0xFFC0100C /* PPI Delay Count Register */
405#define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */
406
407/*********************************************************************************** */
408/* System MMR Register Bits */
409/******************************************************************************* */
410
411/* ********************* PLL AND RESET MASKS ************************ */
412
413/* PLL_CTL Masks */
414#define PLL_CLKIN 0x0000 /* Pass CLKIN to PLL */
415#define PLL_CLKIN_DIV2 0x0001 /* Pass CLKIN/2 to PLL */
416#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
417#define PLL_OFF 0x0002 /* Shut off PLL clocks */
418#define STOPCK_OFF 0x0008 /* Core clock off */
419#define STOPCK 0x0008 /* Core Clock Off */
420#define PDWN 0x0020 /* Put the PLL in a Deep Sleep state */
421#if !defined(__ADSPBF538__)
422/* this file is included in defBF538.h but IN_DELAY/OUT_DELAY are different */
423# define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
424# define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
425#endif
426#define BYPASS 0x0100 /* Bypass the PLL */
427/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
428#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
429
430/* PLL_DIV Masks */
431#define SSEL 0x000F /* System Select */
432#define CSEL 0x0030 /* Core Select */
433
434#define SCLK_DIV(x) (x) /* SCLK = VCO / x */
435
436#define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */
437#define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */
438#define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */
439#define CCLK_DIV8 0x00000030 /* CCLK = VCO / 8 */
440/* PLL_DIV Macros */
441#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
442
443/* PLL_STAT Masks */
444#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
445#define FULL_ON 0x0002 /* Processor In Full On Mode */
446#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
447#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
448
449/* VR_CTL Masks */
450#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
451#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
452#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
453#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
454#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
455
456#define GAIN 0x000C /* Voltage Level Gain */
457#define GAIN_5 0x0000 /* GAIN = 5 */
458#define GAIN_10 0x0004 /* GAIN = 10 */
459#define GAIN_20 0x0008 /* GAIN = 20 */
460#define GAIN_50 0x000C /* GAIN = 50 */
461
462#define VLEV 0x00F0 /* Internal Voltage Level */
463#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
464#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
465#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
466#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
467#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
468#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
469#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
470#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
471#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
472#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
473
474#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
475#define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */
476
477/* CHIPID Masks */
478#define CHIPID_VERSION 0xF0000000
479#define CHIPID_FAMILY 0x0FFFF000
480#define CHIPID_MANUFACTURE 0x00000FFE
481
482/* SWRST Mask */
483#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
484#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
485#define RESET_DOUBLE 0x2000 /* SW Reset Generated By Core Double-Fault */
486#define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */
487#define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */
488
489/* SYSCR Masks */
490#define BMODE 0x0006 /* Boot Mode - Latched During HW Reset From Mode Pins */
491#define NOBOOT 0x0010 /* Execute From L1 or ASYNC Bank 0 When BMODE = 0 */
492
493/* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */
494
495 /* SIC_IAR0 Masks */
496
497#define P0_IVG(x) ((x)-7) /* Peripheral #0 assigned IVG #x */
498#define P1_IVG(x) ((x)-7) << 0x4 /* Peripheral #1 assigned IVG #x */
499#define P2_IVG(x) ((x)-7) << 0x8 /* Peripheral #2 assigned IVG #x */
500#define P3_IVG(x) ((x)-7) << 0xC /* Peripheral #3 assigned IVG #x */
501#define P4_IVG(x) ((x)-7) << 0x10 /* Peripheral #4 assigned IVG #x */
502#define P5_IVG(x) ((x)-7) << 0x14 /* Peripheral #5 assigned IVG #x */
503#define P6_IVG(x) ((x)-7) << 0x18 /* Peripheral #6 assigned IVG #x */
504#define P7_IVG(x) ((x)-7) << 0x1C /* Peripheral #7 assigned IVG #x */
505
506/* SIC_IAR1 Masks */
507
508#define P8_IVG(x) ((x)-7) /* Peripheral #8 assigned IVG #x */
509#define P9_IVG(x) ((x)-7) << 0x4 /* Peripheral #9 assigned IVG #x */
510#define P10_IVG(x) ((x)-7) << 0x8 /* Peripheral #10 assigned IVG #x */
511#define P11_IVG(x) ((x)-7) << 0xC /* Peripheral #11 assigned IVG #x */
512#define P12_IVG(x) ((x)-7) << 0x10 /* Peripheral #12 assigned IVG #x */
513#define P13_IVG(x) ((x)-7) << 0x14 /* Peripheral #13 assigned IVG #x */
514#define P14_IVG(x) ((x)-7) << 0x18 /* Peripheral #14 assigned IVG #x */
515#define P15_IVG(x) ((x)-7) << 0x1C /* Peripheral #15 assigned IVG #x */
516
517/* SIC_IAR2 Masks */
518#define P16_IVG(x) ((x)-7) /* Peripheral #16 assigned IVG #x */
519#define P17_IVG(x) ((x)-7) << 0x4 /* Peripheral #17 assigned IVG #x */
520#define P18_IVG(x) ((x)-7) << 0x8 /* Peripheral #18 assigned IVG #x */
521#define P19_IVG(x) ((x)-7) << 0xC /* Peripheral #19 assigned IVG #x */
522#define P20_IVG(x) ((x)-7) << 0x10 /* Peripheral #20 assigned IVG #x */
523#define P21_IVG(x) ((x)-7) << 0x14 /* Peripheral #21 assigned IVG #x */
524#define P22_IVG(x) ((x)-7) << 0x18 /* Peripheral #22 assigned IVG #x */
525#define P23_IVG(x) ((x)-7) << 0x1C /* Peripheral #23 assigned IVG #x */
526
527/* SIC_IMASK Masks */
528#define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
529#define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
530#define SIC_MASK(x) (1 << (x)) /* Mask Peripheral #x interrupt */
531#define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << (x))) /* Unmask Peripheral #x interrupt */
532
533/* SIC_IWR Masks */
534#define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
535#define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
536#define IWR_ENABLE(x) (1 << (x)) /* Wakeup Enable Peripheral #x */
537#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << (x))) /* Wakeup Disable Peripheral #x */
538
539/* ***************************** UART CONTROLLER MASKS ********************** */
540
541/* UART_LCR Register */
542
543#define DLAB 0x80
544#define SB 0x40
545#define STP 0x20
546#define EPS 0x10
547#define PEN 0x08
548#define STB 0x04
549#define WLS(x) ((x-5) & 0x03)
550
551#define DLAB_P 0x07
552#define SB_P 0x06
553#define STP_P 0x05
554#define EPS_P 0x04
555#define PEN_P 0x03
556#define STB_P 0x02
557#define WLS_P1 0x01
558#define WLS_P0 0x00
559
560/* UART_MCR Register */
561#define LOOP_ENA 0x10
562#define LOOP_ENA_P 0x04
563
564/* UART_LSR Register */
565#define TEMT 0x40
566#define THRE 0x20
567#define BI 0x10
568#define FE 0x08
569#define PE 0x04
570#define OE 0x02
571#define DR 0x01
572
573#define TEMP_P 0x06
574#define THRE_P 0x05
575#define BI_P 0x04
576#define FE_P 0x03
577#define PE_P 0x02
578#define OE_P 0x01
579#define DR_P 0x00
580
581/* UART_IER Register */
582#define ELSI 0x04
583#define ETBEI 0x02
584#define ERBFI 0x01
585
586#define ELSI_P 0x02
587#define ETBEI_P 0x01
588#define ERBFI_P 0x00
589
590/* UART_IIR Register */
591#define STATUS(x) ((x << 1) & 0x06)
592#define NINT 0x01
593#define STATUS_P1 0x02
594#define STATUS_P0 0x01
595#define NINT_P 0x00
596#define IIR_TX_READY 0x02 /* UART_THR empty */
597#define IIR_RX_READY 0x04 /* Receive data ready */
598#define IIR_LINE_CHANGE 0x06 /* Receive line status */
599#define IIR_STATUS 0x06
600
601/* UART_GCTL Register */
602#define FFE 0x20
603#define FPE 0x10
604#define RPOLC 0x08
605#define TPOLC 0x04
606#define IREN 0x02
607#define UCEN 0x01
608
609#define FFE_P 0x05
610#define FPE_P 0x04
611#define RPOLC_P 0x03
612#define TPOLC_P 0x02
613#define IREN_P 0x01
614#define UCEN_P 0x00
615
616/* ********** SERIAL PORT MASKS ********************** */
617
618/* SPORTx_TCR1 Masks */
619#define TSPEN 0x0001 /* TX enable */
620#define ITCLK 0x0002 /* Internal TX Clock Select */
621#define TDTYPE 0x000C /* TX Data Formatting Select */
622#define DTYPE_NORM 0x0000 /* Data Format Normal */
623#define DTYPE_ULAW 0x0008 /* Compand Using u-Law */
624#define DTYPE_ALAW 0x000C /* Compand Using A-Law */
625#define TLSBIT 0x0010 /* TX Bit Order */
626#define ITFS 0x0200 /* Internal TX Frame Sync Select */
627#define TFSR 0x0400 /* TX Frame Sync Required Select */
628#define DITFS 0x0800 /* Data Independent TX Frame Sync Select */
629#define LTFS 0x1000 /* Low TX Frame Sync Select */
630#define LATFS 0x2000 /* Late TX Frame Sync Select */
631#define TCKFE 0x4000 /* TX Clock Falling Edge Select */
632
633/* SPORTx_TCR2 Masks */
634#if defined(__ADSPBF531__) || defined(__ADSPBF532__) || \
635 defined(__ADSPBF533__)
636# define SLEN 0x001F /*TX Word Length */
637#else
638# define SLEN(x) ((x)&0x1F) /* SPORT TX Word Length (2 - 31) */
639#endif
640#define TXSE 0x0100 /*TX Secondary Enable */
641#define TSFSE 0x0200 /*TX Stereo Frame Sync Enable */
642#define TRFST 0x0400 /*TX Right-First Data Order */
643
644/* SPORTx_RCR1 Masks */
645#define RSPEN 0x0001 /* RX enable */
646#define IRCLK 0x0002 /* Internal RX Clock Select */
647#define RDTYPE 0x000C /* RX Data Formatting Select */
648#define DTYPE_NORM 0x0000 /* no companding */
649#define DTYPE_ULAW 0x0008 /* Compand Using u-Law */
650#define DTYPE_ALAW 0x000C /* Compand Using A-Law */
651#define RLSBIT 0x0010 /* RX Bit Order */
652#define IRFS 0x0200 /* Internal RX Frame Sync Select */
653#define RFSR 0x0400 /* RX Frame Sync Required Select */
654#define LRFS 0x1000 /* Low RX Frame Sync Select */
655#define LARFS 0x2000 /* Late RX Frame Sync Select */
656#define RCKFE 0x4000 /* RX Clock Falling Edge Select */
657
658/* SPORTx_RCR2 Masks */
659/* SLEN defined above */
660#define RXSE 0x0100 /*RX Secondary Enable */
661#define RSFSE 0x0200 /*RX Stereo Frame Sync Enable */
662#define RRFST 0x0400 /*Right-First Data Order */
663
664/*SPORTx_STAT Masks */
665#define RXNE 0x0001 /*RX FIFO Not Empty Status */
666#define RUVF 0x0002 /*RX Underflow Status */
667#define ROVF 0x0004 /*RX Overflow Status */
668#define TXF 0x0008 /*TX FIFO Full Status */
669#define TUVF 0x0010 /*TX Underflow Status */
670#define TOVF 0x0020 /*TX Overflow Status */
671#define TXHRE 0x0040 /*TX Hold Register Empty */
672
673/*SPORTx_MCMC1 Masks */
674#define SP_WSIZE 0x0000F000 /*Multichannel Window Size Field */
675#define SP_WOFF 0x000003FF /*Multichannel Window Offset Field */
676/* SPORTx_MCMC1 Macros */
677#define SET_SP_WOFF(x) ((x) & 0x3FF) /* Multichannel Window Offset Field */
678/* Only use SET_WSIZE Macro With Logic OR While Setting Lower Order Bits */
679#define SET_SP_WSIZE(x) (((((x)>>0x3)-1)&0xF) << 0xC) /* Multichannel Window Size = (x/8)-1 */
680
681/*SPORTx_MCMC2 Masks */
682#define MCCRM 0x00000003 /*Multichannel Clock Recovery Mode */
683#define REC_BYPASS 0x0000 /* Bypass Mode (No Clock Recovery) */
684#define REC_2FROM4 0x0002 /* Recover 2 MHz Clock from 4 MHz Clock */
685#define REC_8FROM16 0x0003 /* Recover 8 MHz Clock from 16 MHz Clock */
686#define MCDTXPE 0x00000004 /*Multichannel DMA Transmit Packing */
687#define MCDRXPE 0x00000008 /*Multichannel DMA Receive Packing */
688#define MCMEN 0x00000010 /*Multichannel Frame Mode Enable */
689#define FSDR 0x00000080 /*Multichannel Frame Sync to Data Relationship */
690#define MFD 0x0000F000 /*Multichannel Frame Delay */
691#define MFD_0 0x0000 /* Multichannel Frame Delay = 0 */
692#define MFD_1 0x1000 /* Multichannel Frame Delay = 1 */
693#define MFD_2 0x2000 /* Multichannel Frame Delay = 2 */
694#define MFD_3 0x3000 /* Multichannel Frame Delay = 3 */
695#define MFD_4 0x4000 /* Multichannel Frame Delay = 4 */
696#define MFD_5 0x5000 /* Multichannel Frame Delay = 5 */
697#define MFD_6 0x6000 /* Multichannel Frame Delay = 6 */
698#define MFD_7 0x7000 /* Multichannel Frame Delay = 7 */
699#define MFD_8 0x8000 /* Multichannel Frame Delay = 8 */
700#define MFD_9 0x9000 /* Multichannel Frame Delay = 9 */
701#define MFD_10 0xA000 /* Multichannel Frame Delay = 10 */
702#define MFD_11 0xB000 /* Multichannel Frame Delay = 11 */
703#define MFD_12 0xC000 /* Multichannel Frame Delay = 12 */
704#define MFD_13 0xD000 /* Multichannel Frame Delay = 13 */
705#define MFD_14 0xE000 /* Multichannel Frame Delay = 14 */
706#define MFD_15 0xF000 /* Multichannel Frame Delay = 15 */
707
708/* ********* PARALLEL PERIPHERAL INTERFACE (PPI) MASKS **************** */
709
710/* PPI_CONTROL Masks */
711#define PORT_EN 0x00000001 /* PPI Port Enable */
712#define PORT_DIR 0x00000002 /* PPI Port Direction */
713#define XFR_TYPE 0x0000000C /* PPI Transfer Type */
714#define PORT_CFG 0x00000030 /* PPI Port Configuration */
715#define FLD_SEL 0x00000040 /* PPI Active Field Select */
716#define PACK_EN 0x00000080 /* PPI Packing Mode */
717#define DMA32 0x00000100 /* PPI 32-bit DMA Enable */
718#define SKIP_EN 0x00000200 /* PPI Skip Element Enable */
719#define SKIP_EO 0x00000400 /* PPI Skip Even/Odd Elements */
720#define DLENGTH 0x00003800 /* PPI Data Length */
721#define DLEN_8 0x0000 /* Data Length = 8 Bits */
722#define DLEN_10 0x0800 /* Data Length = 10 Bits */
723#define DLEN_11 0x1000 /* Data Length = 11 Bits */
724#define DLEN_12 0x1800 /* Data Length = 12 Bits */
725#define DLEN_13 0x2000 /* Data Length = 13 Bits */
726#define DLEN_14 0x2800 /* Data Length = 14 Bits */
727#define DLEN_15 0x3000 /* Data Length = 15 Bits */
728#define DLEN_16 0x3800 /* Data Length = 16 Bits */
729#define DLEN(x) (((x-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */
730#define POL 0x0000C000 /* PPI Signal Polarities */
731#define POLC 0x4000 /* PPI Clock Polarity */
732#define POLS 0x8000 /* PPI Frame Sync Polarity */
733
734/* PPI_STATUS Masks */
735#define FLD 0x00000400 /* Field Indicator */
736#define FT_ERR 0x00000800 /* Frame Track Error */
737#define OVR 0x00001000 /* FIFO Overflow Error */
738#define UNDR 0x00002000 /* FIFO Underrun Error */
739#define ERR_DET 0x00004000 /* Error Detected Indicator */
740#define ERR_NCOR 0x00008000 /* Error Not Corrected Indicator */
741
742/* ********** DMA CONTROLLER MASKS *********************8 */
743
744/*DMAx_CONFIG, MDMA_yy_CONFIG Masks */
745#define DMAEN 0x00000001 /* Channel Enable */
746#define WNR 0x00000002 /* Channel Direction (W/R*) */
747#define WDSIZE_8 0x00000000 /* Word Size 8 bits */
748#define WDSIZE_16 0x00000004 /* Word Size 16 bits */
749#define WDSIZE_32 0x00000008 /* Word Size 32 bits */
750#define DMA2D 0x00000010 /* 2D/1D* Mode */
751#define RESTART 0x00000020 /* Restart */
752#define DI_SEL 0x00000040 /* Data Interrupt Select */
753#define DI_EN 0x00000080 /* Data Interrupt Enable */
754#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
755#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
756#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
757#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
758#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
759#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
760#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
761#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
762#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
763#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
764#define NDSIZE 0x00000900 /* Next Descriptor Size */
765#define DMAFLOW 0x00007000 /* Flow Control */
766#define DMAFLOW_STOP 0x0000 /* Stop Mode */
767#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
768#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
769#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
770#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
771
772#define DMAEN_P 0 /* Channel Enable */
773#define WNR_P 1 /* Channel Direction (W/R*) */
774#define DMA2D_P 4 /* 2D/1D* Mode */
775#define RESTART_P 5 /* Restart */
776#define DI_SEL_P 6 /* Data Interrupt Select */
777#define DI_EN_P 7 /* Data Interrupt Enable */
778
779/*DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
780
781#define DMA_DONE 0x00000001 /* DMA Done Indicator */
782#define DMA_ERR 0x00000002 /* DMA Error Indicator */
783#define DFETCH 0x00000004 /* Descriptor Fetch Indicator */
784#define DMA_RUN 0x00000008 /* DMA Running Indicator */
785
786#define DMA_DONE_P 0 /* DMA Done Indicator */
787#define DMA_ERR_P 1 /* DMA Error Indicator */
788#define DFETCH_P 2 /* Descriptor Fetch Indicator */
789#define DMA_RUN_P 3 /* DMA Running Indicator */
790
791/*DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
792
793#define CTYPE 0x00000040 /* DMA Channel Type Indicator */
794#define CTYPE_P 6 /* DMA Channel Type Indicator BIT POSITION */
795#define PCAP8 0x00000080 /* DMA 8-bit Operation Indicator */
796#define PCAP16 0x00000100 /* DMA 16-bit Operation Indicator */
797#define PCAP32 0x00000200 /* DMA 32-bit Operation Indicator */
798#define PCAPWR 0x00000400 /* DMA Write Operation Indicator */
799#define PCAPRD 0x00000800 /* DMA Read Operation Indicator */
800#define PMAP 0x00007000 /* DMA Peripheral Map Field */
801
802#define PMAP_PPI 0x0000 /* PMAP PPI Port DMA */
803#define PMAP_SPORT0RX 0x1000 /* PMAP SPORT0 Receive DMA */
804#define PMAP_SPORT0TX 0x2000 /* PMAP SPORT0 Transmit DMA */
805#define PMAP_SPORT1RX 0x3000 /* PMAP SPORT1 Receive DMA */
806#define PMAP_SPORT1TX 0x4000 /* PMAP SPORT1 Transmit DMA */
807#define PMAP_SPI 0x5000 /* PMAP SPI DMA */
808#define PMAP_UARTRX 0x6000 /* PMAP UART Receive DMA */
809#define PMAP_UARTTX 0x7000 /* PMAP UART Transmit DMA */
810
811/* ************* GENERAL PURPOSE TIMER MASKS ******************** */
812
813/* PWM Timer bit definitions */
814
815/* TIMER_ENABLE Register */
816#define TIMEN0 0x0001
817#define TIMEN1 0x0002
818#define TIMEN2 0x0004
819
820#define TIMEN0_P 0x00
821#define TIMEN1_P 0x01
822#define TIMEN2_P 0x02
823
824/* TIMER_DISABLE Register */
825#define TIMDIS0 0x0001
826#define TIMDIS1 0x0002
827#define TIMDIS2 0x0004
828
829#define TIMDIS0_P 0x00
830#define TIMDIS1_P 0x01
831#define TIMDIS2_P 0x02
832
833/* TIMER_STATUS Register */
834#define TIMIL0 0x0001
835#define TIMIL1 0x0002
836#define TIMIL2 0x0004
837#define TOVF_ERR0 0x0010 /* Timer 0 Counter Overflow */
838#define TOVF_ERR1 0x0020 /* Timer 1 Counter Overflow */
839#define TOVF_ERR2 0x0040 /* Timer 2 Counter Overflow */
840#define TRUN0 0x1000
841#define TRUN1 0x2000
842#define TRUN2 0x4000
843
844#define TIMIL0_P 0x00
845#define TIMIL1_P 0x01
846#define TIMIL2_P 0x02
847#define TOVF_ERR0_P 0x04
848#define TOVF_ERR1_P 0x05
849#define TOVF_ERR2_P 0x06
850#define TRUN0_P 0x0C
851#define TRUN1_P 0x0D
852#define TRUN2_P 0x0E
853
854/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
855#define TOVL_ERR0 TOVF_ERR0
856#define TOVL_ERR1 TOVF_ERR1
857#define TOVL_ERR2 TOVF_ERR2
858#define TOVL_ERR0_P TOVF_ERR0_P
859#define TOVL_ERR1_P TOVF_ERR1_P
860#define TOVL_ERR2_P TOVF_ERR2_P
861
862/* TIMERx_CONFIG Registers */
863#define PWM_OUT 0x0001
864#define WDTH_CAP 0x0002
865#define EXT_CLK 0x0003
866#define PULSE_HI 0x0004
867#define PERIOD_CNT 0x0008
868#define IRQ_ENA 0x0010
869#define TIN_SEL 0x0020
870#define OUT_DIS 0x0040
871#define CLK_SEL 0x0080
872#define TOGGLE_HI 0x0100
873#define EMU_RUN 0x0200
874#define ERR_TYP(x) ((x & 0x03) << 14)
875
876#define TMODE_P0 0x00
877#define TMODE_P1 0x01
878#define PULSE_HI_P 0x02
879#define PERIOD_CNT_P 0x03
880#define IRQ_ENA_P 0x04
881#define TIN_SEL_P 0x05
882#define OUT_DIS_P 0x06
883#define CLK_SEL_P 0x07
884#define TOGGLE_HI_P 0x08
885#define EMU_RUN_P 0x09
886#define ERR_TYP_P0 0x0E
887#define ERR_TYP_P1 0x0F
888
889/*/ ****************** PROGRAMMABLE FLAG MASKS ********************* */
890
891/* General Purpose IO (0xFFC00700 - 0xFFC007FF) Masks */
892#define PF0 0x0001
893#define PF1 0x0002
894#define PF2 0x0004
895#define PF3 0x0008
896#define PF4 0x0010
897#define PF5 0x0020
898#define PF6 0x0040
899#define PF7 0x0080
900#define PF8 0x0100
901#define PF9 0x0200
902#define PF10 0x0400
903#define PF11 0x0800
904#define PF12 0x1000
905#define PF13 0x2000
906#define PF14 0x4000
907#define PF15 0x8000
908
909/* General Purpose IO (0xFFC00700 - 0xFFC007FF) BIT POSITIONS */
910#define PF0_P 0
911#define PF1_P 1
912#define PF2_P 2
913#define PF3_P 3
914#define PF4_P 4
915#define PF5_P 5
916#define PF6_P 6
917#define PF7_P 7
918#define PF8_P 8
919#define PF9_P 9
920#define PF10_P 10
921#define PF11_P 11
922#define PF12_P 12
923#define PF13_P 13
924#define PF14_P 14
925#define PF15_P 15
926
927/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS **************** */
928
929/* SPI_CTL Masks */
930#define TIMOD 0x00000003 /* Transfer initiation mode and interrupt generation */
931#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
932#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
933#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
934#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
935#define SZ 0x00000004 /* Send Zero (=0) or last (=1) word when TDBR empty. */
936#define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */
937#define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */
938#define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */
939#define SIZE 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */
940#define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */
941#define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */
942#define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */
943#define MSTR 0x00001000 /* Configures SPI as master (=1) or slave (=0) */
944#define WOM 0x00002000 /* Open drain (=1) data output enable (for MOSI and MISO) */
945#define SPE 0x00004000 /* SPI module enable (=1), disable (=0) */
946
947/* SPI_FLG Masks */
948#define FLS1 0x00000002 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
949#define FLS2 0x00000004 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
950#define FLS3 0x00000008 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
951#define FLS4 0x00000010 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
952#define FLS5 0x00000020 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
953#define FLS6 0x00000040 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
954#define FLS7 0x00000080 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
955#define FLG1 0x00000200 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
956#define FLG2 0x00000400 /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
957#define FLG3 0x00000800 /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
958#define FLG4 0x00001000 /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
959#define FLG5 0x00002000 /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
960#define FLG6 0x00004000 /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
961#define FLG7 0x00008000 /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
962
963/* SPI_FLG Bit Positions */
964#define FLS1_P 0x00000001 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
965#define FLS2_P 0x00000002 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
966#define FLS3_P 0x00000003 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
967#define FLS4_P 0x00000004 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
968#define FLS5_P 0x00000005 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
969#define FLS6_P 0x00000006 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
970#define FLS7_P 0x00000007 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
971#define FLG1_P 0x00000009 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
972#define FLG2_P 0x0000000A /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
973#define FLG3_P 0x0000000B /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
974#define FLG4_P 0x0000000C /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
975#define FLG5_P 0x0000000D /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
976#define FLG6_P 0x0000000E /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
977#define FLG7_P 0x0000000F /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
978
979/* SPI_STAT Masks */
980#define SPIF 0x00000001 /* Set (=1) when SPI single-word transfer complete */
981#define MODF 0x00000002 /* Set (=1) in a master device when some other device tries to become master */
982#define TXE 0x00000004 /* Set (=1) when transmission occurs with no new data in SPI_TDBR */
983#define TXS 0x00000008 /* SPI_TDBR Data Buffer Status (0=Empty, 1=Full) */
984#define RBSY 0x00000010 /* Set (=1) when data is received with RDBR full */
985#define RXS 0x00000020 /* SPI_RDBR Data Buffer Status (0=Empty, 1=Full) */
986#define TXCOL 0x00000040 /* When set (=1), corrupt data may have been transmitted */
987
988/* SPIx_FLG Masks */
989#define FLG1E 0xFDFF /* Activates SPI_FLOUT1 */
990#define FLG2E 0xFBFF /* Activates SPI_FLOUT2 */
991#define FLG3E 0xF7FF /* Activates SPI_FLOUT3 */
992#define FLG4E 0xEFFF /* Activates SPI_FLOUT4 */
993#define FLG5E 0xDFFF /* Activates SPI_FLOUT5 */
994#define FLG6E 0xBFFF /* Activates SPI_FLOUT6 */
995#define FLG7E 0x7FFF /* Activates SPI_FLOUT7 */
996
997/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
998
999/* AMGCTL Masks */
1000#define AMCKEN 0x00000001 /* Enable CLKOUT */
1001#define AMBEN_NONE 0x00000000 /* All Banks Disabled */
1002#define AMBEN_B0 0x00000002 /* Enable Asynchronous Memory Bank 0 only */
1003#define AMBEN_B0_B1 0x00000004 /* Enable Asynchronous Memory Banks 0 & 1 only */
1004#define AMBEN_B0_B1_B2 0x00000006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */
1005#define AMBEN_ALL 0x00000008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */
1006
1007/* AMGCTL Bit Positions */
1008#define AMCKEN_P 0x00000000 /* Enable CLKOUT */
1009#define AMBEN_P0 0x00000001 /* Asynchronous Memory Enable, 000 - banks 0-3 disabled, 001 - Bank 0 enabled */
1010#define AMBEN_P1 0x00000002 /* Asynchronous Memory Enable, 010 - banks 0&1 enabled, 011 - banks 0-3 enabled */
1011#define AMBEN_P2 0x00000003 /* Asynchronous Memory Enable, 1xx - All banks (bank 0, 1, 2, and 3) enabled */
1012
1013/* AMBCTL0 Masks */
1014#define B0RDYEN 0x00000001 /* Bank 0 RDY Enable, 0=disable, 1=enable */
1015#define B0RDYPOL 0x00000002 /* Bank 0 RDY Active high, 0=active low, 1=active high */
1016#define B0TT_1 0x00000004 /* Bank 0 Transition Time from Read to Write = 1 cycle */
1017#define B0TT_2 0x00000008 /* Bank 0 Transition Time from Read to Write = 2 cycles */
1018#define B0TT_3 0x0000000C /* Bank 0 Transition Time from Read to Write = 3 cycles */
1019#define B0TT_4 0x00000000 /* Bank 0 Transition Time from Read to Write = 4 cycles */
1020#define B0ST_1 0x00000010 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=1 cycle */
1021#define B0ST_2 0x00000020 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=2 cycles */
1022#define B0ST_3 0x00000030 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=3 cycles */
1023#define B0ST_4 0x00000000 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=4 cycles */
1024#define B0HT_1 0x00000040 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 1 cycle */
1025#define B0HT_2 0x00000080 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 2 cycles */
1026#define B0HT_3 0x000000C0 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 3 cycles */
1027#define B0HT_0 0x00000000 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 0 cycles */
1028#define B0RAT_1 0x00000100 /* Bank 0 Read Access Time = 1 cycle */
1029#define B0RAT_2 0x00000200 /* Bank 0 Read Access Time = 2 cycles */
1030#define B0RAT_3 0x00000300 /* Bank 0 Read Access Time = 3 cycles */
1031#define B0RAT_4 0x00000400 /* Bank 0 Read Access Time = 4 cycles */
1032#define B0RAT_5 0x00000500 /* Bank 0 Read Access Time = 5 cycles */
1033#define B0RAT_6 0x00000600 /* Bank 0 Read Access Time = 6 cycles */
1034#define B0RAT_7 0x00000700 /* Bank 0 Read Access Time = 7 cycles */
1035#define B0RAT_8 0x00000800 /* Bank 0 Read Access Time = 8 cycles */
1036#define B0RAT_9 0x00000900 /* Bank 0 Read Access Time = 9 cycles */
1037#define B0RAT_10 0x00000A00 /* Bank 0 Read Access Time = 10 cycles */
1038#define B0RAT_11 0x00000B00 /* Bank 0 Read Access Time = 11 cycles */
1039#define B0RAT_12 0x00000C00 /* Bank 0 Read Access Time = 12 cycles */
1040#define B0RAT_13 0x00000D00 /* Bank 0 Read Access Time = 13 cycles */
1041#define B0RAT_14 0x00000E00 /* Bank 0 Read Access Time = 14 cycles */
1042#define B0RAT_15 0x00000F00 /* Bank 0 Read Access Time = 15 cycles */
1043#define B0WAT_1 0x00001000 /* Bank 0 Write Access Time = 1 cycle */
1044#define B0WAT_2 0x00002000 /* Bank 0 Write Access Time = 2 cycles */
1045#define B0WAT_3 0x00003000 /* Bank 0 Write Access Time = 3 cycles */
1046#define B0WAT_4 0x00004000 /* Bank 0 Write Access Time = 4 cycles */
1047#define B0WAT_5 0x00005000 /* Bank 0 Write Access Time = 5 cycles */
1048#define B0WAT_6 0x00006000 /* Bank 0 Write Access Time = 6 cycles */
1049#define B0WAT_7 0x00007000 /* Bank 0 Write Access Time = 7 cycles */
1050#define B0WAT_8 0x00008000 /* Bank 0 Write Access Time = 8 cycles */
1051#define B0WAT_9 0x00009000 /* Bank 0 Write Access Time = 9 cycles */
1052#define B0WAT_10 0x0000A000 /* Bank 0 Write Access Time = 10 cycles */
1053#define B0WAT_11 0x0000B000 /* Bank 0 Write Access Time = 11 cycles */
1054#define B0WAT_12 0x0000C000 /* Bank 0 Write Access Time = 12 cycles */
1055#define B0WAT_13 0x0000D000 /* Bank 0 Write Access Time = 13 cycles */
1056#define B0WAT_14 0x0000E000 /* Bank 0 Write Access Time = 14 cycles */
1057#define B0WAT_15 0x0000F000 /* Bank 0 Write Access Time = 15 cycles */
1058#define B1RDYEN 0x00010000 /* Bank 1 RDY enable, 0=disable, 1=enable */
1059#define B1RDYPOL 0x00020000 /* Bank 1 RDY Active high, 0=active low, 1=active high */
1060#define B1TT_1 0x00040000 /* Bank 1 Transition Time from Read to Write = 1 cycle */
1061#define B1TT_2 0x00080000 /* Bank 1 Transition Time from Read to Write = 2 cycles */
1062#define B1TT_3 0x000C0000 /* Bank 1 Transition Time from Read to Write = 3 cycles */
1063#define B1TT_4 0x00000000 /* Bank 1 Transition Time from Read to Write = 4 cycles */
1064#define B1ST_1 0x00100000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
1065#define B1ST_2 0x00200000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
1066#define B1ST_3 0x00300000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
1067#define B1ST_4 0x00000000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
1068#define B1HT_1 0x00400000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
1069#define B1HT_2 0x00800000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
1070#define B1HT_3 0x00C00000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
1071#define B1HT_0 0x00000000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
1072#define B1RAT_1 0x01000000 /* Bank 1 Read Access Time = 1 cycle */
1073#define B1RAT_2 0x02000000 /* Bank 1 Read Access Time = 2 cycles */
1074#define B1RAT_3 0x03000000 /* Bank 1 Read Access Time = 3 cycles */
1075#define B1RAT_4 0x04000000 /* Bank 1 Read Access Time = 4 cycles */
1076#define B1RAT_5 0x05000000 /* Bank 1 Read Access Time = 5 cycles */
1077#define B1RAT_6 0x06000000 /* Bank 1 Read Access Time = 6 cycles */
1078#define B1RAT_7 0x07000000 /* Bank 1 Read Access Time = 7 cycles */
1079#define B1RAT_8 0x08000000 /* Bank 1 Read Access Time = 8 cycles */
1080#define B1RAT_9 0x09000000 /* Bank 1 Read Access Time = 9 cycles */
1081#define B1RAT_10 0x0A000000 /* Bank 1 Read Access Time = 10 cycles */
1082#define B1RAT_11 0x0B000000 /* Bank 1 Read Access Time = 11 cycles */
1083#define B1RAT_12 0x0C000000 /* Bank 1 Read Access Time = 12 cycles */
1084#define B1RAT_13 0x0D000000 /* Bank 1 Read Access Time = 13 cycles */
1085#define B1RAT_14 0x0E000000 /* Bank 1 Read Access Time = 14 cycles */
1086#define B1RAT_15 0x0F000000 /* Bank 1 Read Access Time = 15 cycles */
1087#define B1WAT_1 0x10000000 /* Bank 1 Write Access Time = 1 cycle */
1088#define B1WAT_2 0x20000000 /* Bank 1 Write Access Time = 2 cycles */
1089#define B1WAT_3 0x30000000 /* Bank 1 Write Access Time = 3 cycles */
1090#define B1WAT_4 0x40000000 /* Bank 1 Write Access Time = 4 cycles */
1091#define B1WAT_5 0x50000000 /* Bank 1 Write Access Time = 5 cycles */
1092#define B1WAT_6 0x60000000 /* Bank 1 Write Access Time = 6 cycles */
1093#define B1WAT_7 0x70000000 /* Bank 1 Write Access Time = 7 cycles */
1094#define B1WAT_8 0x80000000 /* Bank 1 Write Access Time = 8 cycles */
1095#define B1WAT_9 0x90000000 /* Bank 1 Write Access Time = 9 cycles */
1096#define B1WAT_10 0xA0000000 /* Bank 1 Write Access Time = 10 cycles */
1097#define B1WAT_11 0xB0000000 /* Bank 1 Write Access Time = 11 cycles */
1098#define B1WAT_12 0xC0000000 /* Bank 1 Write Access Time = 12 cycles */
1099#define B1WAT_13 0xD0000000 /* Bank 1 Write Access Time = 13 cycles */
1100#define B1WAT_14 0xE0000000 /* Bank 1 Write Access Time = 14 cycles */
1101#define B1WAT_15 0xF0000000 /* Bank 1 Write Access Time = 15 cycles */
1102
1103/* AMBCTL1 Masks */
1104#define B2RDYEN 0x00000001 /* Bank 2 RDY Enable, 0=disable, 1=enable */
1105#define B2RDYPOL 0x00000002 /* Bank 2 RDY Active high, 0=active low, 1=active high */
1106#define B2TT_1 0x00000004 /* Bank 2 Transition Time from Read to Write = 1 cycle */
1107#define B2TT_2 0x00000008 /* Bank 2 Transition Time from Read to Write = 2 cycles */
1108#define B2TT_3 0x0000000C /* Bank 2 Transition Time from Read to Write = 3 cycles */
1109#define B2TT_4 0x00000000 /* Bank 2 Transition Time from Read to Write = 4 cycles */
1110#define B2ST_1 0x00000010 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
1111#define B2ST_2 0x00000020 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
1112#define B2ST_3 0x00000030 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
1113#define B2ST_4 0x00000000 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
1114#define B2HT_1 0x00000040 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
1115#define B2HT_2 0x00000080 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
1116#define B2HT_3 0x000000C0 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
1117#define B2HT_0 0x00000000 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
1118#define B2RAT_1 0x00000100 /* Bank 2 Read Access Time = 1 cycle */
1119#define B2RAT_2 0x00000200 /* Bank 2 Read Access Time = 2 cycles */
1120#define B2RAT_3 0x00000300 /* Bank 2 Read Access Time = 3 cycles */
1121#define B2RAT_4 0x00000400 /* Bank 2 Read Access Time = 4 cycles */
1122#define B2RAT_5 0x00000500 /* Bank 2 Read Access Time = 5 cycles */
1123#define B2RAT_6 0x00000600 /* Bank 2 Read Access Time = 6 cycles */
1124#define B2RAT_7 0x00000700 /* Bank 2 Read Access Time = 7 cycles */
1125#define B2RAT_8 0x00000800 /* Bank 2 Read Access Time = 8 cycles */
1126#define B2RAT_9 0x00000900 /* Bank 2 Read Access Time = 9 cycles */
1127#define B2RAT_10 0x00000A00 /* Bank 2 Read Access Time = 10 cycles */
1128#define B2RAT_11 0x00000B00 /* Bank 2 Read Access Time = 11 cycles */
1129#define B2RAT_12 0x00000C00 /* Bank 2 Read Access Time = 12 cycles */
1130#define B2RAT_13 0x00000D00 /* Bank 2 Read Access Time = 13 cycles */
1131#define B2RAT_14 0x00000E00 /* Bank 2 Read Access Time = 14 cycles */
1132#define B2RAT_15 0x00000F00 /* Bank 2 Read Access Time = 15 cycles */
1133#define B2WAT_1 0x00001000 /* Bank 2 Write Access Time = 1 cycle */
1134#define B2WAT_2 0x00002000 /* Bank 2 Write Access Time = 2 cycles */
1135#define B2WAT_3 0x00003000 /* Bank 2 Write Access Time = 3 cycles */
1136#define B2WAT_4 0x00004000 /* Bank 2 Write Access Time = 4 cycles */
1137#define B2WAT_5 0x00005000 /* Bank 2 Write Access Time = 5 cycles */
1138#define B2WAT_6 0x00006000 /* Bank 2 Write Access Time = 6 cycles */
1139#define B2WAT_7 0x00007000 /* Bank 2 Write Access Time = 7 cycles */
1140#define B2WAT_8 0x00008000 /* Bank 2 Write Access Time = 8 cycles */
1141#define B2WAT_9 0x00009000 /* Bank 2 Write Access Time = 9 cycles */
1142#define B2WAT_10 0x0000A000 /* Bank 2 Write Access Time = 10 cycles */
1143#define B2WAT_11 0x0000B000 /* Bank 2 Write Access Time = 11 cycles */
1144#define B2WAT_12 0x0000C000 /* Bank 2 Write Access Time = 12 cycles */
1145#define B2WAT_13 0x0000D000 /* Bank 2 Write Access Time = 13 cycles */
1146#define B2WAT_14 0x0000E000 /* Bank 2 Write Access Time = 14 cycles */
1147#define B2WAT_15 0x0000F000 /* Bank 2 Write Access Time = 15 cycles */
1148#define B3RDYEN 0x00010000 /* Bank 3 RDY enable, 0=disable, 1=enable */
1149#define B3RDYPOL 0x00020000 /* Bank 3 RDY Active high, 0=active low, 1=active high */
1150#define B3TT_1 0x00040000 /* Bank 3 Transition Time from Read to Write = 1 cycle */
1151#define B3TT_2 0x00080000 /* Bank 3 Transition Time from Read to Write = 2 cycles */
1152#define B3TT_3 0x000C0000 /* Bank 3 Transition Time from Read to Write = 3 cycles */
1153#define B3TT_4 0x00000000 /* Bank 3 Transition Time from Read to Write = 4 cycles */
1154#define B3ST_1 0x00100000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
1155#define B3ST_2 0x00200000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
1156#define B3ST_3 0x00300000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
1157#define B3ST_4 0x00000000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
1158#define B3HT_1 0x00400000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
1159#define B3HT_2 0x00800000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
1160#define B3HT_3 0x00C00000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
1161#define B3HT_0 0x00000000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
1162#define B3RAT_1 0x01000000 /* Bank 3 Read Access Time = 1 cycle */
1163#define B3RAT_2 0x02000000 /* Bank 3 Read Access Time = 2 cycles */
1164#define B3RAT_3 0x03000000 /* Bank 3 Read Access Time = 3 cycles */
1165#define B3RAT_4 0x04000000 /* Bank 3 Read Access Time = 4 cycles */
1166#define B3RAT_5 0x05000000 /* Bank 3 Read Access Time = 5 cycles */
1167#define B3RAT_6 0x06000000 /* Bank 3 Read Access Time = 6 cycles */
1168#define B3RAT_7 0x07000000 /* Bank 3 Read Access Time = 7 cycles */
1169#define B3RAT_8 0x08000000 /* Bank 3 Read Access Time = 8 cycles */
1170#define B3RAT_9 0x09000000 /* Bank 3 Read Access Time = 9 cycles */
1171#define B3RAT_10 0x0A000000 /* Bank 3 Read Access Time = 10 cycles */
1172#define B3RAT_11 0x0B000000 /* Bank 3 Read Access Time = 11 cycles */
1173#define B3RAT_12 0x0C000000 /* Bank 3 Read Access Time = 12 cycles */
1174#define B3RAT_13 0x0D000000 /* Bank 3 Read Access Time = 13 cycles */
1175#define B3RAT_14 0x0E000000 /* Bank 3 Read Access Time = 14 cycles */
1176#define B3RAT_15 0x0F000000 /* Bank 3 Read Access Time = 15 cycles */
1177#define B3WAT_1 0x10000000 /* Bank 3 Write Access Time = 1 cycle */
1178#define B3WAT_2 0x20000000 /* Bank 3 Write Access Time = 2 cycles */
1179#define B3WAT_3 0x30000000 /* Bank 3 Write Access Time = 3 cycles */
1180#define B3WAT_4 0x40000000 /* Bank 3 Write Access Time = 4 cycles */
1181#define B3WAT_5 0x50000000 /* Bank 3 Write Access Time = 5 cycles */
1182#define B3WAT_6 0x60000000 /* Bank 3 Write Access Time = 6 cycles */
1183#define B3WAT_7 0x70000000 /* Bank 3 Write Access Time = 7 cycles */
1184#define B3WAT_8 0x80000000 /* Bank 3 Write Access Time = 8 cycles */
1185#define B3WAT_9 0x90000000 /* Bank 3 Write Access Time = 9 cycles */
1186#define B3WAT_10 0xA0000000 /* Bank 3 Write Access Time = 10 cycles */
1187#define B3WAT_11 0xB0000000 /* Bank 3 Write Access Time = 11 cycles */
1188#define B3WAT_12 0xC0000000 /* Bank 3 Write Access Time = 12 cycles */
1189#define B3WAT_13 0xD0000000 /* Bank 3 Write Access Time = 13 cycles */
1190#define B3WAT_14 0xE0000000 /* Bank 3 Write Access Time = 14 cycles */
1191#define B3WAT_15 0xF0000000 /* Bank 3 Write Access Time = 15 cycles */
1192
1193/* ********************** SDRAM CONTROLLER MASKS *************************** */
1194
1195/* SDGCTL Masks */
1196#define SCTLE 0x00000001 /* Enable SCLK[0], /SRAS, /SCAS, /SWE, SDQM[3:0] */
1197#define CL_2 0x00000008 /* SDRAM CAS latency = 2 cycles */
1198#define CL_3 0x0000000C /* SDRAM CAS latency = 3 cycles */
1199#define PFE 0x00000010 /* Enable SDRAM prefetch */
1200#define PFP 0x00000020 /* Prefetch has priority over AMC requests */
1201#define PASR_ALL 0x00000000 /* All 4 SDRAM Banks Refreshed In Self-Refresh */
1202#define PASR_B0_B1 0x00000010 /* SDRAM Banks 0 and 1 Are Refreshed In Self-Refresh */
1203#define PASR_B0 0x00000020 /* Only SDRAM Bank 0 Is Refreshed In Self-Refresh */
1204#define TRAS_1 0x00000040 /* SDRAM tRAS = 1 cycle */
1205#define TRAS_2 0x00000080 /* SDRAM tRAS = 2 cycles */
1206#define TRAS_3 0x000000C0 /* SDRAM tRAS = 3 cycles */
1207#define TRAS_4 0x00000100 /* SDRAM tRAS = 4 cycles */
1208#define TRAS_5 0x00000140 /* SDRAM tRAS = 5 cycles */
1209#define TRAS_6 0x00000180 /* SDRAM tRAS = 6 cycles */
1210#define TRAS_7 0x000001C0 /* SDRAM tRAS = 7 cycles */
1211#define TRAS_8 0x00000200 /* SDRAM tRAS = 8 cycles */
1212#define TRAS_9 0x00000240 /* SDRAM tRAS = 9 cycles */
1213#define TRAS_10 0x00000280 /* SDRAM tRAS = 10 cycles */
1214#define TRAS_11 0x000002C0 /* SDRAM tRAS = 11 cycles */
1215#define TRAS_12 0x00000300 /* SDRAM tRAS = 12 cycles */
1216#define TRAS_13 0x00000340 /* SDRAM tRAS = 13 cycles */
1217#define TRAS_14 0x00000380 /* SDRAM tRAS = 14 cycles */
1218#define TRAS_15 0x000003C0 /* SDRAM tRAS = 15 cycles */
1219#define TRP_1 0x00000800 /* SDRAM tRP = 1 cycle */
1220#define TRP_2 0x00001000 /* SDRAM tRP = 2 cycles */
1221#define TRP_3 0x00001800 /* SDRAM tRP = 3 cycles */
1222#define TRP_4 0x00002000 /* SDRAM tRP = 4 cycles */
1223#define TRP_5 0x00002800 /* SDRAM tRP = 5 cycles */
1224#define TRP_6 0x00003000 /* SDRAM tRP = 6 cycles */
1225#define TRP_7 0x00003800 /* SDRAM tRP = 7 cycles */
1226#define TRCD_1 0x00008000 /* SDRAM tRCD = 1 cycle */
1227#define TRCD_2 0x00010000 /* SDRAM tRCD = 2 cycles */
1228#define TRCD_3 0x00018000 /* SDRAM tRCD = 3 cycles */
1229#define TRCD_4 0x00020000 /* SDRAM tRCD = 4 cycles */
1230#define TRCD_5 0x00028000 /* SDRAM tRCD = 5 cycles */
1231#define TRCD_6 0x00030000 /* SDRAM tRCD = 6 cycles */
1232#define TRCD_7 0x00038000 /* SDRAM tRCD = 7 cycles */
1233#define TWR_1 0x00080000 /* SDRAM tWR = 1 cycle */
1234#define TWR_2 0x00100000 /* SDRAM tWR = 2 cycles */
1235#define TWR_3 0x00180000 /* SDRAM tWR = 3 cycles */
1236#define PUPSD 0x00200000 /*Power-up start delay */
1237#define PSM 0x00400000 /* SDRAM power-up sequence = Precharge, mode register set, 8 CBR refresh cycles */
1238#define PSS 0x00800000 /* enable SDRAM power-up sequence on next SDRAM access */
1239#define SRFS 0x01000000 /* Start SDRAM self-refresh mode */
1240#define EBUFE 0x02000000 /* Enable external buffering timing */
1241#define FBBRW 0x04000000 /* Fast back-to-back read write enable */
1242#define EMREN 0x10000000 /* Extended mode register enable */
1243#define TCSR 0x20000000 /* Temp compensated self refresh value 85 deg C */
1244#define CDDBG 0x40000000 /* Tristate SDRAM controls during bus grant */
1245
1246/* EBIU_SDBCTL Masks */
1247#define EBE 0x00000001 /* Enable SDRAM external bank */
1248#define EBSZ_16 0x00000000 /* SDRAM external bank size = 16MB */
1249#define EBSZ_32 0x00000002 /* SDRAM external bank size = 32MB */
1250#define EBSZ_64 0x00000004 /* SDRAM external bank size = 64MB */
1251#define EBSZ_128 0x00000006 /* SDRAM external bank size = 128MB */
1252#define EBCAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */
1253#define EBCAW_9 0x00000010 /* SDRAM external bank column address width = 9 bits */
1254#define EBCAW_10 0x00000020 /* SDRAM external bank column address width = 9 bits */
1255#define EBCAW_11 0x00000030 /* SDRAM external bank column address width = 9 bits */
1256
1257/* EBIU_SDSTAT Masks */
1258#define SDCI 0x00000001 /* SDRAM controller is idle */
1259#define SDSRA 0x00000002 /* SDRAM SDRAM self refresh is active */
1260#define SDPUA 0x00000004 /* SDRAM power up active */
1261#define SDRS 0x00000008 /* SDRAM is in reset state */
1262#define SDEASE 0x00000010 /* SDRAM EAB sticky error status - W1C */
1263#define BGSTAT 0x00000020 /* Bus granted */
1264
1265
1266#endif /* _DEF_BF532_H */
diff --git a/include/asm-blackfin/mach-bf533/dma.h b/include/asm-blackfin/mach-bf533/dma.h
deleted file mode 100644
index bd9d5e94307d..000000000000
--- a/include/asm-blackfin/mach-bf533/dma.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*****************************************************************************
2*
3* BF-533/2/1 Specific Declarations
4*
5****************************************************************************/
6/*
7 * File: include/asm-blackfin/mach-bf533/dma.h
8 * Based on:
9 * Author:
10 *
11 * Created:
12 * Description:
13 *
14 * Rev:
15 *
16 * Modified:
17 *
18 * Bugs: Enter bugs at http://blackfin.uclinux.org/
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2, or (at your option)
23 * any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; see the file COPYING.
32 * If not, write to the Free Software Foundation,
33 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 */
35
36#ifndef _MACH_DMA_H_
37#define _MACH_DMA_H_
38
39#define MAX_BLACKFIN_DMA_CHANNEL 12
40
41#define CH_PPI 0
42#define CH_SPORT0_RX 1
43#define CH_SPORT0_TX 2
44#define CH_SPORT1_RX 3
45#define CH_SPORT1_TX 4
46#define CH_SPI 5
47#define CH_UART_RX 6
48#define CH_UART_TX 7
49#define CH_MEM_STREAM0_DEST 8 /* TX */
50#define CH_MEM_STREAM0_SRC 9 /* RX */
51#define CH_MEM_STREAM1_DEST 10 /* TX */
52#define CH_MEM_STREAM1_SRC 11 /* RX */
53
54#endif
diff --git a/include/asm-blackfin/mach-bf533/irq.h b/include/asm-blackfin/mach-bf533/irq.h
deleted file mode 100644
index 5aa38e5da6b7..000000000000
--- a/include/asm-blackfin/mach-bf533/irq.h
+++ /dev/null
@@ -1,173 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/defBF532.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _BF533_IRQ_H_
32#define _BF533_IRQ_H_
33
34/*
35 * Interrupt source definitions
36 Event Source Core Event Name
37Core Emulation **
38 Events (highest priority) EMU 0
39 Reset RST 1
40 NMI NMI 2
41 Exception EVX 3
42 Reserved -- 4
43 Hardware Error IVHW 5
44 Core Timer IVTMR 6 *
45 PLL Wakeup Interrupt IVG7 7
46 DMA Error (generic) IVG7 8
47 PPI Error Interrupt IVG7 9
48 SPORT0 Error Interrupt IVG7 10
49 SPORT1 Error Interrupt IVG7 11
50 SPI Error Interrupt IVG7 12
51 UART Error Interrupt IVG7 13
52 RTC Interrupt IVG8 14
53 DMA0 Interrupt (PPI) IVG8 15
54 DMA1 (SPORT0 RX) IVG9 16
55 DMA2 (SPORT0 TX) IVG9 17
56 DMA3 (SPORT1 RX) IVG9 18
57 DMA4 (SPORT1 TX) IVG9 19
58 DMA5 (PPI) IVG10 20
59 DMA6 (UART RX) IVG10 21
60 DMA7 (UART TX) IVG10 22
61 Timer0 IVG11 23
62 Timer1 IVG11 24
63 Timer2 IVG11 25
64 PF Interrupt A IVG12 26
65 PF Interrupt B IVG12 27
66 DMA8/9 Interrupt IVG13 28
67 DMA10/11 Interrupt IVG13 29
68 Watchdog Timer IVG13 30
69
70 Softirq IVG14 31
71 System Call --
72 (lowest priority) IVG15 32 *
73 */
74#define SYS_IRQS 31
75#define NR_PERI_INTS 24
76
77/* The ABSTRACT IRQ definitions */
78/** the first seven of the following are fixed, the rest you change if you need to **/
79#define IRQ_EMU 0 /*Emulation */
80#define IRQ_RST 1 /*reset */
81#define IRQ_NMI 2 /*Non Maskable */
82#define IRQ_EVX 3 /*Exception */
83#define IRQ_UNUSED 4 /*- unused interrupt*/
84#define IRQ_HWERR 5 /*Hardware Error */
85#define IRQ_CORETMR 6 /*Core timer */
86
87#define IRQ_PLL_WAKEUP 7 /*PLL Wakeup Interrupt */
88#define IRQ_DMA_ERROR 8 /*DMA Error (general) */
89#define IRQ_PPI_ERROR 9 /*PPI Error Interrupt */
90#define IRQ_SPORT0_ERROR 10 /*SPORT0 Error Interrupt */
91#define IRQ_SPORT1_ERROR 11 /*SPORT1 Error Interrupt */
92#define IRQ_SPI_ERROR 12 /*SPI Error Interrupt */
93#define IRQ_UART_ERROR 13 /*UART Error Interrupt */
94#define IRQ_RTC 14 /*RTC Interrupt */
95#define IRQ_PPI 15 /*DMA0 Interrupt (PPI) */
96#define IRQ_SPORT0_RX 16 /*DMA1 Interrupt (SPORT0 RX) */
97#define IRQ_SPORT0_TX 17 /*DMA2 Interrupt (SPORT0 TX) */
98#define IRQ_SPORT1_RX 18 /*DMA3 Interrupt (SPORT1 RX) */
99#define IRQ_SPORT1_TX 19 /*DMA4 Interrupt (SPORT1 TX) */
100#define IRQ_SPI 20 /*DMA5 Interrupt (SPI) */
101#define IRQ_UART_RX 21 /*DMA6 Interrupt (UART RX) */
102#define IRQ_UART_TX 22 /*DMA7 Interrupt (UART TX) */
103#define IRQ_TMR0 23 /*Timer 0 */
104#define IRQ_TMR1 24 /*Timer 1 */
105#define IRQ_TMR2 25 /*Timer 2 */
106#define IRQ_PROG_INTA 26 /*Programmable Flags A (8) */
107#define IRQ_PROG_INTB 27 /*Programmable Flags B (8) */
108#define IRQ_MEM_DMA0 28 /*DMA8/9 Interrupt (Memory DMA Stream 0) */
109#define IRQ_MEM_DMA1 29 /*DMA10/11 Interrupt (Memory DMA Stream 1) */
110#define IRQ_WATCH 30 /*Watch Dog Timer */
111
112#define IRQ_PF0 33
113#define IRQ_PF1 34
114#define IRQ_PF2 35
115#define IRQ_PF3 36
116#define IRQ_PF4 37
117#define IRQ_PF5 38
118#define IRQ_PF6 39
119#define IRQ_PF7 40
120#define IRQ_PF8 41
121#define IRQ_PF9 42
122#define IRQ_PF10 43
123#define IRQ_PF11 44
124#define IRQ_PF12 45
125#define IRQ_PF13 46
126#define IRQ_PF14 47
127#define IRQ_PF15 48
128
129#define GPIO_IRQ_BASE IRQ_PF0
130
131#define NR_IRQS (IRQ_PF15+1)
132
133#define IVG7 7
134#define IVG8 8
135#define IVG9 9
136#define IVG10 10
137#define IVG11 11
138#define IVG12 12
139#define IVG13 13
140#define IVG14 14
141#define IVG15 15
142
143/* IAR0 BIT FIELDS*/
144#define RTC_ERROR_POS 28
145#define UART_ERROR_POS 24
146#define SPORT1_ERROR_POS 20
147#define SPI_ERROR_POS 16
148#define SPORT0_ERROR_POS 12
149#define PPI_ERROR_POS 8
150#define DMA_ERROR_POS 4
151#define PLLWAKE_ERROR_POS 0
152
153/* IAR1 BIT FIELDS*/
154#define DMA7_UARTTX_POS 28
155#define DMA6_UARTRX_POS 24
156#define DMA5_SPI_POS 20
157#define DMA4_SPORT1TX_POS 16
158#define DMA3_SPORT1RX_POS 12
159#define DMA2_SPORT0TX_POS 8
160#define DMA1_SPORT0RX_POS 4
161#define DMA0_PPI_POS 0
162
163/* IAR2 BIT FIELDS*/
164#define WDTIMER_POS 28
165#define MEMDMA1_POS 24
166#define MEMDMA0_POS 20
167#define PFB_POS 16
168#define PFA_POS 12
169#define TIMER2_POS 8
170#define TIMER1_POS 4
171#define TIMER0_POS 0
172
173#endif /* _BF533_IRQ_H_ */
diff --git a/include/asm-blackfin/mach-bf533/mem_init.h b/include/asm-blackfin/mach-bf533/mem_init.h
deleted file mode 100644
index 995c06b2b1ef..000000000000
--- a/include/asm-blackfin/mach-bf533/mem_init.h
+++ /dev/null
@@ -1,297 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/mem_init.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 * Copyright 2004-2006 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 || \
33 CONFIG_MEM_MT48LC32M16A2TG_75 || CONFIG_MEM_GENERIC_BOARD)
34#if (CONFIG_SCLK_HZ > 119402985)
35#define SDRAM_tRP TRP_2
36#define SDRAM_tRP_num 2
37#define SDRAM_tRAS TRAS_7
38#define SDRAM_tRAS_num 7
39#define SDRAM_tRCD TRCD_2
40#define SDRAM_tWR TWR_2
41#endif
42#if (CONFIG_SCLK_HZ > 104477612) && (CONFIG_SCLK_HZ <= 119402985)
43#define SDRAM_tRP TRP_2
44#define SDRAM_tRP_num 2
45#define SDRAM_tRAS TRAS_6
46#define SDRAM_tRAS_num 6
47#define SDRAM_tRCD TRCD_2
48#define SDRAM_tWR TWR_2
49#endif
50#if (CONFIG_SCLK_HZ > 8955223) && (CONFIG_SCLK_HZ <= 104477612)
51#define SDRAM_tRP TRP_2
52#define SDRAM_tRP_num 2
53#define SDRAM_tRAS TRAS_5
54#define SDRAM_tRAS_num 5
55#define SDRAM_tRCD TRCD_2
56#define SDRAM_tWR TWR_2
57#endif
58#if (CONFIG_SCLK_HZ > 74626866) && (CONFIG_SCLK_HZ <= 89552239)
59#define SDRAM_tRP TRP_2
60#define SDRAM_tRP_num 2
61#define SDRAM_tRAS TRAS_4
62#define SDRAM_tRAS_num 4
63#define SDRAM_tRCD TRCD_2
64#define SDRAM_tWR TWR_2
65#endif
66#if (CONFIG_SCLK_HZ > 66666667) && (CONFIG_SCLK_HZ <= 74626866)
67#define SDRAM_tRP TRP_2
68#define SDRAM_tRP_num 2
69#define SDRAM_tRAS TRAS_3
70#define SDRAM_tRAS_num 3
71#define SDRAM_tRCD TRCD_2
72#define SDRAM_tWR TWR_2
73#endif
74#if (CONFIG_SCLK_HZ > 59701493) && (CONFIG_SCLK_HZ <= 66666667)
75#define SDRAM_tRP TRP_1
76#define SDRAM_tRP_num 1
77#define SDRAM_tRAS TRAS_4
78#define SDRAM_tRAS_num 3
79#define SDRAM_tRCD TRCD_1
80#define SDRAM_tWR TWR_2
81#endif
82#if (CONFIG_SCLK_HZ > 44776119) && (CONFIG_SCLK_HZ <= 59701493)
83#define SDRAM_tRP TRP_1
84#define SDRAM_tRP_num 1
85#define SDRAM_tRAS TRAS_3
86#define SDRAM_tRAS_num 3
87#define SDRAM_tRCD TRCD_1
88#define SDRAM_tWR TWR_2
89#endif
90#if (CONFIG_SCLK_HZ > 29850746) && (CONFIG_SCLK_HZ <= 44776119)
91#define SDRAM_tRP TRP_1
92#define SDRAM_tRP_num 1
93#define SDRAM_tRAS TRAS_2
94#define SDRAM_tRAS_num 2
95#define SDRAM_tRCD TRCD_1
96#define SDRAM_tWR TWR_2
97#endif
98#if (CONFIG_SCLK_HZ <= 29850746)
99#define SDRAM_tRP TRP_1
100#define SDRAM_tRP_num 1
101#define SDRAM_tRAS TRAS_1
102#define SDRAM_tRAS_num 1
103#define SDRAM_tRCD TRCD_1
104#define SDRAM_tWR TWR_2
105#endif
106#endif
107
108#if (CONFIG_MEM_MT48LC16M16A2TG_75)
109 /*SDRAM INFORMATION: */
110#define SDRAM_Tref 64 /* Refresh period in milliseconds */
111#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
112#define SDRAM_CL CL_3
113#endif
114
115#if (CONFIG_MEM_MT48LC64M4A2FB_7E)
116 /*SDRAM INFORMATION: */
117#define SDRAM_Tref 64 /* Refresh period in milliseconds */
118#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
119#define SDRAM_CL CL_3
120#endif
121
122#if (CONFIG_MEM_MT48LC32M16A2TG_75)
123 /*SDRAM INFORMATION: */
124#define SDRAM_Tref 64 /* Refresh period in milliseconds */
125#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
126#define SDRAM_CL CL_3
127#endif
128
129#if (CONFIG_MEM_GENERIC_BOARD)
130 /*SDRAM INFORMATION: Modify this for your board */
131#define SDRAM_Tref 64 /* Refresh period in milliseconds */
132#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
133#define SDRAM_CL CL_3
134#endif
135
136/* Equation from section 17 (p17-46) of BF533 HRM */
137#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
138
139/* Enable SCLK Out */
140#define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS)
141
142#if defined CONFIG_CLKIN_HALF
143#define CLKIN_HALF 1
144#else
145#define CLKIN_HALF 0
146#endif
147
148#if defined CONFIG_PLL_BYPASS
149#define PLL_BYPASS 1
150#else
151#define PLL_BYPASS 0
152#endif
153
154/***************************************Currently Not Being Used *********************************/
155#define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
156#define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
157#define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ))
158#define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
159#define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
160
161#if (flash_EBIU_AMBCTL_TT > 3)
162#define flash_EBIU_AMBCTL0_TT B0TT_4
163#endif
164#if (flash_EBIU_AMBCTL_TT == 3)
165#define flash_EBIU_AMBCTL0_TT B0TT_3
166#endif
167#if (flash_EBIU_AMBCTL_TT == 2)
168#define flash_EBIU_AMBCTL0_TT B0TT_2
169#endif
170#if (flash_EBIU_AMBCTL_TT < 2)
171#define flash_EBIU_AMBCTL0_TT B0TT_1
172#endif
173
174#if (flash_EBIU_AMBCTL_ST > 3)
175#define flash_EBIU_AMBCTL0_ST B0ST_4
176#endif
177#if (flash_EBIU_AMBCTL_ST == 3)
178#define flash_EBIU_AMBCTL0_ST B0ST_3
179#endif
180#if (flash_EBIU_AMBCTL_ST == 2)
181#define flash_EBIU_AMBCTL0_ST B0ST_2
182#endif
183#if (flash_EBIU_AMBCTL_ST < 2)
184#define flash_EBIU_AMBCTL0_ST B0ST_1
185#endif
186
187#if (flash_EBIU_AMBCTL_HT > 2)
188#define flash_EBIU_AMBCTL0_HT B0HT_3
189#endif
190#if (flash_EBIU_AMBCTL_HT == 2)
191#define flash_EBIU_AMBCTL0_HT B0HT_2
192#endif
193#if (flash_EBIU_AMBCTL_HT == 1)
194#define flash_EBIU_AMBCTL0_HT B0HT_1
195#endif
196#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0)
197#define flash_EBIU_AMBCTL0_HT B0HT_0
198#endif
199#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0)
200#define flash_EBIU_AMBCTL0_HT B0HT_1
201#endif
202
203#if (flash_EBIU_AMBCTL_WAT > 14)
204#define flash_EBIU_AMBCTL0_WAT B0WAT_15
205#endif
206#if (flash_EBIU_AMBCTL_WAT == 14)
207#define flash_EBIU_AMBCTL0_WAT B0WAT_14
208#endif
209#if (flash_EBIU_AMBCTL_WAT == 13)
210#define flash_EBIU_AMBCTL0_WAT B0WAT_13
211#endif
212#if (flash_EBIU_AMBCTL_WAT == 12)
213#define flash_EBIU_AMBCTL0_WAT B0WAT_12
214#endif
215#if (flash_EBIU_AMBCTL_WAT == 11)
216#define flash_EBIU_AMBCTL0_WAT B0WAT_11
217#endif
218#if (flash_EBIU_AMBCTL_WAT == 10)
219#define flash_EBIU_AMBCTL0_WAT B0WAT_10
220#endif
221#if (flash_EBIU_AMBCTL_WAT == 9)
222#define flash_EBIU_AMBCTL0_WAT B0WAT_9
223#endif
224#if (flash_EBIU_AMBCTL_WAT == 8)
225#define flash_EBIU_AMBCTL0_WAT B0WAT_8
226#endif
227#if (flash_EBIU_AMBCTL_WAT == 7)
228#define flash_EBIU_AMBCTL0_WAT B0WAT_7
229#endif
230#if (flash_EBIU_AMBCTL_WAT == 6)
231#define flash_EBIU_AMBCTL0_WAT B0WAT_6
232#endif
233#if (flash_EBIU_AMBCTL_WAT == 5)
234#define flash_EBIU_AMBCTL0_WAT B0WAT_5
235#endif
236#if (flash_EBIU_AMBCTL_WAT == 4)
237#define flash_EBIU_AMBCTL0_WAT B0WAT_4
238#endif
239#if (flash_EBIU_AMBCTL_WAT == 3)
240#define flash_EBIU_AMBCTL0_WAT B0WAT_3
241#endif
242#if (flash_EBIU_AMBCTL_WAT == 2)
243#define flash_EBIU_AMBCTL0_WAT B0WAT_2
244#endif
245#if (flash_EBIU_AMBCTL_WAT == 1)
246#define flash_EBIU_AMBCTL0_WAT B0WAT_1
247#endif
248
249#if (flash_EBIU_AMBCTL_RAT > 14)
250#define flash_EBIU_AMBCTL0_RAT B0RAT_15
251#endif
252#if (flash_EBIU_AMBCTL_RAT == 14)
253#define flash_EBIU_AMBCTL0_RAT B0RAT_14
254#endif
255#if (flash_EBIU_AMBCTL_RAT == 13)
256#define flash_EBIU_AMBCTL0_RAT B0RAT_13
257#endif
258#if (flash_EBIU_AMBCTL_RAT == 12)
259#define flash_EBIU_AMBCTL0_RAT B0RAT_12
260#endif
261#if (flash_EBIU_AMBCTL_RAT == 11)
262#define flash_EBIU_AMBCTL0_RAT B0RAT_11
263#endif
264#if (flash_EBIU_AMBCTL_RAT == 10)
265#define flash_EBIU_AMBCTL0_RAT B0RAT_10
266#endif
267#if (flash_EBIU_AMBCTL_RAT == 9)
268#define flash_EBIU_AMBCTL0_RAT B0RAT_9
269#endif
270#if (flash_EBIU_AMBCTL_RAT == 8)
271#define flash_EBIU_AMBCTL0_RAT B0RAT_8
272#endif
273#if (flash_EBIU_AMBCTL_RAT == 7)
274#define flash_EBIU_AMBCTL0_RAT B0RAT_7
275#endif
276#if (flash_EBIU_AMBCTL_RAT == 6)
277#define flash_EBIU_AMBCTL0_RAT B0RAT_6
278#endif
279#if (flash_EBIU_AMBCTL_RAT == 5)
280#define flash_EBIU_AMBCTL0_RAT B0RAT_5
281#endif
282#if (flash_EBIU_AMBCTL_RAT == 4)
283#define flash_EBIU_AMBCTL0_RAT B0RAT_4
284#endif
285#if (flash_EBIU_AMBCTL_RAT == 3)
286#define flash_EBIU_AMBCTL0_RAT B0RAT_3
287#endif
288#if (flash_EBIU_AMBCTL_RAT == 2)
289#define flash_EBIU_AMBCTL0_RAT B0RAT_2
290#endif
291#if (flash_EBIU_AMBCTL_RAT == 1)
292#define flash_EBIU_AMBCTL0_RAT B0RAT_1
293#endif
294
295#define flash_EBIU_AMBCTL0 \
296 (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \
297 flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN)
diff --git a/include/asm-blackfin/mach-bf533/mem_map.h b/include/asm-blackfin/mach-bf533/mem_map.h
deleted file mode 100644
index bd30b6f3be00..000000000000
--- a/include/asm-blackfin/mach-bf533/mem_map.h
+++ /dev/null
@@ -1,166 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf533/mem_map.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _MEM_MAP_533_H_
32#define _MEM_MAP_533_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#define BOOT_ROM_LENGTH 0x400
51
52/* Level 1 Memory */
53
54#ifdef CONFIG_BFIN_ICACHE
55#define BFIN_ICACHESIZE (16*1024)
56#else
57#define BFIN_ICACHESIZE (0*1024)
58#endif
59
60/* Memory Map for ADSP-BF533 processors */
61
62#ifdef CONFIG_BF533
63#define L1_CODE_START 0xFFA00000
64#define L1_DATA_A_START 0xFF800000
65#define L1_DATA_B_START 0xFF900000
66
67#ifdef CONFIG_BFIN_ICACHE
68#define L1_CODE_LENGTH (0x14000 - 0x4000)
69#else
70#define L1_CODE_LENGTH 0x14000
71#endif
72
73#ifdef CONFIG_BFIN_DCACHE
74
75#ifdef CONFIG_BFIN_DCACHE_BANKA
76#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
77#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
78#define L1_DATA_B_LENGTH 0x8000
79#define BFIN_DCACHESIZE (16*1024)
80#define BFIN_DSUPBANKS 1
81#else
82#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
83#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
84#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
85#define BFIN_DCACHESIZE (32*1024)
86#define BFIN_DSUPBANKS 2
87#endif
88
89#else
90#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
91#define L1_DATA_A_LENGTH 0x8000
92#define L1_DATA_B_LENGTH 0x8000
93#define BFIN_DCACHESIZE (0*1024)
94#define BFIN_DSUPBANKS 0
95#endif /*CONFIG_BFIN_DCACHE*/
96#endif
97
98/* Memory Map for ADSP-BF532 processors */
99
100#ifdef CONFIG_BF532
101#define L1_CODE_START 0xFFA08000
102#define L1_DATA_A_START 0xFF804000
103#define L1_DATA_B_START 0xFF904000
104
105#ifdef CONFIG_BFIN_ICACHE
106#define L1_CODE_LENGTH (0xC000 - 0x4000)
107#else
108#define L1_CODE_LENGTH 0xC000
109#endif
110
111#ifdef CONFIG_BFIN_DCACHE
112
113#ifdef CONFIG_BFIN_DCACHE_BANKA
114#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
115#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
116#define L1_DATA_B_LENGTH 0x4000
117#define BFIN_DCACHESIZE (16*1024)
118#define BFIN_DSUPBANKS 1
119
120#else
121#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
122#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
123#define L1_DATA_B_LENGTH (0x4000 - 0x4000)
124#define BFIN_DCACHESIZE (32*1024)
125#define BFIN_DSUPBANKS 2
126#endif
127
128#else
129#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
130#define L1_DATA_A_LENGTH 0x4000
131#define L1_DATA_B_LENGTH 0x4000
132#define BFIN_DCACHESIZE (0*1024)
133#define BFIN_DSUPBANKS 0
134#endif /*CONFIG_BFIN_DCACHE*/
135#endif
136
137/* Memory Map for ADSP-BF531 processors */
138
139#ifdef CONFIG_BF531
140#define L1_CODE_START 0xFFA08000
141#define L1_DATA_A_START 0xFF804000
142#define L1_DATA_B_START 0xFF904000
143#define L1_CODE_LENGTH 0x4000
144#define L1_DATA_B_LENGTH 0x0000
145
146
147#ifdef CONFIG_BFIN_DCACHE
148#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
149#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
150#define BFIN_DCACHESIZE (16*1024)
151#define BFIN_DSUPBANKS 1
152#else
153#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
154#define L1_DATA_A_LENGTH 0x4000
155#define BFIN_DCACHESIZE (0*1024)
156#define BFIN_DSUPBANKS 0
157#endif
158
159#endif
160
161/* Scratch Pad Memory */
162
163#define L1_SCRATCH_START 0xFFB00000
164#define L1_SCRATCH_LENGTH 0x1000
165
166#endif /* _MEM_MAP_533_H_ */
diff --git a/include/asm-blackfin/mach-bf533/portmux.h b/include/asm-blackfin/mach-bf533/portmux.h
deleted file mode 100644
index 685a2651dcda..000000000000
--- a/include/asm-blackfin/mach-bf533/portmux.h
+++ /dev/null
@@ -1,67 +0,0 @@
1#ifndef _MACH_PORTMUX_H_
2#define _MACH_PORTMUX_H_
3
4#define MAX_RESOURCES MAX_BLACKFIN_GPIOS
5
6#define P_PPI0_CLK (P_DONTCARE)
7#define P_PPI0_FS1 (P_DONTCARE)
8#define P_PPI0_FS2 (P_DONTCARE)
9#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PF3))
10#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF4))
11#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF5))
12#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF6))
13#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF7))
14#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF8))
15#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF9))
16#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF10))
17#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF11))
18#define P_PPI0_D0 (P_DONTCARE)
19#define P_PPI0_D1 (P_DONTCARE)
20#define P_PPI0_D2 (P_DONTCARE)
21#define P_PPI0_D3 (P_DONTCARE)
22#define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF15))
23#define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF14))
24#define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF13))
25#define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF12))
26
27#define P_SPORT1_TSCLK (P_DONTCARE)
28#define P_SPORT1_RSCLK (P_DONTCARE)
29#define P_SPORT0_TSCLK (P_DONTCARE)
30#define P_SPORT0_RSCLK (P_DONTCARE)
31#define P_UART0_RX (P_DONTCARE)
32#define P_UART0_TX (P_DONTCARE)
33#define P_SPORT1_DRSEC (P_DONTCARE)
34#define P_SPORT1_RFS (P_DONTCARE)
35#define P_SPORT1_DTPRI (P_DONTCARE)
36#define P_SPORT1_DTSEC (P_DONTCARE)
37#define P_SPORT1_TFS (P_DONTCARE)
38#define P_SPORT1_DRPRI (P_DONTCARE)
39#define P_SPORT0_DRSEC (P_DONTCARE)
40#define P_SPORT0_RFS (P_DONTCARE)
41#define P_SPORT0_DTPRI (P_DONTCARE)
42#define P_SPORT0_DTSEC (P_DONTCARE)
43#define P_SPORT0_TFS (P_DONTCARE)
44#define P_SPORT0_DRPRI (P_DONTCARE)
45
46#define P_SPI0_MOSI (P_DONTCARE)
47#define P_SPI0_MISO (P_DONTCARE)
48#define P_SPI0_SCK (P_DONTCARE)
49#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF7))
50#define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF6))
51#define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5))
52#define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF4))
53#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF3))
54#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2))
55#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1))
56#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0))
57
58#define P_TMR2 (P_DONTCARE)
59#define P_TMR1 (P_DONTCARE)
60#define P_TMR0 (P_DONTCARE)
61#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF1))
62
63
64
65
66
67#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h
deleted file mode 100644
index 8460ab9c324f..000000000000
--- a/include/asm-blackfin/mach-bf537/anomaly.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 *
5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8
9/* This file shoule be up to date with:
10 * - Revision C, 02/08/2008; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List
11 */
12
13#ifndef _MACH_ANOMALY_H_
14#define _MACH_ANOMALY_H_
15
16/* We do not support 0.1 silicon - sorry */
17#if __SILICON_REVISION__ < 2
18# error will not work on BF537 silicon version 0.0 or 0.1
19#endif
20
21#if defined(__ADSPBF534__)
22# define ANOMALY_BF534 1
23#else
24# define ANOMALY_BF534 0
25#endif
26#if defined(__ADSPBF536__)
27# define ANOMALY_BF536 1
28#else
29# define ANOMALY_BF536 0
30#endif
31#if defined(__ADSPBF537__)
32# define ANOMALY_BF537 1
33#else
34# define ANOMALY_BF537 0
35#endif
36
37/* Multi-issue instruction with dsp32shiftimm in slot1 and P-reg store in slot 2 not supported */
38#define ANOMALY_05000074 (1)
39/* DMA_RUN bit is not valid after a Peripheral Receive Channel DMA stops */
40#define ANOMALY_05000119 (1)
41/* Rx.H cannot be used to access 16-bit System MMR registers */
42#define ANOMALY_05000122 (1)
43/* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */
44#define ANOMALY_05000157 (__SILICON_REVISION__ < 2)
45/* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */
46#define ANOMALY_05000167 (1)
47/* PPI_DELAY not functional in PPI modes with 0 frame syncs */
48#define ANOMALY_05000180 (1)
49/* Instruction Cache Is Not Functional */
50#define ANOMALY_05000237 (__SILICON_REVISION__ < 2)
51/* If i-cache is on, CSYNC/SSYNC/IDLE around Change of Control causes failures */
52#define ANOMALY_05000244 (__SILICON_REVISION__ < 3)
53/* Spurious Hardware Error from an access in the shadow of a conditional branch */
54#define ANOMALY_05000245 (1)
55/* CLKIN Buffer Output Enable Reset Behavior Is Changed */
56#define ANOMALY_05000247 (1)
57/* Incorrect Bit-Shift of Data Word in Multichannel (TDM) mode in certain conditions */
58#define ANOMALY_05000250 (__SILICON_REVISION__ < 3)
59/* EMAC Tx DMA error after an early frame abort */
60#define ANOMALY_05000252 (__SILICON_REVISION__ < 3)
61/* Maximum external clock speed for Timers */
62#define ANOMALY_05000253 (__SILICON_REVISION__ < 3)
63/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT mode with external clock */
64#define ANOMALY_05000254 (__SILICON_REVISION__ > 2)
65/* Entering Hibernate Mode with RTC Seconds event interrupt not functional */
66#define ANOMALY_05000255 (__SILICON_REVISION__ < 3)
67/* EMAC MDIO input latched on wrong MDC edge */
68#define ANOMALY_05000256 (__SILICON_REVISION__ < 3)
69/* Interrupt/Exception during short hardware loop may cause bad instruction fetches */
70#define ANOMALY_05000257 (__SILICON_REVISION__ < 3)
71/* Instruction Cache is corrupted when bits 9 and 12 of the ICPLB Data registers differ */
72#define ANOMALY_05000258 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ == 1) || __SILICON_REVISION__ == 2)
73/* ICPLB_STATUS MMR register may be corrupted */
74#define ANOMALY_05000260 (__SILICON_REVISION__ == 2)
75/* DCPLB_FAULT_ADDR MMR register may be corrupted */
76#define ANOMALY_05000261 (__SILICON_REVISION__ < 3)
77/* Stores to data cache may be lost */
78#define ANOMALY_05000262 (__SILICON_REVISION__ < 3)
79/* Hardware loop corrupted when taking an ICPLB exception */
80#define ANOMALY_05000263 (__SILICON_REVISION__ == 2)
81/* CSYNC/SSYNC/IDLE causes infinite stall in second to last instruction in hardware loop */
82#define ANOMALY_05000264 (__SILICON_REVISION__ < 3)
83/* Sensitivity to noise with slow input edge rates on external SPORT TX and RX clocks */
84#define ANOMALY_05000265 (1)
85/* Memory DMA error when peripheral DMA is running with non-zero DEB_TRAFFIC_PERIOD */
86#define ANOMALY_05000268 (__SILICON_REVISION__ < 3)
87/* High I/O activity causes output voltage of internal voltage regulator (VDDint) to decrease */
88#define ANOMALY_05000270 (__SILICON_REVISION__ < 3)
89/* Certain data cache write through modes fail for VDDint <=0.9V */
90#define ANOMALY_05000272 (1)
91/* Writes to Synchronous SDRAM memory may be lost */
92#define ANOMALY_05000273 (__SILICON_REVISION__ < 3)
93/* Writes to an I/O data register one SCLK cycle after an edge is detected may clear interrupt */
94#define ANOMALY_05000277 (__SILICON_REVISION__ < 3)
95/* Disabling Peripherals with DMA running may cause DMA system instability */
96#define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2))
97/* SPI Master boot mode does not work well with Atmel Data flash devices */
98#define ANOMALY_05000280 (1)
99/* False Hardware Error Exception when ISR context is not restored */
100#define ANOMALY_05000281 (__SILICON_REVISION__ < 3)
101/* Memory DMA corruption with 32-bit data and traffic control */
102#define ANOMALY_05000282 (__SILICON_REVISION__ < 3)
103/* System MMR Write Is Stalled Indefinitely When Killed in a Particular Stage */
104#define ANOMALY_05000283 (__SILICON_REVISION__ < 3)
105/* New Feature: EMAC TX DMA Word Alignment (Not Available On Older Silicon) */
106#define ANOMALY_05000285 (__SILICON_REVISION__ < 3)
107/* SPORTs may receive bad data if FIFOs fill up */
108#define ANOMALY_05000288 (__SILICON_REVISION__ < 3)
109/* Memory to memory DMA source/destination descriptors must be in same memory space */
110#define ANOMALY_05000301 (1)
111/* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */
112#define ANOMALY_05000304 (__SILICON_REVISION__ < 3)
113/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
114#define ANOMALY_05000305 (__SILICON_REVISION__ < 3)
115/* SCKELOW Bit Does Not Maintain State Through Hibernate */
116#define ANOMALY_05000307 (__SILICON_REVISION__ < 3)
117/* Writing UART_THR while UART clock is disabled sends erroneous start bit */
118#define ANOMALY_05000309 (__SILICON_REVISION__ < 3)
119/* False hardware errors caused by fetches at the boundary of reserved memory */
120#define ANOMALY_05000310 (1)
121/* Errors when SSYNC, CSYNC, or loads to LT, LB and LC registers are interrupted */
122#define ANOMALY_05000312 (1)
123/* PPI is level sensitive on first transfer */
124#define ANOMALY_05000313 (1)
125/* Killed System MMR Write Completes Erroneously On Next System MMR Access */
126#define ANOMALY_05000315 (__SILICON_REVISION__ < 3)
127/* EMAC RMII mode: collisions occur in Full Duplex mode */
128#define ANOMALY_05000316 (__SILICON_REVISION__ < 3)
129/* EMAC RMII mode: TX frames in half duplex fail with status No Carrier */
130#define ANOMALY_05000321 (__SILICON_REVISION__ < 3)
131/* EMAC RMII mode at 10-Base-T speed: RX frames not received properly */
132#define ANOMALY_05000322 (1)
133/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
134#define ANOMALY_05000341 (__SILICON_REVISION__ >= 3)
135/* New Feature: UART Remains Enabled after UART Boot */
136#define ANOMALY_05000350 (__SILICON_REVISION__ >= 3)
137/* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */
138#define ANOMALY_05000355 (1)
139/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
140#define ANOMALY_05000357 (1)
141/* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */
142#define ANOMALY_05000359 (1)
143/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
144#define ANOMALY_05000366 (1)
145/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
146#define ANOMALY_05000371 (1)
147/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
148#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5)
149/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
150#define ANOMALY_05000403 (1)
151
152/* Anomalies that don't exist on this proc */
153#define ANOMALY_05000125 (0)
154#define ANOMALY_05000158 (0)
155#define ANOMALY_05000183 (0)
156#define ANOMALY_05000198 (0)
157#define ANOMALY_05000230 (0)
158#define ANOMALY_05000266 (0)
159#define ANOMALY_05000311 (0)
160#define ANOMALY_05000323 (0)
161#define ANOMALY_05000363 (0)
162
163#endif
diff --git a/include/asm-blackfin/mach-bf537/bf537.h b/include/asm-blackfin/mach-bf537/bf537.h
deleted file mode 100644
index cfe2a221112e..000000000000
--- a/include/asm-blackfin/mach-bf537/bf537.h
+++ /dev/null
@@ -1,141 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/bf537.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF537
8 *
9 * Modified:
10 * Copyright 2004-2006 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_BF537_H__
31#define __MACH_BF537_H__
32
33#define SUPPORTED_REVID 2
34
35/* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */
36
37#define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */
38#define SPORT_ERR_MASK (ROVF | RUVF | TOVF | TUVF) /* SPORTx_STAT */
39#define PPI_ERR_MASK (0xFFFF & ~FLD) /* PPI_STATUS */
40#define EMAC_ERR_MASK (PHYINT | MMCINT | RXFSINT | TXFSINT | WAKEDET | RXDMAERR | TXDMAERR | STMDONE) /* EMAC_SYSTAT */
41#define UART_ERR_MASK_STAT1 (0x4) /* UARTx_IIR */
42#define UART_ERR_MASK_STAT0 (0x2) /* UARTx_IIR */
43#define CAN_ERR_MASK (EWTIF | EWRIF | EPIF | BOIF | WUIF | UIAIF | AAIF | RMLIF | UCEIF | EXTIF | ADIF) /* CAN_GIF */
44
45#define OFFSET_(x) ((x) & 0x0000FFFF)
46
47/*some misc defines*/
48#define IMASK_IVG15 0x8000
49#define IMASK_IVG14 0x4000
50#define IMASK_IVG13 0x2000
51#define IMASK_IVG12 0x1000
52
53#define IMASK_IVG11 0x0800
54#define IMASK_IVG10 0x0400
55#define IMASK_IVG9 0x0200
56#define IMASK_IVG8 0x0100
57
58#define IMASK_IVG7 0x0080
59#define IMASK_IVGTMR 0x0040
60#define IMASK_IVGHW 0x0020
61
62/***************************/
63
64
65#define BFIN_DSUBBANKS 4
66#define BFIN_DWAYS 2
67#define BFIN_DLINES 64
68#define BFIN_ISUBBANKS 4
69#define BFIN_IWAYS 4
70#define BFIN_ILINES 32
71
72#define WAY0_L 0x1
73#define WAY1_L 0x2
74#define WAY01_L 0x3
75#define WAY2_L 0x4
76#define WAY02_L 0x5
77#define WAY12_L 0x6
78#define WAY012_L 0x7
79
80#define WAY3_L 0x8
81#define WAY03_L 0x9
82#define WAY13_L 0xA
83#define WAY013_L 0xB
84
85#define WAY32_L 0xC
86#define WAY320_L 0xD
87#define WAY321_L 0xE
88#define WAYALL_L 0xF
89
90#define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
91
92/********************************* EBIU Settings ************************************/
93#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
94#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
95
96#ifdef CONFIG_C_AMBEN_ALL
97#define V_AMBEN AMBEN_ALL
98#endif
99#ifdef CONFIG_C_AMBEN
100#define V_AMBEN 0x0
101#endif
102#ifdef CONFIG_C_AMBEN_B0
103#define V_AMBEN AMBEN_B0
104#endif
105#ifdef CONFIG_C_AMBEN_B0_B1
106#define V_AMBEN AMBEN_B0_B1
107#endif
108#ifdef CONFIG_C_AMBEN_B0_B1_B2
109#define V_AMBEN AMBEN_B0_B1_B2
110#endif
111#ifdef CONFIG_C_AMCKEN
112#define V_AMCKEN AMCKEN
113#else
114#define V_AMCKEN 0x0
115#endif
116#ifdef CONFIG_C_CDPRIO
117#define V_CDPRIO 0x100
118#else
119#define V_CDPRIO 0x0
120#endif
121
122#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
123
124#ifdef CONFIG_BF537
125#define CPU "BF537"
126#define CPUID 0x027c8000
127#endif
128#ifdef CONFIG_BF536
129#define CPU "BF536"
130#define CPUID 0x027c8000
131#endif
132#ifdef CONFIG_BF534
133#define CPU "BF534"
134#define CPUID 0x027c6000
135#endif
136#ifndef CPU
137#define CPU "UNKNOWN"
138#define CPUID 0x0
139#endif
140
141#endif /* __MACH_BF537_H__ */
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
deleted file mode 100644
index 1bf56ffa22f9..000000000000
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ /dev/null
@@ -1,195 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * blackfin serial driver header files
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#include <linux/serial.h>
33#include <asm/dma.h>
34#include <asm/portmux.h>
35
36#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
37#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
38#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER))
39#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
40#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
41#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
42#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
43
44#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
45#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
46#define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v)
47#define UART_SET_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v))
48#define UART_CLEAR_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v))
49#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
50#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
51#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
52
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
62#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
63# define CONFIG_SERIAL_BFIN_CTSRTS
64
65# ifndef CONFIG_UART0_CTS_PIN
66# define CONFIG_UART0_CTS_PIN -1
67# endif
68
69# ifndef CONFIG_UART0_RTS_PIN
70# define CONFIG_UART0_RTS_PIN -1
71# endif
72
73# ifndef CONFIG_UART1_CTS_PIN
74# define CONFIG_UART1_CTS_PIN -1
75# endif
76
77# ifndef CONFIG_UART1_RTS_PIN
78# define CONFIG_UART1_RTS_PIN -1
79# endif
80#endif
81/*
82 * The pin configuration is different from schematic
83 */
84struct bfin_serial_port {
85 struct uart_port port;
86 unsigned int old_status;
87 unsigned int lsr;
88#ifdef CONFIG_SERIAL_BFIN_DMA
89 int tx_done;
90 int tx_count;
91 struct circ_buf rx_dma_buf;
92 struct timer_list rx_dma_timer;
93 int rx_dma_nrows;
94 unsigned int tx_dma_channel;
95 unsigned int rx_dma_channel;
96 struct work_struct tx_dma_workqueue;
97#endif
98#ifdef CONFIG_SERIAL_BFIN_CTSRTS
99 struct timer_list cts_timer;
100 int cts_pin;
101 int rts_pin;
102#endif
103};
104
105/* The hardware clears the LSR bits upon read, so we need to cache
106 * some of the more fun bits in software so they don't get lost
107 * when checking the LSR in other code paths (TX).
108 */
109static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
110{
111 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
112 uart->lsr |= (lsr & (BI|FE|PE|OE));
113 return lsr | uart->lsr;
114}
115
116static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
117{
118 uart->lsr = 0;
119 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
120}
121
122struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS];
123struct bfin_serial_res {
124 unsigned long uart_base_addr;
125 int uart_irq;
126#ifdef CONFIG_SERIAL_BFIN_DMA
127 unsigned int uart_tx_dma_channel;
128 unsigned int uart_rx_dma_channel;
129#endif
130#ifdef CONFIG_SERIAL_BFIN_CTSRTS
131 int uart_cts_pin;
132 int uart_rts_pin;
133#endif
134};
135
136struct bfin_serial_res bfin_serial_resource[] = {
137#ifdef CONFIG_SERIAL_BFIN_UART0
138 {
139 0xFFC00400,
140 IRQ_UART0_RX,
141#ifdef CONFIG_SERIAL_BFIN_DMA
142 CH_UART0_TX,
143 CH_UART0_RX,
144#endif
145#ifdef CONFIG_BFIN_UART0_CTSRTS
146 CONFIG_UART0_CTS_PIN,
147 CONFIG_UART0_RTS_PIN,
148#endif
149 },
150#endif
151#ifdef CONFIG_SERIAL_BFIN_UART1
152 {
153 0xFFC02000,
154 IRQ_UART1_RX,
155#ifdef CONFIG_SERIAL_BFIN_DMA
156 CH_UART1_TX,
157 CH_UART1_RX,
158#endif
159#ifdef CONFIG_BFIN_UART1_CTSRTS
160 CONFIG_UART1_CTS_PIN,
161 CONFIG_UART1_RTS_PIN,
162#endif
163 },
164#endif
165};
166
167int nr_ports = ARRAY_SIZE(bfin_serial_resource);
168
169#define DRIVER_NAME "bfin-uart"
170
171static void bfin_serial_hw_init(struct bfin_serial_port *uart)
172{
173
174#ifdef CONFIG_SERIAL_BFIN_UART0
175 peripheral_request(P_UART0_TX, DRIVER_NAME);
176 peripheral_request(P_UART0_RX, DRIVER_NAME);
177#endif
178
179#ifdef CONFIG_SERIAL_BFIN_UART1
180 peripheral_request(P_UART1_TX, DRIVER_NAME);
181 peripheral_request(P_UART1_RX, DRIVER_NAME);
182#endif
183
184#ifdef CONFIG_SERIAL_BFIN_CTSRTS
185 if (uart->cts_pin >= 0) {
186 gpio_request(uart->cts_pin, DRIVER_NAME);
187 gpio_direction_input(uart->cts_pin);
188 }
189
190 if (uart->rts_pin >= 0) {
191 gpio_request(uart->rts_pin, DRIVER_NAME);
192 gpio_direction_output(uart->rts_pin, 0);
193 }
194#endif
195}
diff --git a/include/asm-blackfin/mach-bf537/bfin_sir.h b/include/asm-blackfin/mach-bf537/bfin_sir.h
deleted file mode 100644
index cfd8ad4f1f2c..000000000000
--- a/include/asm-blackfin/mach-bf537/bfin_sir.h
+++ /dev/null
@@ -1,142 +0,0 @@
1/*
2 * Blackfin Infra-red Driver
3 *
4 * Copyright 2006-2008 Analog Devices Inc.
5 *
6 * Enter bugs at http://blackfin.uclinux.org/
7 *
8 * Licensed under the GPL-2 or later.
9 *
10 */
11
12#include <linux/serial.h>
13#include <asm/dma.h>
14#include <asm/portmux.h>
15
16#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR)
17#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL)
18#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER)
19#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH)
20#define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR)
21#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR)
22#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
23
24#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
25#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
26#define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v)
27#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
28#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
29#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
30
31#ifdef CONFIG_SIR_BFIN_DMA
32struct dma_rx_buf {
33 char *buf;
34 int head;
35 int tail;
36 };
37#endif /* CONFIG_SIR_BFIN_DMA */
38
39struct bfin_sir_port {
40 unsigned char __iomem *membase;
41 unsigned int irq;
42 unsigned int lsr;
43 unsigned long clk;
44 struct net_device *dev;
45#ifdef CONFIG_SIR_BFIN_DMA
46 int tx_done;
47 struct dma_rx_buf rx_dma_buf;
48 struct timer_list rx_dma_timer;
49 int rx_dma_nrows;
50#endif /* CONFIG_SIR_BFIN_DMA */
51 unsigned int tx_dma_channel;
52 unsigned int rx_dma_channel;
53};
54
55struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS];
56
57struct bfin_sir_port_res {
58 unsigned long base_addr;
59 int irq;
60 unsigned int rx_dma_channel;
61 unsigned int tx_dma_channel;
62};
63
64struct bfin_sir_port_res bfin_sir_port_resource[] = {
65#ifdef CONFIG_BFIN_SIR0
66 {
67 0xFFC00400,
68 IRQ_UART0_RX,
69 CH_UART0_RX,
70 CH_UART0_TX,
71 },
72#endif
73#ifdef CONFIG_BFIN_SIR1
74 {
75 0xFFC02000,
76 IRQ_UART1_RX,
77 CH_UART1_RX,
78 CH_UART1_TX,
79 },
80#endif
81};
82
83int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource);
84
85struct bfin_sir_self {
86 struct bfin_sir_port *sir_port;
87 spinlock_t lock;
88 unsigned int open;
89 int speed;
90 int newspeed;
91
92 struct sk_buff *txskb;
93 struct sk_buff *rxskb;
94 struct net_device_stats stats;
95 struct device *dev;
96 struct irlap_cb *irlap;
97 struct qos_info qos;
98
99 iobuff_t tx_buff;
100 iobuff_t rx_buff;
101
102 struct work_struct work;
103 int mtt;
104};
105
106static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port)
107{
108 unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR);
109 port->lsr |= (lsr & (BI|FE|PE|OE));
110 return lsr | port->lsr;
111}
112
113static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
114{
115 port->lsr = 0;
116 bfin_read16(port->membase + OFFSET_LSR);
117}
118
119#define DRIVER_NAME "bfin_sir"
120
121static int bfin_sir_hw_init(void)
122{
123 int ret = -ENODEV;
124#ifdef CONFIG_BFIN_SIR0
125 ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
126 if (ret)
127 return ret;
128 ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
129 if (ret)
130 return ret;
131#endif
132
133#ifdef CONFIG_BFIN_SIR1
134 ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
135 if (ret)
136 return ret;
137 ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
138 if (ret)
139 return ret;
140#endif
141 return ret;
142}
diff --git a/include/asm-blackfin/mach-bf537/blackfin.h b/include/asm-blackfin/mach-bf537/blackfin.h
deleted file mode 100644
index cffc786b2a2b..000000000000
--- a/include/asm-blackfin/mach-bf537/blackfin.h
+++ /dev/null
@@ -1,165 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/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 BF537_FAMILY
36
37#include "bf537.h"
38#include "mem_map.h"
39#include "defBF534.h"
40#include "anomaly.h"
41
42#if defined(CONFIG_BF537) || defined(CONFIG_BF536)
43#include "defBF537.h"
44#endif
45
46#if !defined(__ASSEMBLY__)
47#include "cdefBF534.h"
48
49/* UART 0*/
50#define bfin_read_UART_THR() bfin_read_UART0_THR()
51#define bfin_write_UART_THR(val) bfin_write_UART0_THR(val)
52#define bfin_read_UART_RBR() bfin_read_UART0_RBR()
53#define bfin_write_UART_RBR(val) bfin_write_UART0_RBR(val)
54#define bfin_read_UART_DLL() bfin_read_UART0_DLL()
55#define bfin_write_UART_DLL(val) bfin_write_UART0_DLL(val)
56#define bfin_read_UART_IER() bfin_read_UART0_IER()
57#define bfin_write_UART_IER(val) bfin_write_UART0_IER(val)
58#define bfin_read_UART_DLH() bfin_read_UART0_DLH()
59#define bfin_write_UART_DLH(val) bfin_write_UART0_DLH(val)
60#define bfin_read_UART_IIR() bfin_read_UART0_IIR()
61#define bfin_write_UART_IIR(val) bfin_write_UART0_IIR(val)
62#define bfin_read_UART_LCR() bfin_read_UART0_LCR()
63#define bfin_write_UART_LCR(val) bfin_write_UART0_LCR(val)
64#define bfin_read_UART_MCR() bfin_read_UART0_MCR()
65#define bfin_write_UART_MCR(val) bfin_write_UART0_MCR(val)
66#define bfin_read_UART_LSR() bfin_read_UART0_LSR()
67#define bfin_write_UART_LSR(val) bfin_write_UART0_LSR(val)
68#define bfin_read_UART_SCR() bfin_read_UART0_SCR()
69#define bfin_write_UART_SCR(val) bfin_write_UART0_SCR(val)
70#define bfin_read_UART_GCTL() bfin_read_UART0_GCTL()
71#define bfin_write_UART_GCTL(val) bfin_write_UART0_GCTL(val)
72
73#if defined(CONFIG_BF537) || defined(CONFIG_BF536)
74#include "cdefBF537.h"
75#endif
76#endif
77
78/* MAP used DEFINES from BF533 to BF537 - so we don't need to change them in the driver, kernel, etc. */
79
80/* UART_IIR Register */
81#define STATUS(x) ((x << 1) & 0x06)
82#define STATUS_P1 0x02
83#define STATUS_P0 0x01
84
85/* DMA Channnel */
86#define bfin_read_CH_UART_RX() bfin_read_CH_UART0_RX()
87#define bfin_write_CH_UART_RX(val) bfin_write_CH_UART0_RX(val)
88#define CH_UART_RX CH_UART0_RX
89#define bfin_read_CH_UART_TX() bfin_read_CH_UART0_TX()
90#define bfin_write_CH_UART_TX(val) bfin_write_CH_UART0_TX(val)
91#define CH_UART_TX CH_UART0_TX
92
93/* System Interrupt Controller */
94#define bfin_read_IRQ_UART_RX() bfin_read_IRQ_UART0_RX()
95#define bfin_write_IRQ_UART_RX(val) bfin_write_IRQ_UART0_RX(val)
96#define IRQ_UART_RX IRQ_UART0_RX
97#define bfin_read_IRQ_UART_TX() bfin_read_IRQ_UART0_TX()
98#define bfin_write_IRQ_UART_TX(val) bfin_write_IRQ_UART0_TX(val)
99#define IRQ_UART_TX IRQ_UART0_TX
100#define bfin_read_IRQ_UART_ERROR() bfin_read_IRQ_UART0_ERROR()
101#define bfin_write_IRQ_UART_ERROR(val) bfin_write_IRQ_UART0_ERROR(val)
102#define IRQ_UART_ERROR IRQ_UART0_ERROR
103
104/* MMR Registers*/
105#define bfin_read_UART_THR() bfin_read_UART0_THR()
106#define bfin_write_UART_THR(val) bfin_write_UART0_THR(val)
107#define BFIN_UART_THR UART0_THR
108#define bfin_read_UART_RBR() bfin_read_UART0_RBR()
109#define bfin_write_UART_RBR(val) bfin_write_UART0_RBR(val)
110#define BFIN_UART_RBR UART0_RBR
111#define bfin_read_UART_DLL() bfin_read_UART0_DLL()
112#define bfin_write_UART_DLL(val) bfin_write_UART0_DLL(val)
113#define BFIN_UART_DLL UART0_DLL
114#define bfin_read_UART_IER() bfin_read_UART0_IER()
115#define bfin_write_UART_IER(val) bfin_write_UART0_IER(val)
116#define BFIN_UART_IER UART0_IER
117#define bfin_read_UART_DLH() bfin_read_UART0_DLH()
118#define bfin_write_UART_DLH(val) bfin_write_UART0_DLH(val)
119#define BFIN_UART_DLH UART0_DLH
120#define bfin_read_UART_IIR() bfin_read_UART0_IIR()
121#define bfin_write_UART_IIR(val) bfin_write_UART0_IIR(val)
122#define BFIN_UART_IIR UART0_IIR
123#define bfin_read_UART_LCR() bfin_read_UART0_LCR()
124#define bfin_write_UART_LCR(val) bfin_write_UART0_LCR(val)
125#define BFIN_UART_LCR UART0_LCR
126#define bfin_read_UART_MCR() bfin_read_UART0_MCR()
127#define bfin_write_UART_MCR(val) bfin_write_UART0_MCR(val)
128#define BFIN_UART_MCR UART0_MCR
129#define bfin_read_UART_LSR() bfin_read_UART0_LSR()
130#define bfin_write_UART_LSR(val) bfin_write_UART0_LSR(val)
131#define BFIN_UART_LSR UART0_LSR
132#define bfin_read_UART_SCR() bfin_read_UART0_SCR()
133#define bfin_write_UART_SCR(val) bfin_write_UART0_SCR(val)
134#define BFIN_UART_SCR UART0_SCR
135#define bfin_read_UART_GCTL() bfin_read_UART0_GCTL()
136#define bfin_write_UART_GCTL(val) bfin_write_UART0_GCTL(val)
137#define BFIN_UART_GCTL UART0_GCTL
138
139#define BFIN_UART_NR_PORTS 2
140
141#define OFFSET_THR 0x00 /* Transmit Holding register */
142#define OFFSET_RBR 0x00 /* Receive Buffer register */
143#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
144#define OFFSET_IER 0x04 /* Interrupt Enable Register */
145#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
146#define OFFSET_IIR 0x08 /* Interrupt Identification Register */
147#define OFFSET_LCR 0x0C /* Line Control Register */
148#define OFFSET_MCR 0x10 /* Modem Control Register */
149#define OFFSET_LSR 0x14 /* Line Status Register */
150#define OFFSET_MSR 0x18 /* Modem Status Register */
151#define OFFSET_SCR 0x1C /* SCR Scratch Register */
152#define OFFSET_GCTL 0x24 /* Global Control Register */
153
154/* DPMC*/
155#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
156#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
157#define STOPCK_OFF STOPCK
158
159/* PLL_DIV Masks */
160#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
161#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
162#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
163#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
164
165#endif
diff --git a/include/asm-blackfin/mach-bf537/cdefBF534.h b/include/asm-blackfin/mach-bf537/cdefBF534.h
deleted file mode 100644
index 82de526f8097..000000000000
--- a/include/asm-blackfin/mach-bf537/cdefBF534.h
+++ /dev/null
@@ -1,1819 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/cdefbf534.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: system mmr register map
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 _CDEF_BF534_H
33#define _CDEF_BF534_H
34
35#include <asm/blackfin.h>
36
37/* Include all Core registers and bit definitions */
38#include "defBF534.h"
39
40/* Include core specific register pointer definitions */
41#include <asm/mach-common/cdef_LPBlackfin.h>
42
43#include <asm/system.h>
44
45/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
46#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
47/* Writing to PLL_CTL initiates a PLL relock sequence. */
48static __inline__ void bfin_write_PLL_CTL(unsigned int val)
49{
50 unsigned long flags, iwr;
51
52 if (val == bfin_read_PLL_CTL())
53 return;
54
55 local_irq_save(flags);
56 /* Enable the PLL Wakeup bit in SIC IWR */
57 iwr = bfin_read32(SIC_IWR);
58 /* Only allow PPL Wakeup) */
59 bfin_write32(SIC_IWR, IWR_ENABLE(0));
60
61 bfin_write16(PLL_CTL, val);
62 SSYNC();
63 asm("IDLE;");
64
65 bfin_write32(SIC_IWR, iwr);
66 local_irq_restore(flags);
67}
68#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
69#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val)
70#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
71/* Writing to VR_CTL initiates a PLL relock sequence. */
72static __inline__ void bfin_write_VR_CTL(unsigned int val)
73{
74 unsigned long flags, iwr;
75
76 if (val == bfin_read_VR_CTL())
77 return;
78
79 local_irq_save(flags);
80 /* Enable the PLL Wakeup bit in SIC IWR */
81 iwr = bfin_read32(SIC_IWR);
82 /* Only allow PPL Wakeup) */
83 bfin_write32(SIC_IWR, IWR_ENABLE(0));
84
85 bfin_write16(VR_CTL, val);
86 SSYNC();
87 asm("IDLE;");
88
89 bfin_write32(SIC_IWR, iwr);
90 local_irq_restore(flags);
91}
92#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
93#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val)
94#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
95#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val)
96#define bfin_read_CHIPID() bfin_read32(CHIPID)
97
98/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
99#define bfin_read_SWRST() bfin_read16(SWRST)
100#define bfin_write_SWRST(val) bfin_write16(SWRST,val)
101#define bfin_read_SYSCR() bfin_read16(SYSCR)
102#define bfin_write_SYSCR(val) bfin_write16(SYSCR,val)
103#define bfin_read_SIC_RVECT() bfin_read32(SIC_RVECT)
104#define bfin_write_SIC_RVECT(val) bfin_write32(SIC_RVECT,val)
105#define bfin_read_SIC_IMASK() bfin_read32(SIC_IMASK)
106#define bfin_write_SIC_IMASK(val) bfin_write32(SIC_IMASK,val)
107#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
108#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0,val)
109#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
110#define bfin_write_SIC_IAR1(val) bfin_write32(SIC_IAR1,val)
111#define bfin_read_SIC_IAR2() bfin_read32(SIC_IAR2)
112#define bfin_write_SIC_IAR2(val) bfin_write32(SIC_IAR2,val)
113#define bfin_read_SIC_IAR3() bfin_read32(SIC_IAR3)
114#define bfin_write_SIC_IAR3(val) bfin_write32(SIC_IAR3,val)
115#define bfin_read_SIC_ISR() bfin_read32(SIC_ISR)
116#define bfin_write_SIC_ISR(val) bfin_write32(SIC_ISR,val)
117#define bfin_read_SIC_IWR() bfin_read32(SIC_IWR)
118#define bfin_write_SIC_IWR(val) bfin_write32(SIC_IWR,val)
119
120/* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */
121#define bfin_read_WDOG_CTL() bfin_read16(WDOG_CTL)
122#define bfin_write_WDOG_CTL(val) bfin_write16(WDOG_CTL,val)
123#define bfin_read_WDOG_CNT() bfin_read32(WDOG_CNT)
124#define bfin_write_WDOG_CNT(val) bfin_write32(WDOG_CNT,val)
125#define bfin_read_WDOG_STAT() bfin_read32(WDOG_STAT)
126#define bfin_write_WDOG_STAT(val) bfin_write32(WDOG_STAT,val)
127
128/* Real Time Clock (0xFFC00300 - 0xFFC003FF) */
129#define bfin_read_RTC_STAT() bfin_read32(RTC_STAT)
130#define bfin_write_RTC_STAT(val) bfin_write32(RTC_STAT,val)
131#define bfin_read_RTC_ICTL() bfin_read16(RTC_ICTL)
132#define bfin_write_RTC_ICTL(val) bfin_write16(RTC_ICTL,val)
133#define bfin_read_RTC_ISTAT() bfin_read16(RTC_ISTAT)
134#define bfin_write_RTC_ISTAT(val) bfin_write16(RTC_ISTAT,val)
135#define bfin_read_RTC_SWCNT() bfin_read16(RTC_SWCNT)
136#define bfin_write_RTC_SWCNT(val) bfin_write16(RTC_SWCNT,val)
137#define bfin_read_RTC_ALARM() bfin_read32(RTC_ALARM)
138#define bfin_write_RTC_ALARM(val) bfin_write32(RTC_ALARM,val)
139#define bfin_read_RTC_FAST() bfin_read16(RTC_FAST)
140#define bfin_write_RTC_FAST(val) bfin_write16(RTC_FAST,val)
141#define bfin_read_RTC_PREN() bfin_read16(RTC_PREN)
142#define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN,val)
143
144/* UART0 Controller (0xFFC00400 - 0xFFC004FF) */
145#define bfin_read_UART0_THR() bfin_read16(UART0_THR)
146#define bfin_write_UART0_THR(val) bfin_write16(UART0_THR,val)
147#define bfin_read_UART0_RBR() bfin_read16(UART0_RBR)
148#define bfin_write_UART0_RBR(val) bfin_write16(UART0_RBR,val)
149#define bfin_read_UART0_DLL() bfin_read16(UART0_DLL)
150#define bfin_write_UART0_DLL(val) bfin_write16(UART0_DLL,val)
151#define bfin_read_UART0_IER() bfin_read16(UART0_IER)
152#define bfin_write_UART0_IER(val) bfin_write16(UART0_IER,val)
153#define bfin_read_UART0_DLH() bfin_read16(UART0_DLH)
154#define bfin_write_UART0_DLH(val) bfin_write16(UART0_DLH,val)
155#define bfin_read_UART0_IIR() bfin_read16(UART0_IIR)
156#define bfin_write_UART0_IIR(val) bfin_write16(UART0_IIR,val)
157#define bfin_read_UART0_LCR() bfin_read16(UART0_LCR)
158#define bfin_write_UART0_LCR(val) bfin_write16(UART0_LCR,val)
159#define bfin_read_UART0_MCR() bfin_read16(UART0_MCR)
160#define bfin_write_UART0_MCR(val) bfin_write16(UART0_MCR,val)
161#define bfin_read_UART0_LSR() bfin_read16(UART0_LSR)
162#define bfin_write_UART0_LSR(val) bfin_write16(UART0_LSR,val)
163#define bfin_read_UART0_MSR() bfin_read16(UART0_MSR)
164#define bfin_write_UART0_MSR(val) bfin_write16(UART0_MSR,val)
165#define bfin_read_UART0_SCR() bfin_read16(UART0_SCR)
166#define bfin_write_UART0_SCR(val) bfin_write16(UART0_SCR,val)
167#define bfin_read_UART0_GCTL() bfin_read16(UART0_GCTL)
168#define bfin_write_UART0_GCTL(val) bfin_write16(UART0_GCTL,val)
169
170/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
171#define bfin_read_SPI_CTL() bfin_read16(SPI_CTL)
172#define bfin_write_SPI_CTL(val) bfin_write16(SPI_CTL,val)
173#define bfin_read_SPI_FLG() bfin_read16(SPI_FLG)
174#define bfin_write_SPI_FLG(val) bfin_write16(SPI_FLG,val)
175#define bfin_read_SPI_STAT() bfin_read16(SPI_STAT)
176#define bfin_write_SPI_STAT(val) bfin_write16(SPI_STAT,val)
177#define bfin_read_SPI_TDBR() bfin_read16(SPI_TDBR)
178#define bfin_write_SPI_TDBR(val) bfin_write16(SPI_TDBR,val)
179#define bfin_read_SPI_RDBR() bfin_read16(SPI_RDBR)
180#define bfin_write_SPI_RDBR(val) bfin_write16(SPI_RDBR,val)
181#define bfin_read_SPI_BAUD() bfin_read16(SPI_BAUD)
182#define bfin_write_SPI_BAUD(val) bfin_write16(SPI_BAUD,val)
183#define bfin_read_SPI_SHADOW() bfin_read16(SPI_SHADOW)
184#define bfin_write_SPI_SHADOW(val) bfin_write16(SPI_SHADOW,val)
185
186/* TIMER0-7 Registers (0xFFC00600 - 0xFFC006FF) */
187#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
188#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG,val)
189#define bfin_read_TIMER0_COUNTER() bfin_read32(TIMER0_COUNTER)
190#define bfin_write_TIMER0_COUNTER(val) bfin_write32(TIMER0_COUNTER,val)
191#define bfin_read_TIMER0_PERIOD() bfin_read32(TIMER0_PERIOD)
192#define bfin_write_TIMER0_PERIOD(val) bfin_write32(TIMER0_PERIOD,val)
193#define bfin_read_TIMER0_WIDTH() bfin_read32(TIMER0_WIDTH)
194#define bfin_write_TIMER0_WIDTH(val) bfin_write32(TIMER0_WIDTH,val)
195
196#define bfin_read_TIMER1_CONFIG() bfin_read16(TIMER1_CONFIG)
197#define bfin_write_TIMER1_CONFIG(val) bfin_write16(TIMER1_CONFIG,val)
198#define bfin_read_TIMER1_COUNTER() bfin_read32(TIMER1_COUNTER)
199#define bfin_write_TIMER1_COUNTER(val) bfin_write32(TIMER1_COUNTER,val)
200#define bfin_read_TIMER1_PERIOD() bfin_read32(TIMER1_PERIOD)
201#define bfin_write_TIMER1_PERIOD(val) bfin_write32(TIMER1_PERIOD,val)
202#define bfin_read_TIMER1_WIDTH() bfin_read32(TIMER1_WIDTH)
203#define bfin_write_TIMER1_WIDTH(val) bfin_write32(TIMER1_WIDTH,val)
204
205#define bfin_read_TIMER2_CONFIG() bfin_read16(TIMER2_CONFIG)
206#define bfin_write_TIMER2_CONFIG(val) bfin_write16(TIMER2_CONFIG,val)
207#define bfin_read_TIMER2_COUNTER() bfin_read32(TIMER2_COUNTER)
208#define bfin_write_TIMER2_COUNTER(val) bfin_write32(TIMER2_COUNTER,val)
209#define bfin_read_TIMER2_PERIOD() bfin_read32(TIMER2_PERIOD)
210#define bfin_write_TIMER2_PERIOD(val) bfin_write32(TIMER2_PERIOD,val)
211#define bfin_read_TIMER2_WIDTH() bfin_read32(TIMER2_WIDTH)
212#define bfin_write_TIMER2_WIDTH(val) bfin_write32(TIMER2_WIDTH,val)
213
214#define bfin_read_TIMER3_CONFIG() bfin_read16(TIMER3_CONFIG)
215#define bfin_write_TIMER3_CONFIG(val) bfin_write16(TIMER3_CONFIG,val)
216#define bfin_read_TIMER3_COUNTER() bfin_read32(TIMER3_COUNTER)
217#define bfin_write_TIMER3_COUNTER(val) bfin_write32(TIMER3_COUNTER,val)
218#define bfin_read_TIMER3_PERIOD() bfin_read32(TIMER3_PERIOD)
219#define bfin_write_TIMER3_PERIOD(val) bfin_write32(TIMER3_PERIOD,val)
220#define bfin_read_TIMER3_WIDTH() bfin_read32(TIMER3_WIDTH)
221#define bfin_write_TIMER3_WIDTH(val) bfin_write32(TIMER3_WIDTH,val)
222
223#define bfin_read_TIMER4_CONFIG() bfin_read16(TIMER4_CONFIG)
224#define bfin_write_TIMER4_CONFIG(val) bfin_write16(TIMER4_CONFIG,val)
225#define bfin_read_TIMER4_COUNTER() bfin_read32(TIMER4_COUNTER)
226#define bfin_write_TIMER4_COUNTER(val) bfin_write32(TIMER4_COUNTER,val)
227#define bfin_read_TIMER4_PERIOD() bfin_read32(TIMER4_PERIOD)
228#define bfin_write_TIMER4_PERIOD(val) bfin_write32(TIMER4_PERIOD,val)
229#define bfin_read_TIMER4_WIDTH() bfin_read32(TIMER4_WIDTH)
230#define bfin_write_TIMER4_WIDTH(val) bfin_write32(TIMER4_WIDTH,val)
231
232#define bfin_read_TIMER5_CONFIG() bfin_read16(TIMER5_CONFIG)
233#define bfin_write_TIMER5_CONFIG(val) bfin_write16(TIMER5_CONFIG,val)
234#define bfin_read_TIMER5_COUNTER() bfin_read32(TIMER5_COUNTER)
235#define bfin_write_TIMER5_COUNTER(val) bfin_write32(TIMER5_COUNTER,val)
236#define bfin_read_TIMER5_PERIOD() bfin_read32(TIMER5_PERIOD)
237#define bfin_write_TIMER5_PERIOD(val) bfin_write32(TIMER5_PERIOD,val)
238#define bfin_read_TIMER5_WIDTH() bfin_read32(TIMER5_WIDTH)
239#define bfin_write_TIMER5_WIDTH(val) bfin_write32(TIMER5_WIDTH,val)
240
241#define bfin_read_TIMER6_CONFIG() bfin_read16(TIMER6_CONFIG)
242#define bfin_write_TIMER6_CONFIG(val) bfin_write16(TIMER6_CONFIG,val)
243#define bfin_read_TIMER6_COUNTER() bfin_read32(TIMER6_COUNTER)
244#define bfin_write_TIMER6_COUNTER(val) bfin_write32(TIMER6_COUNTER,val)
245#define bfin_read_TIMER6_PERIOD() bfin_read32(TIMER6_PERIOD)
246#define bfin_write_TIMER6_PERIOD(val) bfin_write32(TIMER6_PERIOD,val)
247#define bfin_read_TIMER6_WIDTH() bfin_read32(TIMER6_WIDTH)
248#define bfin_write_TIMER6_WIDTH(val) bfin_write32(TIMER6_WIDTH,val)
249
250#define bfin_read_TIMER7_CONFIG() bfin_read16(TIMER7_CONFIG)
251#define bfin_write_TIMER7_CONFIG(val) bfin_write16(TIMER7_CONFIG,val)
252#define bfin_read_TIMER7_COUNTER() bfin_read32(TIMER7_COUNTER)
253#define bfin_write_TIMER7_COUNTER(val) bfin_write32(TIMER7_COUNTER,val)
254#define bfin_read_TIMER7_PERIOD() bfin_read32(TIMER7_PERIOD)
255#define bfin_write_TIMER7_PERIOD(val) bfin_write32(TIMER7_PERIOD,val)
256#define bfin_read_TIMER7_WIDTH() bfin_read32(TIMER7_WIDTH)
257#define bfin_write_TIMER7_WIDTH(val) bfin_write32(TIMER7_WIDTH,val)
258
259#define bfin_read_TIMER_ENABLE() bfin_read16(TIMER_ENABLE)
260#define bfin_write_TIMER_ENABLE(val) bfin_write16(TIMER_ENABLE,val)
261#define bfin_read_TIMER_DISABLE() bfin_read16(TIMER_DISABLE)
262#define bfin_write_TIMER_DISABLE(val) bfin_write16(TIMER_DISABLE,val)
263#define bfin_read_TIMER_STATUS() bfin_read32(TIMER_STATUS)
264#define bfin_write_TIMER_STATUS(val) bfin_write32(TIMER_STATUS,val)
265
266/* General Purpose I/O Port F (0xFFC00700 - 0xFFC007FF) */
267#define bfin_read_PORTFIO() bfin_read16(PORTFIO)
268#define bfin_write_PORTFIO(val) bfin_write16(PORTFIO,val)
269#define bfin_read_PORTFIO_CLEAR() bfin_read16(PORTFIO_CLEAR)
270#define bfin_write_PORTFIO_CLEAR(val) bfin_write16(PORTFIO_CLEAR,val)
271#define bfin_read_PORTFIO_SET() bfin_read16(PORTFIO_SET)
272#define bfin_write_PORTFIO_SET(val) bfin_write16(PORTFIO_SET,val)
273#define bfin_read_PORTFIO_TOGGLE() bfin_read16(PORTFIO_TOGGLE)
274#define bfin_write_PORTFIO_TOGGLE(val) bfin_write16(PORTFIO_TOGGLE,val)
275#define bfin_read_PORTFIO_MASKA() bfin_read16(PORTFIO_MASKA)
276#define bfin_write_PORTFIO_MASKA(val) bfin_write16(PORTFIO_MASKA,val)
277#define bfin_read_PORTFIO_MASKA_CLEAR() bfin_read16(PORTFIO_MASKA_CLEAR)
278#define bfin_write_PORTFIO_MASKA_CLEAR(val) bfin_write16(PORTFIO_MASKA_CLEAR,val)
279#define bfin_read_PORTFIO_MASKA_SET() bfin_read16(PORTFIO_MASKA_SET)
280#define bfin_write_PORTFIO_MASKA_SET(val) bfin_write16(PORTFIO_MASKA_SET,val)
281#define bfin_read_PORTFIO_MASKA_TOGGLE() bfin_read16(PORTFIO_MASKA_TOGGLE)
282#define bfin_write_PORTFIO_MASKA_TOGGLE(val) bfin_write16(PORTFIO_MASKA_TOGGLE,val)
283#define bfin_read_PORTFIO_MASKB() bfin_read16(PORTFIO_MASKB)
284#define bfin_write_PORTFIO_MASKB(val) bfin_write16(PORTFIO_MASKB,val)
285#define bfin_read_PORTFIO_MASKB_CLEAR() bfin_read16(PORTFIO_MASKB_CLEAR)
286#define bfin_write_PORTFIO_MASKB_CLEAR(val) bfin_write16(PORTFIO_MASKB_CLEAR,val)
287#define bfin_read_PORTFIO_MASKB_SET() bfin_read16(PORTFIO_MASKB_SET)
288#define bfin_write_PORTFIO_MASKB_SET(val) bfin_write16(PORTFIO_MASKB_SET,val)
289#define bfin_read_PORTFIO_MASKB_TOGGLE() bfin_read16(PORTFIO_MASKB_TOGGLE)
290#define bfin_write_PORTFIO_MASKB_TOGGLE(val) bfin_write16(PORTFIO_MASKB_TOGGLE,val)
291#define bfin_read_PORTFIO_DIR() bfin_read16(PORTFIO_DIR)
292#define bfin_write_PORTFIO_DIR(val) bfin_write16(PORTFIO_DIR,val)
293#define bfin_read_PORTFIO_POLAR() bfin_read16(PORTFIO_POLAR)
294#define bfin_write_PORTFIO_POLAR(val) bfin_write16(PORTFIO_POLAR,val)
295#define bfin_read_PORTFIO_EDGE() bfin_read16(PORTFIO_EDGE)
296#define bfin_write_PORTFIO_EDGE(val) bfin_write16(PORTFIO_EDGE,val)
297#define bfin_read_PORTFIO_BOTH() bfin_read16(PORTFIO_BOTH)
298#define bfin_write_PORTFIO_BOTH(val) bfin_write16(PORTFIO_BOTH,val)
299#define bfin_read_PORTFIO_INEN() bfin_read16(PORTFIO_INEN)
300#define bfin_write_PORTFIO_INEN(val) bfin_write16(PORTFIO_INEN,val)
301
302/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
303#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
304#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1,val)
305#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
306#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2,val)
307#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
308#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV,val)
309#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
310#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV,val)
311#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
312#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX,val)
313#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
314#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX,val)
315#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX)
316#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX,val)
317#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX)
318#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX,val)
319#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX)
320#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX,val)
321#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX)
322#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX,val)
323#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
324#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1,val)
325#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
326#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2,val)
327#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
328#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV,val)
329#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
330#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV,val)
331#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
332#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT,val)
333#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
334#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL,val)
335#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
336#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1,val)
337#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
338#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2,val)
339#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
340#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0,val)
341#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
342#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1,val)
343#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
344#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2,val)
345#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
346#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3,val)
347#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
348#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0,val)
349#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
350#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1,val)
351#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
352#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2,val)
353#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
354#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3,val)
355
356/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
357#define bfin_read_SPORT1_TCR1() bfin_read16(SPORT1_TCR1)
358#define bfin_write_SPORT1_TCR1(val) bfin_write16(SPORT1_TCR1,val)
359#define bfin_read_SPORT1_TCR2() bfin_read16(SPORT1_TCR2)
360#define bfin_write_SPORT1_TCR2(val) bfin_write16(SPORT1_TCR2,val)
361#define bfin_read_SPORT1_TCLKDIV() bfin_read16(SPORT1_TCLKDIV)
362#define bfin_write_SPORT1_TCLKDIV(val) bfin_write16(SPORT1_TCLKDIV,val)
363#define bfin_read_SPORT1_TFSDIV() bfin_read16(SPORT1_TFSDIV)
364#define bfin_write_SPORT1_TFSDIV(val) bfin_write16(SPORT1_TFSDIV,val)
365#define bfin_read_SPORT1_TX() bfin_read32(SPORT1_TX)
366#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX,val)
367#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
368#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX,val)
369#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX)
370#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX,val)
371#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX)
372#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX,val)
373#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX)
374#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX,val)
375#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX)
376#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX,val)
377#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
378#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1,val)
379#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
380#define bfin_write_SPORT1_RCR2(val) bfin_write16(SPORT1_RCR2,val)
381#define bfin_read_SPORT1_RCLKDIV() bfin_read16(SPORT1_RCLKDIV)
382#define bfin_write_SPORT1_RCLKDIV(val) bfin_write16(SPORT1_RCLKDIV,val)
383#define bfin_read_SPORT1_RFSDIV() bfin_read16(SPORT1_RFSDIV)
384#define bfin_write_SPORT1_RFSDIV(val) bfin_write16(SPORT1_RFSDIV,val)
385#define bfin_read_SPORT1_STAT() bfin_read16(SPORT1_STAT)
386#define bfin_write_SPORT1_STAT(val) bfin_write16(SPORT1_STAT,val)
387#define bfin_read_SPORT1_CHNL() bfin_read16(SPORT1_CHNL)
388#define bfin_write_SPORT1_CHNL(val) bfin_write16(SPORT1_CHNL,val)
389#define bfin_read_SPORT1_MCMC1() bfin_read16(SPORT1_MCMC1)
390#define bfin_write_SPORT1_MCMC1(val) bfin_write16(SPORT1_MCMC1,val)
391#define bfin_read_SPORT1_MCMC2() bfin_read16(SPORT1_MCMC2)
392#define bfin_write_SPORT1_MCMC2(val) bfin_write16(SPORT1_MCMC2,val)
393#define bfin_read_SPORT1_MTCS0() bfin_read32(SPORT1_MTCS0)
394#define bfin_write_SPORT1_MTCS0(val) bfin_write32(SPORT1_MTCS0,val)
395#define bfin_read_SPORT1_MTCS1() bfin_read32(SPORT1_MTCS1)
396#define bfin_write_SPORT1_MTCS1(val) bfin_write32(SPORT1_MTCS1,val)
397#define bfin_read_SPORT1_MTCS2() bfin_read32(SPORT1_MTCS2)
398#define bfin_write_SPORT1_MTCS2(val) bfin_write32(SPORT1_MTCS2,val)
399#define bfin_read_SPORT1_MTCS3() bfin_read32(SPORT1_MTCS3)
400#define bfin_write_SPORT1_MTCS3(val) bfin_write32(SPORT1_MTCS3,val)
401#define bfin_read_SPORT1_MRCS0() bfin_read32(SPORT1_MRCS0)
402#define bfin_write_SPORT1_MRCS0(val) bfin_write32(SPORT1_MRCS0,val)
403#define bfin_read_SPORT1_MRCS1() bfin_read32(SPORT1_MRCS1)
404#define bfin_write_SPORT1_MRCS1(val) bfin_write32(SPORT1_MRCS1,val)
405#define bfin_read_SPORT1_MRCS2() bfin_read32(SPORT1_MRCS2)
406#define bfin_write_SPORT1_MRCS2(val) bfin_write32(SPORT1_MRCS2,val)
407#define bfin_read_SPORT1_MRCS3() bfin_read32(SPORT1_MRCS3)
408#define bfin_write_SPORT1_MRCS3(val) bfin_write32(SPORT1_MRCS3,val)
409
410/* External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
411#define bfin_read_EBIU_AMGCTL() bfin_read16(EBIU_AMGCTL)
412#define bfin_write_EBIU_AMGCTL(val) bfin_write16(EBIU_AMGCTL,val)
413#define bfin_read_EBIU_AMBCTL0() bfin_read32(EBIU_AMBCTL0)
414#define bfin_write_EBIU_AMBCTL0(val) bfin_write32(EBIU_AMBCTL0,val)
415#define bfin_read_EBIU_AMBCTL1() bfin_read32(EBIU_AMBCTL1)
416#define bfin_write_EBIU_AMBCTL1(val) bfin_write32(EBIU_AMBCTL1,val)
417#define bfin_read_EBIU_SDGCTL() bfin_read32(EBIU_SDGCTL)
418#define bfin_write_EBIU_SDGCTL(val) bfin_write32(EBIU_SDGCTL,val)
419#define bfin_read_EBIU_SDBCTL() bfin_read16(EBIU_SDBCTL)
420#define bfin_write_EBIU_SDBCTL(val) bfin_write16(EBIU_SDBCTL,val)
421#define bfin_read_EBIU_SDRRC() bfin_read16(EBIU_SDRRC)
422#define bfin_write_EBIU_SDRRC(val) bfin_write16(EBIU_SDRRC,val)
423#define bfin_read_EBIU_SDSTAT() bfin_read16(EBIU_SDSTAT)
424#define bfin_write_EBIU_SDSTAT(val) bfin_write16(EBIU_SDSTAT,val)
425
426/* DMA Traffic Control Registers */
427#define bfin_read_DMA_TC_PER() bfin_read16(DMA_TC_PER)
428#define bfin_write_DMA_TC_PER(val) bfin_write16(DMA_TC_PER,val)
429#define bfin_read_DMA_TC_CNT() bfin_read16(DMA_TC_CNT)
430#define bfin_write_DMA_TC_CNT(val) bfin_write16(DMA_TC_CNT,val)
431
432/* Alternate deprecated register names (below) provided for backwards code compatibility */
433#define bfin_read_DMA_TCPER() bfin_read16(DMA_TCPER)
434#define bfin_write_DMA_TCPER(val) bfin_write16(DMA_TCPER,val)
435#define bfin_read_DMA_TCCNT() bfin_read16(DMA_TCCNT)
436#define bfin_write_DMA_TCCNT(val) bfin_write16(DMA_TCCNT,val)
437
438/* DMA Controller */
439#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
440#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val)
441#define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR)
442#define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR,val)
443#define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR)
444#define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR,val)
445#define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT)
446#define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT,val)
447#define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT)
448#define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT,val)
449#define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY)
450#define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY,val)
451#define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY)
452#define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY,val)
453#define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR)
454#define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR,val)
455#define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR)
456#define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR,val)
457#define bfin_read_DMA0_CURR_X_COUNT() bfin_read16(DMA0_CURR_X_COUNT)
458#define bfin_write_DMA0_CURR_X_COUNT(val) bfin_write16(DMA0_CURR_X_COUNT,val)
459#define bfin_read_DMA0_CURR_Y_COUNT() bfin_read16(DMA0_CURR_Y_COUNT)
460#define bfin_write_DMA0_CURR_Y_COUNT(val) bfin_write16(DMA0_CURR_Y_COUNT,val)
461#define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS)
462#define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS,val)
463#define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP)
464#define bfin_write_DMA0_PERIPHERAL_MAP(val) bfin_write16(DMA0_PERIPHERAL_MAP,val)
465
466#define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG)
467#define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG,val)
468#define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR)
469#define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR,val)
470#define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR)
471#define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR,val)
472#define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT)
473#define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT,val)
474#define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT)
475#define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT,val)
476#define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY)
477#define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY,val)
478#define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY)
479#define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY,val)
480#define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR)
481#define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR,val)
482#define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR)
483#define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR,val)
484#define bfin_read_DMA1_CURR_X_COUNT() bfin_read16(DMA1_CURR_X_COUNT)
485#define bfin_write_DMA1_CURR_X_COUNT(val) bfin_write16(DMA1_CURR_X_COUNT,val)
486#define bfin_read_DMA1_CURR_Y_COUNT() bfin_read16(DMA1_CURR_Y_COUNT)
487#define bfin_write_DMA1_CURR_Y_COUNT(val) bfin_write16(DMA1_CURR_Y_COUNT,val)
488#define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS)
489#define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS,val)
490#define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP)
491#define bfin_write_DMA1_PERIPHERAL_MAP(val) bfin_write16(DMA1_PERIPHERAL_MAP,val)
492
493#define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG)
494#define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG,val)
495#define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR)
496#define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR,val)
497#define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR)
498#define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR,val)
499#define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT)
500#define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT,val)
501#define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT)
502#define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT,val)
503#define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY)
504#define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY,val)
505#define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY)
506#define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY,val)
507#define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR)
508#define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR,val)
509#define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR)
510#define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR,val)
511#define bfin_read_DMA2_CURR_X_COUNT() bfin_read16(DMA2_CURR_X_COUNT)
512#define bfin_write_DMA2_CURR_X_COUNT(val) bfin_write16(DMA2_CURR_X_COUNT,val)
513#define bfin_read_DMA2_CURR_Y_COUNT() bfin_read16(DMA2_CURR_Y_COUNT)
514#define bfin_write_DMA2_CURR_Y_COUNT(val) bfin_write16(DMA2_CURR_Y_COUNT,val)
515#define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS)
516#define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS,val)
517#define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP)
518#define bfin_write_DMA2_PERIPHERAL_MAP(val) bfin_write16(DMA2_PERIPHERAL_MAP,val)
519
520#define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG)
521#define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG,val)
522#define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR)
523#define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR,val)
524#define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR)
525#define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR,val)
526#define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT)
527#define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT,val)
528#define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT)
529#define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT,val)
530#define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY)
531#define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY,val)
532#define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY)
533#define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY,val)
534#define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR)
535#define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR,val)
536#define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR)
537#define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR,val)
538#define bfin_read_DMA3_CURR_X_COUNT() bfin_read16(DMA3_CURR_X_COUNT)
539#define bfin_write_DMA3_CURR_X_COUNT(val) bfin_write16(DMA3_CURR_X_COUNT,val)
540#define bfin_read_DMA3_CURR_Y_COUNT() bfin_read16(DMA3_CURR_Y_COUNT)
541#define bfin_write_DMA3_CURR_Y_COUNT(val) bfin_write16(DMA3_CURR_Y_COUNT,val)
542#define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS)
543#define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS,val)
544#define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP)
545#define bfin_write_DMA3_PERIPHERAL_MAP(val) bfin_write16(DMA3_PERIPHERAL_MAP,val)
546
547#define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG)
548#define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG,val)
549#define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR)
550#define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR,val)
551#define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR)
552#define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR,val)
553#define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT)
554#define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT,val)
555#define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT)
556#define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT,val)
557#define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY)
558#define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY,val)
559#define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY)
560#define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY,val)
561#define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR)
562#define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR,val)
563#define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR)
564#define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR,val)
565#define bfin_read_DMA4_CURR_X_COUNT() bfin_read16(DMA4_CURR_X_COUNT)
566#define bfin_write_DMA4_CURR_X_COUNT(val) bfin_write16(DMA4_CURR_X_COUNT,val)
567#define bfin_read_DMA4_CURR_Y_COUNT() bfin_read16(DMA4_CURR_Y_COUNT)
568#define bfin_write_DMA4_CURR_Y_COUNT(val) bfin_write16(DMA4_CURR_Y_COUNT,val)
569#define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS)
570#define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS,val)
571#define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP)
572#define bfin_write_DMA4_PERIPHERAL_MAP(val) bfin_write16(DMA4_PERIPHERAL_MAP,val)
573
574#define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG)
575#define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG,val)
576#define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR)
577#define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR,val)
578#define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR)
579#define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR,val)
580#define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT)
581#define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT,val)
582#define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT)
583#define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT,val)
584#define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY)
585#define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY,val)
586#define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY)
587#define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY,val)
588#define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR)
589#define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR,val)
590#define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR)
591#define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR,val)
592#define bfin_read_DMA5_CURR_X_COUNT() bfin_read16(DMA5_CURR_X_COUNT)
593#define bfin_write_DMA5_CURR_X_COUNT(val) bfin_write16(DMA5_CURR_X_COUNT,val)
594#define bfin_read_DMA5_CURR_Y_COUNT() bfin_read16(DMA5_CURR_Y_COUNT)
595#define bfin_write_DMA5_CURR_Y_COUNT(val) bfin_write16(DMA5_CURR_Y_COUNT,val)
596#define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS)
597#define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS,val)
598#define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP)
599#define bfin_write_DMA5_PERIPHERAL_MAP(val) bfin_write16(DMA5_PERIPHERAL_MAP,val)
600
601#define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG)
602#define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG,val)
603#define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR)
604#define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR,val)
605#define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR)
606#define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR,val)
607#define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT)
608#define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT,val)
609#define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT)
610#define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT,val)
611#define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY)
612#define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY,val)
613#define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY)
614#define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY,val)
615#define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR)
616#define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR,val)
617#define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR)
618#define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR,val)
619#define bfin_read_DMA6_CURR_X_COUNT() bfin_read16(DMA6_CURR_X_COUNT)
620#define bfin_write_DMA6_CURR_X_COUNT(val) bfin_write16(DMA6_CURR_X_COUNT,val)
621#define bfin_read_DMA6_CURR_Y_COUNT() bfin_read16(DMA6_CURR_Y_COUNT)
622#define bfin_write_DMA6_CURR_Y_COUNT(val) bfin_write16(DMA6_CURR_Y_COUNT,val)
623#define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS)
624#define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS,val)
625#define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP)
626#define bfin_write_DMA6_PERIPHERAL_MAP(val) bfin_write16(DMA6_PERIPHERAL_MAP,val)
627
628#define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG)
629#define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG,val)
630#define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR)
631#define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR,val)
632#define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR)
633#define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR,val)
634#define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT)
635#define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT,val)
636#define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT)
637#define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT,val)
638#define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY)
639#define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY,val)
640#define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY)
641#define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY,val)
642#define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR)
643#define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR,val)
644#define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR)
645#define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR,val)
646#define bfin_read_DMA7_CURR_X_COUNT() bfin_read16(DMA7_CURR_X_COUNT)
647#define bfin_write_DMA7_CURR_X_COUNT(val) bfin_write16(DMA7_CURR_X_COUNT,val)
648#define bfin_read_DMA7_CURR_Y_COUNT() bfin_read16(DMA7_CURR_Y_COUNT)
649#define bfin_write_DMA7_CURR_Y_COUNT(val) bfin_write16(DMA7_CURR_Y_COUNT,val)
650#define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS)
651#define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS,val)
652#define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP)
653#define bfin_write_DMA7_PERIPHERAL_MAP(val) bfin_write16(DMA7_PERIPHERAL_MAP,val)
654
655#define bfin_read_DMA8_CONFIG() bfin_read16(DMA8_CONFIG)
656#define bfin_write_DMA8_CONFIG(val) bfin_write16(DMA8_CONFIG,val)
657#define bfin_read_DMA8_NEXT_DESC_PTR() bfin_read32(DMA8_NEXT_DESC_PTR)
658#define bfin_write_DMA8_NEXT_DESC_PTR(val) bfin_write32(DMA8_NEXT_DESC_PTR,val)
659#define bfin_read_DMA8_START_ADDR() bfin_read32(DMA8_START_ADDR)
660#define bfin_write_DMA8_START_ADDR(val) bfin_write32(DMA8_START_ADDR,val)
661#define bfin_read_DMA8_X_COUNT() bfin_read16(DMA8_X_COUNT)
662#define bfin_write_DMA8_X_COUNT(val) bfin_write16(DMA8_X_COUNT,val)
663#define bfin_read_DMA8_Y_COUNT() bfin_read16(DMA8_Y_COUNT)
664#define bfin_write_DMA8_Y_COUNT(val) bfin_write16(DMA8_Y_COUNT,val)
665#define bfin_read_DMA8_X_MODIFY() bfin_read16(DMA8_X_MODIFY)
666#define bfin_write_DMA8_X_MODIFY(val) bfin_write16(DMA8_X_MODIFY,val)
667#define bfin_read_DMA8_Y_MODIFY() bfin_read16(DMA8_Y_MODIFY)
668#define bfin_write_DMA8_Y_MODIFY(val) bfin_write16(DMA8_Y_MODIFY,val)
669#define bfin_read_DMA8_CURR_DESC_PTR() bfin_read32(DMA8_CURR_DESC_PTR)
670#define bfin_write_DMA8_CURR_DESC_PTR(val) bfin_write32(DMA8_CURR_DESC_PTR,val)
671#define bfin_read_DMA8_CURR_ADDR() bfin_read32(DMA8_CURR_ADDR)
672#define bfin_write_DMA8_CURR_ADDR(val) bfin_write32(DMA8_CURR_ADDR,val)
673#define bfin_read_DMA8_CURR_X_COUNT() bfin_read16(DMA8_CURR_X_COUNT)
674#define bfin_write_DMA8_CURR_X_COUNT(val) bfin_write16(DMA8_CURR_X_COUNT,val)
675#define bfin_read_DMA8_CURR_Y_COUNT() bfin_read16(DMA8_CURR_Y_COUNT)
676#define bfin_write_DMA8_CURR_Y_COUNT(val) bfin_write16(DMA8_CURR_Y_COUNT,val)
677#define bfin_read_DMA8_IRQ_STATUS() bfin_read16(DMA8_IRQ_STATUS)
678#define bfin_write_DMA8_IRQ_STATUS(val) bfin_write16(DMA8_IRQ_STATUS,val)
679#define bfin_read_DMA8_PERIPHERAL_MAP() bfin_read16(DMA8_PERIPHERAL_MAP)
680#define bfin_write_DMA8_PERIPHERAL_MAP(val) bfin_write16(DMA8_PERIPHERAL_MAP,val)
681
682#define bfin_read_DMA9_CONFIG() bfin_read16(DMA9_CONFIG)
683#define bfin_write_DMA9_CONFIG(val) bfin_write16(DMA9_CONFIG,val)
684#define bfin_read_DMA9_NEXT_DESC_PTR() bfin_read32(DMA9_NEXT_DESC_PTR)
685#define bfin_write_DMA9_NEXT_DESC_PTR(val) bfin_write32(DMA9_NEXT_DESC_PTR,val)
686#define bfin_read_DMA9_START_ADDR() bfin_read32(DMA9_START_ADDR)
687#define bfin_write_DMA9_START_ADDR(val) bfin_write32(DMA9_START_ADDR,val)
688#define bfin_read_DMA9_X_COUNT() bfin_read16(DMA9_X_COUNT)
689#define bfin_write_DMA9_X_COUNT(val) bfin_write16(DMA9_X_COUNT,val)
690#define bfin_read_DMA9_Y_COUNT() bfin_read16(DMA9_Y_COUNT)
691#define bfin_write_DMA9_Y_COUNT(val) bfin_write16(DMA9_Y_COUNT,val)
692#define bfin_read_DMA9_X_MODIFY() bfin_read16(DMA9_X_MODIFY)
693#define bfin_write_DMA9_X_MODIFY(val) bfin_write16(DMA9_X_MODIFY,val)
694#define bfin_read_DMA9_Y_MODIFY() bfin_read16(DMA9_Y_MODIFY)
695#define bfin_write_DMA9_Y_MODIFY(val) bfin_write16(DMA9_Y_MODIFY,val)
696#define bfin_read_DMA9_CURR_DESC_PTR() bfin_read32(DMA9_CURR_DESC_PTR)
697#define bfin_write_DMA9_CURR_DESC_PTR(val) bfin_write32(DMA9_CURR_DESC_PTR,val)
698#define bfin_read_DMA9_CURR_ADDR() bfin_read32(DMA9_CURR_ADDR)
699#define bfin_write_DMA9_CURR_ADDR(val) bfin_write32(DMA9_CURR_ADDR,val)
700#define bfin_read_DMA9_CURR_X_COUNT() bfin_read16(DMA9_CURR_X_COUNT)
701#define bfin_write_DMA9_CURR_X_COUNT(val) bfin_write16(DMA9_CURR_X_COUNT,val)
702#define bfin_read_DMA9_CURR_Y_COUNT() bfin_read16(DMA9_CURR_Y_COUNT)
703#define bfin_write_DMA9_CURR_Y_COUNT(val) bfin_write16(DMA9_CURR_Y_COUNT,val)
704#define bfin_read_DMA9_IRQ_STATUS() bfin_read16(DMA9_IRQ_STATUS)
705#define bfin_write_DMA9_IRQ_STATUS(val) bfin_write16(DMA9_IRQ_STATUS,val)
706#define bfin_read_DMA9_PERIPHERAL_MAP() bfin_read16(DMA9_PERIPHERAL_MAP)
707#define bfin_write_DMA9_PERIPHERAL_MAP(val) bfin_write16(DMA9_PERIPHERAL_MAP,val)
708
709#define bfin_read_DMA10_CONFIG() bfin_read16(DMA10_CONFIG)
710#define bfin_write_DMA10_CONFIG(val) bfin_write16(DMA10_CONFIG,val)
711#define bfin_read_DMA10_NEXT_DESC_PTR() bfin_read32(DMA10_NEXT_DESC_PTR)
712#define bfin_write_DMA10_NEXT_DESC_PTR(val) bfin_write32(DMA10_NEXT_DESC_PTR,val)
713#define bfin_read_DMA10_START_ADDR() bfin_read32(DMA10_START_ADDR)
714#define bfin_write_DMA10_START_ADDR(val) bfin_write32(DMA10_START_ADDR,val)
715#define bfin_read_DMA10_X_COUNT() bfin_read16(DMA10_X_COUNT)
716#define bfin_write_DMA10_X_COUNT(val) bfin_write16(DMA10_X_COUNT,val)
717#define bfin_read_DMA10_Y_COUNT() bfin_read16(DMA10_Y_COUNT)
718#define bfin_write_DMA10_Y_COUNT(val) bfin_write16(DMA10_Y_COUNT,val)
719#define bfin_read_DMA10_X_MODIFY() bfin_read16(DMA10_X_MODIFY)
720#define bfin_write_DMA10_X_MODIFY(val) bfin_write16(DMA10_X_MODIFY,val)
721#define bfin_read_DMA10_Y_MODIFY() bfin_read16(DMA10_Y_MODIFY)
722#define bfin_write_DMA10_Y_MODIFY(val) bfin_write16(DMA10_Y_MODIFY,val)
723#define bfin_read_DMA10_CURR_DESC_PTR() bfin_read32(DMA10_CURR_DESC_PTR)
724#define bfin_write_DMA10_CURR_DESC_PTR(val) bfin_write32(DMA10_CURR_DESC_PTR,val)
725#define bfin_read_DMA10_CURR_ADDR() bfin_read32(DMA10_CURR_ADDR)
726#define bfin_write_DMA10_CURR_ADDR(val) bfin_write32(DMA10_CURR_ADDR,val)
727#define bfin_read_DMA10_CURR_X_COUNT() bfin_read16(DMA10_CURR_X_COUNT)
728#define bfin_write_DMA10_CURR_X_COUNT(val) bfin_write16(DMA10_CURR_X_COUNT,val)
729#define bfin_read_DMA10_CURR_Y_COUNT() bfin_read16(DMA10_CURR_Y_COUNT)
730#define bfin_write_DMA10_CURR_Y_COUNT(val) bfin_write16(DMA10_CURR_Y_COUNT,val)
731#define bfin_read_DMA10_IRQ_STATUS() bfin_read16(DMA10_IRQ_STATUS)
732#define bfin_write_DMA10_IRQ_STATUS(val) bfin_write16(DMA10_IRQ_STATUS,val)
733#define bfin_read_DMA10_PERIPHERAL_MAP() bfin_read16(DMA10_PERIPHERAL_MAP)
734#define bfin_write_DMA10_PERIPHERAL_MAP(val) bfin_write16(DMA10_PERIPHERAL_MAP,val)
735
736#define bfin_read_DMA11_CONFIG() bfin_read16(DMA11_CONFIG)
737#define bfin_write_DMA11_CONFIG(val) bfin_write16(DMA11_CONFIG,val)
738#define bfin_read_DMA11_NEXT_DESC_PTR() bfin_read32(DMA11_NEXT_DESC_PTR)
739#define bfin_write_DMA11_NEXT_DESC_PTR(val) bfin_write32(DMA11_NEXT_DESC_PTR,val)
740#define bfin_read_DMA11_START_ADDR() bfin_read32(DMA11_START_ADDR)
741#define bfin_write_DMA11_START_ADDR(val) bfin_write32(DMA11_START_ADDR,val)
742#define bfin_read_DMA11_X_COUNT() bfin_read16(DMA11_X_COUNT)
743#define bfin_write_DMA11_X_COUNT(val) bfin_write16(DMA11_X_COUNT,val)
744#define bfin_read_DMA11_Y_COUNT() bfin_read16(DMA11_Y_COUNT)
745#define bfin_write_DMA11_Y_COUNT(val) bfin_write16(DMA11_Y_COUNT,val)
746#define bfin_read_DMA11_X_MODIFY() bfin_read16(DMA11_X_MODIFY)
747#define bfin_write_DMA11_X_MODIFY(val) bfin_write16(DMA11_X_MODIFY,val)
748#define bfin_read_DMA11_Y_MODIFY() bfin_read16(DMA11_Y_MODIFY)
749#define bfin_write_DMA11_Y_MODIFY(val) bfin_write16(DMA11_Y_MODIFY,val)
750#define bfin_read_DMA11_CURR_DESC_PTR() bfin_read32(DMA11_CURR_DESC_PTR)
751#define bfin_write_DMA11_CURR_DESC_PTR(val) bfin_write32(DMA11_CURR_DESC_PTR,val)
752#define bfin_read_DMA11_CURR_ADDR() bfin_read32(DMA11_CURR_ADDR)
753#define bfin_write_DMA11_CURR_ADDR(val) bfin_write32(DMA11_CURR_ADDR,val)
754#define bfin_read_DMA11_CURR_X_COUNT() bfin_read16(DMA11_CURR_X_COUNT)
755#define bfin_write_DMA11_CURR_X_COUNT(val) bfin_write16(DMA11_CURR_X_COUNT,val)
756#define bfin_read_DMA11_CURR_Y_COUNT() bfin_read16(DMA11_CURR_Y_COUNT)
757#define bfin_write_DMA11_CURR_Y_COUNT(val) bfin_write16(DMA11_CURR_Y_COUNT,val)
758#define bfin_read_DMA11_IRQ_STATUS() bfin_read16(DMA11_IRQ_STATUS)
759#define bfin_write_DMA11_IRQ_STATUS(val) bfin_write16(DMA11_IRQ_STATUS,val)
760#define bfin_read_DMA11_PERIPHERAL_MAP() bfin_read16(DMA11_PERIPHERAL_MAP)
761#define bfin_write_DMA11_PERIPHERAL_MAP(val) bfin_write16(DMA11_PERIPHERAL_MAP,val)
762
763#define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG)
764#define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG,val)
765#define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR)
766#define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR,val)
767#define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR)
768#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR,val)
769#define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT)
770#define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT,val)
771#define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT)
772#define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT,val)
773#define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY)
774#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY,val)
775#define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY)
776#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY,val)
777#define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR)
778#define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR,val)
779#define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR)
780#define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR,val)
781#define bfin_read_MDMA_D0_CURR_X_COUNT() bfin_read16(MDMA_D0_CURR_X_COUNT)
782#define bfin_write_MDMA_D0_CURR_X_COUNT(val) bfin_write16(MDMA_D0_CURR_X_COUNT,val)
783#define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT)
784#define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT,val)
785#define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS)
786#define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS,val)
787#define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP)
788#define bfin_write_MDMA_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA_D0_PERIPHERAL_MAP,val)
789
790#define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG)
791#define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG,val)
792#define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR)
793#define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR,val)
794#define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR)
795#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR,val)
796#define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT)
797#define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT,val)
798#define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT)
799#define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT,val)
800#define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY)
801#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY,val)
802#define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY)
803#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY,val)
804#define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR)
805#define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR,val)
806#define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR)
807#define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR,val)
808#define bfin_read_MDMA_S0_CURR_X_COUNT() bfin_read16(MDMA_S0_CURR_X_COUNT)
809#define bfin_write_MDMA_S0_CURR_X_COUNT(val) bfin_write16(MDMA_S0_CURR_X_COUNT,val)
810#define bfin_read_MDMA_S0_CURR_Y_COUNT() bfin_read16(MDMA_S0_CURR_Y_COUNT)
811#define bfin_write_MDMA_S0_CURR_Y_COUNT(val) bfin_write16(MDMA_S0_CURR_Y_COUNT,val)
812#define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS)
813#define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS,val)
814#define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP)
815#define bfin_write_MDMA_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA_S0_PERIPHERAL_MAP,val)
816
817#define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG)
818#define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG,val)
819#define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR)
820#define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR,val)
821#define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR)
822#define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR,val)
823#define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT)
824#define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT,val)
825#define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT)
826#define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT,val)
827#define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY)
828#define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY,val)
829#define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY)
830#define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY,val)
831#define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR)
832#define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR,val)
833#define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR)
834#define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR,val)
835#define bfin_read_MDMA_D1_CURR_X_COUNT() bfin_read16(MDMA_D1_CURR_X_COUNT)
836#define bfin_write_MDMA_D1_CURR_X_COUNT(val) bfin_write16(MDMA_D1_CURR_X_COUNT,val)
837#define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT)
838#define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT,val)
839#define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS)
840#define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS,val)
841#define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP)
842#define bfin_write_MDMA_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA_D1_PERIPHERAL_MAP,val)
843
844#define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG)
845#define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG,val)
846#define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR)
847#define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR,val)
848#define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR)
849#define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR,val)
850#define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT)
851#define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT,val)
852#define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT)
853#define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT,val)
854#define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY)
855#define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY,val)
856#define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY)
857#define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY,val)
858#define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR)
859#define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR,val)
860#define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR)
861#define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR,val)
862#define bfin_read_MDMA_S1_CURR_X_COUNT() bfin_read16(MDMA_S1_CURR_X_COUNT)
863#define bfin_write_MDMA_S1_CURR_X_COUNT(val) bfin_write16(MDMA_S1_CURR_X_COUNT,val)
864#define bfin_read_MDMA_S1_CURR_Y_COUNT() bfin_read16(MDMA_S1_CURR_Y_COUNT)
865#define bfin_write_MDMA_S1_CURR_Y_COUNT(val) bfin_write16(MDMA_S1_CURR_Y_COUNT,val)
866#define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS)
867#define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS,val)
868#define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP)
869#define bfin_write_MDMA_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA_S1_PERIPHERAL_MAP,val)
870
871/* Parallel Peripheral Interface (0xFFC01000 - 0xFFC010FF) */
872#define bfin_read_PPI_CONTROL() bfin_read16(PPI_CONTROL)
873#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL,val)
874#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
875#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS,val)
876#define bfin_clear_PPI_STATUS() bfin_write_PPI_STATUS(0xFFFF)
877#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
878#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY,val)
879#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
880#define bfin_write_PPI_COUNT(val) bfin_write16(PPI_COUNT,val)
881#define bfin_read_PPI_FRAME() bfin_read16(PPI_FRAME)
882#define bfin_write_PPI_FRAME(val) bfin_write16(PPI_FRAME,val)
883
884/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
885
886/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */
887#define bfin_read_PORTGIO() bfin_read16(PORTGIO)
888#define bfin_write_PORTGIO(val) bfin_write16(PORTGIO,val)
889#define bfin_read_PORTGIO_CLEAR() bfin_read16(PORTGIO_CLEAR)
890#define bfin_write_PORTGIO_CLEAR(val) bfin_write16(PORTGIO_CLEAR,val)
891#define bfin_read_PORTGIO_SET() bfin_read16(PORTGIO_SET)
892#define bfin_write_PORTGIO_SET(val) bfin_write16(PORTGIO_SET,val)
893#define bfin_read_PORTGIO_TOGGLE() bfin_read16(PORTGIO_TOGGLE)
894#define bfin_write_PORTGIO_TOGGLE(val) bfin_write16(PORTGIO_TOGGLE,val)
895#define bfin_read_PORTGIO_MASKA() bfin_read16(PORTGIO_MASKA)
896#define bfin_write_PORTGIO_MASKA(val) bfin_write16(PORTGIO_MASKA,val)
897#define bfin_read_PORTGIO_MASKA_CLEAR() bfin_read16(PORTGIO_MASKA_CLEAR)
898#define bfin_write_PORTGIO_MASKA_CLEAR(val) bfin_write16(PORTGIO_MASKA_CLEAR,val)
899#define bfin_read_PORTGIO_MASKA_SET() bfin_read16(PORTGIO_MASKA_SET)
900#define bfin_write_PORTGIO_MASKA_SET(val) bfin_write16(PORTGIO_MASKA_SET,val)
901#define bfin_read_PORTGIO_MASKA_TOGGLE() bfin_read16(PORTGIO_MASKA_TOGGLE)
902#define bfin_write_PORTGIO_MASKA_TOGGLE(val) bfin_write16(PORTGIO_MASKA_TOGGLE,val)
903#define bfin_read_PORTGIO_MASKB() bfin_read16(PORTGIO_MASKB)
904#define bfin_write_PORTGIO_MASKB(val) bfin_write16(PORTGIO_MASKB,val)
905#define bfin_read_PORTGIO_MASKB_CLEAR() bfin_read16(PORTGIO_MASKB_CLEAR)
906#define bfin_write_PORTGIO_MASKB_CLEAR(val) bfin_write16(PORTGIO_MASKB_CLEAR,val)
907#define bfin_read_PORTGIO_MASKB_SET() bfin_read16(PORTGIO_MASKB_SET)
908#define bfin_write_PORTGIO_MASKB_SET(val) bfin_write16(PORTGIO_MASKB_SET,val)
909#define bfin_read_PORTGIO_MASKB_TOGGLE() bfin_read16(PORTGIO_MASKB_TOGGLE)
910#define bfin_write_PORTGIO_MASKB_TOGGLE(val) bfin_write16(PORTGIO_MASKB_TOGGLE,val)
911#define bfin_read_PORTGIO_DIR() bfin_read16(PORTGIO_DIR)
912#define bfin_write_PORTGIO_DIR(val) bfin_write16(PORTGIO_DIR,val)
913#define bfin_read_PORTGIO_POLAR() bfin_read16(PORTGIO_POLAR)
914#define bfin_write_PORTGIO_POLAR(val) bfin_write16(PORTGIO_POLAR,val)
915#define bfin_read_PORTGIO_EDGE() bfin_read16(PORTGIO_EDGE)
916#define bfin_write_PORTGIO_EDGE(val) bfin_write16(PORTGIO_EDGE,val)
917#define bfin_read_PORTGIO_BOTH() bfin_read16(PORTGIO_BOTH)
918#define bfin_write_PORTGIO_BOTH(val) bfin_write16(PORTGIO_BOTH,val)
919#define bfin_read_PORTGIO_INEN() bfin_read16(PORTGIO_INEN)
920#define bfin_write_PORTGIO_INEN(val) bfin_write16(PORTGIO_INEN,val)
921
922/* General Purpose I/O Port H (0xFFC01700 - 0xFFC017FF) */
923#define bfin_read_PORTHIO() bfin_read16(PORTHIO)
924#define bfin_write_PORTHIO(val) bfin_write16(PORTHIO,val)
925#define bfin_read_PORTHIO_CLEAR() bfin_read16(PORTHIO_CLEAR)
926#define bfin_write_PORTHIO_CLEAR(val) bfin_write16(PORTHIO_CLEAR,val)
927#define bfin_read_PORTHIO_SET() bfin_read16(PORTHIO_SET)
928#define bfin_write_PORTHIO_SET(val) bfin_write16(PORTHIO_SET,val)
929#define bfin_read_PORTHIO_TOGGLE() bfin_read16(PORTHIO_TOGGLE)
930#define bfin_write_PORTHIO_TOGGLE(val) bfin_write16(PORTHIO_TOGGLE,val)
931#define bfin_read_PORTHIO_MASKA() bfin_read16(PORTHIO_MASKA)
932#define bfin_write_PORTHIO_MASKA(val) bfin_write16(PORTHIO_MASKA,val)
933#define bfin_read_PORTHIO_MASKA_CLEAR() bfin_read16(PORTHIO_MASKA_CLEAR)
934#define bfin_write_PORTHIO_MASKA_CLEAR(val) bfin_write16(PORTHIO_MASKA_CLEAR,val)
935#define bfin_read_PORTHIO_MASKA_SET() bfin_read16(PORTHIO_MASKA_SET)
936#define bfin_write_PORTHIO_MASKA_SET(val) bfin_write16(PORTHIO_MASKA_SET,val)
937#define bfin_read_PORTHIO_MASKA_TOGGLE() bfin_read16(PORTHIO_MASKA_TOGGLE)
938#define bfin_write_PORTHIO_MASKA_TOGGLE(val) bfin_write16(PORTHIO_MASKA_TOGGLE,val)
939#define bfin_read_PORTHIO_MASKB() bfin_read16(PORTHIO_MASKB)
940#define bfin_write_PORTHIO_MASKB(val) bfin_write16(PORTHIO_MASKB,val)
941#define bfin_read_PORTHIO_MASKB_CLEAR() bfin_read16(PORTHIO_MASKB_CLEAR)
942#define bfin_write_PORTHIO_MASKB_CLEAR(val) bfin_write16(PORTHIO_MASKB_CLEAR,val)
943#define bfin_read_PORTHIO_MASKB_SET() bfin_read16(PORTHIO_MASKB_SET)
944#define bfin_write_PORTHIO_MASKB_SET(val) bfin_write16(PORTHIO_MASKB_SET,val)
945#define bfin_read_PORTHIO_MASKB_TOGGLE() bfin_read16(PORTHIO_MASKB_TOGGLE)
946#define bfin_write_PORTHIO_MASKB_TOGGLE(val) bfin_write16(PORTHIO_MASKB_TOGGLE,val)
947#define bfin_read_PORTHIO_DIR() bfin_read16(PORTHIO_DIR)
948#define bfin_write_PORTHIO_DIR(val) bfin_write16(PORTHIO_DIR,val)
949#define bfin_read_PORTHIO_POLAR() bfin_read16(PORTHIO_POLAR)
950#define bfin_write_PORTHIO_POLAR(val) bfin_write16(PORTHIO_POLAR,val)
951#define bfin_read_PORTHIO_EDGE() bfin_read16(PORTHIO_EDGE)
952#define bfin_write_PORTHIO_EDGE(val) bfin_write16(PORTHIO_EDGE,val)
953#define bfin_read_PORTHIO_BOTH() bfin_read16(PORTHIO_BOTH)
954#define bfin_write_PORTHIO_BOTH(val) bfin_write16(PORTHIO_BOTH,val)
955#define bfin_read_PORTHIO_INEN() bfin_read16(PORTHIO_INEN)
956#define bfin_write_PORTHIO_INEN(val) bfin_write16(PORTHIO_INEN,val)
957
958/* UART1 Controller (0xFFC02000 - 0xFFC020FF) */
959#define bfin_read_UART1_THR() bfin_read16(UART1_THR)
960#define bfin_write_UART1_THR(val) bfin_write16(UART1_THR,val)
961#define bfin_read_UART1_RBR() bfin_read16(UART1_RBR)
962#define bfin_write_UART1_RBR(val) bfin_write16(UART1_RBR,val)
963#define bfin_read_UART1_DLL() bfin_read16(UART1_DLL)
964#define bfin_write_UART1_DLL(val) bfin_write16(UART1_DLL,val)
965#define bfin_read_UART1_IER() bfin_read16(UART1_IER)
966#define bfin_write_UART1_IER(val) bfin_write16(UART1_IER,val)
967#define bfin_read_UART1_DLH() bfin_read16(UART1_DLH)
968#define bfin_write_UART1_DLH(val) bfin_write16(UART1_DLH,val)
969#define bfin_read_UART1_IIR() bfin_read16(UART1_IIR)
970#define bfin_write_UART1_IIR(val) bfin_write16(UART1_IIR,val)
971#define bfin_read_UART1_LCR() bfin_read16(UART1_LCR)
972#define bfin_write_UART1_LCR(val) bfin_write16(UART1_LCR,val)
973#define bfin_read_UART1_MCR() bfin_read16(UART1_MCR)
974#define bfin_write_UART1_MCR(val) bfin_write16(UART1_MCR,val)
975#define bfin_read_UART1_LSR() bfin_read16(UART1_LSR)
976#define bfin_write_UART1_LSR(val) bfin_write16(UART1_LSR,val)
977#define bfin_read_UART1_MSR() bfin_read16(UART1_MSR)
978#define bfin_write_UART1_MSR(val) bfin_write16(UART1_MSR,val)
979#define bfin_read_UART1_SCR() bfin_read16(UART1_SCR)
980#define bfin_write_UART1_SCR(val) bfin_write16(UART1_SCR,val)
981#define bfin_read_UART1_GCTL() bfin_read16(UART1_GCTL)
982#define bfin_write_UART1_GCTL(val) bfin_write16(UART1_GCTL,val)
983
984/* CAN Controller (0xFFC02A00 - 0xFFC02FFF) */
985/* For Mailboxes 0-15 */
986#define bfin_read_CAN_MC1() bfin_read16(CAN_MC1)
987#define bfin_write_CAN_MC1(val) bfin_write16(CAN_MC1,val)
988#define bfin_read_CAN_MD1() bfin_read16(CAN_MD1)
989#define bfin_write_CAN_MD1(val) bfin_write16(CAN_MD1,val)
990#define bfin_read_CAN_TRS1() bfin_read16(CAN_TRS1)
991#define bfin_write_CAN_TRS1(val) bfin_write16(CAN_TRS1,val)
992#define bfin_read_CAN_TRR1() bfin_read16(CAN_TRR1)
993#define bfin_write_CAN_TRR1(val) bfin_write16(CAN_TRR1,val)
994#define bfin_read_CAN_TA1() bfin_read16(CAN_TA1)
995#define bfin_write_CAN_TA1(val) bfin_write16(CAN_TA1,val)
996#define bfin_read_CAN_AA1() bfin_read16(CAN_AA1)
997#define bfin_write_CAN_AA1(val) bfin_write16(CAN_AA1,val)
998#define bfin_read_CAN_RMP1() bfin_read16(CAN_RMP1)
999#define bfin_write_CAN_RMP1(val) bfin_write16(CAN_RMP1,val)
1000#define bfin_read_CAN_RML1() bfin_read16(CAN_RML1)
1001#define bfin_write_CAN_RML1(val) bfin_write16(CAN_RML1,val)
1002#define bfin_read_CAN_MBTIF1() bfin_read16(CAN_MBTIF1)
1003#define bfin_write_CAN_MBTIF1(val) bfin_write16(CAN_MBTIF1,val)
1004#define bfin_read_CAN_MBRIF1() bfin_read16(CAN_MBRIF1)
1005#define bfin_write_CAN_MBRIF1(val) bfin_write16(CAN_MBRIF1,val)
1006#define bfin_read_CAN_MBIM1() bfin_read16(CAN_MBIM1)
1007#define bfin_write_CAN_MBIM1(val) bfin_write16(CAN_MBIM1,val)
1008#define bfin_read_CAN_RFH1() bfin_read16(CAN_RFH1)
1009#define bfin_write_CAN_RFH1(val) bfin_write16(CAN_RFH1,val)
1010#define bfin_read_CAN_OPSS1() bfin_read16(CAN_OPSS1)
1011#define bfin_write_CAN_OPSS1(val) bfin_write16(CAN_OPSS1,val)
1012
1013/* For Mailboxes 16-31 */
1014#define bfin_read_CAN_MC2() bfin_read16(CAN_MC2)
1015#define bfin_write_CAN_MC2(val) bfin_write16(CAN_MC2,val)
1016#define bfin_read_CAN_MD2() bfin_read16(CAN_MD2)
1017#define bfin_write_CAN_MD2(val) bfin_write16(CAN_MD2,val)
1018#define bfin_read_CAN_TRS2() bfin_read16(CAN_TRS2)
1019#define bfin_write_CAN_TRS2(val) bfin_write16(CAN_TRS2,val)
1020#define bfin_read_CAN_TRR2() bfin_read16(CAN_TRR2)
1021#define bfin_write_CAN_TRR2(val) bfin_write16(CAN_TRR2,val)
1022#define bfin_read_CAN_TA2() bfin_read16(CAN_TA2)
1023#define bfin_write_CAN_TA2(val) bfin_write16(CAN_TA2,val)
1024#define bfin_read_CAN_AA2() bfin_read16(CAN_AA2)
1025#define bfin_write_CAN_AA2(val) bfin_write16(CAN_AA2,val)
1026#define bfin_read_CAN_RMP2() bfin_read16(CAN_RMP2)
1027#define bfin_write_CAN_RMP2(val) bfin_write16(CAN_RMP2,val)
1028#define bfin_read_CAN_RML2() bfin_read16(CAN_RML2)
1029#define bfin_write_CAN_RML2(val) bfin_write16(CAN_RML2,val)
1030#define bfin_read_CAN_MBTIF2() bfin_read16(CAN_MBTIF2)
1031#define bfin_write_CAN_MBTIF2(val) bfin_write16(CAN_MBTIF2,val)
1032#define bfin_read_CAN_MBRIF2() bfin_read16(CAN_MBRIF2)
1033#define bfin_write_CAN_MBRIF2(val) bfin_write16(CAN_MBRIF2,val)
1034#define bfin_read_CAN_MBIM2() bfin_read16(CAN_MBIM2)
1035#define bfin_write_CAN_MBIM2(val) bfin_write16(CAN_MBIM2,val)
1036#define bfin_read_CAN_RFH2() bfin_read16(CAN_RFH2)
1037#define bfin_write_CAN_RFH2(val) bfin_write16(CAN_RFH2,val)
1038#define bfin_read_CAN_OPSS2() bfin_read16(CAN_OPSS2)
1039#define bfin_write_CAN_OPSS2(val) bfin_write16(CAN_OPSS2,val)
1040
1041#define bfin_read_CAN_CLOCK() bfin_read16(CAN_CLOCK)
1042#define bfin_write_CAN_CLOCK(val) bfin_write16(CAN_CLOCK,val)
1043#define bfin_read_CAN_TIMING() bfin_read16(CAN_TIMING)
1044#define bfin_write_CAN_TIMING(val) bfin_write16(CAN_TIMING,val)
1045#define bfin_read_CAN_DEBUG() bfin_read16(CAN_DEBUG)
1046#define bfin_write_CAN_DEBUG(val) bfin_write16(CAN_DEBUG,val)
1047#define bfin_read_CAN_STATUS() bfin_read16(CAN_STATUS)
1048#define bfin_write_CAN_STATUS(val) bfin_write16(CAN_STATUS,val)
1049#define bfin_read_CAN_CEC() bfin_read16(CAN_CEC)
1050#define bfin_write_CAN_CEC(val) bfin_write16(CAN_CEC,val)
1051#define bfin_read_CAN_GIS() bfin_read16(CAN_GIS)
1052#define bfin_write_CAN_GIS(val) bfin_write16(CAN_GIS,val)
1053#define bfin_read_CAN_GIM() bfin_read16(CAN_GIM)
1054#define bfin_write_CAN_GIM(val) bfin_write16(CAN_GIM,val)
1055#define bfin_read_CAN_GIF() bfin_read16(CAN_GIF)
1056#define bfin_write_CAN_GIF(val) bfin_write16(CAN_GIF,val)
1057#define bfin_read_CAN_CONTROL() bfin_read16(CAN_CONTROL)
1058#define bfin_write_CAN_CONTROL(val) bfin_write16(CAN_CONTROL,val)
1059#define bfin_read_CAN_INTR() bfin_read16(CAN_INTR)
1060#define bfin_write_CAN_INTR(val) bfin_write16(CAN_INTR,val)
1061#define bfin_read_CAN_SFCMVER() bfin_read16(CAN_SFCMVER)
1062#define bfin_write_CAN_SFCMVER(val) bfin_write16(CAN_SFCMVER,val)
1063#define bfin_read_CAN_MBTD() bfin_read16(CAN_MBTD)
1064#define bfin_write_CAN_MBTD(val) bfin_write16(CAN_MBTD,val)
1065#define bfin_read_CAN_EWR() bfin_read16(CAN_EWR)
1066#define bfin_write_CAN_EWR(val) bfin_write16(CAN_EWR,val)
1067#define bfin_read_CAN_ESR() bfin_read16(CAN_ESR)
1068#define bfin_write_CAN_ESR(val) bfin_write16(CAN_ESR,val)
1069#define bfin_read_CAN_UCREG() bfin_read16(CAN_UCREG)
1070#define bfin_write_CAN_UCREG(val) bfin_write16(CAN_UCREG,val)
1071#define bfin_read_CAN_UCCNT() bfin_read16(CAN_UCCNT)
1072#define bfin_write_CAN_UCCNT(val) bfin_write16(CAN_UCCNT,val)
1073#define bfin_read_CAN_UCRC() bfin_read16(CAN_UCRC)
1074#define bfin_write_CAN_UCRC(val) bfin_write16(CAN_UCRC,val)
1075#define bfin_read_CAN_UCCNF() bfin_read16(CAN_UCCNF)
1076#define bfin_write_CAN_UCCNF(val) bfin_write16(CAN_UCCNF,val)
1077
1078/* Mailbox Acceptance Masks */
1079#define bfin_read_CAN_AM00L() bfin_read16(CAN_AM00L)
1080#define bfin_write_CAN_AM00L(val) bfin_write16(CAN_AM00L,val)
1081#define bfin_read_CAN_AM00H() bfin_read16(CAN_AM00H)
1082#define bfin_write_CAN_AM00H(val) bfin_write16(CAN_AM00H,val)
1083#define bfin_read_CAN_AM01L() bfin_read16(CAN_AM01L)
1084#define bfin_write_CAN_AM01L(val) bfin_write16(CAN_AM01L,val)
1085#define bfin_read_CAN_AM01H() bfin_read16(CAN_AM01H)
1086#define bfin_write_CAN_AM01H(val) bfin_write16(CAN_AM01H,val)
1087#define bfin_read_CAN_AM02L() bfin_read16(CAN_AM02L)
1088#define bfin_write_CAN_AM02L(val) bfin_write16(CAN_AM02L,val)
1089#define bfin_read_CAN_AM02H() bfin_read16(CAN_AM02H)
1090#define bfin_write_CAN_AM02H(val) bfin_write16(CAN_AM02H,val)
1091#define bfin_read_CAN_AM03L() bfin_read16(CAN_AM03L)
1092#define bfin_write_CAN_AM03L(val) bfin_write16(CAN_AM03L,val)
1093#define bfin_read_CAN_AM03H() bfin_read16(CAN_AM03H)
1094#define bfin_write_CAN_AM03H(val) bfin_write16(CAN_AM03H,val)
1095#define bfin_read_CAN_AM04L() bfin_read16(CAN_AM04L)
1096#define bfin_write_CAN_AM04L(val) bfin_write16(CAN_AM04L,val)
1097#define bfin_read_CAN_AM04H() bfin_read16(CAN_AM04H)
1098#define bfin_write_CAN_AM04H(val) bfin_write16(CAN_AM04H,val)
1099#define bfin_read_CAN_AM05L() bfin_read16(CAN_AM05L)
1100#define bfin_write_CAN_AM05L(val) bfin_write16(CAN_AM05L,val)
1101#define bfin_read_CAN_AM05H() bfin_read16(CAN_AM05H)
1102#define bfin_write_CAN_AM05H(val) bfin_write16(CAN_AM05H,val)
1103#define bfin_read_CAN_AM06L() bfin_read16(CAN_AM06L)
1104#define bfin_write_CAN_AM06L(val) bfin_write16(CAN_AM06L,val)
1105#define bfin_read_CAN_AM06H() bfin_read16(CAN_AM06H)
1106#define bfin_write_CAN_AM06H(val) bfin_write16(CAN_AM06H,val)
1107#define bfin_read_CAN_AM07L() bfin_read16(CAN_AM07L)
1108#define bfin_write_CAN_AM07L(val) bfin_write16(CAN_AM07L,val)
1109#define bfin_read_CAN_AM07H() bfin_read16(CAN_AM07H)
1110#define bfin_write_CAN_AM07H(val) bfin_write16(CAN_AM07H,val)
1111#define bfin_read_CAN_AM08L() bfin_read16(CAN_AM08L)
1112#define bfin_write_CAN_AM08L(val) bfin_write16(CAN_AM08L,val)
1113#define bfin_read_CAN_AM08H() bfin_read16(CAN_AM08H)
1114#define bfin_write_CAN_AM08H(val) bfin_write16(CAN_AM08H,val)
1115#define bfin_read_CAN_AM09L() bfin_read16(CAN_AM09L)
1116#define bfin_write_CAN_AM09L(val) bfin_write16(CAN_AM09L,val)
1117#define bfin_read_CAN_AM09H() bfin_read16(CAN_AM09H)
1118#define bfin_write_CAN_AM09H(val) bfin_write16(CAN_AM09H,val)
1119#define bfin_read_CAN_AM10L() bfin_read16(CAN_AM10L)
1120#define bfin_write_CAN_AM10L(val) bfin_write16(CAN_AM10L,val)
1121#define bfin_read_CAN_AM10H() bfin_read16(CAN_AM10H)
1122#define bfin_write_CAN_AM10H(val) bfin_write16(CAN_AM10H,val)
1123#define bfin_read_CAN_AM11L() bfin_read16(CAN_AM11L)
1124#define bfin_write_CAN_AM11L(val) bfin_write16(CAN_AM11L,val)
1125#define bfin_read_CAN_AM11H() bfin_read16(CAN_AM11H)
1126#define bfin_write_CAN_AM11H(val) bfin_write16(CAN_AM11H,val)
1127#define bfin_read_CAN_AM12L() bfin_read16(CAN_AM12L)
1128#define bfin_write_CAN_AM12L(val) bfin_write16(CAN_AM12L,val)
1129#define bfin_read_CAN_AM12H() bfin_read16(CAN_AM12H)
1130#define bfin_write_CAN_AM12H(val) bfin_write16(CAN_AM12H,val)
1131#define bfin_read_CAN_AM13L() bfin_read16(CAN_AM13L)
1132#define bfin_write_CAN_AM13L(val) bfin_write16(CAN_AM13L,val)
1133#define bfin_read_CAN_AM13H() bfin_read16(CAN_AM13H)
1134#define bfin_write_CAN_AM13H(val) bfin_write16(CAN_AM13H,val)
1135#define bfin_read_CAN_AM14L() bfin_read16(CAN_AM14L)
1136#define bfin_write_CAN_AM14L(val) bfin_write16(CAN_AM14L,val)
1137#define bfin_read_CAN_AM14H() bfin_read16(CAN_AM14H)
1138#define bfin_write_CAN_AM14H(val) bfin_write16(CAN_AM14H,val)
1139#define bfin_read_CAN_AM15L() bfin_read16(CAN_AM15L)
1140#define bfin_write_CAN_AM15L(val) bfin_write16(CAN_AM15L,val)
1141#define bfin_read_CAN_AM15H() bfin_read16(CAN_AM15H)
1142#define bfin_write_CAN_AM15H(val) bfin_write16(CAN_AM15H,val)
1143
1144#define bfin_read_CAN_AM16L() bfin_read16(CAN_AM16L)
1145#define bfin_write_CAN_AM16L(val) bfin_write16(CAN_AM16L,val)
1146#define bfin_read_CAN_AM16H() bfin_read16(CAN_AM16H)
1147#define bfin_write_CAN_AM16H(val) bfin_write16(CAN_AM16H,val)
1148#define bfin_read_CAN_AM17L() bfin_read16(CAN_AM17L)
1149#define bfin_write_CAN_AM17L(val) bfin_write16(CAN_AM17L,val)
1150#define bfin_read_CAN_AM17H() bfin_read16(CAN_AM17H)
1151#define bfin_write_CAN_AM17H(val) bfin_write16(CAN_AM17H,val)
1152#define bfin_read_CAN_AM18L() bfin_read16(CAN_AM18L)
1153#define bfin_write_CAN_AM18L(val) bfin_write16(CAN_AM18L,val)
1154#define bfin_read_CAN_AM18H() bfin_read16(CAN_AM18H)
1155#define bfin_write_CAN_AM18H(val) bfin_write16(CAN_AM18H,val)
1156#define bfin_read_CAN_AM19L() bfin_read16(CAN_AM19L)
1157#define bfin_write_CAN_AM19L(val) bfin_write16(CAN_AM19L,val)
1158#define bfin_read_CAN_AM19H() bfin_read16(CAN_AM19H)
1159#define bfin_write_CAN_AM19H(val) bfin_write16(CAN_AM19H,val)
1160#define bfin_read_CAN_AM20L() bfin_read16(CAN_AM20L)
1161#define bfin_write_CAN_AM20L(val) bfin_write16(CAN_AM20L,val)
1162#define bfin_read_CAN_AM20H() bfin_read16(CAN_AM20H)
1163#define bfin_write_CAN_AM20H(val) bfin_write16(CAN_AM20H,val)
1164#define bfin_read_CAN_AM21L() bfin_read16(CAN_AM21L)
1165#define bfin_write_CAN_AM21L(val) bfin_write16(CAN_AM21L,val)
1166#define bfin_read_CAN_AM21H() bfin_read16(CAN_AM21H)
1167#define bfin_write_CAN_AM21H(val) bfin_write16(CAN_AM21H,val)
1168#define bfin_read_CAN_AM22L() bfin_read16(CAN_AM22L)
1169#define bfin_write_CAN_AM22L(val) bfin_write16(CAN_AM22L,val)
1170#define bfin_read_CAN_AM22H() bfin_read16(CAN_AM22H)
1171#define bfin_write_CAN_AM22H(val) bfin_write16(CAN_AM22H,val)
1172#define bfin_read_CAN_AM23L() bfin_read16(CAN_AM23L)
1173#define bfin_write_CAN_AM23L(val) bfin_write16(CAN_AM23L,val)
1174#define bfin_read_CAN_AM23H() bfin_read16(CAN_AM23H)
1175#define bfin_write_CAN_AM23H(val) bfin_write16(CAN_AM23H,val)
1176#define bfin_read_CAN_AM24L() bfin_read16(CAN_AM24L)
1177#define bfin_write_CAN_AM24L(val) bfin_write16(CAN_AM24L,val)
1178#define bfin_read_CAN_AM24H() bfin_read16(CAN_AM24H)
1179#define bfin_write_CAN_AM24H(val) bfin_write16(CAN_AM24H,val)
1180#define bfin_read_CAN_AM25L() bfin_read16(CAN_AM25L)
1181#define bfin_write_CAN_AM25L(val) bfin_write16(CAN_AM25L,val)
1182#define bfin_read_CAN_AM25H() bfin_read16(CAN_AM25H)
1183#define bfin_write_CAN_AM25H(val) bfin_write16(CAN_AM25H,val)
1184#define bfin_read_CAN_AM26L() bfin_read16(CAN_AM26L)
1185#define bfin_write_CAN_AM26L(val) bfin_write16(CAN_AM26L,val)
1186#define bfin_read_CAN_AM26H() bfin_read16(CAN_AM26H)
1187#define bfin_write_CAN_AM26H(val) bfin_write16(CAN_AM26H,val)
1188#define bfin_read_CAN_AM27L() bfin_read16(CAN_AM27L)
1189#define bfin_write_CAN_AM27L(val) bfin_write16(CAN_AM27L,val)
1190#define bfin_read_CAN_AM27H() bfin_read16(CAN_AM27H)
1191#define bfin_write_CAN_AM27H(val) bfin_write16(CAN_AM27H,val)
1192#define bfin_read_CAN_AM28L() bfin_read16(CAN_AM28L)
1193#define bfin_write_CAN_AM28L(val) bfin_write16(CAN_AM28L,val)
1194#define bfin_read_CAN_AM28H() bfin_read16(CAN_AM28H)
1195#define bfin_write_CAN_AM28H(val) bfin_write16(CAN_AM28H,val)
1196#define bfin_read_CAN_AM29L() bfin_read16(CAN_AM29L)
1197#define bfin_write_CAN_AM29L(val) bfin_write16(CAN_AM29L,val)
1198#define bfin_read_CAN_AM29H() bfin_read16(CAN_AM29H)
1199#define bfin_write_CAN_AM29H(val) bfin_write16(CAN_AM29H,val)
1200#define bfin_read_CAN_AM30L() bfin_read16(CAN_AM30L)
1201#define bfin_write_CAN_AM30L(val) bfin_write16(CAN_AM30L,val)
1202#define bfin_read_CAN_AM30H() bfin_read16(CAN_AM30H)
1203#define bfin_write_CAN_AM30H(val) bfin_write16(CAN_AM30H,val)
1204#define bfin_read_CAN_AM31L() bfin_read16(CAN_AM31L)
1205#define bfin_write_CAN_AM31L(val) bfin_write16(CAN_AM31L,val)
1206#define bfin_read_CAN_AM31H() bfin_read16(CAN_AM31H)
1207#define bfin_write_CAN_AM31H(val) bfin_write16(CAN_AM31H,val)
1208
1209/* CAN Acceptance Mask Area Macros */
1210#define bfin_read_CAN_AM_L(x)() bfin_read16(CAN_AM_L(x))
1211#define bfin_write_CAN_AM_L(x)(val) bfin_write16(CAN_AM_L(x),val)
1212#define bfin_read_CAN_AM_H(x)() bfin_read16(CAN_AM_H(x))
1213#define bfin_write_CAN_AM_H(x)(val) bfin_write16(CAN_AM_H(x),val)
1214
1215/* Mailbox Registers */
1216#define bfin_read_CAN_MB00_ID1() bfin_read16(CAN_MB00_ID1)
1217#define bfin_write_CAN_MB00_ID1(val) bfin_write16(CAN_MB00_ID1,val)
1218#define bfin_read_CAN_MB00_ID0() bfin_read16(CAN_MB00_ID0)
1219#define bfin_write_CAN_MB00_ID0(val) bfin_write16(CAN_MB00_ID0,val)
1220#define bfin_read_CAN_MB00_TIMESTAMP() bfin_read16(CAN_MB00_TIMESTAMP)
1221#define bfin_write_CAN_MB00_TIMESTAMP(val) bfin_write16(CAN_MB00_TIMESTAMP,val)
1222#define bfin_read_CAN_MB00_LENGTH() bfin_read16(CAN_MB00_LENGTH)
1223#define bfin_write_CAN_MB00_LENGTH(val) bfin_write16(CAN_MB00_LENGTH,val)
1224#define bfin_read_CAN_MB00_DATA3() bfin_read16(CAN_MB00_DATA3)
1225#define bfin_write_CAN_MB00_DATA3(val) bfin_write16(CAN_MB00_DATA3,val)
1226#define bfin_read_CAN_MB00_DATA2() bfin_read16(CAN_MB00_DATA2)
1227#define bfin_write_CAN_MB00_DATA2(val) bfin_write16(CAN_MB00_DATA2,val)
1228#define bfin_read_CAN_MB00_DATA1() bfin_read16(CAN_MB00_DATA1)
1229#define bfin_write_CAN_MB00_DATA1(val) bfin_write16(CAN_MB00_DATA1,val)
1230#define bfin_read_CAN_MB00_DATA0() bfin_read16(CAN_MB00_DATA0)
1231#define bfin_write_CAN_MB00_DATA0(val) bfin_write16(CAN_MB00_DATA0,val)
1232
1233#define bfin_read_CAN_MB01_ID1() bfin_read16(CAN_MB01_ID1)
1234#define bfin_write_CAN_MB01_ID1(val) bfin_write16(CAN_MB01_ID1,val)
1235#define bfin_read_CAN_MB01_ID0() bfin_read16(CAN_MB01_ID0)
1236#define bfin_write_CAN_MB01_ID0(val) bfin_write16(CAN_MB01_ID0,val)
1237#define bfin_read_CAN_MB01_TIMESTAMP() bfin_read16(CAN_MB01_TIMESTAMP)
1238#define bfin_write_CAN_MB01_TIMESTAMP(val) bfin_write16(CAN_MB01_TIMESTAMP,val)
1239#define bfin_read_CAN_MB01_LENGTH() bfin_read16(CAN_MB01_LENGTH)
1240#define bfin_write_CAN_MB01_LENGTH(val) bfin_write16(CAN_MB01_LENGTH,val)
1241#define bfin_read_CAN_MB01_DATA3() bfin_read16(CAN_MB01_DATA3)
1242#define bfin_write_CAN_MB01_DATA3(val) bfin_write16(CAN_MB01_DATA3,val)
1243#define bfin_read_CAN_MB01_DATA2() bfin_read16(CAN_MB01_DATA2)
1244#define bfin_write_CAN_MB01_DATA2(val) bfin_write16(CAN_MB01_DATA2,val)
1245#define bfin_read_CAN_MB01_DATA1() bfin_read16(CAN_MB01_DATA1)
1246#define bfin_write_CAN_MB01_DATA1(val) bfin_write16(CAN_MB01_DATA1,val)
1247#define bfin_read_CAN_MB01_DATA0() bfin_read16(CAN_MB01_DATA0)
1248#define bfin_write_CAN_MB01_DATA0(val) bfin_write16(CAN_MB01_DATA0,val)
1249
1250#define bfin_read_CAN_MB02_ID1() bfin_read16(CAN_MB02_ID1)
1251#define bfin_write_CAN_MB02_ID1(val) bfin_write16(CAN_MB02_ID1,val)
1252#define bfin_read_CAN_MB02_ID0() bfin_read16(CAN_MB02_ID0)
1253#define bfin_write_CAN_MB02_ID0(val) bfin_write16(CAN_MB02_ID0,val)
1254#define bfin_read_CAN_MB02_TIMESTAMP() bfin_read16(CAN_MB02_TIMESTAMP)
1255#define bfin_write_CAN_MB02_TIMESTAMP(val) bfin_write16(CAN_MB02_TIMESTAMP,val)
1256#define bfin_read_CAN_MB02_LENGTH() bfin_read16(CAN_MB02_LENGTH)
1257#define bfin_write_CAN_MB02_LENGTH(val) bfin_write16(CAN_MB02_LENGTH,val)
1258#define bfin_read_CAN_MB02_DATA3() bfin_read16(CAN_MB02_DATA3)
1259#define bfin_write_CAN_MB02_DATA3(val) bfin_write16(CAN_MB02_DATA3,val)
1260#define bfin_read_CAN_MB02_DATA2() bfin_read16(CAN_MB02_DATA2)
1261#define bfin_write_CAN_MB02_DATA2(val) bfin_write16(CAN_MB02_DATA2,val)
1262#define bfin_read_CAN_MB02_DATA1() bfin_read16(CAN_MB02_DATA1)
1263#define bfin_write_CAN_MB02_DATA1(val) bfin_write16(CAN_MB02_DATA1,val)
1264#define bfin_read_CAN_MB02_DATA0() bfin_read16(CAN_MB02_DATA0)
1265#define bfin_write_CAN_MB02_DATA0(val) bfin_write16(CAN_MB02_DATA0,val)
1266
1267#define bfin_read_CAN_MB03_ID1() bfin_read16(CAN_MB03_ID1)
1268#define bfin_write_CAN_MB03_ID1(val) bfin_write16(CAN_MB03_ID1,val)
1269#define bfin_read_CAN_MB03_ID0() bfin_read16(CAN_MB03_ID0)
1270#define bfin_write_CAN_MB03_ID0(val) bfin_write16(CAN_MB03_ID0,val)
1271#define bfin_read_CAN_MB03_TIMESTAMP() bfin_read16(CAN_MB03_TIMESTAMP)
1272#define bfin_write_CAN_MB03_TIMESTAMP(val) bfin_write16(CAN_MB03_TIMESTAMP,val)
1273#define bfin_read_CAN_MB03_LENGTH() bfin_read16(CAN_MB03_LENGTH)
1274#define bfin_write_CAN_MB03_LENGTH(val) bfin_write16(CAN_MB03_LENGTH,val)
1275#define bfin_read_CAN_MB03_DATA3() bfin_read16(CAN_MB03_DATA3)
1276#define bfin_write_CAN_MB03_DATA3(val) bfin_write16(CAN_MB03_DATA3,val)
1277#define bfin_read_CAN_MB03_DATA2() bfin_read16(CAN_MB03_DATA2)
1278#define bfin_write_CAN_MB03_DATA2(val) bfin_write16(CAN_MB03_DATA2,val)
1279#define bfin_read_CAN_MB03_DATA1() bfin_read16(CAN_MB03_DATA1)
1280#define bfin_write_CAN_MB03_DATA1(val) bfin_write16(CAN_MB03_DATA1,val)
1281#define bfin_read_CAN_MB03_DATA0() bfin_read16(CAN_MB03_DATA0)
1282#define bfin_write_CAN_MB03_DATA0(val) bfin_write16(CAN_MB03_DATA0,val)
1283
1284#define bfin_read_CAN_MB04_ID1() bfin_read16(CAN_MB04_ID1)
1285#define bfin_write_CAN_MB04_ID1(val) bfin_write16(CAN_MB04_ID1,val)
1286#define bfin_read_CAN_MB04_ID0() bfin_read16(CAN_MB04_ID0)
1287#define bfin_write_CAN_MB04_ID0(val) bfin_write16(CAN_MB04_ID0,val)
1288#define bfin_read_CAN_MB04_TIMESTAMP() bfin_read16(CAN_MB04_TIMESTAMP)
1289#define bfin_write_CAN_MB04_TIMESTAMP(val) bfin_write16(CAN_MB04_TIMESTAMP,val)
1290#define bfin_read_CAN_MB04_LENGTH() bfin_read16(CAN_MB04_LENGTH)
1291#define bfin_write_CAN_MB04_LENGTH(val) bfin_write16(CAN_MB04_LENGTH,val)
1292#define bfin_read_CAN_MB04_DATA3() bfin_read16(CAN_MB04_DATA3)
1293#define bfin_write_CAN_MB04_DATA3(val) bfin_write16(CAN_MB04_DATA3,val)
1294#define bfin_read_CAN_MB04_DATA2() bfin_read16(CAN_MB04_DATA2)
1295#define bfin_write_CAN_MB04_DATA2(val) bfin_write16(CAN_MB04_DATA2,val)
1296#define bfin_read_CAN_MB04_DATA1() bfin_read16(CAN_MB04_DATA1)
1297#define bfin_write_CAN_MB04_DATA1(val) bfin_write16(CAN_MB04_DATA1,val)
1298#define bfin_read_CAN_MB04_DATA0() bfin_read16(CAN_MB04_DATA0)
1299#define bfin_write_CAN_MB04_DATA0(val) bfin_write16(CAN_MB04_DATA0,val)
1300
1301#define bfin_read_CAN_MB05_ID1() bfin_read16(CAN_MB05_ID1)
1302#define bfin_write_CAN_MB05_ID1(val) bfin_write16(CAN_MB05_ID1,val)
1303#define bfin_read_CAN_MB05_ID0() bfin_read16(CAN_MB05_ID0)
1304#define bfin_write_CAN_MB05_ID0(val) bfin_write16(CAN_MB05_ID0,val)
1305#define bfin_read_CAN_MB05_TIMESTAMP() bfin_read16(CAN_MB05_TIMESTAMP)
1306#define bfin_write_CAN_MB05_TIMESTAMP(val) bfin_write16(CAN_MB05_TIMESTAMP,val)
1307#define bfin_read_CAN_MB05_LENGTH() bfin_read16(CAN_MB05_LENGTH)
1308#define bfin_write_CAN_MB05_LENGTH(val) bfin_write16(CAN_MB05_LENGTH,val)
1309#define bfin_read_CAN_MB05_DATA3() bfin_read16(CAN_MB05_DATA3)
1310#define bfin_write_CAN_MB05_DATA3(val) bfin_write16(CAN_MB05_DATA3,val)
1311#define bfin_read_CAN_MB05_DATA2() bfin_read16(CAN_MB05_DATA2)
1312#define bfin_write_CAN_MB05_DATA2(val) bfin_write16(CAN_MB05_DATA2,val)
1313#define bfin_read_CAN_MB05_DATA1() bfin_read16(CAN_MB05_DATA1)
1314#define bfin_write_CAN_MB05_DATA1(val) bfin_write16(CAN_MB05_DATA1,val)
1315#define bfin_read_CAN_MB05_DATA0() bfin_read16(CAN_MB05_DATA0)
1316#define bfin_write_CAN_MB05_DATA0(val) bfin_write16(CAN_MB05_DATA0,val)
1317
1318#define bfin_read_CAN_MB06_ID1() bfin_read16(CAN_MB06_ID1)
1319#define bfin_write_CAN_MB06_ID1(val) bfin_write16(CAN_MB06_ID1,val)
1320#define bfin_read_CAN_MB06_ID0() bfin_read16(CAN_MB06_ID0)
1321#define bfin_write_CAN_MB06_ID0(val) bfin_write16(CAN_MB06_ID0,val)
1322#define bfin_read_CAN_MB06_TIMESTAMP() bfin_read16(CAN_MB06_TIMESTAMP)
1323#define bfin_write_CAN_MB06_TIMESTAMP(val) bfin_write16(CAN_MB06_TIMESTAMP,val)
1324#define bfin_read_CAN_MB06_LENGTH() bfin_read16(CAN_MB06_LENGTH)
1325#define bfin_write_CAN_MB06_LENGTH(val) bfin_write16(CAN_MB06_LENGTH,val)
1326#define bfin_read_CAN_MB06_DATA3() bfin_read16(CAN_MB06_DATA3)
1327#define bfin_write_CAN_MB06_DATA3(val) bfin_write16(CAN_MB06_DATA3,val)
1328#define bfin_read_CAN_MB06_DATA2() bfin_read16(CAN_MB06_DATA2)
1329#define bfin_write_CAN_MB06_DATA2(val) bfin_write16(CAN_MB06_DATA2,val)
1330#define bfin_read_CAN_MB06_DATA1() bfin_read16(CAN_MB06_DATA1)
1331#define bfin_write_CAN_MB06_DATA1(val) bfin_write16(CAN_MB06_DATA1,val)
1332#define bfin_read_CAN_MB06_DATA0() bfin_read16(CAN_MB06_DATA0)
1333#define bfin_write_CAN_MB06_DATA0(val) bfin_write16(CAN_MB06_DATA0,val)
1334
1335#define bfin_read_CAN_MB07_ID1() bfin_read16(CAN_MB07_ID1)
1336#define bfin_write_CAN_MB07_ID1(val) bfin_write16(CAN_MB07_ID1,val)
1337#define bfin_read_CAN_MB07_ID0() bfin_read16(CAN_MB07_ID0)
1338#define bfin_write_CAN_MB07_ID0(val) bfin_write16(CAN_MB07_ID0,val)
1339#define bfin_read_CAN_MB07_TIMESTAMP() bfin_read16(CAN_MB07_TIMESTAMP)
1340#define bfin_write_CAN_MB07_TIMESTAMP(val) bfin_write16(CAN_MB07_TIMESTAMP,val)
1341#define bfin_read_CAN_MB07_LENGTH() bfin_read16(CAN_MB07_LENGTH)
1342#define bfin_write_CAN_MB07_LENGTH(val) bfin_write16(CAN_MB07_LENGTH,val)
1343#define bfin_read_CAN_MB07_DATA3() bfin_read16(CAN_MB07_DATA3)
1344#define bfin_write_CAN_MB07_DATA3(val) bfin_write16(CAN_MB07_DATA3,val)
1345#define bfin_read_CAN_MB07_DATA2() bfin_read16(CAN_MB07_DATA2)
1346#define bfin_write_CAN_MB07_DATA2(val) bfin_write16(CAN_MB07_DATA2,val)
1347#define bfin_read_CAN_MB07_DATA1() bfin_read16(CAN_MB07_DATA1)
1348#define bfin_write_CAN_MB07_DATA1(val) bfin_write16(CAN_MB07_DATA1,val)
1349#define bfin_read_CAN_MB07_DATA0() bfin_read16(CAN_MB07_DATA0)
1350#define bfin_write_CAN_MB07_DATA0(val) bfin_write16(CAN_MB07_DATA0,val)
1351
1352#define bfin_read_CAN_MB08_ID1() bfin_read16(CAN_MB08_ID1)
1353#define bfin_write_CAN_MB08_ID1(val) bfin_write16(CAN_MB08_ID1,val)
1354#define bfin_read_CAN_MB08_ID0() bfin_read16(CAN_MB08_ID0)
1355#define bfin_write_CAN_MB08_ID0(val) bfin_write16(CAN_MB08_ID0,val)
1356#define bfin_read_CAN_MB08_TIMESTAMP() bfin_read16(CAN_MB08_TIMESTAMP)
1357#define bfin_write_CAN_MB08_TIMESTAMP(val) bfin_write16(CAN_MB08_TIMESTAMP,val)
1358#define bfin_read_CAN_MB08_LENGTH() bfin_read16(CAN_MB08_LENGTH)
1359#define bfin_write_CAN_MB08_LENGTH(val) bfin_write16(CAN_MB08_LENGTH,val)
1360#define bfin_read_CAN_MB08_DATA3() bfin_read16(CAN_MB08_DATA3)
1361#define bfin_write_CAN_MB08_DATA3(val) bfin_write16(CAN_MB08_DATA3,val)
1362#define bfin_read_CAN_MB08_DATA2() bfin_read16(CAN_MB08_DATA2)
1363#define bfin_write_CAN_MB08_DATA2(val) bfin_write16(CAN_MB08_DATA2,val)
1364#define bfin_read_CAN_MB08_DATA1() bfin_read16(CAN_MB08_DATA1)
1365#define bfin_write_CAN_MB08_DATA1(val) bfin_write16(CAN_MB08_DATA1,val)
1366#define bfin_read_CAN_MB08_DATA0() bfin_read16(CAN_MB08_DATA0)
1367#define bfin_write_CAN_MB08_DATA0(val) bfin_write16(CAN_MB08_DATA0,val)
1368
1369#define bfin_read_CAN_MB09_ID1() bfin_read16(CAN_MB09_ID1)
1370#define bfin_write_CAN_MB09_ID1(val) bfin_write16(CAN_MB09_ID1,val)
1371#define bfin_read_CAN_MB09_ID0() bfin_read16(CAN_MB09_ID0)
1372#define bfin_write_CAN_MB09_ID0(val) bfin_write16(CAN_MB09_ID0,val)
1373#define bfin_read_CAN_MB09_TIMESTAMP() bfin_read16(CAN_MB09_TIMESTAMP)
1374#define bfin_write_CAN_MB09_TIMESTAMP(val) bfin_write16(CAN_MB09_TIMESTAMP,val)
1375#define bfin_read_CAN_MB09_LENGTH() bfin_read16(CAN_MB09_LENGTH)
1376#define bfin_write_CAN_MB09_LENGTH(val) bfin_write16(CAN_MB09_LENGTH,val)
1377#define bfin_read_CAN_MB09_DATA3() bfin_read16(CAN_MB09_DATA3)
1378#define bfin_write_CAN_MB09_DATA3(val) bfin_write16(CAN_MB09_DATA3,val)
1379#define bfin_read_CAN_MB09_DATA2() bfin_read16(CAN_MB09_DATA2)
1380#define bfin_write_CAN_MB09_DATA2(val) bfin_write16(CAN_MB09_DATA2,val)
1381#define bfin_read_CAN_MB09_DATA1() bfin_read16(CAN_MB09_DATA1)
1382#define bfin_write_CAN_MB09_DATA1(val) bfin_write16(CAN_MB09_DATA1,val)
1383#define bfin_read_CAN_MB09_DATA0() bfin_read16(CAN_MB09_DATA0)
1384#define bfin_write_CAN_MB09_DATA0(val) bfin_write16(CAN_MB09_DATA0,val)
1385
1386#define bfin_read_CAN_MB10_ID1() bfin_read16(CAN_MB10_ID1)
1387#define bfin_write_CAN_MB10_ID1(val) bfin_write16(CAN_MB10_ID1,val)
1388#define bfin_read_CAN_MB10_ID0() bfin_read16(CAN_MB10_ID0)
1389#define bfin_write_CAN_MB10_ID0(val) bfin_write16(CAN_MB10_ID0,val)
1390#define bfin_read_CAN_MB10_TIMESTAMP() bfin_read16(CAN_MB10_TIMESTAMP)
1391#define bfin_write_CAN_MB10_TIMESTAMP(val) bfin_write16(CAN_MB10_TIMESTAMP,val)
1392#define bfin_read_CAN_MB10_LENGTH() bfin_read16(CAN_MB10_LENGTH)
1393#define bfin_write_CAN_MB10_LENGTH(val) bfin_write16(CAN_MB10_LENGTH,val)
1394#define bfin_read_CAN_MB10_DATA3() bfin_read16(CAN_MB10_DATA3)
1395#define bfin_write_CAN_MB10_DATA3(val) bfin_write16(CAN_MB10_DATA3,val)
1396#define bfin_read_CAN_MB10_DATA2() bfin_read16(CAN_MB10_DATA2)
1397#define bfin_write_CAN_MB10_DATA2(val) bfin_write16(CAN_MB10_DATA2,val)
1398#define bfin_read_CAN_MB10_DATA1() bfin_read16(CAN_MB10_DATA1)
1399#define bfin_write_CAN_MB10_DATA1(val) bfin_write16(CAN_MB10_DATA1,val)
1400#define bfin_read_CAN_MB10_DATA0() bfin_read16(CAN_MB10_DATA0)
1401#define bfin_write_CAN_MB10_DATA0(val) bfin_write16(CAN_MB10_DATA0,val)
1402
1403#define bfin_read_CAN_MB11_ID1() bfin_read16(CAN_MB11_ID1)
1404#define bfin_write_CAN_MB11_ID1(val) bfin_write16(CAN_MB11_ID1,val)
1405#define bfin_read_CAN_MB11_ID0() bfin_read16(CAN_MB11_ID0)
1406#define bfin_write_CAN_MB11_ID0(val) bfin_write16(CAN_MB11_ID0,val)
1407#define bfin_read_CAN_MB11_TIMESTAMP() bfin_read16(CAN_MB11_TIMESTAMP)
1408#define bfin_write_CAN_MB11_TIMESTAMP(val) bfin_write16(CAN_MB11_TIMESTAMP,val)
1409#define bfin_read_CAN_MB11_LENGTH() bfin_read16(CAN_MB11_LENGTH)
1410#define bfin_write_CAN_MB11_LENGTH(val) bfin_write16(CAN_MB11_LENGTH,val)
1411#define bfin_read_CAN_MB11_DATA3() bfin_read16(CAN_MB11_DATA3)
1412#define bfin_write_CAN_MB11_DATA3(val) bfin_write16(CAN_MB11_DATA3,val)
1413#define bfin_read_CAN_MB11_DATA2() bfin_read16(CAN_MB11_DATA2)
1414#define bfin_write_CAN_MB11_DATA2(val) bfin_write16(CAN_MB11_DATA2,val)
1415#define bfin_read_CAN_MB11_DATA1() bfin_read16(CAN_MB11_DATA1)
1416#define bfin_write_CAN_MB11_DATA1(val) bfin_write16(CAN_MB11_DATA1,val)
1417#define bfin_read_CAN_MB11_DATA0() bfin_read16(CAN_MB11_DATA0)
1418#define bfin_write_CAN_MB11_DATA0(val) bfin_write16(CAN_MB11_DATA0,val)
1419
1420#define bfin_read_CAN_MB12_ID1() bfin_read16(CAN_MB12_ID1)
1421#define bfin_write_CAN_MB12_ID1(val) bfin_write16(CAN_MB12_ID1,val)
1422#define bfin_read_CAN_MB12_ID0() bfin_read16(CAN_MB12_ID0)
1423#define bfin_write_CAN_MB12_ID0(val) bfin_write16(CAN_MB12_ID0,val)
1424#define bfin_read_CAN_MB12_TIMESTAMP() bfin_read16(CAN_MB12_TIMESTAMP)
1425#define bfin_write_CAN_MB12_TIMESTAMP(val) bfin_write16(CAN_MB12_TIMESTAMP,val)
1426#define bfin_read_CAN_MB12_LENGTH() bfin_read16(CAN_MB12_LENGTH)
1427#define bfin_write_CAN_MB12_LENGTH(val) bfin_write16(CAN_MB12_LENGTH,val)
1428#define bfin_read_CAN_MB12_DATA3() bfin_read16(CAN_MB12_DATA3)
1429#define bfin_write_CAN_MB12_DATA3(val) bfin_write16(CAN_MB12_DATA3,val)
1430#define bfin_read_CAN_MB12_DATA2() bfin_read16(CAN_MB12_DATA2)
1431#define bfin_write_CAN_MB12_DATA2(val) bfin_write16(CAN_MB12_DATA2,val)
1432#define bfin_read_CAN_MB12_DATA1() bfin_read16(CAN_MB12_DATA1)
1433#define bfin_write_CAN_MB12_DATA1(val) bfin_write16(CAN_MB12_DATA1,val)
1434#define bfin_read_CAN_MB12_DATA0() bfin_read16(CAN_MB12_DATA0)
1435#define bfin_write_CAN_MB12_DATA0(val) bfin_write16(CAN_MB12_DATA0,val)
1436
1437#define bfin_read_CAN_MB13_ID1() bfin_read16(CAN_MB13_ID1)
1438#define bfin_write_CAN_MB13_ID1(val) bfin_write16(CAN_MB13_ID1,val)
1439#define bfin_read_CAN_MB13_ID0() bfin_read16(CAN_MB13_ID0)
1440#define bfin_write_CAN_MB13_ID0(val) bfin_write16(CAN_MB13_ID0,val)
1441#define bfin_read_CAN_MB13_TIMESTAMP() bfin_read16(CAN_MB13_TIMESTAMP)
1442#define bfin_write_CAN_MB13_TIMESTAMP(val) bfin_write16(CAN_MB13_TIMESTAMP,val)
1443#define bfin_read_CAN_MB13_LENGTH() bfin_read16(CAN_MB13_LENGTH)
1444#define bfin_write_CAN_MB13_LENGTH(val) bfin_write16(CAN_MB13_LENGTH,val)
1445#define bfin_read_CAN_MB13_DATA3() bfin_read16(CAN_MB13_DATA3)
1446#define bfin_write_CAN_MB13_DATA3(val) bfin_write16(CAN_MB13_DATA3,val)
1447#define bfin_read_CAN_MB13_DATA2() bfin_read16(CAN_MB13_DATA2)
1448#define bfin_write_CAN_MB13_DATA2(val) bfin_write16(CAN_MB13_DATA2,val)
1449#define bfin_read_CAN_MB13_DATA1() bfin_read16(CAN_MB13_DATA1)
1450#define bfin_write_CAN_MB13_DATA1(val) bfin_write16(CAN_MB13_DATA1,val)
1451#define bfin_read_CAN_MB13_DATA0() bfin_read16(CAN_MB13_DATA0)
1452#define bfin_write_CAN_MB13_DATA0(val) bfin_write16(CAN_MB13_DATA0,val)
1453
1454#define bfin_read_CAN_MB14_ID1() bfin_read16(CAN_MB14_ID1)
1455#define bfin_write_CAN_MB14_ID1(val) bfin_write16(CAN_MB14_ID1,val)
1456#define bfin_read_CAN_MB14_ID0() bfin_read16(CAN_MB14_ID0)
1457#define bfin_write_CAN_MB14_ID0(val) bfin_write16(CAN_MB14_ID0,val)
1458#define bfin_read_CAN_MB14_TIMESTAMP() bfin_read16(CAN_MB14_TIMESTAMP)
1459#define bfin_write_CAN_MB14_TIMESTAMP(val) bfin_write16(CAN_MB14_TIMESTAMP,val)
1460#define bfin_read_CAN_MB14_LENGTH() bfin_read16(CAN_MB14_LENGTH)
1461#define bfin_write_CAN_MB14_LENGTH(val) bfin_write16(CAN_MB14_LENGTH,val)
1462#define bfin_read_CAN_MB14_DATA3() bfin_read16(CAN_MB14_DATA3)
1463#define bfin_write_CAN_MB14_DATA3(val) bfin_write16(CAN_MB14_DATA3,val)
1464#define bfin_read_CAN_MB14_DATA2() bfin_read16(CAN_MB14_DATA2)
1465#define bfin_write_CAN_MB14_DATA2(val) bfin_write16(CAN_MB14_DATA2,val)
1466#define bfin_read_CAN_MB14_DATA1() bfin_read16(CAN_MB14_DATA1)
1467#define bfin_write_CAN_MB14_DATA1(val) bfin_write16(CAN_MB14_DATA1,val)
1468#define bfin_read_CAN_MB14_DATA0() bfin_read16(CAN_MB14_DATA0)
1469#define bfin_write_CAN_MB14_DATA0(val) bfin_write16(CAN_MB14_DATA0,val)
1470
1471#define bfin_read_CAN_MB15_ID1() bfin_read16(CAN_MB15_ID1)
1472#define bfin_write_CAN_MB15_ID1(val) bfin_write16(CAN_MB15_ID1,val)
1473#define bfin_read_CAN_MB15_ID0() bfin_read16(CAN_MB15_ID0)
1474#define bfin_write_CAN_MB15_ID0(val) bfin_write16(CAN_MB15_ID0,val)
1475#define bfin_read_CAN_MB15_TIMESTAMP() bfin_read16(CAN_MB15_TIMESTAMP)
1476#define bfin_write_CAN_MB15_TIMESTAMP(val) bfin_write16(CAN_MB15_TIMESTAMP,val)
1477#define bfin_read_CAN_MB15_LENGTH() bfin_read16(CAN_MB15_LENGTH)
1478#define bfin_write_CAN_MB15_LENGTH(val) bfin_write16(CAN_MB15_LENGTH,val)
1479#define bfin_read_CAN_MB15_DATA3() bfin_read16(CAN_MB15_DATA3)
1480#define bfin_write_CAN_MB15_DATA3(val) bfin_write16(CAN_MB15_DATA3,val)
1481#define bfin_read_CAN_MB15_DATA2() bfin_read16(CAN_MB15_DATA2)
1482#define bfin_write_CAN_MB15_DATA2(val) bfin_write16(CAN_MB15_DATA2,val)
1483#define bfin_read_CAN_MB15_DATA1() bfin_read16(CAN_MB15_DATA1)
1484#define bfin_write_CAN_MB15_DATA1(val) bfin_write16(CAN_MB15_DATA1,val)
1485#define bfin_read_CAN_MB15_DATA0() bfin_read16(CAN_MB15_DATA0)
1486#define bfin_write_CAN_MB15_DATA0(val) bfin_write16(CAN_MB15_DATA0,val)
1487
1488#define bfin_read_CAN_MB16_ID1() bfin_read16(CAN_MB16_ID1)
1489#define bfin_write_CAN_MB16_ID1(val) bfin_write16(CAN_MB16_ID1,val)
1490#define bfin_read_CAN_MB16_ID0() bfin_read16(CAN_MB16_ID0)
1491#define bfin_write_CAN_MB16_ID0(val) bfin_write16(CAN_MB16_ID0,val)
1492#define bfin_read_CAN_MB16_TIMESTAMP() bfin_read16(CAN_MB16_TIMESTAMP)
1493#define bfin_write_CAN_MB16_TIMESTAMP(val) bfin_write16(CAN_MB16_TIMESTAMP,val)
1494#define bfin_read_CAN_MB16_LENGTH() bfin_read16(CAN_MB16_LENGTH)
1495#define bfin_write_CAN_MB16_LENGTH(val) bfin_write16(CAN_MB16_LENGTH,val)
1496#define bfin_read_CAN_MB16_DATA3() bfin_read16(CAN_MB16_DATA3)
1497#define bfin_write_CAN_MB16_DATA3(val) bfin_write16(CAN_MB16_DATA3,val)
1498#define bfin_read_CAN_MB16_DATA2() bfin_read16(CAN_MB16_DATA2)
1499#define bfin_write_CAN_MB16_DATA2(val) bfin_write16(CAN_MB16_DATA2,val)
1500#define bfin_read_CAN_MB16_DATA1() bfin_read16(CAN_MB16_DATA1)
1501#define bfin_write_CAN_MB16_DATA1(val) bfin_write16(CAN_MB16_DATA1,val)
1502#define bfin_read_CAN_MB16_DATA0() bfin_read16(CAN_MB16_DATA0)
1503#define bfin_write_CAN_MB16_DATA0(val) bfin_write16(CAN_MB16_DATA0,val)
1504
1505#define bfin_read_CAN_MB17_ID1() bfin_read16(CAN_MB17_ID1)
1506#define bfin_write_CAN_MB17_ID1(val) bfin_write16(CAN_MB17_ID1,val)
1507#define bfin_read_CAN_MB17_ID0() bfin_read16(CAN_MB17_ID0)
1508#define bfin_write_CAN_MB17_ID0(val) bfin_write16(CAN_MB17_ID0,val)
1509#define bfin_read_CAN_MB17_TIMESTAMP() bfin_read16(CAN_MB17_TIMESTAMP)
1510#define bfin_write_CAN_MB17_TIMESTAMP(val) bfin_write16(CAN_MB17_TIMESTAMP,val)
1511#define bfin_read_CAN_MB17_LENGTH() bfin_read16(CAN_MB17_LENGTH)
1512#define bfin_write_CAN_MB17_LENGTH(val) bfin_write16(CAN_MB17_LENGTH,val)
1513#define bfin_read_CAN_MB17_DATA3() bfin_read16(CAN_MB17_DATA3)
1514#define bfin_write_CAN_MB17_DATA3(val) bfin_write16(CAN_MB17_DATA3,val)
1515#define bfin_read_CAN_MB17_DATA2() bfin_read16(CAN_MB17_DATA2)
1516#define bfin_write_CAN_MB17_DATA2(val) bfin_write16(CAN_MB17_DATA2,val)
1517#define bfin_read_CAN_MB17_DATA1() bfin_read16(CAN_MB17_DATA1)
1518#define bfin_write_CAN_MB17_DATA1(val) bfin_write16(CAN_MB17_DATA1,val)
1519#define bfin_read_CAN_MB17_DATA0() bfin_read16(CAN_MB17_DATA0)
1520#define bfin_write_CAN_MB17_DATA0(val) bfin_write16(CAN_MB17_DATA0,val)
1521
1522#define bfin_read_CAN_MB18_ID1() bfin_read16(CAN_MB18_ID1)
1523#define bfin_write_CAN_MB18_ID1(val) bfin_write16(CAN_MB18_ID1,val)
1524#define bfin_read_CAN_MB18_ID0() bfin_read16(CAN_MB18_ID0)
1525#define bfin_write_CAN_MB18_ID0(val) bfin_write16(CAN_MB18_ID0,val)
1526#define bfin_read_CAN_MB18_TIMESTAMP() bfin_read16(CAN_MB18_TIMESTAMP)
1527#define bfin_write_CAN_MB18_TIMESTAMP(val) bfin_write16(CAN_MB18_TIMESTAMP,val)
1528#define bfin_read_CAN_MB18_LENGTH() bfin_read16(CAN_MB18_LENGTH)
1529#define bfin_write_CAN_MB18_LENGTH(val) bfin_write16(CAN_MB18_LENGTH,val)
1530#define bfin_read_CAN_MB18_DATA3() bfin_read16(CAN_MB18_DATA3)
1531#define bfin_write_CAN_MB18_DATA3(val) bfin_write16(CAN_MB18_DATA3,val)
1532#define bfin_read_CAN_MB18_DATA2() bfin_read16(CAN_MB18_DATA2)
1533#define bfin_write_CAN_MB18_DATA2(val) bfin_write16(CAN_MB18_DATA2,val)
1534#define bfin_read_CAN_MB18_DATA1() bfin_read16(CAN_MB18_DATA1)
1535#define bfin_write_CAN_MB18_DATA1(val) bfin_write16(CAN_MB18_DATA1,val)
1536#define bfin_read_CAN_MB18_DATA0() bfin_read16(CAN_MB18_DATA0)
1537#define bfin_write_CAN_MB18_DATA0(val) bfin_write16(CAN_MB18_DATA0,val)
1538
1539#define bfin_read_CAN_MB19_ID1() bfin_read16(CAN_MB19_ID1)
1540#define bfin_write_CAN_MB19_ID1(val) bfin_write16(CAN_MB19_ID1,val)
1541#define bfin_read_CAN_MB19_ID0() bfin_read16(CAN_MB19_ID0)
1542#define bfin_write_CAN_MB19_ID0(val) bfin_write16(CAN_MB19_ID0,val)
1543#define bfin_read_CAN_MB19_TIMESTAMP() bfin_read16(CAN_MB19_TIMESTAMP)
1544#define bfin_write_CAN_MB19_TIMESTAMP(val) bfin_write16(CAN_MB19_TIMESTAMP,val)
1545#define bfin_read_CAN_MB19_LENGTH() bfin_read16(CAN_MB19_LENGTH)
1546#define bfin_write_CAN_MB19_LENGTH(val) bfin_write16(CAN_MB19_LENGTH,val)
1547#define bfin_read_CAN_MB19_DATA3() bfin_read16(CAN_MB19_DATA3)
1548#define bfin_write_CAN_MB19_DATA3(val) bfin_write16(CAN_MB19_DATA3,val)
1549#define bfin_read_CAN_MB19_DATA2() bfin_read16(CAN_MB19_DATA2)
1550#define bfin_write_CAN_MB19_DATA2(val) bfin_write16(CAN_MB19_DATA2,val)
1551#define bfin_read_CAN_MB19_DATA1() bfin_read16(CAN_MB19_DATA1)
1552#define bfin_write_CAN_MB19_DATA1(val) bfin_write16(CAN_MB19_DATA1,val)
1553#define bfin_read_CAN_MB19_DATA0() bfin_read16(CAN_MB19_DATA0)
1554#define bfin_write_CAN_MB19_DATA0(val) bfin_write16(CAN_MB19_DATA0,val)
1555
1556#define bfin_read_CAN_MB20_ID1() bfin_read16(CAN_MB20_ID1)
1557#define bfin_write_CAN_MB20_ID1(val) bfin_write16(CAN_MB20_ID1,val)
1558#define bfin_read_CAN_MB20_ID0() bfin_read16(CAN_MB20_ID0)
1559#define bfin_write_CAN_MB20_ID0(val) bfin_write16(CAN_MB20_ID0,val)
1560#define bfin_read_CAN_MB20_TIMESTAMP() bfin_read16(CAN_MB20_TIMESTAMP)
1561#define bfin_write_CAN_MB20_TIMESTAMP(val) bfin_write16(CAN_MB20_TIMESTAMP,val)
1562#define bfin_read_CAN_MB20_LENGTH() bfin_read16(CAN_MB20_LENGTH)
1563#define bfin_write_CAN_MB20_LENGTH(val) bfin_write16(CAN_MB20_LENGTH,val)
1564#define bfin_read_CAN_MB20_DATA3() bfin_read16(CAN_MB20_DATA3)
1565#define bfin_write_CAN_MB20_DATA3(val) bfin_write16(CAN_MB20_DATA3,val)
1566#define bfin_read_CAN_MB20_DATA2() bfin_read16(CAN_MB20_DATA2)
1567#define bfin_write_CAN_MB20_DATA2(val) bfin_write16(CAN_MB20_DATA2,val)
1568#define bfin_read_CAN_MB20_DATA1() bfin_read16(CAN_MB20_DATA1)
1569#define bfin_write_CAN_MB20_DATA1(val) bfin_write16(CAN_MB20_DATA1,val)
1570#define bfin_read_CAN_MB20_DATA0() bfin_read16(CAN_MB20_DATA0)
1571#define bfin_write_CAN_MB20_DATA0(val) bfin_write16(CAN_MB20_DATA0,val)
1572
1573#define bfin_read_CAN_MB21_ID1() bfin_read16(CAN_MB21_ID1)
1574#define bfin_write_CAN_MB21_ID1(val) bfin_write16(CAN_MB21_ID1,val)
1575#define bfin_read_CAN_MB21_ID0() bfin_read16(CAN_MB21_ID0)
1576#define bfin_write_CAN_MB21_ID0(val) bfin_write16(CAN_MB21_ID0,val)
1577#define bfin_read_CAN_MB21_TIMESTAMP() bfin_read16(CAN_MB21_TIMESTAMP)
1578#define bfin_write_CAN_MB21_TIMESTAMP(val) bfin_write16(CAN_MB21_TIMESTAMP,val)
1579#define bfin_read_CAN_MB21_LENGTH() bfin_read16(CAN_MB21_LENGTH)
1580#define bfin_write_CAN_MB21_LENGTH(val) bfin_write16(CAN_MB21_LENGTH,val)
1581#define bfin_read_CAN_MB21_DATA3() bfin_read16(CAN_MB21_DATA3)
1582#define bfin_write_CAN_MB21_DATA3(val) bfin_write16(CAN_MB21_DATA3,val)
1583#define bfin_read_CAN_MB21_DATA2() bfin_read16(CAN_MB21_DATA2)
1584#define bfin_write_CAN_MB21_DATA2(val) bfin_write16(CAN_MB21_DATA2,val)
1585#define bfin_read_CAN_MB21_DATA1() bfin_read16(CAN_MB21_DATA1)
1586#define bfin_write_CAN_MB21_DATA1(val) bfin_write16(CAN_MB21_DATA1,val)
1587#define bfin_read_CAN_MB21_DATA0() bfin_read16(CAN_MB21_DATA0)
1588#define bfin_write_CAN_MB21_DATA0(val) bfin_write16(CAN_MB21_DATA0,val)
1589
1590#define bfin_read_CAN_MB22_ID1() bfin_read16(CAN_MB22_ID1)
1591#define bfin_write_CAN_MB22_ID1(val) bfin_write16(CAN_MB22_ID1,val)
1592#define bfin_read_CAN_MB22_ID0() bfin_read16(CAN_MB22_ID0)
1593#define bfin_write_CAN_MB22_ID0(val) bfin_write16(CAN_MB22_ID0,val)
1594#define bfin_read_CAN_MB22_TIMESTAMP() bfin_read16(CAN_MB22_TIMESTAMP)
1595#define bfin_write_CAN_MB22_TIMESTAMP(val) bfin_write16(CAN_MB22_TIMESTAMP,val)
1596#define bfin_read_CAN_MB22_LENGTH() bfin_read16(CAN_MB22_LENGTH)
1597#define bfin_write_CAN_MB22_LENGTH(val) bfin_write16(CAN_MB22_LENGTH,val)
1598#define bfin_read_CAN_MB22_DATA3() bfin_read16(CAN_MB22_DATA3)
1599#define bfin_write_CAN_MB22_DATA3(val) bfin_write16(CAN_MB22_DATA3,val)
1600#define bfin_read_CAN_MB22_DATA2() bfin_read16(CAN_MB22_DATA2)
1601#define bfin_write_CAN_MB22_DATA2(val) bfin_write16(CAN_MB22_DATA2,val)
1602#define bfin_read_CAN_MB22_DATA1() bfin_read16(CAN_MB22_DATA1)
1603#define bfin_write_CAN_MB22_DATA1(val) bfin_write16(CAN_MB22_DATA1,val)
1604#define bfin_read_CAN_MB22_DATA0() bfin_read16(CAN_MB22_DATA0)
1605#define bfin_write_CAN_MB22_DATA0(val) bfin_write16(CAN_MB22_DATA0,val)
1606
1607#define bfin_read_CAN_MB23_ID1() bfin_read16(CAN_MB23_ID1)
1608#define bfin_write_CAN_MB23_ID1(val) bfin_write16(CAN_MB23_ID1,val)
1609#define bfin_read_CAN_MB23_ID0() bfin_read16(CAN_MB23_ID0)
1610#define bfin_write_CAN_MB23_ID0(val) bfin_write16(CAN_MB23_ID0,val)
1611#define bfin_read_CAN_MB23_TIMESTAMP() bfin_read16(CAN_MB23_TIMESTAMP)
1612#define bfin_write_CAN_MB23_TIMESTAMP(val) bfin_write16(CAN_MB23_TIMESTAMP,val)
1613#define bfin_read_CAN_MB23_LENGTH() bfin_read16(CAN_MB23_LENGTH)
1614#define bfin_write_CAN_MB23_LENGTH(val) bfin_write16(CAN_MB23_LENGTH,val)
1615#define bfin_read_CAN_MB23_DATA3() bfin_read16(CAN_MB23_DATA3)
1616#define bfin_write_CAN_MB23_DATA3(val) bfin_write16(CAN_MB23_DATA3,val)
1617#define bfin_read_CAN_MB23_DATA2() bfin_read16(CAN_MB23_DATA2)
1618#define bfin_write_CAN_MB23_DATA2(val) bfin_write16(CAN_MB23_DATA2,val)
1619#define bfin_read_CAN_MB23_DATA1() bfin_read16(CAN_MB23_DATA1)
1620#define bfin_write_CAN_MB23_DATA1(val) bfin_write16(CAN_MB23_DATA1,val)
1621#define bfin_read_CAN_MB23_DATA0() bfin_read16(CAN_MB23_DATA0)
1622#define bfin_write_CAN_MB23_DATA0(val) bfin_write16(CAN_MB23_DATA0,val)
1623
1624#define bfin_read_CAN_MB24_ID1() bfin_read16(CAN_MB24_ID1)
1625#define bfin_write_CAN_MB24_ID1(val) bfin_write16(CAN_MB24_ID1,val)
1626#define bfin_read_CAN_MB24_ID0() bfin_read16(CAN_MB24_ID0)
1627#define bfin_write_CAN_MB24_ID0(val) bfin_write16(CAN_MB24_ID0,val)
1628#define bfin_read_CAN_MB24_TIMESTAMP() bfin_read16(CAN_MB24_TIMESTAMP)
1629#define bfin_write_CAN_MB24_TIMESTAMP(val) bfin_write16(CAN_MB24_TIMESTAMP,val)
1630#define bfin_read_CAN_MB24_LENGTH() bfin_read16(CAN_MB24_LENGTH)
1631#define bfin_write_CAN_MB24_LENGTH(val) bfin_write16(CAN_MB24_LENGTH,val)
1632#define bfin_read_CAN_MB24_DATA3() bfin_read16(CAN_MB24_DATA3)
1633#define bfin_write_CAN_MB24_DATA3(val) bfin_write16(CAN_MB24_DATA3,val)
1634#define bfin_read_CAN_MB24_DATA2() bfin_read16(CAN_MB24_DATA2)
1635#define bfin_write_CAN_MB24_DATA2(val) bfin_write16(CAN_MB24_DATA2,val)
1636#define bfin_read_CAN_MB24_DATA1() bfin_read16(CAN_MB24_DATA1)
1637#define bfin_write_CAN_MB24_DATA1(val) bfin_write16(CAN_MB24_DATA1,val)
1638#define bfin_read_CAN_MB24_DATA0() bfin_read16(CAN_MB24_DATA0)
1639#define bfin_write_CAN_MB24_DATA0(val) bfin_write16(CAN_MB24_DATA0,val)
1640
1641#define bfin_read_CAN_MB25_ID1() bfin_read16(CAN_MB25_ID1)
1642#define bfin_write_CAN_MB25_ID1(val) bfin_write16(CAN_MB25_ID1,val)
1643#define bfin_read_CAN_MB25_ID0() bfin_read16(CAN_MB25_ID0)
1644#define bfin_write_CAN_MB25_ID0(val) bfin_write16(CAN_MB25_ID0,val)
1645#define bfin_read_CAN_MB25_TIMESTAMP() bfin_read16(CAN_MB25_TIMESTAMP)
1646#define bfin_write_CAN_MB25_TIMESTAMP(val) bfin_write16(CAN_MB25_TIMESTAMP,val)
1647#define bfin_read_CAN_MB25_LENGTH() bfin_read16(CAN_MB25_LENGTH)
1648#define bfin_write_CAN_MB25_LENGTH(val) bfin_write16(CAN_MB25_LENGTH,val)
1649#define bfin_read_CAN_MB25_DATA3() bfin_read16(CAN_MB25_DATA3)
1650#define bfin_write_CAN_MB25_DATA3(val) bfin_write16(CAN_MB25_DATA3,val)
1651#define bfin_read_CAN_MB25_DATA2() bfin_read16(CAN_MB25_DATA2)
1652#define bfin_write_CAN_MB25_DATA2(val) bfin_write16(CAN_MB25_DATA2,val)
1653#define bfin_read_CAN_MB25_DATA1() bfin_read16(CAN_MB25_DATA1)
1654#define bfin_write_CAN_MB25_DATA1(val) bfin_write16(CAN_MB25_DATA1,val)
1655#define bfin_read_CAN_MB25_DATA0() bfin_read16(CAN_MB25_DATA0)
1656#define bfin_write_CAN_MB25_DATA0(val) bfin_write16(CAN_MB25_DATA0,val)
1657
1658#define bfin_read_CAN_MB26_ID1() bfin_read16(CAN_MB26_ID1)
1659#define bfin_write_CAN_MB26_ID1(val) bfin_write16(CAN_MB26_ID1,val)
1660#define bfin_read_CAN_MB26_ID0() bfin_read16(CAN_MB26_ID0)
1661#define bfin_write_CAN_MB26_ID0(val) bfin_write16(CAN_MB26_ID0,val)
1662#define bfin_read_CAN_MB26_TIMESTAMP() bfin_read16(CAN_MB26_TIMESTAMP)
1663#define bfin_write_CAN_MB26_TIMESTAMP(val) bfin_write16(CAN_MB26_TIMESTAMP,val)
1664#define bfin_read_CAN_MB26_LENGTH() bfin_read16(CAN_MB26_LENGTH)
1665#define bfin_write_CAN_MB26_LENGTH(val) bfin_write16(CAN_MB26_LENGTH,val)
1666#define bfin_read_CAN_MB26_DATA3() bfin_read16(CAN_MB26_DATA3)
1667#define bfin_write_CAN_MB26_DATA3(val) bfin_write16(CAN_MB26_DATA3,val)
1668#define bfin_read_CAN_MB26_DATA2() bfin_read16(CAN_MB26_DATA2)
1669#define bfin_write_CAN_MB26_DATA2(val) bfin_write16(CAN_MB26_DATA2,val)
1670#define bfin_read_CAN_MB26_DATA1() bfin_read16(CAN_MB26_DATA1)
1671#define bfin_write_CAN_MB26_DATA1(val) bfin_write16(CAN_MB26_DATA1,val)
1672#define bfin_read_CAN_MB26_DATA0() bfin_read16(CAN_MB26_DATA0)
1673#define bfin_write_CAN_MB26_DATA0(val) bfin_write16(CAN_MB26_DATA0,val)
1674
1675#define bfin_read_CAN_MB27_ID1() bfin_read16(CAN_MB27_ID1)
1676#define bfin_write_CAN_MB27_ID1(val) bfin_write16(CAN_MB27_ID1,val)
1677#define bfin_read_CAN_MB27_ID0() bfin_read16(CAN_MB27_ID0)
1678#define bfin_write_CAN_MB27_ID0(val) bfin_write16(CAN_MB27_ID0,val)
1679#define bfin_read_CAN_MB27_TIMESTAMP() bfin_read16(CAN_MB27_TIMESTAMP)
1680#define bfin_write_CAN_MB27_TIMESTAMP(val) bfin_write16(CAN_MB27_TIMESTAMP,val)
1681#define bfin_read_CAN_MB27_LENGTH() bfin_read16(CAN_MB27_LENGTH)
1682#define bfin_write_CAN_MB27_LENGTH(val) bfin_write16(CAN_MB27_LENGTH,val)
1683#define bfin_read_CAN_MB27_DATA3() bfin_read16(CAN_MB27_DATA3)
1684#define bfin_write_CAN_MB27_DATA3(val) bfin_write16(CAN_MB27_DATA3,val)
1685#define bfin_read_CAN_MB27_DATA2() bfin_read16(CAN_MB27_DATA2)
1686#define bfin_write_CAN_MB27_DATA2(val) bfin_write16(CAN_MB27_DATA2,val)
1687#define bfin_read_CAN_MB27_DATA1() bfin_read16(CAN_MB27_DATA1)
1688#define bfin_write_CAN_MB27_DATA1(val) bfin_write16(CAN_MB27_DATA1,val)
1689#define bfin_read_CAN_MB27_DATA0() bfin_read16(CAN_MB27_DATA0)
1690#define bfin_write_CAN_MB27_DATA0(val) bfin_write16(CAN_MB27_DATA0,val)
1691
1692#define bfin_read_CAN_MB28_ID1() bfin_read16(CAN_MB28_ID1)
1693#define bfin_write_CAN_MB28_ID1(val) bfin_write16(CAN_MB28_ID1,val)
1694#define bfin_read_CAN_MB28_ID0() bfin_read16(CAN_MB28_ID0)
1695#define bfin_write_CAN_MB28_ID0(val) bfin_write16(CAN_MB28_ID0,val)
1696#define bfin_read_CAN_MB28_TIMESTAMP() bfin_read16(CAN_MB28_TIMESTAMP)
1697#define bfin_write_CAN_MB28_TIMESTAMP(val) bfin_write16(CAN_MB28_TIMESTAMP,val)
1698#define bfin_read_CAN_MB28_LENGTH() bfin_read16(CAN_MB28_LENGTH)
1699#define bfin_write_CAN_MB28_LENGTH(val) bfin_write16(CAN_MB28_LENGTH,val)
1700#define bfin_read_CAN_MB28_DATA3() bfin_read16(CAN_MB28_DATA3)
1701#define bfin_write_CAN_MB28_DATA3(val) bfin_write16(CAN_MB28_DATA3,val)
1702#define bfin_read_CAN_MB28_DATA2() bfin_read16(CAN_MB28_DATA2)
1703#define bfin_write_CAN_MB28_DATA2(val) bfin_write16(CAN_MB28_DATA2,val)
1704#define bfin_read_CAN_MB28_DATA1() bfin_read16(CAN_MB28_DATA1)
1705#define bfin_write_CAN_MB28_DATA1(val) bfin_write16(CAN_MB28_DATA1,val)
1706#define bfin_read_CAN_MB28_DATA0() bfin_read16(CAN_MB28_DATA0)
1707#define bfin_write_CAN_MB28_DATA0(val) bfin_write16(CAN_MB28_DATA0,val)
1708
1709#define bfin_read_CAN_MB29_ID1() bfin_read16(CAN_MB29_ID1)
1710#define bfin_write_CAN_MB29_ID1(val) bfin_write16(CAN_MB29_ID1,val)
1711#define bfin_read_CAN_MB29_ID0() bfin_read16(CAN_MB29_ID0)
1712#define bfin_write_CAN_MB29_ID0(val) bfin_write16(CAN_MB29_ID0,val)
1713#define bfin_read_CAN_MB29_TIMESTAMP() bfin_read16(CAN_MB29_TIMESTAMP)
1714#define bfin_write_CAN_MB29_TIMESTAMP(val) bfin_write16(CAN_MB29_TIMESTAMP,val)
1715#define bfin_read_CAN_MB29_LENGTH() bfin_read16(CAN_MB29_LENGTH)
1716#define bfin_write_CAN_MB29_LENGTH(val) bfin_write16(CAN_MB29_LENGTH,val)
1717#define bfin_read_CAN_MB29_DATA3() bfin_read16(CAN_MB29_DATA3)
1718#define bfin_write_CAN_MB29_DATA3(val) bfin_write16(CAN_MB29_DATA3,val)
1719#define bfin_read_CAN_MB29_DATA2() bfin_read16(CAN_MB29_DATA2)
1720#define bfin_write_CAN_MB29_DATA2(val) bfin_write16(CAN_MB29_DATA2,val)
1721#define bfin_read_CAN_MB29_DATA1() bfin_read16(CAN_MB29_DATA1)
1722#define bfin_write_CAN_MB29_DATA1(val) bfin_write16(CAN_MB29_DATA1,val)
1723#define bfin_read_CAN_MB29_DATA0() bfin_read16(CAN_MB29_DATA0)
1724#define bfin_write_CAN_MB29_DATA0(val) bfin_write16(CAN_MB29_DATA0,val)
1725
1726#define bfin_read_CAN_MB30_ID1() bfin_read16(CAN_MB30_ID1)
1727#define bfin_write_CAN_MB30_ID1(val) bfin_write16(CAN_MB30_ID1,val)
1728#define bfin_read_CAN_MB30_ID0() bfin_read16(CAN_MB30_ID0)
1729#define bfin_write_CAN_MB30_ID0(val) bfin_write16(CAN_MB30_ID0,val)
1730#define bfin_read_CAN_MB30_TIMESTAMP() bfin_read16(CAN_MB30_TIMESTAMP)
1731#define bfin_write_CAN_MB30_TIMESTAMP(val) bfin_write16(CAN_MB30_TIMESTAMP,val)
1732#define bfin_read_CAN_MB30_LENGTH() bfin_read16(CAN_MB30_LENGTH)
1733#define bfin_write_CAN_MB30_LENGTH(val) bfin_write16(CAN_MB30_LENGTH,val)
1734#define bfin_read_CAN_MB30_DATA3() bfin_read16(CAN_MB30_DATA3)
1735#define bfin_write_CAN_MB30_DATA3(val) bfin_write16(CAN_MB30_DATA3,val)
1736#define bfin_read_CAN_MB30_DATA2() bfin_read16(CAN_MB30_DATA2)
1737#define bfin_write_CAN_MB30_DATA2(val) bfin_write16(CAN_MB30_DATA2,val)
1738#define bfin_read_CAN_MB30_DATA1() bfin_read16(CAN_MB30_DATA1)
1739#define bfin_write_CAN_MB30_DATA1(val) bfin_write16(CAN_MB30_DATA1,val)
1740#define bfin_read_CAN_MB30_DATA0() bfin_read16(CAN_MB30_DATA0)
1741#define bfin_write_CAN_MB30_DATA0(val) bfin_write16(CAN_MB30_DATA0,val)
1742
1743#define bfin_read_CAN_MB31_ID1() bfin_read16(CAN_MB31_ID1)
1744#define bfin_write_CAN_MB31_ID1(val) bfin_write16(CAN_MB31_ID1,val)
1745#define bfin_read_CAN_MB31_ID0() bfin_read16(CAN_MB31_ID0)
1746#define bfin_write_CAN_MB31_ID0(val) bfin_write16(CAN_MB31_ID0,val)
1747#define bfin_read_CAN_MB31_TIMESTAMP() bfin_read16(CAN_MB31_TIMESTAMP)
1748#define bfin_write_CAN_MB31_TIMESTAMP(val) bfin_write16(CAN_MB31_TIMESTAMP,val)
1749#define bfin_read_CAN_MB31_LENGTH() bfin_read16(CAN_MB31_LENGTH)
1750#define bfin_write_CAN_MB31_LENGTH(val) bfin_write16(CAN_MB31_LENGTH,val)
1751#define bfin_read_CAN_MB31_DATA3() bfin_read16(CAN_MB31_DATA3)
1752#define bfin_write_CAN_MB31_DATA3(val) bfin_write16(CAN_MB31_DATA3,val)
1753#define bfin_read_CAN_MB31_DATA2() bfin_read16(CAN_MB31_DATA2)
1754#define bfin_write_CAN_MB31_DATA2(val) bfin_write16(CAN_MB31_DATA2,val)
1755#define bfin_read_CAN_MB31_DATA1() bfin_read16(CAN_MB31_DATA1)
1756#define bfin_write_CAN_MB31_DATA1(val) bfin_write16(CAN_MB31_DATA1,val)
1757#define bfin_read_CAN_MB31_DATA0() bfin_read16(CAN_MB31_DATA0)
1758#define bfin_write_CAN_MB31_DATA0(val) bfin_write16(CAN_MB31_DATA0,val)
1759
1760/* CAN Mailbox Area Macros */
1761#define bfin_read_CAN_MB_ID1(x)() bfin_read16(CAN_MB_ID1(x))
1762#define bfin_write_CAN_MB_ID1(x)(val) bfin_write16(CAN_MB_ID1(x),val)
1763#define bfin_read_CAN_MB_ID0(x)() bfin_read16(CAN_MB_ID0(x))
1764#define bfin_write_CAN_MB_ID0(x)(val) bfin_write16(CAN_MB_ID0(x),val)
1765#define bfin_read_CAN_MB_TIMESTAMP(x)() bfin_read16(CAN_MB_TIMESTAMP(x))
1766#define bfin_write_CAN_MB_TIMESTAMP(x)(val) bfin_write16(CAN_MB_TIMESTAMP(x),val)
1767#define bfin_read_CAN_MB_LENGTH(x)() bfin_read16(CAN_MB_LENGTH(x))
1768#define bfin_write_CAN_MB_LENGTH(x)(val) bfin_write16(CAN_MB_LENGTH(x),val)
1769#define bfin_read_CAN_MB_DATA3(x)() bfin_read16(CAN_MB_DATA3(x))
1770#define bfin_write_CAN_MB_DATA3(x)(val) bfin_write16(CAN_MB_DATA3(x),val)
1771#define bfin_read_CAN_MB_DATA2(x)() bfin_read16(CAN_MB_DATA2(x))
1772#define bfin_write_CAN_MB_DATA2(x)(val) bfin_write16(CAN_MB_DATA2(x),val)
1773#define bfin_read_CAN_MB_DATA1(x)() bfin_read16(CAN_MB_DATA1(x))
1774#define bfin_write_CAN_MB_DATA1(x)(val) bfin_write16(CAN_MB_DATA1(x),val)
1775#define bfin_read_CAN_MB_DATA0(x)() bfin_read16(CAN_MB_DATA0(x))
1776#define bfin_write_CAN_MB_DATA0(x)(val) bfin_write16(CAN_MB_DATA0(x),val)
1777
1778/* Pin Control Registers (0xFFC03200 - 0xFFC032FF) */
1779#define bfin_read_PORTF_FER() bfin_read16(PORTF_FER)
1780#define bfin_write_PORTF_FER(val) bfin_write16(PORTF_FER,val)
1781#define bfin_read_PORTG_FER() bfin_read16(PORTG_FER)
1782#define bfin_write_PORTG_FER(val) bfin_write16(PORTG_FER,val)
1783#define bfin_read_PORTH_FER() bfin_read16(PORTH_FER)
1784#define bfin_write_PORTH_FER(val) bfin_write16(PORTH_FER,val)
1785#define bfin_read_PORT_MUX() bfin_read16(BFIN_PORT_MUX)
1786#define bfin_write_PORT_MUX(val) bfin_write16(BFIN_PORT_MUX,val)
1787
1788/* Handshake MDMA Registers (0xFFC03300 - 0xFFC033FF) */
1789#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
1790#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL,val)
1791#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
1792#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT,val)
1793#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
1794#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT,val)
1795#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
1796#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT,val)
1797#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
1798#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW,val)
1799#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
1800#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT,val)
1801#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
1802#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT,val)
1803
1804#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
1805#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL,val)
1806#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
1807#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT,val)
1808#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
1809#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT,val)
1810#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
1811#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT,val)
1812#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
1813#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW,val)
1814#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
1815#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT,val)
1816#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
1817#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT,val)
1818
1819#endif /* _CDEF_BF534_H */
diff --git a/include/asm-blackfin/mach-bf537/cdefBF537.h b/include/asm-blackfin/mach-bf537/cdefBF537.h
deleted file mode 100644
index b8fc949a991f..000000000000
--- a/include/asm-blackfin/mach-bf537/cdefBF537.h
+++ /dev/null
@@ -1,206 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/cdefBF537.h
3 * Based on:
4 * Author:
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 _CDEF_BF537_H
33#define _CDEF_BF537_H
34
35/* Include MMRs Common to BF534 */
36#include "cdefBF534.h"
37
38/* Include all Core registers and bit definitions */
39#include "defBF537.h"
40
41/* Include Macro "Defines" For EMAC (Unique to BF536/BF537 */
42/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
43#define bfin_read_EMAC_OPMODE() bfin_read32(EMAC_OPMODE)
44#define bfin_write_EMAC_OPMODE(val) bfin_write32(EMAC_OPMODE,val)
45#define bfin_read_EMAC_ADDRLO() bfin_read32(EMAC_ADDRLO)
46#define bfin_write_EMAC_ADDRLO(val) bfin_write32(EMAC_ADDRLO,val)
47#define bfin_read_EMAC_ADDRHI() bfin_read32(EMAC_ADDRHI)
48#define bfin_write_EMAC_ADDRHI(val) bfin_write32(EMAC_ADDRHI,val)
49#define bfin_read_EMAC_HASHLO() bfin_read32(EMAC_HASHLO)
50#define bfin_write_EMAC_HASHLO(val) bfin_write32(EMAC_HASHLO,val)
51#define bfin_read_EMAC_HASHHI() bfin_read32(EMAC_HASHHI)
52#define bfin_write_EMAC_HASHHI(val) bfin_write32(EMAC_HASHHI,val)
53#define bfin_read_EMAC_STAADD() bfin_read32(EMAC_STAADD)
54#define bfin_write_EMAC_STAADD(val) bfin_write32(EMAC_STAADD,val)
55#define bfin_read_EMAC_STADAT() bfin_read32(EMAC_STADAT)
56#define bfin_write_EMAC_STADAT(val) bfin_write32(EMAC_STADAT,val)
57#define bfin_read_EMAC_FLC() bfin_read32(EMAC_FLC)
58#define bfin_write_EMAC_FLC(val) bfin_write32(EMAC_FLC,val)
59#define bfin_read_EMAC_VLAN1() bfin_read32(EMAC_VLAN1)
60#define bfin_write_EMAC_VLAN1(val) bfin_write32(EMAC_VLAN1,val)
61#define bfin_read_EMAC_VLAN2() bfin_read32(EMAC_VLAN2)
62#define bfin_write_EMAC_VLAN2(val) bfin_write32(EMAC_VLAN2,val)
63#define bfin_read_EMAC_WKUP_CTL() bfin_read32(EMAC_WKUP_CTL)
64#define bfin_write_EMAC_WKUP_CTL(val) bfin_write32(EMAC_WKUP_CTL,val)
65#define bfin_read_EMAC_WKUP_FFMSK0() bfin_read32(EMAC_WKUP_FFMSK0)
66#define bfin_write_EMAC_WKUP_FFMSK0(val) bfin_write32(EMAC_WKUP_FFMSK0,val)
67#define bfin_read_EMAC_WKUP_FFMSK1() bfin_read32(EMAC_WKUP_FFMSK1)
68#define bfin_write_EMAC_WKUP_FFMSK1(val) bfin_write32(EMAC_WKUP_FFMSK1,val)
69#define bfin_read_EMAC_WKUP_FFMSK2() bfin_read32(EMAC_WKUP_FFMSK2)
70#define bfin_write_EMAC_WKUP_FFMSK2(val) bfin_write32(EMAC_WKUP_FFMSK2,val)
71#define bfin_read_EMAC_WKUP_FFMSK3() bfin_read32(EMAC_WKUP_FFMSK3)
72#define bfin_write_EMAC_WKUP_FFMSK3(val) bfin_write32(EMAC_WKUP_FFMSK3,val)
73#define bfin_read_EMAC_WKUP_FFCMD() bfin_read32(EMAC_WKUP_FFCMD)
74#define bfin_write_EMAC_WKUP_FFCMD(val) bfin_write32(EMAC_WKUP_FFCMD,val)
75#define bfin_read_EMAC_WKUP_FFOFF() bfin_read32(EMAC_WKUP_FFOFF)
76#define bfin_write_EMAC_WKUP_FFOFF(val) bfin_write32(EMAC_WKUP_FFOFF,val)
77#define bfin_read_EMAC_WKUP_FFCRC0() bfin_read32(EMAC_WKUP_FFCRC0)
78#define bfin_write_EMAC_WKUP_FFCRC0(val) bfin_write32(EMAC_WKUP_FFCRC0,val)
79#define bfin_read_EMAC_WKUP_FFCRC1() bfin_read32(EMAC_WKUP_FFCRC1)
80#define bfin_write_EMAC_WKUP_FFCRC1(val) bfin_write32(EMAC_WKUP_FFCRC1,val)
81
82#define bfin_read_EMAC_SYSCTL() bfin_read32(EMAC_SYSCTL)
83#define bfin_write_EMAC_SYSCTL(val) bfin_write32(EMAC_SYSCTL,val)
84#define bfin_read_EMAC_SYSTAT() bfin_read32(EMAC_SYSTAT)
85#define bfin_write_EMAC_SYSTAT(val) bfin_write32(EMAC_SYSTAT,val)
86#define bfin_read_EMAC_RX_STAT() bfin_read32(EMAC_RX_STAT)
87#define bfin_write_EMAC_RX_STAT(val) bfin_write32(EMAC_RX_STAT,val)
88#define bfin_read_EMAC_RX_STKY() bfin_read32(EMAC_RX_STKY)
89#define bfin_write_EMAC_RX_STKY(val) bfin_write32(EMAC_RX_STKY,val)
90#define bfin_read_EMAC_RX_IRQE() bfin_read32(EMAC_RX_IRQE)
91#define bfin_write_EMAC_RX_IRQE(val) bfin_write32(EMAC_RX_IRQE,val)
92#define bfin_read_EMAC_TX_STAT() bfin_read32(EMAC_TX_STAT)
93#define bfin_write_EMAC_TX_STAT(val) bfin_write32(EMAC_TX_STAT,val)
94#define bfin_read_EMAC_TX_STKY() bfin_read32(EMAC_TX_STKY)
95#define bfin_write_EMAC_TX_STKY(val) bfin_write32(EMAC_TX_STKY,val)
96#define bfin_read_EMAC_TX_IRQE() bfin_read32(EMAC_TX_IRQE)
97#define bfin_write_EMAC_TX_IRQE(val) bfin_write32(EMAC_TX_IRQE,val)
98
99#define bfin_read_EMAC_MMC_CTL() bfin_read32(EMAC_MMC_CTL)
100#define bfin_write_EMAC_MMC_CTL(val) bfin_write32(EMAC_MMC_CTL,val)
101#define bfin_read_EMAC_MMC_RIRQS() bfin_read32(EMAC_MMC_RIRQS)
102#define bfin_write_EMAC_MMC_RIRQS(val) bfin_write32(EMAC_MMC_RIRQS,val)
103#define bfin_read_EMAC_MMC_RIRQE() bfin_read32(EMAC_MMC_RIRQE)
104#define bfin_write_EMAC_MMC_RIRQE(val) bfin_write32(EMAC_MMC_RIRQE,val)
105#define bfin_read_EMAC_MMC_TIRQS() bfin_read32(EMAC_MMC_TIRQS)
106#define bfin_write_EMAC_MMC_TIRQS(val) bfin_write32(EMAC_MMC_TIRQS,val)
107#define bfin_read_EMAC_MMC_TIRQE() bfin_read32(EMAC_MMC_TIRQE)
108#define bfin_write_EMAC_MMC_TIRQE(val) bfin_write32(EMAC_MMC_TIRQE,val)
109
110#define bfin_read_EMAC_RXC_OK() bfin_read32(EMAC_RXC_OK)
111#define bfin_write_EMAC_RXC_OK(val) bfin_write32(EMAC_RXC_OK,val)
112#define bfin_read_EMAC_RXC_FCS() bfin_read32(EMAC_RXC_FCS)
113#define bfin_write_EMAC_RXC_FCS(val) bfin_write32(EMAC_RXC_FCS,val)
114#define bfin_read_EMAC_RXC_ALIGN() bfin_read32(EMAC_RXC_ALIGN)
115#define bfin_write_EMAC_RXC_ALIGN(val) bfin_write32(EMAC_RXC_ALIGN,val)
116#define bfin_read_EMAC_RXC_OCTET() bfin_read32(EMAC_RXC_OCTET)
117#define bfin_write_EMAC_RXC_OCTET(val) bfin_write32(EMAC_RXC_OCTET,val)
118#define bfin_read_EMAC_RXC_DMAOVF() bfin_read32(EMAC_RXC_DMAOVF)
119#define bfin_write_EMAC_RXC_DMAOVF(val) bfin_write32(EMAC_RXC_DMAOVF,val)
120#define bfin_read_EMAC_RXC_UNICST() bfin_read32(EMAC_RXC_UNICST)
121#define bfin_write_EMAC_RXC_UNICST(val) bfin_write32(EMAC_RXC_UNICST,val)
122#define bfin_read_EMAC_RXC_MULTI() bfin_read32(EMAC_RXC_MULTI)
123#define bfin_write_EMAC_RXC_MULTI(val) bfin_write32(EMAC_RXC_MULTI,val)
124#define bfin_read_EMAC_RXC_BROAD() bfin_read32(EMAC_RXC_BROAD)
125#define bfin_write_EMAC_RXC_BROAD(val) bfin_write32(EMAC_RXC_BROAD,val)
126#define bfin_read_EMAC_RXC_LNERRI() bfin_read32(EMAC_RXC_LNERRI)
127#define bfin_write_EMAC_RXC_LNERRI(val) bfin_write32(EMAC_RXC_LNERRI,val)
128#define bfin_read_EMAC_RXC_LNERRO() bfin_read32(EMAC_RXC_LNERRO)
129#define bfin_write_EMAC_RXC_LNERRO(val) bfin_write32(EMAC_RXC_LNERRO,val)
130#define bfin_read_EMAC_RXC_LONG() bfin_read32(EMAC_RXC_LONG)
131#define bfin_write_EMAC_RXC_LONG(val) bfin_write32(EMAC_RXC_LONG,val)
132#define bfin_read_EMAC_RXC_MACCTL() bfin_read32(EMAC_RXC_MACCTL)
133#define bfin_write_EMAC_RXC_MACCTL(val) bfin_write32(EMAC_RXC_MACCTL,val)
134#define bfin_read_EMAC_RXC_OPCODE() bfin_read32(EMAC_RXC_OPCODE)
135#define bfin_write_EMAC_RXC_OPCODE(val) bfin_write32(EMAC_RXC_OPCODE,val)
136#define bfin_read_EMAC_RXC_PAUSE() bfin_read32(EMAC_RXC_PAUSE)
137#define bfin_write_EMAC_RXC_PAUSE(val) bfin_write32(EMAC_RXC_PAUSE,val)
138#define bfin_read_EMAC_RXC_ALLFRM() bfin_read32(EMAC_RXC_ALLFRM)
139#define bfin_write_EMAC_RXC_ALLFRM(val) bfin_write32(EMAC_RXC_ALLFRM,val)
140#define bfin_read_EMAC_RXC_ALLOCT() bfin_read32(EMAC_RXC_ALLOCT)
141#define bfin_write_EMAC_RXC_ALLOCT(val) bfin_write32(EMAC_RXC_ALLOCT,val)
142#define bfin_read_EMAC_RXC_TYPED() bfin_read32(EMAC_RXC_TYPED)
143#define bfin_write_EMAC_RXC_TYPED(val) bfin_write32(EMAC_RXC_TYPED,val)
144#define bfin_read_EMAC_RXC_SHORT() bfin_read32(EMAC_RXC_SHORT)
145#define bfin_write_EMAC_RXC_SHORT(val) bfin_write32(EMAC_RXC_SHORT,val)
146#define bfin_read_EMAC_RXC_EQ64() bfin_read32(EMAC_RXC_EQ64)
147#define bfin_write_EMAC_RXC_EQ64(val) bfin_write32(EMAC_RXC_EQ64,val)
148#define bfin_read_EMAC_RXC_LT128() bfin_read32(EMAC_RXC_LT128)
149#define bfin_write_EMAC_RXC_LT128(val) bfin_write32(EMAC_RXC_LT128,val)
150#define bfin_read_EMAC_RXC_LT256() bfin_read32(EMAC_RXC_LT256)
151#define bfin_write_EMAC_RXC_LT256(val) bfin_write32(EMAC_RXC_LT256,val)
152#define bfin_read_EMAC_RXC_LT512() bfin_read32(EMAC_RXC_LT512)
153#define bfin_write_EMAC_RXC_LT512(val) bfin_write32(EMAC_RXC_LT512,val)
154#define bfin_read_EMAC_RXC_LT1024() bfin_read32(EMAC_RXC_LT1024)
155#define bfin_write_EMAC_RXC_LT1024(val) bfin_write32(EMAC_RXC_LT1024,val)
156#define bfin_read_EMAC_RXC_GE1024() bfin_read32(EMAC_RXC_GE1024)
157#define bfin_write_EMAC_RXC_GE1024(val) bfin_write32(EMAC_RXC_GE1024,val)
158
159#define bfin_read_EMAC_TXC_OK() bfin_read32(EMAC_TXC_OK)
160#define bfin_write_EMAC_TXC_OK(val) bfin_write32(EMAC_TXC_OK,val)
161#define bfin_read_EMAC_TXC_1COL() bfin_read32(EMAC_TXC_1COL)
162#define bfin_write_EMAC_TXC_1COL(val) bfin_write32(EMAC_TXC_1COL,val)
163#define bfin_read_EMAC_TXC_GT1COL() bfin_read32(EMAC_TXC_GT1COL)
164#define bfin_write_EMAC_TXC_GT1COL(val) bfin_write32(EMAC_TXC_GT1COL,val)
165#define bfin_read_EMAC_TXC_OCTET() bfin_read32(EMAC_TXC_OCTET)
166#define bfin_write_EMAC_TXC_OCTET(val) bfin_write32(EMAC_TXC_OCTET,val)
167#define bfin_read_EMAC_TXC_DEFER() bfin_read32(EMAC_TXC_DEFER)
168#define bfin_write_EMAC_TXC_DEFER(val) bfin_write32(EMAC_TXC_DEFER,val)
169#define bfin_read_EMAC_TXC_LATECL() bfin_read32(EMAC_TXC_LATECL)
170#define bfin_write_EMAC_TXC_LATECL(val) bfin_write32(EMAC_TXC_LATECL,val)
171#define bfin_read_EMAC_TXC_XS_COL() bfin_read32(EMAC_TXC_XS_COL)
172#define bfin_write_EMAC_TXC_XS_COL(val) bfin_write32(EMAC_TXC_XS_COL,val)
173#define bfin_read_EMAC_TXC_DMAUND() bfin_read32(EMAC_TXC_DMAUND)
174#define bfin_write_EMAC_TXC_DMAUND(val) bfin_write32(EMAC_TXC_DMAUND,val)
175#define bfin_read_EMAC_TXC_CRSERR() bfin_read32(EMAC_TXC_CRSERR)
176#define bfin_write_EMAC_TXC_CRSERR(val) bfin_write32(EMAC_TXC_CRSERR,val)
177#define bfin_read_EMAC_TXC_UNICST() bfin_read32(EMAC_TXC_UNICST)
178#define bfin_write_EMAC_TXC_UNICST(val) bfin_write32(EMAC_TXC_UNICST,val)
179#define bfin_read_EMAC_TXC_MULTI() bfin_read32(EMAC_TXC_MULTI)
180#define bfin_write_EMAC_TXC_MULTI(val) bfin_write32(EMAC_TXC_MULTI,val)
181#define bfin_read_EMAC_TXC_BROAD() bfin_read32(EMAC_TXC_BROAD)
182#define bfin_write_EMAC_TXC_BROAD(val) bfin_write32(EMAC_TXC_BROAD,val)
183#define bfin_read_EMAC_TXC_XS_DFR() bfin_read32(EMAC_TXC_XS_DFR)
184#define bfin_write_EMAC_TXC_XS_DFR(val) bfin_write32(EMAC_TXC_XS_DFR,val)
185#define bfin_read_EMAC_TXC_MACCTL() bfin_read32(EMAC_TXC_MACCTL)
186#define bfin_write_EMAC_TXC_MACCTL(val) bfin_write32(EMAC_TXC_MACCTL,val)
187#define bfin_read_EMAC_TXC_ALLFRM() bfin_read32(EMAC_TXC_ALLFRM)
188#define bfin_write_EMAC_TXC_ALLFRM(val) bfin_write32(EMAC_TXC_ALLFRM,val)
189#define bfin_read_EMAC_TXC_ALLOCT() bfin_read32(EMAC_TXC_ALLOCT)
190#define bfin_write_EMAC_TXC_ALLOCT(val) bfin_write32(EMAC_TXC_ALLOCT,val)
191#define bfin_read_EMAC_TXC_EQ64() bfin_read32(EMAC_TXC_EQ64)
192#define bfin_write_EMAC_TXC_EQ64(val) bfin_write32(EMAC_TXC_EQ64,val)
193#define bfin_read_EMAC_TXC_LT128() bfin_read32(EMAC_TXC_LT128)
194#define bfin_write_EMAC_TXC_LT128(val) bfin_write32(EMAC_TXC_LT128,val)
195#define bfin_read_EMAC_TXC_LT256() bfin_read32(EMAC_TXC_LT256)
196#define bfin_write_EMAC_TXC_LT256(val) bfin_write32(EMAC_TXC_LT256,val)
197#define bfin_read_EMAC_TXC_LT512() bfin_read32(EMAC_TXC_LT512)
198#define bfin_write_EMAC_TXC_LT512(val) bfin_write32(EMAC_TXC_LT512,val)
199#define bfin_read_EMAC_TXC_LT1024() bfin_read32(EMAC_TXC_LT1024)
200#define bfin_write_EMAC_TXC_LT1024(val) bfin_write32(EMAC_TXC_LT1024,val)
201#define bfin_read_EMAC_TXC_GE1024() bfin_read32(EMAC_TXC_GE1024)
202#define bfin_write_EMAC_TXC_GE1024(val) bfin_write32(EMAC_TXC_GE1024,val)
203#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT)
204#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT,val)
205
206#endif /* _CDEF_BF537_H */
diff --git a/include/asm-blackfin/mach-bf537/defBF534.h b/include/asm-blackfin/mach-bf537/defBF534.h
deleted file mode 100644
index d0d80d3152ba..000000000000
--- a/include/asm-blackfin/mach-bf537/defBF534.h
+++ /dev/null
@@ -1,2527 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/cdefBF537.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF534_H
32#define _DEF_BF534_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/************************************************************************************
38** System MMR Register Map
39*************************************************************************************/
40/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
41#define PLL_CTL 0xFFC00000 /* PLL Control Register */
42#define PLL_DIV 0xFFC00004 /* PLL Divide Register */
43#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register */
44#define PLL_STAT 0xFFC0000C /* PLL Status Register */
45#define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count Register */
46#define CHIPID 0xFFC00014 /* Chip ID Register */
47
48/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
49#define SWRST 0xFFC00100 /* Software Reset Register */
50#define SYSCR 0xFFC00104 /* System Configuration Register */
51#define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */
52#define SIC_IMASK 0xFFC0010C /* Interrupt Mask Register */
53#define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */
54#define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */
55#define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */
56#define SIC_IAR3 0xFFC0011C /* Interrupt Assignment Register 3 */
57#define SIC_ISR 0xFFC00120 /* Interrupt Status Register */
58#define SIC_IWR 0xFFC00124 /* Interrupt Wakeup Register */
59
60/* Watchdog Timer (0xFFC00200 - 0xFFC002FF) */
61#define WDOG_CTL 0xFFC00200 /* Watchdog Control Register */
62#define WDOG_CNT 0xFFC00204 /* Watchdog Count Register */
63#define WDOG_STAT 0xFFC00208 /* Watchdog Status Register */
64
65/* Real Time Clock (0xFFC00300 - 0xFFC003FF) */
66#define RTC_STAT 0xFFC00300 /* RTC Status Register */
67#define RTC_ICTL 0xFFC00304 /* RTC Interrupt Control Register */
68#define RTC_ISTAT 0xFFC00308 /* RTC Interrupt Status Register */
69#define RTC_SWCNT 0xFFC0030C /* RTC Stopwatch Count Register */
70#define RTC_ALARM 0xFFC00310 /* RTC Alarm Time Register */
71#define RTC_FAST 0xFFC00314 /* RTC Prescaler Enable Register */
72#define RTC_PREN 0xFFC00314 /* RTC Prescaler Enable Alternate Macro */
73
74/* UART0 Controller (0xFFC00400 - 0xFFC004FF) */
75#define UART0_THR 0xFFC00400 /* Transmit Holding register */
76#define UART0_RBR 0xFFC00400 /* Receive Buffer register */
77#define UART0_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */
78#define UART0_IER 0xFFC00404 /* Interrupt Enable Register */
79#define UART0_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */
80#define UART0_IIR 0xFFC00408 /* Interrupt Identification Register */
81#define UART0_LCR 0xFFC0040C /* Line Control Register */
82#define UART0_MCR 0xFFC00410 /* Modem Control Register */
83#define UART0_LSR 0xFFC00414 /* Line Status Register */
84#define UART0_MSR 0xFFC00418 /* Modem Status Register */
85#define UART0_SCR 0xFFC0041C /* SCR Scratch Register */
86#define UART0_GCTL 0xFFC00424 /* Global Control Register */
87
88/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
89#define SPI0_REGBASE 0xFFC00500
90#define SPI_CTL 0xFFC00500 /* SPI Control Register */
91#define SPI_FLG 0xFFC00504 /* SPI Flag register */
92#define SPI_STAT 0xFFC00508 /* SPI Status register */
93#define SPI_TDBR 0xFFC0050C /* SPI Transmit Data Buffer Register */
94#define SPI_RDBR 0xFFC00510 /* SPI Receive Data Buffer Register */
95#define SPI_BAUD 0xFFC00514 /* SPI Baud rate Register */
96#define SPI_SHADOW 0xFFC00518 /* SPI_RDBR Shadow Register */
97
98/* TIMER0-7 Registers (0xFFC00600 - 0xFFC006FF) */
99#define TIMER0_CONFIG 0xFFC00600 /* Timer 0 Configuration Register */
100#define TIMER0_COUNTER 0xFFC00604 /* Timer 0 Counter Register */
101#define TIMER0_PERIOD 0xFFC00608 /* Timer 0 Period Register */
102#define TIMER0_WIDTH 0xFFC0060C /* Timer 0 Width Register */
103
104#define TIMER1_CONFIG 0xFFC00610 /* Timer 1 Configuration Register */
105#define TIMER1_COUNTER 0xFFC00614 /* Timer 1 Counter Register */
106#define TIMER1_PERIOD 0xFFC00618 /* Timer 1 Period Register */
107#define TIMER1_WIDTH 0xFFC0061C /* Timer 1 Width Register */
108
109#define TIMER2_CONFIG 0xFFC00620 /* Timer 2 Configuration Register */
110#define TIMER2_COUNTER 0xFFC00624 /* Timer 2 Counter Register */
111#define TIMER2_PERIOD 0xFFC00628 /* Timer 2 Period Register */
112#define TIMER2_WIDTH 0xFFC0062C /* Timer 2 Width Register */
113
114#define TIMER3_CONFIG 0xFFC00630 /* Timer 3 Configuration Register */
115#define TIMER3_COUNTER 0xFFC00634 /* Timer 3 Counter Register */
116#define TIMER3_PERIOD 0xFFC00638 /* Timer 3 Period Register */
117#define TIMER3_WIDTH 0xFFC0063C /* Timer 3 Width Register */
118
119#define TIMER4_CONFIG 0xFFC00640 /* Timer 4 Configuration Register */
120#define TIMER4_COUNTER 0xFFC00644 /* Timer 4 Counter Register */
121#define TIMER4_PERIOD 0xFFC00648 /* Timer 4 Period Register */
122#define TIMER4_WIDTH 0xFFC0064C /* Timer 4 Width Register */
123
124#define TIMER5_CONFIG 0xFFC00650 /* Timer 5 Configuration Register */
125#define TIMER5_COUNTER 0xFFC00654 /* Timer 5 Counter Register */
126#define TIMER5_PERIOD 0xFFC00658 /* Timer 5 Period Register */
127#define TIMER5_WIDTH 0xFFC0065C /* Timer 5 Width Register */
128
129#define TIMER6_CONFIG 0xFFC00660 /* Timer 6 Configuration Register */
130#define TIMER6_COUNTER 0xFFC00664 /* Timer 6 Counter Register */
131#define TIMER6_PERIOD 0xFFC00668 /* Timer 6 Period Register */
132#define TIMER6_WIDTH 0xFFC0066C /* Timer 6 Width Register */
133
134#define TIMER7_CONFIG 0xFFC00670 /* Timer 7 Configuration Register */
135#define TIMER7_COUNTER 0xFFC00674 /* Timer 7 Counter Register */
136#define TIMER7_PERIOD 0xFFC00678 /* Timer 7 Period Register */
137#define TIMER7_WIDTH 0xFFC0067C /* Timer 7 Width Register */
138
139#define TIMER_ENABLE 0xFFC00680 /* Timer Enable Register */
140#define TIMER_DISABLE 0xFFC00684 /* Timer Disable Register */
141#define TIMER_STATUS 0xFFC00688 /* Timer Status Register */
142
143/* General Purpose I/O Port F (0xFFC00700 - 0xFFC007FF) */
144#define PORTFIO 0xFFC00700 /* Port F I/O Pin State Specify Register */
145#define PORTFIO_CLEAR 0xFFC00704 /* Port F I/O Peripheral Interrupt Clear Register */
146#define PORTFIO_SET 0xFFC00708 /* Port F I/O Peripheral Interrupt Set Register */
147#define PORTFIO_TOGGLE 0xFFC0070C /* Port F I/O Pin State Toggle Register */
148#define PORTFIO_MASKA 0xFFC00710 /* Port F I/O Mask State Specify Interrupt A Register */
149#define PORTFIO_MASKA_CLEAR 0xFFC00714 /* Port F I/O Mask Disable Interrupt A Register */
150#define PORTFIO_MASKA_SET 0xFFC00718 /* Port F I/O Mask Enable Interrupt A Register */
151#define PORTFIO_MASKA_TOGGLE 0xFFC0071C /* Port F I/O Mask Toggle Enable Interrupt A Register */
152#define PORTFIO_MASKB 0xFFC00720 /* Port F I/O Mask State Specify Interrupt B Register */
153#define PORTFIO_MASKB_CLEAR 0xFFC00724 /* Port F I/O Mask Disable Interrupt B Register */
154#define PORTFIO_MASKB_SET 0xFFC00728 /* Port F I/O Mask Enable Interrupt B Register */
155#define PORTFIO_MASKB_TOGGLE 0xFFC0072C /* Port F I/O Mask Toggle Enable Interrupt B Register */
156#define PORTFIO_DIR 0xFFC00730 /* Port F I/O Direction Register */
157#define PORTFIO_POLAR 0xFFC00734 /* Port F I/O Source Polarity Register */
158#define PORTFIO_EDGE 0xFFC00738 /* Port F I/O Source Sensitivity Register */
159#define PORTFIO_BOTH 0xFFC0073C /* Port F I/O Set on BOTH Edges Register */
160#define PORTFIO_INEN 0xFFC00740 /* Port F I/O Input Enable Register */
161
162/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
163#define SPORT0_TCR1 0xFFC00800 /* SPORT0 Transmit Configuration 1 Register */
164#define SPORT0_TCR2 0xFFC00804 /* SPORT0 Transmit Configuration 2 Register */
165#define SPORT0_TCLKDIV 0xFFC00808 /* SPORT0 Transmit Clock Divider */
166#define SPORT0_TFSDIV 0xFFC0080C /* SPORT0 Transmit Frame Sync Divider */
167#define SPORT0_TX 0xFFC00810 /* SPORT0 TX Data Register */
168#define SPORT0_RX 0xFFC00818 /* SPORT0 RX Data Register */
169#define SPORT0_RCR1 0xFFC00820 /* SPORT0 Transmit Configuration 1 Register */
170#define SPORT0_RCR2 0xFFC00824 /* SPORT0 Transmit Configuration 2 Register */
171#define SPORT0_RCLKDIV 0xFFC00828 /* SPORT0 Receive Clock Divider */
172#define SPORT0_RFSDIV 0xFFC0082C /* SPORT0 Receive Frame Sync Divider */
173#define SPORT0_STAT 0xFFC00830 /* SPORT0 Status Register */
174#define SPORT0_CHNL 0xFFC00834 /* SPORT0 Current Channel Register */
175#define SPORT0_MCMC1 0xFFC00838 /* SPORT0 Multi-Channel Configuration Register 1 */
176#define SPORT0_MCMC2 0xFFC0083C /* SPORT0 Multi-Channel Configuration Register 2 */
177#define SPORT0_MTCS0 0xFFC00840 /* SPORT0 Multi-Channel Transmit Select Register 0 */
178#define SPORT0_MTCS1 0xFFC00844 /* SPORT0 Multi-Channel Transmit Select Register 1 */
179#define SPORT0_MTCS2 0xFFC00848 /* SPORT0 Multi-Channel Transmit Select Register 2 */
180#define SPORT0_MTCS3 0xFFC0084C /* SPORT0 Multi-Channel Transmit Select Register 3 */
181#define SPORT0_MRCS0 0xFFC00850 /* SPORT0 Multi-Channel Receive Select Register 0 */
182#define SPORT0_MRCS1 0xFFC00854 /* SPORT0 Multi-Channel Receive Select Register 1 */
183#define SPORT0_MRCS2 0xFFC00858 /* SPORT0 Multi-Channel Receive Select Register 2 */
184#define SPORT0_MRCS3 0xFFC0085C /* SPORT0 Multi-Channel Receive Select Register 3 */
185
186/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
187#define SPORT1_TCR1 0xFFC00900 /* SPORT1 Transmit Configuration 1 Register */
188#define SPORT1_TCR2 0xFFC00904 /* SPORT1 Transmit Configuration 2 Register */
189#define SPORT1_TCLKDIV 0xFFC00908 /* SPORT1 Transmit Clock Divider */
190#define SPORT1_TFSDIV 0xFFC0090C /* SPORT1 Transmit Frame Sync Divider */
191#define SPORT1_TX 0xFFC00910 /* SPORT1 TX Data Register */
192#define SPORT1_RX 0xFFC00918 /* SPORT1 RX Data Register */
193#define SPORT1_RCR1 0xFFC00920 /* SPORT1 Transmit Configuration 1 Register */
194#define SPORT1_RCR2 0xFFC00924 /* SPORT1 Transmit Configuration 2 Register */
195#define SPORT1_RCLKDIV 0xFFC00928 /* SPORT1 Receive Clock Divider */
196#define SPORT1_RFSDIV 0xFFC0092C /* SPORT1 Receive Frame Sync Divider */
197#define SPORT1_STAT 0xFFC00930 /* SPORT1 Status Register */
198#define SPORT1_CHNL 0xFFC00934 /* SPORT1 Current Channel Register */
199#define SPORT1_MCMC1 0xFFC00938 /* SPORT1 Multi-Channel Configuration Register 1 */
200#define SPORT1_MCMC2 0xFFC0093C /* SPORT1 Multi-Channel Configuration Register 2 */
201#define SPORT1_MTCS0 0xFFC00940 /* SPORT1 Multi-Channel Transmit Select Register 0 */
202#define SPORT1_MTCS1 0xFFC00944 /* SPORT1 Multi-Channel Transmit Select Register 1 */
203#define SPORT1_MTCS2 0xFFC00948 /* SPORT1 Multi-Channel Transmit Select Register 2 */
204#define SPORT1_MTCS3 0xFFC0094C /* SPORT1 Multi-Channel Transmit Select Register 3 */
205#define SPORT1_MRCS0 0xFFC00950 /* SPORT1 Multi-Channel Receive Select Register 0 */
206#define SPORT1_MRCS1 0xFFC00954 /* SPORT1 Multi-Channel Receive Select Register 1 */
207#define SPORT1_MRCS2 0xFFC00958 /* SPORT1 Multi-Channel Receive Select Register 2 */
208#define SPORT1_MRCS3 0xFFC0095C /* SPORT1 Multi-Channel Receive Select Register 3 */
209
210/* External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
211#define EBIU_AMGCTL 0xFFC00A00 /* Asynchronous Memory Global Control Register */
212#define EBIU_AMBCTL0 0xFFC00A04 /* Asynchronous Memory Bank Control Register 0 */
213#define EBIU_AMBCTL1 0xFFC00A08 /* Asynchronous Memory Bank Control Register 1 */
214#define EBIU_SDGCTL 0xFFC00A10 /* SDRAM Global Control Register */
215#define EBIU_SDBCTL 0xFFC00A14 /* SDRAM Bank Control Register */
216#define EBIU_SDRRC 0xFFC00A18 /* SDRAM Refresh Rate Control Register */
217#define EBIU_SDSTAT 0xFFC00A1C /* SDRAM Status Register */
218
219/* DMA Traffic Control Registers */
220#define DMA_TC_PER 0xFFC00B0C /* Traffic Control Periods Register */
221#define DMA_TC_CNT 0xFFC00B10 /* Traffic Control Current Counts Register */
222
223/* Alternate deprecated register names (below) provided for backwards code compatibility */
224#define DMA_TCPER 0xFFC00B0C /* Traffic Control Periods Register */
225#define DMA_TCCNT 0xFFC00B10 /* Traffic Control Current Counts Register */
226
227/* DMA Controller (0xFFC00C00 - 0xFFC00FFF) */
228#define DMA0_NEXT_DESC_PTR 0xFFC00C00 /* DMA Channel 0 Next Descriptor Pointer Register */
229#define DMA0_START_ADDR 0xFFC00C04 /* DMA Channel 0 Start Address Register */
230#define DMA0_CONFIG 0xFFC00C08 /* DMA Channel 0 Configuration Register */
231#define DMA0_X_COUNT 0xFFC00C10 /* DMA Channel 0 X Count Register */
232#define DMA0_X_MODIFY 0xFFC00C14 /* DMA Channel 0 X Modify Register */
233#define DMA0_Y_COUNT 0xFFC00C18 /* DMA Channel 0 Y Count Register */
234#define DMA0_Y_MODIFY 0xFFC00C1C /* DMA Channel 0 Y Modify Register */
235#define DMA0_CURR_DESC_PTR 0xFFC00C20 /* DMA Channel 0 Current Descriptor Pointer Register */
236#define DMA0_CURR_ADDR 0xFFC00C24 /* DMA Channel 0 Current Address Register */
237#define DMA0_IRQ_STATUS 0xFFC00C28 /* DMA Channel 0 Interrupt/Status Register */
238#define DMA0_PERIPHERAL_MAP 0xFFC00C2C /* DMA Channel 0 Peripheral Map Register */
239#define DMA0_CURR_X_COUNT 0xFFC00C30 /* DMA Channel 0 Current X Count Register */
240#define DMA0_CURR_Y_COUNT 0xFFC00C38 /* DMA Channel 0 Current Y Count Register */
241
242#define DMA1_NEXT_DESC_PTR 0xFFC00C40 /* DMA Channel 1 Next Descriptor Pointer Register */
243#define DMA1_START_ADDR 0xFFC00C44 /* DMA Channel 1 Start Address Register */
244#define DMA1_CONFIG 0xFFC00C48 /* DMA Channel 1 Configuration Register */
245#define DMA1_X_COUNT 0xFFC00C50 /* DMA Channel 1 X Count Register */
246#define DMA1_X_MODIFY 0xFFC00C54 /* DMA Channel 1 X Modify Register */
247#define DMA1_Y_COUNT 0xFFC00C58 /* DMA Channel 1 Y Count Register */
248#define DMA1_Y_MODIFY 0xFFC00C5C /* DMA Channel 1 Y Modify Register */
249#define DMA1_CURR_DESC_PTR 0xFFC00C60 /* DMA Channel 1 Current Descriptor Pointer Register */
250#define DMA1_CURR_ADDR 0xFFC00C64 /* DMA Channel 1 Current Address Register */
251#define DMA1_IRQ_STATUS 0xFFC00C68 /* DMA Channel 1 Interrupt/Status Register */
252#define DMA1_PERIPHERAL_MAP 0xFFC00C6C /* DMA Channel 1 Peripheral Map Register */
253#define DMA1_CURR_X_COUNT 0xFFC00C70 /* DMA Channel 1 Current X Count Register */
254#define DMA1_CURR_Y_COUNT 0xFFC00C78 /* DMA Channel 1 Current Y Count Register */
255
256#define DMA2_NEXT_DESC_PTR 0xFFC00C80 /* DMA Channel 2 Next Descriptor Pointer Register */
257#define DMA2_START_ADDR 0xFFC00C84 /* DMA Channel 2 Start Address Register */
258#define DMA2_CONFIG 0xFFC00C88 /* DMA Channel 2 Configuration Register */
259#define DMA2_X_COUNT 0xFFC00C90 /* DMA Channel 2 X Count Register */
260#define DMA2_X_MODIFY 0xFFC00C94 /* DMA Channel 2 X Modify Register */
261#define DMA2_Y_COUNT 0xFFC00C98 /* DMA Channel 2 Y Count Register */
262#define DMA2_Y_MODIFY 0xFFC00C9C /* DMA Channel 2 Y Modify Register */
263#define DMA2_CURR_DESC_PTR 0xFFC00CA0 /* DMA Channel 2 Current Descriptor Pointer Register */
264#define DMA2_CURR_ADDR 0xFFC00CA4 /* DMA Channel 2 Current Address Register */
265#define DMA2_IRQ_STATUS 0xFFC00CA8 /* DMA Channel 2 Interrupt/Status Register */
266#define DMA2_PERIPHERAL_MAP 0xFFC00CAC /* DMA Channel 2 Peripheral Map Register */
267#define DMA2_CURR_X_COUNT 0xFFC00CB0 /* DMA Channel 2 Current X Count Register */
268#define DMA2_CURR_Y_COUNT 0xFFC00CB8 /* DMA Channel 2 Current Y Count Register */
269
270#define DMA3_NEXT_DESC_PTR 0xFFC00CC0 /* DMA Channel 3 Next Descriptor Pointer Register */
271#define DMA3_START_ADDR 0xFFC00CC4 /* DMA Channel 3 Start Address Register */
272#define DMA3_CONFIG 0xFFC00CC8 /* DMA Channel 3 Configuration Register */
273#define DMA3_X_COUNT 0xFFC00CD0 /* DMA Channel 3 X Count Register */
274#define DMA3_X_MODIFY 0xFFC00CD4 /* DMA Channel 3 X Modify Register */
275#define DMA3_Y_COUNT 0xFFC00CD8 /* DMA Channel 3 Y Count Register */
276#define DMA3_Y_MODIFY 0xFFC00CDC /* DMA Channel 3 Y Modify Register */
277#define DMA3_CURR_DESC_PTR 0xFFC00CE0 /* DMA Channel 3 Current Descriptor Pointer Register */
278#define DMA3_CURR_ADDR 0xFFC00CE4 /* DMA Channel 3 Current Address Register */
279#define DMA3_IRQ_STATUS 0xFFC00CE8 /* DMA Channel 3 Interrupt/Status Register */
280#define DMA3_PERIPHERAL_MAP 0xFFC00CEC /* DMA Channel 3 Peripheral Map Register */
281#define DMA3_CURR_X_COUNT 0xFFC00CF0 /* DMA Channel 3 Current X Count Register */
282#define DMA3_CURR_Y_COUNT 0xFFC00CF8 /* DMA Channel 3 Current Y Count Register */
283
284#define DMA4_NEXT_DESC_PTR 0xFFC00D00 /* DMA Channel 4 Next Descriptor Pointer Register */
285#define DMA4_START_ADDR 0xFFC00D04 /* DMA Channel 4 Start Address Register */
286#define DMA4_CONFIG 0xFFC00D08 /* DMA Channel 4 Configuration Register */
287#define DMA4_X_COUNT 0xFFC00D10 /* DMA Channel 4 X Count Register */
288#define DMA4_X_MODIFY 0xFFC00D14 /* DMA Channel 4 X Modify Register */
289#define DMA4_Y_COUNT 0xFFC00D18 /* DMA Channel 4 Y Count Register */
290#define DMA4_Y_MODIFY 0xFFC00D1C /* DMA Channel 4 Y Modify Register */
291#define DMA4_CURR_DESC_PTR 0xFFC00D20 /* DMA Channel 4 Current Descriptor Pointer Register */
292#define DMA4_CURR_ADDR 0xFFC00D24 /* DMA Channel 4 Current Address Register */
293#define DMA4_IRQ_STATUS 0xFFC00D28 /* DMA Channel 4 Interrupt/Status Register */
294#define DMA4_PERIPHERAL_MAP 0xFFC00D2C /* DMA Channel 4 Peripheral Map Register */
295#define DMA4_CURR_X_COUNT 0xFFC00D30 /* DMA Channel 4 Current X Count Register */
296#define DMA4_CURR_Y_COUNT 0xFFC00D38 /* DMA Channel 4 Current Y Count Register */
297
298#define DMA5_NEXT_DESC_PTR 0xFFC00D40 /* DMA Channel 5 Next Descriptor Pointer Register */
299#define DMA5_START_ADDR 0xFFC00D44 /* DMA Channel 5 Start Address Register */
300#define DMA5_CONFIG 0xFFC00D48 /* DMA Channel 5 Configuration Register */
301#define DMA5_X_COUNT 0xFFC00D50 /* DMA Channel 5 X Count Register */
302#define DMA5_X_MODIFY 0xFFC00D54 /* DMA Channel 5 X Modify Register */
303#define DMA5_Y_COUNT 0xFFC00D58 /* DMA Channel 5 Y Count Register */
304#define DMA5_Y_MODIFY 0xFFC00D5C /* DMA Channel 5 Y Modify Register */
305#define DMA5_CURR_DESC_PTR 0xFFC00D60 /* DMA Channel 5 Current Descriptor Pointer Register */
306#define DMA5_CURR_ADDR 0xFFC00D64 /* DMA Channel 5 Current Address Register */
307#define DMA5_IRQ_STATUS 0xFFC00D68 /* DMA Channel 5 Interrupt/Status Register */
308#define DMA5_PERIPHERAL_MAP 0xFFC00D6C /* DMA Channel 5 Peripheral Map Register */
309#define DMA5_CURR_X_COUNT 0xFFC00D70 /* DMA Channel 5 Current X Count Register */
310#define DMA5_CURR_Y_COUNT 0xFFC00D78 /* DMA Channel 5 Current Y Count Register */
311
312#define DMA6_NEXT_DESC_PTR 0xFFC00D80 /* DMA Channel 6 Next Descriptor Pointer Register */
313#define DMA6_START_ADDR 0xFFC00D84 /* DMA Channel 6 Start Address Register */
314#define DMA6_CONFIG 0xFFC00D88 /* DMA Channel 6 Configuration Register */
315#define DMA6_X_COUNT 0xFFC00D90 /* DMA Channel 6 X Count Register */
316#define DMA6_X_MODIFY 0xFFC00D94 /* DMA Channel 6 X Modify Register */
317#define DMA6_Y_COUNT 0xFFC00D98 /* DMA Channel 6 Y Count Register */
318#define DMA6_Y_MODIFY 0xFFC00D9C /* DMA Channel 6 Y Modify Register */
319#define DMA6_CURR_DESC_PTR 0xFFC00DA0 /* DMA Channel 6 Current Descriptor Pointer Register */
320#define DMA6_CURR_ADDR 0xFFC00DA4 /* DMA Channel 6 Current Address Register */
321#define DMA6_IRQ_STATUS 0xFFC00DA8 /* DMA Channel 6 Interrupt/Status Register */
322#define DMA6_PERIPHERAL_MAP 0xFFC00DAC /* DMA Channel 6 Peripheral Map Register */
323#define DMA6_CURR_X_COUNT 0xFFC00DB0 /* DMA Channel 6 Current X Count Register */
324#define DMA6_CURR_Y_COUNT 0xFFC00DB8 /* DMA Channel 6 Current Y Count Register */
325
326#define DMA7_NEXT_DESC_PTR 0xFFC00DC0 /* DMA Channel 7 Next Descriptor Pointer Register */
327#define DMA7_START_ADDR 0xFFC00DC4 /* DMA Channel 7 Start Address Register */
328#define DMA7_CONFIG 0xFFC00DC8 /* DMA Channel 7 Configuration Register */
329#define DMA7_X_COUNT 0xFFC00DD0 /* DMA Channel 7 X Count Register */
330#define DMA7_X_MODIFY 0xFFC00DD4 /* DMA Channel 7 X Modify Register */
331#define DMA7_Y_COUNT 0xFFC00DD8 /* DMA Channel 7 Y Count Register */
332#define DMA7_Y_MODIFY 0xFFC00DDC /* DMA Channel 7 Y Modify Register */
333#define DMA7_CURR_DESC_PTR 0xFFC00DE0 /* DMA Channel 7 Current Descriptor Pointer Register */
334#define DMA7_CURR_ADDR 0xFFC00DE4 /* DMA Channel 7 Current Address Register */
335#define DMA7_IRQ_STATUS 0xFFC00DE8 /* DMA Channel 7 Interrupt/Status Register */
336#define DMA7_PERIPHERAL_MAP 0xFFC00DEC /* DMA Channel 7 Peripheral Map Register */
337#define DMA7_CURR_X_COUNT 0xFFC00DF0 /* DMA Channel 7 Current X Count Register */
338#define DMA7_CURR_Y_COUNT 0xFFC00DF8 /* DMA Channel 7 Current Y Count Register */
339
340#define DMA8_NEXT_DESC_PTR 0xFFC00E00 /* DMA Channel 8 Next Descriptor Pointer Register */
341#define DMA8_START_ADDR 0xFFC00E04 /* DMA Channel 8 Start Address Register */
342#define DMA8_CONFIG 0xFFC00E08 /* DMA Channel 8 Configuration Register */
343#define DMA8_X_COUNT 0xFFC00E10 /* DMA Channel 8 X Count Register */
344#define DMA8_X_MODIFY 0xFFC00E14 /* DMA Channel 8 X Modify Register */
345#define DMA8_Y_COUNT 0xFFC00E18 /* DMA Channel 8 Y Count Register */
346#define DMA8_Y_MODIFY 0xFFC00E1C /* DMA Channel 8 Y Modify Register */
347#define DMA8_CURR_DESC_PTR 0xFFC00E20 /* DMA Channel 8 Current Descriptor Pointer Register */
348#define DMA8_CURR_ADDR 0xFFC00E24 /* DMA Channel 8 Current Address Register */
349#define DMA8_IRQ_STATUS 0xFFC00E28 /* DMA Channel 8 Interrupt/Status Register */
350#define DMA8_PERIPHERAL_MAP 0xFFC00E2C /* DMA Channel 8 Peripheral Map Register */
351#define DMA8_CURR_X_COUNT 0xFFC00E30 /* DMA Channel 8 Current X Count Register */
352#define DMA8_CURR_Y_COUNT 0xFFC00E38 /* DMA Channel 8 Current Y Count Register */
353
354#define DMA9_NEXT_DESC_PTR 0xFFC00E40 /* DMA Channel 9 Next Descriptor Pointer Register */
355#define DMA9_START_ADDR 0xFFC00E44 /* DMA Channel 9 Start Address Register */
356#define DMA9_CONFIG 0xFFC00E48 /* DMA Channel 9 Configuration Register */
357#define DMA9_X_COUNT 0xFFC00E50 /* DMA Channel 9 X Count Register */
358#define DMA9_X_MODIFY 0xFFC00E54 /* DMA Channel 9 X Modify Register */
359#define DMA9_Y_COUNT 0xFFC00E58 /* DMA Channel 9 Y Count Register */
360#define DMA9_Y_MODIFY 0xFFC00E5C /* DMA Channel 9 Y Modify Register */
361#define DMA9_CURR_DESC_PTR 0xFFC00E60 /* DMA Channel 9 Current Descriptor Pointer Register */
362#define DMA9_CURR_ADDR 0xFFC00E64 /* DMA Channel 9 Current Address Register */
363#define DMA9_IRQ_STATUS 0xFFC00E68 /* DMA Channel 9 Interrupt/Status Register */
364#define DMA9_PERIPHERAL_MAP 0xFFC00E6C /* DMA Channel 9 Peripheral Map Register */
365#define DMA9_CURR_X_COUNT 0xFFC00E70 /* DMA Channel 9 Current X Count Register */
366#define DMA9_CURR_Y_COUNT 0xFFC00E78 /* DMA Channel 9 Current Y Count Register */
367
368#define DMA10_NEXT_DESC_PTR 0xFFC00E80 /* DMA Channel 10 Next Descriptor Pointer Register */
369#define DMA10_START_ADDR 0xFFC00E84 /* DMA Channel 10 Start Address Register */
370#define DMA10_CONFIG 0xFFC00E88 /* DMA Channel 10 Configuration Register */
371#define DMA10_X_COUNT 0xFFC00E90 /* DMA Channel 10 X Count Register */
372#define DMA10_X_MODIFY 0xFFC00E94 /* DMA Channel 10 X Modify Register */
373#define DMA10_Y_COUNT 0xFFC00E98 /* DMA Channel 10 Y Count Register */
374#define DMA10_Y_MODIFY 0xFFC00E9C /* DMA Channel 10 Y Modify Register */
375#define DMA10_CURR_DESC_PTR 0xFFC00EA0 /* DMA Channel 10 Current Descriptor Pointer Register */
376#define DMA10_CURR_ADDR 0xFFC00EA4 /* DMA Channel 10 Current Address Register */
377#define DMA10_IRQ_STATUS 0xFFC00EA8 /* DMA Channel 10 Interrupt/Status Register */
378#define DMA10_PERIPHERAL_MAP 0xFFC00EAC /* DMA Channel 10 Peripheral Map Register */
379#define DMA10_CURR_X_COUNT 0xFFC00EB0 /* DMA Channel 10 Current X Count Register */
380#define DMA10_CURR_Y_COUNT 0xFFC00EB8 /* DMA Channel 10 Current Y Count Register */
381
382#define DMA11_NEXT_DESC_PTR 0xFFC00EC0 /* DMA Channel 11 Next Descriptor Pointer Register */
383#define DMA11_START_ADDR 0xFFC00EC4 /* DMA Channel 11 Start Address Register */
384#define DMA11_CONFIG 0xFFC00EC8 /* DMA Channel 11 Configuration Register */
385#define DMA11_X_COUNT 0xFFC00ED0 /* DMA Channel 11 X Count Register */
386#define DMA11_X_MODIFY 0xFFC00ED4 /* DMA Channel 11 X Modify Register */
387#define DMA11_Y_COUNT 0xFFC00ED8 /* DMA Channel 11 Y Count Register */
388#define DMA11_Y_MODIFY 0xFFC00EDC /* DMA Channel 11 Y Modify Register */
389#define DMA11_CURR_DESC_PTR 0xFFC00EE0 /* DMA Channel 11 Current Descriptor Pointer Register */
390#define DMA11_CURR_ADDR 0xFFC00EE4 /* DMA Channel 11 Current Address Register */
391#define DMA11_IRQ_STATUS 0xFFC00EE8 /* DMA Channel 11 Interrupt/Status Register */
392#define DMA11_PERIPHERAL_MAP 0xFFC00EEC /* DMA Channel 11 Peripheral Map Register */
393#define DMA11_CURR_X_COUNT 0xFFC00EF0 /* DMA Channel 11 Current X Count Register */
394#define DMA11_CURR_Y_COUNT 0xFFC00EF8 /* DMA Channel 11 Current Y Count Register */
395
396#define MDMA_D0_NEXT_DESC_PTR 0xFFC00F00 /* MemDMA Stream 0 Destination Next Descriptor Pointer Register */
397#define MDMA_D0_START_ADDR 0xFFC00F04 /* MemDMA Stream 0 Destination Start Address Register */
398#define MDMA_D0_CONFIG 0xFFC00F08 /* MemDMA Stream 0 Destination Configuration Register */
399#define MDMA_D0_X_COUNT 0xFFC00F10 /* MemDMA Stream 0 Destination X Count Register */
400#define MDMA_D0_X_MODIFY 0xFFC00F14 /* MemDMA Stream 0 Destination X Modify Register */
401#define MDMA_D0_Y_COUNT 0xFFC00F18 /* MemDMA Stream 0 Destination Y Count Register */
402#define MDMA_D0_Y_MODIFY 0xFFC00F1C /* MemDMA Stream 0 Destination Y Modify Register */
403#define MDMA_D0_CURR_DESC_PTR 0xFFC00F20 /* MemDMA Stream 0 Destination Current Descriptor Pointer Register */
404#define MDMA_D0_CURR_ADDR 0xFFC00F24 /* MemDMA Stream 0 Destination Current Address Register */
405#define MDMA_D0_IRQ_STATUS 0xFFC00F28 /* MemDMA Stream 0 Destination Interrupt/Status Register */
406#define MDMA_D0_PERIPHERAL_MAP 0xFFC00F2C /* MemDMA Stream 0 Destination Peripheral Map Register */
407#define MDMA_D0_CURR_X_COUNT 0xFFC00F30 /* MemDMA Stream 0 Destination Current X Count Register */
408#define MDMA_D0_CURR_Y_COUNT 0xFFC00F38 /* MemDMA Stream 0 Destination Current Y Count Register */
409
410#define MDMA_S0_NEXT_DESC_PTR 0xFFC00F40 /* MemDMA Stream 0 Source Next Descriptor Pointer Register */
411#define MDMA_S0_START_ADDR 0xFFC00F44 /* MemDMA Stream 0 Source Start Address Register */
412#define MDMA_S0_CONFIG 0xFFC00F48 /* MemDMA Stream 0 Source Configuration Register */
413#define MDMA_S0_X_COUNT 0xFFC00F50 /* MemDMA Stream 0 Source X Count Register */
414#define MDMA_S0_X_MODIFY 0xFFC00F54 /* MemDMA Stream 0 Source X Modify Register */
415#define MDMA_S0_Y_COUNT 0xFFC00F58 /* MemDMA Stream 0 Source Y Count Register */
416#define MDMA_S0_Y_MODIFY 0xFFC00F5C /* MemDMA Stream 0 Source Y Modify Register */
417#define MDMA_S0_CURR_DESC_PTR 0xFFC00F60 /* MemDMA Stream 0 Source Current Descriptor Pointer Register */
418#define MDMA_S0_CURR_ADDR 0xFFC00F64 /* MemDMA Stream 0 Source Current Address Register */
419#define MDMA_S0_IRQ_STATUS 0xFFC00F68 /* MemDMA Stream 0 Source Interrupt/Status Register */
420#define MDMA_S0_PERIPHERAL_MAP 0xFFC00F6C /* MemDMA Stream 0 Source Peripheral Map Register */
421#define MDMA_S0_CURR_X_COUNT 0xFFC00F70 /* MemDMA Stream 0 Source Current X Count Register */
422#define MDMA_S0_CURR_Y_COUNT 0xFFC00F78 /* MemDMA Stream 0 Source Current Y Count Register */
423
424#define MDMA_D1_NEXT_DESC_PTR 0xFFC00F80 /* MemDMA Stream 1 Destination Next Descriptor Pointer Register */
425#define MDMA_D1_START_ADDR 0xFFC00F84 /* MemDMA Stream 1 Destination Start Address Register */
426#define MDMA_D1_CONFIG 0xFFC00F88 /* MemDMA Stream 1 Destination Configuration Register */
427#define MDMA_D1_X_COUNT 0xFFC00F90 /* MemDMA Stream 1 Destination X Count Register */
428#define MDMA_D1_X_MODIFY 0xFFC00F94 /* MemDMA Stream 1 Destination X Modify Register */
429#define MDMA_D1_Y_COUNT 0xFFC00F98 /* MemDMA Stream 1 Destination Y Count Register */
430#define MDMA_D1_Y_MODIFY 0xFFC00F9C /* MemDMA Stream 1 Destination Y Modify Register */
431#define MDMA_D1_CURR_DESC_PTR 0xFFC00FA0 /* MemDMA Stream 1 Destination Current Descriptor Pointer Register */
432#define MDMA_D1_CURR_ADDR 0xFFC00FA4 /* MemDMA Stream 1 Destination Current Address Register */
433#define MDMA_D1_IRQ_STATUS 0xFFC00FA8 /* MemDMA Stream 1 Destination Interrupt/Status Register */
434#define MDMA_D1_PERIPHERAL_MAP 0xFFC00FAC /* MemDMA Stream 1 Destination Peripheral Map Register */
435#define MDMA_D1_CURR_X_COUNT 0xFFC00FB0 /* MemDMA Stream 1 Destination Current X Count Register */
436#define MDMA_D1_CURR_Y_COUNT 0xFFC00FB8 /* MemDMA Stream 1 Destination Current Y Count Register */
437
438#define MDMA_S1_NEXT_DESC_PTR 0xFFC00FC0 /* MemDMA Stream 1 Source Next Descriptor Pointer Register */
439#define MDMA_S1_START_ADDR 0xFFC00FC4 /* MemDMA Stream 1 Source Start Address Register */
440#define MDMA_S1_CONFIG 0xFFC00FC8 /* MemDMA Stream 1 Source Configuration Register */
441#define MDMA_S1_X_COUNT 0xFFC00FD0 /* MemDMA Stream 1 Source X Count Register */
442#define MDMA_S1_X_MODIFY 0xFFC00FD4 /* MemDMA Stream 1 Source X Modify Register */
443#define MDMA_S1_Y_COUNT 0xFFC00FD8 /* MemDMA Stream 1 Source Y Count Register */
444#define MDMA_S1_Y_MODIFY 0xFFC00FDC /* MemDMA Stream 1 Source Y Modify Register */
445#define MDMA_S1_CURR_DESC_PTR 0xFFC00FE0 /* MemDMA Stream 1 Source Current Descriptor Pointer Register */
446#define MDMA_S1_CURR_ADDR 0xFFC00FE4 /* MemDMA Stream 1 Source Current Address Register */
447#define MDMA_S1_IRQ_STATUS 0xFFC00FE8 /* MemDMA Stream 1 Source Interrupt/Status Register */
448#define MDMA_S1_PERIPHERAL_MAP 0xFFC00FEC /* MemDMA Stream 1 Source Peripheral Map Register */
449#define MDMA_S1_CURR_X_COUNT 0xFFC00FF0 /* MemDMA Stream 1 Source Current X Count Register */
450#define MDMA_S1_CURR_Y_COUNT 0xFFC00FF8 /* MemDMA Stream 1 Source Current Y Count Register */
451
452/* Parallel Peripheral Interface (0xFFC01000 - 0xFFC010FF) */
453#define PPI_CONTROL 0xFFC01000 /* PPI Control Register */
454#define PPI_STATUS 0xFFC01004 /* PPI Status Register */
455#define PPI_COUNT 0xFFC01008 /* PPI Transfer Count Register */
456#define PPI_DELAY 0xFFC0100C /* PPI Delay Count Register */
457#define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */
458
459/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
460#define TWI0_REGBASE 0xFFC01400
461#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */
462#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */
463#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */
464#define TWI_SLAVE_STAT 0xFFC0140C /* Slave Mode Status Register */
465#define TWI_SLAVE_ADDR 0xFFC01410 /* Slave Mode Address Register */
466#define TWI_MASTER_CTL 0xFFC01414 /* Master Mode Control Register */
467#define TWI_MASTER_STAT 0xFFC01418 /* Master Mode Status Register */
468#define TWI_MASTER_ADDR 0xFFC0141C /* Master Mode Address Register */
469#define TWI_INT_STAT 0xFFC01420 /* TWI Interrupt Status Register */
470#define TWI_INT_MASK 0xFFC01424 /* TWI Master Interrupt Mask Register */
471#define TWI_FIFO_CTL 0xFFC01428 /* FIFO Control Register */
472#define TWI_FIFO_STAT 0xFFC0142C /* FIFO Status Register */
473#define TWI_XMT_DATA8 0xFFC01480 /* FIFO Transmit Data Single Byte Register */
474#define TWI_XMT_DATA16 0xFFC01484 /* FIFO Transmit Data Double Byte Register */
475#define TWI_RCV_DATA8 0xFFC01488 /* FIFO Receive Data Single Byte Register */
476#define TWI_RCV_DATA16 0xFFC0148C /* FIFO Receive Data Double Byte Register */
477
478/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */
479#define PORTGIO 0xFFC01500 /* Port G I/O Pin State Specify Register */
480#define PORTGIO_CLEAR 0xFFC01504 /* Port G I/O Peripheral Interrupt Clear Register */
481#define PORTGIO_SET 0xFFC01508 /* Port G I/O Peripheral Interrupt Set Register */
482#define PORTGIO_TOGGLE 0xFFC0150C /* Port G I/O Pin State Toggle Register */
483#define PORTGIO_MASKA 0xFFC01510 /* Port G I/O Mask State Specify Interrupt A Register */
484#define PORTGIO_MASKA_CLEAR 0xFFC01514 /* Port G I/O Mask Disable Interrupt A Register */
485#define PORTGIO_MASKA_SET 0xFFC01518 /* Port G I/O Mask Enable Interrupt A Register */
486#define PORTGIO_MASKA_TOGGLE 0xFFC0151C /* Port G I/O Mask Toggle Enable Interrupt A Register */
487#define PORTGIO_MASKB 0xFFC01520 /* Port G I/O Mask State Specify Interrupt B Register */
488#define PORTGIO_MASKB_CLEAR 0xFFC01524 /* Port G I/O Mask Disable Interrupt B Register */
489#define PORTGIO_MASKB_SET 0xFFC01528 /* Port G I/O Mask Enable Interrupt B Register */
490#define PORTGIO_MASKB_TOGGLE 0xFFC0152C /* Port G I/O Mask Toggle Enable Interrupt B Register */
491#define PORTGIO_DIR 0xFFC01530 /* Port G I/O Direction Register */
492#define PORTGIO_POLAR 0xFFC01534 /* Port G I/O Source Polarity Register */
493#define PORTGIO_EDGE 0xFFC01538 /* Port G I/O Source Sensitivity Register */
494#define PORTGIO_BOTH 0xFFC0153C /* Port G I/O Set on BOTH Edges Register */
495#define PORTGIO_INEN 0xFFC01540 /* Port G I/O Input Enable Register */
496
497/* General Purpose I/O Port H (0xFFC01700 - 0xFFC017FF) */
498#define PORTHIO 0xFFC01700 /* Port H I/O Pin State Specify Register */
499#define PORTHIO_CLEAR 0xFFC01704 /* Port H I/O Peripheral Interrupt Clear Register */
500#define PORTHIO_SET 0xFFC01708 /* Port H I/O Peripheral Interrupt Set Register */
501#define PORTHIO_TOGGLE 0xFFC0170C /* Port H I/O Pin State Toggle Register */
502#define PORTHIO_MASKA 0xFFC01710 /* Port H I/O Mask State Specify Interrupt A Register */
503#define PORTHIO_MASKA_CLEAR 0xFFC01714 /* Port H I/O Mask Disable Interrupt A Register */
504#define PORTHIO_MASKA_SET 0xFFC01718 /* Port H I/O Mask Enable Interrupt A Register */
505#define PORTHIO_MASKA_TOGGLE 0xFFC0171C /* Port H I/O Mask Toggle Enable Interrupt A Register */
506#define PORTHIO_MASKB 0xFFC01720 /* Port H I/O Mask State Specify Interrupt B Register */
507#define PORTHIO_MASKB_CLEAR 0xFFC01724 /* Port H I/O Mask Disable Interrupt B Register */
508#define PORTHIO_MASKB_SET 0xFFC01728 /* Port H I/O Mask Enable Interrupt B Register */
509#define PORTHIO_MASKB_TOGGLE 0xFFC0172C /* Port H I/O Mask Toggle Enable Interrupt B Register */
510#define PORTHIO_DIR 0xFFC01730 /* Port H I/O Direction Register */
511#define PORTHIO_POLAR 0xFFC01734 /* Port H I/O Source Polarity Register */
512#define PORTHIO_EDGE 0xFFC01738 /* Port H I/O Source Sensitivity Register */
513#define PORTHIO_BOTH 0xFFC0173C /* Port H I/O Set on BOTH Edges Register */
514#define PORTHIO_INEN 0xFFC01740 /* Port H I/O Input Enable Register */
515
516/* UART1 Controller (0xFFC02000 - 0xFFC020FF) */
517#define UART1_THR 0xFFC02000 /* Transmit Holding register */
518#define UART1_RBR 0xFFC02000 /* Receive Buffer register */
519#define UART1_DLL 0xFFC02000 /* Divisor Latch (Low-Byte) */
520#define UART1_IER 0xFFC02004 /* Interrupt Enable Register */
521#define UART1_DLH 0xFFC02004 /* Divisor Latch (High-Byte) */
522#define UART1_IIR 0xFFC02008 /* Interrupt Identification Register */
523#define UART1_LCR 0xFFC0200C /* Line Control Register */
524#define UART1_MCR 0xFFC02010 /* Modem Control Register */
525#define UART1_LSR 0xFFC02014 /* Line Status Register */
526#define UART1_MSR 0xFFC02018 /* Modem Status Register */
527#define UART1_SCR 0xFFC0201C /* SCR Scratch Register */
528#define UART1_GCTL 0xFFC02024 /* Global Control Register */
529
530/* CAN Controller (0xFFC02A00 - 0xFFC02FFF) */
531/* For Mailboxes 0-15 */
532#define CAN_MC1 0xFFC02A00 /* Mailbox config reg 1 */
533#define CAN_MD1 0xFFC02A04 /* Mailbox direction reg 1 */
534#define CAN_TRS1 0xFFC02A08 /* Transmit Request Set reg 1 */
535#define CAN_TRR1 0xFFC02A0C /* Transmit Request Reset reg 1 */
536#define CAN_TA1 0xFFC02A10 /* Transmit Acknowledge reg 1 */
537#define CAN_AA1 0xFFC02A14 /* Transmit Abort Acknowledge reg 1 */
538#define CAN_RMP1 0xFFC02A18 /* Receive Message Pending reg 1 */
539#define CAN_RML1 0xFFC02A1C /* Receive Message Lost reg 1 */
540#define CAN_MBTIF1 0xFFC02A20 /* Mailbox Transmit Interrupt Flag reg 1 */
541#define CAN_MBRIF1 0xFFC02A24 /* Mailbox Receive Interrupt Flag reg 1 */
542#define CAN_MBIM1 0xFFC02A28 /* Mailbox Interrupt Mask reg 1 */
543#define CAN_RFH1 0xFFC02A2C /* Remote Frame Handling reg 1 */
544#define CAN_OPSS1 0xFFC02A30 /* Overwrite Protection Single Shot Xmit reg 1 */
545
546/* For Mailboxes 16-31 */
547#define CAN_MC2 0xFFC02A40 /* Mailbox config reg 2 */
548#define CAN_MD2 0xFFC02A44 /* Mailbox direction reg 2 */
549#define CAN_TRS2 0xFFC02A48 /* Transmit Request Set reg 2 */
550#define CAN_TRR2 0xFFC02A4C /* Transmit Request Reset reg 2 */
551#define CAN_TA2 0xFFC02A50 /* Transmit Acknowledge reg 2 */
552#define CAN_AA2 0xFFC02A54 /* Transmit Abort Acknowledge reg 2 */
553#define CAN_RMP2 0xFFC02A58 /* Receive Message Pending reg 2 */
554#define CAN_RML2 0xFFC02A5C /* Receive Message Lost reg 2 */
555#define CAN_MBTIF2 0xFFC02A60 /* Mailbox Transmit Interrupt Flag reg 2 */
556#define CAN_MBRIF2 0xFFC02A64 /* Mailbox Receive Interrupt Flag reg 2 */
557#define CAN_MBIM2 0xFFC02A68 /* Mailbox Interrupt Mask reg 2 */
558#define CAN_RFH2 0xFFC02A6C /* Remote Frame Handling reg 2 */
559#define CAN_OPSS2 0xFFC02A70 /* Overwrite Protection Single Shot Xmit reg 2 */
560
561/* CAN Configuration, Control, and Status Registers */
562#define CAN_CLOCK 0xFFC02A80 /* Bit Timing Configuration register 0 */
563#define CAN_TIMING 0xFFC02A84 /* Bit Timing Configuration register 1 */
564#define CAN_DEBUG 0xFFC02A88 /* Debug Register */
565#define CAN_STATUS 0xFFC02A8C /* Global Status Register */
566#define CAN_CEC 0xFFC02A90 /* Error Counter Register */
567#define CAN_GIS 0xFFC02A94 /* Global Interrupt Status Register */
568#define CAN_GIM 0xFFC02A98 /* Global Interrupt Mask Register */
569#define CAN_GIF 0xFFC02A9C /* Global Interrupt Flag Register */
570#define CAN_CONTROL 0xFFC02AA0 /* Master Control Register */
571#define CAN_INTR 0xFFC02AA4 /* Interrupt Pending Register */
572
573#define CAN_MBTD 0xFFC02AAC /* Mailbox Temporary Disable Feature */
574#define CAN_EWR 0xFFC02AB0 /* Programmable Warning Level */
575#define CAN_ESR 0xFFC02AB4 /* Error Status Register */
576#define CAN_UCREG 0xFFC02AC0 /* Universal Counter Register/Capture Register */
577#define CAN_UCCNT 0xFFC02AC4 /* Universal Counter */
578#define CAN_UCRC 0xFFC02AC8 /* Universal Counter Force Reload Register */
579#define CAN_UCCNF 0xFFC02ACC /* Universal Counter Configuration Register */
580
581/* Mailbox Acceptance Masks */
582#define CAN_AM00L 0xFFC02B00 /* Mailbox 0 Low Acceptance Mask */
583#define CAN_AM00H 0xFFC02B04 /* Mailbox 0 High Acceptance Mask */
584#define CAN_AM01L 0xFFC02B08 /* Mailbox 1 Low Acceptance Mask */
585#define CAN_AM01H 0xFFC02B0C /* Mailbox 1 High Acceptance Mask */
586#define CAN_AM02L 0xFFC02B10 /* Mailbox 2 Low Acceptance Mask */
587#define CAN_AM02H 0xFFC02B14 /* Mailbox 2 High Acceptance Mask */
588#define CAN_AM03L 0xFFC02B18 /* Mailbox 3 Low Acceptance Mask */
589#define CAN_AM03H 0xFFC02B1C /* Mailbox 3 High Acceptance Mask */
590#define CAN_AM04L 0xFFC02B20 /* Mailbox 4 Low Acceptance Mask */
591#define CAN_AM04H 0xFFC02B24 /* Mailbox 4 High Acceptance Mask */
592#define CAN_AM05L 0xFFC02B28 /* Mailbox 5 Low Acceptance Mask */
593#define CAN_AM05H 0xFFC02B2C /* Mailbox 5 High Acceptance Mask */
594#define CAN_AM06L 0xFFC02B30 /* Mailbox 6 Low Acceptance Mask */
595#define CAN_AM06H 0xFFC02B34 /* Mailbox 6 High Acceptance Mask */
596#define CAN_AM07L 0xFFC02B38 /* Mailbox 7 Low Acceptance Mask */
597#define CAN_AM07H 0xFFC02B3C /* Mailbox 7 High Acceptance Mask */
598#define CAN_AM08L 0xFFC02B40 /* Mailbox 8 Low Acceptance Mask */
599#define CAN_AM08H 0xFFC02B44 /* Mailbox 8 High Acceptance Mask */
600#define CAN_AM09L 0xFFC02B48 /* Mailbox 9 Low Acceptance Mask */
601#define CAN_AM09H 0xFFC02B4C /* Mailbox 9 High Acceptance Mask */
602#define CAN_AM10L 0xFFC02B50 /* Mailbox 10 Low Acceptance Mask */
603#define CAN_AM10H 0xFFC02B54 /* Mailbox 10 High Acceptance Mask */
604#define CAN_AM11L 0xFFC02B58 /* Mailbox 11 Low Acceptance Mask */
605#define CAN_AM11H 0xFFC02B5C /* Mailbox 11 High Acceptance Mask */
606#define CAN_AM12L 0xFFC02B60 /* Mailbox 12 Low Acceptance Mask */
607#define CAN_AM12H 0xFFC02B64 /* Mailbox 12 High Acceptance Mask */
608#define CAN_AM13L 0xFFC02B68 /* Mailbox 13 Low Acceptance Mask */
609#define CAN_AM13H 0xFFC02B6C /* Mailbox 13 High Acceptance Mask */
610#define CAN_AM14L 0xFFC02B70 /* Mailbox 14 Low Acceptance Mask */
611#define CAN_AM14H 0xFFC02B74 /* Mailbox 14 High Acceptance Mask */
612#define CAN_AM15L 0xFFC02B78 /* Mailbox 15 Low Acceptance Mask */
613#define CAN_AM15H 0xFFC02B7C /* Mailbox 15 High Acceptance Mask */
614
615#define CAN_AM16L 0xFFC02B80 /* Mailbox 16 Low Acceptance Mask */
616#define CAN_AM16H 0xFFC02B84 /* Mailbox 16 High Acceptance Mask */
617#define CAN_AM17L 0xFFC02B88 /* Mailbox 17 Low Acceptance Mask */
618#define CAN_AM17H 0xFFC02B8C /* Mailbox 17 High Acceptance Mask */
619#define CAN_AM18L 0xFFC02B90 /* Mailbox 18 Low Acceptance Mask */
620#define CAN_AM18H 0xFFC02B94 /* Mailbox 18 High Acceptance Mask */
621#define CAN_AM19L 0xFFC02B98 /* Mailbox 19 Low Acceptance Mask */
622#define CAN_AM19H 0xFFC02B9C /* Mailbox 19 High Acceptance Mask */
623#define CAN_AM20L 0xFFC02BA0 /* Mailbox 20 Low Acceptance Mask */
624#define CAN_AM20H 0xFFC02BA4 /* Mailbox 20 High Acceptance Mask */
625#define CAN_AM21L 0xFFC02BA8 /* Mailbox 21 Low Acceptance Mask */
626#define CAN_AM21H 0xFFC02BAC /* Mailbox 21 High Acceptance Mask */
627#define CAN_AM22L 0xFFC02BB0 /* Mailbox 22 Low Acceptance Mask */
628#define CAN_AM22H 0xFFC02BB4 /* Mailbox 22 High Acceptance Mask */
629#define CAN_AM23L 0xFFC02BB8 /* Mailbox 23 Low Acceptance Mask */
630#define CAN_AM23H 0xFFC02BBC /* Mailbox 23 High Acceptance Mask */
631#define CAN_AM24L 0xFFC02BC0 /* Mailbox 24 Low Acceptance Mask */
632#define CAN_AM24H 0xFFC02BC4 /* Mailbox 24 High Acceptance Mask */
633#define CAN_AM25L 0xFFC02BC8 /* Mailbox 25 Low Acceptance Mask */
634#define CAN_AM25H 0xFFC02BCC /* Mailbox 25 High Acceptance Mask */
635#define CAN_AM26L 0xFFC02BD0 /* Mailbox 26 Low Acceptance Mask */
636#define CAN_AM26H 0xFFC02BD4 /* Mailbox 26 High Acceptance Mask */
637#define CAN_AM27L 0xFFC02BD8 /* Mailbox 27 Low Acceptance Mask */
638#define CAN_AM27H 0xFFC02BDC /* Mailbox 27 High Acceptance Mask */
639#define CAN_AM28L 0xFFC02BE0 /* Mailbox 28 Low Acceptance Mask */
640#define CAN_AM28H 0xFFC02BE4 /* Mailbox 28 High Acceptance Mask */
641#define CAN_AM29L 0xFFC02BE8 /* Mailbox 29 Low Acceptance Mask */
642#define CAN_AM29H 0xFFC02BEC /* Mailbox 29 High Acceptance Mask */
643#define CAN_AM30L 0xFFC02BF0 /* Mailbox 30 Low Acceptance Mask */
644#define CAN_AM30H 0xFFC02BF4 /* Mailbox 30 High Acceptance Mask */
645#define CAN_AM31L 0xFFC02BF8 /* Mailbox 31 Low Acceptance Mask */
646#define CAN_AM31H 0xFFC02BFC /* Mailbox 31 High Acceptance Mask */
647
648/* CAN Acceptance Mask Macros */
649#define CAN_AM_L(x) (CAN_AM00L+((x)*0x8))
650#define CAN_AM_H(x) (CAN_AM00H+((x)*0x8))
651
652/* Mailbox Registers */
653#define CAN_MB00_DATA0 0xFFC02C00 /* Mailbox 0 Data Word 0 [15:0] Register */
654#define CAN_MB00_DATA1 0xFFC02C04 /* Mailbox 0 Data Word 1 [31:16] Register */
655#define CAN_MB00_DATA2 0xFFC02C08 /* Mailbox 0 Data Word 2 [47:32] Register */
656#define CAN_MB00_DATA3 0xFFC02C0C /* Mailbox 0 Data Word 3 [63:48] Register */
657#define CAN_MB00_LENGTH 0xFFC02C10 /* Mailbox 0 Data Length Code Register */
658#define CAN_MB00_TIMESTAMP 0xFFC02C14 /* Mailbox 0 Time Stamp Value Register */
659#define CAN_MB00_ID0 0xFFC02C18 /* Mailbox 0 Identifier Low Register */
660#define CAN_MB00_ID1 0xFFC02C1C /* Mailbox 0 Identifier High Register */
661
662#define CAN_MB01_DATA0 0xFFC02C20 /* Mailbox 1 Data Word 0 [15:0] Register */
663#define CAN_MB01_DATA1 0xFFC02C24 /* Mailbox 1 Data Word 1 [31:16] Register */
664#define CAN_MB01_DATA2 0xFFC02C28 /* Mailbox 1 Data Word 2 [47:32] Register */
665#define CAN_MB01_DATA3 0xFFC02C2C /* Mailbox 1 Data Word 3 [63:48] Register */
666#define CAN_MB01_LENGTH 0xFFC02C30 /* Mailbox 1 Data Length Code Register */
667#define CAN_MB01_TIMESTAMP 0xFFC02C34 /* Mailbox 1 Time Stamp Value Register */
668#define CAN_MB01_ID0 0xFFC02C38 /* Mailbox 1 Identifier Low Register */
669#define CAN_MB01_ID1 0xFFC02C3C /* Mailbox 1 Identifier High Register */
670
671#define CAN_MB02_DATA0 0xFFC02C40 /* Mailbox 2 Data Word 0 [15:0] Register */
672#define CAN_MB02_DATA1 0xFFC02C44 /* Mailbox 2 Data Word 1 [31:16] Register */
673#define CAN_MB02_DATA2 0xFFC02C48 /* Mailbox 2 Data Word 2 [47:32] Register */
674#define CAN_MB02_DATA3 0xFFC02C4C /* Mailbox 2 Data Word 3 [63:48] Register */
675#define CAN_MB02_LENGTH 0xFFC02C50 /* Mailbox 2 Data Length Code Register */
676#define CAN_MB02_TIMESTAMP 0xFFC02C54 /* Mailbox 2 Time Stamp Value Register */
677#define CAN_MB02_ID0 0xFFC02C58 /* Mailbox 2 Identifier Low Register */
678#define CAN_MB02_ID1 0xFFC02C5C /* Mailbox 2 Identifier High Register */
679
680#define CAN_MB03_DATA0 0xFFC02C60 /* Mailbox 3 Data Word 0 [15:0] Register */
681#define CAN_MB03_DATA1 0xFFC02C64 /* Mailbox 3 Data Word 1 [31:16] Register */
682#define CAN_MB03_DATA2 0xFFC02C68 /* Mailbox 3 Data Word 2 [47:32] Register */
683#define CAN_MB03_DATA3 0xFFC02C6C /* Mailbox 3 Data Word 3 [63:48] Register */
684#define CAN_MB03_LENGTH 0xFFC02C70 /* Mailbox 3 Data Length Code Register */
685#define CAN_MB03_TIMESTAMP 0xFFC02C74 /* Mailbox 3 Time Stamp Value Register */
686#define CAN_MB03_ID0 0xFFC02C78 /* Mailbox 3 Identifier Low Register */
687#define CAN_MB03_ID1 0xFFC02C7C /* Mailbox 3 Identifier High Register */
688
689#define CAN_MB04_DATA0 0xFFC02C80 /* Mailbox 4 Data Word 0 [15:0] Register */
690#define CAN_MB04_DATA1 0xFFC02C84 /* Mailbox 4 Data Word 1 [31:16] Register */
691#define CAN_MB04_DATA2 0xFFC02C88 /* Mailbox 4 Data Word 2 [47:32] Register */
692#define CAN_MB04_DATA3 0xFFC02C8C /* Mailbox 4 Data Word 3 [63:48] Register */
693#define CAN_MB04_LENGTH 0xFFC02C90 /* Mailbox 4 Data Length Code Register */
694#define CAN_MB04_TIMESTAMP 0xFFC02C94 /* Mailbox 4 Time Stamp Value Register */
695#define CAN_MB04_ID0 0xFFC02C98 /* Mailbox 4 Identifier Low Register */
696#define CAN_MB04_ID1 0xFFC02C9C /* Mailbox 4 Identifier High Register */
697
698#define CAN_MB05_DATA0 0xFFC02CA0 /* Mailbox 5 Data Word 0 [15:0] Register */
699#define CAN_MB05_DATA1 0xFFC02CA4 /* Mailbox 5 Data Word 1 [31:16] Register */
700#define CAN_MB05_DATA2 0xFFC02CA8 /* Mailbox 5 Data Word 2 [47:32] Register */
701#define CAN_MB05_DATA3 0xFFC02CAC /* Mailbox 5 Data Word 3 [63:48] Register */
702#define CAN_MB05_LENGTH 0xFFC02CB0 /* Mailbox 5 Data Length Code Register */
703#define CAN_MB05_TIMESTAMP 0xFFC02CB4 /* Mailbox 5 Time Stamp Value Register */
704#define CAN_MB05_ID0 0xFFC02CB8 /* Mailbox 5 Identifier Low Register */
705#define CAN_MB05_ID1 0xFFC02CBC /* Mailbox 5 Identifier High Register */
706
707#define CAN_MB06_DATA0 0xFFC02CC0 /* Mailbox 6 Data Word 0 [15:0] Register */
708#define CAN_MB06_DATA1 0xFFC02CC4 /* Mailbox 6 Data Word 1 [31:16] Register */
709#define CAN_MB06_DATA2 0xFFC02CC8 /* Mailbox 6 Data Word 2 [47:32] Register */
710#define CAN_MB06_DATA3 0xFFC02CCC /* Mailbox 6 Data Word 3 [63:48] Register */
711#define CAN_MB06_LENGTH 0xFFC02CD0 /* Mailbox 6 Data Length Code Register */
712#define CAN_MB06_TIMESTAMP 0xFFC02CD4 /* Mailbox 6 Time Stamp Value Register */
713#define CAN_MB06_ID0 0xFFC02CD8 /* Mailbox 6 Identifier Low Register */
714#define CAN_MB06_ID1 0xFFC02CDC /* Mailbox 6 Identifier High Register */
715
716#define CAN_MB07_DATA0 0xFFC02CE0 /* Mailbox 7 Data Word 0 [15:0] Register */
717#define CAN_MB07_DATA1 0xFFC02CE4 /* Mailbox 7 Data Word 1 [31:16] Register */
718#define CAN_MB07_DATA2 0xFFC02CE8 /* Mailbox 7 Data Word 2 [47:32] Register */
719#define CAN_MB07_DATA3 0xFFC02CEC /* Mailbox 7 Data Word 3 [63:48] Register */
720#define CAN_MB07_LENGTH 0xFFC02CF0 /* Mailbox 7 Data Length Code Register */
721#define CAN_MB07_TIMESTAMP 0xFFC02CF4 /* Mailbox 7 Time Stamp Value Register */
722#define CAN_MB07_ID0 0xFFC02CF8 /* Mailbox 7 Identifier Low Register */
723#define CAN_MB07_ID1 0xFFC02CFC /* Mailbox 7 Identifier High Register */
724
725#define CAN_MB08_DATA0 0xFFC02D00 /* Mailbox 8 Data Word 0 [15:0] Register */
726#define CAN_MB08_DATA1 0xFFC02D04 /* Mailbox 8 Data Word 1 [31:16] Register */
727#define CAN_MB08_DATA2 0xFFC02D08 /* Mailbox 8 Data Word 2 [47:32] Register */
728#define CAN_MB08_DATA3 0xFFC02D0C /* Mailbox 8 Data Word 3 [63:48] Register */
729#define CAN_MB08_LENGTH 0xFFC02D10 /* Mailbox 8 Data Length Code Register */
730#define CAN_MB08_TIMESTAMP 0xFFC02D14 /* Mailbox 8 Time Stamp Value Register */
731#define CAN_MB08_ID0 0xFFC02D18 /* Mailbox 8 Identifier Low Register */
732#define CAN_MB08_ID1 0xFFC02D1C /* Mailbox 8 Identifier High Register */
733
734#define CAN_MB09_DATA0 0xFFC02D20 /* Mailbox 9 Data Word 0 [15:0] Register */
735#define CAN_MB09_DATA1 0xFFC02D24 /* Mailbox 9 Data Word 1 [31:16] Register */
736#define CAN_MB09_DATA2 0xFFC02D28 /* Mailbox 9 Data Word 2 [47:32] Register */
737#define CAN_MB09_DATA3 0xFFC02D2C /* Mailbox 9 Data Word 3 [63:48] Register */
738#define CAN_MB09_LENGTH 0xFFC02D30 /* Mailbox 9 Data Length Code Register */
739#define CAN_MB09_TIMESTAMP 0xFFC02D34 /* Mailbox 9 Time Stamp Value Register */
740#define CAN_MB09_ID0 0xFFC02D38 /* Mailbox 9 Identifier Low Register */
741#define CAN_MB09_ID1 0xFFC02D3C /* Mailbox 9 Identifier High Register */
742
743#define CAN_MB10_DATA0 0xFFC02D40 /* Mailbox 10 Data Word 0 [15:0] Register */
744#define CAN_MB10_DATA1 0xFFC02D44 /* Mailbox 10 Data Word 1 [31:16] Register */
745#define CAN_MB10_DATA2 0xFFC02D48 /* Mailbox 10 Data Word 2 [47:32] Register */
746#define CAN_MB10_DATA3 0xFFC02D4C /* Mailbox 10 Data Word 3 [63:48] Register */
747#define CAN_MB10_LENGTH 0xFFC02D50 /* Mailbox 10 Data Length Code Register */
748#define CAN_MB10_TIMESTAMP 0xFFC02D54 /* Mailbox 10 Time Stamp Value Register */
749#define CAN_MB10_ID0 0xFFC02D58 /* Mailbox 10 Identifier Low Register */
750#define CAN_MB10_ID1 0xFFC02D5C /* Mailbox 10 Identifier High Register */
751
752#define CAN_MB11_DATA0 0xFFC02D60 /* Mailbox 11 Data Word 0 [15:0] Register */
753#define CAN_MB11_DATA1 0xFFC02D64 /* Mailbox 11 Data Word 1 [31:16] Register */
754#define CAN_MB11_DATA2 0xFFC02D68 /* Mailbox 11 Data Word 2 [47:32] Register */
755#define CAN_MB11_DATA3 0xFFC02D6C /* Mailbox 11 Data Word 3 [63:48] Register */
756#define CAN_MB11_LENGTH 0xFFC02D70 /* Mailbox 11 Data Length Code Register */
757#define CAN_MB11_TIMESTAMP 0xFFC02D74 /* Mailbox 11 Time Stamp Value Register */
758#define CAN_MB11_ID0 0xFFC02D78 /* Mailbox 11 Identifier Low Register */
759#define CAN_MB11_ID1 0xFFC02D7C /* Mailbox 11 Identifier High Register */
760
761#define CAN_MB12_DATA0 0xFFC02D80 /* Mailbox 12 Data Word 0 [15:0] Register */
762#define CAN_MB12_DATA1 0xFFC02D84 /* Mailbox 12 Data Word 1 [31:16] Register */
763#define CAN_MB12_DATA2 0xFFC02D88 /* Mailbox 12 Data Word 2 [47:32] Register */
764#define CAN_MB12_DATA3 0xFFC02D8C /* Mailbox 12 Data Word 3 [63:48] Register */
765#define CAN_MB12_LENGTH 0xFFC02D90 /* Mailbox 12 Data Length Code Register */
766#define CAN_MB12_TIMESTAMP 0xFFC02D94 /* Mailbox 12 Time Stamp Value Register */
767#define CAN_MB12_ID0 0xFFC02D98 /* Mailbox 12 Identifier Low Register */
768#define CAN_MB12_ID1 0xFFC02D9C /* Mailbox 12 Identifier High Register */
769
770#define CAN_MB13_DATA0 0xFFC02DA0 /* Mailbox 13 Data Word 0 [15:0] Register */
771#define CAN_MB13_DATA1 0xFFC02DA4 /* Mailbox 13 Data Word 1 [31:16] Register */
772#define CAN_MB13_DATA2 0xFFC02DA8 /* Mailbox 13 Data Word 2 [47:32] Register */
773#define CAN_MB13_DATA3 0xFFC02DAC /* Mailbox 13 Data Word 3 [63:48] Register */
774#define CAN_MB13_LENGTH 0xFFC02DB0 /* Mailbox 13 Data Length Code Register */
775#define CAN_MB13_TIMESTAMP 0xFFC02DB4 /* Mailbox 13 Time Stamp Value Register */
776#define CAN_MB13_ID0 0xFFC02DB8 /* Mailbox 13 Identifier Low Register */
777#define CAN_MB13_ID1 0xFFC02DBC /* Mailbox 13 Identifier High Register */
778
779#define CAN_MB14_DATA0 0xFFC02DC0 /* Mailbox 14 Data Word 0 [15:0] Register */
780#define CAN_MB14_DATA1 0xFFC02DC4 /* Mailbox 14 Data Word 1 [31:16] Register */
781#define CAN_MB14_DATA2 0xFFC02DC8 /* Mailbox 14 Data Word 2 [47:32] Register */
782#define CAN_MB14_DATA3 0xFFC02DCC /* Mailbox 14 Data Word 3 [63:48] Register */
783#define CAN_MB14_LENGTH 0xFFC02DD0 /* Mailbox 14 Data Length Code Register */
784#define CAN_MB14_TIMESTAMP 0xFFC02DD4 /* Mailbox 14 Time Stamp Value Register */
785#define CAN_MB14_ID0 0xFFC02DD8 /* Mailbox 14 Identifier Low Register */
786#define CAN_MB14_ID1 0xFFC02DDC /* Mailbox 14 Identifier High Register */
787
788#define CAN_MB15_DATA0 0xFFC02DE0 /* Mailbox 15 Data Word 0 [15:0] Register */
789#define CAN_MB15_DATA1 0xFFC02DE4 /* Mailbox 15 Data Word 1 [31:16] Register */
790#define CAN_MB15_DATA2 0xFFC02DE8 /* Mailbox 15 Data Word 2 [47:32] Register */
791#define CAN_MB15_DATA3 0xFFC02DEC /* Mailbox 15 Data Word 3 [63:48] Register */
792#define CAN_MB15_LENGTH 0xFFC02DF0 /* Mailbox 15 Data Length Code Register */
793#define CAN_MB15_TIMESTAMP 0xFFC02DF4 /* Mailbox 15 Time Stamp Value Register */
794#define CAN_MB15_ID0 0xFFC02DF8 /* Mailbox 15 Identifier Low Register */
795#define CAN_MB15_ID1 0xFFC02DFC /* Mailbox 15 Identifier High Register */
796
797#define CAN_MB16_DATA0 0xFFC02E00 /* Mailbox 16 Data Word 0 [15:0] Register */
798#define CAN_MB16_DATA1 0xFFC02E04 /* Mailbox 16 Data Word 1 [31:16] Register */
799#define CAN_MB16_DATA2 0xFFC02E08 /* Mailbox 16 Data Word 2 [47:32] Register */
800#define CAN_MB16_DATA3 0xFFC02E0C /* Mailbox 16 Data Word 3 [63:48] Register */
801#define CAN_MB16_LENGTH 0xFFC02E10 /* Mailbox 16 Data Length Code Register */
802#define CAN_MB16_TIMESTAMP 0xFFC02E14 /* Mailbox 16 Time Stamp Value Register */
803#define CAN_MB16_ID0 0xFFC02E18 /* Mailbox 16 Identifier Low Register */
804#define CAN_MB16_ID1 0xFFC02E1C /* Mailbox 16 Identifier High Register */
805
806#define CAN_MB17_DATA0 0xFFC02E20 /* Mailbox 17 Data Word 0 [15:0] Register */
807#define CAN_MB17_DATA1 0xFFC02E24 /* Mailbox 17 Data Word 1 [31:16] Register */
808#define CAN_MB17_DATA2 0xFFC02E28 /* Mailbox 17 Data Word 2 [47:32] Register */
809#define CAN_MB17_DATA3 0xFFC02E2C /* Mailbox 17 Data Word 3 [63:48] Register */
810#define CAN_MB17_LENGTH 0xFFC02E30 /* Mailbox 17 Data Length Code Register */
811#define CAN_MB17_TIMESTAMP 0xFFC02E34 /* Mailbox 17 Time Stamp Value Register */
812#define CAN_MB17_ID0 0xFFC02E38 /* Mailbox 17 Identifier Low Register */
813#define CAN_MB17_ID1 0xFFC02E3C /* Mailbox 17 Identifier High Register */
814
815#define CAN_MB18_DATA0 0xFFC02E40 /* Mailbox 18 Data Word 0 [15:0] Register */
816#define CAN_MB18_DATA1 0xFFC02E44 /* Mailbox 18 Data Word 1 [31:16] Register */
817#define CAN_MB18_DATA2 0xFFC02E48 /* Mailbox 18 Data Word 2 [47:32] Register */
818#define CAN_MB18_DATA3 0xFFC02E4C /* Mailbox 18 Data Word 3 [63:48] Register */
819#define CAN_MB18_LENGTH 0xFFC02E50 /* Mailbox 18 Data Length Code Register */
820#define CAN_MB18_TIMESTAMP 0xFFC02E54 /* Mailbox 18 Time Stamp Value Register */
821#define CAN_MB18_ID0 0xFFC02E58 /* Mailbox 18 Identifier Low Register */
822#define CAN_MB18_ID1 0xFFC02E5C /* Mailbox 18 Identifier High Register */
823
824#define CAN_MB19_DATA0 0xFFC02E60 /* Mailbox 19 Data Word 0 [15:0] Register */
825#define CAN_MB19_DATA1 0xFFC02E64 /* Mailbox 19 Data Word 1 [31:16] Register */
826#define CAN_MB19_DATA2 0xFFC02E68 /* Mailbox 19 Data Word 2 [47:32] Register */
827#define CAN_MB19_DATA3 0xFFC02E6C /* Mailbox 19 Data Word 3 [63:48] Register */
828#define CAN_MB19_LENGTH 0xFFC02E70 /* Mailbox 19 Data Length Code Register */
829#define CAN_MB19_TIMESTAMP 0xFFC02E74 /* Mailbox 19 Time Stamp Value Register */
830#define CAN_MB19_ID0 0xFFC02E78 /* Mailbox 19 Identifier Low Register */
831#define CAN_MB19_ID1 0xFFC02E7C /* Mailbox 19 Identifier High Register */
832
833#define CAN_MB20_DATA0 0xFFC02E80 /* Mailbox 20 Data Word 0 [15:0] Register */
834#define CAN_MB20_DATA1 0xFFC02E84 /* Mailbox 20 Data Word 1 [31:16] Register */
835#define CAN_MB20_DATA2 0xFFC02E88 /* Mailbox 20 Data Word 2 [47:32] Register */
836#define CAN_MB20_DATA3 0xFFC02E8C /* Mailbox 20 Data Word 3 [63:48] Register */
837#define CAN_MB20_LENGTH 0xFFC02E90 /* Mailbox 20 Data Length Code Register */
838#define CAN_MB20_TIMESTAMP 0xFFC02E94 /* Mailbox 20 Time Stamp Value Register */
839#define CAN_MB20_ID0 0xFFC02E98 /* Mailbox 20 Identifier Low Register */
840#define CAN_MB20_ID1 0xFFC02E9C /* Mailbox 20 Identifier High Register */
841
842#define CAN_MB21_DATA0 0xFFC02EA0 /* Mailbox 21 Data Word 0 [15:0] Register */
843#define CAN_MB21_DATA1 0xFFC02EA4 /* Mailbox 21 Data Word 1 [31:16] Register */
844#define CAN_MB21_DATA2 0xFFC02EA8 /* Mailbox 21 Data Word 2 [47:32] Register */
845#define CAN_MB21_DATA3 0xFFC02EAC /* Mailbox 21 Data Word 3 [63:48] Register */
846#define CAN_MB21_LENGTH 0xFFC02EB0 /* Mailbox 21 Data Length Code Register */
847#define CAN_MB21_TIMESTAMP 0xFFC02EB4 /* Mailbox 21 Time Stamp Value Register */
848#define CAN_MB21_ID0 0xFFC02EB8 /* Mailbox 21 Identifier Low Register */
849#define CAN_MB21_ID1 0xFFC02EBC /* Mailbox 21 Identifier High Register */
850
851#define CAN_MB22_DATA0 0xFFC02EC0 /* Mailbox 22 Data Word 0 [15:0] Register */
852#define CAN_MB22_DATA1 0xFFC02EC4 /* Mailbox 22 Data Word 1 [31:16] Register */
853#define CAN_MB22_DATA2 0xFFC02EC8 /* Mailbox 22 Data Word 2 [47:32] Register */
854#define CAN_MB22_DATA3 0xFFC02ECC /* Mailbox 22 Data Word 3 [63:48] Register */
855#define CAN_MB22_LENGTH 0xFFC02ED0 /* Mailbox 22 Data Length Code Register */
856#define CAN_MB22_TIMESTAMP 0xFFC02ED4 /* Mailbox 22 Time Stamp Value Register */
857#define CAN_MB22_ID0 0xFFC02ED8 /* Mailbox 22 Identifier Low Register */
858#define CAN_MB22_ID1 0xFFC02EDC /* Mailbox 22 Identifier High Register */
859
860#define CAN_MB23_DATA0 0xFFC02EE0 /* Mailbox 23 Data Word 0 [15:0] Register */
861#define CAN_MB23_DATA1 0xFFC02EE4 /* Mailbox 23 Data Word 1 [31:16] Register */
862#define CAN_MB23_DATA2 0xFFC02EE8 /* Mailbox 23 Data Word 2 [47:32] Register */
863#define CAN_MB23_DATA3 0xFFC02EEC /* Mailbox 23 Data Word 3 [63:48] Register */
864#define CAN_MB23_LENGTH 0xFFC02EF0 /* Mailbox 23 Data Length Code Register */
865#define CAN_MB23_TIMESTAMP 0xFFC02EF4 /* Mailbox 23 Time Stamp Value Register */
866#define CAN_MB23_ID0 0xFFC02EF8 /* Mailbox 23 Identifier Low Register */
867#define CAN_MB23_ID1 0xFFC02EFC /* Mailbox 23 Identifier High Register */
868
869#define CAN_MB24_DATA0 0xFFC02F00 /* Mailbox 24 Data Word 0 [15:0] Register */
870#define CAN_MB24_DATA1 0xFFC02F04 /* Mailbox 24 Data Word 1 [31:16] Register */
871#define CAN_MB24_DATA2 0xFFC02F08 /* Mailbox 24 Data Word 2 [47:32] Register */
872#define CAN_MB24_DATA3 0xFFC02F0C /* Mailbox 24 Data Word 3 [63:48] Register */
873#define CAN_MB24_LENGTH 0xFFC02F10 /* Mailbox 24 Data Length Code Register */
874#define CAN_MB24_TIMESTAMP 0xFFC02F14 /* Mailbox 24 Time Stamp Value Register */
875#define CAN_MB24_ID0 0xFFC02F18 /* Mailbox 24 Identifier Low Register */
876#define CAN_MB24_ID1 0xFFC02F1C /* Mailbox 24 Identifier High Register */
877
878#define CAN_MB25_DATA0 0xFFC02F20 /* Mailbox 25 Data Word 0 [15:0] Register */
879#define CAN_MB25_DATA1 0xFFC02F24 /* Mailbox 25 Data Word 1 [31:16] Register */
880#define CAN_MB25_DATA2 0xFFC02F28 /* Mailbox 25 Data Word 2 [47:32] Register */
881#define CAN_MB25_DATA3 0xFFC02F2C /* Mailbox 25 Data Word 3 [63:48] Register */
882#define CAN_MB25_LENGTH 0xFFC02F30 /* Mailbox 25 Data Length Code Register */
883#define CAN_MB25_TIMESTAMP 0xFFC02F34 /* Mailbox 25 Time Stamp Value Register */
884#define CAN_MB25_ID0 0xFFC02F38 /* Mailbox 25 Identifier Low Register */
885#define CAN_MB25_ID1 0xFFC02F3C /* Mailbox 25 Identifier High Register */
886
887#define CAN_MB26_DATA0 0xFFC02F40 /* Mailbox 26 Data Word 0 [15:0] Register */
888#define CAN_MB26_DATA1 0xFFC02F44 /* Mailbox 26 Data Word 1 [31:16] Register */
889#define CAN_MB26_DATA2 0xFFC02F48 /* Mailbox 26 Data Word 2 [47:32] Register */
890#define CAN_MB26_DATA3 0xFFC02F4C /* Mailbox 26 Data Word 3 [63:48] Register */
891#define CAN_MB26_LENGTH 0xFFC02F50 /* Mailbox 26 Data Length Code Register */
892#define CAN_MB26_TIMESTAMP 0xFFC02F54 /* Mailbox 26 Time Stamp Value Register */
893#define CAN_MB26_ID0 0xFFC02F58 /* Mailbox 26 Identifier Low Register */
894#define CAN_MB26_ID1 0xFFC02F5C /* Mailbox 26 Identifier High Register */
895
896#define CAN_MB27_DATA0 0xFFC02F60 /* Mailbox 27 Data Word 0 [15:0] Register */
897#define CAN_MB27_DATA1 0xFFC02F64 /* Mailbox 27 Data Word 1 [31:16] Register */
898#define CAN_MB27_DATA2 0xFFC02F68 /* Mailbox 27 Data Word 2 [47:32] Register */
899#define CAN_MB27_DATA3 0xFFC02F6C /* Mailbox 27 Data Word 3 [63:48] Register */
900#define CAN_MB27_LENGTH 0xFFC02F70 /* Mailbox 27 Data Length Code Register */
901#define CAN_MB27_TIMESTAMP 0xFFC02F74 /* Mailbox 27 Time Stamp Value Register */
902#define CAN_MB27_ID0 0xFFC02F78 /* Mailbox 27 Identifier Low Register */
903#define CAN_MB27_ID1 0xFFC02F7C /* Mailbox 27 Identifier High Register */
904
905#define CAN_MB28_DATA0 0xFFC02F80 /* Mailbox 28 Data Word 0 [15:0] Register */
906#define CAN_MB28_DATA1 0xFFC02F84 /* Mailbox 28 Data Word 1 [31:16] Register */
907#define CAN_MB28_DATA2 0xFFC02F88 /* Mailbox 28 Data Word 2 [47:32] Register */
908#define CAN_MB28_DATA3 0xFFC02F8C /* Mailbox 28 Data Word 3 [63:48] Register */
909#define CAN_MB28_LENGTH 0xFFC02F90 /* Mailbox 28 Data Length Code Register */
910#define CAN_MB28_TIMESTAMP 0xFFC02F94 /* Mailbox 28 Time Stamp Value Register */
911#define CAN_MB28_ID0 0xFFC02F98 /* Mailbox 28 Identifier Low Register */
912#define CAN_MB28_ID1 0xFFC02F9C /* Mailbox 28 Identifier High Register */
913
914#define CAN_MB29_DATA0 0xFFC02FA0 /* Mailbox 29 Data Word 0 [15:0] Register */
915#define CAN_MB29_DATA1 0xFFC02FA4 /* Mailbox 29 Data Word 1 [31:16] Register */
916#define CAN_MB29_DATA2 0xFFC02FA8 /* Mailbox 29 Data Word 2 [47:32] Register */
917#define CAN_MB29_DATA3 0xFFC02FAC /* Mailbox 29 Data Word 3 [63:48] Register */
918#define CAN_MB29_LENGTH 0xFFC02FB0 /* Mailbox 29 Data Length Code Register */
919#define CAN_MB29_TIMESTAMP 0xFFC02FB4 /* Mailbox 29 Time Stamp Value Register */
920#define CAN_MB29_ID0 0xFFC02FB8 /* Mailbox 29 Identifier Low Register */
921#define CAN_MB29_ID1 0xFFC02FBC /* Mailbox 29 Identifier High Register */
922
923#define CAN_MB30_DATA0 0xFFC02FC0 /* Mailbox 30 Data Word 0 [15:0] Register */
924#define CAN_MB30_DATA1 0xFFC02FC4 /* Mailbox 30 Data Word 1 [31:16] Register */
925#define CAN_MB30_DATA2 0xFFC02FC8 /* Mailbox 30 Data Word 2 [47:32] Register */
926#define CAN_MB30_DATA3 0xFFC02FCC /* Mailbox 30 Data Word 3 [63:48] Register */
927#define CAN_MB30_LENGTH 0xFFC02FD0 /* Mailbox 30 Data Length Code Register */
928#define CAN_MB30_TIMESTAMP 0xFFC02FD4 /* Mailbox 30 Time Stamp Value Register */
929#define CAN_MB30_ID0 0xFFC02FD8 /* Mailbox 30 Identifier Low Register */
930#define CAN_MB30_ID1 0xFFC02FDC /* Mailbox 30 Identifier High Register */
931
932#define CAN_MB31_DATA0 0xFFC02FE0 /* Mailbox 31 Data Word 0 [15:0] Register */
933#define CAN_MB31_DATA1 0xFFC02FE4 /* Mailbox 31 Data Word 1 [31:16] Register */
934#define CAN_MB31_DATA2 0xFFC02FE8 /* Mailbox 31 Data Word 2 [47:32] Register */
935#define CAN_MB31_DATA3 0xFFC02FEC /* Mailbox 31 Data Word 3 [63:48] Register */
936#define CAN_MB31_LENGTH 0xFFC02FF0 /* Mailbox 31 Data Length Code Register */
937#define CAN_MB31_TIMESTAMP 0xFFC02FF4 /* Mailbox 31 Time Stamp Value Register */
938#define CAN_MB31_ID0 0xFFC02FF8 /* Mailbox 31 Identifier Low Register */
939#define CAN_MB31_ID1 0xFFC02FFC /* Mailbox 31 Identifier High Register */
940
941/* CAN Mailbox Area Macros */
942#define CAN_MB_ID1(x) (CAN_MB00_ID1+((x)*0x20))
943#define CAN_MB_ID0(x) (CAN_MB00_ID0+((x)*0x20))
944#define CAN_MB_TIMESTAMP(x) (CAN_MB00_TIMESTAMP+((x)*0x20))
945#define CAN_MB_LENGTH(x) (CAN_MB00_LENGTH+((x)*0x20))
946#define CAN_MB_DATA3(x) (CAN_MB00_DATA3+((x)*0x20))
947#define CAN_MB_DATA2(x) (CAN_MB00_DATA2+((x)*0x20))
948#define CAN_MB_DATA1(x) (CAN_MB00_DATA1+((x)*0x20))
949#define CAN_MB_DATA0(x) (CAN_MB00_DATA0+((x)*0x20))
950
951/* Pin Control Registers (0xFFC03200 - 0xFFC032FF) */
952#define PORTF_FER 0xFFC03200 /* Port F Function Enable Register (Alternate/Flag*) */
953#define PORTG_FER 0xFFC03204 /* Port G Function Enable Register (Alternate/Flag*) */
954#define PORTH_FER 0xFFC03208 /* Port H Function Enable Register (Alternate/Flag*) */
955#define BFIN_PORT_MUX 0xFFC0320C /* Port Multiplexer Control Register */
956
957/* Handshake MDMA Registers (0xFFC03300 - 0xFFC033FF) */
958#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */
959#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */
960#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */
961#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshhold Register */
962#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */
963#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */
964#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */
965
966#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */
967#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */
968#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */
969#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshhold Register */
970#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */
971#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */
972#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */
973
974/***********************************************************************************
975** System MMR Register Bits And Macros
976**
977** Disclaimer: All macros are intended to make C and Assembly code more readable.
978** Use these macros carefully, as any that do left shifts for field
979** depositing will result in the lower order bits being destroyed. Any
980** macro that shifts left to properly position the bit-field should be
981** used as part of an OR to initialize a register and NOT as a dynamic
982** modifier UNLESS the lower order bits are saved and ORed back in when
983** the macro is used.
984*************************************************************************************/
985/*
986** ********************* PLL AND RESET MASKS ****************************************/
987/* PLL_CTL Masks */
988#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
989#define PLL_OFF 0x0002 /* PLL Not Powered */
990#define STOPCK 0x0008 /* Core Clock Off */
991#define PDWN 0x0020 /* Enter Deep Sleep Mode */
992#define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
993#define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
994#define BYPASS 0x0100 /* Bypass the PLL */
995#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
996/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
997#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
998
999/* PLL_DIV Masks */
1000#define SSEL 0x000F /* System Select */
1001#define CSEL 0x0030 /* Core Select */
1002#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
1003#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
1004#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
1005#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
1006/* PLL_DIV Macros */
1007#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
1008
1009/* VR_CTL Masks */
1010#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
1011#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
1012#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
1013#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
1014#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
1015
1016#define GAIN 0x000C /* Voltage Level Gain */
1017#define GAIN_5 0x0000 /* GAIN = 5 */
1018#define GAIN_10 0x0004 /* GAIN = 10 */
1019#define GAIN_20 0x0008 /* GAIN = 20 */
1020#define GAIN_50 0x000C /* GAIN = 50 */
1021
1022#define VLEV 0x00F0 /* Internal Voltage Level */
1023#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
1024#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
1025#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
1026#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
1027#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
1028#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
1029#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
1030#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
1031#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
1032#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
1033
1034#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
1035#define CANWE 0x0200 /* Enable CAN Wakeup From Hibernate */
1036#define PHYWE 0x0400 /* Enable PHY Wakeup From Hibernate */
1037#define CLKBUFOE 0x4000 /* CLKIN Buffer Output Enable */
1038#define PHYCLKOE CLKBUFOE /* Alternative legacy name for the above */
1039#define SCKELOW 0x8000 /* Enable Drive CKE Low During Reset */
1040
1041/* PLL_STAT Masks */
1042#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
1043#define FULL_ON 0x0002 /* Processor In Full On Mode */
1044#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
1045#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
1046
1047/* CHIPID Masks */
1048#define CHIPID_VERSION 0xF0000000
1049#define CHIPID_FAMILY 0x0FFFF000
1050#define CHIPID_MANUFACTURE 0x00000FFE
1051
1052/* SWRST Masks */
1053#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
1054#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
1055#define RESET_DOUBLE 0x2000 /* SW Reset Generated By Core Double-Fault */
1056#define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */
1057#define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */
1058
1059/* SYSCR Masks */
1060#define BMODE 0x0007 /* Boot Mode - Latched During HW Reset From Mode Pins */
1061#define NOBOOT 0x0010 /* Execute From L1 or ASYNC Bank 0 When BMODE = 0 */
1062
1063/* ************* SYSTEM INTERRUPT CONTROLLER MASKS *************************************/
1064
1065/* SIC_IAR0 Macros */
1066#define P0_IVG(x) (((x)&0xF)-7) /* Peripheral #0 assigned IVG #x */
1067#define P1_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #1 assigned IVG #x */
1068#define P2_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #2 assigned IVG #x */
1069#define P3_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #3 assigned IVG #x */
1070#define P4_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #4 assigned IVG #x */
1071#define P5_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #5 assigned IVG #x */
1072#define P6_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #6 assigned IVG #x */
1073#define P7_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #7 assigned IVG #x */
1074
1075/* SIC_IAR1 Macros */
1076#define P8_IVG(x) (((x)&0xF)-7) /* Peripheral #8 assigned IVG #x */
1077#define P9_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #9 assigned IVG #x */
1078#define P10_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #10 assigned IVG #x */
1079#define P11_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #11 assigned IVG #x */
1080#define P12_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #12 assigned IVG #x */
1081#define P13_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #13 assigned IVG #x */
1082#define P14_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #14 assigned IVG #x */
1083#define P15_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #15 assigned IVG #x */
1084
1085/* SIC_IAR2 Macros */
1086#define P16_IVG(x) (((x)&0xF)-7) /* Peripheral #16 assigned IVG #x */
1087#define P17_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #17 assigned IVG #x */
1088#define P18_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #18 assigned IVG #x */
1089#define P19_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #19 assigned IVG #x */
1090#define P20_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #20 assigned IVG #x */
1091#define P21_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #21 assigned IVG #x */
1092#define P22_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #22 assigned IVG #x */
1093#define P23_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #23 assigned IVG #x */
1094
1095/* SIC_IAR3 Macros */
1096#define P24_IVG(x) (((x)&0xF)-7) /* Peripheral #24 assigned IVG #x */
1097#define P25_IVG(x) (((x)&0xF)-7) << 0x4 /* Peripheral #25 assigned IVG #x */
1098#define P26_IVG(x) (((x)&0xF)-7) << 0x8 /* Peripheral #26 assigned IVG #x */
1099#define P27_IVG(x) (((x)&0xF)-7) << 0xC /* Peripheral #27 assigned IVG #x */
1100#define P28_IVG(x) (((x)&0xF)-7) << 0x10 /* Peripheral #28 assigned IVG #x */
1101#define P29_IVG(x) (((x)&0xF)-7) << 0x14 /* Peripheral #29 assigned IVG #x */
1102#define P30_IVG(x) (((x)&0xF)-7) << 0x18 /* Peripheral #30 assigned IVG #x */
1103#define P31_IVG(x) (((x)&0xF)-7) << 0x1C /* Peripheral #31 assigned IVG #x */
1104
1105/* SIC_IMASK Masks */
1106#define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
1107#define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
1108#define SIC_MASK(x) (1 << ((x)&0x1F)) /* Mask Peripheral #x interrupt */
1109#define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Unmask Peripheral #x interrupt */
1110
1111/* SIC_IWR Masks */
1112#define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
1113#define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
1114#define IWR_ENABLE(x) (1 << ((x)&0x1F)) /* Wakeup Enable Peripheral #x */
1115#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */
1116
1117/* ************** UART CONTROLLER MASKS *************************/
1118/* UARTx_LCR Masks */
1119#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */
1120#define STB 0x04 /* Stop Bits */
1121#define PEN 0x08 /* Parity Enable */
1122#define EPS 0x10 /* Even Parity Select */
1123#define STP 0x20 /* Stick Parity */
1124#define SB 0x40 /* Set Break */
1125#define DLAB 0x80 /* Divisor Latch Access */
1126
1127/* UARTx_MCR Mask */
1128#define LOOP_ENA 0x10 /* Loopback Mode Enable */
1129#define LOOP_ENA_P 0x04
1130/* UARTx_LSR Masks */
1131#define DR 0x01 /* Data Ready */
1132#define OE 0x02 /* Overrun Error */
1133#define PE 0x04 /* Parity Error */
1134#define FE 0x08 /* Framing Error */
1135#define BI 0x10 /* Break Interrupt */
1136#define THRE 0x20 /* THR Empty */
1137#define TEMT 0x40 /* TSR and UART_THR Empty */
1138
1139/* UARTx_IER Masks */
1140#define ERBFI 0x01 /* Enable Receive Buffer Full Interrupt */
1141#define ETBEI 0x02 /* Enable Transmit Buffer Empty Interrupt */
1142#define ELSI 0x04 /* Enable RX Status Interrupt */
1143
1144/* UARTx_IIR Masks */
1145#define NINT 0x01 /* Pending Interrupt */
1146#define IIR_TX_READY 0x02 /* UART_THR empty */
1147#define IIR_RX_READY 0x04 /* Receive data ready */
1148#define IIR_LINE_CHANGE 0x06 /* Receive line status */
1149#define IIR_STATUS 0x06
1150
1151/* UARTx_GCTL Masks */
1152#define UCEN 0x01 /* Enable UARTx Clocks */
1153#define IREN 0x02 /* Enable IrDA Mode */
1154#define TPOLC 0x04 /* IrDA TX Polarity Change */
1155#define RPOLC 0x08 /* IrDA RX Polarity Change */
1156#define FPE 0x10 /* Force Parity Error On Transmit */
1157#define FFE 0x20 /* Force Framing Error On Transmit */
1158
1159/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS ****************************/
1160/* SPI_CTL Masks */
1161#define TIMOD 0x0003 /* Transfer Initiate Mode */
1162#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
1163#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
1164#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
1165#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
1166#define SZ 0x0004 /* Send Zero (When TDBR Empty, Send Zero/Last*) */
1167#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
1168#define PSSE 0x0010 /* Slave-Select Input Enable */
1169#define EMISO 0x0020 /* Enable MISO As Output */
1170#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
1171#define LSBF 0x0200 /* LSB First */
1172#define CPHA 0x0400 /* Clock Phase */
1173#define CPOL 0x0800 /* Clock Polarity */
1174#define MSTR 0x1000 /* Master/Slave* */
1175#define WOM 0x2000 /* Write Open Drain Master */
1176#define SPE 0x4000 /* SPI Enable */
1177
1178/* SPI_FLG Masks */
1179#define FLS1 0x0002 /* Enables SPI_FLOUT1 as SPI Slave-Select Output */
1180#define FLS2 0x0004 /* Enables SPI_FLOUT2 as SPI Slave-Select Output */
1181#define FLS3 0x0008 /* Enables SPI_FLOUT3 as SPI Slave-Select Output */
1182#define FLS4 0x0010 /* Enables SPI_FLOUT4 as SPI Slave-Select Output */
1183#define FLS5 0x0020 /* Enables SPI_FLOUT5 as SPI Slave-Select Output */
1184#define FLS6 0x0040 /* Enables SPI_FLOUT6 as SPI Slave-Select Output */
1185#define FLS7 0x0080 /* Enables SPI_FLOUT7 as SPI Slave-Select Output */
1186#define FLG1 0xFDFF /* Activates SPI_FLOUT1 */
1187#define FLG2 0xFBFF /* Activates SPI_FLOUT2 */
1188#define FLG3 0xF7FF /* Activates SPI_FLOUT3 */
1189#define FLG4 0xEFFF /* Activates SPI_FLOUT4 */
1190#define FLG5 0xDFFF /* Activates SPI_FLOUT5 */
1191#define FLG6 0xBFFF /* Activates SPI_FLOUT6 */
1192#define FLG7 0x7FFF /* Activates SPI_FLOUT7 */
1193
1194/* SPI_STAT Masks */
1195#define SPIF 0x0001 /* SPI Finished (Single-Word Transfer Complete) */
1196#define MODF 0x0002 /* Mode Fault Error (Another Device Tried To Become Master) */
1197#define TXE 0x0004 /* Transmission Error (Data Sent With No New Data In TDBR) */
1198#define TXS 0x0008 /* SPI_TDBR Data Buffer Status (Full/Empty*) */
1199#define RBSY 0x0010 /* Receive Error (Data Received With RDBR Full) */
1200#define RXS 0x0020 /* SPI_RDBR Data Buffer Status (Full/Empty*) */
1201#define TXCOL 0x0040 /* Transmit Collision Error (Corrupt Data May Have Been Sent) */
1202
1203/* **************** GENERAL PURPOSE TIMER MASKS **********************/
1204/* TIMER_ENABLE Masks */
1205#define TIMEN0 0x0001 /* Enable Timer 0 */
1206#define TIMEN1 0x0002 /* Enable Timer 1 */
1207#define TIMEN2 0x0004 /* Enable Timer 2 */
1208#define TIMEN3 0x0008 /* Enable Timer 3 */
1209#define TIMEN4 0x0010 /* Enable Timer 4 */
1210#define TIMEN5 0x0020 /* Enable Timer 5 */
1211#define TIMEN6 0x0040 /* Enable Timer 6 */
1212#define TIMEN7 0x0080 /* Enable Timer 7 */
1213
1214/* TIMER_DISABLE Masks */
1215#define TIMDIS0 TIMEN0 /* Disable Timer 0 */
1216#define TIMDIS1 TIMEN1 /* Disable Timer 1 */
1217#define TIMDIS2 TIMEN2 /* Disable Timer 2 */
1218#define TIMDIS3 TIMEN3 /* Disable Timer 3 */
1219#define TIMDIS4 TIMEN4 /* Disable Timer 4 */
1220#define TIMDIS5 TIMEN5 /* Disable Timer 5 */
1221#define TIMDIS6 TIMEN6 /* Disable Timer 6 */
1222#define TIMDIS7 TIMEN7 /* Disable Timer 7 */
1223
1224/* TIMER_STATUS Masks */
1225#define TIMIL0 0x00000001 /* Timer 0 Interrupt */
1226#define TIMIL1 0x00000002 /* Timer 1 Interrupt */
1227#define TIMIL2 0x00000004 /* Timer 2 Interrupt */
1228#define TIMIL3 0x00000008 /* Timer 3 Interrupt */
1229#define TOVF_ERR0 0x00000010 /* Timer 0 Counter Overflow */
1230#define TOVF_ERR1 0x00000020 /* Timer 1 Counter Overflow */
1231#define TOVF_ERR2 0x00000040 /* Timer 2 Counter Overflow */
1232#define TOVF_ERR3 0x00000080 /* Timer 3 Counter Overflow */
1233#define TRUN0 0x00001000 /* Timer 0 Slave Enable Status */
1234#define TRUN1 0x00002000 /* Timer 1 Slave Enable Status */
1235#define TRUN2 0x00004000 /* Timer 2 Slave Enable Status */
1236#define TRUN3 0x00008000 /* Timer 3 Slave Enable Status */
1237#define TIMIL4 0x00010000 /* Timer 4 Interrupt */
1238#define TIMIL5 0x00020000 /* Timer 5 Interrupt */
1239#define TIMIL6 0x00040000 /* Timer 6 Interrupt */
1240#define TIMIL7 0x00080000 /* Timer 7 Interrupt */
1241#define TOVF_ERR4 0x00100000 /* Timer 4 Counter Overflow */
1242#define TOVF_ERR5 0x00200000 /* Timer 5 Counter Overflow */
1243#define TOVF_ERR6 0x00400000 /* Timer 6 Counter Overflow */
1244#define TOVF_ERR7 0x00800000 /* Timer 7 Counter Overflow */
1245#define TRUN4 0x10000000 /* Timer 4 Slave Enable Status */
1246#define TRUN5 0x20000000 /* Timer 5 Slave Enable Status */
1247#define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */
1248#define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */
1249
1250/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
1251#define TOVL_ERR0 TOVF_ERR0
1252#define TOVL_ERR1 TOVF_ERR1
1253#define TOVL_ERR2 TOVF_ERR2
1254#define TOVL_ERR3 TOVF_ERR3
1255#define TOVL_ERR4 TOVF_ERR4
1256#define TOVL_ERR5 TOVF_ERR5
1257#define TOVL_ERR6 TOVF_ERR6
1258#define TOVL_ERR7 TOVF_ERR7
1259/* TIMERx_CONFIG Masks */
1260#define PWM_OUT 0x0001 /* Pulse-Width Modulation Output Mode */
1261#define WDTH_CAP 0x0002 /* Width Capture Input Mode */
1262#define EXT_CLK 0x0003 /* External Clock Mode */
1263#define PULSE_HI 0x0004 /* Action Pulse (Positive/Negative*) */
1264#define PERIOD_CNT 0x0008 /* Period Count */
1265#define IRQ_ENA 0x0010 /* Interrupt Request Enable */
1266#define TIN_SEL 0x0020 /* Timer Input Select */
1267#define OUT_DIS 0x0040 /* Output Pad Disable */
1268#define CLK_SEL 0x0080 /* Timer Clock Select */
1269#define TOGGLE_HI 0x0100 /* PWM_OUT PULSE_HI Toggle Mode */
1270#define EMU_RUN 0x0200 /* Emulation Behavior Select */
1271#define ERR_TYP 0xC000 /* Error Type */
1272
1273/* ****************** GPIO PORTS F, G, H MASKS ***********************/
1274/* General Purpose IO (0xFFC00700 - 0xFFC007FF) Masks */
1275/* Port F Masks */
1276#define PF0 0x0001
1277#define PF1 0x0002
1278#define PF2 0x0004
1279#define PF3 0x0008
1280#define PF4 0x0010
1281#define PF5 0x0020
1282#define PF6 0x0040
1283#define PF7 0x0080
1284#define PF8 0x0100
1285#define PF9 0x0200
1286#define PF10 0x0400
1287#define PF11 0x0800
1288#define PF12 0x1000
1289#define PF13 0x2000
1290#define PF14 0x4000
1291#define PF15 0x8000
1292
1293/* Port G Masks */
1294#define PG0 0x0001
1295#define PG1 0x0002
1296#define PG2 0x0004
1297#define PG3 0x0008
1298#define PG4 0x0010
1299#define PG5 0x0020
1300#define PG6 0x0040
1301#define PG7 0x0080
1302#define PG8 0x0100
1303#define PG9 0x0200
1304#define PG10 0x0400
1305#define PG11 0x0800
1306#define PG12 0x1000
1307#define PG13 0x2000
1308#define PG14 0x4000
1309#define PG15 0x8000
1310
1311/* Port H Masks */
1312#define PH0 0x0001
1313#define PH1 0x0002
1314#define PH2 0x0004
1315#define PH3 0x0008
1316#define PH4 0x0010
1317#define PH5 0x0020
1318#define PH6 0x0040
1319#define PH7 0x0080
1320#define PH8 0x0100
1321#define PH9 0x0200
1322#define PH10 0x0400
1323#define PH11 0x0800
1324#define PH12 0x1000
1325#define PH13 0x2000
1326#define PH14 0x4000
1327#define PH15 0x8000
1328
1329/* ******************* SERIAL PORT MASKS **************************************/
1330/* SPORTx_TCR1 Masks */
1331#define TSPEN 0x0001 /* Transmit Enable */
1332#define ITCLK 0x0002 /* Internal Transmit Clock Select */
1333#define DTYPE_NORM 0x0004 /* Data Format Normal */
1334#define DTYPE_ULAW 0x0008 /* Compand Using u-Law */
1335#define DTYPE_ALAW 0x000C /* Compand Using A-Law */
1336#define TLSBIT 0x0010 /* Transmit Bit Order */
1337#define ITFS 0x0200 /* Internal Transmit Frame Sync Select */
1338#define TFSR 0x0400 /* Transmit Frame Sync Required Select */
1339#define DITFS 0x0800 /* Data-Independent Transmit Frame Sync Select */
1340#define LTFS 0x1000 /* Low Transmit Frame Sync Select */
1341#define LATFS 0x2000 /* Late Transmit Frame Sync Select */
1342#define TCKFE 0x4000 /* Clock Falling Edge Select */
1343
1344/* SPORTx_TCR2 Masks and Macro */
1345#define SLEN(x) ((x)&0x1F) /* SPORT TX Word Length (2 - 31) */
1346#define TXSE 0x0100 /* TX Secondary Enable */
1347#define TSFSE 0x0200 /* Transmit Stereo Frame Sync Enable */
1348#define TRFST 0x0400 /* Left/Right Order (1 = Right Channel 1st) */
1349
1350/* SPORTx_RCR1 Masks */
1351#define RSPEN 0x0001 /* Receive Enable */
1352#define IRCLK 0x0002 /* Internal Receive Clock Select */
1353#define DTYPE_NORM 0x0004 /* Data Format Normal */
1354#define DTYPE_ULAW 0x0008 /* Compand Using u-Law */
1355#define DTYPE_ALAW 0x000C /* Compand Using A-Law */
1356#define RLSBIT 0x0010 /* Receive Bit Order */
1357#define IRFS 0x0200 /* Internal Receive Frame Sync Select */
1358#define RFSR 0x0400 /* Receive Frame Sync Required Select */
1359#define LRFS 0x1000 /* Low Receive Frame Sync Select */
1360#define LARFS 0x2000 /* Late Receive Frame Sync Select */
1361#define RCKFE 0x4000 /* Clock Falling Edge Select */
1362
1363/* SPORTx_RCR2 Masks */
1364#define SLEN(x) ((x)&0x1F) /* SPORT RX Word Length (2 - 31) */
1365#define RXSE 0x0100 /* RX Secondary Enable */
1366#define RSFSE 0x0200 /* RX Stereo Frame Sync Enable */
1367#define RRFST 0x0400 /* Right-First Data Order */
1368
1369/* SPORTx_STAT Masks */
1370#define RXNE 0x0001 /* Receive FIFO Not Empty Status */
1371#define RUVF 0x0002 /* Sticky Receive Underflow Status */
1372#define ROVF 0x0004 /* Sticky Receive Overflow Status */
1373#define TXF 0x0008 /* Transmit FIFO Full Status */
1374#define TUVF 0x0010 /* Sticky Transmit Underflow Status */
1375#define TOVF 0x0020 /* Sticky Transmit Overflow Status */
1376#define TXHRE 0x0040 /* Transmit Hold Register Empty */
1377
1378/* SPORTx_MCMC1 Macros */
1379#define SP_WOFF(x) ((x) & 0x3FF) /* Multichannel Window Offset Field */
1380
1381/* Only use WSIZE Macro With Logic OR While Setting Lower Order Bits */
1382#define SP_WSIZE(x) (((((x)>>0x3)-1)&0xF) << 0xC) /* Multichannel Window Size = (x/8)-1 */
1383
1384/* SPORTx_MCMC2 Masks */
1385#define REC_BYPASS 0x0000 /* Bypass Mode (No Clock Recovery) */
1386#define REC_2FROM4 0x0002 /* Recover 2 MHz Clock from 4 MHz Clock */
1387#define REC_8FROM16 0x0003 /* Recover 8 MHz Clock from 16 MHz Clock */
1388#define MCDTXPE 0x0004 /* Multichannel DMA Transmit Packing */
1389#define MCDRXPE 0x0008 /* Multichannel DMA Receive Packing */
1390#define MCMEN 0x0010 /* Multichannel Frame Mode Enable */
1391#define FSDR 0x0080 /* Multichannel Frame Sync to Data Relationship */
1392#define MFD_0 0x0000 /* Multichannel Frame Delay = 0 */
1393#define MFD_1 0x1000 /* Multichannel Frame Delay = 1 */
1394#define MFD_2 0x2000 /* Multichannel Frame Delay = 2 */
1395#define MFD_3 0x3000 /* Multichannel Frame Delay = 3 */
1396#define MFD_4 0x4000 /* Multichannel Frame Delay = 4 */
1397#define MFD_5 0x5000 /* Multichannel Frame Delay = 5 */
1398#define MFD_6 0x6000 /* Multichannel Frame Delay = 6 */
1399#define MFD_7 0x7000 /* Multichannel Frame Delay = 7 */
1400#define MFD_8 0x8000 /* Multichannel Frame Delay = 8 */
1401#define MFD_9 0x9000 /* Multichannel Frame Delay = 9 */
1402#define MFD_10 0xA000 /* Multichannel Frame Delay = 10 */
1403#define MFD_11 0xB000 /* Multichannel Frame Delay = 11 */
1404#define MFD_12 0xC000 /* Multichannel Frame Delay = 12 */
1405#define MFD_13 0xD000 /* Multichannel Frame Delay = 13 */
1406#define MFD_14 0xE000 /* Multichannel Frame Delay = 14 */
1407#define MFD_15 0xF000 /* Multichannel Frame Delay = 15 */
1408
1409/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS *************************/
1410/* EBIU_AMGCTL Masks */
1411#define AMCKEN 0x0001 /* Enable CLKOUT */
1412#define AMBEN_NONE 0x0000 /* All Banks Disabled */
1413#define AMBEN_B0 0x0002 /* Enable Async Memory Bank 0 only */
1414#define AMBEN_B0_B1 0x0004 /* Enable Async Memory Banks 0 & 1 only */
1415#define AMBEN_B0_B1_B2 0x0006 /* Enable Async Memory Banks 0, 1, and 2 */
1416#define AMBEN_ALL 0x0008 /* Enable Async Memory Banks (all) 0, 1, 2, and 3 */
1417
1418/* EBIU_AMBCTL0 Masks */
1419#define B0RDYEN 0x00000001 /* Bank 0 (B0) RDY Enable */
1420#define B0RDYPOL 0x00000002 /* B0 RDY Active High */
1421#define B0TT_1 0x00000004 /* B0 Transition Time (Read to Write) = 1 cycle */
1422#define B0TT_2 0x00000008 /* B0 Transition Time (Read to Write) = 2 cycles */
1423#define B0TT_3 0x0000000C /* B0 Transition Time (Read to Write) = 3 cycles */
1424#define B0TT_4 0x00000000 /* B0 Transition Time (Read to Write) = 4 cycles */
1425#define B0ST_1 0x00000010 /* B0 Setup Time (AOE to Read/Write) = 1 cycle */
1426#define B0ST_2 0x00000020 /* B0 Setup Time (AOE to Read/Write) = 2 cycles */
1427#define B0ST_3 0x00000030 /* B0 Setup Time (AOE to Read/Write) = 3 cycles */
1428#define B0ST_4 0x00000000 /* B0 Setup Time (AOE to Read/Write) = 4 cycles */
1429#define B0HT_1 0x00000040 /* B0 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1430#define B0HT_2 0x00000080 /* B0 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1431#define B0HT_3 0x000000C0 /* B0 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1432#define B0HT_0 0x00000000 /* B0 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1433#define B0RAT_1 0x00000100 /* B0 Read Access Time = 1 cycle */
1434#define B0RAT_2 0x00000200 /* B0 Read Access Time = 2 cycles */
1435#define B0RAT_3 0x00000300 /* B0 Read Access Time = 3 cycles */
1436#define B0RAT_4 0x00000400 /* B0 Read Access Time = 4 cycles */
1437#define B0RAT_5 0x00000500 /* B0 Read Access Time = 5 cycles */
1438#define B0RAT_6 0x00000600 /* B0 Read Access Time = 6 cycles */
1439#define B0RAT_7 0x00000700 /* B0 Read Access Time = 7 cycles */
1440#define B0RAT_8 0x00000800 /* B0 Read Access Time = 8 cycles */
1441#define B0RAT_9 0x00000900 /* B0 Read Access Time = 9 cycles */
1442#define B0RAT_10 0x00000A00 /* B0 Read Access Time = 10 cycles */
1443#define B0RAT_11 0x00000B00 /* B0 Read Access Time = 11 cycles */
1444#define B0RAT_12 0x00000C00 /* B0 Read Access Time = 12 cycles */
1445#define B0RAT_13 0x00000D00 /* B0 Read Access Time = 13 cycles */
1446#define B0RAT_14 0x00000E00 /* B0 Read Access Time = 14 cycles */
1447#define B0RAT_15 0x00000F00 /* B0 Read Access Time = 15 cycles */
1448#define B0WAT_1 0x00001000 /* B0 Write Access Time = 1 cycle */
1449#define B0WAT_2 0x00002000 /* B0 Write Access Time = 2 cycles */
1450#define B0WAT_3 0x00003000 /* B0 Write Access Time = 3 cycles */
1451#define B0WAT_4 0x00004000 /* B0 Write Access Time = 4 cycles */
1452#define B0WAT_5 0x00005000 /* B0 Write Access Time = 5 cycles */
1453#define B0WAT_6 0x00006000 /* B0 Write Access Time = 6 cycles */
1454#define B0WAT_7 0x00007000 /* B0 Write Access Time = 7 cycles */
1455#define B0WAT_8 0x00008000 /* B0 Write Access Time = 8 cycles */
1456#define B0WAT_9 0x00009000 /* B0 Write Access Time = 9 cycles */
1457#define B0WAT_10 0x0000A000 /* B0 Write Access Time = 10 cycles */
1458#define B0WAT_11 0x0000B000 /* B0 Write Access Time = 11 cycles */
1459#define B0WAT_12 0x0000C000 /* B0 Write Access Time = 12 cycles */
1460#define B0WAT_13 0x0000D000 /* B0 Write Access Time = 13 cycles */
1461#define B0WAT_14 0x0000E000 /* B0 Write Access Time = 14 cycles */
1462#define B0WAT_15 0x0000F000 /* B0 Write Access Time = 15 cycles */
1463
1464#define B1RDYEN 0x00010000 /* Bank 1 (B1) RDY Enable */
1465#define B1RDYPOL 0x00020000 /* B1 RDY Active High */
1466#define B1TT_1 0x00040000 /* B1 Transition Time (Read to Write) = 1 cycle */
1467#define B1TT_2 0x00080000 /* B1 Transition Time (Read to Write) = 2 cycles */
1468#define B1TT_3 0x000C0000 /* B1 Transition Time (Read to Write) = 3 cycles */
1469#define B1TT_4 0x00000000 /* B1 Transition Time (Read to Write) = 4 cycles */
1470#define B1ST_1 0x00100000 /* B1 Setup Time (AOE to Read/Write) = 1 cycle */
1471#define B1ST_2 0x00200000 /* B1 Setup Time (AOE to Read/Write) = 2 cycles */
1472#define B1ST_3 0x00300000 /* B1 Setup Time (AOE to Read/Write) = 3 cycles */
1473#define B1ST_4 0x00000000 /* B1 Setup Time (AOE to Read/Write) = 4 cycles */
1474#define B1HT_1 0x00400000 /* B1 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1475#define B1HT_2 0x00800000 /* B1 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1476#define B1HT_3 0x00C00000 /* B1 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1477#define B1HT_0 0x00000000 /* B1 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1478#define B1RAT_1 0x01000000 /* B1 Read Access Time = 1 cycle */
1479#define B1RAT_2 0x02000000 /* B1 Read Access Time = 2 cycles */
1480#define B1RAT_3 0x03000000 /* B1 Read Access Time = 3 cycles */
1481#define B1RAT_4 0x04000000 /* B1 Read Access Time = 4 cycles */
1482#define B1RAT_5 0x05000000 /* B1 Read Access Time = 5 cycles */
1483#define B1RAT_6 0x06000000 /* B1 Read Access Time = 6 cycles */
1484#define B1RAT_7 0x07000000 /* B1 Read Access Time = 7 cycles */
1485#define B1RAT_8 0x08000000 /* B1 Read Access Time = 8 cycles */
1486#define B1RAT_9 0x09000000 /* B1 Read Access Time = 9 cycles */
1487#define B1RAT_10 0x0A000000 /* B1 Read Access Time = 10 cycles */
1488#define B1RAT_11 0x0B000000 /* B1 Read Access Time = 11 cycles */
1489#define B1RAT_12 0x0C000000 /* B1 Read Access Time = 12 cycles */
1490#define B1RAT_13 0x0D000000 /* B1 Read Access Time = 13 cycles */
1491#define B1RAT_14 0x0E000000 /* B1 Read Access Time = 14 cycles */
1492#define B1RAT_15 0x0F000000 /* B1 Read Access Time = 15 cycles */
1493#define B1WAT_1 0x10000000 /* B1 Write Access Time = 1 cycle */
1494#define B1WAT_2 0x20000000 /* B1 Write Access Time = 2 cycles */
1495#define B1WAT_3 0x30000000 /* B1 Write Access Time = 3 cycles */
1496#define B1WAT_4 0x40000000 /* B1 Write Access Time = 4 cycles */
1497#define B1WAT_5 0x50000000 /* B1 Write Access Time = 5 cycles */
1498#define B1WAT_6 0x60000000 /* B1 Write Access Time = 6 cycles */
1499#define B1WAT_7 0x70000000 /* B1 Write Access Time = 7 cycles */
1500#define B1WAT_8 0x80000000 /* B1 Write Access Time = 8 cycles */
1501#define B1WAT_9 0x90000000 /* B1 Write Access Time = 9 cycles */
1502#define B1WAT_10 0xA0000000 /* B1 Write Access Time = 10 cycles */
1503#define B1WAT_11 0xB0000000 /* B1 Write Access Time = 11 cycles */
1504#define B1WAT_12 0xC0000000 /* B1 Write Access Time = 12 cycles */
1505#define B1WAT_13 0xD0000000 /* B1 Write Access Time = 13 cycles */
1506#define B1WAT_14 0xE0000000 /* B1 Write Access Time = 14 cycles */
1507#define B1WAT_15 0xF0000000 /* B1 Write Access Time = 15 cycles */
1508
1509/* EBIU_AMBCTL1 Masks */
1510#define B2RDYEN 0x00000001 /* Bank 2 (B2) RDY Enable */
1511#define B2RDYPOL 0x00000002 /* B2 RDY Active High */
1512#define B2TT_1 0x00000004 /* B2 Transition Time (Read to Write) = 1 cycle */
1513#define B2TT_2 0x00000008 /* B2 Transition Time (Read to Write) = 2 cycles */
1514#define B2TT_3 0x0000000C /* B2 Transition Time (Read to Write) = 3 cycles */
1515#define B2TT_4 0x00000000 /* B2 Transition Time (Read to Write) = 4 cycles */
1516#define B2ST_1 0x00000010 /* B2 Setup Time (AOE to Read/Write) = 1 cycle */
1517#define B2ST_2 0x00000020 /* B2 Setup Time (AOE to Read/Write) = 2 cycles */
1518#define B2ST_3 0x00000030 /* B2 Setup Time (AOE to Read/Write) = 3 cycles */
1519#define B2ST_4 0x00000000 /* B2 Setup Time (AOE to Read/Write) = 4 cycles */
1520#define B2HT_1 0x00000040 /* B2 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1521#define B2HT_2 0x00000080 /* B2 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1522#define B2HT_3 0x000000C0 /* B2 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1523#define B2HT_0 0x00000000 /* B2 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1524#define B2RAT_1 0x00000100 /* B2 Read Access Time = 1 cycle */
1525#define B2RAT_2 0x00000200 /* B2 Read Access Time = 2 cycles */
1526#define B2RAT_3 0x00000300 /* B2 Read Access Time = 3 cycles */
1527#define B2RAT_4 0x00000400 /* B2 Read Access Time = 4 cycles */
1528#define B2RAT_5 0x00000500 /* B2 Read Access Time = 5 cycles */
1529#define B2RAT_6 0x00000600 /* B2 Read Access Time = 6 cycles */
1530#define B2RAT_7 0x00000700 /* B2 Read Access Time = 7 cycles */
1531#define B2RAT_8 0x00000800 /* B2 Read Access Time = 8 cycles */
1532#define B2RAT_9 0x00000900 /* B2 Read Access Time = 9 cycles */
1533#define B2RAT_10 0x00000A00 /* B2 Read Access Time = 10 cycles */
1534#define B2RAT_11 0x00000B00 /* B2 Read Access Time = 11 cycles */
1535#define B2RAT_12 0x00000C00 /* B2 Read Access Time = 12 cycles */
1536#define B2RAT_13 0x00000D00 /* B2 Read Access Time = 13 cycles */
1537#define B2RAT_14 0x00000E00 /* B2 Read Access Time = 14 cycles */
1538#define B2RAT_15 0x00000F00 /* B2 Read Access Time = 15 cycles */
1539#define B2WAT_1 0x00001000 /* B2 Write Access Time = 1 cycle */
1540#define B2WAT_2 0x00002000 /* B2 Write Access Time = 2 cycles */
1541#define B2WAT_3 0x00003000 /* B2 Write Access Time = 3 cycles */
1542#define B2WAT_4 0x00004000 /* B2 Write Access Time = 4 cycles */
1543#define B2WAT_5 0x00005000 /* B2 Write Access Time = 5 cycles */
1544#define B2WAT_6 0x00006000 /* B2 Write Access Time = 6 cycles */
1545#define B2WAT_7 0x00007000 /* B2 Write Access Time = 7 cycles */
1546#define B2WAT_8 0x00008000 /* B2 Write Access Time = 8 cycles */
1547#define B2WAT_9 0x00009000 /* B2 Write Access Time = 9 cycles */
1548#define B2WAT_10 0x0000A000 /* B2 Write Access Time = 10 cycles */
1549#define B2WAT_11 0x0000B000 /* B2 Write Access Time = 11 cycles */
1550#define B2WAT_12 0x0000C000 /* B2 Write Access Time = 12 cycles */
1551#define B2WAT_13 0x0000D000 /* B2 Write Access Time = 13 cycles */
1552#define B2WAT_14 0x0000E000 /* B2 Write Access Time = 14 cycles */
1553#define B2WAT_15 0x0000F000 /* B2 Write Access Time = 15 cycles */
1554
1555#define B3RDYEN 0x00010000 /* Bank 3 (B3) RDY Enable */
1556#define B3RDYPOL 0x00020000 /* B3 RDY Active High */
1557#define B3TT_1 0x00040000 /* B3 Transition Time (Read to Write) = 1 cycle */
1558#define B3TT_2 0x00080000 /* B3 Transition Time (Read to Write) = 2 cycles */
1559#define B3TT_3 0x000C0000 /* B3 Transition Time (Read to Write) = 3 cycles */
1560#define B3TT_4 0x00000000 /* B3 Transition Time (Read to Write) = 4 cycles */
1561#define B3ST_1 0x00100000 /* B3 Setup Time (AOE to Read/Write) = 1 cycle */
1562#define B3ST_2 0x00200000 /* B3 Setup Time (AOE to Read/Write) = 2 cycles */
1563#define B3ST_3 0x00300000 /* B3 Setup Time (AOE to Read/Write) = 3 cycles */
1564#define B3ST_4 0x00000000 /* B3 Setup Time (AOE to Read/Write) = 4 cycles */
1565#define B3HT_1 0x00400000 /* B3 Hold Time (~Read/Write to ~AOE) = 1 cycle */
1566#define B3HT_2 0x00800000 /* B3 Hold Time (~Read/Write to ~AOE) = 2 cycles */
1567#define B3HT_3 0x00C00000 /* B3 Hold Time (~Read/Write to ~AOE) = 3 cycles */
1568#define B3HT_0 0x00000000 /* B3 Hold Time (~Read/Write to ~AOE) = 0 cycles */
1569#define B3RAT_1 0x01000000 /* B3 Read Access Time = 1 cycle */
1570#define B3RAT_2 0x02000000 /* B3 Read Access Time = 2 cycles */
1571#define B3RAT_3 0x03000000 /* B3 Read Access Time = 3 cycles */
1572#define B3RAT_4 0x04000000 /* B3 Read Access Time = 4 cycles */
1573#define B3RAT_5 0x05000000 /* B3 Read Access Time = 5 cycles */
1574#define B3RAT_6 0x06000000 /* B3 Read Access Time = 6 cycles */
1575#define B3RAT_7 0x07000000 /* B3 Read Access Time = 7 cycles */
1576#define B3RAT_8 0x08000000 /* B3 Read Access Time = 8 cycles */
1577#define B3RAT_9 0x09000000 /* B3 Read Access Time = 9 cycles */
1578#define B3RAT_10 0x0A000000 /* B3 Read Access Time = 10 cycles */
1579#define B3RAT_11 0x0B000000 /* B3 Read Access Time = 11 cycles */
1580#define B3RAT_12 0x0C000000 /* B3 Read Access Time = 12 cycles */
1581#define B3RAT_13 0x0D000000 /* B3 Read Access Time = 13 cycles */
1582#define B3RAT_14 0x0E000000 /* B3 Read Access Time = 14 cycles */
1583#define B3RAT_15 0x0F000000 /* B3 Read Access Time = 15 cycles */
1584#define B3WAT_1 0x10000000 /* B3 Write Access Time = 1 cycle */
1585#define B3WAT_2 0x20000000 /* B3 Write Access Time = 2 cycles */
1586#define B3WAT_3 0x30000000 /* B3 Write Access Time = 3 cycles */
1587#define B3WAT_4 0x40000000 /* B3 Write Access Time = 4 cycles */
1588#define B3WAT_5 0x50000000 /* B3 Write Access Time = 5 cycles */
1589#define B3WAT_6 0x60000000 /* B3 Write Access Time = 6 cycles */
1590#define B3WAT_7 0x70000000 /* B3 Write Access Time = 7 cycles */
1591#define B3WAT_8 0x80000000 /* B3 Write Access Time = 8 cycles */
1592#define B3WAT_9 0x90000000 /* B3 Write Access Time = 9 cycles */
1593#define B3WAT_10 0xA0000000 /* B3 Write Access Time = 10 cycles */
1594#define B3WAT_11 0xB0000000 /* B3 Write Access Time = 11 cycles */
1595#define B3WAT_12 0xC0000000 /* B3 Write Access Time = 12 cycles */
1596#define B3WAT_13 0xD0000000 /* B3 Write Access Time = 13 cycles */
1597#define B3WAT_14 0xE0000000 /* B3 Write Access Time = 14 cycles */
1598#define B3WAT_15 0xF0000000 /* B3 Write Access Time = 15 cycles */
1599
1600/* ********************** SDRAM CONTROLLER MASKS **********************************************/
1601/* EBIU_SDGCTL Masks */
1602#define SCTLE 0x00000001 /* Enable SDRAM Signals */
1603#define CL_2 0x00000008 /* SDRAM CAS Latency = 2 cycles */
1604#define CL_3 0x0000000C /* SDRAM CAS Latency = 3 cycles */
1605#define PASR_ALL 0x00000000 /* All 4 SDRAM Banks Refreshed In Self-Refresh */
1606#define PASR_B0_B1 0x00000010 /* SDRAM Banks 0 and 1 Are Refreshed In Self-Refresh */
1607#define PASR_B0 0x00000020 /* Only SDRAM Bank 0 Is Refreshed In Self-Refresh */
1608#define TRAS_1 0x00000040 /* SDRAM tRAS = 1 cycle */
1609#define TRAS_2 0x00000080 /* SDRAM tRAS = 2 cycles */
1610#define TRAS_3 0x000000C0 /* SDRAM tRAS = 3 cycles */
1611#define TRAS_4 0x00000100 /* SDRAM tRAS = 4 cycles */
1612#define TRAS_5 0x00000140 /* SDRAM tRAS = 5 cycles */
1613#define TRAS_6 0x00000180 /* SDRAM tRAS = 6 cycles */
1614#define TRAS_7 0x000001C0 /* SDRAM tRAS = 7 cycles */
1615#define TRAS_8 0x00000200 /* SDRAM tRAS = 8 cycles */
1616#define TRAS_9 0x00000240 /* SDRAM tRAS = 9 cycles */
1617#define TRAS_10 0x00000280 /* SDRAM tRAS = 10 cycles */
1618#define TRAS_11 0x000002C0 /* SDRAM tRAS = 11 cycles */
1619#define TRAS_12 0x00000300 /* SDRAM tRAS = 12 cycles */
1620#define TRAS_13 0x00000340 /* SDRAM tRAS = 13 cycles */
1621#define TRAS_14 0x00000380 /* SDRAM tRAS = 14 cycles */
1622#define TRAS_15 0x000003C0 /* SDRAM tRAS = 15 cycles */
1623#define TRP_1 0x00000800 /* SDRAM tRP = 1 cycle */
1624#define TRP_2 0x00001000 /* SDRAM tRP = 2 cycles */
1625#define TRP_3 0x00001800 /* SDRAM tRP = 3 cycles */
1626#define TRP_4 0x00002000 /* SDRAM tRP = 4 cycles */
1627#define TRP_5 0x00002800 /* SDRAM tRP = 5 cycles */
1628#define TRP_6 0x00003000 /* SDRAM tRP = 6 cycles */
1629#define TRP_7 0x00003800 /* SDRAM tRP = 7 cycles */
1630#define TRCD_1 0x00008000 /* SDRAM tRCD = 1 cycle */
1631#define TRCD_2 0x00010000 /* SDRAM tRCD = 2 cycles */
1632#define TRCD_3 0x00018000 /* SDRAM tRCD = 3 cycles */
1633#define TRCD_4 0x00020000 /* SDRAM tRCD = 4 cycles */
1634#define TRCD_5 0x00028000 /* SDRAM tRCD = 5 cycles */
1635#define TRCD_6 0x00030000 /* SDRAM tRCD = 6 cycles */
1636#define TRCD_7 0x00038000 /* SDRAM tRCD = 7 cycles */
1637#define TWR_1 0x00080000 /* SDRAM tWR = 1 cycle */
1638#define TWR_2 0x00100000 /* SDRAM tWR = 2 cycles */
1639#define TWR_3 0x00180000 /* SDRAM tWR = 3 cycles */
1640#define PUPSD 0x00200000 /* Power-Up Start Delay (15 SCLK Cycles Delay) */
1641#define PSM 0x00400000 /* Power-Up Sequence (Mode Register Before/After* Refresh) */
1642#define PSS 0x00800000 /* Enable Power-Up Sequence on Next SDRAM Access */
1643#define SRFS 0x01000000 /* Enable SDRAM Self-Refresh Mode */
1644#define EBUFE 0x02000000 /* Enable External Buffering Timing */
1645#define FBBRW 0x04000000 /* Enable Fast Back-To-Back Read To Write */
1646#define EMREN 0x10000000 /* Extended Mode Register Enable */
1647#define TCSR 0x20000000 /* Temp-Compensated Self-Refresh Value (85/45* Deg C) */
1648#define CDDBG 0x40000000 /* Tristate SDRAM Controls During Bus Grant */
1649
1650/* EBIU_SDBCTL Masks */
1651#define EBE 0x0001 /* Enable SDRAM External Bank */
1652#define EBSZ_16 0x0000 /* SDRAM External Bank Size = 16MB */
1653#define EBSZ_32 0x0002 /* SDRAM External Bank Size = 32MB */
1654#define EBSZ_64 0x0004 /* SDRAM External Bank Size = 64MB */
1655#define EBSZ_128 0x0006 /* SDRAM External Bank Size = 128MB */
1656#define EBSZ_256 0x0008 /* SDRAM External Bank Size = 256MB */
1657#define EBSZ_512 0x000A /* SDRAM External Bank Size = 512MB */
1658#define EBCAW_8 0x0000 /* SDRAM External Bank Column Address Width = 8 Bits */
1659#define EBCAW_9 0x0010 /* SDRAM External Bank Column Address Width = 9 Bits */
1660#define EBCAW_10 0x0020 /* SDRAM External Bank Column Address Width = 10 Bits */
1661#define EBCAW_11 0x0030 /* SDRAM External Bank Column Address Width = 11 Bits */
1662
1663/* EBIU_SDSTAT Masks */
1664#define SDCI 0x0001 /* SDRAM Controller Idle */
1665#define SDSRA 0x0002 /* SDRAM Self-Refresh Active */
1666#define SDPUA 0x0004 /* SDRAM Power-Up Active */
1667#define SDRS 0x0008 /* SDRAM Will Power-Up On Next Access */
1668#define SDEASE 0x0010 /* SDRAM EAB Sticky Error Status */
1669#define BGSTAT 0x0020 /* Bus Grant Status */
1670
1671/* ************************** DMA CONTROLLER MASKS ********************************/
1672/* DMAx_CONFIG, MDMA_yy_CONFIG Masks */
1673#define DMAEN 0x0001 /* DMA Channel Enable */
1674#define WNR 0x0002 /* Channel Direction (W/R*) */
1675#define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */
1676#define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */
1677#define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */
1678#define DMA2D 0x0010 /* DMA Mode (2D/1D*) */
1679#define RESTART 0x0020 /* DMA Buffer Clear */
1680#define DI_SEL 0x0040 /* Data Interrupt Timing Select */
1681#define DI_EN 0x0080 /* Data Interrupt Enable */
1682#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1683#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1684#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1685#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1686#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1687#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1688#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1689#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1690#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1691#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1692#define NDSIZE 0x0900 /* Next Descriptor Size */
1693
1694#define DMAFLOW 0x7000 /* Flow Control */
1695#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1696#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1697#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1698#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1699#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1700
1701/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
1702#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */
1703#define PMAP 0xF000 /* Peripheral Mapped To This Channel */
1704#define PMAP_PPI 0x0000 /* PPI Port DMA */
1705#define PMAP_EMACRX 0x1000 /* Ethernet Receive DMA */
1706#define PMAP_EMACTX 0x2000 /* Ethernet Transmit DMA */
1707#define PMAP_SPORT0RX 0x3000 /* SPORT0 Receive DMA */
1708#define PMAP_SPORT0TX 0x4000 /* SPORT0 Transmit DMA */
1709#define PMAP_SPORT1RX 0x5000 /* SPORT1 Receive DMA */
1710#define PMAP_SPORT1TX 0x6000 /* SPORT1 Transmit DMA */
1711#define PMAP_SPI 0x7000 /* SPI Port DMA */
1712#define PMAP_UART0RX 0x8000 /* UART0 Port Receive DMA */
1713#define PMAP_UART0TX 0x9000 /* UART0 Port Transmit DMA */
1714#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */
1715#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */
1716
1717/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
1718#define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */
1719#define DMA_ERR 0x0002 /* DMA Error Interrupt Status */
1720#define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */
1721#define DMA_RUN 0x0008 /* DMA Channel Running Indicator */
1722
1723/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/
1724/* PPI_CONTROL Masks */
1725#define PORT_EN 0x0001 /* PPI Port Enable */
1726#define PORT_DIR 0x0002 /* PPI Port Direction */
1727#define XFR_TYPE 0x000C /* PPI Transfer Type */
1728#define PORT_CFG 0x0030 /* PPI Port Configuration */
1729#define FLD_SEL 0x0040 /* PPI Active Field Select */
1730#define PACK_EN 0x0080 /* PPI Packing Mode */
1731#define DMA32 0x0100 /* PPI 32-bit DMA Enable */
1732#define SKIP_EN 0x0200 /* PPI Skip Element Enable */
1733#define SKIP_EO 0x0400 /* PPI Skip Even/Odd Elements */
1734#define DLENGTH 0x3800 /* PPI Data Length */
1735#define DLEN_8 0x0000 /* Data Length = 8 Bits */
1736#define DLEN_10 0x0800 /* Data Length = 10 Bits */
1737#define DLEN_11 0x1000 /* Data Length = 11 Bits */
1738#define DLEN_12 0x1800 /* Data Length = 12 Bits */
1739#define DLEN_13 0x2000 /* Data Length = 13 Bits */
1740#define DLEN_14 0x2800 /* Data Length = 14 Bits */
1741#define DLEN_15 0x3000 /* Data Length = 15 Bits */
1742#define DLEN_16 0x3800 /* Data Length = 16 Bits */
1743#define POLC 0x4000 /* PPI Clock Polarity */
1744#define POLS 0x8000 /* PPI Frame Sync Polarity */
1745
1746/* PPI_STATUS Masks */
1747#define FLD 0x0400 /* Field Indicator */
1748#define FT_ERR 0x0800 /* Frame Track Error */
1749#define OVR 0x1000 /* FIFO Overflow Error */
1750#define UNDR 0x2000 /* FIFO Underrun Error */
1751#define ERR_DET 0x4000 /* Error Detected Indicator */
1752#define ERR_NCOR 0x8000 /* Error Not Corrected Indicator */
1753
1754/* ******************** TWO-WIRE INTERFACE (TWI) MASKS ***********************/
1755/* TWI_CLKDIV Macros (Use: *pTWI_CLKDIV = CLKLOW(x)|CLKHI(y); ) */
1756#define CLKLOW(x) ((x) & 0xFF) /* Periods Clock Is Held Low */
1757#define CLKHI(y) (((y)&0xFF)<<0x8) /* Periods Before New Clock Low */
1758
1759/* TWI_PRESCALE Masks */
1760#define PRESCALE 0x007F /* SCLKs Per Internal Time Reference (10MHz) */
1761#define TWI_ENA 0x0080 /* TWI Enable */
1762#define SCCB 0x0200 /* SCCB Compatibility Enable */
1763
1764/* TWI_SLAVE_CTRL Masks */
1765#define SEN 0x0001 /* Slave Enable */
1766#define SADD_LEN 0x0002 /* Slave Address Length */
1767#define STDVAL 0x0004 /* Slave Transmit Data Valid */
1768#define NAK 0x0008 /* NAK/ACK* Generated At Conclusion Of Transfer */
1769#define GEN 0x0010 /* General Call Adrress Matching Enabled */
1770
1771/* TWI_SLAVE_STAT Masks */
1772#define SDIR 0x0001 /* Slave Transfer Direction (Transmit/Receive*) */
1773#define GCALL 0x0002 /* General Call Indicator */
1774
1775/* TWI_MASTER_CTRL Masks */
1776#define MEN 0x0001 /* Master Mode Enable */
1777#define MADD_LEN 0x0002 /* Master Address Length */
1778#define MDIR 0x0004 /* Master Transmit Direction (RX/TX*) */
1779#define FAST 0x0008 /* Use Fast Mode Timing Specs */
1780#define STOP 0x0010 /* Issue Stop Condition */
1781#define RSTART 0x0020 /* Repeat Start or Stop* At End Of Transfer */
1782#define DCNT 0x3FC0 /* Data Bytes To Transfer */
1783#define SDAOVR 0x4000 /* Serial Data Override */
1784#define SCLOVR 0x8000 /* Serial Clock Override */
1785
1786/* TWI_MASTER_STAT Masks */
1787#define MPROG 0x0001 /* Master Transfer In Progress */
1788#define LOSTARB 0x0002 /* Lost Arbitration Indicator (Xfer Aborted) */
1789#define ANAK 0x0004 /* Address Not Acknowledged */
1790#define DNAK 0x0008 /* Data Not Acknowledged */
1791#define BUFRDERR 0x0010 /* Buffer Read Error */
1792#define BUFWRERR 0x0020 /* Buffer Write Error */
1793#define SDASEN 0x0040 /* Serial Data Sense */
1794#define SCLSEN 0x0080 /* Serial Clock Sense */
1795#define BUSBUSY 0x0100 /* Bus Busy Indicator */
1796
1797/* TWI_INT_SRC and TWI_INT_ENABLE Masks */
1798#define SINIT 0x0001 /* Slave Transfer Initiated */
1799#define SCOMP 0x0002 /* Slave Transfer Complete */
1800#define SERR 0x0004 /* Slave Transfer Error */
1801#define SOVF 0x0008 /* Slave Overflow */
1802#define MCOMP 0x0010 /* Master Transfer Complete */
1803#define MERR 0x0020 /* Master Transfer Error */
1804#define XMTSERV 0x0040 /* Transmit FIFO Service */
1805#define RCVSERV 0x0080 /* Receive FIFO Service */
1806
1807/* TWI_FIFO_CTRL Masks */
1808#define XMTFLUSH 0x0001 /* Transmit Buffer Flush */
1809#define RCVFLUSH 0x0002 /* Receive Buffer Flush */
1810#define XMTINTLEN 0x0004 /* Transmit Buffer Interrupt Length */
1811#define RCVINTLEN 0x0008 /* Receive Buffer Interrupt Length */
1812
1813/* TWI_FIFO_STAT Masks */
1814#define XMTSTAT 0x0003 /* Transmit FIFO Status */
1815#define XMT_EMPTY 0x0000 /* Transmit FIFO Empty */
1816#define XMT_HALF 0x0001 /* Transmit FIFO Has 1 Byte To Write */
1817#define XMT_FULL 0x0003 /* Transmit FIFO Full (2 Bytes To Write) */
1818
1819#define RCVSTAT 0x000C /* Receive FIFO Status */
1820#define RCV_EMPTY 0x0000 /* Receive FIFO Empty */
1821#define RCV_HALF 0x0004 /* Receive FIFO Has 1 Byte To Read */
1822#define RCV_FULL 0x000C /* Receive FIFO Full (2 Bytes To Read) */
1823
1824/* ************ CONTROLLER AREA NETWORK (CAN) MASKS ***************/
1825/* CAN_CONTROL Masks */
1826#define SRS 0x0001 /* Software Reset */
1827#define DNM 0x0002 /* Device Net Mode */
1828#define ABO 0x0004 /* Auto-Bus On Enable */
1829#define TXPRIO 0x0008 /* TX Priority (Priority/Mailbox*) */
1830#define WBA 0x0010 /* Wake-Up On CAN Bus Activity Enable */
1831#define SMR 0x0020 /* Sleep Mode Request */
1832#define CSR 0x0040 /* CAN Suspend Mode Request */
1833#define CCR 0x0080 /* CAN Configuration Mode Request */
1834
1835/* CAN_STATUS Masks */
1836#define WT 0x0001 /* TX Warning Flag */
1837#define WR 0x0002 /* RX Warning Flag */
1838#define EP 0x0004 /* Error Passive Mode */
1839#define EBO 0x0008 /* Error Bus Off Mode */
1840#define SMA 0x0020 /* Sleep Mode Acknowledge */
1841#define CSA 0x0040 /* Suspend Mode Acknowledge */
1842#define CCA 0x0080 /* Configuration Mode Acknowledge */
1843#define MBPTR 0x1F00 /* Mailbox Pointer */
1844#define TRM 0x4000 /* Transmit Mode */
1845#define REC 0x8000 /* Receive Mode */
1846
1847/* CAN_CLOCK Masks */
1848#define BRP 0x03FF /* Bit-Rate Pre-Scaler */
1849
1850/* CAN_TIMING Masks */
1851#define TSEG1 0x000F /* Time Segment 1 */
1852#define TSEG2 0x0070 /* Time Segment 2 */
1853#define SAM 0x0080 /* Sampling */
1854#define SJW 0x0300 /* Synchronization Jump Width */
1855
1856/* CAN_DEBUG Masks */
1857#define DEC 0x0001 /* Disable CAN Error Counters */
1858#define DRI 0x0002 /* Disable CAN RX Input */
1859#define DTO 0x0004 /* Disable CAN TX Output */
1860#define DIL 0x0008 /* Disable CAN Internal Loop */
1861#define MAA 0x0010 /* Mode Auto-Acknowledge Enable */
1862#define MRB 0x0020 /* Mode Read Back Enable */
1863#define CDE 0x8000 /* CAN Debug Enable */
1864
1865/* CAN_CEC Masks */
1866#define RXECNT 0x00FF /* Receive Error Counter */
1867#define TXECNT 0xFF00 /* Transmit Error Counter */
1868
1869/* CAN_INTR Masks */
1870#define MBRIRQ 0x0001 /* Mailbox Receive Interrupt */
1871#define MBRIF MBRIRQ /* legacy */
1872#define MBTIRQ 0x0002 /* Mailbox Transmit Interrupt */
1873#define MBTIF MBTIRQ /* legacy */
1874#define GIRQ 0x0004 /* Global Interrupt */
1875#define SMACK 0x0008 /* Sleep Mode Acknowledge */
1876#define CANTX 0x0040 /* CAN TX Bus Value */
1877#define CANRX 0x0080 /* CAN RX Bus Value */
1878
1879/* CAN_MBxx_ID1 and CAN_MBxx_ID0 Masks */
1880#define DFC 0xFFFF /* Data Filtering Code (If Enabled) (ID0) */
1881#define EXTID_LO 0xFFFF /* Lower 16 Bits of Extended Identifier (ID0) */
1882#define EXTID_HI 0x0003 /* Upper 2 Bits of Extended Identifier (ID1) */
1883#define BASEID 0x1FFC /* Base Identifier */
1884#define IDE 0x2000 /* Identifier Extension */
1885#define RTR 0x4000 /* Remote Frame Transmission Request */
1886#define AME 0x8000 /* Acceptance Mask Enable */
1887
1888/* CAN_MBxx_TIMESTAMP Masks */
1889#define TSV 0xFFFF /* Timestamp */
1890
1891/* CAN_MBxx_LENGTH Masks */
1892#define DLC 0x000F /* Data Length Code */
1893
1894/* CAN_AMxxH and CAN_AMxxL Masks */
1895#define DFM 0xFFFF /* Data Field Mask (If Enabled) (CAN_AMxxL) */
1896#define EXTID_LO 0xFFFF /* Lower 16 Bits of Extended Identifier (CAN_AMxxL) */
1897#define EXTID_HI 0x0003 /* Upper 2 Bits of Extended Identifier (CAN_AMxxH) */
1898#define BASEID 0x1FFC /* Base Identifier */
1899#define AMIDE 0x2000 /* Acceptance Mask ID Extension Enable */
1900#define FMD 0x4000 /* Full Mask Data Field Enable */
1901#define FDF 0x8000 /* Filter On Data Field Enable */
1902
1903/* CAN_MC1 Masks */
1904#define MC0 0x0001 /* Enable Mailbox 0 */
1905#define MC1 0x0002 /* Enable Mailbox 1 */
1906#define MC2 0x0004 /* Enable Mailbox 2 */
1907#define MC3 0x0008 /* Enable Mailbox 3 */
1908#define MC4 0x0010 /* Enable Mailbox 4 */
1909#define MC5 0x0020 /* Enable Mailbox 5 */
1910#define MC6 0x0040 /* Enable Mailbox 6 */
1911#define MC7 0x0080 /* Enable Mailbox 7 */
1912#define MC8 0x0100 /* Enable Mailbox 8 */
1913#define MC9 0x0200 /* Enable Mailbox 9 */
1914#define MC10 0x0400 /* Enable Mailbox 10 */
1915#define MC11 0x0800 /* Enable Mailbox 11 */
1916#define MC12 0x1000 /* Enable Mailbox 12 */
1917#define MC13 0x2000 /* Enable Mailbox 13 */
1918#define MC14 0x4000 /* Enable Mailbox 14 */
1919#define MC15 0x8000 /* Enable Mailbox 15 */
1920
1921/* CAN_MC2 Masks */
1922#define MC16 0x0001 /* Enable Mailbox 16 */
1923#define MC17 0x0002 /* Enable Mailbox 17 */
1924#define MC18 0x0004 /* Enable Mailbox 18 */
1925#define MC19 0x0008 /* Enable Mailbox 19 */
1926#define MC20 0x0010 /* Enable Mailbox 20 */
1927#define MC21 0x0020 /* Enable Mailbox 21 */
1928#define MC22 0x0040 /* Enable Mailbox 22 */
1929#define MC23 0x0080 /* Enable Mailbox 23 */
1930#define MC24 0x0100 /* Enable Mailbox 24 */
1931#define MC25 0x0200 /* Enable Mailbox 25 */
1932#define MC26 0x0400 /* Enable Mailbox 26 */
1933#define MC27 0x0800 /* Enable Mailbox 27 */
1934#define MC28 0x1000 /* Enable Mailbox 28 */
1935#define MC29 0x2000 /* Enable Mailbox 29 */
1936#define MC30 0x4000 /* Enable Mailbox 30 */
1937#define MC31 0x8000 /* Enable Mailbox 31 */
1938
1939/* CAN_MD1 Masks */
1940#define MD0 0x0001 /* Enable Mailbox 0 For Receive */
1941#define MD1 0x0002 /* Enable Mailbox 1 For Receive */
1942#define MD2 0x0004 /* Enable Mailbox 2 For Receive */
1943#define MD3 0x0008 /* Enable Mailbox 3 For Receive */
1944#define MD4 0x0010 /* Enable Mailbox 4 For Receive */
1945#define MD5 0x0020 /* Enable Mailbox 5 For Receive */
1946#define MD6 0x0040 /* Enable Mailbox 6 For Receive */
1947#define MD7 0x0080 /* Enable Mailbox 7 For Receive */
1948#define MD8 0x0100 /* Enable Mailbox 8 For Receive */
1949#define MD9 0x0200 /* Enable Mailbox 9 For Receive */
1950#define MD10 0x0400 /* Enable Mailbox 10 For Receive */
1951#define MD11 0x0800 /* Enable Mailbox 11 For Receive */
1952#define MD12 0x1000 /* Enable Mailbox 12 For Receive */
1953#define MD13 0x2000 /* Enable Mailbox 13 For Receive */
1954#define MD14 0x4000 /* Enable Mailbox 14 For Receive */
1955#define MD15 0x8000 /* Enable Mailbox 15 For Receive */
1956
1957/* CAN_MD2 Masks */
1958#define MD16 0x0001 /* Enable Mailbox 16 For Receive */
1959#define MD17 0x0002 /* Enable Mailbox 17 For Receive */
1960#define MD18 0x0004 /* Enable Mailbox 18 For Receive */
1961#define MD19 0x0008 /* Enable Mailbox 19 For Receive */
1962#define MD20 0x0010 /* Enable Mailbox 20 For Receive */
1963#define MD21 0x0020 /* Enable Mailbox 21 For Receive */
1964#define MD22 0x0040 /* Enable Mailbox 22 For Receive */
1965#define MD23 0x0080 /* Enable Mailbox 23 For Receive */
1966#define MD24 0x0100 /* Enable Mailbox 24 For Receive */
1967#define MD25 0x0200 /* Enable Mailbox 25 For Receive */
1968#define MD26 0x0400 /* Enable Mailbox 26 For Receive */
1969#define MD27 0x0800 /* Enable Mailbox 27 For Receive */
1970#define MD28 0x1000 /* Enable Mailbox 28 For Receive */
1971#define MD29 0x2000 /* Enable Mailbox 29 For Receive */
1972#define MD30 0x4000 /* Enable Mailbox 30 For Receive */
1973#define MD31 0x8000 /* Enable Mailbox 31 For Receive */
1974
1975/* CAN_RMP1 Masks */
1976#define RMP0 0x0001 /* RX Message Pending In Mailbox 0 */
1977#define RMP1 0x0002 /* RX Message Pending In Mailbox 1 */
1978#define RMP2 0x0004 /* RX Message Pending In Mailbox 2 */
1979#define RMP3 0x0008 /* RX Message Pending In Mailbox 3 */
1980#define RMP4 0x0010 /* RX Message Pending In Mailbox 4 */
1981#define RMP5 0x0020 /* RX Message Pending In Mailbox 5 */
1982#define RMP6 0x0040 /* RX Message Pending In Mailbox 6 */
1983#define RMP7 0x0080 /* RX Message Pending In Mailbox 7 */
1984#define RMP8 0x0100 /* RX Message Pending In Mailbox 8 */
1985#define RMP9 0x0200 /* RX Message Pending In Mailbox 9 */
1986#define RMP10 0x0400 /* RX Message Pending In Mailbox 10 */
1987#define RMP11 0x0800 /* RX Message Pending In Mailbox 11 */
1988#define RMP12 0x1000 /* RX Message Pending In Mailbox 12 */
1989#define RMP13 0x2000 /* RX Message Pending In Mailbox 13 */
1990#define RMP14 0x4000 /* RX Message Pending In Mailbox 14 */
1991#define RMP15 0x8000 /* RX Message Pending In Mailbox 15 */
1992
1993/* CAN_RMP2 Masks */
1994#define RMP16 0x0001 /* RX Message Pending In Mailbox 16 */
1995#define RMP17 0x0002 /* RX Message Pending In Mailbox 17 */
1996#define RMP18 0x0004 /* RX Message Pending In Mailbox 18 */
1997#define RMP19 0x0008 /* RX Message Pending In Mailbox 19 */
1998#define RMP20 0x0010 /* RX Message Pending In Mailbox 20 */
1999#define RMP21 0x0020 /* RX Message Pending In Mailbox 21 */
2000#define RMP22 0x0040 /* RX Message Pending In Mailbox 22 */
2001#define RMP23 0x0080 /* RX Message Pending In Mailbox 23 */
2002#define RMP24 0x0100 /* RX Message Pending In Mailbox 24 */
2003#define RMP25 0x0200 /* RX Message Pending In Mailbox 25 */
2004#define RMP26 0x0400 /* RX Message Pending In Mailbox 26 */
2005#define RMP27 0x0800 /* RX Message Pending In Mailbox 27 */
2006#define RMP28 0x1000 /* RX Message Pending In Mailbox 28 */
2007#define RMP29 0x2000 /* RX Message Pending In Mailbox 29 */
2008#define RMP30 0x4000 /* RX Message Pending In Mailbox 30 */
2009#define RMP31 0x8000 /* RX Message Pending In Mailbox 31 */
2010
2011/* CAN_RML1 Masks */
2012#define RML0 0x0001 /* RX Message Lost In Mailbox 0 */
2013#define RML1 0x0002 /* RX Message Lost In Mailbox 1 */
2014#define RML2 0x0004 /* RX Message Lost In Mailbox 2 */
2015#define RML3 0x0008 /* RX Message Lost In Mailbox 3 */
2016#define RML4 0x0010 /* RX Message Lost In Mailbox 4 */
2017#define RML5 0x0020 /* RX Message Lost In Mailbox 5 */
2018#define RML6 0x0040 /* RX Message Lost In Mailbox 6 */
2019#define RML7 0x0080 /* RX Message Lost In Mailbox 7 */
2020#define RML8 0x0100 /* RX Message Lost In Mailbox 8 */
2021#define RML9 0x0200 /* RX Message Lost In Mailbox 9 */
2022#define RML10 0x0400 /* RX Message Lost In Mailbox 10 */
2023#define RML11 0x0800 /* RX Message Lost In Mailbox 11 */
2024#define RML12 0x1000 /* RX Message Lost In Mailbox 12 */
2025#define RML13 0x2000 /* RX Message Lost In Mailbox 13 */
2026#define RML14 0x4000 /* RX Message Lost In Mailbox 14 */
2027#define RML15 0x8000 /* RX Message Lost In Mailbox 15 */
2028
2029/* CAN_RML2 Masks */
2030#define RML16 0x0001 /* RX Message Lost In Mailbox 16 */
2031#define RML17 0x0002 /* RX Message Lost In Mailbox 17 */
2032#define RML18 0x0004 /* RX Message Lost In Mailbox 18 */
2033#define RML19 0x0008 /* RX Message Lost In Mailbox 19 */
2034#define RML20 0x0010 /* RX Message Lost In Mailbox 20 */
2035#define RML21 0x0020 /* RX Message Lost In Mailbox 21 */
2036#define RML22 0x0040 /* RX Message Lost In Mailbox 22 */
2037#define RML23 0x0080 /* RX Message Lost In Mailbox 23 */
2038#define RML24 0x0100 /* RX Message Lost In Mailbox 24 */
2039#define RML25 0x0200 /* RX Message Lost In Mailbox 25 */
2040#define RML26 0x0400 /* RX Message Lost In Mailbox 26 */
2041#define RML27 0x0800 /* RX Message Lost In Mailbox 27 */
2042#define RML28 0x1000 /* RX Message Lost In Mailbox 28 */
2043#define RML29 0x2000 /* RX Message Lost In Mailbox 29 */
2044#define RML30 0x4000 /* RX Message Lost In Mailbox 30 */
2045#define RML31 0x8000 /* RX Message Lost In Mailbox 31 */
2046
2047/* CAN_OPSS1 Masks */
2048#define OPSS0 0x0001 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 0 */
2049#define OPSS1 0x0002 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 1 */
2050#define OPSS2 0x0004 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 2 */
2051#define OPSS3 0x0008 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 3 */
2052#define OPSS4 0x0010 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 4 */
2053#define OPSS5 0x0020 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 5 */
2054#define OPSS6 0x0040 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 6 */
2055#define OPSS7 0x0080 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 7 */
2056#define OPSS8 0x0100 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 8 */
2057#define OPSS9 0x0200 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 9 */
2058#define OPSS10 0x0400 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 10 */
2059#define OPSS11 0x0800 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 11 */
2060#define OPSS12 0x1000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 12 */
2061#define OPSS13 0x2000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 13 */
2062#define OPSS14 0x4000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 14 */
2063#define OPSS15 0x8000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 15 */
2064
2065/* CAN_OPSS2 Masks */
2066#define OPSS16 0x0001 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 16 */
2067#define OPSS17 0x0002 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 17 */
2068#define OPSS18 0x0004 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 18 */
2069#define OPSS19 0x0008 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 19 */
2070#define OPSS20 0x0010 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 20 */
2071#define OPSS21 0x0020 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 21 */
2072#define OPSS22 0x0040 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 22 */
2073#define OPSS23 0x0080 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 23 */
2074#define OPSS24 0x0100 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 24 */
2075#define OPSS25 0x0200 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 25 */
2076#define OPSS26 0x0400 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 26 */
2077#define OPSS27 0x0800 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 27 */
2078#define OPSS28 0x1000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 28 */
2079#define OPSS29 0x2000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 29 */
2080#define OPSS30 0x4000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 30 */
2081#define OPSS31 0x8000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 31 */
2082
2083/* CAN_TRR1 Masks */
2084#define TRR0 0x0001 /* Deny But Don't Lock Access To Mailbox 0 */
2085#define TRR1 0x0002 /* Deny But Don't Lock Access To Mailbox 1 */
2086#define TRR2 0x0004 /* Deny But Don't Lock Access To Mailbox 2 */
2087#define TRR3 0x0008 /* Deny But Don't Lock Access To Mailbox 3 */
2088#define TRR4 0x0010 /* Deny But Don't Lock Access To Mailbox 4 */
2089#define TRR5 0x0020 /* Deny But Don't Lock Access To Mailbox 5 */
2090#define TRR6 0x0040 /* Deny But Don't Lock Access To Mailbox 6 */
2091#define TRR7 0x0080 /* Deny But Don't Lock Access To Mailbox 7 */
2092#define TRR8 0x0100 /* Deny But Don't Lock Access To Mailbox 8 */
2093#define TRR9 0x0200 /* Deny But Don't Lock Access To Mailbox 9 */
2094#define TRR10 0x0400 /* Deny But Don't Lock Access To Mailbox 10 */
2095#define TRR11 0x0800 /* Deny But Don't Lock Access To Mailbox 11 */
2096#define TRR12 0x1000 /* Deny But Don't Lock Access To Mailbox 12 */
2097#define TRR13 0x2000 /* Deny But Don't Lock Access To Mailbox 13 */
2098#define TRR14 0x4000 /* Deny But Don't Lock Access To Mailbox 14 */
2099#define TRR15 0x8000 /* Deny But Don't Lock Access To Mailbox 15 */
2100
2101/* CAN_TRR2 Masks */
2102#define TRR16 0x0001 /* Deny But Don't Lock Access To Mailbox 16 */
2103#define TRR17 0x0002 /* Deny But Don't Lock Access To Mailbox 17 */
2104#define TRR18 0x0004 /* Deny But Don't Lock Access To Mailbox 18 */
2105#define TRR19 0x0008 /* Deny But Don't Lock Access To Mailbox 19 */
2106#define TRR20 0x0010 /* Deny But Don't Lock Access To Mailbox 20 */
2107#define TRR21 0x0020 /* Deny But Don't Lock Access To Mailbox 21 */
2108#define TRR22 0x0040 /* Deny But Don't Lock Access To Mailbox 22 */
2109#define TRR23 0x0080 /* Deny But Don't Lock Access To Mailbox 23 */
2110#define TRR24 0x0100 /* Deny But Don't Lock Access To Mailbox 24 */
2111#define TRR25 0x0200 /* Deny But Don't Lock Access To Mailbox 25 */
2112#define TRR26 0x0400 /* Deny But Don't Lock Access To Mailbox 26 */
2113#define TRR27 0x0800 /* Deny But Don't Lock Access To Mailbox 27 */
2114#define TRR28 0x1000 /* Deny But Don't Lock Access To Mailbox 28 */
2115#define TRR29 0x2000 /* Deny But Don't Lock Access To Mailbox 29 */
2116#define TRR30 0x4000 /* Deny But Don't Lock Access To Mailbox 30 */
2117#define TRR31 0x8000 /* Deny But Don't Lock Access To Mailbox 31 */
2118
2119/* CAN_TRS1 Masks */
2120#define TRS0 0x0001 /* Remote Frame Request For Mailbox 0 */
2121#define TRS1 0x0002 /* Remote Frame Request For Mailbox 1 */
2122#define TRS2 0x0004 /* Remote Frame Request For Mailbox 2 */
2123#define TRS3 0x0008 /* Remote Frame Request For Mailbox 3 */
2124#define TRS4 0x0010 /* Remote Frame Request For Mailbox 4 */
2125#define TRS5 0x0020 /* Remote Frame Request For Mailbox 5 */
2126#define TRS6 0x0040 /* Remote Frame Request For Mailbox 6 */
2127#define TRS7 0x0080 /* Remote Frame Request For Mailbox 7 */
2128#define TRS8 0x0100 /* Remote Frame Request For Mailbox 8 */
2129#define TRS9 0x0200 /* Remote Frame Request For Mailbox 9 */
2130#define TRS10 0x0400 /* Remote Frame Request For Mailbox 10 */
2131#define TRS11 0x0800 /* Remote Frame Request For Mailbox 11 */
2132#define TRS12 0x1000 /* Remote Frame Request For Mailbox 12 */
2133#define TRS13 0x2000 /* Remote Frame Request For Mailbox 13 */
2134#define TRS14 0x4000 /* Remote Frame Request For Mailbox 14 */
2135#define TRS15 0x8000 /* Remote Frame Request For Mailbox 15 */
2136
2137/* CAN_TRS2 Masks */
2138#define TRS16 0x0001 /* Remote Frame Request For Mailbox 16 */
2139#define TRS17 0x0002 /* Remote Frame Request For Mailbox 17 */
2140#define TRS18 0x0004 /* Remote Frame Request For Mailbox 18 */
2141#define TRS19 0x0008 /* Remote Frame Request For Mailbox 19 */
2142#define TRS20 0x0010 /* Remote Frame Request For Mailbox 20 */
2143#define TRS21 0x0020 /* Remote Frame Request For Mailbox 21 */
2144#define TRS22 0x0040 /* Remote Frame Request For Mailbox 22 */
2145#define TRS23 0x0080 /* Remote Frame Request For Mailbox 23 */
2146#define TRS24 0x0100 /* Remote Frame Request For Mailbox 24 */
2147#define TRS25 0x0200 /* Remote Frame Request For Mailbox 25 */
2148#define TRS26 0x0400 /* Remote Frame Request For Mailbox 26 */
2149#define TRS27 0x0800 /* Remote Frame Request For Mailbox 27 */
2150#define TRS28 0x1000 /* Remote Frame Request For Mailbox 28 */
2151#define TRS29 0x2000 /* Remote Frame Request For Mailbox 29 */
2152#define TRS30 0x4000 /* Remote Frame Request For Mailbox 30 */
2153#define TRS31 0x8000 /* Remote Frame Request For Mailbox 31 */
2154
2155/* CAN_AA1 Masks */
2156#define AA0 0x0001 /* Aborted Message In Mailbox 0 */
2157#define AA1 0x0002 /* Aborted Message In Mailbox 1 */
2158#define AA2 0x0004 /* Aborted Message In Mailbox 2 */
2159#define AA3 0x0008 /* Aborted Message In Mailbox 3 */
2160#define AA4 0x0010 /* Aborted Message In Mailbox 4 */
2161#define AA5 0x0020 /* Aborted Message In Mailbox 5 */
2162#define AA6 0x0040 /* Aborted Message In Mailbox 6 */
2163#define AA7 0x0080 /* Aborted Message In Mailbox 7 */
2164#define AA8 0x0100 /* Aborted Message In Mailbox 8 */
2165#define AA9 0x0200 /* Aborted Message In Mailbox 9 */
2166#define AA10 0x0400 /* Aborted Message In Mailbox 10 */
2167#define AA11 0x0800 /* Aborted Message In Mailbox 11 */
2168#define AA12 0x1000 /* Aborted Message In Mailbox 12 */
2169#define AA13 0x2000 /* Aborted Message In Mailbox 13 */
2170#define AA14 0x4000 /* Aborted Message In Mailbox 14 */
2171#define AA15 0x8000 /* Aborted Message In Mailbox 15 */
2172
2173/* CAN_AA2 Masks */
2174#define AA16 0x0001 /* Aborted Message In Mailbox 16 */
2175#define AA17 0x0002 /* Aborted Message In Mailbox 17 */
2176#define AA18 0x0004 /* Aborted Message In Mailbox 18 */
2177#define AA19 0x0008 /* Aborted Message In Mailbox 19 */
2178#define AA20 0x0010 /* Aborted Message In Mailbox 20 */
2179#define AA21 0x0020 /* Aborted Message In Mailbox 21 */
2180#define AA22 0x0040 /* Aborted Message In Mailbox 22 */
2181#define AA23 0x0080 /* Aborted Message In Mailbox 23 */
2182#define AA24 0x0100 /* Aborted Message In Mailbox 24 */
2183#define AA25 0x0200 /* Aborted Message In Mailbox 25 */
2184#define AA26 0x0400 /* Aborted Message In Mailbox 26 */
2185#define AA27 0x0800 /* Aborted Message In Mailbox 27 */
2186#define AA28 0x1000 /* Aborted Message In Mailbox 28 */
2187#define AA29 0x2000 /* Aborted Message In Mailbox 29 */
2188#define AA30 0x4000 /* Aborted Message In Mailbox 30 */
2189#define AA31 0x8000 /* Aborted Message In Mailbox 31 */
2190
2191/* CAN_TA1 Masks */
2192#define TA0 0x0001 /* Transmit Successful From Mailbox 0 */
2193#define TA1 0x0002 /* Transmit Successful From Mailbox 1 */
2194#define TA2 0x0004 /* Transmit Successful From Mailbox 2 */
2195#define TA3 0x0008 /* Transmit Successful From Mailbox 3 */
2196#define TA4 0x0010 /* Transmit Successful From Mailbox 4 */
2197#define TA5 0x0020 /* Transmit Successful From Mailbox 5 */
2198#define TA6 0x0040 /* Transmit Successful From Mailbox 6 */
2199#define TA7 0x0080 /* Transmit Successful From Mailbox 7 */
2200#define TA8 0x0100 /* Transmit Successful From Mailbox 8 */
2201#define TA9 0x0200 /* Transmit Successful From Mailbox 9 */
2202#define TA10 0x0400 /* Transmit Successful From Mailbox 10 */
2203#define TA11 0x0800 /* Transmit Successful From Mailbox 11 */
2204#define TA12 0x1000 /* Transmit Successful From Mailbox 12 */
2205#define TA13 0x2000 /* Transmit Successful From Mailbox 13 */
2206#define TA14 0x4000 /* Transmit Successful From Mailbox 14 */
2207#define TA15 0x8000 /* Transmit Successful From Mailbox 15 */
2208
2209/* CAN_TA2 Masks */
2210#define TA16 0x0001 /* Transmit Successful From Mailbox 16 */
2211#define TA17 0x0002 /* Transmit Successful From Mailbox 17 */
2212#define TA18 0x0004 /* Transmit Successful From Mailbox 18 */
2213#define TA19 0x0008 /* Transmit Successful From Mailbox 19 */
2214#define TA20 0x0010 /* Transmit Successful From Mailbox 20 */
2215#define TA21 0x0020 /* Transmit Successful From Mailbox 21 */
2216#define TA22 0x0040 /* Transmit Successful From Mailbox 22 */
2217#define TA23 0x0080 /* Transmit Successful From Mailbox 23 */
2218#define TA24 0x0100 /* Transmit Successful From Mailbox 24 */
2219#define TA25 0x0200 /* Transmit Successful From Mailbox 25 */
2220#define TA26 0x0400 /* Transmit Successful From Mailbox 26 */
2221#define TA27 0x0800 /* Transmit Successful From Mailbox 27 */
2222#define TA28 0x1000 /* Transmit Successful From Mailbox 28 */
2223#define TA29 0x2000 /* Transmit Successful From Mailbox 29 */
2224#define TA30 0x4000 /* Transmit Successful From Mailbox 30 */
2225#define TA31 0x8000 /* Transmit Successful From Mailbox 31 */
2226
2227/* CAN_MBTD Masks */
2228#define TDPTR 0x001F /* Mailbox To Temporarily Disable */
2229#define TDA 0x0040 /* Temporary Disable Acknowledge */
2230#define TDR 0x0080 /* Temporary Disable Request */
2231
2232/* CAN_RFH1 Masks */
2233#define RFH0 0x0001 /* Enable Automatic Remote Frame Handling For Mailbox 0 */
2234#define RFH1 0x0002 /* Enable Automatic Remote Frame Handling For Mailbox 1 */
2235#define RFH2 0x0004 /* Enable Automatic Remote Frame Handling For Mailbox 2 */
2236#define RFH3 0x0008 /* Enable Automatic Remote Frame Handling For Mailbox 3 */
2237#define RFH4 0x0010 /* Enable Automatic Remote Frame Handling For Mailbox 4 */
2238#define RFH5 0x0020 /* Enable Automatic Remote Frame Handling For Mailbox 5 */
2239#define RFH6 0x0040 /* Enable Automatic Remote Frame Handling For Mailbox 6 */
2240#define RFH7 0x0080 /* Enable Automatic Remote Frame Handling For Mailbox 7 */
2241#define RFH8 0x0100 /* Enable Automatic Remote Frame Handling For Mailbox 8 */
2242#define RFH9 0x0200 /* Enable Automatic Remote Frame Handling For Mailbox 9 */
2243#define RFH10 0x0400 /* Enable Automatic Remote Frame Handling For Mailbox 10 */
2244#define RFH11 0x0800 /* Enable Automatic Remote Frame Handling For Mailbox 11 */
2245#define RFH12 0x1000 /* Enable Automatic Remote Frame Handling For Mailbox 12 */
2246#define RFH13 0x2000 /* Enable Automatic Remote Frame Handling For Mailbox 13 */
2247#define RFH14 0x4000 /* Enable Automatic Remote Frame Handling For Mailbox 14 */
2248#define RFH15 0x8000 /* Enable Automatic Remote Frame Handling For Mailbox 15 */
2249
2250/* CAN_RFH2 Masks */
2251#define RFH16 0x0001 /* Enable Automatic Remote Frame Handling For Mailbox 16 */
2252#define RFH17 0x0002 /* Enable Automatic Remote Frame Handling For Mailbox 17 */
2253#define RFH18 0x0004 /* Enable Automatic Remote Frame Handling For Mailbox 18 */
2254#define RFH19 0x0008 /* Enable Automatic Remote Frame Handling For Mailbox 19 */
2255#define RFH20 0x0010 /* Enable Automatic Remote Frame Handling For Mailbox 20 */
2256#define RFH21 0x0020 /* Enable Automatic Remote Frame Handling For Mailbox 21 */
2257#define RFH22 0x0040 /* Enable Automatic Remote Frame Handling For Mailbox 22 */
2258#define RFH23 0x0080 /* Enable Automatic Remote Frame Handling For Mailbox 23 */
2259#define RFH24 0x0100 /* Enable Automatic Remote Frame Handling For Mailbox 24 */
2260#define RFH25 0x0200 /* Enable Automatic Remote Frame Handling For Mailbox 25 */
2261#define RFH26 0x0400 /* Enable Automatic Remote Frame Handling For Mailbox 26 */
2262#define RFH27 0x0800 /* Enable Automatic Remote Frame Handling For Mailbox 27 */
2263#define RFH28 0x1000 /* Enable Automatic Remote Frame Handling For Mailbox 28 */
2264#define RFH29 0x2000 /* Enable Automatic Remote Frame Handling For Mailbox 29 */
2265#define RFH30 0x4000 /* Enable Automatic Remote Frame Handling For Mailbox 30 */
2266#define RFH31 0x8000 /* Enable Automatic Remote Frame Handling For Mailbox 31 */
2267
2268/* CAN_MBTIF1 Masks */
2269#define MBTIF0 0x0001 /* TX Interrupt Active In Mailbox 0 */
2270#define MBTIF1 0x0002 /* TX Interrupt Active In Mailbox 1 */
2271#define MBTIF2 0x0004 /* TX Interrupt Active In Mailbox 2 */
2272#define MBTIF3 0x0008 /* TX Interrupt Active In Mailbox 3 */
2273#define MBTIF4 0x0010 /* TX Interrupt Active In Mailbox 4 */
2274#define MBTIF5 0x0020 /* TX Interrupt Active In Mailbox 5 */
2275#define MBTIF6 0x0040 /* TX Interrupt Active In Mailbox 6 */
2276#define MBTIF7 0x0080 /* TX Interrupt Active In Mailbox 7 */
2277#define MBTIF8 0x0100 /* TX Interrupt Active In Mailbox 8 */
2278#define MBTIF9 0x0200 /* TX Interrupt Active In Mailbox 9 */
2279#define MBTIF10 0x0400 /* TX Interrupt Active In Mailbox 10 */
2280#define MBTIF11 0x0800 /* TX Interrupt Active In Mailbox 11 */
2281#define MBTIF12 0x1000 /* TX Interrupt Active In Mailbox 12 */
2282#define MBTIF13 0x2000 /* TX Interrupt Active In Mailbox 13 */
2283#define MBTIF14 0x4000 /* TX Interrupt Active In Mailbox 14 */
2284#define MBTIF15 0x8000 /* TX Interrupt Active In Mailbox 15 */
2285
2286/* CAN_MBTIF2 Masks */
2287#define MBTIF16 0x0001 /* TX Interrupt Active In Mailbox 16 */
2288#define MBTIF17 0x0002 /* TX Interrupt Active In Mailbox 17 */
2289#define MBTIF18 0x0004 /* TX Interrupt Active In Mailbox 18 */
2290#define MBTIF19 0x0008 /* TX Interrupt Active In Mailbox 19 */
2291#define MBTIF20 0x0010 /* TX Interrupt Active In Mailbox 20 */
2292#define MBTIF21 0x0020 /* TX Interrupt Active In Mailbox 21 */
2293#define MBTIF22 0x0040 /* TX Interrupt Active In Mailbox 22 */
2294#define MBTIF23 0x0080 /* TX Interrupt Active In Mailbox 23 */
2295#define MBTIF24 0x0100 /* TX Interrupt Active In Mailbox 24 */
2296#define MBTIF25 0x0200 /* TX Interrupt Active In Mailbox 25 */
2297#define MBTIF26 0x0400 /* TX Interrupt Active In Mailbox 26 */
2298#define MBTIF27 0x0800 /* TX Interrupt Active In Mailbox 27 */
2299#define MBTIF28 0x1000 /* TX Interrupt Active In Mailbox 28 */
2300#define MBTIF29 0x2000 /* TX Interrupt Active In Mailbox 29 */
2301#define MBTIF30 0x4000 /* TX Interrupt Active In Mailbox 30 */
2302#define MBTIF31 0x8000 /* TX Interrupt Active In Mailbox 31 */
2303
2304/* CAN_MBRIF1 Masks */
2305#define MBRIF0 0x0001 /* RX Interrupt Active In Mailbox 0 */
2306#define MBRIF1 0x0002 /* RX Interrupt Active In Mailbox 1 */
2307#define MBRIF2 0x0004 /* RX Interrupt Active In Mailbox 2 */
2308#define MBRIF3 0x0008 /* RX Interrupt Active In Mailbox 3 */
2309#define MBRIF4 0x0010 /* RX Interrupt Active In Mailbox 4 */
2310#define MBRIF5 0x0020 /* RX Interrupt Active In Mailbox 5 */
2311#define MBRIF6 0x0040 /* RX Interrupt Active In Mailbox 6 */
2312#define MBRIF7 0x0080 /* RX Interrupt Active In Mailbox 7 */
2313#define MBRIF8 0x0100 /* RX Interrupt Active In Mailbox 8 */
2314#define MBRIF9 0x0200 /* RX Interrupt Active In Mailbox 9 */
2315#define MBRIF10 0x0400 /* RX Interrupt Active In Mailbox 10 */
2316#define MBRIF11 0x0800 /* RX Interrupt Active In Mailbox 11 */
2317#define MBRIF12 0x1000 /* RX Interrupt Active In Mailbox 12 */
2318#define MBRIF13 0x2000 /* RX Interrupt Active In Mailbox 13 */
2319#define MBRIF14 0x4000 /* RX Interrupt Active In Mailbox 14 */
2320#define MBRIF15 0x8000 /* RX Interrupt Active In Mailbox 15 */
2321
2322/* CAN_MBRIF2 Masks */
2323#define MBRIF16 0x0001 /* RX Interrupt Active In Mailbox 16 */
2324#define MBRIF17 0x0002 /* RX Interrupt Active In Mailbox 17 */
2325#define MBRIF18 0x0004 /* RX Interrupt Active In Mailbox 18 */
2326#define MBRIF19 0x0008 /* RX Interrupt Active In Mailbox 19 */
2327#define MBRIF20 0x0010 /* RX Interrupt Active In Mailbox 20 */
2328#define MBRIF21 0x0020 /* RX Interrupt Active In Mailbox 21 */
2329#define MBRIF22 0x0040 /* RX Interrupt Active In Mailbox 22 */
2330#define MBRIF23 0x0080 /* RX Interrupt Active In Mailbox 23 */
2331#define MBRIF24 0x0100 /* RX Interrupt Active In Mailbox 24 */
2332#define MBRIF25 0x0200 /* RX Interrupt Active In Mailbox 25 */
2333#define MBRIF26 0x0400 /* RX Interrupt Active In Mailbox 26 */
2334#define MBRIF27 0x0800 /* RX Interrupt Active In Mailbox 27 */
2335#define MBRIF28 0x1000 /* RX Interrupt Active In Mailbox 28 */
2336#define MBRIF29 0x2000 /* RX Interrupt Active In Mailbox 29 */
2337#define MBRIF30 0x4000 /* RX Interrupt Active In Mailbox 30 */
2338#define MBRIF31 0x8000 /* RX Interrupt Active In Mailbox 31 */
2339
2340/* CAN_MBIM1 Masks */
2341#define MBIM0 0x0001 /* Enable Interrupt For Mailbox 0 */
2342#define MBIM1 0x0002 /* Enable Interrupt For Mailbox 1 */
2343#define MBIM2 0x0004 /* Enable Interrupt For Mailbox 2 */
2344#define MBIM3 0x0008 /* Enable Interrupt For Mailbox 3 */
2345#define MBIM4 0x0010 /* Enable Interrupt For Mailbox 4 */
2346#define MBIM5 0x0020 /* Enable Interrupt For Mailbox 5 */
2347#define MBIM6 0x0040 /* Enable Interrupt For Mailbox 6 */
2348#define MBIM7 0x0080 /* Enable Interrupt For Mailbox 7 */
2349#define MBIM8 0x0100 /* Enable Interrupt For Mailbox 8 */
2350#define MBIM9 0x0200 /* Enable Interrupt For Mailbox 9 */
2351#define MBIM10 0x0400 /* Enable Interrupt For Mailbox 10 */
2352#define MBIM11 0x0800 /* Enable Interrupt For Mailbox 11 */
2353#define MBIM12 0x1000 /* Enable Interrupt For Mailbox 12 */
2354#define MBIM13 0x2000 /* Enable Interrupt For Mailbox 13 */
2355#define MBIM14 0x4000 /* Enable Interrupt For Mailbox 14 */
2356#define MBIM15 0x8000 /* Enable Interrupt For Mailbox 15 */
2357
2358/* CAN_MBIM2 Masks */
2359#define MBIM16 0x0001 /* Enable Interrupt For Mailbox 16 */
2360#define MBIM17 0x0002 /* Enable Interrupt For Mailbox 17 */
2361#define MBIM18 0x0004 /* Enable Interrupt For Mailbox 18 */
2362#define MBIM19 0x0008 /* Enable Interrupt For Mailbox 19 */
2363#define MBIM20 0x0010 /* Enable Interrupt For Mailbox 20 */
2364#define MBIM21 0x0020 /* Enable Interrupt For Mailbox 21 */
2365#define MBIM22 0x0040 /* Enable Interrupt For Mailbox 22 */
2366#define MBIM23 0x0080 /* Enable Interrupt For Mailbox 23 */
2367#define MBIM24 0x0100 /* Enable Interrupt For Mailbox 24 */
2368#define MBIM25 0x0200 /* Enable Interrupt For Mailbox 25 */
2369#define MBIM26 0x0400 /* Enable Interrupt For Mailbox 26 */
2370#define MBIM27 0x0800 /* Enable Interrupt For Mailbox 27 */
2371#define MBIM28 0x1000 /* Enable Interrupt For Mailbox 28 */
2372#define MBIM29 0x2000 /* Enable Interrupt For Mailbox 29 */
2373#define MBIM30 0x4000 /* Enable Interrupt For Mailbox 30 */
2374#define MBIM31 0x8000 /* Enable Interrupt For Mailbox 31 */
2375
2376/* CAN_GIM Masks */
2377#define EWTIM 0x0001 /* Enable TX Error Count Interrupt */
2378#define EWRIM 0x0002 /* Enable RX Error Count Interrupt */
2379#define EPIM 0x0004 /* Enable Error-Passive Mode Interrupt */
2380#define BOIM 0x0008 /* Enable Bus Off Interrupt */
2381#define WUIM 0x0010 /* Enable Wake-Up Interrupt */
2382#define UIAIM 0x0020 /* Enable Access To Unimplemented Address Interrupt */
2383#define AAIM 0x0040 /* Enable Abort Acknowledge Interrupt */
2384#define RMLIM 0x0080 /* Enable RX Message Lost Interrupt */
2385#define UCEIM 0x0100 /* Enable Universal Counter Overflow Interrupt */
2386#define EXTIM 0x0200 /* Enable External Trigger Output Interrupt */
2387#define ADIM 0x0400 /* Enable Access Denied Interrupt */
2388
2389/* CAN_GIS Masks */
2390#define EWTIS 0x0001 /* TX Error Count IRQ Status */
2391#define EWRIS 0x0002 /* RX Error Count IRQ Status */
2392#define EPIS 0x0004 /* Error-Passive Mode IRQ Status */
2393#define BOIS 0x0008 /* Bus Off IRQ Status */
2394#define WUIS 0x0010 /* Wake-Up IRQ Status */
2395#define UIAIS 0x0020 /* Access To Unimplemented Address IRQ Status */
2396#define AAIS 0x0040 /* Abort Acknowledge IRQ Status */
2397#define RMLIS 0x0080 /* RX Message Lost IRQ Status */
2398#define UCEIS 0x0100 /* Universal Counter Overflow IRQ Status */
2399#define EXTIS 0x0200 /* External Trigger Output IRQ Status */
2400#define ADIS 0x0400 /* Access Denied IRQ Status */
2401
2402/* CAN_GIF Masks */
2403#define EWTIF 0x0001 /* TX Error Count IRQ Flag */
2404#define EWRIF 0x0002 /* RX Error Count IRQ Flag */
2405#define EPIF 0x0004 /* Error-Passive Mode IRQ Flag */
2406#define BOIF 0x0008 /* Bus Off IRQ Flag */
2407#define WUIF 0x0010 /* Wake-Up IRQ Flag */
2408#define UIAIF 0x0020 /* Access To Unimplemented Address IRQ Flag */
2409#define AAIF 0x0040 /* Abort Acknowledge IRQ Flag */
2410#define RMLIF 0x0080 /* RX Message Lost IRQ Flag */
2411#define UCEIF 0x0100 /* Universal Counter Overflow IRQ Flag */
2412#define EXTIF 0x0200 /* External Trigger Output IRQ Flag */
2413#define ADIF 0x0400 /* Access Denied IRQ Flag */
2414
2415/* CAN_UCCNF Masks */
2416#define UCCNF 0x000F /* Universal Counter Mode */
2417#define UC_STAMP 0x0001 /* Timestamp Mode */
2418#define UC_WDOG 0x0002 /* Watchdog Mode */
2419#define UC_AUTOTX 0x0003 /* Auto-Transmit Mode */
2420#define UC_ERROR 0x0006 /* CAN Error Frame Count */
2421#define UC_OVER 0x0007 /* CAN Overload Frame Count */
2422#define UC_LOST 0x0008 /* Arbitration Lost During TX Count */
2423#define UC_AA 0x0009 /* TX Abort Count */
2424#define UC_TA 0x000A /* TX Successful Count */
2425#define UC_REJECT 0x000B /* RX Message Rejected Count */
2426#define UC_RML 0x000C /* RX Message Lost Count */
2427#define UC_RX 0x000D /* Total Successful RX Messages Count */
2428#define UC_RMP 0x000E /* Successful RX W/Matching ID Count */
2429#define UC_ALL 0x000F /* Correct Message On CAN Bus Line Count */
2430#define UCRC 0x0020 /* Universal Counter Reload/Clear */
2431#define UCCT 0x0040 /* Universal Counter CAN Trigger */
2432#define UCE 0x0080 /* Universal Counter Enable */
2433
2434/* CAN_ESR Masks */
2435#define ACKE 0x0004 /* Acknowledge Error */
2436#define SER 0x0008 /* Stuff Error */
2437#define CRCE 0x0010 /* CRC Error */
2438#define SA0 0x0020 /* Stuck At Dominant Error */
2439#define BEF 0x0040 /* Bit Error Flag */
2440#define FER 0x0080 /* Form Error Flag */
2441
2442/* CAN_EWR Masks */
2443#define EWLREC 0x00FF /* RX Error Count Limit (For EWRIS) */
2444#define EWLTEC 0xFF00 /* TX Error Count Limit (For EWTIS) */
2445
2446/* ******************* PIN CONTROL REGISTER MASKS ************************/
2447/* PORT_MUX Masks */
2448#define PJSE 0x0001 /* Port J SPI/SPORT Enable */
2449#define PJSE_SPORT 0x0000 /* Enable TFS0/DT0PRI */
2450#define PJSE_SPI 0x0001 /* Enable SPI_SSEL3:2 */
2451
2452#define PJCE(x) (((x)&0x3)<<1) /* Port J CAN/SPI/SPORT Enable */
2453#define PJCE_SPORT 0x0000 /* Enable DR0SEC/DT0SEC */
2454#define PJCE_CAN 0x0002 /* Enable CAN RX/TX */
2455#define PJCE_SPI 0x0004 /* Enable SPI_SSEL7 */
2456
2457#define PFDE 0x0008 /* Port F DMA Request Enable */
2458#define PFDE_UART 0x0000 /* Enable UART0 RX/TX */
2459#define PFDE_DMA 0x0008 /* Enable DMAR1:0 */
2460
2461#define PFTE 0x0010 /* Port F Timer Enable */
2462#define PFTE_UART 0x0000 /* Enable UART1 RX/TX */
2463#define PFTE_TIMER 0x0010 /* Enable TMR7:6 */
2464
2465#define PFS6E 0x0020 /* Port F SPI SSEL 6 Enable */
2466#define PFS6E_TIMER 0x0000 /* Enable TMR5 */
2467#define PFS6E_SPI 0x0020 /* Enable SPI_SSEL6 */
2468
2469#define PFS5E 0x0040 /* Port F SPI SSEL 5 Enable */
2470#define PFS5E_TIMER 0x0000 /* Enable TMR4 */
2471#define PFS5E_SPI 0x0040 /* Enable SPI_SSEL5 */
2472
2473#define PFS4E 0x0080 /* Port F SPI SSEL 4 Enable */
2474#define PFS4E_TIMER 0x0000 /* Enable TMR3 */
2475#define PFS4E_SPI 0x0080 /* Enable SPI_SSEL4 */
2476
2477#define PFFE 0x0100 /* Port F PPI Frame Sync Enable */
2478#define PFFE_TIMER 0x0000 /* Enable TMR2 */
2479#define PFFE_PPI 0x0100 /* Enable PPI FS3 */
2480
2481#define PGSE 0x0200 /* Port G SPORT1 Secondary Enable */
2482#define PGSE_PPI 0x0000 /* Enable PPI D9:8 */
2483#define PGSE_SPORT 0x0200 /* Enable DR1SEC/DT1SEC */
2484
2485#define PGRE 0x0400 /* Port G SPORT1 Receive Enable */
2486#define PGRE_PPI 0x0000 /* Enable PPI D12:10 */
2487#define PGRE_SPORT 0x0400 /* Enable DR1PRI/RFS1/RSCLK1 */
2488
2489#define PGTE 0x0800 /* Port G SPORT1 Transmit Enable */
2490#define PGTE_PPI 0x0000 /* Enable PPI D15:13 */
2491#define PGTE_SPORT 0x0800 /* Enable DT1PRI/TFS1/TSCLK1 */
2492
2493/* ****************** HANDSHAKE DMA (HDMA) MASKS *********************/
2494/* HDMAx_CTL Masks */
2495#define HMDMAEN 0x0001 /* Enable Handshake DMA 0/1 */
2496#define REP 0x0002 /* HDMA Request Polarity */
2497#define UTE 0x0004 /* Urgency Threshold Enable */
2498#define OIE 0x0010 /* Overflow Interrupt Enable */
2499#define BDIE 0x0020 /* Block Done Interrupt Enable */
2500#define MBDI 0x0040 /* Mask Block Done IRQ If Pending ECNT */
2501#define DRQ 0x0300 /* HDMA Request Type */
2502#define DRQ_NONE 0x0000 /* No Request */
2503#define DRQ_SINGLE 0x0100 /* Channels Request Single */
2504#define DRQ_MULTI 0x0200 /* Channels Request Multi (Default) */
2505#define DRQ_URGENT 0x0300 /* Channels Request Multi Urgent */
2506#define RBC 0x1000 /* Reload BCNT With IBCNT */
2507#define PS 0x2000 /* HDMA Pin Status */
2508#define OI 0x4000 /* Overflow Interrupt Generated */
2509#define BDI 0x8000 /* Block Done Interrupt Generated */
2510
2511/* entry addresses of the user-callable Boot ROM functions */
2512
2513#define _BOOTROM_RESET 0xEF000000
2514#define _BOOTROM_FINAL_INIT 0xEF000002
2515#define _BOOTROM_DO_MEMORY_DMA 0xEF000006
2516#define _BOOTROM_BOOT_DXE_FLASH 0xEF000008
2517#define _BOOTROM_BOOT_DXE_SPI 0xEF00000A
2518#define _BOOTROM_BOOT_DXE_TWI 0xEF00000C
2519#define _BOOTROM_GET_DXE_ADDRESS_FLASH 0xEF000010
2520#define _BOOTROM_GET_DXE_ADDRESS_SPI 0xEF000012
2521#define _BOOTROM_GET_DXE_ADDRESS_TWI 0xEF000014
2522
2523/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
2524#define PGDE_UART PFDE_UART
2525#define PGDE_DMA PFDE_DMA
2526#define CKELOW SCKELOW
2527#endif /* _DEF_BF534_H */
diff --git a/include/asm-blackfin/mach-bf537/defBF537.h b/include/asm-blackfin/mach-bf537/defBF537.h
deleted file mode 100644
index abde24c6d3b1..000000000000
--- a/include/asm-blackfin/mach-bf537/defBF537.h
+++ /dev/null
@@ -1,405 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf537/defbf537.h
3 * based on:
4 * author:
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 _DEF_BF537_H
33#define _DEF_BF537_H
34
35/* Include all Core registers and bit definitions*/
36#include <asm/mach-common/cdef_LPBlackfin.h>
37
38/* Include all MMR and bit defines common to BF534 */
39#include "defBF534.h"
40
41/************************************************************************************
42** Define EMAC Section Unique to BF536/BF537
43*************************************************************************************/
44
45/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
46#define EMAC_OPMODE 0xFFC03000 /* Operating Mode Register */
47#define EMAC_ADDRLO 0xFFC03004 /* Address Low (32 LSBs) Register */
48#define EMAC_ADDRHI 0xFFC03008 /* Address High (16 MSBs) Register */
49#define EMAC_HASHLO 0xFFC0300C /* Multicast Hash Table Low (Bins 31-0) Register */
50#define EMAC_HASHHI 0xFFC03010 /* Multicast Hash Table High (Bins 63-32) Register */
51#define EMAC_STAADD 0xFFC03014 /* Station Management Address Register */
52#define EMAC_STADAT 0xFFC03018 /* Station Management Data Register */
53#define EMAC_FLC 0xFFC0301C /* Flow Control Register */
54#define EMAC_VLAN1 0xFFC03020 /* VLAN1 Tag Register */
55#define EMAC_VLAN2 0xFFC03024 /* VLAN2 Tag Register */
56#define EMAC_WKUP_CTL 0xFFC0302C /* Wake-Up Control/Status Register */
57#define EMAC_WKUP_FFMSK0 0xFFC03030 /* Wake-Up Frame Filter 0 Byte Mask Register */
58#define EMAC_WKUP_FFMSK1 0xFFC03034 /* Wake-Up Frame Filter 1 Byte Mask Register */
59#define EMAC_WKUP_FFMSK2 0xFFC03038 /* Wake-Up Frame Filter 2 Byte Mask Register */
60#define EMAC_WKUP_FFMSK3 0xFFC0303C /* Wake-Up Frame Filter 3 Byte Mask Register */
61#define EMAC_WKUP_FFCMD 0xFFC03040 /* Wake-Up Frame Filter Commands Register */
62#define EMAC_WKUP_FFOFF 0xFFC03044 /* Wake-Up Frame Filter Offsets Register */
63#define EMAC_WKUP_FFCRC0 0xFFC03048 /* Wake-Up Frame Filter 0,1 CRC-16 Register */
64#define EMAC_WKUP_FFCRC1 0xFFC0304C /* Wake-Up Frame Filter 2,3 CRC-16 Register */
65
66#define EMAC_SYSCTL 0xFFC03060 /* EMAC System Control Register */
67#define EMAC_SYSTAT 0xFFC03064 /* EMAC System Status Register */
68#define EMAC_RX_STAT 0xFFC03068 /* RX Current Frame Status Register */
69#define EMAC_RX_STKY 0xFFC0306C /* RX Sticky Frame Status Register */
70#define EMAC_RX_IRQE 0xFFC03070 /* RX Frame Status Interrupt Enables Register */
71#define EMAC_TX_STAT 0xFFC03074 /* TX Current Frame Status Register */
72#define EMAC_TX_STKY 0xFFC03078 /* TX Sticky Frame Status Register */
73#define EMAC_TX_IRQE 0xFFC0307C /* TX Frame Status Interrupt Enables Register */
74
75#define EMAC_MMC_CTL 0xFFC03080 /* MMC Counter Control Register */
76#define EMAC_MMC_RIRQS 0xFFC03084 /* MMC RX Interrupt Status Register */
77#define EMAC_MMC_RIRQE 0xFFC03088 /* MMC RX Interrupt Enables Register */
78#define EMAC_MMC_TIRQS 0xFFC0308C /* MMC TX Interrupt Status Register */
79#define EMAC_MMC_TIRQE 0xFFC03090 /* MMC TX Interrupt Enables Register */
80
81#define EMAC_RXC_OK 0xFFC03100 /* RX Frame Successful Count */
82#define EMAC_RXC_FCS 0xFFC03104 /* RX Frame FCS Failure Count */
83#define EMAC_RXC_ALIGN 0xFFC03108 /* RX Alignment Error Count */
84#define EMAC_RXC_OCTET 0xFFC0310C /* RX Octets Successfully Received Count */
85#define EMAC_RXC_DMAOVF 0xFFC03110 /* Internal MAC Sublayer Error RX Frame Count */
86#define EMAC_RXC_UNICST 0xFFC03114 /* Unicast RX Frame Count */
87#define EMAC_RXC_MULTI 0xFFC03118 /* Multicast RX Frame Count */
88#define EMAC_RXC_BROAD 0xFFC0311C /* Broadcast RX Frame Count */
89#define EMAC_RXC_LNERRI 0xFFC03120 /* RX Frame In Range Error Count */
90#define EMAC_RXC_LNERRO 0xFFC03124 /* RX Frame Out Of Range Error Count */
91#define EMAC_RXC_LONG 0xFFC03128 /* RX Frame Too Long Count */
92#define EMAC_RXC_MACCTL 0xFFC0312C /* MAC Control RX Frame Count */
93#define EMAC_RXC_OPCODE 0xFFC03130 /* Unsupported Op-Code RX Frame Count */
94#define EMAC_RXC_PAUSE 0xFFC03134 /* MAC Control Pause RX Frame Count */
95#define EMAC_RXC_ALLFRM 0xFFC03138 /* Overall RX Frame Count */
96#define EMAC_RXC_ALLOCT 0xFFC0313C /* Overall RX Octet Count */
97#define EMAC_RXC_TYPED 0xFFC03140 /* Type/Length Consistent RX Frame Count */
98#define EMAC_RXC_SHORT 0xFFC03144 /* RX Frame Fragment Count - Byte Count x < 64 */
99#define EMAC_RXC_EQ64 0xFFC03148 /* Good RX Frame Count - Byte Count x = 64 */
100#define EMAC_RXC_LT128 0xFFC0314C /* Good RX Frame Count - Byte Count 64 <= x < 128 */
101#define EMAC_RXC_LT256 0xFFC03150 /* Good RX Frame Count - Byte Count 128 <= x < 256 */
102#define EMAC_RXC_LT512 0xFFC03154 /* Good RX Frame Count - Byte Count 256 <= x < 512 */
103#define EMAC_RXC_LT1024 0xFFC03158 /* Good RX Frame Count - Byte Count 512 <= x < 1024 */
104#define EMAC_RXC_GE1024 0xFFC0315C /* Good RX Frame Count - Byte Count x >= 1024 */
105
106#define EMAC_TXC_OK 0xFFC03180 /* TX Frame Successful Count */
107#define EMAC_TXC_1COL 0xFFC03184 /* TX Frames Successful After Single Collision Count */
108#define EMAC_TXC_GT1COL 0xFFC03188 /* TX Frames Successful After Multiple Collisions Count */
109#define EMAC_TXC_OCTET 0xFFC0318C /* TX Octets Successfully Received Count */
110#define EMAC_TXC_DEFER 0xFFC03190 /* TX Frame Delayed Due To Busy Count */
111#define EMAC_TXC_LATECL 0xFFC03194 /* Late TX Collisions Count */
112#define EMAC_TXC_XS_COL 0xFFC03198 /* TX Frame Failed Due To Excessive Collisions Count */
113#define EMAC_TXC_DMAUND 0xFFC0319C /* Internal MAC Sublayer Error TX Frame Count */
114#define EMAC_TXC_CRSERR 0xFFC031A0 /* Carrier Sense Deasserted During TX Frame Count */
115#define EMAC_TXC_UNICST 0xFFC031A4 /* Unicast TX Frame Count */
116#define EMAC_TXC_MULTI 0xFFC031A8 /* Multicast TX Frame Count */
117#define EMAC_TXC_BROAD 0xFFC031AC /* Broadcast TX Frame Count */
118#define EMAC_TXC_XS_DFR 0xFFC031B0 /* TX Frames With Excessive Deferral Count */
119#define EMAC_TXC_MACCTL 0xFFC031B4 /* MAC Control TX Frame Count */
120#define EMAC_TXC_ALLFRM 0xFFC031B8 /* Overall TX Frame Count */
121#define EMAC_TXC_ALLOCT 0xFFC031BC /* Overall TX Octet Count */
122#define EMAC_TXC_EQ64 0xFFC031C0 /* Good TX Frame Count - Byte Count x = 64 */
123#define EMAC_TXC_LT128 0xFFC031C4 /* Good TX Frame Count - Byte Count 64 <= x < 128 */
124#define EMAC_TXC_LT256 0xFFC031C8 /* Good TX Frame Count - Byte Count 128 <= x < 256 */
125#define EMAC_TXC_LT512 0xFFC031CC /* Good TX Frame Count - Byte Count 256 <= x < 512 */
126#define EMAC_TXC_LT1024 0xFFC031D0 /* Good TX Frame Count - Byte Count 512 <= x < 1024 */
127#define EMAC_TXC_GE1024 0xFFC031D4 /* Good TX Frame Count - Byte Count x >= 1024 */
128#define EMAC_TXC_ABORT 0xFFC031D8 /* Total TX Frames Aborted Count */
129
130/* Listing for IEEE-Supported Count Registers */
131#define FramesReceivedOK EMAC_RXC_OK /* RX Frame Successful Count */
132#define FrameCheckSequenceErrors EMAC_RXC_FCS /* RX Frame FCS Failure Count */
133#define AlignmentErrors EMAC_RXC_ALIGN /* RX Alignment Error Count */
134#define OctetsReceivedOK EMAC_RXC_OCTET /* RX Octets Successfully Received Count */
135#define FramesLostDueToIntMACRcvError EMAC_RXC_DMAOVF /* Internal MAC Sublayer Error RX Frame Count */
136#define UnicastFramesReceivedOK EMAC_RXC_UNICST /* Unicast RX Frame Count */
137#define MulticastFramesReceivedOK EMAC_RXC_MULTI /* Multicast RX Frame Count */
138#define BroadcastFramesReceivedOK EMAC_RXC_BROAD /* Broadcast RX Frame Count */
139#define InRangeLengthErrors EMAC_RXC_LNERRI /* RX Frame In Range Error Count */
140#define OutOfRangeLengthField EMAC_RXC_LNERRO /* RX Frame Out Of Range Error Count */
141#define FrameTooLongErrors EMAC_RXC_LONG /* RX Frame Too Long Count */
142#define MACControlFramesReceived EMAC_RXC_MACCTL /* MAC Control RX Frame Count */
143#define UnsupportedOpcodesReceived EMAC_RXC_OPCODE /* Unsupported Op-Code RX Frame Count */
144#define PAUSEMACCtrlFramesReceived EMAC_RXC_PAUSE /* MAC Control Pause RX Frame Count */
145#define FramesReceivedAll EMAC_RXC_ALLFRM /* Overall RX Frame Count */
146#define OctetsReceivedAll EMAC_RXC_ALLOCT /* Overall RX Octet Count */
147#define TypedFramesReceived EMAC_RXC_TYPED /* Type/Length Consistent RX Frame Count */
148#define FramesLenLt64Received EMAC_RXC_SHORT /* RX Frame Fragment Count - Byte Count x < 64 */
149#define FramesLenEq64Received EMAC_RXC_EQ64 /* Good RX Frame Count - Byte Count x = 64 */
150#define FramesLen65_127Received EMAC_RXC_LT128 /* Good RX Frame Count - Byte Count 64 <= x < 128 */
151#define FramesLen128_255Received EMAC_RXC_LT256 /* Good RX Frame Count - Byte Count 128 <= x < 256 */
152#define FramesLen256_511Received EMAC_RXC_LT512 /* Good RX Frame Count - Byte Count 256 <= x < 512 */
153#define FramesLen512_1023Received EMAC_RXC_LT1024 /* Good RX Frame Count - Byte Count 512 <= x < 1024 */
154#define FramesLen1024_MaxReceived EMAC_RXC_GE1024 /* Good RX Frame Count - Byte Count x >= 1024 */
155
156#define FramesTransmittedOK EMAC_TXC_OK /* TX Frame Successful Count */
157#define SingleCollisionFrames EMAC_TXC_1COL /* TX Frames Successful After Single Collision Count */
158#define MultipleCollisionFrames EMAC_TXC_GT1COL /* TX Frames Successful After Multiple Collisions Count */
159#define OctetsTransmittedOK EMAC_TXC_OCTET /* TX Octets Successfully Received Count */
160#define FramesWithDeferredXmissions EMAC_TXC_DEFER /* TX Frame Delayed Due To Busy Count */
161#define LateCollisions EMAC_TXC_LATECL /* Late TX Collisions Count */
162#define FramesAbortedDueToXSColls EMAC_TXC_XS_COL /* TX Frame Failed Due To Excessive Collisions Count */
163#define FramesLostDueToIntMacXmitError EMAC_TXC_DMAUND /* Internal MAC Sublayer Error TX Frame Count */
164#define CarrierSenseErrors EMAC_TXC_CRSERR /* Carrier Sense Deasserted During TX Frame Count */
165#define UnicastFramesXmittedOK EMAC_TXC_UNICST /* Unicast TX Frame Count */
166#define MulticastFramesXmittedOK EMAC_TXC_MULTI /* Multicast TX Frame Count */
167#define BroadcastFramesXmittedOK EMAC_TXC_BROAD /* Broadcast TX Frame Count */
168#define FramesWithExcessiveDeferral EMAC_TXC_XS_DFR /* TX Frames With Excessive Deferral Count */
169#define MACControlFramesTransmitted EMAC_TXC_MACCTL /* MAC Control TX Frame Count */
170#define FramesTransmittedAll EMAC_TXC_ALLFRM /* Overall TX Frame Count */
171#define OctetsTransmittedAll EMAC_TXC_ALLOCT /* Overall TX Octet Count */
172#define FramesLenEq64Transmitted EMAC_TXC_EQ64 /* Good TX Frame Count - Byte Count x = 64 */
173#define FramesLen65_127Transmitted EMAC_TXC_LT128 /* Good TX Frame Count - Byte Count 64 <= x < 128 */
174#define FramesLen128_255Transmitted EMAC_TXC_LT256 /* Good TX Frame Count - Byte Count 128 <= x < 256 */
175#define FramesLen256_511Transmitted EMAC_TXC_LT512 /* Good TX Frame Count - Byte Count 256 <= x < 512 */
176#define FramesLen512_1023Transmitted EMAC_TXC_LT1024 /* Good TX Frame Count - Byte Count 512 <= x < 1024 */
177#define FramesLen1024_MaxTransmitted EMAC_TXC_GE1024 /* Good TX Frame Count - Byte Count x >= 1024 */
178#define TxAbortedFrames EMAC_TXC_ABORT /* Total TX Frames Aborted Count */
179
180/***********************************************************************************
181** System MMR Register Bits And Macros
182**
183** Disclaimer: All macros are intended to make C and Assembly code more readable.
184** Use these macros carefully, as any that do left shifts for field
185** depositing will result in the lower order bits being destroyed. Any
186** macro that shifts left to properly position the bit-field should be
187** used as part of an OR to initialize a register and NOT as a dynamic
188** modifier UNLESS the lower order bits are saved and ORed back in when
189** the macro is used.
190*************************************************************************************/
191/************************ ETHERNET 10/100 CONTROLLER MASKS ************************/
192/* EMAC_OPMODE Masks */
193#define RE 0x00000001 /* Receiver Enable */
194#define ASTP 0x00000002 /* Enable Automatic Pad Stripping On RX Frames */
195#define HU 0x00000010 /* Hash Filter Unicast Address */
196#define HM 0x00000020 /* Hash Filter Multicast Address */
197#define PAM 0x00000040 /* Pass-All-Multicast Mode Enable */
198#define PR 0x00000080 /* Promiscuous Mode Enable */
199#define IFE 0x00000100 /* Inverse Filtering Enable */
200#define DBF 0x00000200 /* Disable Broadcast Frame Reception */
201#define PBF 0x00000400 /* Pass Bad Frames Enable */
202#define PSF 0x00000800 /* Pass Short Frames Enable */
203#define RAF 0x00001000 /* Receive-All Mode */
204#define TE 0x00010000 /* Transmitter Enable */
205#define DTXPAD 0x00020000 /* Disable Automatic TX Padding */
206#define DTXCRC 0x00040000 /* Disable Automatic TX CRC Generation */
207#define DC 0x00080000 /* Deferral Check */
208#define BOLMT 0x00300000 /* Back-Off Limit */
209#define BOLMT_10 0x00000000 /* 10-bit range */
210#define BOLMT_8 0x00100000 /* 8-bit range */
211#define BOLMT_4 0x00200000 /* 4-bit range */
212#define BOLMT_1 0x00300000 /* 1-bit range */
213#define DRTY 0x00400000 /* Disable TX Retry On Collision */
214#define LCTRE 0x00800000 /* Enable TX Retry On Late Collision */
215#define RMII 0x01000000 /* RMII/MII* Mode */
216#define RMII_10 0x02000000 /* Speed Select for RMII Port (10MBit/100MBit*) */
217#define FDMODE 0x04000000 /* Duplex Mode Enable (Full/Half*) */
218#define LB 0x08000000 /* Internal Loopback Enable */
219#define DRO 0x10000000 /* Disable Receive Own Frames (Half-Duplex Mode) */
220
221/* EMAC_STAADD Masks */
222#define STABUSY 0x00000001 /* Initiate Station Mgt Reg Access / STA Busy Stat */
223#define STAOP 0x00000002 /* Station Management Operation Code (Write/Read*) */
224#define STADISPRE 0x00000004 /* Disable Preamble Generation */
225#define STAIE 0x00000008 /* Station Mgt. Transfer Done Interrupt Enable */
226#define REGAD 0x000007C0 /* STA Register Address */
227#define PHYAD 0x0000F800 /* PHY Device Address */
228
229#define SET_REGAD(x) (((x)&0x1F)<< 6 ) /* Set STA Register Address */
230#define SET_PHYAD(x) (((x)&0x1F)<< 11 ) /* Set PHY Device Address */
231
232/* EMAC_STADAT Mask */
233#define STADATA 0x0000FFFF /* Station Management Data */
234
235/* EMAC_FLC Masks */
236#define FLCBUSY 0x00000001 /* Send Flow Ctrl Frame / Flow Ctrl Busy Status */
237#define FLCE 0x00000002 /* Flow Control Enable */
238#define PCF 0x00000004 /* Pass Control Frames */
239#define BKPRSEN 0x00000008 /* Enable Backpressure */
240#define FLCPAUSE 0xFFFF0000 /* Pause Time */
241
242#define SET_FLCPAUSE(x) (((x)&0xFFFF)<< 16) /* Set Pause Time */
243
244/* EMAC_WKUP_CTL Masks */
245#define CAPWKFRM 0x00000001 /* Capture Wake-Up Frames */
246#define MPKE 0x00000002 /* Magic Packet Enable */
247#define RWKE 0x00000004 /* Remote Wake-Up Frame Enable */
248#define GUWKE 0x00000008 /* Global Unicast Wake Enable */
249#define MPKS 0x00000020 /* Magic Packet Received Status */
250#define RWKS 0x00000F00 /* Wake-Up Frame Received Status, Filters 3:0 */
251
252/* EMAC_WKUP_FFCMD Masks */
253#define WF0_E 0x00000001 /* Enable Wake-Up Filter 0 */
254#define WF0_T 0x00000008 /* Wake-Up Filter 0 Addr Type (Multicast/Unicast*) */
255#define WF1_E 0x00000100 /* Enable Wake-Up Filter 1 */
256#define WF1_T 0x00000800 /* Wake-Up Filter 1 Addr Type (Multicast/Unicast*) */
257#define WF2_E 0x00010000 /* Enable Wake-Up Filter 2 */
258#define WF2_T 0x00080000 /* Wake-Up Filter 2 Addr Type (Multicast/Unicast*) */
259#define WF3_E 0x01000000 /* Enable Wake-Up Filter 3 */
260#define WF3_T 0x08000000 /* Wake-Up Filter 3 Addr Type (Multicast/Unicast*) */
261
262/* EMAC_WKUP_FFOFF Masks */
263#define WF0_OFF 0x000000FF /* Wake-Up Filter 0 Pattern Offset */
264#define WF1_OFF 0x0000FF00 /* Wake-Up Filter 1 Pattern Offset */
265#define WF2_OFF 0x00FF0000 /* Wake-Up Filter 2 Pattern Offset */
266#define WF3_OFF 0xFF000000 /* Wake-Up Filter 3 Pattern Offset */
267
268#define SET_WF0_OFF(x) (((x)&0xFF)<< 0 ) /* Set Wake-Up Filter 0 Byte Offset */
269#define SET_WF1_OFF(x) (((x)&0xFF)<< 8 ) /* Set Wake-Up Filter 1 Byte Offset */
270#define SET_WF2_OFF(x) (((x)&0xFF)<< 16 ) /* Set Wake-Up Filter 2 Byte Offset */
271#define SET_WF3_OFF(x) (((x)&0xFF)<< 24 ) /* Set Wake-Up Filter 3 Byte Offset */
272/* Set ALL Offsets */
273#define SET_WF_OFFS(x0,x1,x2,x3) (SET_WF0_OFF((x0))|SET_WF1_OFF((x1))|SET_WF2_OFF((x2))|SET_WF3_OFF((x3)))
274
275/* EMAC_WKUP_FFCRC0 Masks */
276#define WF0_CRC 0x0000FFFF /* Wake-Up Filter 0 Pattern CRC */
277#define WF1_CRC 0xFFFF0000 /* Wake-Up Filter 1 Pattern CRC */
278
279#define SET_WF0_CRC(x) (((x)&0xFFFF)<< 0 ) /* Set Wake-Up Filter 0 Target CRC */
280#define SET_WF1_CRC(x) (((x)&0xFFFF)<< 16 ) /* Set Wake-Up Filter 1 Target CRC */
281
282/* EMAC_WKUP_FFCRC1 Masks */
283#define WF2_CRC 0x0000FFFF /* Wake-Up Filter 2 Pattern CRC */
284#define WF3_CRC 0xFFFF0000 /* Wake-Up Filter 3 Pattern CRC */
285
286#define SET_WF2_CRC(x) (((x)&0xFFFF)<< 0 ) /* Set Wake-Up Filter 2 Target CRC */
287#define SET_WF3_CRC(x) (((x)&0xFFFF)<< 16 ) /* Set Wake-Up Filter 3 Target CRC */
288
289/* EMAC_SYSCTL Masks */
290#define PHYIE 0x00000001 /* PHY_INT Interrupt Enable */
291#define RXDWA 0x00000002 /* Receive Frame DMA Word Alignment (Odd/Even*) */
292#define RXCKS 0x00000004 /* Enable RX Frame TCP/UDP Checksum Computation */
293#define TXDWA 0x00000010 /* Transmit Frame DMA Word Alignment (Odd/Even*) */
294#define MDCDIV 0x00003F00 /* SCLK:MDC Clock Divisor [MDC=SCLK/(2*(N+1))] */
295
296#define SET_MDCDIV(x) (((x)&0x3F)<< 8) /* Set MDC Clock Divisor */
297
298/* EMAC_SYSTAT Masks */
299#define PHYINT 0x00000001 /* PHY_INT Interrupt Status */
300#define MMCINT 0x00000002 /* MMC Counter Interrupt Status */
301#define RXFSINT 0x00000004 /* RX Frame-Status Interrupt Status */
302#define TXFSINT 0x00000008 /* TX Frame-Status Interrupt Status */
303#define WAKEDET 0x00000010 /* Wake-Up Detected Status */
304#define RXDMAERR 0x00000020 /* RX DMA Direction Error Status */
305#define TXDMAERR 0x00000040 /* TX DMA Direction Error Status */
306#define STMDONE 0x00000080 /* Station Mgt. Transfer Done Interrupt Status */
307
308/* EMAC_RX_STAT, EMAC_RX_STKY, and EMAC_RX_IRQE Masks */
309#define RX_FRLEN 0x000007FF /* Frame Length In Bytes */
310#define RX_COMP 0x00001000 /* RX Frame Complete */
311#define RX_OK 0x00002000 /* RX Frame Received With No Errors */
312#define RX_LONG 0x00004000 /* RX Frame Too Long Error */
313#define RX_ALIGN 0x00008000 /* RX Frame Alignment Error */
314#define RX_CRC 0x00010000 /* RX Frame CRC Error */
315#define RX_LEN 0x00020000 /* RX Frame Length Error */
316#define RX_FRAG 0x00040000 /* RX Frame Fragment Error */
317#define RX_ADDR 0x00080000 /* RX Frame Address Filter Failed Error */
318#define RX_DMAO 0x00100000 /* RX Frame DMA Overrun Error */
319#define RX_PHY 0x00200000 /* RX Frame PHY Error */
320#define RX_LATE 0x00400000 /* RX Frame Late Collision Error */
321#define RX_RANGE 0x00800000 /* RX Frame Length Field Out of Range Error */
322#define RX_MULTI 0x01000000 /* RX Multicast Frame Indicator */
323#define RX_BROAD 0x02000000 /* RX Broadcast Frame Indicator */
324#define RX_CTL 0x04000000 /* RX Control Frame Indicator */
325#define RX_UCTL 0x08000000 /* Unsupported RX Control Frame Indicator */
326#define RX_TYPE 0x10000000 /* RX Typed Frame Indicator */
327#define RX_VLAN1 0x20000000 /* RX VLAN1 Frame Indicator */
328#define RX_VLAN2 0x40000000 /* RX VLAN2 Frame Indicator */
329#define RX_ACCEPT 0x80000000 /* RX Frame Accepted Indicator */
330
331/* EMAC_TX_STAT, EMAC_TX_STKY, and EMAC_TX_IRQE Masks */
332#define TX_COMP 0x00000001 /* TX Frame Complete */
333#define TX_OK 0x00000002 /* TX Frame Sent With No Errors */
334#define TX_ECOLL 0x00000004 /* TX Frame Excessive Collision Error */
335#define TX_LATE 0x00000008 /* TX Frame Late Collision Error */
336#define TX_DMAU 0x00000010 /* TX Frame DMA Underrun Error (STAT) */
337#define TX_MACE 0x00000010 /* Internal MAC Error Detected (STKY and IRQE) */
338#define TX_EDEFER 0x00000020 /* TX Frame Excessive Deferral Error */
339#define TX_BROAD 0x00000040 /* TX Broadcast Frame Indicator */
340#define TX_MULTI 0x00000080 /* TX Multicast Frame Indicator */
341#define TX_CCNT 0x00000F00 /* TX Frame Collision Count */
342#define TX_DEFER 0x00001000 /* TX Frame Deferred Indicator */
343#define TX_CRS 0x00002000 /* TX Frame Carrier Sense Not Asserted Error */
344#define TX_LOSS 0x00004000 /* TX Frame Carrier Lost During TX Error */
345#define TX_RETRY 0x00008000 /* TX Frame Successful After Retry */
346#define TX_FRLEN 0x07FF0000 /* TX Frame Length (Bytes) */
347
348/* EMAC_MMC_CTL Masks */
349#define RSTC 0x00000001 /* Reset All Counters */
350#define CROLL 0x00000002 /* Counter Roll-Over Enable */
351#define CCOR 0x00000004 /* Counter Clear-On-Read Mode Enable */
352#define MMCE 0x00000008 /* Enable MMC Counter Operation */
353
354/* EMAC_MMC_RIRQS and EMAC_MMC_RIRQE Masks */
355#define RX_OK_CNT 0x00000001 /* RX Frames Received With No Errors */
356#define RX_FCS_CNT 0x00000002 /* RX Frames W/Frame Check Sequence Errors */
357#define RX_ALIGN_CNT 0x00000004 /* RX Frames With Alignment Errors */
358#define RX_OCTET_CNT 0x00000008 /* RX Octets Received OK */
359#define RX_LOST_CNT 0x00000010 /* RX Frames Lost Due To Internal MAC RX Error */
360#define RX_UNI_CNT 0x00000020 /* Unicast RX Frames Received OK */
361#define RX_MULTI_CNT 0x00000040 /* Multicast RX Frames Received OK */
362#define RX_BROAD_CNT 0x00000080 /* Broadcast RX Frames Received OK */
363#define RX_IRL_CNT 0x00000100 /* RX Frames With In-Range Length Errors */
364#define RX_ORL_CNT 0x00000200 /* RX Frames With Out-Of-Range Length Errors */
365#define RX_LONG_CNT 0x00000400 /* RX Frames With Frame Too Long Errors */
366#define RX_MACCTL_CNT 0x00000800 /* MAC Control RX Frames Received */
367#define RX_OPCODE_CTL 0x00001000 /* Unsupported Op-Code RX Frames Received */
368#define RX_PAUSE_CNT 0x00002000 /* PAUSEMAC Control RX Frames Received */
369#define RX_ALLF_CNT 0x00004000 /* All RX Frames Received */
370#define RX_ALLO_CNT 0x00008000 /* All RX Octets Received */
371#define RX_TYPED_CNT 0x00010000 /* Typed RX Frames Received */
372#define RX_SHORT_CNT 0x00020000 /* RX Frame Fragments (< 64 Bytes) Received */
373#define RX_EQ64_CNT 0x00040000 /* 64-Byte RX Frames Received */
374#define RX_LT128_CNT 0x00080000 /* 65-127-Byte RX Frames Received */
375#define RX_LT256_CNT 0x00100000 /* 128-255-Byte RX Frames Received */
376#define RX_LT512_CNT 0x00200000 /* 256-511-Byte RX Frames Received */
377#define RX_LT1024_CNT 0x00400000 /* 512-1023-Byte RX Frames Received */
378#define RX_GE1024_CNT 0x00800000 /* 1024-Max-Byte RX Frames Received */
379
380/* EMAC_MMC_TIRQS and EMAC_MMC_TIRQE Masks */
381#define TX_OK_CNT 0x00000001 /* TX Frames Sent OK */
382#define TX_SCOLL_CNT 0x00000002 /* TX Frames With Single Collisions */
383#define TX_MCOLL_CNT 0x00000004 /* TX Frames With Multiple Collisions */
384#define TX_OCTET_CNT 0x00000008 /* TX Octets Sent OK */
385#define TX_DEFER_CNT 0x00000010 /* TX Frames With Deferred Transmission */
386#define TX_LATE_CNT 0x00000020 /* TX Frames With Late Collisions */
387#define TX_ABORTC_CNT 0x00000040 /* TX Frames Aborted Due To Excess Collisions */
388#define TX_LOST_CNT 0x00000080 /* TX Frames Lost Due To Internal MAC TX Error */
389#define TX_CRS_CNT 0x00000100 /* TX Frames With Carrier Sense Errors */
390#define TX_UNI_CNT 0x00000200 /* Unicast TX Frames Sent */
391#define TX_MULTI_CNT 0x00000400 /* Multicast TX Frames Sent */
392#define TX_BROAD_CNT 0x00000800 /* Broadcast TX Frames Sent */
393#define TX_EXDEF_CTL 0x00001000 /* TX Frames With Excessive Deferral */
394#define TX_MACCTL_CNT 0x00002000 /* MAC Control TX Frames Sent */
395#define TX_ALLF_CNT 0x00004000 /* All TX Frames Sent */
396#define TX_ALLO_CNT 0x00008000 /* All TX Octets Sent */
397#define TX_EQ64_CNT 0x00010000 /* 64-Byte TX Frames Sent */
398#define TX_LT128_CNT 0x00020000 /* 65-127-Byte TX Frames Sent */
399#define TX_LT256_CNT 0x00040000 /* 128-255-Byte TX Frames Sent */
400#define TX_LT512_CNT 0x00080000 /* 256-511-Byte TX Frames Sent */
401#define TX_LT1024_CNT 0x00100000 /* 512-1023-Byte TX Frames Sent */
402#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */
403#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */
404
405#endif /* _DEF_BF537_H */
diff --git a/include/asm-blackfin/mach-bf537/dma.h b/include/asm-blackfin/mach-bf537/dma.h
deleted file mode 100644
index 7a964040870a..000000000000
--- a/include/asm-blackfin/mach-bf537/dma.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf537/dma.h
3 * based on:
4 * author:
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 _MACH_DMA_H_
33#define _MACH_DMA_H_
34
35#define MAX_BLACKFIN_DMA_CHANNEL 16
36
37#define CH_PPI 0
38#define CH_EMAC_RX 1
39#define CH_EMAC_TX 2
40#define CH_SPORT0_RX 3
41#define CH_SPORT0_TX 4
42#define CH_SPORT1_RX 5
43#define CH_SPORT1_TX 6
44#define CH_SPI 7
45#define CH_UART0_RX 8
46#define CH_UART0_TX 9
47#define CH_UART1_RX 10
48#define CH_UART1_TX 11
49
50#define CH_MEM_STREAM0_DEST 12 /* TX */
51#define CH_MEM_STREAM0_SRC 13 /* RX */
52#define CH_MEM_STREAM1_DEST 14 /* TX */
53#define CH_MEM_STREAM1_SRC 15 /* RX */
54
55#endif
diff --git a/include/asm-blackfin/mach-bf537/irq.h b/include/asm-blackfin/mach-bf537/irq.h
deleted file mode 100644
index 2e68a8a1e730..000000000000
--- a/include/asm-blackfin/mach-bf537/irq.h
+++ /dev/null
@@ -1,214 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf537/irq.h
3 * based on:
4 * author:
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 _BF537_IRQ_H_
33#define _BF537_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 * Softirq IVG14
49 * System Call --
50 * (lowest priority) IVG15
51 */
52
53#define SYS_IRQS 39
54#define NR_PERI_INTS 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 IRQ_PLL_WAKEUP 7 /*PLL Wakeup Interrupt */
67#define IRQ_DMA_ERROR 8 /*DMA Error (general) */
68#define IRQ_GENERIC_ERROR 9 /*GENERIC Error Interrupt */
69#define IRQ_RTC 10 /*RTC Interrupt */
70#define IRQ_PPI 11 /*DMA0 Interrupt (PPI) */
71#define IRQ_SPORT0_RX 12 /*DMA3 Interrupt (SPORT0 RX) */
72#define IRQ_SPORT0_TX 13 /*DMA4 Interrupt (SPORT0 TX) */
73#define IRQ_SPORT1_RX 14 /*DMA5 Interrupt (SPORT1 RX) */
74#define IRQ_SPORT1_TX 15 /*DMA6 Interrupt (SPORT1 TX) */
75#define IRQ_TWI 16 /*TWI Interrupt */
76#define IRQ_SPI 17 /*DMA7 Interrupt (SPI) */
77#define IRQ_UART0_RX 18 /*DMA8 Interrupt (UART0 RX) */
78#define IRQ_UART0_TX 19 /*DMA9 Interrupt (UART0 TX) */
79#define IRQ_UART1_RX 20 /*DMA10 Interrupt (UART1 RX) */
80#define IRQ_UART1_TX 21 /*DMA11 Interrupt (UART1 TX) */
81#define IRQ_CAN_RX 22 /*CAN Receive Interrupt */
82#define IRQ_CAN_TX 23 /*CAN Transmit Interrupt */
83#define IRQ_MAC_RX 24 /*DMA1 (Ethernet RX) Interrupt */
84#define IRQ_MAC_TX 25 /*DMA2 (Ethernet TX) Interrupt */
85#define IRQ_TMR0 26 /*Timer 0 */
86#define IRQ_TMR1 27 /*Timer 1 */
87#define IRQ_TMR2 28 /*Timer 2 */
88#define IRQ_TMR3 29 /*Timer 3 */
89#define IRQ_TMR4 30 /*Timer 4 */
90#define IRQ_TMR5 31 /*Timer 5 */
91#define IRQ_TMR6 32 /*Timer 6 */
92#define IRQ_TMR7 33 /*Timer 7 */
93#define IRQ_PROG_INTA 34 /* PF Ports F&G (PF15:0) Interrupt A */
94#define IRQ_PORTG_INTB 35 /* PF Port G (PF15:0) Interrupt B */
95#define IRQ_MEM_DMA0 36 /*(Memory DMA Stream 0) */
96#define IRQ_MEM_DMA1 37 /*(Memory DMA Stream 1) */
97#define IRQ_PROG_INTB 38 /* PF Ports F (PF15:0) Interrupt B */
98#define IRQ_WATCH 38 /*Watch Dog Timer */
99
100#define IRQ_PPI_ERROR 42 /*PPI Error Interrupt */
101#define IRQ_CAN_ERROR 43 /*CAN Error Interrupt */
102#define IRQ_MAC_ERROR 44 /*PPI Error Interrupt */
103#define IRQ_SPORT0_ERROR 45 /*SPORT0 Error Interrupt */
104#define IRQ_SPORT1_ERROR 46 /*SPORT1 Error Interrupt */
105#define IRQ_SPI_ERROR 47 /*SPI Error Interrupt */
106#define IRQ_UART0_ERROR 48 /*UART Error Interrupt */
107#define IRQ_UART1_ERROR 49 /*UART Error Interrupt */
108
109#define IRQ_PF0 50
110#define IRQ_PF1 51
111#define IRQ_PF2 52
112#define IRQ_PF3 53
113#define IRQ_PF4 54
114#define IRQ_PF5 55
115#define IRQ_PF6 56
116#define IRQ_PF7 57
117#define IRQ_PF8 58
118#define IRQ_PF9 59
119#define IRQ_PF10 60
120#define IRQ_PF11 61
121#define IRQ_PF12 62
122#define IRQ_PF13 63
123#define IRQ_PF14 64
124#define IRQ_PF15 65
125
126#define IRQ_PG0 66
127#define IRQ_PG1 67
128#define IRQ_PG2 68
129#define IRQ_PG3 69
130#define IRQ_PG4 70
131#define IRQ_PG5 71
132#define IRQ_PG6 72
133#define IRQ_PG7 73
134#define IRQ_PG8 74
135#define IRQ_PG9 75
136#define IRQ_PG10 76
137#define IRQ_PG11 77
138#define IRQ_PG12 78
139#define IRQ_PG13 79
140#define IRQ_PG14 80
141#define IRQ_PG15 81
142
143#define IRQ_PH0 82
144#define IRQ_PH1 83
145#define IRQ_PH2 84
146#define IRQ_PH3 85
147#define IRQ_PH4 86
148#define IRQ_PH5 87
149#define IRQ_PH6 88
150#define IRQ_PH7 89
151#define IRQ_PH8 90
152#define IRQ_PH9 91
153#define IRQ_PH10 92
154#define IRQ_PH11 93
155#define IRQ_PH12 94
156#define IRQ_PH13 95
157#define IRQ_PH14 96
158#define IRQ_PH15 97
159
160#define GPIO_IRQ_BASE IRQ_PF0
161
162#define NR_IRQS (IRQ_PH15+1)
163
164#define IVG7 7
165#define IVG8 8
166#define IVG9 9
167#define IVG10 10
168#define IVG11 11
169#define IVG12 12
170#define IVG13 13
171#define IVG14 14
172#define IVG15 15
173
174/* IAR0 BIT FIELDS*/
175#define IRQ_PLL_WAKEUP_POS 0
176#define IRQ_DMA_ERROR_POS 4
177#define IRQ_ERROR_POS 8
178#define IRQ_RTC_POS 12
179#define IRQ_PPI_POS 16
180#define IRQ_SPORT0_RX_POS 20
181#define IRQ_SPORT0_TX_POS 24
182#define IRQ_SPORT1_RX_POS 28
183
184/* IAR1 BIT FIELDS*/
185#define IRQ_SPORT1_TX_POS 0
186#define IRQ_TWI_POS 4
187#define IRQ_SPI_POS 8
188#define IRQ_UART0_RX_POS 12
189#define IRQ_UART0_TX_POS 16
190#define IRQ_UART1_RX_POS 20
191#define IRQ_UART1_TX_POS 24
192#define IRQ_CAN_RX_POS 28
193
194/* IAR2 BIT FIELDS*/
195#define IRQ_CAN_TX_POS 0
196#define IRQ_MAC_RX_POS 4
197#define IRQ_MAC_TX_POS 8
198#define IRQ_TMR0_POS 12
199#define IRQ_TMR1_POS 16
200#define IRQ_TMR2_POS 20
201#define IRQ_TMR3_POS 24
202#define IRQ_TMR4_POS 28
203
204/* IAR3 BIT FIELDS*/
205#define IRQ_TMR5_POS 0
206#define IRQ_TMR6_POS 4
207#define IRQ_TMR7_POS 8
208#define IRQ_PROG_INTA_POS 12
209#define IRQ_PORTG_INTB_POS 16
210#define IRQ_MEM_DMA0_POS 20
211#define IRQ_MEM_DMA1_POS 24
212#define IRQ_WATCH_POS 28
213
214#endif /* _BF537_IRQ_H_ */
diff --git a/include/asm-blackfin/mach-bf537/mem_init.h b/include/asm-blackfin/mach-bf537/mem_init.h
deleted file mode 100644
index f67698f670ca..000000000000
--- a/include/asm-blackfin/mach-bf537/mem_init.h
+++ /dev/null
@@ -1,303 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf537/mem_init.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 * Copyright 2004-2006 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)
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/* Equation from section 17 (p17-46) of BF533 HRM */
143#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
144
145/* Enable SCLK Out */
146#define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS)
147
148#if defined CONFIG_CLKIN_HALF
149#define CLKIN_HALF 1
150#else
151#define CLKIN_HALF 0
152#endif
153
154#if defined CONFIG_PLL_BYPASS
155#define PLL_BYPASS 1
156#else
157#define PLL_BYPASS 0
158#endif
159
160/***************************************Currently Not Being Used *********************************/
161#define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
162#define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
163#define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ))
164#define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
165#define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
166
167#if (flash_EBIU_AMBCTL_TT > 3)
168#define flash_EBIU_AMBCTL0_TT B0TT_4
169#endif
170#if (flash_EBIU_AMBCTL_TT == 3)
171#define flash_EBIU_AMBCTL0_TT B0TT_3
172#endif
173#if (flash_EBIU_AMBCTL_TT == 2)
174#define flash_EBIU_AMBCTL0_TT B0TT_2
175#endif
176#if (flash_EBIU_AMBCTL_TT < 2)
177#define flash_EBIU_AMBCTL0_TT B0TT_1
178#endif
179
180#if (flash_EBIU_AMBCTL_ST > 3)
181#define flash_EBIU_AMBCTL0_ST B0ST_4
182#endif
183#if (flash_EBIU_AMBCTL_ST == 3)
184#define flash_EBIU_AMBCTL0_ST B0ST_3
185#endif
186#if (flash_EBIU_AMBCTL_ST == 2)
187#define flash_EBIU_AMBCTL0_ST B0ST_2
188#endif
189#if (flash_EBIU_AMBCTL_ST < 2)
190#define flash_EBIU_AMBCTL0_ST B0ST_1
191#endif
192
193#if (flash_EBIU_AMBCTL_HT > 2)
194#define flash_EBIU_AMBCTL0_HT B0HT_3
195#endif
196#if (flash_EBIU_AMBCTL_HT == 2)
197#define flash_EBIU_AMBCTL0_HT B0HT_2
198#endif
199#if (flash_EBIU_AMBCTL_HT == 1)
200#define flash_EBIU_AMBCTL0_HT B0HT_1
201#endif
202#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0)
203#define flash_EBIU_AMBCTL0_HT B0HT_0
204#endif
205#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0)
206#define flash_EBIU_AMBCTL0_HT B0HT_1
207#endif
208
209#if (flash_EBIU_AMBCTL_WAT > 14)
210#define flash_EBIU_AMBCTL0_WAT B0WAT_15
211#endif
212#if (flash_EBIU_AMBCTL_WAT == 14)
213#define flash_EBIU_AMBCTL0_WAT B0WAT_14
214#endif
215#if (flash_EBIU_AMBCTL_WAT == 13)
216#define flash_EBIU_AMBCTL0_WAT B0WAT_13
217#endif
218#if (flash_EBIU_AMBCTL_WAT == 12)
219#define flash_EBIU_AMBCTL0_WAT B0WAT_12
220#endif
221#if (flash_EBIU_AMBCTL_WAT == 11)
222#define flash_EBIU_AMBCTL0_WAT B0WAT_11
223#endif
224#if (flash_EBIU_AMBCTL_WAT == 10)
225#define flash_EBIU_AMBCTL0_WAT B0WAT_10
226#endif
227#if (flash_EBIU_AMBCTL_WAT == 9)
228#define flash_EBIU_AMBCTL0_WAT B0WAT_9
229#endif
230#if (flash_EBIU_AMBCTL_WAT == 8)
231#define flash_EBIU_AMBCTL0_WAT B0WAT_8
232#endif
233#if (flash_EBIU_AMBCTL_WAT == 7)
234#define flash_EBIU_AMBCTL0_WAT B0WAT_7
235#endif
236#if (flash_EBIU_AMBCTL_WAT == 6)
237#define flash_EBIU_AMBCTL0_WAT B0WAT_6
238#endif
239#if (flash_EBIU_AMBCTL_WAT == 5)
240#define flash_EBIU_AMBCTL0_WAT B0WAT_5
241#endif
242#if (flash_EBIU_AMBCTL_WAT == 4)
243#define flash_EBIU_AMBCTL0_WAT B0WAT_4
244#endif
245#if (flash_EBIU_AMBCTL_WAT == 3)
246#define flash_EBIU_AMBCTL0_WAT B0WAT_3
247#endif
248#if (flash_EBIU_AMBCTL_WAT == 2)
249#define flash_EBIU_AMBCTL0_WAT B0WAT_2
250#endif
251#if (flash_EBIU_AMBCTL_WAT == 1)
252#define flash_EBIU_AMBCTL0_WAT B0WAT_1
253#endif
254
255#if (flash_EBIU_AMBCTL_RAT > 14)
256#define flash_EBIU_AMBCTL0_RAT B0RAT_15
257#endif
258#if (flash_EBIU_AMBCTL_RAT == 14)
259#define flash_EBIU_AMBCTL0_RAT B0RAT_14
260#endif
261#if (flash_EBIU_AMBCTL_RAT == 13)
262#define flash_EBIU_AMBCTL0_RAT B0RAT_13
263#endif
264#if (flash_EBIU_AMBCTL_RAT == 12)
265#define flash_EBIU_AMBCTL0_RAT B0RAT_12
266#endif
267#if (flash_EBIU_AMBCTL_RAT == 11)
268#define flash_EBIU_AMBCTL0_RAT B0RAT_11
269#endif
270#if (flash_EBIU_AMBCTL_RAT == 10)
271#define flash_EBIU_AMBCTL0_RAT B0RAT_10
272#endif
273#if (flash_EBIU_AMBCTL_RAT == 9)
274#define flash_EBIU_AMBCTL0_RAT B0RAT_9
275#endif
276#if (flash_EBIU_AMBCTL_RAT == 8)
277#define flash_EBIU_AMBCTL0_RAT B0RAT_8
278#endif
279#if (flash_EBIU_AMBCTL_RAT == 7)
280#define flash_EBIU_AMBCTL0_RAT B0RAT_7
281#endif
282#if (flash_EBIU_AMBCTL_RAT == 6)
283#define flash_EBIU_AMBCTL0_RAT B0RAT_6
284#endif
285#if (flash_EBIU_AMBCTL_RAT == 5)
286#define flash_EBIU_AMBCTL0_RAT B0RAT_5
287#endif
288#if (flash_EBIU_AMBCTL_RAT == 4)
289#define flash_EBIU_AMBCTL0_RAT B0RAT_4
290#endif
291#if (flash_EBIU_AMBCTL_RAT == 3)
292#define flash_EBIU_AMBCTL0_RAT B0RAT_3
293#endif
294#if (flash_EBIU_AMBCTL_RAT == 2)
295#define flash_EBIU_AMBCTL0_RAT B0RAT_2
296#endif
297#if (flash_EBIU_AMBCTL_RAT == 1)
298#define flash_EBIU_AMBCTL0_RAT B0RAT_1
299#endif
300
301#define flash_EBIU_AMBCTL0 \
302 (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \
303 flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN)
diff --git a/include/asm-blackfin/mach-bf537/mem_map.h b/include/asm-blackfin/mach-bf537/mem_map.h
deleted file mode 100644
index 5c6726d6f3b1..000000000000
--- a/include/asm-blackfin/mach-bf537/mem_map.h
+++ /dev/null
@@ -1,174 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf537/mem_map.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * Memory MAP Common header file for blackfin BF537/6/4 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_537_H_
32#define _MEM_MAP_537_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#define BOOT_ROM_LENGTH 0x800
51
52/* Level 1 Memory */
53
54/* Memory Map for ADSP-BF537 processors */
55
56#ifdef CONFIG_BFIN_ICACHE
57#define BFIN_ICACHESIZE (16*1024)
58#else
59#define BFIN_ICACHESIZE (0*1024)
60#endif
61
62
63#ifdef CONFIG_BF537
64#define L1_CODE_START 0xFFA00000
65#define L1_DATA_A_START 0xFF800000
66#define L1_DATA_B_START 0xFF900000
67
68#define L1_CODE_LENGTH 0xC000
69
70#ifdef CONFIG_BFIN_DCACHE
71
72#ifdef CONFIG_BFIN_DCACHE_BANKA
73#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
74#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
75#define L1_DATA_B_LENGTH 0x8000
76#define BFIN_DCACHESIZE (16*1024)
77#define BFIN_DSUPBANKS 1
78#else
79#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
80#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
81#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
82#define BFIN_DCACHESIZE (32*1024)
83#define BFIN_DSUPBANKS 2
84#endif
85
86#else
87#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
88#define L1_DATA_A_LENGTH 0x8000
89#define L1_DATA_B_LENGTH 0x8000
90#define BFIN_DCACHESIZE (0*1024)
91#define BFIN_DSUPBANKS 0
92#endif /*CONFIG_BFIN_DCACHE*/
93
94#endif /*CONFIG_BF537*/
95
96/* Memory Map for ADSP-BF536 processors */
97
98#ifdef CONFIG_BF536
99#define L1_CODE_START 0xFFA00000
100#define L1_DATA_A_START 0xFF804000
101#define L1_DATA_B_START 0xFF904000
102
103#define L1_CODE_LENGTH 0xC000
104
105
106#ifdef CONFIG_BFIN_DCACHE
107
108#ifdef CONFIG_BFIN_DCACHE_BANKA
109#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
110#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
111#define L1_DATA_B_LENGTH 0x4000
112#define BFIN_DCACHESIZE (16*1024)
113#define BFIN_DSUPBANKS 1
114
115#else
116#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
117#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
118#define L1_DATA_B_LENGTH (0x4000 - 0x4000)
119#define BFIN_DCACHESIZE (32*1024)
120#define BFIN_DSUPBANKS 2
121#endif
122
123#else
124#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
125#define L1_DATA_A_LENGTH 0x4000
126#define L1_DATA_B_LENGTH 0x4000
127#define BFIN_DCACHESIZE (0*1024)
128#define BFIN_DSUPBANKS 0
129#endif /*CONFIG_BFIN_DCACHE*/
130
131#endif
132
133/* Memory Map for ADSP-BF534 processors */
134
135#ifdef CONFIG_BF534
136#define L1_CODE_START 0xFFA00000
137#define L1_DATA_A_START 0xFF800000
138#define L1_DATA_B_START 0xFF900000
139
140#define L1_CODE_LENGTH 0xC000
141
142#ifdef CONFIG_BFIN_DCACHE
143
144#ifdef CONFIG_BFIN_DCACHE_BANKA
145#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
146#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
147#define L1_DATA_B_LENGTH 0x8000
148#define BFIN_DCACHESIZE (16*1024)
149#define BFIN_DSUPBANKS 1
150
151#else
152#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
153#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
154#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
155#define BFIN_DCACHESIZE (32*1024)
156#define BFIN_DSUPBANKS 2
157#endif
158
159#else
160#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
161#define L1_DATA_A_LENGTH 0x8000
162#define L1_DATA_B_LENGTH 0x8000
163#define BFIN_DCACHESIZE (0*1024)
164#define BFIN_DSUPBANKS 0
165#endif /*CONFIG_BFIN_DCACHE*/
166
167#endif
168
169/* Scratch Pad Memory */
170
171#define L1_SCRATCH_START 0xFFB00000
172#define L1_SCRATCH_LENGTH 0x1000
173
174#endif /* _MEM_MAP_537_H_ */
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h
deleted file mode 100644
index 78fee6e0f237..000000000000
--- a/include/asm-blackfin/mach-bf537/portmux.h
+++ /dev/null
@@ -1,144 +0,0 @@
1#ifndef _MACH_PORTMUX_H_
2#define _MACH_PORTMUX_H_
3
4#define MAX_RESOURCES (MAX_BLACKFIN_GPIOS + GPIO_BANKSIZE) /* We additionally handle PORTJ */
5
6#define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0))
7#define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0))
8#define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0))
9#define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0))
10#define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0))
11#define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0))
12#define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0))
13#define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0))
14#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0))
15#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0))
16#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0))
17#define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0))
18#define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0))
19#define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0))
20#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0))
21#define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0))
22#define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1))
23#define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1))
24#define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1))
25#define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1))
26#define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1))
27#define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1))
28#define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1))
29#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1))
30#define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1))
31#define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1))
32#define P_TACLK0 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1))
33#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1))
34
35#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0))
36#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))
37#define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(0))
38#define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0))
39#define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0))
40#define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0))
41#define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0))
42#define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0))
43#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0))
44#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0))
45#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0))
46#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0))
47#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0))
48#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0))
49#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0))
50#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0))
51#define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(1))
52#define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(1))
53#define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(1))
54#define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1))
55#define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1))
56#define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1))
57#define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1))
58#define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1))
59
60#define P_MII0_ETxD0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0))
61#define P_MII0_ETxD1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0))
62#define P_MII0_ETxD2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0))
63#define P_MII0_ETxD3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0))
64#define P_MII0_ETxEN (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0))
65#define P_MII0_TxCLK (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0))
66#define P_MII0_PHYINT (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0))
67#define P_MII0_COL (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0))
68#define P_MII0_ERxD0 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0))
69#define P_MII0_ERxD1 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0))
70#define P_MII0_ERxD2 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0))
71#define P_MII0_ERxD3 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0))
72#define P_MII0_ERxDV (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0))
73#define P_MII0_ERxCLK (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0))
74#define P_MII0_ERxER (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(0))
75#define P_MII0_CRS (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(0))
76#define P_RMII0_REF_CLK (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1))
77#define P_RMII0_MDINT (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1))
78#define P_RMII0_CRS_DV (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(1))
79
80#define PORT_PJ0 (GPIO_PH15 + 1)
81#define PORT_PJ1 (GPIO_PH15 + 2)
82#define PORT_PJ2 (GPIO_PH15 + 3)
83#define PORT_PJ3 (GPIO_PH15 + 4)
84#define PORT_PJ4 (GPIO_PH15 + 5)
85#define PORT_PJ5 (GPIO_PH15 + 6)
86#define PORT_PJ6 (GPIO_PH15 + 7)
87#define PORT_PJ7 (GPIO_PH15 + 8)
88#define PORT_PJ8 (GPIO_PH15 + 9)
89#define PORT_PJ9 (GPIO_PH15 + 10)
90#define PORT_PJ10 (GPIO_PH15 + 11)
91#define PORT_PJ11 (GPIO_PH15 + 12)
92
93#define P_MDC (P_DEFINED | P_IDENT(PORT_PJ0) | P_FUNCT(0))
94#define P_MDIO (P_DEFINED | P_IDENT(PORT_PJ1) | P_FUNCT(0))
95#define P_TWI0_SCL (P_DEFINED | P_IDENT(PORT_PJ2) | P_FUNCT(0))
96#define P_TWI0_SDA (P_DEFINED | P_IDENT(PORT_PJ3) | P_FUNCT(0))
97#define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(0))
98#define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(0))
99#define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(PORT_PJ6) | P_FUNCT(0))
100#define P_SPORT0_RFS (P_DEFINED | P_IDENT(PORT_PJ7) | P_FUNCT(0))
101#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0))
102#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0))
103#define P_SPORT0_TFS (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0))
104#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(0))
105#define P_CAN0_RX (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1))
106#define P_CAN0_TX (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1))
107#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1))
108#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
109#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2))
110
111#define P_MII0 {\
112 P_MII0_ETxD0, \
113 P_MII0_ETxD1, \
114 P_MII0_ETxD2, \
115 P_MII0_ETxD3, \
116 P_MII0_ETxEN, \
117 P_MII0_TxCLK, \
118 P_MII0_PHYINT, \
119 P_MII0_COL, \
120 P_MII0_ERxD0, \
121 P_MII0_ERxD1, \
122 P_MII0_ERxD2, \
123 P_MII0_ERxD3, \
124 P_MII0_ERxDV, \
125 P_MII0_ERxCLK, \
126 P_MII0_ERxER, \
127 P_MII0_CRS, \
128 P_MDC, \
129 P_MDIO, 0}
130
131
132#define P_RMII0 {\
133 P_MII0_ETxD0, \
134 P_MII0_ETxD1, \
135 P_MII0_ETxEN, \
136 P_MII0_ERxD0, \
137 P_MII0_ERxD1, \
138 P_MII0_ERxER, \
139 P_RMII0_REF_CLK, \
140 P_RMII0_MDINT, \
141 P_RMII0_CRS_DV, \
142 P_MDC, \
143 P_MDIO, 0}
144#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h
deleted file mode 100644
index 3ad59655881a..000000000000
--- a/include/asm-blackfin/mach-bf548/anomaly.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 *
5 * Copyright (C) 2004-2007 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8
9/* This file shoule be up to date with:
10 * - Revision E, 11/28/2007; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List
11 */
12
13#ifndef _MACH_ANOMALY_H_
14#define _MACH_ANOMALY_H_
15
16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */
17#define ANOMALY_05000074 (1)
18/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
19#define ANOMALY_05000119 (1)
20/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
21#define ANOMALY_05000122 (1)
22/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
23#define ANOMALY_05000245 (1)
24/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
25#define ANOMALY_05000265 (1)
26/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
27#define ANOMALY_05000272 (1)
28/* False Hardware Error Exception when ISR context is not restored */
29#define ANOMALY_05000281 (__SILICON_REVISION__ < 1)
30/* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */
31#define ANOMALY_05000304 (__SILICON_REVISION__ < 1)
32/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
33#define ANOMALY_05000310 (1)
34/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
35#define ANOMALY_05000312 (__SILICON_REVISION__ < 1)
36/* TWI Slave Boot Mode Is Not Functional */
37#define ANOMALY_05000324 (__SILICON_REVISION__ < 1)
38/* External FIFO Boot Mode Is Not Functional */
39#define ANOMALY_05000325 (__SILICON_REVISION__ < 1)
40/* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */
41#define ANOMALY_05000327 (__SILICON_REVISION__ < 1)
42/* Incorrect Access of OTP_STATUS During otp_write() Function */
43#define ANOMALY_05000328 (__SILICON_REVISION__ < 1)
44/* Synchronous Burst Flash Boot Mode Is Not Functional */
45#define ANOMALY_05000329 (__SILICON_REVISION__ < 1)
46/* Host DMA Boot Mode Is Not Functional */
47#define ANOMALY_05000330 (__SILICON_REVISION__ < 1)
48/* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */
49#define ANOMALY_05000334 (__SILICON_REVISION__ < 1)
50/* Inadequate Rotary Debounce Logic Duration */
51#define ANOMALY_05000335 (__SILICON_REVISION__ < 1)
52/* Phantom Interrupt Occurs After First Configuration of Host DMA Port */
53#define ANOMALY_05000336 (__SILICON_REVISION__ < 1)
54/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
55#define ANOMALY_05000337 (__SILICON_REVISION__ < 1)
56/* Slave-Mode SPI0 MISO Failure With CPHA = 0 */
57#define ANOMALY_05000338 (__SILICON_REVISION__ < 1)
58/* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */
59#define ANOMALY_05000340 (__SILICON_REVISION__ < 1)
60/* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */
61#define ANOMALY_05000344 (__SILICON_REVISION__ < 1)
62/* USB Calibration Value Is Not Intialized */
63#define ANOMALY_05000346 (__SILICON_REVISION__ < 1)
64/* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */
65#define ANOMALY_05000347 (__SILICON_REVISION__ < 1)
66/* Data Lost when Core Reads SDH Data FIFO */
67#define ANOMALY_05000349 (__SILICON_REVISION__ < 1)
68/* PLL Status Register Is Inaccurate */
69#define ANOMALY_05000351 (__SILICON_REVISION__ < 1)
70/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
71#define ANOMALY_05000357 (1)
72/* External Memory Read Access Hangs Core With PLL Bypass */
73#define ANOMALY_05000360 (1)
74/* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */
75#define ANOMALY_05000365 (1)
76/* Addressing Conflict between Boot ROM and Asynchronous Memory */
77#define ANOMALY_05000369 (1)
78/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
79#define ANOMALY_05000371 (1)
80/* Mobile DDR Operation Not Functional */
81#define ANOMALY_05000377 (1)
82/* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */
83#define ANOMALY_05000378 (1)
84
85/* Anomalies that don't exist on this proc */
86#define ANOMALY_05000125 (0)
87#define ANOMALY_05000158 (0)
88#define ANOMALY_05000183 (0)
89#define ANOMALY_05000198 (0)
90#define ANOMALY_05000230 (0)
91#define ANOMALY_05000244 (0)
92#define ANOMALY_05000261 (0)
93#define ANOMALY_05000263 (0)
94#define ANOMALY_05000266 (0)
95#define ANOMALY_05000273 (0)
96#define ANOMALY_05000311 (0)
97#define ANOMALY_05000323 (0)
98#define ANOMALY_05000363 (0)
99
100#endif
diff --git a/include/asm-blackfin/mach-bf548/bf548.h b/include/asm-blackfin/mach-bf548/bf548.h
deleted file mode 100644
index e748588e8930..000000000000
--- a/include/asm-blackfin/mach-bf548/bf548.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/bf548.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: System MMR register and memory map for ADSP-BF548
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_BF548_H__
31#define __MACH_BF548_H__
32
33#define SUPPORTED_REVID 0
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
55#define BFIN_DSUBBANKS 4
56#define BFIN_DWAYS 2
57#define BFIN_DLINES 64
58#define BFIN_ISUBBANKS 4
59#define BFIN_IWAYS 4
60#define BFIN_ILINES 32
61
62#define WAY0_L 0x1
63#define WAY1_L 0x2
64#define WAY01_L 0x3
65#define WAY2_L 0x4
66#define WAY02_L 0x5
67#define WAY12_L 0x6
68#define WAY012_L 0x7
69
70#define WAY3_L 0x8
71#define WAY03_L 0x9
72#define WAY13_L 0xA
73#define WAY013_L 0xB
74
75#define WAY32_L 0xC
76#define WAY320_L 0xD
77#define WAY321_L 0xE
78#define WAYALL_L 0xF
79
80#define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
81
82/********************************* EBIU Settings ************************************/
83#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
84#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
85
86#ifdef CONFIG_C_AMBEN_ALL
87#define V_AMBEN AMBEN_ALL
88#endif
89#ifdef CONFIG_C_AMBEN
90#define V_AMBEN 0x0
91#endif
92#ifdef CONFIG_C_AMBEN_B0
93#define V_AMBEN AMBEN_B0
94#endif
95#ifdef CONFIG_C_AMBEN_B0_B1
96#define V_AMBEN AMBEN_B0_B1
97#endif
98#ifdef CONFIG_C_AMBEN_B0_B1_B2
99#define V_AMBEN AMBEN_B0_B1_B2
100#endif
101#ifdef CONFIG_C_AMCKEN
102#define V_AMCKEN AMCKEN
103#else
104#define V_AMCKEN 0x0
105#endif
106
107#define AMGCTLVAL (V_AMBEN | V_AMCKEN)
108
109#if defined(CONFIG_BF542)
110# define CPU "BF542"
111# define CPUID 0x027c8000
112#elif defined(CONFIG_BF544)
113# define CPU "BF544"
114# define CPUID 0x027c8000
115#elif defined(CONFIG_BF547)
116# define CPU "BF547"
117#elif defined(CONFIG_BF548)
118# define CPU "BF548"
119# define CPUID 0x027c6000
120#elif defined(CONFIG_BF549)
121# define CPU "BF549"
122#else
123# define CPU "UNKNOWN"
124# define CPUID 0x0
125#endif
126
127#endif /* __MACH_BF48_H__ */
diff --git a/include/asm-blackfin/mach-bf548/bf54x-lq043.h b/include/asm-blackfin/mach-bf548/bf54x-lq043.h
deleted file mode 100644
index 9c7ca62a45eb..000000000000
--- a/include/asm-blackfin/mach-bf548/bf54x-lq043.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef BF54X_LQ043_H
2#define BF54X_LQ043_H
3
4struct bfin_bf54xfb_val {
5 unsigned int defval;
6 unsigned int min;
7 unsigned int max;
8};
9
10struct bfin_bf54xfb_mach_info {
11 unsigned char fixed_syncs; /* do not update sync/border */
12
13 /* LCD types */
14 int type;
15
16 /* Screen size */
17 int width;
18 int height;
19
20 /* Screen info */
21 struct bfin_bf54xfb_val xres;
22 struct bfin_bf54xfb_val yres;
23 struct bfin_bf54xfb_val bpp;
24
25 /* GPIOs */
26 unsigned short disp;
27
28};
29
30#endif /* BF54X_LQ043_H */
diff --git a/include/asm-blackfin/mach-bf548/bf54x_keys.h b/include/asm-blackfin/mach-bf548/bf54x_keys.h
deleted file mode 100644
index 1fb4ec77cc25..000000000000
--- a/include/asm-blackfin/mach-bf548/bf54x_keys.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef _BFIN_KPAD_H
2#define _BFIN_KPAD_H
3
4struct bfin_kpad_platform_data {
5 int rows;
6 int cols;
7 const unsigned int *keymap;
8 unsigned short keymapsize;
9 unsigned short repeat;
10 u32 debounce_time; /* in ns */
11 u32 coldrive_time; /* in ns */
12 u32 keyup_test_interval; /* in ms */
13};
14
15#define KEYVAL(col, row, val) (((1 << col) << 24) | ((1 << row) << 16) | (val))
16
17#endif
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
deleted file mode 100644
index 5e29446a8e03..000000000000
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ /dev/null
@@ -1,220 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * blackfin serial driver head file
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#include <linux/serial.h>
33#include <asm/dma.h>
34#include <asm/portmux.h>
35
36#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
37#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
38#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
39#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER_SET))
40#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
41#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
42#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
43#define UART_GET_MSR(uart) bfin_read16(((uart)->port.membase + OFFSET_MSR))
44#define UART_GET_MCR(uart) bfin_read16(((uart)->port.membase + OFFSET_MCR))
45
46#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
47#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
48#define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v)
49#define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
50#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
51#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
52#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
53#define UART_CLEAR_LSR(uart) bfin_write16(((uart)->port.membase + OFFSET_LSR), -1)
54#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
55#define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v)
56
57#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
58#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
59
60#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
61#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS))
62#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS))
63#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
64#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
65
66#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
67# define CONFIG_SERIAL_BFIN_CTSRTS
68
69# ifndef CONFIG_UART0_CTS_PIN
70# define CONFIG_UART0_CTS_PIN -1
71# endif
72
73# ifndef CONFIG_UART0_RTS_PIN
74# define CONFIG_UART0_RTS_PIN -1
75# endif
76
77# ifndef CONFIG_UART1_CTS_PIN
78# define CONFIG_UART1_CTS_PIN -1
79# endif
80
81# ifndef CONFIG_UART1_RTS_PIN
82# define CONFIG_UART1_RTS_PIN -1
83# endif
84#endif
85/*
86 * The pin configuration is different from schematic
87 */
88struct bfin_serial_port {
89 struct uart_port port;
90 unsigned int old_status;
91#ifdef CONFIG_SERIAL_BFIN_DMA
92 int tx_done;
93 int tx_count;
94 struct circ_buf rx_dma_buf;
95 struct timer_list rx_dma_timer;
96 int rx_dma_nrows;
97 unsigned int tx_dma_channel;
98 unsigned int rx_dma_channel;
99 struct work_struct tx_dma_workqueue;
100#endif
101#ifdef CONFIG_SERIAL_BFIN_CTSRTS
102 struct timer_list cts_timer;
103 int cts_pin;
104 int rts_pin;
105#endif
106};
107
108struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS];
109struct bfin_serial_res {
110 unsigned long uart_base_addr;
111 int uart_irq;
112#ifdef CONFIG_SERIAL_BFIN_DMA
113 unsigned int uart_tx_dma_channel;
114 unsigned int uart_rx_dma_channel;
115#endif
116#ifdef CONFIG_SERIAL_BFIN_CTSRTS
117 int uart_cts_pin;
118 int uart_rts_pin;
119#endif
120};
121
122struct bfin_serial_res bfin_serial_resource[] = {
123#ifdef CONFIG_SERIAL_BFIN_UART0
124 {
125 0xFFC00400,
126 IRQ_UART0_RX,
127#ifdef CONFIG_SERIAL_BFIN_DMA
128 CH_UART0_TX,
129 CH_UART0_RX,
130#endif
131#ifdef CONFIG_BFIN_UART0_CTSRTS
132 CONFIG_UART0_CTS_PIN,
133 CONFIG_UART0_RTS_PIN,
134#endif
135 },
136#endif
137#ifdef CONFIG_SERIAL_BFIN_UART1
138 {
139 0xFFC02000,
140 IRQ_UART1_RX,
141#ifdef CONFIG_SERIAL_BFIN_DMA
142 CH_UART1_TX,
143 CH_UART1_RX,
144#endif
145 },
146#endif
147#ifdef CONFIG_SERIAL_BFIN_UART2
148 {
149 0xFFC02100,
150 IRQ_UART2_RX,
151#ifdef CONFIG_SERIAL_BFIN_DMA
152 CH_UART2_TX,
153 CH_UART2_RX,
154#endif
155#ifdef CONFIG_BFIN_UART2_CTSRTS
156 CONFIG_UART2_CTS_PIN,
157 CONFIG_UART2_RTS_PIN,
158#endif
159 },
160#endif
161#ifdef CONFIG_SERIAL_BFIN_UART3
162 {
163 0xFFC03100,
164 IRQ_UART3_RX,
165#ifdef CONFIG_SERIAL_BFIN_DMA
166 CH_UART3_TX,
167 CH_UART3_RX,
168#endif
169 },
170#endif
171};
172
173int nr_ports = ARRAY_SIZE(bfin_serial_resource);
174
175#define DRIVER_NAME "bfin-uart"
176
177static void bfin_serial_hw_init(struct bfin_serial_port *uart)
178{
179#ifdef CONFIG_SERIAL_BFIN_UART0
180 peripheral_request(P_UART0_TX, DRIVER_NAME);
181 peripheral_request(P_UART0_RX, DRIVER_NAME);
182#endif
183
184#ifdef CONFIG_SERIAL_BFIN_UART1
185 peripheral_request(P_UART1_TX, DRIVER_NAME);
186 peripheral_request(P_UART1_RX, DRIVER_NAME);
187
188#ifdef CONFIG_BFIN_UART1_CTSRTS
189 peripheral_request(P_UART1_RTS, DRIVER_NAME);
190 peripheral_request(P_UART1_CTS, DRIVER_NAME);
191#endif
192#endif
193
194#ifdef CONFIG_SERIAL_BFIN_UART2
195 peripheral_request(P_UART2_TX, DRIVER_NAME);
196 peripheral_request(P_UART2_RX, DRIVER_NAME);
197#endif
198
199#ifdef CONFIG_SERIAL_BFIN_UART3
200 peripheral_request(P_UART3_TX, DRIVER_NAME);
201 peripheral_request(P_UART3_RX, DRIVER_NAME);
202
203#ifdef CONFIG_BFIN_UART3_CTSRTS
204 peripheral_request(P_UART3_RTS, DRIVER_NAME);
205 peripheral_request(P_UART3_CTS, DRIVER_NAME);
206#endif
207#endif
208 SSYNC();
209#ifdef CONFIG_SERIAL_BFIN_CTSRTS
210 if (uart->cts_pin >= 0) {
211 gpio_request(uart->cts_pin, DRIVER_NAME);
212 gpio_direction_input(uart->cts_pin);
213 }
214
215 if (uart->rts_pin >= 0) {
216 gpio_request(uart->rts_pin, DRIVER_NAME);
217 gpio_direction_output(uart->rts_pin, 0);
218 }
219#endif
220}
diff --git a/include/asm-blackfin/mach-bf548/bfin_sir.h b/include/asm-blackfin/mach-bf548/bfin_sir.h
deleted file mode 100644
index c41f9cf00268..000000000000
--- a/include/asm-blackfin/mach-bf548/bfin_sir.h
+++ /dev/null
@@ -1,166 +0,0 @@
1/*
2 * Blackfin Infra-red Driver
3 *
4 * Copyright 2006-2008 Analog Devices Inc.
5 *
6 * Enter bugs at http://blackfin.uclinux.org/
7 *
8 * Licensed under the GPL-2 or later.
9 *
10 */
11
12#include <linux/serial.h>
13#include <asm/dma.h>
14#include <asm/portmux.h>
15
16#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR)
17#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL)
18#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER_SET)
19#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH)
20#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR)
21#define SIR_UART_GET_LSR(port) bfin_read16((port)->membase + OFFSET_LSR)
22#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
23
24#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
25#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
26#define SIR_UART_SET_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER_SET), v)
27#define SIR_UART_CLEAR_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER_CLEAR), v)
28#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
29#define SIR_UART_PUT_LSR(port, v) bfin_write16(((port)->membase + OFFSET_LSR), v)
30#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
31#define SIR_UART_CLEAR_LSR(port) bfin_write16(((port)->membase + OFFSET_LSR), -1)
32#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
33
34#ifdef CONFIG_SIR_BFIN_DMA
35struct dma_rx_buf {
36 char *buf;
37 int head;
38 int tail;
39 };
40#endif /* CONFIG_SIR_BFIN_DMA */
41
42struct bfin_sir_port {
43 unsigned char __iomem *membase;
44 unsigned int irq;
45 unsigned int lsr;
46 unsigned long clk;
47 struct net_device *dev;
48#ifdef CONFIG_SIR_BFIN_DMA
49 int tx_done;
50 struct dma_rx_buf rx_dma_buf;
51 struct timer_list rx_dma_timer;
52 int rx_dma_nrows;
53#endif /* CONFIG_SIR_BFIN_DMA */
54 unsigned int tx_dma_channel;
55 unsigned int rx_dma_channel;
56};
57
58struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS];
59
60struct bfin_sir_port_res {
61 unsigned long base_addr;
62 int irq;
63 unsigned int rx_dma_channel;
64 unsigned int tx_dma_channel;
65};
66
67struct bfin_sir_port_res bfin_sir_port_resource[] = {
68#ifdef CONFIG_BFIN_SIR0
69 {
70 0xFFC00400,
71 IRQ_UART0_RX,
72 CH_UART0_RX,
73 CH_UART0_TX,
74 },
75#endif
76#ifdef CONFIG_BFIN_SIR1
77 {
78 0xFFC02000,
79 IRQ_UART1_RX,
80 CH_UART1_RX,
81 CH_UART1_TX,
82 },
83#endif
84#ifdef CONFIG_BFIN_SIR2
85 {
86 0xFFC02100,
87 IRQ_UART2_RX,
88 CH_UART2_RX,
89 CH_UART2_TX,
90 },
91#endif
92#ifdef CONFIG_BFIN_SIR3
93 {
94 0xFFC03100,
95 IRQ_UART3_RX,
96 CH_UART3_RX,
97 CH_UART3_TX,
98 },
99#endif
100};
101
102int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource);
103
104struct bfin_sir_self {
105 struct bfin_sir_port *sir_port;
106 spinlock_t lock;
107 unsigned int open;
108 int speed;
109 int newspeed;
110
111 struct sk_buff *txskb;
112 struct sk_buff *rxskb;
113 struct net_device_stats stats;
114 struct device *dev;
115 struct irlap_cb *irlap;
116 struct qos_info qos;
117
118 iobuff_t tx_buff;
119 iobuff_t rx_buff;
120
121 struct work_struct work;
122 int mtt;
123};
124
125#define DRIVER_NAME "bfin_sir"
126
127static int bfin_sir_hw_init(void)
128{
129 int ret = -ENODEV;
130#ifdef CONFIG_BFIN_SIR0
131 ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
132 if (ret)
133 return ret;
134 ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
135 if (ret)
136 return ret;
137#endif
138
139#ifdef CONFIG_BFIN_SIR1
140 ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
141 if (ret)
142 return ret;
143 ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
144 if (ret)
145 return ret;
146#endif
147
148#ifdef CONFIG_BFIN_SIR2
149 ret = peripheral_request(P_UART2_TX, DRIVER_NAME);
150 if (ret)
151 return ret;
152 ret = peripheral_request(P_UART2_RX, DRIVER_NAME);
153 if (ret)
154 return ret;
155#endif
156
157#ifdef CONFIG_BFIN_SIR3
158 ret = peripheral_request(P_UART3_TX, DRIVER_NAME);
159 if (ret)
160 return ret;
161 ret = peripheral_request(P_UART3_RX, DRIVER_NAME);
162 if (ret)
163 return ret;
164#endif
165 return ret;
166}
diff --git a/include/asm-blackfin/mach-bf548/blackfin.h b/include/asm-blackfin/mach-bf548/blackfin.h
deleted file mode 100644
index d6ee74ac0460..000000000000
--- a/include/asm-blackfin/mach-bf548/blackfin.h
+++ /dev/null
@@ -1,190 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/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 BF548_FAMILY
36
37#include "bf548.h"
38#include "mem_map.h"
39#include "anomaly.h"
40
41#ifdef CONFIG_BF542
42#include "defBF542.h"
43#endif
44
45#ifdef CONFIG_BF544
46#include "defBF544.h"
47#endif
48
49#ifdef CONFIG_BF547
50#include "defBF547.h"
51#endif
52
53#ifdef CONFIG_BF548
54#include "defBF548.h"
55#endif
56
57#ifdef CONFIG_BF549
58#include "defBF549.h"
59#endif
60
61#if !defined(__ASSEMBLY__)
62#ifdef CONFIG_BF542
63#include "cdefBF542.h"
64#endif
65#ifdef CONFIG_BF544
66#include "cdefBF544.h"
67#endif
68#ifdef CONFIG_BF547
69#include "cdefBF547.h"
70#endif
71#ifdef CONFIG_BF548
72#include "cdefBF548.h"
73#endif
74#ifdef CONFIG_BF549
75#include "cdefBF549.h"
76#endif
77
78/* UART 1*/
79#define bfin_read_UART_THR() bfin_read_UART1_THR()
80#define bfin_write_UART_THR(val) bfin_write_UART1_THR(val)
81#define bfin_read_UART_RBR() bfin_read_UART1_RBR()
82#define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val)
83#define bfin_read_UART_DLL() bfin_read_UART1_DLL()
84#define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val)
85#define bfin_read_UART_IER() bfin_read_UART1_IER()
86#define bfin_write_UART_IER(val) bfin_write_UART1_IER(val)
87#define bfin_read_UART_DLH() bfin_read_UART1_DLH()
88#define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val)
89#define bfin_read_UART_IIR() bfin_read_UART1_IIR()
90#define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val)
91#define bfin_read_UART_LCR() bfin_read_UART1_LCR()
92#define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val)
93#define bfin_read_UART_MCR() bfin_read_UART1_MCR()
94#define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val)
95#define bfin_read_UART_LSR() bfin_read_UART1_LSR()
96#define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val)
97#define bfin_read_UART_SCR() bfin_read_UART1_SCR()
98#define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val)
99#define bfin_read_UART_GCTL() bfin_read_UART1_GCTL()
100#define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val)
101
102#endif
103
104/* MAP used DEFINES from BF533 to BF54x - so we don't need to change
105 * them in the driver, kernel, etc. */
106
107/* UART_IIR Register */
108#define STATUS(x) ((x << 1) & 0x06)
109#define STATUS_P1 0x02
110#define STATUS_P0 0x01
111
112/* UART 0*/
113
114/* DMA Channnel */
115#define bfin_read_CH_UART_RX() bfin_read_CH_UART1_RX()
116#define bfin_write_CH_UART_RX(val) bfin_write_CH_UART1_RX(val)
117#define bfin_read_CH_UART_TX() bfin_read_CH_UART1_TX()
118#define bfin_write_CH_UART_TX(val) bfin_write_CH_UART1_TX(val)
119#define CH_UART_RX CH_UART1_RX
120#define CH_UART_TX CH_UART1_TX
121
122/* System Interrupt Controller */
123#define bfin_read_IRQ_UART_RX() bfin_read_IRQ_UART1_RX()
124#define bfin_write_IRQ_UART_RX(val) bfin_write_IRQ_UART1_RX(val)
125#define bfin_read_IRQ_UART_TX() bfin_read_IRQ_UART1_TX()
126#define bfin_write_IRQ_UART_TX(val) bfin_write_IRQ_UART1_TX(val)
127#define bfin_read_IRQ_UART_ERROR() bfin_read_IRQ_UART1_ERROR()
128#define bfin_write_IRQ_UART_ERROR(val) bfin_write_IRQ_UART1_ERROR(val)
129#define IRQ_UART_RX IRQ_UART1_RX
130#define IRQ_UART_TX IRQ_UART1_TX
131#define IRQ_UART_ERROR IRQ_UART1_ERROR
132
133/* MMR Registers*/
134#define bfin_read_UART_THR() bfin_read_UART1_THR()
135#define bfin_write_UART_THR(val) bfin_write_UART1_THR(val)
136#define bfin_read_UART_RBR() bfin_read_UART1_RBR()
137#define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val)
138#define bfin_read_UART_DLL() bfin_read_UART1_DLL()
139#define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val)
140#define bfin_read_UART_IER() bfin_read_UART1_IER()
141#define bfin_write_UART_IER(val) bfin_write_UART1_IER(val)
142#define bfin_read_UART_DLH() bfin_read_UART1_DLH()
143#define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val)
144#define bfin_read_UART_IIR() bfin_read_UART1_IIR()
145#define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val)
146#define bfin_read_UART_LCR() bfin_read_UART1_LCR()
147#define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val)
148#define bfin_read_UART_MCR() bfin_read_UART1_MCR()
149#define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val)
150#define bfin_read_UART_LSR() bfin_read_UART1_LSR()
151#define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val)
152#define bfin_read_UART_SCR() bfin_read_UART1_SCR()
153#define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val)
154#define bfin_read_UART_GCTL() bfin_read_UART1_GCTL()
155#define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val)
156
157#define BFIN_UART_THR UART1_THR
158#define BFIN_UART_RBR UART1_RBR
159#define BFIN_UART_DLL UART1_DLL
160#define BFIN_UART_IER UART1_IER
161#define BFIN_UART_DLH UART1_DLH
162#define BFIN_UART_IIR UART1_IIR
163#define BFIN_UART_LCR UART1_LCR
164#define BFIN_UART_MCR UART1_MCR
165#define BFIN_UART_LSR UART1_LSR
166#define BFIN_UART_SCR UART1_SCR
167#define BFIN_UART_GCTL UART1_GCTL
168
169#define BFIN_UART_NR_PORTS 4
170
171#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
172#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
173#define OFFSET_GCTL 0x08 /* Global Control Register */
174#define OFFSET_LCR 0x0C /* Line Control Register */
175#define OFFSET_MCR 0x10 /* Modem Control Register */
176#define OFFSET_LSR 0x14 /* Line Status Register */
177#define OFFSET_MSR 0x18 /* Modem Status Register */
178#define OFFSET_SCR 0x1C /* SCR Scratch Register */
179#define OFFSET_IER_SET 0x20 /* Set Interrupt Enable Register */
180#define OFFSET_IER_CLEAR 0x24 /* Clear Interrupt Enable Register */
181#define OFFSET_THR 0x28 /* Transmit Holding register */
182#define OFFSET_RBR 0x2C /* Receive Buffer register */
183
184/* PLL_DIV Masks */
185#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
186#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
187#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
188#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
189
190#endif
diff --git a/include/asm-blackfin/mach-bf548/cdefBF542.h b/include/asm-blackfin/mach-bf548/cdefBF542.h
deleted file mode 100644
index 60b9f77576f1..000000000000
--- a/include/asm-blackfin/mach-bf548/cdefBF542.h
+++ /dev/null
@@ -1,590 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/cdefBF542.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF542_H
32#define _CDEF_BF542_H
33
34/* include all Core registers and bit definitions */
35#include "defBF542.h"
36
37/* include core sbfin_read_()ecific register pointer definitions */
38#include <asm/mach-common/cdef_LPBlackfin.h>
39
40/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF542 */
41
42/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
43#include "cdefBF54x_base.h"
44
45/* The following are the #defines needed by ADSP-BF542 that are not in the common header */
46
47/* ATAPI Registers */
48
49#define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL)
50#define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val)
51#define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS)
52#define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val)
53#define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR)
54#define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val)
55#define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF)
56#define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val)
57#define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF)
58#define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val)
59#define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK)
60#define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val)
61#define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS)
62#define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val)
63#define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN)
64#define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val)
65#define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS)
66#define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val)
67#define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE)
68#define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val)
69#define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE)
70#define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val)
71#define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT)
72#define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val)
73#define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT)
74#define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val)
75#define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT)
76#define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val)
77#define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT)
78#define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val)
79#define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0)
80#define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val)
81#define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0)
82#define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val)
83#define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1)
84#define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val)
85#define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0)
86#define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val)
87#define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1)
88#define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val)
89#define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2)
90#define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val)
91#define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0)
92#define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val)
93#define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1)
94#define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val)
95#define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2)
96#define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val)
97#define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3)
98#define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val)
99
100/* SDH Registers */
101
102#define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL)
103#define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val)
104#define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL)
105#define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val)
106#define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT)
107#define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val)
108#define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND)
109#define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val)
110#define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD)
111#define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val)
112#define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0)
113#define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val)
114#define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1)
115#define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val)
116#define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2)
117#define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val)
118#define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3)
119#define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val)
120#define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER)
121#define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val)
122#define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH)
123#define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val)
124#define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL)
125#define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val)
126#define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT)
127#define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val)
128#define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS)
129#define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val)
130#define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR)
131#define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val)
132#define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0)
133#define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val)
134#define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1)
135#define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val)
136#define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT)
137#define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val)
138#define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO)
139#define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val)
140#define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS)
141#define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val)
142#define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK)
143#define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val)
144#define bfin_read_SDH_CFG() bfin_read16(SDH_CFG)
145#define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val)
146#define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN)
147#define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val)
148#define bfin_read_SDH_PID0() bfin_read16(SDH_PID0)
149#define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val)
150#define bfin_read_SDH_PID1() bfin_read16(SDH_PID1)
151#define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val)
152#define bfin_read_SDH_PID2() bfin_read16(SDH_PID2)
153#define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val)
154#define bfin_read_SDH_PID3() bfin_read16(SDH_PID3)
155#define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val)
156#define bfin_read_SDH_PID4() bfin_read16(SDH_PID4)
157#define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val)
158#define bfin_read_SDH_PID5() bfin_read16(SDH_PID5)
159#define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val)
160#define bfin_read_SDH_PID6() bfin_read16(SDH_PID6)
161#define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val)
162#define bfin_read_SDH_PID7() bfin_read16(SDH_PID7)
163#define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val)
164
165/* USB Control Registers */
166
167#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
168#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
169#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
170#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
171#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
172#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
173#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
174#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
175#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
176#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
177#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
178#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
179#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
180#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
181#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
182#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
183#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
184#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
185#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
186#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
187#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
188#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
189#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
190#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
191#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
192#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
193
194/* USB Packet Control Registers */
195
196#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
197#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
198#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
199#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
200#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
201#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
202#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
203#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
204#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
205#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
206#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
207#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
208#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
209#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
210#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
211#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
212#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
213#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
214#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
215#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
216#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
217#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
218#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
219#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
220#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
221#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
222
223/* USB Endbfin_read_()oint FIFO Registers */
224
225#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
226#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
227#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
228#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
229#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
230#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
231#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
232#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
233#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
234#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
235#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
236#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
237#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
238#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
239#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
240#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
241
242/* USB OTG Control Registers */
243
244#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
245#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
246#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
247#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
248#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
249#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
250
251/* USB Phy Control Registers */
252
253#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
254#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
255#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
256#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
257#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
258#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
259#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
260#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
261#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
262#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
263
264/* (APHY_CNTRL is for ADI usage only) */
265
266#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
267#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
268
269/* (APHY_CALIB is for ADI usage only) */
270
271#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
272#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
273#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
274#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
275
276/* (PHY_TEST is for ADI usage only) */
277
278#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
279#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
280#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
281#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
282#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
283#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
284
285/* USB Endbfin_read_()oint 0 Control Registers */
286
287#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
288#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
289#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
290#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
291#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
292#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
293#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
294#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
295#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
296#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
297#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
298#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
299#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
300#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
301#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
302#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
303#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
304#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
305
306/* USB Endbfin_read_()oint 1 Control Registers */
307
308#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
309#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
310#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
311#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
312#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
313#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
314#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
315#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
316#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
317#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
318#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
319#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
320#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
321#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
322#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
323#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
324#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
325#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
326#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
327#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
328
329/* USB Endbfin_read_()oint 2 Control Registers */
330
331#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
332#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
333#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
334#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
335#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
336#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
337#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
338#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
339#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
340#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
341#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
342#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
343#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
344#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
345#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
346#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
347#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
348#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
349#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
350#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
351
352/* USB Endbfin_read_()oint 3 Control Registers */
353
354#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
355#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
356#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
357#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
358#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
359#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
360#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
361#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
362#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
363#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
364#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
365#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
366#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
367#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
368#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
369#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
370#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
371#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
372#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
373#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
374
375/* USB Endbfin_read_()oint 4 Control Registers */
376
377#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
378#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
379#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
380#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
381#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
382#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
383#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
384#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
385#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
386#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
387#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
388#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
389#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
390#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
391#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
392#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
393#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
394#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
395#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
396#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
397
398/* USB Endbfin_read_()oint 5 Control Registers */
399
400#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
401#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
402#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
403#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
404#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
405#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
406#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
407#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
408#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
409#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
410#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
411#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
412#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
413#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
414#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
415#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
416#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
417#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
418#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
419#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
420
421/* USB Endbfin_read_()oint 6 Control Registers */
422
423#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
424#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
425#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
426#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
427#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
428#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
429#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
430#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
431#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
432#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
433#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
434#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
435#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
436#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
437#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
438#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
439#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
440#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
441#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
442#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
443
444/* USB Endbfin_read_()oint 7 Control Registers */
445
446#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
447#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
448#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
449#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
450#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
451#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
452#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
453#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
454#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
455#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
456#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
457#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
458#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
459#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
460#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
461#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
462#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
463#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
464#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
465#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
466#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
467#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
468#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
469#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
470
471/* USB Channel 0 Config Registers */
472
473#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
474#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
475#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
476#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
477#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
478#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
479#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
480#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
481#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
482#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
483
484/* USB Channel 1 Config Registers */
485
486#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
487#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
488#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
489#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
490#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
491#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
492#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
493#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
494#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
495#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
496
497/* USB Channel 2 Config Registers */
498
499#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
500#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
501#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
502#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
503#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
504#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
505#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
506#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
507#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
508#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
509
510/* USB Channel 3 Config Registers */
511
512#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
513#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
514#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
515#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
516#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
517#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
518#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
519#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
520#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
521#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
522
523/* USB Channel 4 Config Registers */
524
525#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
526#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
527#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
528#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
529#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
530#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
531#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
532#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
533#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
534#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
535
536/* USB Channel 5 Config Registers */
537
538#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
539#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
540#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
541#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
542#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
543#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
544#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
545#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
546#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
547#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
548
549/* USB Channel 6 Config Registers */
550
551#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
552#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
553#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
554#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
555#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
556#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
557#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
558#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
559#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
560#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
561
562/* USB Channel 7 Config Registers */
563
564#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
565#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
566#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
567#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
568#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
569#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
570#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
571#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
572#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
573#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
574
575/* Keybfin_read_()ad Registers */
576
577#define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL)
578#define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val)
579#define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE)
580#define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val)
581#define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL)
582#define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val)
583#define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL)
584#define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val)
585#define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT)
586#define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val)
587#define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL)
588#define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val)
589
590#endif /* _CDEF_BF542_H */
diff --git a/include/asm-blackfin/mach-bf548/cdefBF544.h b/include/asm-blackfin/mach-bf548/cdefBF544.h
deleted file mode 100644
index ea9b4ab496f3..000000000000
--- a/include/asm-blackfin/mach-bf548/cdefBF544.h
+++ /dev/null
@@ -1,945 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/cdefBF544.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF544_H
32#define _CDEF_BF544_H
33
34/* include all Core registers and bit definitions */
35#include "defBF544.h"
36
37/* include core sbfin_read_()ecific register pointer definitions */
38#include <asm/mach-common/cdef_LPBlackfin.h>
39
40/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF544 */
41
42/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
43#include "cdefBF54x_base.h"
44
45/* The following are the #defines needed by ADSP-BF544 that are not in the common header */
46
47/* Timer Registers */
48
49#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
50#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG, val)
51#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
52#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER, val)
53#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
54#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD, val)
55#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
56#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH, val)
57#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
58#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG, val)
59#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
60#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER, val)
61#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
62#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD, val)
63#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
64#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH, val)
65#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
66#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG, val)
67#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
68#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER, val)
69#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
70#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD, val)
71#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
72#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH, val)
73
74/* Timer Groubfin_read_() of 3 */
75
76#define bfin_read_TIMER_ENABLE1() bfin_read16(TIMER_ENABLE1)
77#define bfin_write_TIMER_ENABLE1(val) bfin_write16(TIMER_ENABLE1, val)
78#define bfin_read_TIMER_DISABLE1() bfin_read16(TIMER_DISABLE1)
79#define bfin_write_TIMER_DISABLE1(val) bfin_write16(TIMER_DISABLE1, val)
80#define bfin_read_TIMER_STATUS1() bfin_read32(TIMER_STATUS1)
81#define bfin_write_TIMER_STATUS1(val) bfin_write32(TIMER_STATUS1, val)
82
83/* EPPI0 Registers */
84
85#define bfin_read_EPPI0_STATUS() bfin_read16(EPPI0_STATUS)
86#define bfin_write_EPPI0_STATUS(val) bfin_write16(EPPI0_STATUS, val)
87#define bfin_read_EPPI0_HCOUNT() bfin_read16(EPPI0_HCOUNT)
88#define bfin_write_EPPI0_HCOUNT(val) bfin_write16(EPPI0_HCOUNT, val)
89#define bfin_read_EPPI0_HDELAY() bfin_read16(EPPI0_HDELAY)
90#define bfin_write_EPPI0_HDELAY(val) bfin_write16(EPPI0_HDELAY, val)
91#define bfin_read_EPPI0_VCOUNT() bfin_read16(EPPI0_VCOUNT)
92#define bfin_write_EPPI0_VCOUNT(val) bfin_write16(EPPI0_VCOUNT, val)
93#define bfin_read_EPPI0_VDELAY() bfin_read16(EPPI0_VDELAY)
94#define bfin_write_EPPI0_VDELAY(val) bfin_write16(EPPI0_VDELAY, val)
95#define bfin_read_EPPI0_FRAME() bfin_read16(EPPI0_FRAME)
96#define bfin_write_EPPI0_FRAME(val) bfin_write16(EPPI0_FRAME, val)
97#define bfin_read_EPPI0_LINE() bfin_read16(EPPI0_LINE)
98#define bfin_write_EPPI0_LINE(val) bfin_write16(EPPI0_LINE, val)
99#define bfin_read_EPPI0_CLKDIV() bfin_read16(EPPI0_CLKDIV)
100#define bfin_write_EPPI0_CLKDIV(val) bfin_write16(EPPI0_CLKDIV, val)
101#define bfin_read_EPPI0_CONTROL() bfin_read32(EPPI0_CONTROL)
102#define bfin_write_EPPI0_CONTROL(val) bfin_write32(EPPI0_CONTROL, val)
103#define bfin_read_EPPI0_FS1W_HBL() bfin_read32(EPPI0_FS1W_HBL)
104#define bfin_write_EPPI0_FS1W_HBL(val) bfin_write32(EPPI0_FS1W_HBL, val)
105#define bfin_read_EPPI0_FS1P_AVPL() bfin_read32(EPPI0_FS1P_AVPL)
106#define bfin_write_EPPI0_FS1P_AVPL(val) bfin_write32(EPPI0_FS1P_AVPL, val)
107#define bfin_read_EPPI0_FS2W_LVB() bfin_read32(EPPI0_FS2W_LVB)
108#define bfin_write_EPPI0_FS2W_LVB(val) bfin_write32(EPPI0_FS2W_LVB, val)
109#define bfin_read_EPPI0_FS2P_LAVF() bfin_read32(EPPI0_FS2P_LAVF)
110#define bfin_write_EPPI0_FS2P_LAVF(val) bfin_write32(EPPI0_FS2P_LAVF, val)
111#define bfin_read_EPPI0_CLIP() bfin_read32(EPPI0_CLIP)
112#define bfin_write_EPPI0_CLIP(val) bfin_write32(EPPI0_CLIP, val)
113
114/* Two Wire Interface Registers (TWI1) */
115
116/* CAN Controller 1 Config 1 Registers */
117
118#define bfin_read_CAN1_MC1() bfin_read16(CAN1_MC1)
119#define bfin_write_CAN1_MC1(val) bfin_write16(CAN1_MC1, val)
120#define bfin_read_CAN1_MD1() bfin_read16(CAN1_MD1)
121#define bfin_write_CAN1_MD1(val) bfin_write16(CAN1_MD1, val)
122#define bfin_read_CAN1_TRS1() bfin_read16(CAN1_TRS1)
123#define bfin_write_CAN1_TRS1(val) bfin_write16(CAN1_TRS1, val)
124#define bfin_read_CAN1_TRR1() bfin_read16(CAN1_TRR1)
125#define bfin_write_CAN1_TRR1(val) bfin_write16(CAN1_TRR1, val)
126#define bfin_read_CAN1_TA1() bfin_read16(CAN1_TA1)
127#define bfin_write_CAN1_TA1(val) bfin_write16(CAN1_TA1, val)
128#define bfin_read_CAN1_AA1() bfin_read16(CAN1_AA1)
129#define bfin_write_CAN1_AA1(val) bfin_write16(CAN1_AA1, val)
130#define bfin_read_CAN1_RMP1() bfin_read16(CAN1_RMP1)
131#define bfin_write_CAN1_RMP1(val) bfin_write16(CAN1_RMP1, val)
132#define bfin_read_CAN1_RML1() bfin_read16(CAN1_RML1)
133#define bfin_write_CAN1_RML1(val) bfin_write16(CAN1_RML1, val)
134#define bfin_read_CAN1_MBTIF1() bfin_read16(CAN1_MBTIF1)
135#define bfin_write_CAN1_MBTIF1(val) bfin_write16(CAN1_MBTIF1, val)
136#define bfin_read_CAN1_MBRIF1() bfin_read16(CAN1_MBRIF1)
137#define bfin_write_CAN1_MBRIF1(val) bfin_write16(CAN1_MBRIF1, val)
138#define bfin_read_CAN1_MBIM1() bfin_read16(CAN1_MBIM1)
139#define bfin_write_CAN1_MBIM1(val) bfin_write16(CAN1_MBIM1, val)
140#define bfin_read_CAN1_RFH1() bfin_read16(CAN1_RFH1)
141#define bfin_write_CAN1_RFH1(val) bfin_write16(CAN1_RFH1, val)
142#define bfin_read_CAN1_OPSS1() bfin_read16(CAN1_OPSS1)
143#define bfin_write_CAN1_OPSS1(val) bfin_write16(CAN1_OPSS1, val)
144
145/* CAN Controller 1 Config 2 Registers */
146
147#define bfin_read_CAN1_MC2() bfin_read16(CAN1_MC2)
148#define bfin_write_CAN1_MC2(val) bfin_write16(CAN1_MC2, val)
149#define bfin_read_CAN1_MD2() bfin_read16(CAN1_MD2)
150#define bfin_write_CAN1_MD2(val) bfin_write16(CAN1_MD2, val)
151#define bfin_read_CAN1_TRS2() bfin_read16(CAN1_TRS2)
152#define bfin_write_CAN1_TRS2(val) bfin_write16(CAN1_TRS2, val)
153#define bfin_read_CAN1_TRR2() bfin_read16(CAN1_TRR2)
154#define bfin_write_CAN1_TRR2(val) bfin_write16(CAN1_TRR2, val)
155#define bfin_read_CAN1_TA2() bfin_read16(CAN1_TA2)
156#define bfin_write_CAN1_TA2(val) bfin_write16(CAN1_TA2, val)
157#define bfin_read_CAN1_AA2() bfin_read16(CAN1_AA2)
158#define bfin_write_CAN1_AA2(val) bfin_write16(CAN1_AA2, val)
159#define bfin_read_CAN1_RMP2() bfin_read16(CAN1_RMP2)
160#define bfin_write_CAN1_RMP2(val) bfin_write16(CAN1_RMP2, val)
161#define bfin_read_CAN1_RML2() bfin_read16(CAN1_RML2)
162#define bfin_write_CAN1_RML2(val) bfin_write16(CAN1_RML2, val)
163#define bfin_read_CAN1_MBTIF2() bfin_read16(CAN1_MBTIF2)
164#define bfin_write_CAN1_MBTIF2(val) bfin_write16(CAN1_MBTIF2, val)
165#define bfin_read_CAN1_MBRIF2() bfin_read16(CAN1_MBRIF2)
166#define bfin_write_CAN1_MBRIF2(val) bfin_write16(CAN1_MBRIF2, val)
167#define bfin_read_CAN1_MBIM2() bfin_read16(CAN1_MBIM2)
168#define bfin_write_CAN1_MBIM2(val) bfin_write16(CAN1_MBIM2, val)
169#define bfin_read_CAN1_RFH2() bfin_read16(CAN1_RFH2)
170#define bfin_write_CAN1_RFH2(val) bfin_write16(CAN1_RFH2, val)
171#define bfin_read_CAN1_OPSS2() bfin_read16(CAN1_OPSS2)
172#define bfin_write_CAN1_OPSS2(val) bfin_write16(CAN1_OPSS2, val)
173
174/* CAN Controller 1 Clock/Interrubfin_read_()t/Counter Registers */
175
176#define bfin_read_CAN1_CLOCK() bfin_read16(CAN1_CLOCK)
177#define bfin_write_CAN1_CLOCK(val) bfin_write16(CAN1_CLOCK, val)
178#define bfin_read_CAN1_TIMING() bfin_read16(CAN1_TIMING)
179#define bfin_write_CAN1_TIMING(val) bfin_write16(CAN1_TIMING, val)
180#define bfin_read_CAN1_DEBUG() bfin_read16(CAN1_DEBUG)
181#define bfin_write_CAN1_DEBUG(val) bfin_write16(CAN1_DEBUG, val)
182#define bfin_read_CAN1_STATUS() bfin_read16(CAN1_STATUS)
183#define bfin_write_CAN1_STATUS(val) bfin_write16(CAN1_STATUS, val)
184#define bfin_read_CAN1_CEC() bfin_read16(CAN1_CEC)
185#define bfin_write_CAN1_CEC(val) bfin_write16(CAN1_CEC, val)
186#define bfin_read_CAN1_GIS() bfin_read16(CAN1_GIS)
187#define bfin_write_CAN1_GIS(val) bfin_write16(CAN1_GIS, val)
188#define bfin_read_CAN1_GIM() bfin_read16(CAN1_GIM)
189#define bfin_write_CAN1_GIM(val) bfin_write16(CAN1_GIM, val)
190#define bfin_read_CAN1_GIF() bfin_read16(CAN1_GIF)
191#define bfin_write_CAN1_GIF(val) bfin_write16(CAN1_GIF, val)
192#define bfin_read_CAN1_CONTROL() bfin_read16(CAN1_CONTROL)
193#define bfin_write_CAN1_CONTROL(val) bfin_write16(CAN1_CONTROL, val)
194#define bfin_read_CAN1_INTR() bfin_read16(CAN1_INTR)
195#define bfin_write_CAN1_INTR(val) bfin_write16(CAN1_INTR, val)
196#define bfin_read_CAN1_MBTD() bfin_read16(CAN1_MBTD)
197#define bfin_write_CAN1_MBTD(val) bfin_write16(CAN1_MBTD, val)
198#define bfin_read_CAN1_EWR() bfin_read16(CAN1_EWR)
199#define bfin_write_CAN1_EWR(val) bfin_write16(CAN1_EWR, val)
200#define bfin_read_CAN1_ESR() bfin_read16(CAN1_ESR)
201#define bfin_write_CAN1_ESR(val) bfin_write16(CAN1_ESR, val)
202#define bfin_read_CAN1_UCCNT() bfin_read16(CAN1_UCCNT)
203#define bfin_write_CAN1_UCCNT(val) bfin_write16(CAN1_UCCNT, val)
204#define bfin_read_CAN1_UCRC() bfin_read16(CAN1_UCRC)
205#define bfin_write_CAN1_UCRC(val) bfin_write16(CAN1_UCRC, val)
206#define bfin_read_CAN1_UCCNF() bfin_read16(CAN1_UCCNF)
207#define bfin_write_CAN1_UCCNF(val) bfin_write16(CAN1_UCCNF, val)
208
209/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
210
211#define bfin_read_CAN1_AM00L() bfin_read16(CAN1_AM00L)
212#define bfin_write_CAN1_AM00L(val) bfin_write16(CAN1_AM00L, val)
213#define bfin_read_CAN1_AM00H() bfin_read16(CAN1_AM00H)
214#define bfin_write_CAN1_AM00H(val) bfin_write16(CAN1_AM00H, val)
215#define bfin_read_CAN1_AM01L() bfin_read16(CAN1_AM01L)
216#define bfin_write_CAN1_AM01L(val) bfin_write16(CAN1_AM01L, val)
217#define bfin_read_CAN1_AM01H() bfin_read16(CAN1_AM01H)
218#define bfin_write_CAN1_AM01H(val) bfin_write16(CAN1_AM01H, val)
219#define bfin_read_CAN1_AM02L() bfin_read16(CAN1_AM02L)
220#define bfin_write_CAN1_AM02L(val) bfin_write16(CAN1_AM02L, val)
221#define bfin_read_CAN1_AM02H() bfin_read16(CAN1_AM02H)
222#define bfin_write_CAN1_AM02H(val) bfin_write16(CAN1_AM02H, val)
223#define bfin_read_CAN1_AM03L() bfin_read16(CAN1_AM03L)
224#define bfin_write_CAN1_AM03L(val) bfin_write16(CAN1_AM03L, val)
225#define bfin_read_CAN1_AM03H() bfin_read16(CAN1_AM03H)
226#define bfin_write_CAN1_AM03H(val) bfin_write16(CAN1_AM03H, val)
227#define bfin_read_CAN1_AM04L() bfin_read16(CAN1_AM04L)
228#define bfin_write_CAN1_AM04L(val) bfin_write16(CAN1_AM04L, val)
229#define bfin_read_CAN1_AM04H() bfin_read16(CAN1_AM04H)
230#define bfin_write_CAN1_AM04H(val) bfin_write16(CAN1_AM04H, val)
231#define bfin_read_CAN1_AM05L() bfin_read16(CAN1_AM05L)
232#define bfin_write_CAN1_AM05L(val) bfin_write16(CAN1_AM05L, val)
233#define bfin_read_CAN1_AM05H() bfin_read16(CAN1_AM05H)
234#define bfin_write_CAN1_AM05H(val) bfin_write16(CAN1_AM05H, val)
235#define bfin_read_CAN1_AM06L() bfin_read16(CAN1_AM06L)
236#define bfin_write_CAN1_AM06L(val) bfin_write16(CAN1_AM06L, val)
237#define bfin_read_CAN1_AM06H() bfin_read16(CAN1_AM06H)
238#define bfin_write_CAN1_AM06H(val) bfin_write16(CAN1_AM06H, val)
239#define bfin_read_CAN1_AM07L() bfin_read16(CAN1_AM07L)
240#define bfin_write_CAN1_AM07L(val) bfin_write16(CAN1_AM07L, val)
241#define bfin_read_CAN1_AM07H() bfin_read16(CAN1_AM07H)
242#define bfin_write_CAN1_AM07H(val) bfin_write16(CAN1_AM07H, val)
243#define bfin_read_CAN1_AM08L() bfin_read16(CAN1_AM08L)
244#define bfin_write_CAN1_AM08L(val) bfin_write16(CAN1_AM08L, val)
245#define bfin_read_CAN1_AM08H() bfin_read16(CAN1_AM08H)
246#define bfin_write_CAN1_AM08H(val) bfin_write16(CAN1_AM08H, val)
247#define bfin_read_CAN1_AM09L() bfin_read16(CAN1_AM09L)
248#define bfin_write_CAN1_AM09L(val) bfin_write16(CAN1_AM09L, val)
249#define bfin_read_CAN1_AM09H() bfin_read16(CAN1_AM09H)
250#define bfin_write_CAN1_AM09H(val) bfin_write16(CAN1_AM09H, val)
251#define bfin_read_CAN1_AM10L() bfin_read16(CAN1_AM10L)
252#define bfin_write_CAN1_AM10L(val) bfin_write16(CAN1_AM10L, val)
253#define bfin_read_CAN1_AM10H() bfin_read16(CAN1_AM10H)
254#define bfin_write_CAN1_AM10H(val) bfin_write16(CAN1_AM10H, val)
255#define bfin_read_CAN1_AM11L() bfin_read16(CAN1_AM11L)
256#define bfin_write_CAN1_AM11L(val) bfin_write16(CAN1_AM11L, val)
257#define bfin_read_CAN1_AM11H() bfin_read16(CAN1_AM11H)
258#define bfin_write_CAN1_AM11H(val) bfin_write16(CAN1_AM11H, val)
259#define bfin_read_CAN1_AM12L() bfin_read16(CAN1_AM12L)
260#define bfin_write_CAN1_AM12L(val) bfin_write16(CAN1_AM12L, val)
261#define bfin_read_CAN1_AM12H() bfin_read16(CAN1_AM12H)
262#define bfin_write_CAN1_AM12H(val) bfin_write16(CAN1_AM12H, val)
263#define bfin_read_CAN1_AM13L() bfin_read16(CAN1_AM13L)
264#define bfin_write_CAN1_AM13L(val) bfin_write16(CAN1_AM13L, val)
265#define bfin_read_CAN1_AM13H() bfin_read16(CAN1_AM13H)
266#define bfin_write_CAN1_AM13H(val) bfin_write16(CAN1_AM13H, val)
267#define bfin_read_CAN1_AM14L() bfin_read16(CAN1_AM14L)
268#define bfin_write_CAN1_AM14L(val) bfin_write16(CAN1_AM14L, val)
269#define bfin_read_CAN1_AM14H() bfin_read16(CAN1_AM14H)
270#define bfin_write_CAN1_AM14H(val) bfin_write16(CAN1_AM14H, val)
271#define bfin_read_CAN1_AM15L() bfin_read16(CAN1_AM15L)
272#define bfin_write_CAN1_AM15L(val) bfin_write16(CAN1_AM15L, val)
273#define bfin_read_CAN1_AM15H() bfin_read16(CAN1_AM15H)
274#define bfin_write_CAN1_AM15H(val) bfin_write16(CAN1_AM15H, val)
275
276/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
277
278#define bfin_read_CAN1_AM16L() bfin_read16(CAN1_AM16L)
279#define bfin_write_CAN1_AM16L(val) bfin_write16(CAN1_AM16L, val)
280#define bfin_read_CAN1_AM16H() bfin_read16(CAN1_AM16H)
281#define bfin_write_CAN1_AM16H(val) bfin_write16(CAN1_AM16H, val)
282#define bfin_read_CAN1_AM17L() bfin_read16(CAN1_AM17L)
283#define bfin_write_CAN1_AM17L(val) bfin_write16(CAN1_AM17L, val)
284#define bfin_read_CAN1_AM17H() bfin_read16(CAN1_AM17H)
285#define bfin_write_CAN1_AM17H(val) bfin_write16(CAN1_AM17H, val)
286#define bfin_read_CAN1_AM18L() bfin_read16(CAN1_AM18L)
287#define bfin_write_CAN1_AM18L(val) bfin_write16(CAN1_AM18L, val)
288#define bfin_read_CAN1_AM18H() bfin_read16(CAN1_AM18H)
289#define bfin_write_CAN1_AM18H(val) bfin_write16(CAN1_AM18H, val)
290#define bfin_read_CAN1_AM19L() bfin_read16(CAN1_AM19L)
291#define bfin_write_CAN1_AM19L(val) bfin_write16(CAN1_AM19L, val)
292#define bfin_read_CAN1_AM19H() bfin_read16(CAN1_AM19H)
293#define bfin_write_CAN1_AM19H(val) bfin_write16(CAN1_AM19H, val)
294#define bfin_read_CAN1_AM20L() bfin_read16(CAN1_AM20L)
295#define bfin_write_CAN1_AM20L(val) bfin_write16(CAN1_AM20L, val)
296#define bfin_read_CAN1_AM20H() bfin_read16(CAN1_AM20H)
297#define bfin_write_CAN1_AM20H(val) bfin_write16(CAN1_AM20H, val)
298#define bfin_read_CAN1_AM21L() bfin_read16(CAN1_AM21L)
299#define bfin_write_CAN1_AM21L(val) bfin_write16(CAN1_AM21L, val)
300#define bfin_read_CAN1_AM21H() bfin_read16(CAN1_AM21H)
301#define bfin_write_CAN1_AM21H(val) bfin_write16(CAN1_AM21H, val)
302#define bfin_read_CAN1_AM22L() bfin_read16(CAN1_AM22L)
303#define bfin_write_CAN1_AM22L(val) bfin_write16(CAN1_AM22L, val)
304#define bfin_read_CAN1_AM22H() bfin_read16(CAN1_AM22H)
305#define bfin_write_CAN1_AM22H(val) bfin_write16(CAN1_AM22H, val)
306#define bfin_read_CAN1_AM23L() bfin_read16(CAN1_AM23L)
307#define bfin_write_CAN1_AM23L(val) bfin_write16(CAN1_AM23L, val)
308#define bfin_read_CAN1_AM23H() bfin_read16(CAN1_AM23H)
309#define bfin_write_CAN1_AM23H(val) bfin_write16(CAN1_AM23H, val)
310#define bfin_read_CAN1_AM24L() bfin_read16(CAN1_AM24L)
311#define bfin_write_CAN1_AM24L(val) bfin_write16(CAN1_AM24L, val)
312#define bfin_read_CAN1_AM24H() bfin_read16(CAN1_AM24H)
313#define bfin_write_CAN1_AM24H(val) bfin_write16(CAN1_AM24H, val)
314#define bfin_read_CAN1_AM25L() bfin_read16(CAN1_AM25L)
315#define bfin_write_CAN1_AM25L(val) bfin_write16(CAN1_AM25L, val)
316#define bfin_read_CAN1_AM25H() bfin_read16(CAN1_AM25H)
317#define bfin_write_CAN1_AM25H(val) bfin_write16(CAN1_AM25H, val)
318#define bfin_read_CAN1_AM26L() bfin_read16(CAN1_AM26L)
319#define bfin_write_CAN1_AM26L(val) bfin_write16(CAN1_AM26L, val)
320#define bfin_read_CAN1_AM26H() bfin_read16(CAN1_AM26H)
321#define bfin_write_CAN1_AM26H(val) bfin_write16(CAN1_AM26H, val)
322#define bfin_read_CAN1_AM27L() bfin_read16(CAN1_AM27L)
323#define bfin_write_CAN1_AM27L(val) bfin_write16(CAN1_AM27L, val)
324#define bfin_read_CAN1_AM27H() bfin_read16(CAN1_AM27H)
325#define bfin_write_CAN1_AM27H(val) bfin_write16(CAN1_AM27H, val)
326#define bfin_read_CAN1_AM28L() bfin_read16(CAN1_AM28L)
327#define bfin_write_CAN1_AM28L(val) bfin_write16(CAN1_AM28L, val)
328#define bfin_read_CAN1_AM28H() bfin_read16(CAN1_AM28H)
329#define bfin_write_CAN1_AM28H(val) bfin_write16(CAN1_AM28H, val)
330#define bfin_read_CAN1_AM29L() bfin_read16(CAN1_AM29L)
331#define bfin_write_CAN1_AM29L(val) bfin_write16(CAN1_AM29L, val)
332#define bfin_read_CAN1_AM29H() bfin_read16(CAN1_AM29H)
333#define bfin_write_CAN1_AM29H(val) bfin_write16(CAN1_AM29H, val)
334#define bfin_read_CAN1_AM30L() bfin_read16(CAN1_AM30L)
335#define bfin_write_CAN1_AM30L(val) bfin_write16(CAN1_AM30L, val)
336#define bfin_read_CAN1_AM30H() bfin_read16(CAN1_AM30H)
337#define bfin_write_CAN1_AM30H(val) bfin_write16(CAN1_AM30H, val)
338#define bfin_read_CAN1_AM31L() bfin_read16(CAN1_AM31L)
339#define bfin_write_CAN1_AM31L(val) bfin_write16(CAN1_AM31L, val)
340#define bfin_read_CAN1_AM31H() bfin_read16(CAN1_AM31H)
341#define bfin_write_CAN1_AM31H(val) bfin_write16(CAN1_AM31H, val)
342
343/* CAN Controller 1 Mailbox Data Registers */
344
345#define bfin_read_CAN1_MB00_DATA0() bfin_read16(CAN1_MB00_DATA0)
346#define bfin_write_CAN1_MB00_DATA0(val) bfin_write16(CAN1_MB00_DATA0, val)
347#define bfin_read_CAN1_MB00_DATA1() bfin_read16(CAN1_MB00_DATA1)
348#define bfin_write_CAN1_MB00_DATA1(val) bfin_write16(CAN1_MB00_DATA1, val)
349#define bfin_read_CAN1_MB00_DATA2() bfin_read16(CAN1_MB00_DATA2)
350#define bfin_write_CAN1_MB00_DATA2(val) bfin_write16(CAN1_MB00_DATA2, val)
351#define bfin_read_CAN1_MB00_DATA3() bfin_read16(CAN1_MB00_DATA3)
352#define bfin_write_CAN1_MB00_DATA3(val) bfin_write16(CAN1_MB00_DATA3, val)
353#define bfin_read_CAN1_MB00_LENGTH() bfin_read16(CAN1_MB00_LENGTH)
354#define bfin_write_CAN1_MB00_LENGTH(val) bfin_write16(CAN1_MB00_LENGTH, val)
355#define bfin_read_CAN1_MB00_TIMESTAMP() bfin_read16(CAN1_MB00_TIMESTAMP)
356#define bfin_write_CAN1_MB00_TIMESTAMP(val) bfin_write16(CAN1_MB00_TIMESTAMP, val)
357#define bfin_read_CAN1_MB00_ID0() bfin_read16(CAN1_MB00_ID0)
358#define bfin_write_CAN1_MB00_ID0(val) bfin_write16(CAN1_MB00_ID0, val)
359#define bfin_read_CAN1_MB00_ID1() bfin_read16(CAN1_MB00_ID1)
360#define bfin_write_CAN1_MB00_ID1(val) bfin_write16(CAN1_MB00_ID1, val)
361#define bfin_read_CAN1_MB01_DATA0() bfin_read16(CAN1_MB01_DATA0)
362#define bfin_write_CAN1_MB01_DATA0(val) bfin_write16(CAN1_MB01_DATA0, val)
363#define bfin_read_CAN1_MB01_DATA1() bfin_read16(CAN1_MB01_DATA1)
364#define bfin_write_CAN1_MB01_DATA1(val) bfin_write16(CAN1_MB01_DATA1, val)
365#define bfin_read_CAN1_MB01_DATA2() bfin_read16(CAN1_MB01_DATA2)
366#define bfin_write_CAN1_MB01_DATA2(val) bfin_write16(CAN1_MB01_DATA2, val)
367#define bfin_read_CAN1_MB01_DATA3() bfin_read16(CAN1_MB01_DATA3)
368#define bfin_write_CAN1_MB01_DATA3(val) bfin_write16(CAN1_MB01_DATA3, val)
369#define bfin_read_CAN1_MB01_LENGTH() bfin_read16(CAN1_MB01_LENGTH)
370#define bfin_write_CAN1_MB01_LENGTH(val) bfin_write16(CAN1_MB01_LENGTH, val)
371#define bfin_read_CAN1_MB01_TIMESTAMP() bfin_read16(CAN1_MB01_TIMESTAMP)
372#define bfin_write_CAN1_MB01_TIMESTAMP(val) bfin_write16(CAN1_MB01_TIMESTAMP, val)
373#define bfin_read_CAN1_MB01_ID0() bfin_read16(CAN1_MB01_ID0)
374#define bfin_write_CAN1_MB01_ID0(val) bfin_write16(CAN1_MB01_ID0, val)
375#define bfin_read_CAN1_MB01_ID1() bfin_read16(CAN1_MB01_ID1)
376#define bfin_write_CAN1_MB01_ID1(val) bfin_write16(CAN1_MB01_ID1, val)
377#define bfin_read_CAN1_MB02_DATA0() bfin_read16(CAN1_MB02_DATA0)
378#define bfin_write_CAN1_MB02_DATA0(val) bfin_write16(CAN1_MB02_DATA0, val)
379#define bfin_read_CAN1_MB02_DATA1() bfin_read16(CAN1_MB02_DATA1)
380#define bfin_write_CAN1_MB02_DATA1(val) bfin_write16(CAN1_MB02_DATA1, val)
381#define bfin_read_CAN1_MB02_DATA2() bfin_read16(CAN1_MB02_DATA2)
382#define bfin_write_CAN1_MB02_DATA2(val) bfin_write16(CAN1_MB02_DATA2, val)
383#define bfin_read_CAN1_MB02_DATA3() bfin_read16(CAN1_MB02_DATA3)
384#define bfin_write_CAN1_MB02_DATA3(val) bfin_write16(CAN1_MB02_DATA3, val)
385#define bfin_read_CAN1_MB02_LENGTH() bfin_read16(CAN1_MB02_LENGTH)
386#define bfin_write_CAN1_MB02_LENGTH(val) bfin_write16(CAN1_MB02_LENGTH, val)
387#define bfin_read_CAN1_MB02_TIMESTAMP() bfin_read16(CAN1_MB02_TIMESTAMP)
388#define bfin_write_CAN1_MB02_TIMESTAMP(val) bfin_write16(CAN1_MB02_TIMESTAMP, val)
389#define bfin_read_CAN1_MB02_ID0() bfin_read16(CAN1_MB02_ID0)
390#define bfin_write_CAN1_MB02_ID0(val) bfin_write16(CAN1_MB02_ID0, val)
391#define bfin_read_CAN1_MB02_ID1() bfin_read16(CAN1_MB02_ID1)
392#define bfin_write_CAN1_MB02_ID1(val) bfin_write16(CAN1_MB02_ID1, val)
393#define bfin_read_CAN1_MB03_DATA0() bfin_read16(CAN1_MB03_DATA0)
394#define bfin_write_CAN1_MB03_DATA0(val) bfin_write16(CAN1_MB03_DATA0, val)
395#define bfin_read_CAN1_MB03_DATA1() bfin_read16(CAN1_MB03_DATA1)
396#define bfin_write_CAN1_MB03_DATA1(val) bfin_write16(CAN1_MB03_DATA1, val)
397#define bfin_read_CAN1_MB03_DATA2() bfin_read16(CAN1_MB03_DATA2)
398#define bfin_write_CAN1_MB03_DATA2(val) bfin_write16(CAN1_MB03_DATA2, val)
399#define bfin_read_CAN1_MB03_DATA3() bfin_read16(CAN1_MB03_DATA3)
400#define bfin_write_CAN1_MB03_DATA3(val) bfin_write16(CAN1_MB03_DATA3, val)
401#define bfin_read_CAN1_MB03_LENGTH() bfin_read16(CAN1_MB03_LENGTH)
402#define bfin_write_CAN1_MB03_LENGTH(val) bfin_write16(CAN1_MB03_LENGTH, val)
403#define bfin_read_CAN1_MB03_TIMESTAMP() bfin_read16(CAN1_MB03_TIMESTAMP)
404#define bfin_write_CAN1_MB03_TIMESTAMP(val) bfin_write16(CAN1_MB03_TIMESTAMP, val)
405#define bfin_read_CAN1_MB03_ID0() bfin_read16(CAN1_MB03_ID0)
406#define bfin_write_CAN1_MB03_ID0(val) bfin_write16(CAN1_MB03_ID0, val)
407#define bfin_read_CAN1_MB03_ID1() bfin_read16(CAN1_MB03_ID1)
408#define bfin_write_CAN1_MB03_ID1(val) bfin_write16(CAN1_MB03_ID1, val)
409#define bfin_read_CAN1_MB04_DATA0() bfin_read16(CAN1_MB04_DATA0)
410#define bfin_write_CAN1_MB04_DATA0(val) bfin_write16(CAN1_MB04_DATA0, val)
411#define bfin_read_CAN1_MB04_DATA1() bfin_read16(CAN1_MB04_DATA1)
412#define bfin_write_CAN1_MB04_DATA1(val) bfin_write16(CAN1_MB04_DATA1, val)
413#define bfin_read_CAN1_MB04_DATA2() bfin_read16(CAN1_MB04_DATA2)
414#define bfin_write_CAN1_MB04_DATA2(val) bfin_write16(CAN1_MB04_DATA2, val)
415#define bfin_read_CAN1_MB04_DATA3() bfin_read16(CAN1_MB04_DATA3)
416#define bfin_write_CAN1_MB04_DATA3(val) bfin_write16(CAN1_MB04_DATA3, val)
417#define bfin_read_CAN1_MB04_LENGTH() bfin_read16(CAN1_MB04_LENGTH)
418#define bfin_write_CAN1_MB04_LENGTH(val) bfin_write16(CAN1_MB04_LENGTH, val)
419#define bfin_read_CAN1_MB04_TIMESTAMP() bfin_read16(CAN1_MB04_TIMESTAMP)
420#define bfin_write_CAN1_MB04_TIMESTAMP(val) bfin_write16(CAN1_MB04_TIMESTAMP, val)
421#define bfin_read_CAN1_MB04_ID0() bfin_read16(CAN1_MB04_ID0)
422#define bfin_write_CAN1_MB04_ID0(val) bfin_write16(CAN1_MB04_ID0, val)
423#define bfin_read_CAN1_MB04_ID1() bfin_read16(CAN1_MB04_ID1)
424#define bfin_write_CAN1_MB04_ID1(val) bfin_write16(CAN1_MB04_ID1, val)
425#define bfin_read_CAN1_MB05_DATA0() bfin_read16(CAN1_MB05_DATA0)
426#define bfin_write_CAN1_MB05_DATA0(val) bfin_write16(CAN1_MB05_DATA0, val)
427#define bfin_read_CAN1_MB05_DATA1() bfin_read16(CAN1_MB05_DATA1)
428#define bfin_write_CAN1_MB05_DATA1(val) bfin_write16(CAN1_MB05_DATA1, val)
429#define bfin_read_CAN1_MB05_DATA2() bfin_read16(CAN1_MB05_DATA2)
430#define bfin_write_CAN1_MB05_DATA2(val) bfin_write16(CAN1_MB05_DATA2, val)
431#define bfin_read_CAN1_MB05_DATA3() bfin_read16(CAN1_MB05_DATA3)
432#define bfin_write_CAN1_MB05_DATA3(val) bfin_write16(CAN1_MB05_DATA3, val)
433#define bfin_read_CAN1_MB05_LENGTH() bfin_read16(CAN1_MB05_LENGTH)
434#define bfin_write_CAN1_MB05_LENGTH(val) bfin_write16(CAN1_MB05_LENGTH, val)
435#define bfin_read_CAN1_MB05_TIMESTAMP() bfin_read16(CAN1_MB05_TIMESTAMP)
436#define bfin_write_CAN1_MB05_TIMESTAMP(val) bfin_write16(CAN1_MB05_TIMESTAMP, val)
437#define bfin_read_CAN1_MB05_ID0() bfin_read16(CAN1_MB05_ID0)
438#define bfin_write_CAN1_MB05_ID0(val) bfin_write16(CAN1_MB05_ID0, val)
439#define bfin_read_CAN1_MB05_ID1() bfin_read16(CAN1_MB05_ID1)
440#define bfin_write_CAN1_MB05_ID1(val) bfin_write16(CAN1_MB05_ID1, val)
441#define bfin_read_CAN1_MB06_DATA0() bfin_read16(CAN1_MB06_DATA0)
442#define bfin_write_CAN1_MB06_DATA0(val) bfin_write16(CAN1_MB06_DATA0, val)
443#define bfin_read_CAN1_MB06_DATA1() bfin_read16(CAN1_MB06_DATA1)
444#define bfin_write_CAN1_MB06_DATA1(val) bfin_write16(CAN1_MB06_DATA1, val)
445#define bfin_read_CAN1_MB06_DATA2() bfin_read16(CAN1_MB06_DATA2)
446#define bfin_write_CAN1_MB06_DATA2(val) bfin_write16(CAN1_MB06_DATA2, val)
447#define bfin_read_CAN1_MB06_DATA3() bfin_read16(CAN1_MB06_DATA3)
448#define bfin_write_CAN1_MB06_DATA3(val) bfin_write16(CAN1_MB06_DATA3, val)
449#define bfin_read_CAN1_MB06_LENGTH() bfin_read16(CAN1_MB06_LENGTH)
450#define bfin_write_CAN1_MB06_LENGTH(val) bfin_write16(CAN1_MB06_LENGTH, val)
451#define bfin_read_CAN1_MB06_TIMESTAMP() bfin_read16(CAN1_MB06_TIMESTAMP)
452#define bfin_write_CAN1_MB06_TIMESTAMP(val) bfin_write16(CAN1_MB06_TIMESTAMP, val)
453#define bfin_read_CAN1_MB06_ID0() bfin_read16(CAN1_MB06_ID0)
454#define bfin_write_CAN1_MB06_ID0(val) bfin_write16(CAN1_MB06_ID0, val)
455#define bfin_read_CAN1_MB06_ID1() bfin_read16(CAN1_MB06_ID1)
456#define bfin_write_CAN1_MB06_ID1(val) bfin_write16(CAN1_MB06_ID1, val)
457#define bfin_read_CAN1_MB07_DATA0() bfin_read16(CAN1_MB07_DATA0)
458#define bfin_write_CAN1_MB07_DATA0(val) bfin_write16(CAN1_MB07_DATA0, val)
459#define bfin_read_CAN1_MB07_DATA1() bfin_read16(CAN1_MB07_DATA1)
460#define bfin_write_CAN1_MB07_DATA1(val) bfin_write16(CAN1_MB07_DATA1, val)
461#define bfin_read_CAN1_MB07_DATA2() bfin_read16(CAN1_MB07_DATA2)
462#define bfin_write_CAN1_MB07_DATA2(val) bfin_write16(CAN1_MB07_DATA2, val)
463#define bfin_read_CAN1_MB07_DATA3() bfin_read16(CAN1_MB07_DATA3)
464#define bfin_write_CAN1_MB07_DATA3(val) bfin_write16(CAN1_MB07_DATA3, val)
465#define bfin_read_CAN1_MB07_LENGTH() bfin_read16(CAN1_MB07_LENGTH)
466#define bfin_write_CAN1_MB07_LENGTH(val) bfin_write16(CAN1_MB07_LENGTH, val)
467#define bfin_read_CAN1_MB07_TIMESTAMP() bfin_read16(CAN1_MB07_TIMESTAMP)
468#define bfin_write_CAN1_MB07_TIMESTAMP(val) bfin_write16(CAN1_MB07_TIMESTAMP, val)
469#define bfin_read_CAN1_MB07_ID0() bfin_read16(CAN1_MB07_ID0)
470#define bfin_write_CAN1_MB07_ID0(val) bfin_write16(CAN1_MB07_ID0, val)
471#define bfin_read_CAN1_MB07_ID1() bfin_read16(CAN1_MB07_ID1)
472#define bfin_write_CAN1_MB07_ID1(val) bfin_write16(CAN1_MB07_ID1, val)
473#define bfin_read_CAN1_MB08_DATA0() bfin_read16(CAN1_MB08_DATA0)
474#define bfin_write_CAN1_MB08_DATA0(val) bfin_write16(CAN1_MB08_DATA0, val)
475#define bfin_read_CAN1_MB08_DATA1() bfin_read16(CAN1_MB08_DATA1)
476#define bfin_write_CAN1_MB08_DATA1(val) bfin_write16(CAN1_MB08_DATA1, val)
477#define bfin_read_CAN1_MB08_DATA2() bfin_read16(CAN1_MB08_DATA2)
478#define bfin_write_CAN1_MB08_DATA2(val) bfin_write16(CAN1_MB08_DATA2, val)
479#define bfin_read_CAN1_MB08_DATA3() bfin_read16(CAN1_MB08_DATA3)
480#define bfin_write_CAN1_MB08_DATA3(val) bfin_write16(CAN1_MB08_DATA3, val)
481#define bfin_read_CAN1_MB08_LENGTH() bfin_read16(CAN1_MB08_LENGTH)
482#define bfin_write_CAN1_MB08_LENGTH(val) bfin_write16(CAN1_MB08_LENGTH, val)
483#define bfin_read_CAN1_MB08_TIMESTAMP() bfin_read16(CAN1_MB08_TIMESTAMP)
484#define bfin_write_CAN1_MB08_TIMESTAMP(val) bfin_write16(CAN1_MB08_TIMESTAMP, val)
485#define bfin_read_CAN1_MB08_ID0() bfin_read16(CAN1_MB08_ID0)
486#define bfin_write_CAN1_MB08_ID0(val) bfin_write16(CAN1_MB08_ID0, val)
487#define bfin_read_CAN1_MB08_ID1() bfin_read16(CAN1_MB08_ID1)
488#define bfin_write_CAN1_MB08_ID1(val) bfin_write16(CAN1_MB08_ID1, val)
489#define bfin_read_CAN1_MB09_DATA0() bfin_read16(CAN1_MB09_DATA0)
490#define bfin_write_CAN1_MB09_DATA0(val) bfin_write16(CAN1_MB09_DATA0, val)
491#define bfin_read_CAN1_MB09_DATA1() bfin_read16(CAN1_MB09_DATA1)
492#define bfin_write_CAN1_MB09_DATA1(val) bfin_write16(CAN1_MB09_DATA1, val)
493#define bfin_read_CAN1_MB09_DATA2() bfin_read16(CAN1_MB09_DATA2)
494#define bfin_write_CAN1_MB09_DATA2(val) bfin_write16(CAN1_MB09_DATA2, val)
495#define bfin_read_CAN1_MB09_DATA3() bfin_read16(CAN1_MB09_DATA3)
496#define bfin_write_CAN1_MB09_DATA3(val) bfin_write16(CAN1_MB09_DATA3, val)
497#define bfin_read_CAN1_MB09_LENGTH() bfin_read16(CAN1_MB09_LENGTH)
498#define bfin_write_CAN1_MB09_LENGTH(val) bfin_write16(CAN1_MB09_LENGTH, val)
499#define bfin_read_CAN1_MB09_TIMESTAMP() bfin_read16(CAN1_MB09_TIMESTAMP)
500#define bfin_write_CAN1_MB09_TIMESTAMP(val) bfin_write16(CAN1_MB09_TIMESTAMP, val)
501#define bfin_read_CAN1_MB09_ID0() bfin_read16(CAN1_MB09_ID0)
502#define bfin_write_CAN1_MB09_ID0(val) bfin_write16(CAN1_MB09_ID0, val)
503#define bfin_read_CAN1_MB09_ID1() bfin_read16(CAN1_MB09_ID1)
504#define bfin_write_CAN1_MB09_ID1(val) bfin_write16(CAN1_MB09_ID1, val)
505#define bfin_read_CAN1_MB10_DATA0() bfin_read16(CAN1_MB10_DATA0)
506#define bfin_write_CAN1_MB10_DATA0(val) bfin_write16(CAN1_MB10_DATA0, val)
507#define bfin_read_CAN1_MB10_DATA1() bfin_read16(CAN1_MB10_DATA1)
508#define bfin_write_CAN1_MB10_DATA1(val) bfin_write16(CAN1_MB10_DATA1, val)
509#define bfin_read_CAN1_MB10_DATA2() bfin_read16(CAN1_MB10_DATA2)
510#define bfin_write_CAN1_MB10_DATA2(val) bfin_write16(CAN1_MB10_DATA2, val)
511#define bfin_read_CAN1_MB10_DATA3() bfin_read16(CAN1_MB10_DATA3)
512#define bfin_write_CAN1_MB10_DATA3(val) bfin_write16(CAN1_MB10_DATA3, val)
513#define bfin_read_CAN1_MB10_LENGTH() bfin_read16(CAN1_MB10_LENGTH)
514#define bfin_write_CAN1_MB10_LENGTH(val) bfin_write16(CAN1_MB10_LENGTH, val)
515#define bfin_read_CAN1_MB10_TIMESTAMP() bfin_read16(CAN1_MB10_TIMESTAMP)
516#define bfin_write_CAN1_MB10_TIMESTAMP(val) bfin_write16(CAN1_MB10_TIMESTAMP, val)
517#define bfin_read_CAN1_MB10_ID0() bfin_read16(CAN1_MB10_ID0)
518#define bfin_write_CAN1_MB10_ID0(val) bfin_write16(CAN1_MB10_ID0, val)
519#define bfin_read_CAN1_MB10_ID1() bfin_read16(CAN1_MB10_ID1)
520#define bfin_write_CAN1_MB10_ID1(val) bfin_write16(CAN1_MB10_ID1, val)
521#define bfin_read_CAN1_MB11_DATA0() bfin_read16(CAN1_MB11_DATA0)
522#define bfin_write_CAN1_MB11_DATA0(val) bfin_write16(CAN1_MB11_DATA0, val)
523#define bfin_read_CAN1_MB11_DATA1() bfin_read16(CAN1_MB11_DATA1)
524#define bfin_write_CAN1_MB11_DATA1(val) bfin_write16(CAN1_MB11_DATA1, val)
525#define bfin_read_CAN1_MB11_DATA2() bfin_read16(CAN1_MB11_DATA2)
526#define bfin_write_CAN1_MB11_DATA2(val) bfin_write16(CAN1_MB11_DATA2, val)
527#define bfin_read_CAN1_MB11_DATA3() bfin_read16(CAN1_MB11_DATA3)
528#define bfin_write_CAN1_MB11_DATA3(val) bfin_write16(CAN1_MB11_DATA3, val)
529#define bfin_read_CAN1_MB11_LENGTH() bfin_read16(CAN1_MB11_LENGTH)
530#define bfin_write_CAN1_MB11_LENGTH(val) bfin_write16(CAN1_MB11_LENGTH, val)
531#define bfin_read_CAN1_MB11_TIMESTAMP() bfin_read16(CAN1_MB11_TIMESTAMP)
532#define bfin_write_CAN1_MB11_TIMESTAMP(val) bfin_write16(CAN1_MB11_TIMESTAMP, val)
533#define bfin_read_CAN1_MB11_ID0() bfin_read16(CAN1_MB11_ID0)
534#define bfin_write_CAN1_MB11_ID0(val) bfin_write16(CAN1_MB11_ID0, val)
535#define bfin_read_CAN1_MB11_ID1() bfin_read16(CAN1_MB11_ID1)
536#define bfin_write_CAN1_MB11_ID1(val) bfin_write16(CAN1_MB11_ID1, val)
537#define bfin_read_CAN1_MB12_DATA0() bfin_read16(CAN1_MB12_DATA0)
538#define bfin_write_CAN1_MB12_DATA0(val) bfin_write16(CAN1_MB12_DATA0, val)
539#define bfin_read_CAN1_MB12_DATA1() bfin_read16(CAN1_MB12_DATA1)
540#define bfin_write_CAN1_MB12_DATA1(val) bfin_write16(CAN1_MB12_DATA1, val)
541#define bfin_read_CAN1_MB12_DATA2() bfin_read16(CAN1_MB12_DATA2)
542#define bfin_write_CAN1_MB12_DATA2(val) bfin_write16(CAN1_MB12_DATA2, val)
543#define bfin_read_CAN1_MB12_DATA3() bfin_read16(CAN1_MB12_DATA3)
544#define bfin_write_CAN1_MB12_DATA3(val) bfin_write16(CAN1_MB12_DATA3, val)
545#define bfin_read_CAN1_MB12_LENGTH() bfin_read16(CAN1_MB12_LENGTH)
546#define bfin_write_CAN1_MB12_LENGTH(val) bfin_write16(CAN1_MB12_LENGTH, val)
547#define bfin_read_CAN1_MB12_TIMESTAMP() bfin_read16(CAN1_MB12_TIMESTAMP)
548#define bfin_write_CAN1_MB12_TIMESTAMP(val) bfin_write16(CAN1_MB12_TIMESTAMP, val)
549#define bfin_read_CAN1_MB12_ID0() bfin_read16(CAN1_MB12_ID0)
550#define bfin_write_CAN1_MB12_ID0(val) bfin_write16(CAN1_MB12_ID0, val)
551#define bfin_read_CAN1_MB12_ID1() bfin_read16(CAN1_MB12_ID1)
552#define bfin_write_CAN1_MB12_ID1(val) bfin_write16(CAN1_MB12_ID1, val)
553#define bfin_read_CAN1_MB13_DATA0() bfin_read16(CAN1_MB13_DATA0)
554#define bfin_write_CAN1_MB13_DATA0(val) bfin_write16(CAN1_MB13_DATA0, val)
555#define bfin_read_CAN1_MB13_DATA1() bfin_read16(CAN1_MB13_DATA1)
556#define bfin_write_CAN1_MB13_DATA1(val) bfin_write16(CAN1_MB13_DATA1, val)
557#define bfin_read_CAN1_MB13_DATA2() bfin_read16(CAN1_MB13_DATA2)
558#define bfin_write_CAN1_MB13_DATA2(val) bfin_write16(CAN1_MB13_DATA2, val)
559#define bfin_read_CAN1_MB13_DATA3() bfin_read16(CAN1_MB13_DATA3)
560#define bfin_write_CAN1_MB13_DATA3(val) bfin_write16(CAN1_MB13_DATA3, val)
561#define bfin_read_CAN1_MB13_LENGTH() bfin_read16(CAN1_MB13_LENGTH)
562#define bfin_write_CAN1_MB13_LENGTH(val) bfin_write16(CAN1_MB13_LENGTH, val)
563#define bfin_read_CAN1_MB13_TIMESTAMP() bfin_read16(CAN1_MB13_TIMESTAMP)
564#define bfin_write_CAN1_MB13_TIMESTAMP(val) bfin_write16(CAN1_MB13_TIMESTAMP, val)
565#define bfin_read_CAN1_MB13_ID0() bfin_read16(CAN1_MB13_ID0)
566#define bfin_write_CAN1_MB13_ID0(val) bfin_write16(CAN1_MB13_ID0, val)
567#define bfin_read_CAN1_MB13_ID1() bfin_read16(CAN1_MB13_ID1)
568#define bfin_write_CAN1_MB13_ID1(val) bfin_write16(CAN1_MB13_ID1, val)
569#define bfin_read_CAN1_MB14_DATA0() bfin_read16(CAN1_MB14_DATA0)
570#define bfin_write_CAN1_MB14_DATA0(val) bfin_write16(CAN1_MB14_DATA0, val)
571#define bfin_read_CAN1_MB14_DATA1() bfin_read16(CAN1_MB14_DATA1)
572#define bfin_write_CAN1_MB14_DATA1(val) bfin_write16(CAN1_MB14_DATA1, val)
573#define bfin_read_CAN1_MB14_DATA2() bfin_read16(CAN1_MB14_DATA2)
574#define bfin_write_CAN1_MB14_DATA2(val) bfin_write16(CAN1_MB14_DATA2, val)
575#define bfin_read_CAN1_MB14_DATA3() bfin_read16(CAN1_MB14_DATA3)
576#define bfin_write_CAN1_MB14_DATA3(val) bfin_write16(CAN1_MB14_DATA3, val)
577#define bfin_read_CAN1_MB14_LENGTH() bfin_read16(CAN1_MB14_LENGTH)
578#define bfin_write_CAN1_MB14_LENGTH(val) bfin_write16(CAN1_MB14_LENGTH, val)
579#define bfin_read_CAN1_MB14_TIMESTAMP() bfin_read16(CAN1_MB14_TIMESTAMP)
580#define bfin_write_CAN1_MB14_TIMESTAMP(val) bfin_write16(CAN1_MB14_TIMESTAMP, val)
581#define bfin_read_CAN1_MB14_ID0() bfin_read16(CAN1_MB14_ID0)
582#define bfin_write_CAN1_MB14_ID0(val) bfin_write16(CAN1_MB14_ID0, val)
583#define bfin_read_CAN1_MB14_ID1() bfin_read16(CAN1_MB14_ID1)
584#define bfin_write_CAN1_MB14_ID1(val) bfin_write16(CAN1_MB14_ID1, val)
585#define bfin_read_CAN1_MB15_DATA0() bfin_read16(CAN1_MB15_DATA0)
586#define bfin_write_CAN1_MB15_DATA0(val) bfin_write16(CAN1_MB15_DATA0, val)
587#define bfin_read_CAN1_MB15_DATA1() bfin_read16(CAN1_MB15_DATA1)
588#define bfin_write_CAN1_MB15_DATA1(val) bfin_write16(CAN1_MB15_DATA1, val)
589#define bfin_read_CAN1_MB15_DATA2() bfin_read16(CAN1_MB15_DATA2)
590#define bfin_write_CAN1_MB15_DATA2(val) bfin_write16(CAN1_MB15_DATA2, val)
591#define bfin_read_CAN1_MB15_DATA3() bfin_read16(CAN1_MB15_DATA3)
592#define bfin_write_CAN1_MB15_DATA3(val) bfin_write16(CAN1_MB15_DATA3, val)
593#define bfin_read_CAN1_MB15_LENGTH() bfin_read16(CAN1_MB15_LENGTH)
594#define bfin_write_CAN1_MB15_LENGTH(val) bfin_write16(CAN1_MB15_LENGTH, val)
595#define bfin_read_CAN1_MB15_TIMESTAMP() bfin_read16(CAN1_MB15_TIMESTAMP)
596#define bfin_write_CAN1_MB15_TIMESTAMP(val) bfin_write16(CAN1_MB15_TIMESTAMP, val)
597#define bfin_read_CAN1_MB15_ID0() bfin_read16(CAN1_MB15_ID0)
598#define bfin_write_CAN1_MB15_ID0(val) bfin_write16(CAN1_MB15_ID0, val)
599#define bfin_read_CAN1_MB15_ID1() bfin_read16(CAN1_MB15_ID1)
600#define bfin_write_CAN1_MB15_ID1(val) bfin_write16(CAN1_MB15_ID1, val)
601
602/* CAN Controller 1 Mailbox Data Registers */
603
604#define bfin_read_CAN1_MB16_DATA0() bfin_read16(CAN1_MB16_DATA0)
605#define bfin_write_CAN1_MB16_DATA0(val) bfin_write16(CAN1_MB16_DATA0, val)
606#define bfin_read_CAN1_MB16_DATA1() bfin_read16(CAN1_MB16_DATA1)
607#define bfin_write_CAN1_MB16_DATA1(val) bfin_write16(CAN1_MB16_DATA1, val)
608#define bfin_read_CAN1_MB16_DATA2() bfin_read16(CAN1_MB16_DATA2)
609#define bfin_write_CAN1_MB16_DATA2(val) bfin_write16(CAN1_MB16_DATA2, val)
610#define bfin_read_CAN1_MB16_DATA3() bfin_read16(CAN1_MB16_DATA3)
611#define bfin_write_CAN1_MB16_DATA3(val) bfin_write16(CAN1_MB16_DATA3, val)
612#define bfin_read_CAN1_MB16_LENGTH() bfin_read16(CAN1_MB16_LENGTH)
613#define bfin_write_CAN1_MB16_LENGTH(val) bfin_write16(CAN1_MB16_LENGTH, val)
614#define bfin_read_CAN1_MB16_TIMESTAMP() bfin_read16(CAN1_MB16_TIMESTAMP)
615#define bfin_write_CAN1_MB16_TIMESTAMP(val) bfin_write16(CAN1_MB16_TIMESTAMP, val)
616#define bfin_read_CAN1_MB16_ID0() bfin_read16(CAN1_MB16_ID0)
617#define bfin_write_CAN1_MB16_ID0(val) bfin_write16(CAN1_MB16_ID0, val)
618#define bfin_read_CAN1_MB16_ID1() bfin_read16(CAN1_MB16_ID1)
619#define bfin_write_CAN1_MB16_ID1(val) bfin_write16(CAN1_MB16_ID1, val)
620#define bfin_read_CAN1_MB17_DATA0() bfin_read16(CAN1_MB17_DATA0)
621#define bfin_write_CAN1_MB17_DATA0(val) bfin_write16(CAN1_MB17_DATA0, val)
622#define bfin_read_CAN1_MB17_DATA1() bfin_read16(CAN1_MB17_DATA1)
623#define bfin_write_CAN1_MB17_DATA1(val) bfin_write16(CAN1_MB17_DATA1, val)
624#define bfin_read_CAN1_MB17_DATA2() bfin_read16(CAN1_MB17_DATA2)
625#define bfin_write_CAN1_MB17_DATA2(val) bfin_write16(CAN1_MB17_DATA2, val)
626#define bfin_read_CAN1_MB17_DATA3() bfin_read16(CAN1_MB17_DATA3)
627#define bfin_write_CAN1_MB17_DATA3(val) bfin_write16(CAN1_MB17_DATA3, val)
628#define bfin_read_CAN1_MB17_LENGTH() bfin_read16(CAN1_MB17_LENGTH)
629#define bfin_write_CAN1_MB17_LENGTH(val) bfin_write16(CAN1_MB17_LENGTH, val)
630#define bfin_read_CAN1_MB17_TIMESTAMP() bfin_read16(CAN1_MB17_TIMESTAMP)
631#define bfin_write_CAN1_MB17_TIMESTAMP(val) bfin_write16(CAN1_MB17_TIMESTAMP, val)
632#define bfin_read_CAN1_MB17_ID0() bfin_read16(CAN1_MB17_ID0)
633#define bfin_write_CAN1_MB17_ID0(val) bfin_write16(CAN1_MB17_ID0, val)
634#define bfin_read_CAN1_MB17_ID1() bfin_read16(CAN1_MB17_ID1)
635#define bfin_write_CAN1_MB17_ID1(val) bfin_write16(CAN1_MB17_ID1, val)
636#define bfin_read_CAN1_MB18_DATA0() bfin_read16(CAN1_MB18_DATA0)
637#define bfin_write_CAN1_MB18_DATA0(val) bfin_write16(CAN1_MB18_DATA0, val)
638#define bfin_read_CAN1_MB18_DATA1() bfin_read16(CAN1_MB18_DATA1)
639#define bfin_write_CAN1_MB18_DATA1(val) bfin_write16(CAN1_MB18_DATA1, val)
640#define bfin_read_CAN1_MB18_DATA2() bfin_read16(CAN1_MB18_DATA2)
641#define bfin_write_CAN1_MB18_DATA2(val) bfin_write16(CAN1_MB18_DATA2, val)
642#define bfin_read_CAN1_MB18_DATA3() bfin_read16(CAN1_MB18_DATA3)
643#define bfin_write_CAN1_MB18_DATA3(val) bfin_write16(CAN1_MB18_DATA3, val)
644#define bfin_read_CAN1_MB18_LENGTH() bfin_read16(CAN1_MB18_LENGTH)
645#define bfin_write_CAN1_MB18_LENGTH(val) bfin_write16(CAN1_MB18_LENGTH, val)
646#define bfin_read_CAN1_MB18_TIMESTAMP() bfin_read16(CAN1_MB18_TIMESTAMP)
647#define bfin_write_CAN1_MB18_TIMESTAMP(val) bfin_write16(CAN1_MB18_TIMESTAMP, val)
648#define bfin_read_CAN1_MB18_ID0() bfin_read16(CAN1_MB18_ID0)
649#define bfin_write_CAN1_MB18_ID0(val) bfin_write16(CAN1_MB18_ID0, val)
650#define bfin_read_CAN1_MB18_ID1() bfin_read16(CAN1_MB18_ID1)
651#define bfin_write_CAN1_MB18_ID1(val) bfin_write16(CAN1_MB18_ID1, val)
652#define bfin_read_CAN1_MB19_DATA0() bfin_read16(CAN1_MB19_DATA0)
653#define bfin_write_CAN1_MB19_DATA0(val) bfin_write16(CAN1_MB19_DATA0, val)
654#define bfin_read_CAN1_MB19_DATA1() bfin_read16(CAN1_MB19_DATA1)
655#define bfin_write_CAN1_MB19_DATA1(val) bfin_write16(CAN1_MB19_DATA1, val)
656#define bfin_read_CAN1_MB19_DATA2() bfin_read16(CAN1_MB19_DATA2)
657#define bfin_write_CAN1_MB19_DATA2(val) bfin_write16(CAN1_MB19_DATA2, val)
658#define bfin_read_CAN1_MB19_DATA3() bfin_read16(CAN1_MB19_DATA3)
659#define bfin_write_CAN1_MB19_DATA3(val) bfin_write16(CAN1_MB19_DATA3, val)
660#define bfin_read_CAN1_MB19_LENGTH() bfin_read16(CAN1_MB19_LENGTH)
661#define bfin_write_CAN1_MB19_LENGTH(val) bfin_write16(CAN1_MB19_LENGTH, val)
662#define bfin_read_CAN1_MB19_TIMESTAMP() bfin_read16(CAN1_MB19_TIMESTAMP)
663#define bfin_write_CAN1_MB19_TIMESTAMP(val) bfin_write16(CAN1_MB19_TIMESTAMP, val)
664#define bfin_read_CAN1_MB19_ID0() bfin_read16(CAN1_MB19_ID0)
665#define bfin_write_CAN1_MB19_ID0(val) bfin_write16(CAN1_MB19_ID0, val)
666#define bfin_read_CAN1_MB19_ID1() bfin_read16(CAN1_MB19_ID1)
667#define bfin_write_CAN1_MB19_ID1(val) bfin_write16(CAN1_MB19_ID1, val)
668#define bfin_read_CAN1_MB20_DATA0() bfin_read16(CAN1_MB20_DATA0)
669#define bfin_write_CAN1_MB20_DATA0(val) bfin_write16(CAN1_MB20_DATA0, val)
670#define bfin_read_CAN1_MB20_DATA1() bfin_read16(CAN1_MB20_DATA1)
671#define bfin_write_CAN1_MB20_DATA1(val) bfin_write16(CAN1_MB20_DATA1, val)
672#define bfin_read_CAN1_MB20_DATA2() bfin_read16(CAN1_MB20_DATA2)
673#define bfin_write_CAN1_MB20_DATA2(val) bfin_write16(CAN1_MB20_DATA2, val)
674#define bfin_read_CAN1_MB20_DATA3() bfin_read16(CAN1_MB20_DATA3)
675#define bfin_write_CAN1_MB20_DATA3(val) bfin_write16(CAN1_MB20_DATA3, val)
676#define bfin_read_CAN1_MB20_LENGTH() bfin_read16(CAN1_MB20_LENGTH)
677#define bfin_write_CAN1_MB20_LENGTH(val) bfin_write16(CAN1_MB20_LENGTH, val)
678#define bfin_read_CAN1_MB20_TIMESTAMP() bfin_read16(CAN1_MB20_TIMESTAMP)
679#define bfin_write_CAN1_MB20_TIMESTAMP(val) bfin_write16(CAN1_MB20_TIMESTAMP, val)
680#define bfin_read_CAN1_MB20_ID0() bfin_read16(CAN1_MB20_ID0)
681#define bfin_write_CAN1_MB20_ID0(val) bfin_write16(CAN1_MB20_ID0, val)
682#define bfin_read_CAN1_MB20_ID1() bfin_read16(CAN1_MB20_ID1)
683#define bfin_write_CAN1_MB20_ID1(val) bfin_write16(CAN1_MB20_ID1, val)
684#define bfin_read_CAN1_MB21_DATA0() bfin_read16(CAN1_MB21_DATA0)
685#define bfin_write_CAN1_MB21_DATA0(val) bfin_write16(CAN1_MB21_DATA0, val)
686#define bfin_read_CAN1_MB21_DATA1() bfin_read16(CAN1_MB21_DATA1)
687#define bfin_write_CAN1_MB21_DATA1(val) bfin_write16(CAN1_MB21_DATA1, val)
688#define bfin_read_CAN1_MB21_DATA2() bfin_read16(CAN1_MB21_DATA2)
689#define bfin_write_CAN1_MB21_DATA2(val) bfin_write16(CAN1_MB21_DATA2, val)
690#define bfin_read_CAN1_MB21_DATA3() bfin_read16(CAN1_MB21_DATA3)
691#define bfin_write_CAN1_MB21_DATA3(val) bfin_write16(CAN1_MB21_DATA3, val)
692#define bfin_read_CAN1_MB21_LENGTH() bfin_read16(CAN1_MB21_LENGTH)
693#define bfin_write_CAN1_MB21_LENGTH(val) bfin_write16(CAN1_MB21_LENGTH, val)
694#define bfin_read_CAN1_MB21_TIMESTAMP() bfin_read16(CAN1_MB21_TIMESTAMP)
695#define bfin_write_CAN1_MB21_TIMESTAMP(val) bfin_write16(CAN1_MB21_TIMESTAMP, val)
696#define bfin_read_CAN1_MB21_ID0() bfin_read16(CAN1_MB21_ID0)
697#define bfin_write_CAN1_MB21_ID0(val) bfin_write16(CAN1_MB21_ID0, val)
698#define bfin_read_CAN1_MB21_ID1() bfin_read16(CAN1_MB21_ID1)
699#define bfin_write_CAN1_MB21_ID1(val) bfin_write16(CAN1_MB21_ID1, val)
700#define bfin_read_CAN1_MB22_DATA0() bfin_read16(CAN1_MB22_DATA0)
701#define bfin_write_CAN1_MB22_DATA0(val) bfin_write16(CAN1_MB22_DATA0, val)
702#define bfin_read_CAN1_MB22_DATA1() bfin_read16(CAN1_MB22_DATA1)
703#define bfin_write_CAN1_MB22_DATA1(val) bfin_write16(CAN1_MB22_DATA1, val)
704#define bfin_read_CAN1_MB22_DATA2() bfin_read16(CAN1_MB22_DATA2)
705#define bfin_write_CAN1_MB22_DATA2(val) bfin_write16(CAN1_MB22_DATA2, val)
706#define bfin_read_CAN1_MB22_DATA3() bfin_read16(CAN1_MB22_DATA3)
707#define bfin_write_CAN1_MB22_DATA3(val) bfin_write16(CAN1_MB22_DATA3, val)
708#define bfin_read_CAN1_MB22_LENGTH() bfin_read16(CAN1_MB22_LENGTH)
709#define bfin_write_CAN1_MB22_LENGTH(val) bfin_write16(CAN1_MB22_LENGTH, val)
710#define bfin_read_CAN1_MB22_TIMESTAMP() bfin_read16(CAN1_MB22_TIMESTAMP)
711#define bfin_write_CAN1_MB22_TIMESTAMP(val) bfin_write16(CAN1_MB22_TIMESTAMP, val)
712#define bfin_read_CAN1_MB22_ID0() bfin_read16(CAN1_MB22_ID0)
713#define bfin_write_CAN1_MB22_ID0(val) bfin_write16(CAN1_MB22_ID0, val)
714#define bfin_read_CAN1_MB22_ID1() bfin_read16(CAN1_MB22_ID1)
715#define bfin_write_CAN1_MB22_ID1(val) bfin_write16(CAN1_MB22_ID1, val)
716#define bfin_read_CAN1_MB23_DATA0() bfin_read16(CAN1_MB23_DATA0)
717#define bfin_write_CAN1_MB23_DATA0(val) bfin_write16(CAN1_MB23_DATA0, val)
718#define bfin_read_CAN1_MB23_DATA1() bfin_read16(CAN1_MB23_DATA1)
719#define bfin_write_CAN1_MB23_DATA1(val) bfin_write16(CAN1_MB23_DATA1, val)
720#define bfin_read_CAN1_MB23_DATA2() bfin_read16(CAN1_MB23_DATA2)
721#define bfin_write_CAN1_MB23_DATA2(val) bfin_write16(CAN1_MB23_DATA2, val)
722#define bfin_read_CAN1_MB23_DATA3() bfin_read16(CAN1_MB23_DATA3)
723#define bfin_write_CAN1_MB23_DATA3(val) bfin_write16(CAN1_MB23_DATA3, val)
724#define bfin_read_CAN1_MB23_LENGTH() bfin_read16(CAN1_MB23_LENGTH)
725#define bfin_write_CAN1_MB23_LENGTH(val) bfin_write16(CAN1_MB23_LENGTH, val)
726#define bfin_read_CAN1_MB23_TIMESTAMP() bfin_read16(CAN1_MB23_TIMESTAMP)
727#define bfin_write_CAN1_MB23_TIMESTAMP(val) bfin_write16(CAN1_MB23_TIMESTAMP, val)
728#define bfin_read_CAN1_MB23_ID0() bfin_read16(CAN1_MB23_ID0)
729#define bfin_write_CAN1_MB23_ID0(val) bfin_write16(CAN1_MB23_ID0, val)
730#define bfin_read_CAN1_MB23_ID1() bfin_read16(CAN1_MB23_ID1)
731#define bfin_write_CAN1_MB23_ID1(val) bfin_write16(CAN1_MB23_ID1, val)
732#define bfin_read_CAN1_MB24_DATA0() bfin_read16(CAN1_MB24_DATA0)
733#define bfin_write_CAN1_MB24_DATA0(val) bfin_write16(CAN1_MB24_DATA0, val)
734#define bfin_read_CAN1_MB24_DATA1() bfin_read16(CAN1_MB24_DATA1)
735#define bfin_write_CAN1_MB24_DATA1(val) bfin_write16(CAN1_MB24_DATA1, val)
736#define bfin_read_CAN1_MB24_DATA2() bfin_read16(CAN1_MB24_DATA2)
737#define bfin_write_CAN1_MB24_DATA2(val) bfin_write16(CAN1_MB24_DATA2, val)
738#define bfin_read_CAN1_MB24_DATA3() bfin_read16(CAN1_MB24_DATA3)
739#define bfin_write_CAN1_MB24_DATA3(val) bfin_write16(CAN1_MB24_DATA3, val)
740#define bfin_read_CAN1_MB24_LENGTH() bfin_read16(CAN1_MB24_LENGTH)
741#define bfin_write_CAN1_MB24_LENGTH(val) bfin_write16(CAN1_MB24_LENGTH, val)
742#define bfin_read_CAN1_MB24_TIMESTAMP() bfin_read16(CAN1_MB24_TIMESTAMP)
743#define bfin_write_CAN1_MB24_TIMESTAMP(val) bfin_write16(CAN1_MB24_TIMESTAMP, val)
744#define bfin_read_CAN1_MB24_ID0() bfin_read16(CAN1_MB24_ID0)
745#define bfin_write_CAN1_MB24_ID0(val) bfin_write16(CAN1_MB24_ID0, val)
746#define bfin_read_CAN1_MB24_ID1() bfin_read16(CAN1_MB24_ID1)
747#define bfin_write_CAN1_MB24_ID1(val) bfin_write16(CAN1_MB24_ID1, val)
748#define bfin_read_CAN1_MB25_DATA0() bfin_read16(CAN1_MB25_DATA0)
749#define bfin_write_CAN1_MB25_DATA0(val) bfin_write16(CAN1_MB25_DATA0, val)
750#define bfin_read_CAN1_MB25_DATA1() bfin_read16(CAN1_MB25_DATA1)
751#define bfin_write_CAN1_MB25_DATA1(val) bfin_write16(CAN1_MB25_DATA1, val)
752#define bfin_read_CAN1_MB25_DATA2() bfin_read16(CAN1_MB25_DATA2)
753#define bfin_write_CAN1_MB25_DATA2(val) bfin_write16(CAN1_MB25_DATA2, val)
754#define bfin_read_CAN1_MB25_DATA3() bfin_read16(CAN1_MB25_DATA3)
755#define bfin_write_CAN1_MB25_DATA3(val) bfin_write16(CAN1_MB25_DATA3, val)
756#define bfin_read_CAN1_MB25_LENGTH() bfin_read16(CAN1_MB25_LENGTH)
757#define bfin_write_CAN1_MB25_LENGTH(val) bfin_write16(CAN1_MB25_LENGTH, val)
758#define bfin_read_CAN1_MB25_TIMESTAMP() bfin_read16(CAN1_MB25_TIMESTAMP)
759#define bfin_write_CAN1_MB25_TIMESTAMP(val) bfin_write16(CAN1_MB25_TIMESTAMP, val)
760#define bfin_read_CAN1_MB25_ID0() bfin_read16(CAN1_MB25_ID0)
761#define bfin_write_CAN1_MB25_ID0(val) bfin_write16(CAN1_MB25_ID0, val)
762#define bfin_read_CAN1_MB25_ID1() bfin_read16(CAN1_MB25_ID1)
763#define bfin_write_CAN1_MB25_ID1(val) bfin_write16(CAN1_MB25_ID1, val)
764#define bfin_read_CAN1_MB26_DATA0() bfin_read16(CAN1_MB26_DATA0)
765#define bfin_write_CAN1_MB26_DATA0(val) bfin_write16(CAN1_MB26_DATA0, val)
766#define bfin_read_CAN1_MB26_DATA1() bfin_read16(CAN1_MB26_DATA1)
767#define bfin_write_CAN1_MB26_DATA1(val) bfin_write16(CAN1_MB26_DATA1, val)
768#define bfin_read_CAN1_MB26_DATA2() bfin_read16(CAN1_MB26_DATA2)
769#define bfin_write_CAN1_MB26_DATA2(val) bfin_write16(CAN1_MB26_DATA2, val)
770#define bfin_read_CAN1_MB26_DATA3() bfin_read16(CAN1_MB26_DATA3)
771#define bfin_write_CAN1_MB26_DATA3(val) bfin_write16(CAN1_MB26_DATA3, val)
772#define bfin_read_CAN1_MB26_LENGTH() bfin_read16(CAN1_MB26_LENGTH)
773#define bfin_write_CAN1_MB26_LENGTH(val) bfin_write16(CAN1_MB26_LENGTH, val)
774#define bfin_read_CAN1_MB26_TIMESTAMP() bfin_read16(CAN1_MB26_TIMESTAMP)
775#define bfin_write_CAN1_MB26_TIMESTAMP(val) bfin_write16(CAN1_MB26_TIMESTAMP, val)
776#define bfin_read_CAN1_MB26_ID0() bfin_read16(CAN1_MB26_ID0)
777#define bfin_write_CAN1_MB26_ID0(val) bfin_write16(CAN1_MB26_ID0, val)
778#define bfin_read_CAN1_MB26_ID1() bfin_read16(CAN1_MB26_ID1)
779#define bfin_write_CAN1_MB26_ID1(val) bfin_write16(CAN1_MB26_ID1, val)
780#define bfin_read_CAN1_MB27_DATA0() bfin_read16(CAN1_MB27_DATA0)
781#define bfin_write_CAN1_MB27_DATA0(val) bfin_write16(CAN1_MB27_DATA0, val)
782#define bfin_read_CAN1_MB27_DATA1() bfin_read16(CAN1_MB27_DATA1)
783#define bfin_write_CAN1_MB27_DATA1(val) bfin_write16(CAN1_MB27_DATA1, val)
784#define bfin_read_CAN1_MB27_DATA2() bfin_read16(CAN1_MB27_DATA2)
785#define bfin_write_CAN1_MB27_DATA2(val) bfin_write16(CAN1_MB27_DATA2, val)
786#define bfin_read_CAN1_MB27_DATA3() bfin_read16(CAN1_MB27_DATA3)
787#define bfin_write_CAN1_MB27_DATA3(val) bfin_write16(CAN1_MB27_DATA3, val)
788#define bfin_read_CAN1_MB27_LENGTH() bfin_read16(CAN1_MB27_LENGTH)
789#define bfin_write_CAN1_MB27_LENGTH(val) bfin_write16(CAN1_MB27_LENGTH, val)
790#define bfin_read_CAN1_MB27_TIMESTAMP() bfin_read16(CAN1_MB27_TIMESTAMP)
791#define bfin_write_CAN1_MB27_TIMESTAMP(val) bfin_write16(CAN1_MB27_TIMESTAMP, val)
792#define bfin_read_CAN1_MB27_ID0() bfin_read16(CAN1_MB27_ID0)
793#define bfin_write_CAN1_MB27_ID0(val) bfin_write16(CAN1_MB27_ID0, val)
794#define bfin_read_CAN1_MB27_ID1() bfin_read16(CAN1_MB27_ID1)
795#define bfin_write_CAN1_MB27_ID1(val) bfin_write16(CAN1_MB27_ID1, val)
796#define bfin_read_CAN1_MB28_DATA0() bfin_read16(CAN1_MB28_DATA0)
797#define bfin_write_CAN1_MB28_DATA0(val) bfin_write16(CAN1_MB28_DATA0, val)
798#define bfin_read_CAN1_MB28_DATA1() bfin_read16(CAN1_MB28_DATA1)
799#define bfin_write_CAN1_MB28_DATA1(val) bfin_write16(CAN1_MB28_DATA1, val)
800#define bfin_read_CAN1_MB28_DATA2() bfin_read16(CAN1_MB28_DATA2)
801#define bfin_write_CAN1_MB28_DATA2(val) bfin_write16(CAN1_MB28_DATA2, val)
802#define bfin_read_CAN1_MB28_DATA3() bfin_read16(CAN1_MB28_DATA3)
803#define bfin_write_CAN1_MB28_DATA3(val) bfin_write16(CAN1_MB28_DATA3, val)
804#define bfin_read_CAN1_MB28_LENGTH() bfin_read16(CAN1_MB28_LENGTH)
805#define bfin_write_CAN1_MB28_LENGTH(val) bfin_write16(CAN1_MB28_LENGTH, val)
806#define bfin_read_CAN1_MB28_TIMESTAMP() bfin_read16(CAN1_MB28_TIMESTAMP)
807#define bfin_write_CAN1_MB28_TIMESTAMP(val) bfin_write16(CAN1_MB28_TIMESTAMP, val)
808#define bfin_read_CAN1_MB28_ID0() bfin_read16(CAN1_MB28_ID0)
809#define bfin_write_CAN1_MB28_ID0(val) bfin_write16(CAN1_MB28_ID0, val)
810#define bfin_read_CAN1_MB28_ID1() bfin_read16(CAN1_MB28_ID1)
811#define bfin_write_CAN1_MB28_ID1(val) bfin_write16(CAN1_MB28_ID1, val)
812#define bfin_read_CAN1_MB29_DATA0() bfin_read16(CAN1_MB29_DATA0)
813#define bfin_write_CAN1_MB29_DATA0(val) bfin_write16(CAN1_MB29_DATA0, val)
814#define bfin_read_CAN1_MB29_DATA1() bfin_read16(CAN1_MB29_DATA1)
815#define bfin_write_CAN1_MB29_DATA1(val) bfin_write16(CAN1_MB29_DATA1, val)
816#define bfin_read_CAN1_MB29_DATA2() bfin_read16(CAN1_MB29_DATA2)
817#define bfin_write_CAN1_MB29_DATA2(val) bfin_write16(CAN1_MB29_DATA2, val)
818#define bfin_read_CAN1_MB29_DATA3() bfin_read16(CAN1_MB29_DATA3)
819#define bfin_write_CAN1_MB29_DATA3(val) bfin_write16(CAN1_MB29_DATA3, val)
820#define bfin_read_CAN1_MB29_LENGTH() bfin_read16(CAN1_MB29_LENGTH)
821#define bfin_write_CAN1_MB29_LENGTH(val) bfin_write16(CAN1_MB29_LENGTH, val)
822#define bfin_read_CAN1_MB29_TIMESTAMP() bfin_read16(CAN1_MB29_TIMESTAMP)
823#define bfin_write_CAN1_MB29_TIMESTAMP(val) bfin_write16(CAN1_MB29_TIMESTAMP, val)
824#define bfin_read_CAN1_MB29_ID0() bfin_read16(CAN1_MB29_ID0)
825#define bfin_write_CAN1_MB29_ID0(val) bfin_write16(CAN1_MB29_ID0, val)
826#define bfin_read_CAN1_MB29_ID1() bfin_read16(CAN1_MB29_ID1)
827#define bfin_write_CAN1_MB29_ID1(val) bfin_write16(CAN1_MB29_ID1, val)
828#define bfin_read_CAN1_MB30_DATA0() bfin_read16(CAN1_MB30_DATA0)
829#define bfin_write_CAN1_MB30_DATA0(val) bfin_write16(CAN1_MB30_DATA0, val)
830#define bfin_read_CAN1_MB30_DATA1() bfin_read16(CAN1_MB30_DATA1)
831#define bfin_write_CAN1_MB30_DATA1(val) bfin_write16(CAN1_MB30_DATA1, val)
832#define bfin_read_CAN1_MB30_DATA2() bfin_read16(CAN1_MB30_DATA2)
833#define bfin_write_CAN1_MB30_DATA2(val) bfin_write16(CAN1_MB30_DATA2, val)
834#define bfin_read_CAN1_MB30_DATA3() bfin_read16(CAN1_MB30_DATA3)
835#define bfin_write_CAN1_MB30_DATA3(val) bfin_write16(CAN1_MB30_DATA3, val)
836#define bfin_read_CAN1_MB30_LENGTH() bfin_read16(CAN1_MB30_LENGTH)
837#define bfin_write_CAN1_MB30_LENGTH(val) bfin_write16(CAN1_MB30_LENGTH, val)
838#define bfin_read_CAN1_MB30_TIMESTAMP() bfin_read16(CAN1_MB30_TIMESTAMP)
839#define bfin_write_CAN1_MB30_TIMESTAMP(val) bfin_write16(CAN1_MB30_TIMESTAMP, val)
840#define bfin_read_CAN1_MB30_ID0() bfin_read16(CAN1_MB30_ID0)
841#define bfin_write_CAN1_MB30_ID0(val) bfin_write16(CAN1_MB30_ID0, val)
842#define bfin_read_CAN1_MB30_ID1() bfin_read16(CAN1_MB30_ID1)
843#define bfin_write_CAN1_MB30_ID1(val) bfin_write16(CAN1_MB30_ID1, val)
844#define bfin_read_CAN1_MB31_DATA0() bfin_read16(CAN1_MB31_DATA0)
845#define bfin_write_CAN1_MB31_DATA0(val) bfin_write16(CAN1_MB31_DATA0, val)
846#define bfin_read_CAN1_MB31_DATA1() bfin_read16(CAN1_MB31_DATA1)
847#define bfin_write_CAN1_MB31_DATA1(val) bfin_write16(CAN1_MB31_DATA1, val)
848#define bfin_read_CAN1_MB31_DATA2() bfin_read16(CAN1_MB31_DATA2)
849#define bfin_write_CAN1_MB31_DATA2(val) bfin_write16(CAN1_MB31_DATA2, val)
850#define bfin_read_CAN1_MB31_DATA3() bfin_read16(CAN1_MB31_DATA3)
851#define bfin_write_CAN1_MB31_DATA3(val) bfin_write16(CAN1_MB31_DATA3, val)
852#define bfin_read_CAN1_MB31_LENGTH() bfin_read16(CAN1_MB31_LENGTH)
853#define bfin_write_CAN1_MB31_LENGTH(val) bfin_write16(CAN1_MB31_LENGTH, val)
854#define bfin_read_CAN1_MB31_TIMESTAMP() bfin_read16(CAN1_MB31_TIMESTAMP)
855#define bfin_write_CAN1_MB31_TIMESTAMP(val) bfin_write16(CAN1_MB31_TIMESTAMP, val)
856#define bfin_read_CAN1_MB31_ID0() bfin_read16(CAN1_MB31_ID0)
857#define bfin_write_CAN1_MB31_ID0(val) bfin_write16(CAN1_MB31_ID0, val)
858#define bfin_read_CAN1_MB31_ID1() bfin_read16(CAN1_MB31_ID1)
859#define bfin_write_CAN1_MB31_ID1(val) bfin_write16(CAN1_MB31_ID1, val)
860
861/* HOST Port Registers */
862
863#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
864#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
865#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
866#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
867#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
868#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
869
870/* Pixel Combfin_read_()ositor (PIXC) Registers */
871
872#define bfin_read_PIXC_CTL() bfin_read16(PIXC_CTL)
873#define bfin_write_PIXC_CTL(val) bfin_write16(PIXC_CTL, val)
874#define bfin_read_PIXC_PPL() bfin_read16(PIXC_PPL)
875#define bfin_write_PIXC_PPL(val) bfin_write16(PIXC_PPL, val)
876#define bfin_read_PIXC_LPF() bfin_read16(PIXC_LPF)
877#define bfin_write_PIXC_LPF(val) bfin_write16(PIXC_LPF, val)
878#define bfin_read_PIXC_AHSTART() bfin_read16(PIXC_AHSTART)
879#define bfin_write_PIXC_AHSTART(val) bfin_write16(PIXC_AHSTART, val)
880#define bfin_read_PIXC_AHEND() bfin_read16(PIXC_AHEND)
881#define bfin_write_PIXC_AHEND(val) bfin_write16(PIXC_AHEND, val)
882#define bfin_read_PIXC_AVSTART() bfin_read16(PIXC_AVSTART)
883#define bfin_write_PIXC_AVSTART(val) bfin_write16(PIXC_AVSTART, val)
884#define bfin_read_PIXC_AVEND() bfin_read16(PIXC_AVEND)
885#define bfin_write_PIXC_AVEND(val) bfin_write16(PIXC_AVEND, val)
886#define bfin_read_PIXC_ATRANSP() bfin_read16(PIXC_ATRANSP)
887#define bfin_write_PIXC_ATRANSP(val) bfin_write16(PIXC_ATRANSP, val)
888#define bfin_read_PIXC_BHSTART() bfin_read16(PIXC_BHSTART)
889#define bfin_write_PIXC_BHSTART(val) bfin_write16(PIXC_BHSTART, val)
890#define bfin_read_PIXC_BHEND() bfin_read16(PIXC_BHEND)
891#define bfin_write_PIXC_BHEND(val) bfin_write16(PIXC_BHEND, val)
892#define bfin_read_PIXC_BVSTART() bfin_read16(PIXC_BVSTART)
893#define bfin_write_PIXC_BVSTART(val) bfin_write16(PIXC_BVSTART, val)
894#define bfin_read_PIXC_BVEND() bfin_read16(PIXC_BVEND)
895#define bfin_write_PIXC_BVEND(val) bfin_write16(PIXC_BVEND, val)
896#define bfin_read_PIXC_BTRANSP() bfin_read16(PIXC_BTRANSP)
897#define bfin_write_PIXC_BTRANSP(val) bfin_write16(PIXC_BTRANSP, val)
898#define bfin_read_PIXC_INTRSTAT() bfin_read16(PIXC_INTRSTAT)
899#define bfin_write_PIXC_INTRSTAT(val) bfin_write16(PIXC_INTRSTAT, val)
900#define bfin_read_PIXC_RYCON() bfin_read32(PIXC_RYCON)
901#define bfin_write_PIXC_RYCON(val) bfin_write32(PIXC_RYCON, val)
902#define bfin_read_PIXC_GUCON() bfin_read32(PIXC_GUCON)
903#define bfin_write_PIXC_GUCON(val) bfin_write32(PIXC_GUCON, val)
904#define bfin_read_PIXC_BVCON() bfin_read32(PIXC_BVCON)
905#define bfin_write_PIXC_BVCON(val) bfin_write32(PIXC_BVCON, val)
906#define bfin_read_PIXC_CCBIAS() bfin_read32(PIXC_CCBIAS)
907#define bfin_write_PIXC_CCBIAS(val) bfin_write32(PIXC_CCBIAS, val)
908#define bfin_read_PIXC_TC() bfin_read32(PIXC_TC)
909#define bfin_write_PIXC_TC(val) bfin_write32(PIXC_TC, val)
910
911/* Handshake MDMA 0 Registers */
912
913#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
914#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
915#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
916#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
917#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
918#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
919#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
920#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
921#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
922#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
923#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
924#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
925#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
926#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
927
928/* Handshake MDMA 1 Registers */
929
930#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
931#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
932#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
933#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
934#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
935#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
936#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
937#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
938#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
939#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
940#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
941#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
942#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
943#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
944
945#endif /* _CDEF_BF544_H */
diff --git a/include/asm-blackfin/mach-bf548/cdefBF547.h b/include/asm-blackfin/mach-bf548/cdefBF547.h
deleted file mode 100644
index ba716277c00d..000000000000
--- a/include/asm-blackfin/mach-bf548/cdefBF547.h
+++ /dev/null
@@ -1,832 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/cdefBF547.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF548_H
32#define _CDEF_BF548_H
33
34/* include all Core registers and bit definitions */
35#include "defBF548.h"
36
37/* include core sbfin_read_()ecific register pointer definitions */
38#include <asm/mach-common/cdef_LPBlackfin.h>
39
40/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF548 */
41
42/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
43#include "cdefBF54x_base.h"
44
45/* The following are the #defines needed by ADSP-BF548 that are not in the common header */
46
47/* Timer Registers */
48
49#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
50#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG, val)
51#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
52#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER, val)
53#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
54#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD, val)
55#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
56#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH, val)
57#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
58#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG, val)
59#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
60#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER, val)
61#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
62#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD, val)
63#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
64#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH, val)
65#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
66#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG, val)
67#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
68#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER, val)
69#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
70#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD, val)
71#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
72#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH, val)
73
74/* Timer Groubfin_read_() of 3 */
75
76#define bfin_read_TIMER_ENABLE1() bfin_read16(TIMER_ENABLE1)
77#define bfin_write_TIMER_ENABLE1(val) bfin_write16(TIMER_ENABLE1, val)
78#define bfin_read_TIMER_DISABLE1() bfin_read16(TIMER_DISABLE1)
79#define bfin_write_TIMER_DISABLE1(val) bfin_write16(TIMER_DISABLE1, val)
80#define bfin_read_TIMER_STATUS1() bfin_read32(TIMER_STATUS1)
81#define bfin_write_TIMER_STATUS1(val) bfin_write32(TIMER_STATUS1, val)
82
83/* SPORT0 Registers */
84
85#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
86#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1, val)
87#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
88#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2, val)
89#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
90#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV, val)
91#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
92#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV, val)
93#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
94#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
95#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
96#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
97#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
98#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
99#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
100#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2, val)
101#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
102#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV, val)
103#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
104#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV, val)
105#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
106#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT, val)
107#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
108#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL, val)
109#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
110#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1, val)
111#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
112#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2, val)
113#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
114#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0, val)
115#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
116#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1, val)
117#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
118#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2, val)
119#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
120#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3, val)
121#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
122#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0, val)
123#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
124#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1, val)
125#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
126#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2, val)
127#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
128#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3, val)
129
130/* EPPI0 Registers */
131
132#define bfin_read_EPPI0_STATUS() bfin_read16(EPPI0_STATUS)
133#define bfin_write_EPPI0_STATUS(val) bfin_write16(EPPI0_STATUS, val)
134#define bfin_read_EPPI0_HCOUNT() bfin_read16(EPPI0_HCOUNT)
135#define bfin_write_EPPI0_HCOUNT(val) bfin_write16(EPPI0_HCOUNT, val)
136#define bfin_read_EPPI0_HDELAY() bfin_read16(EPPI0_HDELAY)
137#define bfin_write_EPPI0_HDELAY(val) bfin_write16(EPPI0_HDELAY, val)
138#define bfin_read_EPPI0_VCOUNT() bfin_read16(EPPI0_VCOUNT)
139#define bfin_write_EPPI0_VCOUNT(val) bfin_write16(EPPI0_VCOUNT, val)
140#define bfin_read_EPPI0_VDELAY() bfin_read16(EPPI0_VDELAY)
141#define bfin_write_EPPI0_VDELAY(val) bfin_write16(EPPI0_VDELAY, val)
142#define bfin_read_EPPI0_FRAME() bfin_read16(EPPI0_FRAME)
143#define bfin_write_EPPI0_FRAME(val) bfin_write16(EPPI0_FRAME, val)
144#define bfin_read_EPPI0_LINE() bfin_read16(EPPI0_LINE)
145#define bfin_write_EPPI0_LINE(val) bfin_write16(EPPI0_LINE, val)
146#define bfin_read_EPPI0_CLKDIV() bfin_read16(EPPI0_CLKDIV)
147#define bfin_write_EPPI0_CLKDIV(val) bfin_write16(EPPI0_CLKDIV, val)
148#define bfin_read_EPPI0_CONTROL() bfin_read32(EPPI0_CONTROL)
149#define bfin_write_EPPI0_CONTROL(val) bfin_write32(EPPI0_CONTROL, val)
150#define bfin_read_EPPI0_FS1W_HBL() bfin_read32(EPPI0_FS1W_HBL)
151#define bfin_write_EPPI0_FS1W_HBL(val) bfin_write32(EPPI0_FS1W_HBL, val)
152#define bfin_read_EPPI0_FS1P_AVPL() bfin_read32(EPPI0_FS1P_AVPL)
153#define bfin_write_EPPI0_FS1P_AVPL(val) bfin_write32(EPPI0_FS1P_AVPL, val)
154#define bfin_read_EPPI0_FS2W_LVB() bfin_read32(EPPI0_FS2W_LVB)
155#define bfin_write_EPPI0_FS2W_LVB(val) bfin_write32(EPPI0_FS2W_LVB, val)
156#define bfin_read_EPPI0_FS2P_LAVF() bfin_read32(EPPI0_FS2P_LAVF)
157#define bfin_write_EPPI0_FS2P_LAVF(val) bfin_write32(EPPI0_FS2P_LAVF, val)
158#define bfin_read_EPPI0_CLIP() bfin_read32(EPPI0_CLIP)
159#define bfin_write_EPPI0_CLIP(val) bfin_write32(EPPI0_CLIP, val)
160
161/* UART2 Registers */
162
163#define bfin_read_UART2_DLL() bfin_read16(UART2_DLL)
164#define bfin_write_UART2_DLL(val) bfin_write16(UART2_DLL, val)
165#define bfin_read_UART2_DLH() bfin_read16(UART2_DLH)
166#define bfin_write_UART2_DLH(val) bfin_write16(UART2_DLH, val)
167#define bfin_read_UART2_GCTL() bfin_read16(UART2_GCTL)
168#define bfin_write_UART2_GCTL(val) bfin_write16(UART2_GCTL, val)
169#define bfin_read_UART2_LCR() bfin_read16(UART2_LCR)
170#define bfin_write_UART2_LCR(val) bfin_write16(UART2_LCR, val)
171#define bfin_read_UART2_MCR() bfin_read16(UART2_MCR)
172#define bfin_write_UART2_MCR(val) bfin_write16(UART2_MCR, val)
173#define bfin_read_UART2_LSR() bfin_read16(UART2_LSR)
174#define bfin_write_UART2_LSR(val) bfin_write16(UART2_LSR, val)
175#define bfin_read_UART2_MSR() bfin_read16(UART2_MSR)
176#define bfin_write_UART2_MSR(val) bfin_write16(UART2_MSR, val)
177#define bfin_read_UART2_SCR() bfin_read16(UART2_SCR)
178#define bfin_write_UART2_SCR(val) bfin_write16(UART2_SCR, val)
179#define bfin_read_UART2_IER_SET() bfin_read16(UART2_IER_SET)
180#define bfin_write_UART2_IER_SET(val) bfin_write16(UART2_IER_SET, val)
181#define bfin_read_UART2_IER_CLEAR() bfin_read16(UART2_IER_CLEAR)
182#define bfin_write_UART2_IER_CLEAR(val) bfin_write16(UART2_IER_CLEAR, val)
183#define bfin_read_UART2_RBR() bfin_read16(UART2_RBR)
184#define bfin_write_UART2_RBR(val) bfin_write16(UART2_RBR, val)
185
186/* Two Wire Interface Registers (TWI1) */
187
188/* SPI2 Registers */
189
190#define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL)
191#define bfin_write_SPI2_CTL(val) bfin_write16(SPI2_CTL, val)
192#define bfin_read_SPI2_FLG() bfin_read16(SPI2_FLG)
193#define bfin_write_SPI2_FLG(val) bfin_write16(SPI2_FLG, val)
194#define bfin_read_SPI2_STAT() bfin_read16(SPI2_STAT)
195#define bfin_write_SPI2_STAT(val) bfin_write16(SPI2_STAT, val)
196#define bfin_read_SPI2_TDBR() bfin_read16(SPI2_TDBR)
197#define bfin_write_SPI2_TDBR(val) bfin_write16(SPI2_TDBR, val)
198#define bfin_read_SPI2_RDBR() bfin_read16(SPI2_RDBR)
199#define bfin_write_SPI2_RDBR(val) bfin_write16(SPI2_RDBR, val)
200#define bfin_read_SPI2_BAUD() bfin_read16(SPI2_BAUD)
201#define bfin_write_SPI2_BAUD(val) bfin_write16(SPI2_BAUD, val)
202#define bfin_read_SPI2_SHADOW() bfin_read16(SPI2_SHADOW)
203#define bfin_write_SPI2_SHADOW(val) bfin_write16(SPI2_SHADOW, val)
204
205/* ATAPI Registers */
206
207#define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL)
208#define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val)
209#define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS)
210#define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val)
211#define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR)
212#define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val)
213#define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF)
214#define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val)
215#define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF)
216#define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val)
217#define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK)
218#define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val)
219#define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS)
220#define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val)
221#define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN)
222#define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val)
223#define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS)
224#define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val)
225#define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE)
226#define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val)
227#define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE)
228#define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val)
229#define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT)
230#define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val)
231#define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT)
232#define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val)
233#define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT)
234#define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val)
235#define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT)
236#define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val)
237#define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0)
238#define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val)
239#define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0)
240#define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val)
241#define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1)
242#define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val)
243#define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0)
244#define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val)
245#define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1)
246#define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val)
247#define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2)
248#define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val)
249#define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0)
250#define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val)
251#define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1)
252#define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val)
253#define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2)
254#define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val)
255#define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3)
256#define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val)
257
258/* SDH Registers */
259
260#define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL)
261#define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val)
262#define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL)
263#define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val)
264#define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT)
265#define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val)
266#define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND)
267#define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val)
268#define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD)
269#define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val)
270#define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0)
271#define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val)
272#define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1)
273#define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val)
274#define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2)
275#define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val)
276#define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3)
277#define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val)
278#define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER)
279#define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val)
280#define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH)
281#define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val)
282#define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL)
283#define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val)
284#define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT)
285#define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val)
286#define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS)
287#define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val)
288#define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR)
289#define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val)
290#define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0)
291#define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val)
292#define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1)
293#define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val)
294#define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT)
295#define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val)
296#define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO)
297#define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val)
298#define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS)
299#define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val)
300#define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK)
301#define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val)
302#define bfin_read_SDH_CFG() bfin_read16(SDH_CFG)
303#define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val)
304#define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN)
305#define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val)
306#define bfin_read_SDH_PID0() bfin_read16(SDH_PID0)
307#define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val)
308#define bfin_read_SDH_PID1() bfin_read16(SDH_PID1)
309#define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val)
310#define bfin_read_SDH_PID2() bfin_read16(SDH_PID2)
311#define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val)
312#define bfin_read_SDH_PID3() bfin_read16(SDH_PID3)
313#define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val)
314#define bfin_read_SDH_PID4() bfin_read16(SDH_PID4)
315#define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val)
316#define bfin_read_SDH_PID5() bfin_read16(SDH_PID5)
317#define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val)
318#define bfin_read_SDH_PID6() bfin_read16(SDH_PID6)
319#define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val)
320#define bfin_read_SDH_PID7() bfin_read16(SDH_PID7)
321#define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val)
322
323/* HOST Port Registers */
324
325#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
326#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
327#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
328#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
329#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
330#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
331
332/* USB Control Registers */
333
334#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
335#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
336#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
337#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
338#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
339#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
340#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
341#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
342#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
343#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
344#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
345#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
346#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
347#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
348#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
349#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
350#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
351#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
352#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
353#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
354#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
355#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
356#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
357#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
358#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
359#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
360
361/* USB Packet Control Registers */
362
363#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
364#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
365#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
366#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
367#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
368#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
369#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
370#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
371#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
372#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
373#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
374#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
375#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
376#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
377#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
378#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
379#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
380#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
381#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
382#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
383#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
384#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
385#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
386#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
387#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
388#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
389
390/* USB Endbfin_read_()oint FIFO Registers */
391
392#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
393#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
394#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
395#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
396#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
397#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
398#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
399#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
400#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
401#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
402#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
403#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
404#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
405#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
406#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
407#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
408
409/* USB OTG Control Registers */
410
411#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
412#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
413#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
414#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
415#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
416#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
417
418/* USB Phy Control Registers */
419
420#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
421#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
422#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
423#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
424#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
425#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
426#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
427#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
428#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
429#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
430
431/* (APHY_CNTRL is for ADI usage only) */
432
433#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
434#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
435
436/* (APHY_CALIB is for ADI usage only) */
437
438#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
439#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
440#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
441#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
442
443/* (PHY_TEST is for ADI usage only) */
444
445#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
446#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
447#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
448#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
449#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
450#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
451
452/* USB Endbfin_read_()oint 0 Control Registers */
453
454#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
455#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
456#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
457#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
458#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
459#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
460#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
461#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
462#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
463#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
464#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
465#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
466#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
467#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
468#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
469#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
470#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
471#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
472
473/* USB Endbfin_read_()oint 1 Control Registers */
474
475#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
476#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
477#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
478#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
479#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
480#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
481#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
482#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
483#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
484#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
485#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
486#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
487#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
488#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
489#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
490#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
491#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
492#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
493#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
494#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
495
496/* USB Endbfin_read_()oint 2 Control Registers */
497
498#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
499#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
500#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
501#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
502#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
503#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
504#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
505#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
506#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
507#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
508#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
509#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
510#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
511#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
512#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
513#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
514#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
515#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
516#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
517#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
518
519/* USB Endbfin_read_()oint 3 Control Registers */
520
521#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
522#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
523#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
524#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
525#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
526#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
527#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
528#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
529#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
530#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
531#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
532#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
533#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
534#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
535#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
536#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
537#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
538#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
539#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
540#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
541
542/* USB Endbfin_read_()oint 4 Control Registers */
543
544#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
545#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
546#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
547#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
548#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
549#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
550#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
551#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
552#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
553#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
554#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
555#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
556#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
557#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
558#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
559#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
560#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
561#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
562#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
563#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
564
565/* USB Endbfin_read_()oint 5 Control Registers */
566
567#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
568#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
569#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
570#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
571#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
572#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
573#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
574#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
575#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
576#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
577#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
578#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
579#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
580#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
581#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
582#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
583#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
584#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
585#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
586#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
587
588/* USB Endbfin_read_()oint 6 Control Registers */
589
590#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
591#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
592#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
593#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
594#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
595#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
596#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
597#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
598#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
599#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
600#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
601#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
602#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
603#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
604#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
605#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
606#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
607#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
608#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
609#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
610
611/* USB Endbfin_read_()oint 7 Control Registers */
612
613#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
614#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
615#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
616#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
617#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
618#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
619#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
620#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
621#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
622#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
623#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
624#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
625#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
626#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
627#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
628#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
629#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
630#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
631#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
632#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
633#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
634#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
635#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
636#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
637
638/* USB Channel 0 Config Registers */
639
640#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
641#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
642#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
643#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
644#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
645#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
646#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
647#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
648#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
649#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
650
651/* USB Channel 1 Config Registers */
652
653#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
654#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
655#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
656#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
657#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
658#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
659#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
660#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
661#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
662#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
663
664/* USB Channel 2 Config Registers */
665
666#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
667#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
668#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
669#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
670#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
671#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
672#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
673#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
674#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
675#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
676
677/* USB Channel 3 Config Registers */
678
679#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
680#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
681#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
682#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
683#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
684#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
685#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
686#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
687#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
688#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
689
690/* USB Channel 4 Config Registers */
691
692#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
693#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
694#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
695#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
696#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
697#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
698#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
699#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
700#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
701#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
702
703/* USB Channel 5 Config Registers */
704
705#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
706#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
707#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
708#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
709#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
710#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
711#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
712#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
713#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
714#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
715
716/* USB Channel 6 Config Registers */
717
718#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
719#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
720#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
721#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
722#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
723#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
724#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
725#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
726#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
727#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
728
729/* USB Channel 7 Config Registers */
730
731#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
732#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
733#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
734#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
735#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
736#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
737#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
738#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
739#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
740#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
741
742/* Keybfin_read_()ad Registers */
743
744#define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL)
745#define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val)
746#define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE)
747#define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val)
748#define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL)
749#define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val)
750#define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL)
751#define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val)
752#define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT)
753#define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val)
754#define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL)
755#define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val)
756
757/* Pixel Combfin_read_()ositor (PIXC) Registers */
758
759#define bfin_read_PIXC_CTL() bfin_read16(PIXC_CTL)
760#define bfin_write_PIXC_CTL(val) bfin_write16(PIXC_CTL, val)
761#define bfin_read_PIXC_PPL() bfin_read16(PIXC_PPL)
762#define bfin_write_PIXC_PPL(val) bfin_write16(PIXC_PPL, val)
763#define bfin_read_PIXC_LPF() bfin_read16(PIXC_LPF)
764#define bfin_write_PIXC_LPF(val) bfin_write16(PIXC_LPF, val)
765#define bfin_read_PIXC_AHSTART() bfin_read16(PIXC_AHSTART)
766#define bfin_write_PIXC_AHSTART(val) bfin_write16(PIXC_AHSTART, val)
767#define bfin_read_PIXC_AHEND() bfin_read16(PIXC_AHEND)
768#define bfin_write_PIXC_AHEND(val) bfin_write16(PIXC_AHEND, val)
769#define bfin_read_PIXC_AVSTART() bfin_read16(PIXC_AVSTART)
770#define bfin_write_PIXC_AVSTART(val) bfin_write16(PIXC_AVSTART, val)
771#define bfin_read_PIXC_AVEND() bfin_read16(PIXC_AVEND)
772#define bfin_write_PIXC_AVEND(val) bfin_write16(PIXC_AVEND, val)
773#define bfin_read_PIXC_ATRANSP() bfin_read16(PIXC_ATRANSP)
774#define bfin_write_PIXC_ATRANSP(val) bfin_write16(PIXC_ATRANSP, val)
775#define bfin_read_PIXC_BHSTART() bfin_read16(PIXC_BHSTART)
776#define bfin_write_PIXC_BHSTART(val) bfin_write16(PIXC_BHSTART, val)
777#define bfin_read_PIXC_BHEND() bfin_read16(PIXC_BHEND)
778#define bfin_write_PIXC_BHEND(val) bfin_write16(PIXC_BHEND, val)
779#define bfin_read_PIXC_BVSTART() bfin_read16(PIXC_BVSTART)
780#define bfin_write_PIXC_BVSTART(val) bfin_write16(PIXC_BVSTART, val)
781#define bfin_read_PIXC_BVEND() bfin_read16(PIXC_BVEND)
782#define bfin_write_PIXC_BVEND(val) bfin_write16(PIXC_BVEND, val)
783#define bfin_read_PIXC_BTRANSP() bfin_read16(PIXC_BTRANSP)
784#define bfin_write_PIXC_BTRANSP(val) bfin_write16(PIXC_BTRANSP, val)
785#define bfin_read_PIXC_INTRSTAT() bfin_read16(PIXC_INTRSTAT)
786#define bfin_write_PIXC_INTRSTAT(val) bfin_write16(PIXC_INTRSTAT, val)
787#define bfin_read_PIXC_RYCON() bfin_read32(PIXC_RYCON)
788#define bfin_write_PIXC_RYCON(val) bfin_write32(PIXC_RYCON, val)
789#define bfin_read_PIXC_GUCON() bfin_read32(PIXC_GUCON)
790#define bfin_write_PIXC_GUCON(val) bfin_write32(PIXC_GUCON, val)
791#define bfin_read_PIXC_BVCON() bfin_read32(PIXC_BVCON)
792#define bfin_write_PIXC_BVCON(val) bfin_write32(PIXC_BVCON, val)
793#define bfin_read_PIXC_CCBIAS() bfin_read32(PIXC_CCBIAS)
794#define bfin_write_PIXC_CCBIAS(val) bfin_write32(PIXC_CCBIAS, val)
795#define bfin_read_PIXC_TC() bfin_read32(PIXC_TC)
796#define bfin_write_PIXC_TC(val) bfin_write32(PIXC_TC, val)
797
798/* Handshake MDMA 0 Registers */
799
800#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
801#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
802#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
803#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
804#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
805#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
806#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
807#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
808#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
809#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
810#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
811#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
812#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
813#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
814
815/* Handshake MDMA 1 Registers */
816
817#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
818#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
819#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
820#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
821#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
822#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
823#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
824#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
825#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
826#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
827#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
828#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
829#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
830#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
831
832#endif /* _CDEF_BF548_H */
diff --git a/include/asm-blackfin/mach-bf548/cdefBF548.h b/include/asm-blackfin/mach-bf548/cdefBF548.h
deleted file mode 100644
index ae971ebff6a0..000000000000
--- a/include/asm-blackfin/mach-bf548/cdefBF548.h
+++ /dev/null
@@ -1,1577 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/cdefBF548.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF548_H
32#define _CDEF_BF548_H
33
34/* include all Core registers and bit definitions */
35#include "defBF548.h"
36
37/* include core sbfin_read_()ecific register pointer definitions */
38#include <asm/mach-common/cdef_LPBlackfin.h>
39
40/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF548 */
41
42/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
43#include "cdefBF54x_base.h"
44
45/* The following are the #defines needed by ADSP-BF548 that are not in the common header */
46
47/* Timer Registers */
48
49#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
50#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG, val)
51#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
52#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER, val)
53#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
54#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD, val)
55#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
56#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH, val)
57#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
58#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG, val)
59#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
60#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER, val)
61#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
62#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD, val)
63#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
64#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH, val)
65#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
66#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG, val)
67#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
68#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER, val)
69#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
70#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD, val)
71#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
72#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH, val)
73
74/* Timer Groubfin_read_() of 3 */
75
76#define bfin_read_TIMER_ENABLE1() bfin_read16(TIMER_ENABLE1)
77#define bfin_write_TIMER_ENABLE1(val) bfin_write16(TIMER_ENABLE1, val)
78#define bfin_read_TIMER_DISABLE1() bfin_read16(TIMER_DISABLE1)
79#define bfin_write_TIMER_DISABLE1(val) bfin_write16(TIMER_DISABLE1, val)
80#define bfin_read_TIMER_STATUS1() bfin_read32(TIMER_STATUS1)
81#define bfin_write_TIMER_STATUS1(val) bfin_write32(TIMER_STATUS1, val)
82
83/* SPORT0 Registers */
84
85#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
86#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1, val)
87#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
88#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2, val)
89#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
90#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV, val)
91#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
92#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV, val)
93#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
94#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
95#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
96#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
97#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
98#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
99#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
100#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2, val)
101#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
102#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV, val)
103#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
104#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV, val)
105#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
106#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT, val)
107#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
108#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL, val)
109#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
110#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1, val)
111#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
112#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2, val)
113#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
114#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0, val)
115#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
116#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1, val)
117#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
118#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2, val)
119#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
120#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3, val)
121#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
122#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0, val)
123#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
124#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1, val)
125#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
126#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2, val)
127#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
128#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3, val)
129
130/* EPPI0 Registers */
131
132#define bfin_read_EPPI0_STATUS() bfin_read16(EPPI0_STATUS)
133#define bfin_write_EPPI0_STATUS(val) bfin_write16(EPPI0_STATUS, val)
134#define bfin_read_EPPI0_HCOUNT() bfin_read16(EPPI0_HCOUNT)
135#define bfin_write_EPPI0_HCOUNT(val) bfin_write16(EPPI0_HCOUNT, val)
136#define bfin_read_EPPI0_HDELAY() bfin_read16(EPPI0_HDELAY)
137#define bfin_write_EPPI0_HDELAY(val) bfin_write16(EPPI0_HDELAY, val)
138#define bfin_read_EPPI0_VCOUNT() bfin_read16(EPPI0_VCOUNT)
139#define bfin_write_EPPI0_VCOUNT(val) bfin_write16(EPPI0_VCOUNT, val)
140#define bfin_read_EPPI0_VDELAY() bfin_read16(EPPI0_VDELAY)
141#define bfin_write_EPPI0_VDELAY(val) bfin_write16(EPPI0_VDELAY, val)
142#define bfin_read_EPPI0_FRAME() bfin_read16(EPPI0_FRAME)
143#define bfin_write_EPPI0_FRAME(val) bfin_write16(EPPI0_FRAME, val)
144#define bfin_read_EPPI0_LINE() bfin_read16(EPPI0_LINE)
145#define bfin_write_EPPI0_LINE(val) bfin_write16(EPPI0_LINE, val)
146#define bfin_read_EPPI0_CLKDIV() bfin_read16(EPPI0_CLKDIV)
147#define bfin_write_EPPI0_CLKDIV(val) bfin_write16(EPPI0_CLKDIV, val)
148#define bfin_read_EPPI0_CONTROL() bfin_read32(EPPI0_CONTROL)
149#define bfin_write_EPPI0_CONTROL(val) bfin_write32(EPPI0_CONTROL, val)
150#define bfin_read_EPPI0_FS1W_HBL() bfin_read32(EPPI0_FS1W_HBL)
151#define bfin_write_EPPI0_FS1W_HBL(val) bfin_write32(EPPI0_FS1W_HBL, val)
152#define bfin_read_EPPI0_FS1P_AVPL() bfin_read32(EPPI0_FS1P_AVPL)
153#define bfin_write_EPPI0_FS1P_AVPL(val) bfin_write32(EPPI0_FS1P_AVPL, val)
154#define bfin_read_EPPI0_FS2W_LVB() bfin_read32(EPPI0_FS2W_LVB)
155#define bfin_write_EPPI0_FS2W_LVB(val) bfin_write32(EPPI0_FS2W_LVB, val)
156#define bfin_read_EPPI0_FS2P_LAVF() bfin_read32(EPPI0_FS2P_LAVF)
157#define bfin_write_EPPI0_FS2P_LAVF(val) bfin_write32(EPPI0_FS2P_LAVF, val)
158#define bfin_read_EPPI0_CLIP() bfin_read32(EPPI0_CLIP)
159#define bfin_write_EPPI0_CLIP(val) bfin_write32(EPPI0_CLIP, val)
160
161/* UART2 Registers */
162
163#define bfin_read_UART2_DLL() bfin_read16(UART2_DLL)
164#define bfin_write_UART2_DLL(val) bfin_write16(UART2_DLL, val)
165#define bfin_read_UART2_DLH() bfin_read16(UART2_DLH)
166#define bfin_write_UART2_DLH(val) bfin_write16(UART2_DLH, val)
167#define bfin_read_UART2_GCTL() bfin_read16(UART2_GCTL)
168#define bfin_write_UART2_GCTL(val) bfin_write16(UART2_GCTL, val)
169#define bfin_read_UART2_LCR() bfin_read16(UART2_LCR)
170#define bfin_write_UART2_LCR(val) bfin_write16(UART2_LCR, val)
171#define bfin_read_UART2_MCR() bfin_read16(UART2_MCR)
172#define bfin_write_UART2_MCR(val) bfin_write16(UART2_MCR, val)
173#define bfin_read_UART2_LSR() bfin_read16(UART2_LSR)
174#define bfin_write_UART2_LSR(val) bfin_write16(UART2_LSR, val)
175#define bfin_read_UART2_MSR() bfin_read16(UART2_MSR)
176#define bfin_write_UART2_MSR(val) bfin_write16(UART2_MSR, val)
177#define bfin_read_UART2_SCR() bfin_read16(UART2_SCR)
178#define bfin_write_UART2_SCR(val) bfin_write16(UART2_SCR, val)
179#define bfin_read_UART2_IER_SET() bfin_read16(UART2_IER_SET)
180#define bfin_write_UART2_IER_SET(val) bfin_write16(UART2_IER_SET, val)
181#define bfin_read_UART2_IER_CLEAR() bfin_read16(UART2_IER_CLEAR)
182#define bfin_write_UART2_IER_CLEAR(val) bfin_write16(UART2_IER_CLEAR, val)
183#define bfin_read_UART2_RBR() bfin_read16(UART2_RBR)
184#define bfin_write_UART2_RBR(val) bfin_write16(UART2_RBR, val)
185
186/* Two Wire Interface Registers (TWI1) */
187
188/* SPI2 Registers */
189
190#define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL)
191#define bfin_write_SPI2_CTL(val) bfin_write16(SPI2_CTL, val)
192#define bfin_read_SPI2_FLG() bfin_read16(SPI2_FLG)
193#define bfin_write_SPI2_FLG(val) bfin_write16(SPI2_FLG, val)
194#define bfin_read_SPI2_STAT() bfin_read16(SPI2_STAT)
195#define bfin_write_SPI2_STAT(val) bfin_write16(SPI2_STAT, val)
196#define bfin_read_SPI2_TDBR() bfin_read16(SPI2_TDBR)
197#define bfin_write_SPI2_TDBR(val) bfin_write16(SPI2_TDBR, val)
198#define bfin_read_SPI2_RDBR() bfin_read16(SPI2_RDBR)
199#define bfin_write_SPI2_RDBR(val) bfin_write16(SPI2_RDBR, val)
200#define bfin_read_SPI2_BAUD() bfin_read16(SPI2_BAUD)
201#define bfin_write_SPI2_BAUD(val) bfin_write16(SPI2_BAUD, val)
202#define bfin_read_SPI2_SHADOW() bfin_read16(SPI2_SHADOW)
203#define bfin_write_SPI2_SHADOW(val) bfin_write16(SPI2_SHADOW, val)
204
205/* CAN Controller 1 Config 1 Registers */
206
207#define bfin_read_CAN1_MC1() bfin_read16(CAN1_MC1)
208#define bfin_write_CAN1_MC1(val) bfin_write16(CAN1_MC1, val)
209#define bfin_read_CAN1_MD1() bfin_read16(CAN1_MD1)
210#define bfin_write_CAN1_MD1(val) bfin_write16(CAN1_MD1, val)
211#define bfin_read_CAN1_TRS1() bfin_read16(CAN1_TRS1)
212#define bfin_write_CAN1_TRS1(val) bfin_write16(CAN1_TRS1, val)
213#define bfin_read_CAN1_TRR1() bfin_read16(CAN1_TRR1)
214#define bfin_write_CAN1_TRR1(val) bfin_write16(CAN1_TRR1, val)
215#define bfin_read_CAN1_TA1() bfin_read16(CAN1_TA1)
216#define bfin_write_CAN1_TA1(val) bfin_write16(CAN1_TA1, val)
217#define bfin_read_CAN1_AA1() bfin_read16(CAN1_AA1)
218#define bfin_write_CAN1_AA1(val) bfin_write16(CAN1_AA1, val)
219#define bfin_read_CAN1_RMP1() bfin_read16(CAN1_RMP1)
220#define bfin_write_CAN1_RMP1(val) bfin_write16(CAN1_RMP1, val)
221#define bfin_read_CAN1_RML1() bfin_read16(CAN1_RML1)
222#define bfin_write_CAN1_RML1(val) bfin_write16(CAN1_RML1, val)
223#define bfin_read_CAN1_MBTIF1() bfin_read16(CAN1_MBTIF1)
224#define bfin_write_CAN1_MBTIF1(val) bfin_write16(CAN1_MBTIF1, val)
225#define bfin_read_CAN1_MBRIF1() bfin_read16(CAN1_MBRIF1)
226#define bfin_write_CAN1_MBRIF1(val) bfin_write16(CAN1_MBRIF1, val)
227#define bfin_read_CAN1_MBIM1() bfin_read16(CAN1_MBIM1)
228#define bfin_write_CAN1_MBIM1(val) bfin_write16(CAN1_MBIM1, val)
229#define bfin_read_CAN1_RFH1() bfin_read16(CAN1_RFH1)
230#define bfin_write_CAN1_RFH1(val) bfin_write16(CAN1_RFH1, val)
231#define bfin_read_CAN1_OPSS1() bfin_read16(CAN1_OPSS1)
232#define bfin_write_CAN1_OPSS1(val) bfin_write16(CAN1_OPSS1, val)
233
234/* CAN Controller 1 Config 2 Registers */
235
236#define bfin_read_CAN1_MC2() bfin_read16(CAN1_MC2)
237#define bfin_write_CAN1_MC2(val) bfin_write16(CAN1_MC2, val)
238#define bfin_read_CAN1_MD2() bfin_read16(CAN1_MD2)
239#define bfin_write_CAN1_MD2(val) bfin_write16(CAN1_MD2, val)
240#define bfin_read_CAN1_TRS2() bfin_read16(CAN1_TRS2)
241#define bfin_write_CAN1_TRS2(val) bfin_write16(CAN1_TRS2, val)
242#define bfin_read_CAN1_TRR2() bfin_read16(CAN1_TRR2)
243#define bfin_write_CAN1_TRR2(val) bfin_write16(CAN1_TRR2, val)
244#define bfin_read_CAN1_TA2() bfin_read16(CAN1_TA2)
245#define bfin_write_CAN1_TA2(val) bfin_write16(CAN1_TA2, val)
246#define bfin_read_CAN1_AA2() bfin_read16(CAN1_AA2)
247#define bfin_write_CAN1_AA2(val) bfin_write16(CAN1_AA2, val)
248#define bfin_read_CAN1_RMP2() bfin_read16(CAN1_RMP2)
249#define bfin_write_CAN1_RMP2(val) bfin_write16(CAN1_RMP2, val)
250#define bfin_read_CAN1_RML2() bfin_read16(CAN1_RML2)
251#define bfin_write_CAN1_RML2(val) bfin_write16(CAN1_RML2, val)
252#define bfin_read_CAN1_MBTIF2() bfin_read16(CAN1_MBTIF2)
253#define bfin_write_CAN1_MBTIF2(val) bfin_write16(CAN1_MBTIF2, val)
254#define bfin_read_CAN1_MBRIF2() bfin_read16(CAN1_MBRIF2)
255#define bfin_write_CAN1_MBRIF2(val) bfin_write16(CAN1_MBRIF2, val)
256#define bfin_read_CAN1_MBIM2() bfin_read16(CAN1_MBIM2)
257#define bfin_write_CAN1_MBIM2(val) bfin_write16(CAN1_MBIM2, val)
258#define bfin_read_CAN1_RFH2() bfin_read16(CAN1_RFH2)
259#define bfin_write_CAN1_RFH2(val) bfin_write16(CAN1_RFH2, val)
260#define bfin_read_CAN1_OPSS2() bfin_read16(CAN1_OPSS2)
261#define bfin_write_CAN1_OPSS2(val) bfin_write16(CAN1_OPSS2, val)
262
263/* CAN Controller 1 Clock/Interrubfin_read_()t/Counter Registers */
264
265#define bfin_read_CAN1_CLOCK() bfin_read16(CAN1_CLOCK)
266#define bfin_write_CAN1_CLOCK(val) bfin_write16(CAN1_CLOCK, val)
267#define bfin_read_CAN1_TIMING() bfin_read16(CAN1_TIMING)
268#define bfin_write_CAN1_TIMING(val) bfin_write16(CAN1_TIMING, val)
269#define bfin_read_CAN1_DEBUG() bfin_read16(CAN1_DEBUG)
270#define bfin_write_CAN1_DEBUG(val) bfin_write16(CAN1_DEBUG, val)
271#define bfin_read_CAN1_STATUS() bfin_read16(CAN1_STATUS)
272#define bfin_write_CAN1_STATUS(val) bfin_write16(CAN1_STATUS, val)
273#define bfin_read_CAN1_CEC() bfin_read16(CAN1_CEC)
274#define bfin_write_CAN1_CEC(val) bfin_write16(CAN1_CEC, val)
275#define bfin_read_CAN1_GIS() bfin_read16(CAN1_GIS)
276#define bfin_write_CAN1_GIS(val) bfin_write16(CAN1_GIS, val)
277#define bfin_read_CAN1_GIM() bfin_read16(CAN1_GIM)
278#define bfin_write_CAN1_GIM(val) bfin_write16(CAN1_GIM, val)
279#define bfin_read_CAN1_GIF() bfin_read16(CAN1_GIF)
280#define bfin_write_CAN1_GIF(val) bfin_write16(CAN1_GIF, val)
281#define bfin_read_CAN1_CONTROL() bfin_read16(CAN1_CONTROL)
282#define bfin_write_CAN1_CONTROL(val) bfin_write16(CAN1_CONTROL, val)
283#define bfin_read_CAN1_INTR() bfin_read16(CAN1_INTR)
284#define bfin_write_CAN1_INTR(val) bfin_write16(CAN1_INTR, val)
285#define bfin_read_CAN1_MBTD() bfin_read16(CAN1_MBTD)
286#define bfin_write_CAN1_MBTD(val) bfin_write16(CAN1_MBTD, val)
287#define bfin_read_CAN1_EWR() bfin_read16(CAN1_EWR)
288#define bfin_write_CAN1_EWR(val) bfin_write16(CAN1_EWR, val)
289#define bfin_read_CAN1_ESR() bfin_read16(CAN1_ESR)
290#define bfin_write_CAN1_ESR(val) bfin_write16(CAN1_ESR, val)
291#define bfin_read_CAN1_UCCNT() bfin_read16(CAN1_UCCNT)
292#define bfin_write_CAN1_UCCNT(val) bfin_write16(CAN1_UCCNT, val)
293#define bfin_read_CAN1_UCRC() bfin_read16(CAN1_UCRC)
294#define bfin_write_CAN1_UCRC(val) bfin_write16(CAN1_UCRC, val)
295#define bfin_read_CAN1_UCCNF() bfin_read16(CAN1_UCCNF)
296#define bfin_write_CAN1_UCCNF(val) bfin_write16(CAN1_UCCNF, val)
297
298/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
299
300#define bfin_read_CAN1_AM00L() bfin_read16(CAN1_AM00L)
301#define bfin_write_CAN1_AM00L(val) bfin_write16(CAN1_AM00L, val)
302#define bfin_read_CAN1_AM00H() bfin_read16(CAN1_AM00H)
303#define bfin_write_CAN1_AM00H(val) bfin_write16(CAN1_AM00H, val)
304#define bfin_read_CAN1_AM01L() bfin_read16(CAN1_AM01L)
305#define bfin_write_CAN1_AM01L(val) bfin_write16(CAN1_AM01L, val)
306#define bfin_read_CAN1_AM01H() bfin_read16(CAN1_AM01H)
307#define bfin_write_CAN1_AM01H(val) bfin_write16(CAN1_AM01H, val)
308#define bfin_read_CAN1_AM02L() bfin_read16(CAN1_AM02L)
309#define bfin_write_CAN1_AM02L(val) bfin_write16(CAN1_AM02L, val)
310#define bfin_read_CAN1_AM02H() bfin_read16(CAN1_AM02H)
311#define bfin_write_CAN1_AM02H(val) bfin_write16(CAN1_AM02H, val)
312#define bfin_read_CAN1_AM03L() bfin_read16(CAN1_AM03L)
313#define bfin_write_CAN1_AM03L(val) bfin_write16(CAN1_AM03L, val)
314#define bfin_read_CAN1_AM03H() bfin_read16(CAN1_AM03H)
315#define bfin_write_CAN1_AM03H(val) bfin_write16(CAN1_AM03H, val)
316#define bfin_read_CAN1_AM04L() bfin_read16(CAN1_AM04L)
317#define bfin_write_CAN1_AM04L(val) bfin_write16(CAN1_AM04L, val)
318#define bfin_read_CAN1_AM04H() bfin_read16(CAN1_AM04H)
319#define bfin_write_CAN1_AM04H(val) bfin_write16(CAN1_AM04H, val)
320#define bfin_read_CAN1_AM05L() bfin_read16(CAN1_AM05L)
321#define bfin_write_CAN1_AM05L(val) bfin_write16(CAN1_AM05L, val)
322#define bfin_read_CAN1_AM05H() bfin_read16(CAN1_AM05H)
323#define bfin_write_CAN1_AM05H(val) bfin_write16(CAN1_AM05H, val)
324#define bfin_read_CAN1_AM06L() bfin_read16(CAN1_AM06L)
325#define bfin_write_CAN1_AM06L(val) bfin_write16(CAN1_AM06L, val)
326#define bfin_read_CAN1_AM06H() bfin_read16(CAN1_AM06H)
327#define bfin_write_CAN1_AM06H(val) bfin_write16(CAN1_AM06H, val)
328#define bfin_read_CAN1_AM07L() bfin_read16(CAN1_AM07L)
329#define bfin_write_CAN1_AM07L(val) bfin_write16(CAN1_AM07L, val)
330#define bfin_read_CAN1_AM07H() bfin_read16(CAN1_AM07H)
331#define bfin_write_CAN1_AM07H(val) bfin_write16(CAN1_AM07H, val)
332#define bfin_read_CAN1_AM08L() bfin_read16(CAN1_AM08L)
333#define bfin_write_CAN1_AM08L(val) bfin_write16(CAN1_AM08L, val)
334#define bfin_read_CAN1_AM08H() bfin_read16(CAN1_AM08H)
335#define bfin_write_CAN1_AM08H(val) bfin_write16(CAN1_AM08H, val)
336#define bfin_read_CAN1_AM09L() bfin_read16(CAN1_AM09L)
337#define bfin_write_CAN1_AM09L(val) bfin_write16(CAN1_AM09L, val)
338#define bfin_read_CAN1_AM09H() bfin_read16(CAN1_AM09H)
339#define bfin_write_CAN1_AM09H(val) bfin_write16(CAN1_AM09H, val)
340#define bfin_read_CAN1_AM10L() bfin_read16(CAN1_AM10L)
341#define bfin_write_CAN1_AM10L(val) bfin_write16(CAN1_AM10L, val)
342#define bfin_read_CAN1_AM10H() bfin_read16(CAN1_AM10H)
343#define bfin_write_CAN1_AM10H(val) bfin_write16(CAN1_AM10H, val)
344#define bfin_read_CAN1_AM11L() bfin_read16(CAN1_AM11L)
345#define bfin_write_CAN1_AM11L(val) bfin_write16(CAN1_AM11L, val)
346#define bfin_read_CAN1_AM11H() bfin_read16(CAN1_AM11H)
347#define bfin_write_CAN1_AM11H(val) bfin_write16(CAN1_AM11H, val)
348#define bfin_read_CAN1_AM12L() bfin_read16(CAN1_AM12L)
349#define bfin_write_CAN1_AM12L(val) bfin_write16(CAN1_AM12L, val)
350#define bfin_read_CAN1_AM12H() bfin_read16(CAN1_AM12H)
351#define bfin_write_CAN1_AM12H(val) bfin_write16(CAN1_AM12H, val)
352#define bfin_read_CAN1_AM13L() bfin_read16(CAN1_AM13L)
353#define bfin_write_CAN1_AM13L(val) bfin_write16(CAN1_AM13L, val)
354#define bfin_read_CAN1_AM13H() bfin_read16(CAN1_AM13H)
355#define bfin_write_CAN1_AM13H(val) bfin_write16(CAN1_AM13H, val)
356#define bfin_read_CAN1_AM14L() bfin_read16(CAN1_AM14L)
357#define bfin_write_CAN1_AM14L(val) bfin_write16(CAN1_AM14L, val)
358#define bfin_read_CAN1_AM14H() bfin_read16(CAN1_AM14H)
359#define bfin_write_CAN1_AM14H(val) bfin_write16(CAN1_AM14H, val)
360#define bfin_read_CAN1_AM15L() bfin_read16(CAN1_AM15L)
361#define bfin_write_CAN1_AM15L(val) bfin_write16(CAN1_AM15L, val)
362#define bfin_read_CAN1_AM15H() bfin_read16(CAN1_AM15H)
363#define bfin_write_CAN1_AM15H(val) bfin_write16(CAN1_AM15H, val)
364
365/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
366
367#define bfin_read_CAN1_AM16L() bfin_read16(CAN1_AM16L)
368#define bfin_write_CAN1_AM16L(val) bfin_write16(CAN1_AM16L, val)
369#define bfin_read_CAN1_AM16H() bfin_read16(CAN1_AM16H)
370#define bfin_write_CAN1_AM16H(val) bfin_write16(CAN1_AM16H, val)
371#define bfin_read_CAN1_AM17L() bfin_read16(CAN1_AM17L)
372#define bfin_write_CAN1_AM17L(val) bfin_write16(CAN1_AM17L, val)
373#define bfin_read_CAN1_AM17H() bfin_read16(CAN1_AM17H)
374#define bfin_write_CAN1_AM17H(val) bfin_write16(CAN1_AM17H, val)
375#define bfin_read_CAN1_AM18L() bfin_read16(CAN1_AM18L)
376#define bfin_write_CAN1_AM18L(val) bfin_write16(CAN1_AM18L, val)
377#define bfin_read_CAN1_AM18H() bfin_read16(CAN1_AM18H)
378#define bfin_write_CAN1_AM18H(val) bfin_write16(CAN1_AM18H, val)
379#define bfin_read_CAN1_AM19L() bfin_read16(CAN1_AM19L)
380#define bfin_write_CAN1_AM19L(val) bfin_write16(CAN1_AM19L, val)
381#define bfin_read_CAN1_AM19H() bfin_read16(CAN1_AM19H)
382#define bfin_write_CAN1_AM19H(val) bfin_write16(CAN1_AM19H, val)
383#define bfin_read_CAN1_AM20L() bfin_read16(CAN1_AM20L)
384#define bfin_write_CAN1_AM20L(val) bfin_write16(CAN1_AM20L, val)
385#define bfin_read_CAN1_AM20H() bfin_read16(CAN1_AM20H)
386#define bfin_write_CAN1_AM20H(val) bfin_write16(CAN1_AM20H, val)
387#define bfin_read_CAN1_AM21L() bfin_read16(CAN1_AM21L)
388#define bfin_write_CAN1_AM21L(val) bfin_write16(CAN1_AM21L, val)
389#define bfin_read_CAN1_AM21H() bfin_read16(CAN1_AM21H)
390#define bfin_write_CAN1_AM21H(val) bfin_write16(CAN1_AM21H, val)
391#define bfin_read_CAN1_AM22L() bfin_read16(CAN1_AM22L)
392#define bfin_write_CAN1_AM22L(val) bfin_write16(CAN1_AM22L, val)
393#define bfin_read_CAN1_AM22H() bfin_read16(CAN1_AM22H)
394#define bfin_write_CAN1_AM22H(val) bfin_write16(CAN1_AM22H, val)
395#define bfin_read_CAN1_AM23L() bfin_read16(CAN1_AM23L)
396#define bfin_write_CAN1_AM23L(val) bfin_write16(CAN1_AM23L, val)
397#define bfin_read_CAN1_AM23H() bfin_read16(CAN1_AM23H)
398#define bfin_write_CAN1_AM23H(val) bfin_write16(CAN1_AM23H, val)
399#define bfin_read_CAN1_AM24L() bfin_read16(CAN1_AM24L)
400#define bfin_write_CAN1_AM24L(val) bfin_write16(CAN1_AM24L, val)
401#define bfin_read_CAN1_AM24H() bfin_read16(CAN1_AM24H)
402#define bfin_write_CAN1_AM24H(val) bfin_write16(CAN1_AM24H, val)
403#define bfin_read_CAN1_AM25L() bfin_read16(CAN1_AM25L)
404#define bfin_write_CAN1_AM25L(val) bfin_write16(CAN1_AM25L, val)
405#define bfin_read_CAN1_AM25H() bfin_read16(CAN1_AM25H)
406#define bfin_write_CAN1_AM25H(val) bfin_write16(CAN1_AM25H, val)
407#define bfin_read_CAN1_AM26L() bfin_read16(CAN1_AM26L)
408#define bfin_write_CAN1_AM26L(val) bfin_write16(CAN1_AM26L, val)
409#define bfin_read_CAN1_AM26H() bfin_read16(CAN1_AM26H)
410#define bfin_write_CAN1_AM26H(val) bfin_write16(CAN1_AM26H, val)
411#define bfin_read_CAN1_AM27L() bfin_read16(CAN1_AM27L)
412#define bfin_write_CAN1_AM27L(val) bfin_write16(CAN1_AM27L, val)
413#define bfin_read_CAN1_AM27H() bfin_read16(CAN1_AM27H)
414#define bfin_write_CAN1_AM27H(val) bfin_write16(CAN1_AM27H, val)
415#define bfin_read_CAN1_AM28L() bfin_read16(CAN1_AM28L)
416#define bfin_write_CAN1_AM28L(val) bfin_write16(CAN1_AM28L, val)
417#define bfin_read_CAN1_AM28H() bfin_read16(CAN1_AM28H)
418#define bfin_write_CAN1_AM28H(val) bfin_write16(CAN1_AM28H, val)
419#define bfin_read_CAN1_AM29L() bfin_read16(CAN1_AM29L)
420#define bfin_write_CAN1_AM29L(val) bfin_write16(CAN1_AM29L, val)
421#define bfin_read_CAN1_AM29H() bfin_read16(CAN1_AM29H)
422#define bfin_write_CAN1_AM29H(val) bfin_write16(CAN1_AM29H, val)
423#define bfin_read_CAN1_AM30L() bfin_read16(CAN1_AM30L)
424#define bfin_write_CAN1_AM30L(val) bfin_write16(CAN1_AM30L, val)
425#define bfin_read_CAN1_AM30H() bfin_read16(CAN1_AM30H)
426#define bfin_write_CAN1_AM30H(val) bfin_write16(CAN1_AM30H, val)
427#define bfin_read_CAN1_AM31L() bfin_read16(CAN1_AM31L)
428#define bfin_write_CAN1_AM31L(val) bfin_write16(CAN1_AM31L, val)
429#define bfin_read_CAN1_AM31H() bfin_read16(CAN1_AM31H)
430#define bfin_write_CAN1_AM31H(val) bfin_write16(CAN1_AM31H, val)
431
432/* CAN Controller 1 Mailbox Data Registers */
433
434#define bfin_read_CAN1_MB00_DATA0() bfin_read16(CAN1_MB00_DATA0)
435#define bfin_write_CAN1_MB00_DATA0(val) bfin_write16(CAN1_MB00_DATA0, val)
436#define bfin_read_CAN1_MB00_DATA1() bfin_read16(CAN1_MB00_DATA1)
437#define bfin_write_CAN1_MB00_DATA1(val) bfin_write16(CAN1_MB00_DATA1, val)
438#define bfin_read_CAN1_MB00_DATA2() bfin_read16(CAN1_MB00_DATA2)
439#define bfin_write_CAN1_MB00_DATA2(val) bfin_write16(CAN1_MB00_DATA2, val)
440#define bfin_read_CAN1_MB00_DATA3() bfin_read16(CAN1_MB00_DATA3)
441#define bfin_write_CAN1_MB00_DATA3(val) bfin_write16(CAN1_MB00_DATA3, val)
442#define bfin_read_CAN1_MB00_LENGTH() bfin_read16(CAN1_MB00_LENGTH)
443#define bfin_write_CAN1_MB00_LENGTH(val) bfin_write16(CAN1_MB00_LENGTH, val)
444#define bfin_read_CAN1_MB00_TIMESTAMP() bfin_read16(CAN1_MB00_TIMESTAMP)
445#define bfin_write_CAN1_MB00_TIMESTAMP(val) bfin_write16(CAN1_MB00_TIMESTAMP, val)
446#define bfin_read_CAN1_MB00_ID0() bfin_read16(CAN1_MB00_ID0)
447#define bfin_write_CAN1_MB00_ID0(val) bfin_write16(CAN1_MB00_ID0, val)
448#define bfin_read_CAN1_MB00_ID1() bfin_read16(CAN1_MB00_ID1)
449#define bfin_write_CAN1_MB00_ID1(val) bfin_write16(CAN1_MB00_ID1, val)
450#define bfin_read_CAN1_MB01_DATA0() bfin_read16(CAN1_MB01_DATA0)
451#define bfin_write_CAN1_MB01_DATA0(val) bfin_write16(CAN1_MB01_DATA0, val)
452#define bfin_read_CAN1_MB01_DATA1() bfin_read16(CAN1_MB01_DATA1)
453#define bfin_write_CAN1_MB01_DATA1(val) bfin_write16(CAN1_MB01_DATA1, val)
454#define bfin_read_CAN1_MB01_DATA2() bfin_read16(CAN1_MB01_DATA2)
455#define bfin_write_CAN1_MB01_DATA2(val) bfin_write16(CAN1_MB01_DATA2, val)
456#define bfin_read_CAN1_MB01_DATA3() bfin_read16(CAN1_MB01_DATA3)
457#define bfin_write_CAN1_MB01_DATA3(val) bfin_write16(CAN1_MB01_DATA3, val)
458#define bfin_read_CAN1_MB01_LENGTH() bfin_read16(CAN1_MB01_LENGTH)
459#define bfin_write_CAN1_MB01_LENGTH(val) bfin_write16(CAN1_MB01_LENGTH, val)
460#define bfin_read_CAN1_MB01_TIMESTAMP() bfin_read16(CAN1_MB01_TIMESTAMP)
461#define bfin_write_CAN1_MB01_TIMESTAMP(val) bfin_write16(CAN1_MB01_TIMESTAMP, val)
462#define bfin_read_CAN1_MB01_ID0() bfin_read16(CAN1_MB01_ID0)
463#define bfin_write_CAN1_MB01_ID0(val) bfin_write16(CAN1_MB01_ID0, val)
464#define bfin_read_CAN1_MB01_ID1() bfin_read16(CAN1_MB01_ID1)
465#define bfin_write_CAN1_MB01_ID1(val) bfin_write16(CAN1_MB01_ID1, val)
466#define bfin_read_CAN1_MB02_DATA0() bfin_read16(CAN1_MB02_DATA0)
467#define bfin_write_CAN1_MB02_DATA0(val) bfin_write16(CAN1_MB02_DATA0, val)
468#define bfin_read_CAN1_MB02_DATA1() bfin_read16(CAN1_MB02_DATA1)
469#define bfin_write_CAN1_MB02_DATA1(val) bfin_write16(CAN1_MB02_DATA1, val)
470#define bfin_read_CAN1_MB02_DATA2() bfin_read16(CAN1_MB02_DATA2)
471#define bfin_write_CAN1_MB02_DATA2(val) bfin_write16(CAN1_MB02_DATA2, val)
472#define bfin_read_CAN1_MB02_DATA3() bfin_read16(CAN1_MB02_DATA3)
473#define bfin_write_CAN1_MB02_DATA3(val) bfin_write16(CAN1_MB02_DATA3, val)
474#define bfin_read_CAN1_MB02_LENGTH() bfin_read16(CAN1_MB02_LENGTH)
475#define bfin_write_CAN1_MB02_LENGTH(val) bfin_write16(CAN1_MB02_LENGTH, val)
476#define bfin_read_CAN1_MB02_TIMESTAMP() bfin_read16(CAN1_MB02_TIMESTAMP)
477#define bfin_write_CAN1_MB02_TIMESTAMP(val) bfin_write16(CAN1_MB02_TIMESTAMP, val)
478#define bfin_read_CAN1_MB02_ID0() bfin_read16(CAN1_MB02_ID0)
479#define bfin_write_CAN1_MB02_ID0(val) bfin_write16(CAN1_MB02_ID0, val)
480#define bfin_read_CAN1_MB02_ID1() bfin_read16(CAN1_MB02_ID1)
481#define bfin_write_CAN1_MB02_ID1(val) bfin_write16(CAN1_MB02_ID1, val)
482#define bfin_read_CAN1_MB03_DATA0() bfin_read16(CAN1_MB03_DATA0)
483#define bfin_write_CAN1_MB03_DATA0(val) bfin_write16(CAN1_MB03_DATA0, val)
484#define bfin_read_CAN1_MB03_DATA1() bfin_read16(CAN1_MB03_DATA1)
485#define bfin_write_CAN1_MB03_DATA1(val) bfin_write16(CAN1_MB03_DATA1, val)
486#define bfin_read_CAN1_MB03_DATA2() bfin_read16(CAN1_MB03_DATA2)
487#define bfin_write_CAN1_MB03_DATA2(val) bfin_write16(CAN1_MB03_DATA2, val)
488#define bfin_read_CAN1_MB03_DATA3() bfin_read16(CAN1_MB03_DATA3)
489#define bfin_write_CAN1_MB03_DATA3(val) bfin_write16(CAN1_MB03_DATA3, val)
490#define bfin_read_CAN1_MB03_LENGTH() bfin_read16(CAN1_MB03_LENGTH)
491#define bfin_write_CAN1_MB03_LENGTH(val) bfin_write16(CAN1_MB03_LENGTH, val)
492#define bfin_read_CAN1_MB03_TIMESTAMP() bfin_read16(CAN1_MB03_TIMESTAMP)
493#define bfin_write_CAN1_MB03_TIMESTAMP(val) bfin_write16(CAN1_MB03_TIMESTAMP, val)
494#define bfin_read_CAN1_MB03_ID0() bfin_read16(CAN1_MB03_ID0)
495#define bfin_write_CAN1_MB03_ID0(val) bfin_write16(CAN1_MB03_ID0, val)
496#define bfin_read_CAN1_MB03_ID1() bfin_read16(CAN1_MB03_ID1)
497#define bfin_write_CAN1_MB03_ID1(val) bfin_write16(CAN1_MB03_ID1, val)
498#define bfin_read_CAN1_MB04_DATA0() bfin_read16(CAN1_MB04_DATA0)
499#define bfin_write_CAN1_MB04_DATA0(val) bfin_write16(CAN1_MB04_DATA0, val)
500#define bfin_read_CAN1_MB04_DATA1() bfin_read16(CAN1_MB04_DATA1)
501#define bfin_write_CAN1_MB04_DATA1(val) bfin_write16(CAN1_MB04_DATA1, val)
502#define bfin_read_CAN1_MB04_DATA2() bfin_read16(CAN1_MB04_DATA2)
503#define bfin_write_CAN1_MB04_DATA2(val) bfin_write16(CAN1_MB04_DATA2, val)
504#define bfin_read_CAN1_MB04_DATA3() bfin_read16(CAN1_MB04_DATA3)
505#define bfin_write_CAN1_MB04_DATA3(val) bfin_write16(CAN1_MB04_DATA3, val)
506#define bfin_read_CAN1_MB04_LENGTH() bfin_read16(CAN1_MB04_LENGTH)
507#define bfin_write_CAN1_MB04_LENGTH(val) bfin_write16(CAN1_MB04_LENGTH, val)
508#define bfin_read_CAN1_MB04_TIMESTAMP() bfin_read16(CAN1_MB04_TIMESTAMP)
509#define bfin_write_CAN1_MB04_TIMESTAMP(val) bfin_write16(CAN1_MB04_TIMESTAMP, val)
510#define bfin_read_CAN1_MB04_ID0() bfin_read16(CAN1_MB04_ID0)
511#define bfin_write_CAN1_MB04_ID0(val) bfin_write16(CAN1_MB04_ID0, val)
512#define bfin_read_CAN1_MB04_ID1() bfin_read16(CAN1_MB04_ID1)
513#define bfin_write_CAN1_MB04_ID1(val) bfin_write16(CAN1_MB04_ID1, val)
514#define bfin_read_CAN1_MB05_DATA0() bfin_read16(CAN1_MB05_DATA0)
515#define bfin_write_CAN1_MB05_DATA0(val) bfin_write16(CAN1_MB05_DATA0, val)
516#define bfin_read_CAN1_MB05_DATA1() bfin_read16(CAN1_MB05_DATA1)
517#define bfin_write_CAN1_MB05_DATA1(val) bfin_write16(CAN1_MB05_DATA1, val)
518#define bfin_read_CAN1_MB05_DATA2() bfin_read16(CAN1_MB05_DATA2)
519#define bfin_write_CAN1_MB05_DATA2(val) bfin_write16(CAN1_MB05_DATA2, val)
520#define bfin_read_CAN1_MB05_DATA3() bfin_read16(CAN1_MB05_DATA3)
521#define bfin_write_CAN1_MB05_DATA3(val) bfin_write16(CAN1_MB05_DATA3, val)
522#define bfin_read_CAN1_MB05_LENGTH() bfin_read16(CAN1_MB05_LENGTH)
523#define bfin_write_CAN1_MB05_LENGTH(val) bfin_write16(CAN1_MB05_LENGTH, val)
524#define bfin_read_CAN1_MB05_TIMESTAMP() bfin_read16(CAN1_MB05_TIMESTAMP)
525#define bfin_write_CAN1_MB05_TIMESTAMP(val) bfin_write16(CAN1_MB05_TIMESTAMP, val)
526#define bfin_read_CAN1_MB05_ID0() bfin_read16(CAN1_MB05_ID0)
527#define bfin_write_CAN1_MB05_ID0(val) bfin_write16(CAN1_MB05_ID0, val)
528#define bfin_read_CAN1_MB05_ID1() bfin_read16(CAN1_MB05_ID1)
529#define bfin_write_CAN1_MB05_ID1(val) bfin_write16(CAN1_MB05_ID1, val)
530#define bfin_read_CAN1_MB06_DATA0() bfin_read16(CAN1_MB06_DATA0)
531#define bfin_write_CAN1_MB06_DATA0(val) bfin_write16(CAN1_MB06_DATA0, val)
532#define bfin_read_CAN1_MB06_DATA1() bfin_read16(CAN1_MB06_DATA1)
533#define bfin_write_CAN1_MB06_DATA1(val) bfin_write16(CAN1_MB06_DATA1, val)
534#define bfin_read_CAN1_MB06_DATA2() bfin_read16(CAN1_MB06_DATA2)
535#define bfin_write_CAN1_MB06_DATA2(val) bfin_write16(CAN1_MB06_DATA2, val)
536#define bfin_read_CAN1_MB06_DATA3() bfin_read16(CAN1_MB06_DATA3)
537#define bfin_write_CAN1_MB06_DATA3(val) bfin_write16(CAN1_MB06_DATA3, val)
538#define bfin_read_CAN1_MB06_LENGTH() bfin_read16(CAN1_MB06_LENGTH)
539#define bfin_write_CAN1_MB06_LENGTH(val) bfin_write16(CAN1_MB06_LENGTH, val)
540#define bfin_read_CAN1_MB06_TIMESTAMP() bfin_read16(CAN1_MB06_TIMESTAMP)
541#define bfin_write_CAN1_MB06_TIMESTAMP(val) bfin_write16(CAN1_MB06_TIMESTAMP, val)
542#define bfin_read_CAN1_MB06_ID0() bfin_read16(CAN1_MB06_ID0)
543#define bfin_write_CAN1_MB06_ID0(val) bfin_write16(CAN1_MB06_ID0, val)
544#define bfin_read_CAN1_MB06_ID1() bfin_read16(CAN1_MB06_ID1)
545#define bfin_write_CAN1_MB06_ID1(val) bfin_write16(CAN1_MB06_ID1, val)
546#define bfin_read_CAN1_MB07_DATA0() bfin_read16(CAN1_MB07_DATA0)
547#define bfin_write_CAN1_MB07_DATA0(val) bfin_write16(CAN1_MB07_DATA0, val)
548#define bfin_read_CAN1_MB07_DATA1() bfin_read16(CAN1_MB07_DATA1)
549#define bfin_write_CAN1_MB07_DATA1(val) bfin_write16(CAN1_MB07_DATA1, val)
550#define bfin_read_CAN1_MB07_DATA2() bfin_read16(CAN1_MB07_DATA2)
551#define bfin_write_CAN1_MB07_DATA2(val) bfin_write16(CAN1_MB07_DATA2, val)
552#define bfin_read_CAN1_MB07_DATA3() bfin_read16(CAN1_MB07_DATA3)
553#define bfin_write_CAN1_MB07_DATA3(val) bfin_write16(CAN1_MB07_DATA3, val)
554#define bfin_read_CAN1_MB07_LENGTH() bfin_read16(CAN1_MB07_LENGTH)
555#define bfin_write_CAN1_MB07_LENGTH(val) bfin_write16(CAN1_MB07_LENGTH, val)
556#define bfin_read_CAN1_MB07_TIMESTAMP() bfin_read16(CAN1_MB07_TIMESTAMP)
557#define bfin_write_CAN1_MB07_TIMESTAMP(val) bfin_write16(CAN1_MB07_TIMESTAMP, val)
558#define bfin_read_CAN1_MB07_ID0() bfin_read16(CAN1_MB07_ID0)
559#define bfin_write_CAN1_MB07_ID0(val) bfin_write16(CAN1_MB07_ID0, val)
560#define bfin_read_CAN1_MB07_ID1() bfin_read16(CAN1_MB07_ID1)
561#define bfin_write_CAN1_MB07_ID1(val) bfin_write16(CAN1_MB07_ID1, val)
562#define bfin_read_CAN1_MB08_DATA0() bfin_read16(CAN1_MB08_DATA0)
563#define bfin_write_CAN1_MB08_DATA0(val) bfin_write16(CAN1_MB08_DATA0, val)
564#define bfin_read_CAN1_MB08_DATA1() bfin_read16(CAN1_MB08_DATA1)
565#define bfin_write_CAN1_MB08_DATA1(val) bfin_write16(CAN1_MB08_DATA1, val)
566#define bfin_read_CAN1_MB08_DATA2() bfin_read16(CAN1_MB08_DATA2)
567#define bfin_write_CAN1_MB08_DATA2(val) bfin_write16(CAN1_MB08_DATA2, val)
568#define bfin_read_CAN1_MB08_DATA3() bfin_read16(CAN1_MB08_DATA3)
569#define bfin_write_CAN1_MB08_DATA3(val) bfin_write16(CAN1_MB08_DATA3, val)
570#define bfin_read_CAN1_MB08_LENGTH() bfin_read16(CAN1_MB08_LENGTH)
571#define bfin_write_CAN1_MB08_LENGTH(val) bfin_write16(CAN1_MB08_LENGTH, val)
572#define bfin_read_CAN1_MB08_TIMESTAMP() bfin_read16(CAN1_MB08_TIMESTAMP)
573#define bfin_write_CAN1_MB08_TIMESTAMP(val) bfin_write16(CAN1_MB08_TIMESTAMP, val)
574#define bfin_read_CAN1_MB08_ID0() bfin_read16(CAN1_MB08_ID0)
575#define bfin_write_CAN1_MB08_ID0(val) bfin_write16(CAN1_MB08_ID0, val)
576#define bfin_read_CAN1_MB08_ID1() bfin_read16(CAN1_MB08_ID1)
577#define bfin_write_CAN1_MB08_ID1(val) bfin_write16(CAN1_MB08_ID1, val)
578#define bfin_read_CAN1_MB09_DATA0() bfin_read16(CAN1_MB09_DATA0)
579#define bfin_write_CAN1_MB09_DATA0(val) bfin_write16(CAN1_MB09_DATA0, val)
580#define bfin_read_CAN1_MB09_DATA1() bfin_read16(CAN1_MB09_DATA1)
581#define bfin_write_CAN1_MB09_DATA1(val) bfin_write16(CAN1_MB09_DATA1, val)
582#define bfin_read_CAN1_MB09_DATA2() bfin_read16(CAN1_MB09_DATA2)
583#define bfin_write_CAN1_MB09_DATA2(val) bfin_write16(CAN1_MB09_DATA2, val)
584#define bfin_read_CAN1_MB09_DATA3() bfin_read16(CAN1_MB09_DATA3)
585#define bfin_write_CAN1_MB09_DATA3(val) bfin_write16(CAN1_MB09_DATA3, val)
586#define bfin_read_CAN1_MB09_LENGTH() bfin_read16(CAN1_MB09_LENGTH)
587#define bfin_write_CAN1_MB09_LENGTH(val) bfin_write16(CAN1_MB09_LENGTH, val)
588#define bfin_read_CAN1_MB09_TIMESTAMP() bfin_read16(CAN1_MB09_TIMESTAMP)
589#define bfin_write_CAN1_MB09_TIMESTAMP(val) bfin_write16(CAN1_MB09_TIMESTAMP, val)
590#define bfin_read_CAN1_MB09_ID0() bfin_read16(CAN1_MB09_ID0)
591#define bfin_write_CAN1_MB09_ID0(val) bfin_write16(CAN1_MB09_ID0, val)
592#define bfin_read_CAN1_MB09_ID1() bfin_read16(CAN1_MB09_ID1)
593#define bfin_write_CAN1_MB09_ID1(val) bfin_write16(CAN1_MB09_ID1, val)
594#define bfin_read_CAN1_MB10_DATA0() bfin_read16(CAN1_MB10_DATA0)
595#define bfin_write_CAN1_MB10_DATA0(val) bfin_write16(CAN1_MB10_DATA0, val)
596#define bfin_read_CAN1_MB10_DATA1() bfin_read16(CAN1_MB10_DATA1)
597#define bfin_write_CAN1_MB10_DATA1(val) bfin_write16(CAN1_MB10_DATA1, val)
598#define bfin_read_CAN1_MB10_DATA2() bfin_read16(CAN1_MB10_DATA2)
599#define bfin_write_CAN1_MB10_DATA2(val) bfin_write16(CAN1_MB10_DATA2, val)
600#define bfin_read_CAN1_MB10_DATA3() bfin_read16(CAN1_MB10_DATA3)
601#define bfin_write_CAN1_MB10_DATA3(val) bfin_write16(CAN1_MB10_DATA3, val)
602#define bfin_read_CAN1_MB10_LENGTH() bfin_read16(CAN1_MB10_LENGTH)
603#define bfin_write_CAN1_MB10_LENGTH(val) bfin_write16(CAN1_MB10_LENGTH, val)
604#define bfin_read_CAN1_MB10_TIMESTAMP() bfin_read16(CAN1_MB10_TIMESTAMP)
605#define bfin_write_CAN1_MB10_TIMESTAMP(val) bfin_write16(CAN1_MB10_TIMESTAMP, val)
606#define bfin_read_CAN1_MB10_ID0() bfin_read16(CAN1_MB10_ID0)
607#define bfin_write_CAN1_MB10_ID0(val) bfin_write16(CAN1_MB10_ID0, val)
608#define bfin_read_CAN1_MB10_ID1() bfin_read16(CAN1_MB10_ID1)
609#define bfin_write_CAN1_MB10_ID1(val) bfin_write16(CAN1_MB10_ID1, val)
610#define bfin_read_CAN1_MB11_DATA0() bfin_read16(CAN1_MB11_DATA0)
611#define bfin_write_CAN1_MB11_DATA0(val) bfin_write16(CAN1_MB11_DATA0, val)
612#define bfin_read_CAN1_MB11_DATA1() bfin_read16(CAN1_MB11_DATA1)
613#define bfin_write_CAN1_MB11_DATA1(val) bfin_write16(CAN1_MB11_DATA1, val)
614#define bfin_read_CAN1_MB11_DATA2() bfin_read16(CAN1_MB11_DATA2)
615#define bfin_write_CAN1_MB11_DATA2(val) bfin_write16(CAN1_MB11_DATA2, val)
616#define bfin_read_CAN1_MB11_DATA3() bfin_read16(CAN1_MB11_DATA3)
617#define bfin_write_CAN1_MB11_DATA3(val) bfin_write16(CAN1_MB11_DATA3, val)
618#define bfin_read_CAN1_MB11_LENGTH() bfin_read16(CAN1_MB11_LENGTH)
619#define bfin_write_CAN1_MB11_LENGTH(val) bfin_write16(CAN1_MB11_LENGTH, val)
620#define bfin_read_CAN1_MB11_TIMESTAMP() bfin_read16(CAN1_MB11_TIMESTAMP)
621#define bfin_write_CAN1_MB11_TIMESTAMP(val) bfin_write16(CAN1_MB11_TIMESTAMP, val)
622#define bfin_read_CAN1_MB11_ID0() bfin_read16(CAN1_MB11_ID0)
623#define bfin_write_CAN1_MB11_ID0(val) bfin_write16(CAN1_MB11_ID0, val)
624#define bfin_read_CAN1_MB11_ID1() bfin_read16(CAN1_MB11_ID1)
625#define bfin_write_CAN1_MB11_ID1(val) bfin_write16(CAN1_MB11_ID1, val)
626#define bfin_read_CAN1_MB12_DATA0() bfin_read16(CAN1_MB12_DATA0)
627#define bfin_write_CAN1_MB12_DATA0(val) bfin_write16(CAN1_MB12_DATA0, val)
628#define bfin_read_CAN1_MB12_DATA1() bfin_read16(CAN1_MB12_DATA1)
629#define bfin_write_CAN1_MB12_DATA1(val) bfin_write16(CAN1_MB12_DATA1, val)
630#define bfin_read_CAN1_MB12_DATA2() bfin_read16(CAN1_MB12_DATA2)
631#define bfin_write_CAN1_MB12_DATA2(val) bfin_write16(CAN1_MB12_DATA2, val)
632#define bfin_read_CAN1_MB12_DATA3() bfin_read16(CAN1_MB12_DATA3)
633#define bfin_write_CAN1_MB12_DATA3(val) bfin_write16(CAN1_MB12_DATA3, val)
634#define bfin_read_CAN1_MB12_LENGTH() bfin_read16(CAN1_MB12_LENGTH)
635#define bfin_write_CAN1_MB12_LENGTH(val) bfin_write16(CAN1_MB12_LENGTH, val)
636#define bfin_read_CAN1_MB12_TIMESTAMP() bfin_read16(CAN1_MB12_TIMESTAMP)
637#define bfin_write_CAN1_MB12_TIMESTAMP(val) bfin_write16(CAN1_MB12_TIMESTAMP, val)
638#define bfin_read_CAN1_MB12_ID0() bfin_read16(CAN1_MB12_ID0)
639#define bfin_write_CAN1_MB12_ID0(val) bfin_write16(CAN1_MB12_ID0, val)
640#define bfin_read_CAN1_MB12_ID1() bfin_read16(CAN1_MB12_ID1)
641#define bfin_write_CAN1_MB12_ID1(val) bfin_write16(CAN1_MB12_ID1, val)
642#define bfin_read_CAN1_MB13_DATA0() bfin_read16(CAN1_MB13_DATA0)
643#define bfin_write_CAN1_MB13_DATA0(val) bfin_write16(CAN1_MB13_DATA0, val)
644#define bfin_read_CAN1_MB13_DATA1() bfin_read16(CAN1_MB13_DATA1)
645#define bfin_write_CAN1_MB13_DATA1(val) bfin_write16(CAN1_MB13_DATA1, val)
646#define bfin_read_CAN1_MB13_DATA2() bfin_read16(CAN1_MB13_DATA2)
647#define bfin_write_CAN1_MB13_DATA2(val) bfin_write16(CAN1_MB13_DATA2, val)
648#define bfin_read_CAN1_MB13_DATA3() bfin_read16(CAN1_MB13_DATA3)
649#define bfin_write_CAN1_MB13_DATA3(val) bfin_write16(CAN1_MB13_DATA3, val)
650#define bfin_read_CAN1_MB13_LENGTH() bfin_read16(CAN1_MB13_LENGTH)
651#define bfin_write_CAN1_MB13_LENGTH(val) bfin_write16(CAN1_MB13_LENGTH, val)
652#define bfin_read_CAN1_MB13_TIMESTAMP() bfin_read16(CAN1_MB13_TIMESTAMP)
653#define bfin_write_CAN1_MB13_TIMESTAMP(val) bfin_write16(CAN1_MB13_TIMESTAMP, val)
654#define bfin_read_CAN1_MB13_ID0() bfin_read16(CAN1_MB13_ID0)
655#define bfin_write_CAN1_MB13_ID0(val) bfin_write16(CAN1_MB13_ID0, val)
656#define bfin_read_CAN1_MB13_ID1() bfin_read16(CAN1_MB13_ID1)
657#define bfin_write_CAN1_MB13_ID1(val) bfin_write16(CAN1_MB13_ID1, val)
658#define bfin_read_CAN1_MB14_DATA0() bfin_read16(CAN1_MB14_DATA0)
659#define bfin_write_CAN1_MB14_DATA0(val) bfin_write16(CAN1_MB14_DATA0, val)
660#define bfin_read_CAN1_MB14_DATA1() bfin_read16(CAN1_MB14_DATA1)
661#define bfin_write_CAN1_MB14_DATA1(val) bfin_write16(CAN1_MB14_DATA1, val)
662#define bfin_read_CAN1_MB14_DATA2() bfin_read16(CAN1_MB14_DATA2)
663#define bfin_write_CAN1_MB14_DATA2(val) bfin_write16(CAN1_MB14_DATA2, val)
664#define bfin_read_CAN1_MB14_DATA3() bfin_read16(CAN1_MB14_DATA3)
665#define bfin_write_CAN1_MB14_DATA3(val) bfin_write16(CAN1_MB14_DATA3, val)
666#define bfin_read_CAN1_MB14_LENGTH() bfin_read16(CAN1_MB14_LENGTH)
667#define bfin_write_CAN1_MB14_LENGTH(val) bfin_write16(CAN1_MB14_LENGTH, val)
668#define bfin_read_CAN1_MB14_TIMESTAMP() bfin_read16(CAN1_MB14_TIMESTAMP)
669#define bfin_write_CAN1_MB14_TIMESTAMP(val) bfin_write16(CAN1_MB14_TIMESTAMP, val)
670#define bfin_read_CAN1_MB14_ID0() bfin_read16(CAN1_MB14_ID0)
671#define bfin_write_CAN1_MB14_ID0(val) bfin_write16(CAN1_MB14_ID0, val)
672#define bfin_read_CAN1_MB14_ID1() bfin_read16(CAN1_MB14_ID1)
673#define bfin_write_CAN1_MB14_ID1(val) bfin_write16(CAN1_MB14_ID1, val)
674#define bfin_read_CAN1_MB15_DATA0() bfin_read16(CAN1_MB15_DATA0)
675#define bfin_write_CAN1_MB15_DATA0(val) bfin_write16(CAN1_MB15_DATA0, val)
676#define bfin_read_CAN1_MB15_DATA1() bfin_read16(CAN1_MB15_DATA1)
677#define bfin_write_CAN1_MB15_DATA1(val) bfin_write16(CAN1_MB15_DATA1, val)
678#define bfin_read_CAN1_MB15_DATA2() bfin_read16(CAN1_MB15_DATA2)
679#define bfin_write_CAN1_MB15_DATA2(val) bfin_write16(CAN1_MB15_DATA2, val)
680#define bfin_read_CAN1_MB15_DATA3() bfin_read16(CAN1_MB15_DATA3)
681#define bfin_write_CAN1_MB15_DATA3(val) bfin_write16(CAN1_MB15_DATA3, val)
682#define bfin_read_CAN1_MB15_LENGTH() bfin_read16(CAN1_MB15_LENGTH)
683#define bfin_write_CAN1_MB15_LENGTH(val) bfin_write16(CAN1_MB15_LENGTH, val)
684#define bfin_read_CAN1_MB15_TIMESTAMP() bfin_read16(CAN1_MB15_TIMESTAMP)
685#define bfin_write_CAN1_MB15_TIMESTAMP(val) bfin_write16(CAN1_MB15_TIMESTAMP, val)
686#define bfin_read_CAN1_MB15_ID0() bfin_read16(CAN1_MB15_ID0)
687#define bfin_write_CAN1_MB15_ID0(val) bfin_write16(CAN1_MB15_ID0, val)
688#define bfin_read_CAN1_MB15_ID1() bfin_read16(CAN1_MB15_ID1)
689#define bfin_write_CAN1_MB15_ID1(val) bfin_write16(CAN1_MB15_ID1, val)
690
691/* CAN Controller 1 Mailbox Data Registers */
692
693#define bfin_read_CAN1_MB16_DATA0() bfin_read16(CAN1_MB16_DATA0)
694#define bfin_write_CAN1_MB16_DATA0(val) bfin_write16(CAN1_MB16_DATA0, val)
695#define bfin_read_CAN1_MB16_DATA1() bfin_read16(CAN1_MB16_DATA1)
696#define bfin_write_CAN1_MB16_DATA1(val) bfin_write16(CAN1_MB16_DATA1, val)
697#define bfin_read_CAN1_MB16_DATA2() bfin_read16(CAN1_MB16_DATA2)
698#define bfin_write_CAN1_MB16_DATA2(val) bfin_write16(CAN1_MB16_DATA2, val)
699#define bfin_read_CAN1_MB16_DATA3() bfin_read16(CAN1_MB16_DATA3)
700#define bfin_write_CAN1_MB16_DATA3(val) bfin_write16(CAN1_MB16_DATA3, val)
701#define bfin_read_CAN1_MB16_LENGTH() bfin_read16(CAN1_MB16_LENGTH)
702#define bfin_write_CAN1_MB16_LENGTH(val) bfin_write16(CAN1_MB16_LENGTH, val)
703#define bfin_read_CAN1_MB16_TIMESTAMP() bfin_read16(CAN1_MB16_TIMESTAMP)
704#define bfin_write_CAN1_MB16_TIMESTAMP(val) bfin_write16(CAN1_MB16_TIMESTAMP, val)
705#define bfin_read_CAN1_MB16_ID0() bfin_read16(CAN1_MB16_ID0)
706#define bfin_write_CAN1_MB16_ID0(val) bfin_write16(CAN1_MB16_ID0, val)
707#define bfin_read_CAN1_MB16_ID1() bfin_read16(CAN1_MB16_ID1)
708#define bfin_write_CAN1_MB16_ID1(val) bfin_write16(CAN1_MB16_ID1, val)
709#define bfin_read_CAN1_MB17_DATA0() bfin_read16(CAN1_MB17_DATA0)
710#define bfin_write_CAN1_MB17_DATA0(val) bfin_write16(CAN1_MB17_DATA0, val)
711#define bfin_read_CAN1_MB17_DATA1() bfin_read16(CAN1_MB17_DATA1)
712#define bfin_write_CAN1_MB17_DATA1(val) bfin_write16(CAN1_MB17_DATA1, val)
713#define bfin_read_CAN1_MB17_DATA2() bfin_read16(CAN1_MB17_DATA2)
714#define bfin_write_CAN1_MB17_DATA2(val) bfin_write16(CAN1_MB17_DATA2, val)
715#define bfin_read_CAN1_MB17_DATA3() bfin_read16(CAN1_MB17_DATA3)
716#define bfin_write_CAN1_MB17_DATA3(val) bfin_write16(CAN1_MB17_DATA3, val)
717#define bfin_read_CAN1_MB17_LENGTH() bfin_read16(CAN1_MB17_LENGTH)
718#define bfin_write_CAN1_MB17_LENGTH(val) bfin_write16(CAN1_MB17_LENGTH, val)
719#define bfin_read_CAN1_MB17_TIMESTAMP() bfin_read16(CAN1_MB17_TIMESTAMP)
720#define bfin_write_CAN1_MB17_TIMESTAMP(val) bfin_write16(CAN1_MB17_TIMESTAMP, val)
721#define bfin_read_CAN1_MB17_ID0() bfin_read16(CAN1_MB17_ID0)
722#define bfin_write_CAN1_MB17_ID0(val) bfin_write16(CAN1_MB17_ID0, val)
723#define bfin_read_CAN1_MB17_ID1() bfin_read16(CAN1_MB17_ID1)
724#define bfin_write_CAN1_MB17_ID1(val) bfin_write16(CAN1_MB17_ID1, val)
725#define bfin_read_CAN1_MB18_DATA0() bfin_read16(CAN1_MB18_DATA0)
726#define bfin_write_CAN1_MB18_DATA0(val) bfin_write16(CAN1_MB18_DATA0, val)
727#define bfin_read_CAN1_MB18_DATA1() bfin_read16(CAN1_MB18_DATA1)
728#define bfin_write_CAN1_MB18_DATA1(val) bfin_write16(CAN1_MB18_DATA1, val)
729#define bfin_read_CAN1_MB18_DATA2() bfin_read16(CAN1_MB18_DATA2)
730#define bfin_write_CAN1_MB18_DATA2(val) bfin_write16(CAN1_MB18_DATA2, val)
731#define bfin_read_CAN1_MB18_DATA3() bfin_read16(CAN1_MB18_DATA3)
732#define bfin_write_CAN1_MB18_DATA3(val) bfin_write16(CAN1_MB18_DATA3, val)
733#define bfin_read_CAN1_MB18_LENGTH() bfin_read16(CAN1_MB18_LENGTH)
734#define bfin_write_CAN1_MB18_LENGTH(val) bfin_write16(CAN1_MB18_LENGTH, val)
735#define bfin_read_CAN1_MB18_TIMESTAMP() bfin_read16(CAN1_MB18_TIMESTAMP)
736#define bfin_write_CAN1_MB18_TIMESTAMP(val) bfin_write16(CAN1_MB18_TIMESTAMP, val)
737#define bfin_read_CAN1_MB18_ID0() bfin_read16(CAN1_MB18_ID0)
738#define bfin_write_CAN1_MB18_ID0(val) bfin_write16(CAN1_MB18_ID0, val)
739#define bfin_read_CAN1_MB18_ID1() bfin_read16(CAN1_MB18_ID1)
740#define bfin_write_CAN1_MB18_ID1(val) bfin_write16(CAN1_MB18_ID1, val)
741#define bfin_read_CAN1_MB19_DATA0() bfin_read16(CAN1_MB19_DATA0)
742#define bfin_write_CAN1_MB19_DATA0(val) bfin_write16(CAN1_MB19_DATA0, val)
743#define bfin_read_CAN1_MB19_DATA1() bfin_read16(CAN1_MB19_DATA1)
744#define bfin_write_CAN1_MB19_DATA1(val) bfin_write16(CAN1_MB19_DATA1, val)
745#define bfin_read_CAN1_MB19_DATA2() bfin_read16(CAN1_MB19_DATA2)
746#define bfin_write_CAN1_MB19_DATA2(val) bfin_write16(CAN1_MB19_DATA2, val)
747#define bfin_read_CAN1_MB19_DATA3() bfin_read16(CAN1_MB19_DATA3)
748#define bfin_write_CAN1_MB19_DATA3(val) bfin_write16(CAN1_MB19_DATA3, val)
749#define bfin_read_CAN1_MB19_LENGTH() bfin_read16(CAN1_MB19_LENGTH)
750#define bfin_write_CAN1_MB19_LENGTH(val) bfin_write16(CAN1_MB19_LENGTH, val)
751#define bfin_read_CAN1_MB19_TIMESTAMP() bfin_read16(CAN1_MB19_TIMESTAMP)
752#define bfin_write_CAN1_MB19_TIMESTAMP(val) bfin_write16(CAN1_MB19_TIMESTAMP, val)
753#define bfin_read_CAN1_MB19_ID0() bfin_read16(CAN1_MB19_ID0)
754#define bfin_write_CAN1_MB19_ID0(val) bfin_write16(CAN1_MB19_ID0, val)
755#define bfin_read_CAN1_MB19_ID1() bfin_read16(CAN1_MB19_ID1)
756#define bfin_write_CAN1_MB19_ID1(val) bfin_write16(CAN1_MB19_ID1, val)
757#define bfin_read_CAN1_MB20_DATA0() bfin_read16(CAN1_MB20_DATA0)
758#define bfin_write_CAN1_MB20_DATA0(val) bfin_write16(CAN1_MB20_DATA0, val)
759#define bfin_read_CAN1_MB20_DATA1() bfin_read16(CAN1_MB20_DATA1)
760#define bfin_write_CAN1_MB20_DATA1(val) bfin_write16(CAN1_MB20_DATA1, val)
761#define bfin_read_CAN1_MB20_DATA2() bfin_read16(CAN1_MB20_DATA2)
762#define bfin_write_CAN1_MB20_DATA2(val) bfin_write16(CAN1_MB20_DATA2, val)
763#define bfin_read_CAN1_MB20_DATA3() bfin_read16(CAN1_MB20_DATA3)
764#define bfin_write_CAN1_MB20_DATA3(val) bfin_write16(CAN1_MB20_DATA3, val)
765#define bfin_read_CAN1_MB20_LENGTH() bfin_read16(CAN1_MB20_LENGTH)
766#define bfin_write_CAN1_MB20_LENGTH(val) bfin_write16(CAN1_MB20_LENGTH, val)
767#define bfin_read_CAN1_MB20_TIMESTAMP() bfin_read16(CAN1_MB20_TIMESTAMP)
768#define bfin_write_CAN1_MB20_TIMESTAMP(val) bfin_write16(CAN1_MB20_TIMESTAMP, val)
769#define bfin_read_CAN1_MB20_ID0() bfin_read16(CAN1_MB20_ID0)
770#define bfin_write_CAN1_MB20_ID0(val) bfin_write16(CAN1_MB20_ID0, val)
771#define bfin_read_CAN1_MB20_ID1() bfin_read16(CAN1_MB20_ID1)
772#define bfin_write_CAN1_MB20_ID1(val) bfin_write16(CAN1_MB20_ID1, val)
773#define bfin_read_CAN1_MB21_DATA0() bfin_read16(CAN1_MB21_DATA0)
774#define bfin_write_CAN1_MB21_DATA0(val) bfin_write16(CAN1_MB21_DATA0, val)
775#define bfin_read_CAN1_MB21_DATA1() bfin_read16(CAN1_MB21_DATA1)
776#define bfin_write_CAN1_MB21_DATA1(val) bfin_write16(CAN1_MB21_DATA1, val)
777#define bfin_read_CAN1_MB21_DATA2() bfin_read16(CAN1_MB21_DATA2)
778#define bfin_write_CAN1_MB21_DATA2(val) bfin_write16(CAN1_MB21_DATA2, val)
779#define bfin_read_CAN1_MB21_DATA3() bfin_read16(CAN1_MB21_DATA3)
780#define bfin_write_CAN1_MB21_DATA3(val) bfin_write16(CAN1_MB21_DATA3, val)
781#define bfin_read_CAN1_MB21_LENGTH() bfin_read16(CAN1_MB21_LENGTH)
782#define bfin_write_CAN1_MB21_LENGTH(val) bfin_write16(CAN1_MB21_LENGTH, val)
783#define bfin_read_CAN1_MB21_TIMESTAMP() bfin_read16(CAN1_MB21_TIMESTAMP)
784#define bfin_write_CAN1_MB21_TIMESTAMP(val) bfin_write16(CAN1_MB21_TIMESTAMP, val)
785#define bfin_read_CAN1_MB21_ID0() bfin_read16(CAN1_MB21_ID0)
786#define bfin_write_CAN1_MB21_ID0(val) bfin_write16(CAN1_MB21_ID0, val)
787#define bfin_read_CAN1_MB21_ID1() bfin_read16(CAN1_MB21_ID1)
788#define bfin_write_CAN1_MB21_ID1(val) bfin_write16(CAN1_MB21_ID1, val)
789#define bfin_read_CAN1_MB22_DATA0() bfin_read16(CAN1_MB22_DATA0)
790#define bfin_write_CAN1_MB22_DATA0(val) bfin_write16(CAN1_MB22_DATA0, val)
791#define bfin_read_CAN1_MB22_DATA1() bfin_read16(CAN1_MB22_DATA1)
792#define bfin_write_CAN1_MB22_DATA1(val) bfin_write16(CAN1_MB22_DATA1, val)
793#define bfin_read_CAN1_MB22_DATA2() bfin_read16(CAN1_MB22_DATA2)
794#define bfin_write_CAN1_MB22_DATA2(val) bfin_write16(CAN1_MB22_DATA2, val)
795#define bfin_read_CAN1_MB22_DATA3() bfin_read16(CAN1_MB22_DATA3)
796#define bfin_write_CAN1_MB22_DATA3(val) bfin_write16(CAN1_MB22_DATA3, val)
797#define bfin_read_CAN1_MB22_LENGTH() bfin_read16(CAN1_MB22_LENGTH)
798#define bfin_write_CAN1_MB22_LENGTH(val) bfin_write16(CAN1_MB22_LENGTH, val)
799#define bfin_read_CAN1_MB22_TIMESTAMP() bfin_read16(CAN1_MB22_TIMESTAMP)
800#define bfin_write_CAN1_MB22_TIMESTAMP(val) bfin_write16(CAN1_MB22_TIMESTAMP, val)
801#define bfin_read_CAN1_MB22_ID0() bfin_read16(CAN1_MB22_ID0)
802#define bfin_write_CAN1_MB22_ID0(val) bfin_write16(CAN1_MB22_ID0, val)
803#define bfin_read_CAN1_MB22_ID1() bfin_read16(CAN1_MB22_ID1)
804#define bfin_write_CAN1_MB22_ID1(val) bfin_write16(CAN1_MB22_ID1, val)
805#define bfin_read_CAN1_MB23_DATA0() bfin_read16(CAN1_MB23_DATA0)
806#define bfin_write_CAN1_MB23_DATA0(val) bfin_write16(CAN1_MB23_DATA0, val)
807#define bfin_read_CAN1_MB23_DATA1() bfin_read16(CAN1_MB23_DATA1)
808#define bfin_write_CAN1_MB23_DATA1(val) bfin_write16(CAN1_MB23_DATA1, val)
809#define bfin_read_CAN1_MB23_DATA2() bfin_read16(CAN1_MB23_DATA2)
810#define bfin_write_CAN1_MB23_DATA2(val) bfin_write16(CAN1_MB23_DATA2, val)
811#define bfin_read_CAN1_MB23_DATA3() bfin_read16(CAN1_MB23_DATA3)
812#define bfin_write_CAN1_MB23_DATA3(val) bfin_write16(CAN1_MB23_DATA3, val)
813#define bfin_read_CAN1_MB23_LENGTH() bfin_read16(CAN1_MB23_LENGTH)
814#define bfin_write_CAN1_MB23_LENGTH(val) bfin_write16(CAN1_MB23_LENGTH, val)
815#define bfin_read_CAN1_MB23_TIMESTAMP() bfin_read16(CAN1_MB23_TIMESTAMP)
816#define bfin_write_CAN1_MB23_TIMESTAMP(val) bfin_write16(CAN1_MB23_TIMESTAMP, val)
817#define bfin_read_CAN1_MB23_ID0() bfin_read16(CAN1_MB23_ID0)
818#define bfin_write_CAN1_MB23_ID0(val) bfin_write16(CAN1_MB23_ID0, val)
819#define bfin_read_CAN1_MB23_ID1() bfin_read16(CAN1_MB23_ID1)
820#define bfin_write_CAN1_MB23_ID1(val) bfin_write16(CAN1_MB23_ID1, val)
821#define bfin_read_CAN1_MB24_DATA0() bfin_read16(CAN1_MB24_DATA0)
822#define bfin_write_CAN1_MB24_DATA0(val) bfin_write16(CAN1_MB24_DATA0, val)
823#define bfin_read_CAN1_MB24_DATA1() bfin_read16(CAN1_MB24_DATA1)
824#define bfin_write_CAN1_MB24_DATA1(val) bfin_write16(CAN1_MB24_DATA1, val)
825#define bfin_read_CAN1_MB24_DATA2() bfin_read16(CAN1_MB24_DATA2)
826#define bfin_write_CAN1_MB24_DATA2(val) bfin_write16(CAN1_MB24_DATA2, val)
827#define bfin_read_CAN1_MB24_DATA3() bfin_read16(CAN1_MB24_DATA3)
828#define bfin_write_CAN1_MB24_DATA3(val) bfin_write16(CAN1_MB24_DATA3, val)
829#define bfin_read_CAN1_MB24_LENGTH() bfin_read16(CAN1_MB24_LENGTH)
830#define bfin_write_CAN1_MB24_LENGTH(val) bfin_write16(CAN1_MB24_LENGTH, val)
831#define bfin_read_CAN1_MB24_TIMESTAMP() bfin_read16(CAN1_MB24_TIMESTAMP)
832#define bfin_write_CAN1_MB24_TIMESTAMP(val) bfin_write16(CAN1_MB24_TIMESTAMP, val)
833#define bfin_read_CAN1_MB24_ID0() bfin_read16(CAN1_MB24_ID0)
834#define bfin_write_CAN1_MB24_ID0(val) bfin_write16(CAN1_MB24_ID0, val)
835#define bfin_read_CAN1_MB24_ID1() bfin_read16(CAN1_MB24_ID1)
836#define bfin_write_CAN1_MB24_ID1(val) bfin_write16(CAN1_MB24_ID1, val)
837#define bfin_read_CAN1_MB25_DATA0() bfin_read16(CAN1_MB25_DATA0)
838#define bfin_write_CAN1_MB25_DATA0(val) bfin_write16(CAN1_MB25_DATA0, val)
839#define bfin_read_CAN1_MB25_DATA1() bfin_read16(CAN1_MB25_DATA1)
840#define bfin_write_CAN1_MB25_DATA1(val) bfin_write16(CAN1_MB25_DATA1, val)
841#define bfin_read_CAN1_MB25_DATA2() bfin_read16(CAN1_MB25_DATA2)
842#define bfin_write_CAN1_MB25_DATA2(val) bfin_write16(CAN1_MB25_DATA2, val)
843#define bfin_read_CAN1_MB25_DATA3() bfin_read16(CAN1_MB25_DATA3)
844#define bfin_write_CAN1_MB25_DATA3(val) bfin_write16(CAN1_MB25_DATA3, val)
845#define bfin_read_CAN1_MB25_LENGTH() bfin_read16(CAN1_MB25_LENGTH)
846#define bfin_write_CAN1_MB25_LENGTH(val) bfin_write16(CAN1_MB25_LENGTH, val)
847#define bfin_read_CAN1_MB25_TIMESTAMP() bfin_read16(CAN1_MB25_TIMESTAMP)
848#define bfin_write_CAN1_MB25_TIMESTAMP(val) bfin_write16(CAN1_MB25_TIMESTAMP, val)
849#define bfin_read_CAN1_MB25_ID0() bfin_read16(CAN1_MB25_ID0)
850#define bfin_write_CAN1_MB25_ID0(val) bfin_write16(CAN1_MB25_ID0, val)
851#define bfin_read_CAN1_MB25_ID1() bfin_read16(CAN1_MB25_ID1)
852#define bfin_write_CAN1_MB25_ID1(val) bfin_write16(CAN1_MB25_ID1, val)
853#define bfin_read_CAN1_MB26_DATA0() bfin_read16(CAN1_MB26_DATA0)
854#define bfin_write_CAN1_MB26_DATA0(val) bfin_write16(CAN1_MB26_DATA0, val)
855#define bfin_read_CAN1_MB26_DATA1() bfin_read16(CAN1_MB26_DATA1)
856#define bfin_write_CAN1_MB26_DATA1(val) bfin_write16(CAN1_MB26_DATA1, val)
857#define bfin_read_CAN1_MB26_DATA2() bfin_read16(CAN1_MB26_DATA2)
858#define bfin_write_CAN1_MB26_DATA2(val) bfin_write16(CAN1_MB26_DATA2, val)
859#define bfin_read_CAN1_MB26_DATA3() bfin_read16(CAN1_MB26_DATA3)
860#define bfin_write_CAN1_MB26_DATA3(val) bfin_write16(CAN1_MB26_DATA3, val)
861#define bfin_read_CAN1_MB26_LENGTH() bfin_read16(CAN1_MB26_LENGTH)
862#define bfin_write_CAN1_MB26_LENGTH(val) bfin_write16(CAN1_MB26_LENGTH, val)
863#define bfin_read_CAN1_MB26_TIMESTAMP() bfin_read16(CAN1_MB26_TIMESTAMP)
864#define bfin_write_CAN1_MB26_TIMESTAMP(val) bfin_write16(CAN1_MB26_TIMESTAMP, val)
865#define bfin_read_CAN1_MB26_ID0() bfin_read16(CAN1_MB26_ID0)
866#define bfin_write_CAN1_MB26_ID0(val) bfin_write16(CAN1_MB26_ID0, val)
867#define bfin_read_CAN1_MB26_ID1() bfin_read16(CAN1_MB26_ID1)
868#define bfin_write_CAN1_MB26_ID1(val) bfin_write16(CAN1_MB26_ID1, val)
869#define bfin_read_CAN1_MB27_DATA0() bfin_read16(CAN1_MB27_DATA0)
870#define bfin_write_CAN1_MB27_DATA0(val) bfin_write16(CAN1_MB27_DATA0, val)
871#define bfin_read_CAN1_MB27_DATA1() bfin_read16(CAN1_MB27_DATA1)
872#define bfin_write_CAN1_MB27_DATA1(val) bfin_write16(CAN1_MB27_DATA1, val)
873#define bfin_read_CAN1_MB27_DATA2() bfin_read16(CAN1_MB27_DATA2)
874#define bfin_write_CAN1_MB27_DATA2(val) bfin_write16(CAN1_MB27_DATA2, val)
875#define bfin_read_CAN1_MB27_DATA3() bfin_read16(CAN1_MB27_DATA3)
876#define bfin_write_CAN1_MB27_DATA3(val) bfin_write16(CAN1_MB27_DATA3, val)
877#define bfin_read_CAN1_MB27_LENGTH() bfin_read16(CAN1_MB27_LENGTH)
878#define bfin_write_CAN1_MB27_LENGTH(val) bfin_write16(CAN1_MB27_LENGTH, val)
879#define bfin_read_CAN1_MB27_TIMESTAMP() bfin_read16(CAN1_MB27_TIMESTAMP)
880#define bfin_write_CAN1_MB27_TIMESTAMP(val) bfin_write16(CAN1_MB27_TIMESTAMP, val)
881#define bfin_read_CAN1_MB27_ID0() bfin_read16(CAN1_MB27_ID0)
882#define bfin_write_CAN1_MB27_ID0(val) bfin_write16(CAN1_MB27_ID0, val)
883#define bfin_read_CAN1_MB27_ID1() bfin_read16(CAN1_MB27_ID1)
884#define bfin_write_CAN1_MB27_ID1(val) bfin_write16(CAN1_MB27_ID1, val)
885#define bfin_read_CAN1_MB28_DATA0() bfin_read16(CAN1_MB28_DATA0)
886#define bfin_write_CAN1_MB28_DATA0(val) bfin_write16(CAN1_MB28_DATA0, val)
887#define bfin_read_CAN1_MB28_DATA1() bfin_read16(CAN1_MB28_DATA1)
888#define bfin_write_CAN1_MB28_DATA1(val) bfin_write16(CAN1_MB28_DATA1, val)
889#define bfin_read_CAN1_MB28_DATA2() bfin_read16(CAN1_MB28_DATA2)
890#define bfin_write_CAN1_MB28_DATA2(val) bfin_write16(CAN1_MB28_DATA2, val)
891#define bfin_read_CAN1_MB28_DATA3() bfin_read16(CAN1_MB28_DATA3)
892#define bfin_write_CAN1_MB28_DATA3(val) bfin_write16(CAN1_MB28_DATA3, val)
893#define bfin_read_CAN1_MB28_LENGTH() bfin_read16(CAN1_MB28_LENGTH)
894#define bfin_write_CAN1_MB28_LENGTH(val) bfin_write16(CAN1_MB28_LENGTH, val)
895#define bfin_read_CAN1_MB28_TIMESTAMP() bfin_read16(CAN1_MB28_TIMESTAMP)
896#define bfin_write_CAN1_MB28_TIMESTAMP(val) bfin_write16(CAN1_MB28_TIMESTAMP, val)
897#define bfin_read_CAN1_MB28_ID0() bfin_read16(CAN1_MB28_ID0)
898#define bfin_write_CAN1_MB28_ID0(val) bfin_write16(CAN1_MB28_ID0, val)
899#define bfin_read_CAN1_MB28_ID1() bfin_read16(CAN1_MB28_ID1)
900#define bfin_write_CAN1_MB28_ID1(val) bfin_write16(CAN1_MB28_ID1, val)
901#define bfin_read_CAN1_MB29_DATA0() bfin_read16(CAN1_MB29_DATA0)
902#define bfin_write_CAN1_MB29_DATA0(val) bfin_write16(CAN1_MB29_DATA0, val)
903#define bfin_read_CAN1_MB29_DATA1() bfin_read16(CAN1_MB29_DATA1)
904#define bfin_write_CAN1_MB29_DATA1(val) bfin_write16(CAN1_MB29_DATA1, val)
905#define bfin_read_CAN1_MB29_DATA2() bfin_read16(CAN1_MB29_DATA2)
906#define bfin_write_CAN1_MB29_DATA2(val) bfin_write16(CAN1_MB29_DATA2, val)
907#define bfin_read_CAN1_MB29_DATA3() bfin_read16(CAN1_MB29_DATA3)
908#define bfin_write_CAN1_MB29_DATA3(val) bfin_write16(CAN1_MB29_DATA3, val)
909#define bfin_read_CAN1_MB29_LENGTH() bfin_read16(CAN1_MB29_LENGTH)
910#define bfin_write_CAN1_MB29_LENGTH(val) bfin_write16(CAN1_MB29_LENGTH, val)
911#define bfin_read_CAN1_MB29_TIMESTAMP() bfin_read16(CAN1_MB29_TIMESTAMP)
912#define bfin_write_CAN1_MB29_TIMESTAMP(val) bfin_write16(CAN1_MB29_TIMESTAMP, val)
913#define bfin_read_CAN1_MB29_ID0() bfin_read16(CAN1_MB29_ID0)
914#define bfin_write_CAN1_MB29_ID0(val) bfin_write16(CAN1_MB29_ID0, val)
915#define bfin_read_CAN1_MB29_ID1() bfin_read16(CAN1_MB29_ID1)
916#define bfin_write_CAN1_MB29_ID1(val) bfin_write16(CAN1_MB29_ID1, val)
917#define bfin_read_CAN1_MB30_DATA0() bfin_read16(CAN1_MB30_DATA0)
918#define bfin_write_CAN1_MB30_DATA0(val) bfin_write16(CAN1_MB30_DATA0, val)
919#define bfin_read_CAN1_MB30_DATA1() bfin_read16(CAN1_MB30_DATA1)
920#define bfin_write_CAN1_MB30_DATA1(val) bfin_write16(CAN1_MB30_DATA1, val)
921#define bfin_read_CAN1_MB30_DATA2() bfin_read16(CAN1_MB30_DATA2)
922#define bfin_write_CAN1_MB30_DATA2(val) bfin_write16(CAN1_MB30_DATA2, val)
923#define bfin_read_CAN1_MB30_DATA3() bfin_read16(CAN1_MB30_DATA3)
924#define bfin_write_CAN1_MB30_DATA3(val) bfin_write16(CAN1_MB30_DATA3, val)
925#define bfin_read_CAN1_MB30_LENGTH() bfin_read16(CAN1_MB30_LENGTH)
926#define bfin_write_CAN1_MB30_LENGTH(val) bfin_write16(CAN1_MB30_LENGTH, val)
927#define bfin_read_CAN1_MB30_TIMESTAMP() bfin_read16(CAN1_MB30_TIMESTAMP)
928#define bfin_write_CAN1_MB30_TIMESTAMP(val) bfin_write16(CAN1_MB30_TIMESTAMP, val)
929#define bfin_read_CAN1_MB30_ID0() bfin_read16(CAN1_MB30_ID0)
930#define bfin_write_CAN1_MB30_ID0(val) bfin_write16(CAN1_MB30_ID0, val)
931#define bfin_read_CAN1_MB30_ID1() bfin_read16(CAN1_MB30_ID1)
932#define bfin_write_CAN1_MB30_ID1(val) bfin_write16(CAN1_MB30_ID1, val)
933#define bfin_read_CAN1_MB31_DATA0() bfin_read16(CAN1_MB31_DATA0)
934#define bfin_write_CAN1_MB31_DATA0(val) bfin_write16(CAN1_MB31_DATA0, val)
935#define bfin_read_CAN1_MB31_DATA1() bfin_read16(CAN1_MB31_DATA1)
936#define bfin_write_CAN1_MB31_DATA1(val) bfin_write16(CAN1_MB31_DATA1, val)
937#define bfin_read_CAN1_MB31_DATA2() bfin_read16(CAN1_MB31_DATA2)
938#define bfin_write_CAN1_MB31_DATA2(val) bfin_write16(CAN1_MB31_DATA2, val)
939#define bfin_read_CAN1_MB31_DATA3() bfin_read16(CAN1_MB31_DATA3)
940#define bfin_write_CAN1_MB31_DATA3(val) bfin_write16(CAN1_MB31_DATA3, val)
941#define bfin_read_CAN1_MB31_LENGTH() bfin_read16(CAN1_MB31_LENGTH)
942#define bfin_write_CAN1_MB31_LENGTH(val) bfin_write16(CAN1_MB31_LENGTH, val)
943#define bfin_read_CAN1_MB31_TIMESTAMP() bfin_read16(CAN1_MB31_TIMESTAMP)
944#define bfin_write_CAN1_MB31_TIMESTAMP(val) bfin_write16(CAN1_MB31_TIMESTAMP, val)
945#define bfin_read_CAN1_MB31_ID0() bfin_read16(CAN1_MB31_ID0)
946#define bfin_write_CAN1_MB31_ID0(val) bfin_write16(CAN1_MB31_ID0, val)
947#define bfin_read_CAN1_MB31_ID1() bfin_read16(CAN1_MB31_ID1)
948#define bfin_write_CAN1_MB31_ID1(val) bfin_write16(CAN1_MB31_ID1, val)
949
950/* ATAPI Registers */
951
952#define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL)
953#define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val)
954#define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS)
955#define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val)
956#define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR)
957#define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val)
958#define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF)
959#define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val)
960#define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF)
961#define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val)
962#define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK)
963#define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val)
964#define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS)
965#define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val)
966#define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN)
967#define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val)
968#define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS)
969#define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val)
970#define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE)
971#define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val)
972#define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE)
973#define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val)
974#define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT)
975#define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val)
976#define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT)
977#define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val)
978#define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT)
979#define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val)
980#define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT)
981#define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val)
982#define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0)
983#define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val)
984#define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0)
985#define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val)
986#define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1)
987#define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val)
988#define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0)
989#define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val)
990#define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1)
991#define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val)
992#define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2)
993#define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val)
994#define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0)
995#define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val)
996#define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1)
997#define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val)
998#define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2)
999#define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val)
1000#define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3)
1001#define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val)
1002
1003/* SDH Registers */
1004
1005#define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL)
1006#define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val)
1007#define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL)
1008#define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val)
1009#define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT)
1010#define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val)
1011#define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND)
1012#define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val)
1013#define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD)
1014#define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val)
1015#define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0)
1016#define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val)
1017#define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1)
1018#define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val)
1019#define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2)
1020#define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val)
1021#define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3)
1022#define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val)
1023#define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER)
1024#define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val)
1025#define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH)
1026#define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val)
1027#define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL)
1028#define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val)
1029#define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT)
1030#define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val)
1031#define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS)
1032#define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val)
1033#define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR)
1034#define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val)
1035#define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0)
1036#define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val)
1037#define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1)
1038#define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val)
1039#define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT)
1040#define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val)
1041#define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO)
1042#define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val)
1043#define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS)
1044#define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val)
1045#define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK)
1046#define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val)
1047#define bfin_read_SDH_CFG() bfin_read16(SDH_CFG)
1048#define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val)
1049#define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN)
1050#define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val)
1051#define bfin_read_SDH_PID0() bfin_read16(SDH_PID0)
1052#define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val)
1053#define bfin_read_SDH_PID1() bfin_read16(SDH_PID1)
1054#define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val)
1055#define bfin_read_SDH_PID2() bfin_read16(SDH_PID2)
1056#define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val)
1057#define bfin_read_SDH_PID3() bfin_read16(SDH_PID3)
1058#define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val)
1059#define bfin_read_SDH_PID4() bfin_read16(SDH_PID4)
1060#define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val)
1061#define bfin_read_SDH_PID5() bfin_read16(SDH_PID5)
1062#define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val)
1063#define bfin_read_SDH_PID6() bfin_read16(SDH_PID6)
1064#define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val)
1065#define bfin_read_SDH_PID7() bfin_read16(SDH_PID7)
1066#define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val)
1067
1068/* HOST Port Registers */
1069
1070#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
1071#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
1072#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
1073#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
1074#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
1075#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
1076
1077/* USB Control Registers */
1078
1079#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
1080#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
1081#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
1082#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
1083#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
1084#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
1085#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
1086#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
1087#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
1088#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
1089#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
1090#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
1091#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
1092#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
1093#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
1094#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
1095#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
1096#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
1097#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
1098#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
1099#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
1100#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
1101#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
1102#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
1103#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
1104#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
1105
1106/* USB Packet Control Registers */
1107
1108#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
1109#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
1110#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
1111#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
1112#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
1113#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
1114#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
1115#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
1116#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
1117#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
1118#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
1119#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
1120#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
1121#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
1122#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
1123#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
1124#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
1125#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
1126#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
1127#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
1128#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
1129#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
1130#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
1131#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
1132#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
1133#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
1134
1135/* USB Endbfin_read_()oint FIFO Registers */
1136
1137#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
1138#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
1139#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
1140#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
1141#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
1142#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
1143#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
1144#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
1145#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
1146#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
1147#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
1148#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
1149#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
1150#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
1151#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
1152#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
1153
1154/* USB OTG Control Registers */
1155
1156#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
1157#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
1158#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
1159#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
1160#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
1161#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
1162
1163/* USB Phy Control Registers */
1164
1165#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
1166#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
1167#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
1168#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
1169#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
1170#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
1171#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
1172#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
1173#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
1174#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
1175
1176/* (APHY_CNTRL is for ADI usage only) */
1177
1178#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
1179#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
1180
1181/* (APHY_CALIB is for ADI usage only) */
1182
1183#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
1184#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
1185#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
1186#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
1187
1188/* (PHY_TEST is for ADI usage only) */
1189
1190#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
1191#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
1192#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
1193#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
1194#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
1195#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
1196
1197/* USB Endbfin_read_()oint 0 Control Registers */
1198
1199#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
1200#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
1201#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
1202#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
1203#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
1204#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
1205#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
1206#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
1207#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
1208#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
1209#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
1210#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
1211#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
1212#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
1213#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
1214#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
1215#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
1216#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
1217
1218/* USB Endbfin_read_()oint 1 Control Registers */
1219
1220#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
1221#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
1222#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
1223#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
1224#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
1225#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
1226#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
1227#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
1228#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
1229#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
1230#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
1231#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
1232#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
1233#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
1234#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
1235#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
1236#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
1237#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
1238#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
1239#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
1240
1241/* USB Endbfin_read_()oint 2 Control Registers */
1242
1243#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
1244#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
1245#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
1246#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
1247#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
1248#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
1249#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
1250#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
1251#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
1252#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
1253#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
1254#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
1255#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
1256#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
1257#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
1258#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
1259#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
1260#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
1261#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
1262#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
1263
1264/* USB Endbfin_read_()oint 3 Control Registers */
1265
1266#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
1267#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
1268#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
1269#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
1270#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
1271#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
1272#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
1273#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
1274#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
1275#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
1276#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
1277#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
1278#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
1279#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
1280#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
1281#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
1282#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
1283#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
1284#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
1285#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
1286
1287/* USB Endbfin_read_()oint 4 Control Registers */
1288
1289#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
1290#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
1291#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
1292#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
1293#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
1294#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
1295#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
1296#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
1297#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
1298#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
1299#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
1300#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
1301#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
1302#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
1303#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
1304#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
1305#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
1306#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
1307#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
1308#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
1309
1310/* USB Endbfin_read_()oint 5 Control Registers */
1311
1312#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
1313#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
1314#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
1315#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
1316#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
1317#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
1318#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
1319#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
1320#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
1321#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
1322#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
1323#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
1324#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
1325#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
1326#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
1327#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
1328#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
1329#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
1330#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
1331#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
1332
1333/* USB Endbfin_read_()oint 6 Control Registers */
1334
1335#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
1336#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
1337#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
1338#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
1339#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
1340#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
1341#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
1342#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
1343#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
1344#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
1345#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
1346#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
1347#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
1348#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
1349#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
1350#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
1351#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
1352#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
1353#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
1354#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
1355
1356/* USB Endbfin_read_()oint 7 Control Registers */
1357
1358#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
1359#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
1360#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
1361#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
1362#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
1363#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
1364#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
1365#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
1366#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
1367#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
1368#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
1369#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
1370#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
1371#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
1372#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
1373#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
1374#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
1375#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
1376#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
1377#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
1378#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
1379#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
1380#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
1381#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
1382
1383/* USB Channel 0 Config Registers */
1384
1385#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
1386#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
1387#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
1388#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
1389#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
1390#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
1391#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
1392#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
1393#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
1394#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
1395
1396/* USB Channel 1 Config Registers */
1397
1398#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
1399#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
1400#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
1401#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
1402#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
1403#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
1404#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
1405#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
1406#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
1407#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
1408
1409/* USB Channel 2 Config Registers */
1410
1411#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
1412#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
1413#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
1414#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
1415#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
1416#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
1417#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
1418#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
1419#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
1420#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
1421
1422/* USB Channel 3 Config Registers */
1423
1424#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
1425#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
1426#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
1427#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
1428#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
1429#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
1430#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
1431#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
1432#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
1433#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
1434
1435/* USB Channel 4 Config Registers */
1436
1437#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
1438#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
1439#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
1440#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
1441#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
1442#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
1443#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
1444#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
1445#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
1446#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
1447
1448/* USB Channel 5 Config Registers */
1449
1450#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
1451#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
1452#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
1453#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
1454#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
1455#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
1456#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
1457#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
1458#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
1459#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
1460
1461/* USB Channel 6 Config Registers */
1462
1463#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
1464#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
1465#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
1466#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
1467#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
1468#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
1469#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
1470#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
1471#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
1472#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
1473
1474/* USB Channel 7 Config Registers */
1475
1476#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
1477#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
1478#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
1479#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
1480#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
1481#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
1482#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
1483#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
1484#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
1485#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
1486
1487/* Keybfin_read_()ad Registers */
1488
1489#define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL)
1490#define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val)
1491#define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE)
1492#define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val)
1493#define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL)
1494#define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val)
1495#define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL)
1496#define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val)
1497#define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT)
1498#define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val)
1499#define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL)
1500#define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val)
1501
1502/* Pixel Combfin_read_()ositor (PIXC) Registers */
1503
1504#define bfin_read_PIXC_CTL() bfin_read16(PIXC_CTL)
1505#define bfin_write_PIXC_CTL(val) bfin_write16(PIXC_CTL, val)
1506#define bfin_read_PIXC_PPL() bfin_read16(PIXC_PPL)
1507#define bfin_write_PIXC_PPL(val) bfin_write16(PIXC_PPL, val)
1508#define bfin_read_PIXC_LPF() bfin_read16(PIXC_LPF)
1509#define bfin_write_PIXC_LPF(val) bfin_write16(PIXC_LPF, val)
1510#define bfin_read_PIXC_AHSTART() bfin_read16(PIXC_AHSTART)
1511#define bfin_write_PIXC_AHSTART(val) bfin_write16(PIXC_AHSTART, val)
1512#define bfin_read_PIXC_AHEND() bfin_read16(PIXC_AHEND)
1513#define bfin_write_PIXC_AHEND(val) bfin_write16(PIXC_AHEND, val)
1514#define bfin_read_PIXC_AVSTART() bfin_read16(PIXC_AVSTART)
1515#define bfin_write_PIXC_AVSTART(val) bfin_write16(PIXC_AVSTART, val)
1516#define bfin_read_PIXC_AVEND() bfin_read16(PIXC_AVEND)
1517#define bfin_write_PIXC_AVEND(val) bfin_write16(PIXC_AVEND, val)
1518#define bfin_read_PIXC_ATRANSP() bfin_read16(PIXC_ATRANSP)
1519#define bfin_write_PIXC_ATRANSP(val) bfin_write16(PIXC_ATRANSP, val)
1520#define bfin_read_PIXC_BHSTART() bfin_read16(PIXC_BHSTART)
1521#define bfin_write_PIXC_BHSTART(val) bfin_write16(PIXC_BHSTART, val)
1522#define bfin_read_PIXC_BHEND() bfin_read16(PIXC_BHEND)
1523#define bfin_write_PIXC_BHEND(val) bfin_write16(PIXC_BHEND, val)
1524#define bfin_read_PIXC_BVSTART() bfin_read16(PIXC_BVSTART)
1525#define bfin_write_PIXC_BVSTART(val) bfin_write16(PIXC_BVSTART, val)
1526#define bfin_read_PIXC_BVEND() bfin_read16(PIXC_BVEND)
1527#define bfin_write_PIXC_BVEND(val) bfin_write16(PIXC_BVEND, val)
1528#define bfin_read_PIXC_BTRANSP() bfin_read16(PIXC_BTRANSP)
1529#define bfin_write_PIXC_BTRANSP(val) bfin_write16(PIXC_BTRANSP, val)
1530#define bfin_read_PIXC_INTRSTAT() bfin_read16(PIXC_INTRSTAT)
1531#define bfin_write_PIXC_INTRSTAT(val) bfin_write16(PIXC_INTRSTAT, val)
1532#define bfin_read_PIXC_RYCON() bfin_read32(PIXC_RYCON)
1533#define bfin_write_PIXC_RYCON(val) bfin_write32(PIXC_RYCON, val)
1534#define bfin_read_PIXC_GUCON() bfin_read32(PIXC_GUCON)
1535#define bfin_write_PIXC_GUCON(val) bfin_write32(PIXC_GUCON, val)
1536#define bfin_read_PIXC_BVCON() bfin_read32(PIXC_BVCON)
1537#define bfin_write_PIXC_BVCON(val) bfin_write32(PIXC_BVCON, val)
1538#define bfin_read_PIXC_CCBIAS() bfin_read32(PIXC_CCBIAS)
1539#define bfin_write_PIXC_CCBIAS(val) bfin_write32(PIXC_CCBIAS, val)
1540#define bfin_read_PIXC_TC() bfin_read32(PIXC_TC)
1541#define bfin_write_PIXC_TC(val) bfin_write32(PIXC_TC, val)
1542
1543/* Handshake MDMA 0 Registers */
1544
1545#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
1546#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
1547#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
1548#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
1549#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
1550#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
1551#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
1552#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
1553#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
1554#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
1555#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
1556#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
1557#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
1558#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
1559
1560/* Handshake MDMA 1 Registers */
1561
1562#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
1563#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
1564#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
1565#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
1566#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
1567#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
1568#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
1569#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
1570#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
1571#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
1572#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
1573#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
1574#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
1575#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
1576
1577#endif /* _CDEF_BF548_H */
diff --git a/include/asm-blackfin/mach-bf548/cdefBF549.h b/include/asm-blackfin/mach-bf548/cdefBF549.h
deleted file mode 100644
index 92d07d961999..000000000000
--- a/include/asm-blackfin/mach-bf548/cdefBF549.h
+++ /dev/null
@@ -1,1863 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf549/cdefBF549.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF549_H
32#define _CDEF_BF549_H
33
34/* include all Core registers and bit definitions */
35#include "defBF549.h"
36
37/* include core sbfin_read_()ecific register pointer definitions */
38#include <asm/mach-common/cdef_LPBlackfin.h>
39
40/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF549 */
41
42/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
43#include "cdefBF54x_base.h"
44
45/* The following are the #defines needed by ADSP-BF549 that are not in the common header */
46
47/* Timer Registers */
48
49#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
50#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG, val)
51#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
52#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER, val)
53#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
54#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD, val)
55#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
56#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH, val)
57#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
58#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG, val)
59#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
60#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER, val)
61#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
62#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD, val)
63#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
64#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH, val)
65#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
66#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG, val)
67#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
68#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER, val)
69#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
70#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD, val)
71#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
72#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH, val)
73
74/* Timer Groubfin_read_() of 3 */
75
76#define bfin_read_TIMER_ENABLE1() bfin_read16(TIMER_ENABLE1)
77#define bfin_write_TIMER_ENABLE1(val) bfin_write16(TIMER_ENABLE1, val)
78#define bfin_read_TIMER_DISABLE1() bfin_read16(TIMER_DISABLE1)
79#define bfin_write_TIMER_DISABLE1(val) bfin_write16(TIMER_DISABLE1, val)
80#define bfin_read_TIMER_STATUS1() bfin_read32(TIMER_STATUS1)
81#define bfin_write_TIMER_STATUS1(val) bfin_write32(TIMER_STATUS1, val)
82
83/* SPORT0 Registers */
84
85#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
86#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1, val)
87#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
88#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2, val)
89#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
90#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV, val)
91#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
92#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV, val)
93#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
94#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
95#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
96#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
97#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
98#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
99#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
100#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2, val)
101#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
102#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV, val)
103#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
104#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV, val)
105#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
106#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT, val)
107#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
108#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL, val)
109#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
110#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1, val)
111#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
112#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2, val)
113#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
114#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0, val)
115#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
116#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1, val)
117#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
118#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2, val)
119#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
120#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3, val)
121#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
122#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0, val)
123#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
124#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1, val)
125#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
126#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2, val)
127#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
128#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3, val)
129
130/* EPPI0 Registers */
131
132#define bfin_read_EPPI0_STATUS() bfin_read16(EPPI0_STATUS)
133#define bfin_write_EPPI0_STATUS(val) bfin_write16(EPPI0_STATUS, val)
134#define bfin_read_EPPI0_HCOUNT() bfin_read16(EPPI0_HCOUNT)
135#define bfin_write_EPPI0_HCOUNT(val) bfin_write16(EPPI0_HCOUNT, val)
136#define bfin_read_EPPI0_HDELAY() bfin_read16(EPPI0_HDELAY)
137#define bfin_write_EPPI0_HDELAY(val) bfin_write16(EPPI0_HDELAY, val)
138#define bfin_read_EPPI0_VCOUNT() bfin_read16(EPPI0_VCOUNT)
139#define bfin_write_EPPI0_VCOUNT(val) bfin_write16(EPPI0_VCOUNT, val)
140#define bfin_read_EPPI0_VDELAY() bfin_read16(EPPI0_VDELAY)
141#define bfin_write_EPPI0_VDELAY(val) bfin_write16(EPPI0_VDELAY, val)
142#define bfin_read_EPPI0_FRAME() bfin_read16(EPPI0_FRAME)
143#define bfin_write_EPPI0_FRAME(val) bfin_write16(EPPI0_FRAME, val)
144#define bfin_read_EPPI0_LINE() bfin_read16(EPPI0_LINE)
145#define bfin_write_EPPI0_LINE(val) bfin_write16(EPPI0_LINE, val)
146#define bfin_read_EPPI0_CLKDIV() bfin_read16(EPPI0_CLKDIV)
147#define bfin_write_EPPI0_CLKDIV(val) bfin_write16(EPPI0_CLKDIV, val)
148#define bfin_read_EPPI0_CONTROL() bfin_read32(EPPI0_CONTROL)
149#define bfin_write_EPPI0_CONTROL(val) bfin_write32(EPPI0_CONTROL, val)
150#define bfin_read_EPPI0_FS1W_HBL() bfin_read32(EPPI0_FS1W_HBL)
151#define bfin_write_EPPI0_FS1W_HBL(val) bfin_write32(EPPI0_FS1W_HBL, val)
152#define bfin_read_EPPI0_FS1P_AVPL() bfin_read32(EPPI0_FS1P_AVPL)
153#define bfin_write_EPPI0_FS1P_AVPL(val) bfin_write32(EPPI0_FS1P_AVPL, val)
154#define bfin_read_EPPI0_FS2W_LVB() bfin_read32(EPPI0_FS2W_LVB)
155#define bfin_write_EPPI0_FS2W_LVB(val) bfin_write32(EPPI0_FS2W_LVB, val)
156#define bfin_read_EPPI0_FS2P_LAVF() bfin_read32(EPPI0_FS2P_LAVF)
157#define bfin_write_EPPI0_FS2P_LAVF(val) bfin_write32(EPPI0_FS2P_LAVF, val)
158#define bfin_read_EPPI0_CLIP() bfin_read32(EPPI0_CLIP)
159#define bfin_write_EPPI0_CLIP(val) bfin_write32(EPPI0_CLIP, val)
160
161/* UART2 Registers */
162
163#define bfin_read_UART2_DLL() bfin_read16(UART2_DLL)
164#define bfin_write_UART2_DLL(val) bfin_write16(UART2_DLL, val)
165#define bfin_read_UART2_DLH() bfin_read16(UART2_DLH)
166#define bfin_write_UART2_DLH(val) bfin_write16(UART2_DLH, val)
167#define bfin_read_UART2_GCTL() bfin_read16(UART2_GCTL)
168#define bfin_write_UART2_GCTL(val) bfin_write16(UART2_GCTL, val)
169#define bfin_read_UART2_LCR() bfin_read16(UART2_LCR)
170#define bfin_write_UART2_LCR(val) bfin_write16(UART2_LCR, val)
171#define bfin_read_UART2_MCR() bfin_read16(UART2_MCR)
172#define bfin_write_UART2_MCR(val) bfin_write16(UART2_MCR, val)
173#define bfin_read_UART2_LSR() bfin_read16(UART2_LSR)
174#define bfin_write_UART2_LSR(val) bfin_write16(UART2_LSR, val)
175#define bfin_read_UART2_MSR() bfin_read16(UART2_MSR)
176#define bfin_write_UART2_MSR(val) bfin_write16(UART2_MSR, val)
177#define bfin_read_UART2_SCR() bfin_read16(UART2_SCR)
178#define bfin_write_UART2_SCR(val) bfin_write16(UART2_SCR, val)
179#define bfin_read_UART2_IER_SET() bfin_read16(UART2_IER_SET)
180#define bfin_write_UART2_IER_SET(val) bfin_write16(UART2_IER_SET, val)
181#define bfin_read_UART2_IER_CLEAR() bfin_read16(UART2_IER_CLEAR)
182#define bfin_write_UART2_IER_CLEAR(val) bfin_write16(UART2_IER_CLEAR, val)
183#define bfin_read_UART2_RBR() bfin_read16(UART2_RBR)
184#define bfin_write_UART2_RBR(val) bfin_write16(UART2_RBR, val)
185
186/* Two Wire Interface Registers (TWI1) */
187
188/* SPI2 Registers */
189
190#define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL)
191#define bfin_write_SPI2_CTL(val) bfin_write16(SPI2_CTL, val)
192#define bfin_read_SPI2_FLG() bfin_read16(SPI2_FLG)
193#define bfin_write_SPI2_FLG(val) bfin_write16(SPI2_FLG, val)
194#define bfin_read_SPI2_STAT() bfin_read16(SPI2_STAT)
195#define bfin_write_SPI2_STAT(val) bfin_write16(SPI2_STAT, val)
196#define bfin_read_SPI2_TDBR() bfin_read16(SPI2_TDBR)
197#define bfin_write_SPI2_TDBR(val) bfin_write16(SPI2_TDBR, val)
198#define bfin_read_SPI2_RDBR() bfin_read16(SPI2_RDBR)
199#define bfin_write_SPI2_RDBR(val) bfin_write16(SPI2_RDBR, val)
200#define bfin_read_SPI2_BAUD() bfin_read16(SPI2_BAUD)
201#define bfin_write_SPI2_BAUD(val) bfin_write16(SPI2_BAUD, val)
202#define bfin_read_SPI2_SHADOW() bfin_read16(SPI2_SHADOW)
203#define bfin_write_SPI2_SHADOW(val) bfin_write16(SPI2_SHADOW, val)
204
205/* MXVR Registers */
206
207#define bfin_read_MXVR_CONFIG() bfin_read16(MXVR_CONFIG)
208#define bfin_write_MXVR_CONFIG(val) bfin_write16(MXVR_CONFIG, val)
209#define bfin_read_MXVR_STATE_0() bfin_read32(MXVR_STATE_0)
210#define bfin_write_MXVR_STATE_0(val) bfin_write32(MXVR_STATE_0, val)
211#define bfin_read_MXVR_STATE_1() bfin_read32(MXVR_STATE_1)
212#define bfin_write_MXVR_STATE_1(val) bfin_write32(MXVR_STATE_1, val)
213#define bfin_read_MXVR_INT_STAT_0() bfin_read32(MXVR_INT_STAT_0)
214#define bfin_write_MXVR_INT_STAT_0(val) bfin_write32(MXVR_INT_STAT_0, val)
215#define bfin_read_MXVR_INT_STAT_1() bfin_read32(MXVR_INT_STAT_1)
216#define bfin_write_MXVR_INT_STAT_1(val) bfin_write32(MXVR_INT_STAT_1, val)
217#define bfin_read_MXVR_INT_EN_0() bfin_read32(MXVR_INT_EN_0)
218#define bfin_write_MXVR_INT_EN_0(val) bfin_write32(MXVR_INT_EN_0, val)
219#define bfin_read_MXVR_INT_EN_1() bfin_read32(MXVR_INT_EN_1)
220#define bfin_write_MXVR_INT_EN_1(val) bfin_write32(MXVR_INT_EN_1, val)
221#define bfin_read_MXVR_POSITION() bfin_read16(MXVR_POSITION)
222#define bfin_write_MXVR_POSITION(val) bfin_write16(MXVR_POSITION, val)
223#define bfin_read_MXVR_MAX_POSITION() bfin_read16(MXVR_MAX_POSITION)
224#define bfin_write_MXVR_MAX_POSITION(val) bfin_write16(MXVR_MAX_POSITION, val)
225#define bfin_read_MXVR_DELAY() bfin_read16(MXVR_DELAY)
226#define bfin_write_MXVR_DELAY(val) bfin_write16(MXVR_DELAY, val)
227#define bfin_read_MXVR_MAX_DELAY() bfin_read16(MXVR_MAX_DELAY)
228#define bfin_write_MXVR_MAX_DELAY(val) bfin_write16(MXVR_MAX_DELAY, val)
229#define bfin_read_MXVR_LADDR() bfin_read32(MXVR_LADDR)
230#define bfin_write_MXVR_LADDR(val) bfin_write32(MXVR_LADDR, val)
231#define bfin_read_MXVR_GADDR() bfin_read16(MXVR_GADDR)
232#define bfin_write_MXVR_GADDR(val) bfin_write16(MXVR_GADDR, val)
233#define bfin_read_MXVR_AADDR() bfin_read32(MXVR_AADDR)
234#define bfin_write_MXVR_AADDR(val) bfin_write32(MXVR_AADDR, val)
235
236/* MXVR Allocation Table Registers */
237
238#define bfin_read_MXVR_ALLOC_0() bfin_read32(MXVR_ALLOC_0)
239#define bfin_write_MXVR_ALLOC_0(val) bfin_write32(MXVR_ALLOC_0, val)
240#define bfin_read_MXVR_ALLOC_1() bfin_read32(MXVR_ALLOC_1)
241#define bfin_write_MXVR_ALLOC_1(val) bfin_write32(MXVR_ALLOC_1, val)
242#define bfin_read_MXVR_ALLOC_2() bfin_read32(MXVR_ALLOC_2)
243#define bfin_write_MXVR_ALLOC_2(val) bfin_write32(MXVR_ALLOC_2, val)
244#define bfin_read_MXVR_ALLOC_3() bfin_read32(MXVR_ALLOC_3)
245#define bfin_write_MXVR_ALLOC_3(val) bfin_write32(MXVR_ALLOC_3, val)
246#define bfin_read_MXVR_ALLOC_4() bfin_read32(MXVR_ALLOC_4)
247#define bfin_write_MXVR_ALLOC_4(val) bfin_write32(MXVR_ALLOC_4, val)
248#define bfin_read_MXVR_ALLOC_5() bfin_read32(MXVR_ALLOC_5)
249#define bfin_write_MXVR_ALLOC_5(val) bfin_write32(MXVR_ALLOC_5, val)
250#define bfin_read_MXVR_ALLOC_6() bfin_read32(MXVR_ALLOC_6)
251#define bfin_write_MXVR_ALLOC_6(val) bfin_write32(MXVR_ALLOC_6, val)
252#define bfin_read_MXVR_ALLOC_7() bfin_read32(MXVR_ALLOC_7)
253#define bfin_write_MXVR_ALLOC_7(val) bfin_write32(MXVR_ALLOC_7, val)
254#define bfin_read_MXVR_ALLOC_8() bfin_read32(MXVR_ALLOC_8)
255#define bfin_write_MXVR_ALLOC_8(val) bfin_write32(MXVR_ALLOC_8, val)
256#define bfin_read_MXVR_ALLOC_9() bfin_read32(MXVR_ALLOC_9)
257#define bfin_write_MXVR_ALLOC_9(val) bfin_write32(MXVR_ALLOC_9, val)
258#define bfin_read_MXVR_ALLOC_10() bfin_read32(MXVR_ALLOC_10)
259#define bfin_write_MXVR_ALLOC_10(val) bfin_write32(MXVR_ALLOC_10, val)
260#define bfin_read_MXVR_ALLOC_11() bfin_read32(MXVR_ALLOC_11)
261#define bfin_write_MXVR_ALLOC_11(val) bfin_write32(MXVR_ALLOC_11, val)
262#define bfin_read_MXVR_ALLOC_12() bfin_read32(MXVR_ALLOC_12)
263#define bfin_write_MXVR_ALLOC_12(val) bfin_write32(MXVR_ALLOC_12, val)
264#define bfin_read_MXVR_ALLOC_13() bfin_read32(MXVR_ALLOC_13)
265#define bfin_write_MXVR_ALLOC_13(val) bfin_write32(MXVR_ALLOC_13, val)
266#define bfin_read_MXVR_ALLOC_14() bfin_read32(MXVR_ALLOC_14)
267#define bfin_write_MXVR_ALLOC_14(val) bfin_write32(MXVR_ALLOC_14, val)
268
269/* MXVR Channel Assign Registers */
270
271#define bfin_read_MXVR_SYNC_LCHAN_0() bfin_read32(MXVR_SYNC_LCHAN_0)
272#define bfin_write_MXVR_SYNC_LCHAN_0(val) bfin_write32(MXVR_SYNC_LCHAN_0, val)
273#define bfin_read_MXVR_SYNC_LCHAN_1() bfin_read32(MXVR_SYNC_LCHAN_1)
274#define bfin_write_MXVR_SYNC_LCHAN_1(val) bfin_write32(MXVR_SYNC_LCHAN_1, val)
275#define bfin_read_MXVR_SYNC_LCHAN_2() bfin_read32(MXVR_SYNC_LCHAN_2)
276#define bfin_write_MXVR_SYNC_LCHAN_2(val) bfin_write32(MXVR_SYNC_LCHAN_2, val)
277#define bfin_read_MXVR_SYNC_LCHAN_3() bfin_read32(MXVR_SYNC_LCHAN_3)
278#define bfin_write_MXVR_SYNC_LCHAN_3(val) bfin_write32(MXVR_SYNC_LCHAN_3, val)
279#define bfin_read_MXVR_SYNC_LCHAN_4() bfin_read32(MXVR_SYNC_LCHAN_4)
280#define bfin_write_MXVR_SYNC_LCHAN_4(val) bfin_write32(MXVR_SYNC_LCHAN_4, val)
281#define bfin_read_MXVR_SYNC_LCHAN_5() bfin_read32(MXVR_SYNC_LCHAN_5)
282#define bfin_write_MXVR_SYNC_LCHAN_5(val) bfin_write32(MXVR_SYNC_LCHAN_5, val)
283#define bfin_read_MXVR_SYNC_LCHAN_6() bfin_read32(MXVR_SYNC_LCHAN_6)
284#define bfin_write_MXVR_SYNC_LCHAN_6(val) bfin_write32(MXVR_SYNC_LCHAN_6, val)
285#define bfin_read_MXVR_SYNC_LCHAN_7() bfin_read32(MXVR_SYNC_LCHAN_7)
286#define bfin_write_MXVR_SYNC_LCHAN_7(val) bfin_write32(MXVR_SYNC_LCHAN_7, val)
287
288/* MXVR DMA0 Registers */
289
290#define bfin_read_MXVR_DMA0_CONFIG() bfin_read32(MXVR_DMA0_CONFIG)
291#define bfin_write_MXVR_DMA0_CONFIG(val) bfin_write32(MXVR_DMA0_CONFIG, val)
292#define bfin_read_MXVR_DMA0_START_ADDR() bfin_read32(MXVR_DMA0_START_ADDR)
293#define bfin_write_MXVR_DMA0_START_ADDR(val) bfin_write32(MXVR_DMA0_START_ADDR)
294#define bfin_read_MXVR_DMA0_COUNT() bfin_read16(MXVR_DMA0_COUNT)
295#define bfin_write_MXVR_DMA0_COUNT(val) bfin_write16(MXVR_DMA0_COUNT, val)
296#define bfin_read_MXVR_DMA0_CURR_ADDR() bfin_read32(MXVR_DMA0_CURR_ADDR)
297#define bfin_write_MXVR_DMA0_CURR_ADDR(val) bfin_write32(MXVR_DMA0_CURR_ADDR)
298#define bfin_read_MXVR_DMA0_CURR_COUNT() bfin_read16(MXVR_DMA0_CURR_COUNT)
299#define bfin_write_MXVR_DMA0_CURR_COUNT(val) bfin_write16(MXVR_DMA0_CURR_COUNT, val)
300
301/* MXVR DMA1 Registers */
302
303#define bfin_read_MXVR_DMA1_CONFIG() bfin_read32(MXVR_DMA1_CONFIG)
304#define bfin_write_MXVR_DMA1_CONFIG(val) bfin_write32(MXVR_DMA1_CONFIG, val)
305#define bfin_read_MXVR_DMA1_START_ADDR() bfin_read32(MXVR_DMA1_START_ADDR)
306#define bfin_write_MXVR_DMA1_START_ADDR(val) bfin_write32(MXVR_DMA1_START_ADDR)
307#define bfin_read_MXVR_DMA1_COUNT() bfin_read16(MXVR_DMA1_COUNT)
308#define bfin_write_MXVR_DMA1_COUNT(val) bfin_write16(MXVR_DMA1_COUNT, val)
309#define bfin_read_MXVR_DMA1_CURR_ADDR() bfin_read32(MXVR_DMA1_CURR_ADDR)
310#define bfin_write_MXVR_DMA1_CURR_ADDR(val) bfin_write32(MXVR_DMA1_CURR_ADDR)
311#define bfin_read_MXVR_DMA1_CURR_COUNT() bfin_read16(MXVR_DMA1_CURR_COUNT)
312#define bfin_write_MXVR_DMA1_CURR_COUNT(val) bfin_write16(MXVR_DMA1_CURR_COUNT, val)
313
314/* MXVR DMA2 Registers */
315
316#define bfin_read_MXVR_DMA2_CONFIG() bfin_read32(MXVR_DMA2_CONFIG)
317#define bfin_write_MXVR_DMA2_CONFIG(val) bfin_write32(MXVR_DMA2_CONFIG, val)
318#define bfin_read_MXVR_DMA2_START_ADDR() bfin_read32(MXVR_DMA2_START_ADDR)
319#define bfin_write_MXVR_DMA2_START_ADDR(val) bfin_write32(MXVR_DMA2_START_ADDR)
320#define bfin_read_MXVR_DMA2_COUNT() bfin_read16(MXVR_DMA2_COUNT)
321#define bfin_write_MXVR_DMA2_COUNT(val) bfin_write16(MXVR_DMA2_COUNT, val)
322#define bfin_read_MXVR_DMA2_CURR_ADDR() bfin_read32(MXVR_DMA2_CURR_ADDR)
323#define bfin_write_MXVR_DMA2_CURR_ADDR(val) bfin_write32(MXVR_DMA2_CURR_ADDR)
324#define bfin_read_MXVR_DMA2_CURR_COUNT() bfin_read16(MXVR_DMA2_CURR_COUNT)
325#define bfin_write_MXVR_DMA2_CURR_COUNT(val) bfin_write16(MXVR_DMA2_CURR_COUNT, val)
326
327/* MXVR DMA3 Registers */
328
329#define bfin_read_MXVR_DMA3_CONFIG() bfin_read32(MXVR_DMA3_CONFIG)
330#define bfin_write_MXVR_DMA3_CONFIG(val) bfin_write32(MXVR_DMA3_CONFIG, val)
331#define bfin_read_MXVR_DMA3_START_ADDR() bfin_read32(MXVR_DMA3_START_ADDR)
332#define bfin_write_MXVR_DMA3_START_ADDR(val) bfin_write32(MXVR_DMA3_START_ADDR)
333#define bfin_read_MXVR_DMA3_COUNT() bfin_read16(MXVR_DMA3_COUNT)
334#define bfin_write_MXVR_DMA3_COUNT(val) bfin_write16(MXVR_DMA3_COUNT, val)
335#define bfin_read_MXVR_DMA3_CURR_ADDR() bfin_read32(MXVR_DMA3_CURR_ADDR)
336#define bfin_write_MXVR_DMA3_CURR_ADDR(val) bfin_write32(MXVR_DMA3_CURR_ADDR)
337#define bfin_read_MXVR_DMA3_CURR_COUNT() bfin_read16(MXVR_DMA3_CURR_COUNT)
338#define bfin_write_MXVR_DMA3_CURR_COUNT(val) bfin_write16(MXVR_DMA3_CURR_COUNT, val)
339
340/* MXVR DMA4 Registers */
341
342#define bfin_read_MXVR_DMA4_CONFIG() bfin_read32(MXVR_DMA4_CONFIG)
343#define bfin_write_MXVR_DMA4_CONFIG(val) bfin_write32(MXVR_DMA4_CONFIG, val)
344#define bfin_read_MXVR_DMA4_START_ADDR() bfin_read32(MXVR_DMA4_START_ADDR)
345#define bfin_write_MXVR_DMA4_START_ADDR(val) bfin_write32(MXVR_DMA4_START_ADDR)
346#define bfin_read_MXVR_DMA4_COUNT() bfin_read16(MXVR_DMA4_COUNT)
347#define bfin_write_MXVR_DMA4_COUNT(val) bfin_write16(MXVR_DMA4_COUNT, val)
348#define bfin_read_MXVR_DMA4_CURR_ADDR() bfin_read32(MXVR_DMA4_CURR_ADDR)
349#define bfin_write_MXVR_DMA4_CURR_ADDR(val) bfin_write32(MXVR_DMA4_CURR_ADDR)
350#define bfin_read_MXVR_DMA4_CURR_COUNT() bfin_read16(MXVR_DMA4_CURR_COUNT)
351#define bfin_write_MXVR_DMA4_CURR_COUNT(val) bfin_write16(MXVR_DMA4_CURR_COUNT, val)
352
353/* MXVR DMA5 Registers */
354
355#define bfin_read_MXVR_DMA5_CONFIG() bfin_read32(MXVR_DMA5_CONFIG)
356#define bfin_write_MXVR_DMA5_CONFIG(val) bfin_write32(MXVR_DMA5_CONFIG, val)
357#define bfin_read_MXVR_DMA5_START_ADDR() bfin_read32(MXVR_DMA5_START_ADDR)
358#define bfin_write_MXVR_DMA5_START_ADDR(val) bfin_write32(MXVR_DMA5_START_ADDR)
359#define bfin_read_MXVR_DMA5_COUNT() bfin_read16(MXVR_DMA5_COUNT)
360#define bfin_write_MXVR_DMA5_COUNT(val) bfin_write16(MXVR_DMA5_COUNT, val)
361#define bfin_read_MXVR_DMA5_CURR_ADDR() bfin_read32(MXVR_DMA5_CURR_ADDR)
362#define bfin_write_MXVR_DMA5_CURR_ADDR(val) bfin_write32(MXVR_DMA5_CURR_ADDR)
363#define bfin_read_MXVR_DMA5_CURR_COUNT() bfin_read16(MXVR_DMA5_CURR_COUNT)
364#define bfin_write_MXVR_DMA5_CURR_COUNT(val) bfin_write16(MXVR_DMA5_CURR_COUNT, val)
365
366/* MXVR DMA6 Registers */
367
368#define bfin_read_MXVR_DMA6_CONFIG() bfin_read32(MXVR_DMA6_CONFIG)
369#define bfin_write_MXVR_DMA6_CONFIG(val) bfin_write32(MXVR_DMA6_CONFIG, val)
370#define bfin_read_MXVR_DMA6_START_ADDR() bfin_read32(MXVR_DMA6_START_ADDR)
371#define bfin_write_MXVR_DMA6_START_ADDR(val) bfin_write32(MXVR_DMA6_START_ADDR)
372#define bfin_read_MXVR_DMA6_COUNT() bfin_read16(MXVR_DMA6_COUNT)
373#define bfin_write_MXVR_DMA6_COUNT(val) bfin_write16(MXVR_DMA6_COUNT, val)
374#define bfin_read_MXVR_DMA6_CURR_ADDR() bfin_read32(MXVR_DMA6_CURR_ADDR)
375#define bfin_write_MXVR_DMA6_CURR_ADDR(val) bfin_write32(MXVR_DMA6_CURR_ADDR)
376#define bfin_read_MXVR_DMA6_CURR_COUNT() bfin_read16(MXVR_DMA6_CURR_COUNT)
377#define bfin_write_MXVR_DMA6_CURR_COUNT(val) bfin_write16(MXVR_DMA6_CURR_COUNT, val)
378
379/* MXVR DMA7 Registers */
380
381#define bfin_read_MXVR_DMA7_CONFIG() bfin_read32(MXVR_DMA7_CONFIG)
382#define bfin_write_MXVR_DMA7_CONFIG(val) bfin_write32(MXVR_DMA7_CONFIG, val)
383#define bfin_read_MXVR_DMA7_START_ADDR() bfin_read32(MXVR_DMA7_START_ADDR)
384#define bfin_write_MXVR_DMA7_START_ADDR(val) bfin_write32(MXVR_DMA7_START_ADDR)
385#define bfin_read_MXVR_DMA7_COUNT() bfin_read16(MXVR_DMA7_COUNT)
386#define bfin_write_MXVR_DMA7_COUNT(val) bfin_write16(MXVR_DMA7_COUNT, val)
387#define bfin_read_MXVR_DMA7_CURR_ADDR() bfin_read32(MXVR_DMA7_CURR_ADDR)
388#define bfin_write_MXVR_DMA7_CURR_ADDR(val) bfin_write32(MXVR_DMA7_CURR_ADDR)
389#define bfin_read_MXVR_DMA7_CURR_COUNT() bfin_read16(MXVR_DMA7_CURR_COUNT)
390#define bfin_write_MXVR_DMA7_CURR_COUNT(val) bfin_write16(MXVR_DMA7_CURR_COUNT, val)
391
392/* MXVR Asynch Packet Registers */
393
394#define bfin_read_MXVR_AP_CTL() bfin_read16(MXVR_AP_CTL)
395#define bfin_write_MXVR_AP_CTL(val) bfin_write16(MXVR_AP_CTL, val)
396#define bfin_read_MXVR_APRB_START_ADDR() bfin_read32(MXVR_APRB_START_ADDR)
397#define bfin_write_MXVR_APRB_START_ADDR(val) bfin_write32(MXVR_APRB_START_ADDR)
398#define bfin_read_MXVR_APRB_CURR_ADDR() bfin_read32(MXVR_APRB_CURR_ADDR)
399#define bfin_write_MXVR_APRB_CURR_ADDR(val) bfin_write32(MXVR_APRB_CURR_ADDR)
400#define bfin_read_MXVR_APTB_START_ADDR() bfin_read32(MXVR_APTB_START_ADDR)
401#define bfin_write_MXVR_APTB_START_ADDR(val) bfin_write32(MXVR_APTB_START_ADDR)
402#define bfin_read_MXVR_APTB_CURR_ADDR() bfin_read32(MXVR_APTB_CURR_ADDR)
403#define bfin_write_MXVR_APTB_CURR_ADDR(val) bfin_write32(MXVR_APTB_CURR_ADDR)
404
405/* MXVR Control Message Registers */
406
407#define bfin_read_MXVR_CM_CTL() bfin_read32(MXVR_CM_CTL)
408#define bfin_write_MXVR_CM_CTL(val) bfin_write32(MXVR_CM_CTL, val)
409#define bfin_read_MXVR_CMRB_START_ADDR() bfin_read32(MXVR_CMRB_START_ADDR)
410#define bfin_write_MXVR_CMRB_START_ADDR(val) bfin_write32(MXVR_CMRB_START_ADDR)
411#define bfin_read_MXVR_CMRB_CURR_ADDR() bfin_read32(MXVR_CMRB_CURR_ADDR)
412#define bfin_write_MXVR_CMRB_CURR_ADDR(val) bfin_write32(MXVR_CMRB_CURR_ADDR)
413#define bfin_read_MXVR_CMTB_START_ADDR() bfin_read32(MXVR_CMTB_START_ADDR)
414#define bfin_write_MXVR_CMTB_START_ADDR(val) bfin_write32(MXVR_CMTB_START_ADDR)
415#define bfin_read_MXVR_CMTB_CURR_ADDR() bfin_read32(MXVR_CMTB_CURR_ADDR)
416#define bfin_write_MXVR_CMTB_CURR_ADDR(val) bfin_write32(MXVR_CMTB_CURR_ADDR)
417
418/* MXVR Remote Read Registers */
419
420#define bfin_read_MXVR_RRDB_START_ADDR() bfin_read32(MXVR_RRDB_START_ADDR)
421#define bfin_write_MXVR_RRDB_START_ADDR(val) bfin_write32(MXVR_RRDB_START_ADDR)
422#define bfin_read_MXVR_RRDB_CURR_ADDR() bfin_read32(MXVR_RRDB_CURR_ADDR)
423#define bfin_write_MXVR_RRDB_CURR_ADDR(val) bfin_write32(MXVR_RRDB_CURR_ADDR)
424
425/* MXVR Pattern Data Registers */
426
427#define bfin_read_MXVR_PAT_DATA_0() bfin_read32(MXVR_PAT_DATA_0)
428#define bfin_write_MXVR_PAT_DATA_0(val) bfin_write32(MXVR_PAT_DATA_0, val)
429#define bfin_read_MXVR_PAT_EN_0() bfin_read32(MXVR_PAT_EN_0)
430#define bfin_write_MXVR_PAT_EN_0(val) bfin_write32(MXVR_PAT_EN_0, val)
431#define bfin_read_MXVR_PAT_DATA_1() bfin_read32(MXVR_PAT_DATA_1)
432#define bfin_write_MXVR_PAT_DATA_1(val) bfin_write32(MXVR_PAT_DATA_1, val)
433#define bfin_read_MXVR_PAT_EN_1() bfin_read32(MXVR_PAT_EN_1)
434#define bfin_write_MXVR_PAT_EN_1(val) bfin_write32(MXVR_PAT_EN_1, val)
435
436/* MXVR Frame Counter Registers */
437
438#define bfin_read_MXVR_FRAME_CNT_0() bfin_read16(MXVR_FRAME_CNT_0)
439#define bfin_write_MXVR_FRAME_CNT_0(val) bfin_write16(MXVR_FRAME_CNT_0, val)
440#define bfin_read_MXVR_FRAME_CNT_1() bfin_read16(MXVR_FRAME_CNT_1)
441#define bfin_write_MXVR_FRAME_CNT_1(val) bfin_write16(MXVR_FRAME_CNT_1, val)
442
443/* MXVR Routing Table Registers */
444
445#define bfin_read_MXVR_ROUTING_0() bfin_read32(MXVR_ROUTING_0)
446#define bfin_write_MXVR_ROUTING_0(val) bfin_write32(MXVR_ROUTING_0, val)
447#define bfin_read_MXVR_ROUTING_1() bfin_read32(MXVR_ROUTING_1)
448#define bfin_write_MXVR_ROUTING_1(val) bfin_write32(MXVR_ROUTING_1, val)
449#define bfin_read_MXVR_ROUTING_2() bfin_read32(MXVR_ROUTING_2)
450#define bfin_write_MXVR_ROUTING_2(val) bfin_write32(MXVR_ROUTING_2, val)
451#define bfin_read_MXVR_ROUTING_3() bfin_read32(MXVR_ROUTING_3)
452#define bfin_write_MXVR_ROUTING_3(val) bfin_write32(MXVR_ROUTING_3, val)
453#define bfin_read_MXVR_ROUTING_4() bfin_read32(MXVR_ROUTING_4)
454#define bfin_write_MXVR_ROUTING_4(val) bfin_write32(MXVR_ROUTING_4, val)
455#define bfin_read_MXVR_ROUTING_5() bfin_read32(MXVR_ROUTING_5)
456#define bfin_write_MXVR_ROUTING_5(val) bfin_write32(MXVR_ROUTING_5, val)
457#define bfin_read_MXVR_ROUTING_6() bfin_read32(MXVR_ROUTING_6)
458#define bfin_write_MXVR_ROUTING_6(val) bfin_write32(MXVR_ROUTING_6, val)
459#define bfin_read_MXVR_ROUTING_7() bfin_read32(MXVR_ROUTING_7)
460#define bfin_write_MXVR_ROUTING_7(val) bfin_write32(MXVR_ROUTING_7, val)
461#define bfin_read_MXVR_ROUTING_8() bfin_read32(MXVR_ROUTING_8)
462#define bfin_write_MXVR_ROUTING_8(val) bfin_write32(MXVR_ROUTING_8, val)
463#define bfin_read_MXVR_ROUTING_9() bfin_read32(MXVR_ROUTING_9)
464#define bfin_write_MXVR_ROUTING_9(val) bfin_write32(MXVR_ROUTING_9, val)
465#define bfin_read_MXVR_ROUTING_10() bfin_read32(MXVR_ROUTING_10)
466#define bfin_write_MXVR_ROUTING_10(val) bfin_write32(MXVR_ROUTING_10, val)
467#define bfin_read_MXVR_ROUTING_11() bfin_read32(MXVR_ROUTING_11)
468#define bfin_write_MXVR_ROUTING_11(val) bfin_write32(MXVR_ROUTING_11, val)
469#define bfin_read_MXVR_ROUTING_12() bfin_read32(MXVR_ROUTING_12)
470#define bfin_write_MXVR_ROUTING_12(val) bfin_write32(MXVR_ROUTING_12, val)
471#define bfin_read_MXVR_ROUTING_13() bfin_read32(MXVR_ROUTING_13)
472#define bfin_write_MXVR_ROUTING_13(val) bfin_write32(MXVR_ROUTING_13, val)
473#define bfin_read_MXVR_ROUTING_14() bfin_read32(MXVR_ROUTING_14)
474#define bfin_write_MXVR_ROUTING_14(val) bfin_write32(MXVR_ROUTING_14, val)
475
476/* MXVR Counter-Clock-Control Registers */
477
478#define bfin_read_MXVR_BLOCK_CNT() bfin_read16(MXVR_BLOCK_CNT)
479#define bfin_write_MXVR_BLOCK_CNT(val) bfin_write16(MXVR_BLOCK_CNT, val)
480#define bfin_read_MXVR_CLK_CTL() bfin_read32(MXVR_CLK_CTL)
481#define bfin_write_MXVR_CLK_CTL(val) bfin_write32(MXVR_CLK_CTL, val)
482#define bfin_read_MXVR_CDRPLL_CTL() bfin_read32(MXVR_CDRPLL_CTL)
483#define bfin_write_MXVR_CDRPLL_CTL(val) bfin_write32(MXVR_CDRPLL_CTL, val)
484#define bfin_read_MXVR_FMPLL_CTL() bfin_read32(MXVR_FMPLL_CTL)
485#define bfin_write_MXVR_FMPLL_CTL(val) bfin_write32(MXVR_FMPLL_CTL, val)
486#define bfin_read_MXVR_PIN_CTL() bfin_read16(MXVR_PIN_CTL)
487#define bfin_write_MXVR_PIN_CTL(val) bfin_write16(MXVR_PIN_CTL, val)
488#define bfin_read_MXVR_SCLK_CNT() bfin_read16(MXVR_SCLK_CNT)
489#define bfin_write_MXVR_SCLK_CNT(val) bfin_write16(MXVR_SCLK_CNT, val)
490
491/* CAN Controller 1 Config 1 Registers */
492
493#define bfin_read_CAN1_MC1() bfin_read16(CAN1_MC1)
494#define bfin_write_CAN1_MC1(val) bfin_write16(CAN1_MC1, val)
495#define bfin_read_CAN1_MD1() bfin_read16(CAN1_MD1)
496#define bfin_write_CAN1_MD1(val) bfin_write16(CAN1_MD1, val)
497#define bfin_read_CAN1_TRS1() bfin_read16(CAN1_TRS1)
498#define bfin_write_CAN1_TRS1(val) bfin_write16(CAN1_TRS1, val)
499#define bfin_read_CAN1_TRR1() bfin_read16(CAN1_TRR1)
500#define bfin_write_CAN1_TRR1(val) bfin_write16(CAN1_TRR1, val)
501#define bfin_read_CAN1_TA1() bfin_read16(CAN1_TA1)
502#define bfin_write_CAN1_TA1(val) bfin_write16(CAN1_TA1, val)
503#define bfin_read_CAN1_AA1() bfin_read16(CAN1_AA1)
504#define bfin_write_CAN1_AA1(val) bfin_write16(CAN1_AA1, val)
505#define bfin_read_CAN1_RMP1() bfin_read16(CAN1_RMP1)
506#define bfin_write_CAN1_RMP1(val) bfin_write16(CAN1_RMP1, val)
507#define bfin_read_CAN1_RML1() bfin_read16(CAN1_RML1)
508#define bfin_write_CAN1_RML1(val) bfin_write16(CAN1_RML1, val)
509#define bfin_read_CAN1_MBTIF1() bfin_read16(CAN1_MBTIF1)
510#define bfin_write_CAN1_MBTIF1(val) bfin_write16(CAN1_MBTIF1, val)
511#define bfin_read_CAN1_MBRIF1() bfin_read16(CAN1_MBRIF1)
512#define bfin_write_CAN1_MBRIF1(val) bfin_write16(CAN1_MBRIF1, val)
513#define bfin_read_CAN1_MBIM1() bfin_read16(CAN1_MBIM1)
514#define bfin_write_CAN1_MBIM1(val) bfin_write16(CAN1_MBIM1, val)
515#define bfin_read_CAN1_RFH1() bfin_read16(CAN1_RFH1)
516#define bfin_write_CAN1_RFH1(val) bfin_write16(CAN1_RFH1, val)
517#define bfin_read_CAN1_OPSS1() bfin_read16(CAN1_OPSS1)
518#define bfin_write_CAN1_OPSS1(val) bfin_write16(CAN1_OPSS1, val)
519
520/* CAN Controller 1 Config 2 Registers */
521
522#define bfin_read_CAN1_MC2() bfin_read16(CAN1_MC2)
523#define bfin_write_CAN1_MC2(val) bfin_write16(CAN1_MC2, val)
524#define bfin_read_CAN1_MD2() bfin_read16(CAN1_MD2)
525#define bfin_write_CAN1_MD2(val) bfin_write16(CAN1_MD2, val)
526#define bfin_read_CAN1_TRS2() bfin_read16(CAN1_TRS2)
527#define bfin_write_CAN1_TRS2(val) bfin_write16(CAN1_TRS2, val)
528#define bfin_read_CAN1_TRR2() bfin_read16(CAN1_TRR2)
529#define bfin_write_CAN1_TRR2(val) bfin_write16(CAN1_TRR2, val)
530#define bfin_read_CAN1_TA2() bfin_read16(CAN1_TA2)
531#define bfin_write_CAN1_TA2(val) bfin_write16(CAN1_TA2, val)
532#define bfin_read_CAN1_AA2() bfin_read16(CAN1_AA2)
533#define bfin_write_CAN1_AA2(val) bfin_write16(CAN1_AA2, val)
534#define bfin_read_CAN1_RMP2() bfin_read16(CAN1_RMP2)
535#define bfin_write_CAN1_RMP2(val) bfin_write16(CAN1_RMP2, val)
536#define bfin_read_CAN1_RML2() bfin_read16(CAN1_RML2)
537#define bfin_write_CAN1_RML2(val) bfin_write16(CAN1_RML2, val)
538#define bfin_read_CAN1_MBTIF2() bfin_read16(CAN1_MBTIF2)
539#define bfin_write_CAN1_MBTIF2(val) bfin_write16(CAN1_MBTIF2, val)
540#define bfin_read_CAN1_MBRIF2() bfin_read16(CAN1_MBRIF2)
541#define bfin_write_CAN1_MBRIF2(val) bfin_write16(CAN1_MBRIF2, val)
542#define bfin_read_CAN1_MBIM2() bfin_read16(CAN1_MBIM2)
543#define bfin_write_CAN1_MBIM2(val) bfin_write16(CAN1_MBIM2, val)
544#define bfin_read_CAN1_RFH2() bfin_read16(CAN1_RFH2)
545#define bfin_write_CAN1_RFH2(val) bfin_write16(CAN1_RFH2, val)
546#define bfin_read_CAN1_OPSS2() bfin_read16(CAN1_OPSS2)
547#define bfin_write_CAN1_OPSS2(val) bfin_write16(CAN1_OPSS2, val)
548
549/* CAN Controller 1 Clock/Interrubfin_read_()t/Counter Registers */
550
551#define bfin_read_CAN1_CLOCK() bfin_read16(CAN1_CLOCK)
552#define bfin_write_CAN1_CLOCK(val) bfin_write16(CAN1_CLOCK, val)
553#define bfin_read_CAN1_TIMING() bfin_read16(CAN1_TIMING)
554#define bfin_write_CAN1_TIMING(val) bfin_write16(CAN1_TIMING, val)
555#define bfin_read_CAN1_DEBUG() bfin_read16(CAN1_DEBUG)
556#define bfin_write_CAN1_DEBUG(val) bfin_write16(CAN1_DEBUG, val)
557#define bfin_read_CAN1_STATUS() bfin_read16(CAN1_STATUS)
558#define bfin_write_CAN1_STATUS(val) bfin_write16(CAN1_STATUS, val)
559#define bfin_read_CAN1_CEC() bfin_read16(CAN1_CEC)
560#define bfin_write_CAN1_CEC(val) bfin_write16(CAN1_CEC, val)
561#define bfin_read_CAN1_GIS() bfin_read16(CAN1_GIS)
562#define bfin_write_CAN1_GIS(val) bfin_write16(CAN1_GIS, val)
563#define bfin_read_CAN1_GIM() bfin_read16(CAN1_GIM)
564#define bfin_write_CAN1_GIM(val) bfin_write16(CAN1_GIM, val)
565#define bfin_read_CAN1_GIF() bfin_read16(CAN1_GIF)
566#define bfin_write_CAN1_GIF(val) bfin_write16(CAN1_GIF, val)
567#define bfin_read_CAN1_CONTROL() bfin_read16(CAN1_CONTROL)
568#define bfin_write_CAN1_CONTROL(val) bfin_write16(CAN1_CONTROL, val)
569#define bfin_read_CAN1_INTR() bfin_read16(CAN1_INTR)
570#define bfin_write_CAN1_INTR(val) bfin_write16(CAN1_INTR, val)
571#define bfin_read_CAN1_MBTD() bfin_read16(CAN1_MBTD)
572#define bfin_write_CAN1_MBTD(val) bfin_write16(CAN1_MBTD, val)
573#define bfin_read_CAN1_EWR() bfin_read16(CAN1_EWR)
574#define bfin_write_CAN1_EWR(val) bfin_write16(CAN1_EWR, val)
575#define bfin_read_CAN1_ESR() bfin_read16(CAN1_ESR)
576#define bfin_write_CAN1_ESR(val) bfin_write16(CAN1_ESR, val)
577#define bfin_read_CAN1_UCCNT() bfin_read16(CAN1_UCCNT)
578#define bfin_write_CAN1_UCCNT(val) bfin_write16(CAN1_UCCNT, val)
579#define bfin_read_CAN1_UCRC() bfin_read16(CAN1_UCRC)
580#define bfin_write_CAN1_UCRC(val) bfin_write16(CAN1_UCRC, val)
581#define bfin_read_CAN1_UCCNF() bfin_read16(CAN1_UCCNF)
582#define bfin_write_CAN1_UCCNF(val) bfin_write16(CAN1_UCCNF, val)
583
584/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
585
586#define bfin_read_CAN1_AM00L() bfin_read16(CAN1_AM00L)
587#define bfin_write_CAN1_AM00L(val) bfin_write16(CAN1_AM00L, val)
588#define bfin_read_CAN1_AM00H() bfin_read16(CAN1_AM00H)
589#define bfin_write_CAN1_AM00H(val) bfin_write16(CAN1_AM00H, val)
590#define bfin_read_CAN1_AM01L() bfin_read16(CAN1_AM01L)
591#define bfin_write_CAN1_AM01L(val) bfin_write16(CAN1_AM01L, val)
592#define bfin_read_CAN1_AM01H() bfin_read16(CAN1_AM01H)
593#define bfin_write_CAN1_AM01H(val) bfin_write16(CAN1_AM01H, val)
594#define bfin_read_CAN1_AM02L() bfin_read16(CAN1_AM02L)
595#define bfin_write_CAN1_AM02L(val) bfin_write16(CAN1_AM02L, val)
596#define bfin_read_CAN1_AM02H() bfin_read16(CAN1_AM02H)
597#define bfin_write_CAN1_AM02H(val) bfin_write16(CAN1_AM02H, val)
598#define bfin_read_CAN1_AM03L() bfin_read16(CAN1_AM03L)
599#define bfin_write_CAN1_AM03L(val) bfin_write16(CAN1_AM03L, val)
600#define bfin_read_CAN1_AM03H() bfin_read16(CAN1_AM03H)
601#define bfin_write_CAN1_AM03H(val) bfin_write16(CAN1_AM03H, val)
602#define bfin_read_CAN1_AM04L() bfin_read16(CAN1_AM04L)
603#define bfin_write_CAN1_AM04L(val) bfin_write16(CAN1_AM04L, val)
604#define bfin_read_CAN1_AM04H() bfin_read16(CAN1_AM04H)
605#define bfin_write_CAN1_AM04H(val) bfin_write16(CAN1_AM04H, val)
606#define bfin_read_CAN1_AM05L() bfin_read16(CAN1_AM05L)
607#define bfin_write_CAN1_AM05L(val) bfin_write16(CAN1_AM05L, val)
608#define bfin_read_CAN1_AM05H() bfin_read16(CAN1_AM05H)
609#define bfin_write_CAN1_AM05H(val) bfin_write16(CAN1_AM05H, val)
610#define bfin_read_CAN1_AM06L() bfin_read16(CAN1_AM06L)
611#define bfin_write_CAN1_AM06L(val) bfin_write16(CAN1_AM06L, val)
612#define bfin_read_CAN1_AM06H() bfin_read16(CAN1_AM06H)
613#define bfin_write_CAN1_AM06H(val) bfin_write16(CAN1_AM06H, val)
614#define bfin_read_CAN1_AM07L() bfin_read16(CAN1_AM07L)
615#define bfin_write_CAN1_AM07L(val) bfin_write16(CAN1_AM07L, val)
616#define bfin_read_CAN1_AM07H() bfin_read16(CAN1_AM07H)
617#define bfin_write_CAN1_AM07H(val) bfin_write16(CAN1_AM07H, val)
618#define bfin_read_CAN1_AM08L() bfin_read16(CAN1_AM08L)
619#define bfin_write_CAN1_AM08L(val) bfin_write16(CAN1_AM08L, val)
620#define bfin_read_CAN1_AM08H() bfin_read16(CAN1_AM08H)
621#define bfin_write_CAN1_AM08H(val) bfin_write16(CAN1_AM08H, val)
622#define bfin_read_CAN1_AM09L() bfin_read16(CAN1_AM09L)
623#define bfin_write_CAN1_AM09L(val) bfin_write16(CAN1_AM09L, val)
624#define bfin_read_CAN1_AM09H() bfin_read16(CAN1_AM09H)
625#define bfin_write_CAN1_AM09H(val) bfin_write16(CAN1_AM09H, val)
626#define bfin_read_CAN1_AM10L() bfin_read16(CAN1_AM10L)
627#define bfin_write_CAN1_AM10L(val) bfin_write16(CAN1_AM10L, val)
628#define bfin_read_CAN1_AM10H() bfin_read16(CAN1_AM10H)
629#define bfin_write_CAN1_AM10H(val) bfin_write16(CAN1_AM10H, val)
630#define bfin_read_CAN1_AM11L() bfin_read16(CAN1_AM11L)
631#define bfin_write_CAN1_AM11L(val) bfin_write16(CAN1_AM11L, val)
632#define bfin_read_CAN1_AM11H() bfin_read16(CAN1_AM11H)
633#define bfin_write_CAN1_AM11H(val) bfin_write16(CAN1_AM11H, val)
634#define bfin_read_CAN1_AM12L() bfin_read16(CAN1_AM12L)
635#define bfin_write_CAN1_AM12L(val) bfin_write16(CAN1_AM12L, val)
636#define bfin_read_CAN1_AM12H() bfin_read16(CAN1_AM12H)
637#define bfin_write_CAN1_AM12H(val) bfin_write16(CAN1_AM12H, val)
638#define bfin_read_CAN1_AM13L() bfin_read16(CAN1_AM13L)
639#define bfin_write_CAN1_AM13L(val) bfin_write16(CAN1_AM13L, val)
640#define bfin_read_CAN1_AM13H() bfin_read16(CAN1_AM13H)
641#define bfin_write_CAN1_AM13H(val) bfin_write16(CAN1_AM13H, val)
642#define bfin_read_CAN1_AM14L() bfin_read16(CAN1_AM14L)
643#define bfin_write_CAN1_AM14L(val) bfin_write16(CAN1_AM14L, val)
644#define bfin_read_CAN1_AM14H() bfin_read16(CAN1_AM14H)
645#define bfin_write_CAN1_AM14H(val) bfin_write16(CAN1_AM14H, val)
646#define bfin_read_CAN1_AM15L() bfin_read16(CAN1_AM15L)
647#define bfin_write_CAN1_AM15L(val) bfin_write16(CAN1_AM15L, val)
648#define bfin_read_CAN1_AM15H() bfin_read16(CAN1_AM15H)
649#define bfin_write_CAN1_AM15H(val) bfin_write16(CAN1_AM15H, val)
650
651/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
652
653#define bfin_read_CAN1_AM16L() bfin_read16(CAN1_AM16L)
654#define bfin_write_CAN1_AM16L(val) bfin_write16(CAN1_AM16L, val)
655#define bfin_read_CAN1_AM16H() bfin_read16(CAN1_AM16H)
656#define bfin_write_CAN1_AM16H(val) bfin_write16(CAN1_AM16H, val)
657#define bfin_read_CAN1_AM17L() bfin_read16(CAN1_AM17L)
658#define bfin_write_CAN1_AM17L(val) bfin_write16(CAN1_AM17L, val)
659#define bfin_read_CAN1_AM17H() bfin_read16(CAN1_AM17H)
660#define bfin_write_CAN1_AM17H(val) bfin_write16(CAN1_AM17H, val)
661#define bfin_read_CAN1_AM18L() bfin_read16(CAN1_AM18L)
662#define bfin_write_CAN1_AM18L(val) bfin_write16(CAN1_AM18L, val)
663#define bfin_read_CAN1_AM18H() bfin_read16(CAN1_AM18H)
664#define bfin_write_CAN1_AM18H(val) bfin_write16(CAN1_AM18H, val)
665#define bfin_read_CAN1_AM19L() bfin_read16(CAN1_AM19L)
666#define bfin_write_CAN1_AM19L(val) bfin_write16(CAN1_AM19L, val)
667#define bfin_read_CAN1_AM19H() bfin_read16(CAN1_AM19H)
668#define bfin_write_CAN1_AM19H(val) bfin_write16(CAN1_AM19H, val)
669#define bfin_read_CAN1_AM20L() bfin_read16(CAN1_AM20L)
670#define bfin_write_CAN1_AM20L(val) bfin_write16(CAN1_AM20L, val)
671#define bfin_read_CAN1_AM20H() bfin_read16(CAN1_AM20H)
672#define bfin_write_CAN1_AM20H(val) bfin_write16(CAN1_AM20H, val)
673#define bfin_read_CAN1_AM21L() bfin_read16(CAN1_AM21L)
674#define bfin_write_CAN1_AM21L(val) bfin_write16(CAN1_AM21L, val)
675#define bfin_read_CAN1_AM21H() bfin_read16(CAN1_AM21H)
676#define bfin_write_CAN1_AM21H(val) bfin_write16(CAN1_AM21H, val)
677#define bfin_read_CAN1_AM22L() bfin_read16(CAN1_AM22L)
678#define bfin_write_CAN1_AM22L(val) bfin_write16(CAN1_AM22L, val)
679#define bfin_read_CAN1_AM22H() bfin_read16(CAN1_AM22H)
680#define bfin_write_CAN1_AM22H(val) bfin_write16(CAN1_AM22H, val)
681#define bfin_read_CAN1_AM23L() bfin_read16(CAN1_AM23L)
682#define bfin_write_CAN1_AM23L(val) bfin_write16(CAN1_AM23L, val)
683#define bfin_read_CAN1_AM23H() bfin_read16(CAN1_AM23H)
684#define bfin_write_CAN1_AM23H(val) bfin_write16(CAN1_AM23H, val)
685#define bfin_read_CAN1_AM24L() bfin_read16(CAN1_AM24L)
686#define bfin_write_CAN1_AM24L(val) bfin_write16(CAN1_AM24L, val)
687#define bfin_read_CAN1_AM24H() bfin_read16(CAN1_AM24H)
688#define bfin_write_CAN1_AM24H(val) bfin_write16(CAN1_AM24H, val)
689#define bfin_read_CAN1_AM25L() bfin_read16(CAN1_AM25L)
690#define bfin_write_CAN1_AM25L(val) bfin_write16(CAN1_AM25L, val)
691#define bfin_read_CAN1_AM25H() bfin_read16(CAN1_AM25H)
692#define bfin_write_CAN1_AM25H(val) bfin_write16(CAN1_AM25H, val)
693#define bfin_read_CAN1_AM26L() bfin_read16(CAN1_AM26L)
694#define bfin_write_CAN1_AM26L(val) bfin_write16(CAN1_AM26L, val)
695#define bfin_read_CAN1_AM26H() bfin_read16(CAN1_AM26H)
696#define bfin_write_CAN1_AM26H(val) bfin_write16(CAN1_AM26H, val)
697#define bfin_read_CAN1_AM27L() bfin_read16(CAN1_AM27L)
698#define bfin_write_CAN1_AM27L(val) bfin_write16(CAN1_AM27L, val)
699#define bfin_read_CAN1_AM27H() bfin_read16(CAN1_AM27H)
700#define bfin_write_CAN1_AM27H(val) bfin_write16(CAN1_AM27H, val)
701#define bfin_read_CAN1_AM28L() bfin_read16(CAN1_AM28L)
702#define bfin_write_CAN1_AM28L(val) bfin_write16(CAN1_AM28L, val)
703#define bfin_read_CAN1_AM28H() bfin_read16(CAN1_AM28H)
704#define bfin_write_CAN1_AM28H(val) bfin_write16(CAN1_AM28H, val)
705#define bfin_read_CAN1_AM29L() bfin_read16(CAN1_AM29L)
706#define bfin_write_CAN1_AM29L(val) bfin_write16(CAN1_AM29L, val)
707#define bfin_read_CAN1_AM29H() bfin_read16(CAN1_AM29H)
708#define bfin_write_CAN1_AM29H(val) bfin_write16(CAN1_AM29H, val)
709#define bfin_read_CAN1_AM30L() bfin_read16(CAN1_AM30L)
710#define bfin_write_CAN1_AM30L(val) bfin_write16(CAN1_AM30L, val)
711#define bfin_read_CAN1_AM30H() bfin_read16(CAN1_AM30H)
712#define bfin_write_CAN1_AM30H(val) bfin_write16(CAN1_AM30H, val)
713#define bfin_read_CAN1_AM31L() bfin_read16(CAN1_AM31L)
714#define bfin_write_CAN1_AM31L(val) bfin_write16(CAN1_AM31L, val)
715#define bfin_read_CAN1_AM31H() bfin_read16(CAN1_AM31H)
716#define bfin_write_CAN1_AM31H(val) bfin_write16(CAN1_AM31H, val)
717
718/* CAN Controller 1 Mailbox Data Registers */
719
720#define bfin_read_CAN1_MB00_DATA0() bfin_read16(CAN1_MB00_DATA0)
721#define bfin_write_CAN1_MB00_DATA0(val) bfin_write16(CAN1_MB00_DATA0, val)
722#define bfin_read_CAN1_MB00_DATA1() bfin_read16(CAN1_MB00_DATA1)
723#define bfin_write_CAN1_MB00_DATA1(val) bfin_write16(CAN1_MB00_DATA1, val)
724#define bfin_read_CAN1_MB00_DATA2() bfin_read16(CAN1_MB00_DATA2)
725#define bfin_write_CAN1_MB00_DATA2(val) bfin_write16(CAN1_MB00_DATA2, val)
726#define bfin_read_CAN1_MB00_DATA3() bfin_read16(CAN1_MB00_DATA3)
727#define bfin_write_CAN1_MB00_DATA3(val) bfin_write16(CAN1_MB00_DATA3, val)
728#define bfin_read_CAN1_MB00_LENGTH() bfin_read16(CAN1_MB00_LENGTH)
729#define bfin_write_CAN1_MB00_LENGTH(val) bfin_write16(CAN1_MB00_LENGTH, val)
730#define bfin_read_CAN1_MB00_TIMESTAMP() bfin_read16(CAN1_MB00_TIMESTAMP)
731#define bfin_write_CAN1_MB00_TIMESTAMP(val) bfin_write16(CAN1_MB00_TIMESTAMP, val)
732#define bfin_read_CAN1_MB00_ID0() bfin_read16(CAN1_MB00_ID0)
733#define bfin_write_CAN1_MB00_ID0(val) bfin_write16(CAN1_MB00_ID0, val)
734#define bfin_read_CAN1_MB00_ID1() bfin_read16(CAN1_MB00_ID1)
735#define bfin_write_CAN1_MB00_ID1(val) bfin_write16(CAN1_MB00_ID1, val)
736#define bfin_read_CAN1_MB01_DATA0() bfin_read16(CAN1_MB01_DATA0)
737#define bfin_write_CAN1_MB01_DATA0(val) bfin_write16(CAN1_MB01_DATA0, val)
738#define bfin_read_CAN1_MB01_DATA1() bfin_read16(CAN1_MB01_DATA1)
739#define bfin_write_CAN1_MB01_DATA1(val) bfin_write16(CAN1_MB01_DATA1, val)
740#define bfin_read_CAN1_MB01_DATA2() bfin_read16(CAN1_MB01_DATA2)
741#define bfin_write_CAN1_MB01_DATA2(val) bfin_write16(CAN1_MB01_DATA2, val)
742#define bfin_read_CAN1_MB01_DATA3() bfin_read16(CAN1_MB01_DATA3)
743#define bfin_write_CAN1_MB01_DATA3(val) bfin_write16(CAN1_MB01_DATA3, val)
744#define bfin_read_CAN1_MB01_LENGTH() bfin_read16(CAN1_MB01_LENGTH)
745#define bfin_write_CAN1_MB01_LENGTH(val) bfin_write16(CAN1_MB01_LENGTH, val)
746#define bfin_read_CAN1_MB01_TIMESTAMP() bfin_read16(CAN1_MB01_TIMESTAMP)
747#define bfin_write_CAN1_MB01_TIMESTAMP(val) bfin_write16(CAN1_MB01_TIMESTAMP, val)
748#define bfin_read_CAN1_MB01_ID0() bfin_read16(CAN1_MB01_ID0)
749#define bfin_write_CAN1_MB01_ID0(val) bfin_write16(CAN1_MB01_ID0, val)
750#define bfin_read_CAN1_MB01_ID1() bfin_read16(CAN1_MB01_ID1)
751#define bfin_write_CAN1_MB01_ID1(val) bfin_write16(CAN1_MB01_ID1, val)
752#define bfin_read_CAN1_MB02_DATA0() bfin_read16(CAN1_MB02_DATA0)
753#define bfin_write_CAN1_MB02_DATA0(val) bfin_write16(CAN1_MB02_DATA0, val)
754#define bfin_read_CAN1_MB02_DATA1() bfin_read16(CAN1_MB02_DATA1)
755#define bfin_write_CAN1_MB02_DATA1(val) bfin_write16(CAN1_MB02_DATA1, val)
756#define bfin_read_CAN1_MB02_DATA2() bfin_read16(CAN1_MB02_DATA2)
757#define bfin_write_CAN1_MB02_DATA2(val) bfin_write16(CAN1_MB02_DATA2, val)
758#define bfin_read_CAN1_MB02_DATA3() bfin_read16(CAN1_MB02_DATA3)
759#define bfin_write_CAN1_MB02_DATA3(val) bfin_write16(CAN1_MB02_DATA3, val)
760#define bfin_read_CAN1_MB02_LENGTH() bfin_read16(CAN1_MB02_LENGTH)
761#define bfin_write_CAN1_MB02_LENGTH(val) bfin_write16(CAN1_MB02_LENGTH, val)
762#define bfin_read_CAN1_MB02_TIMESTAMP() bfin_read16(CAN1_MB02_TIMESTAMP)
763#define bfin_write_CAN1_MB02_TIMESTAMP(val) bfin_write16(CAN1_MB02_TIMESTAMP, val)
764#define bfin_read_CAN1_MB02_ID0() bfin_read16(CAN1_MB02_ID0)
765#define bfin_write_CAN1_MB02_ID0(val) bfin_write16(CAN1_MB02_ID0, val)
766#define bfin_read_CAN1_MB02_ID1() bfin_read16(CAN1_MB02_ID1)
767#define bfin_write_CAN1_MB02_ID1(val) bfin_write16(CAN1_MB02_ID1, val)
768#define bfin_read_CAN1_MB03_DATA0() bfin_read16(CAN1_MB03_DATA0)
769#define bfin_write_CAN1_MB03_DATA0(val) bfin_write16(CAN1_MB03_DATA0, val)
770#define bfin_read_CAN1_MB03_DATA1() bfin_read16(CAN1_MB03_DATA1)
771#define bfin_write_CAN1_MB03_DATA1(val) bfin_write16(CAN1_MB03_DATA1, val)
772#define bfin_read_CAN1_MB03_DATA2() bfin_read16(CAN1_MB03_DATA2)
773#define bfin_write_CAN1_MB03_DATA2(val) bfin_write16(CAN1_MB03_DATA2, val)
774#define bfin_read_CAN1_MB03_DATA3() bfin_read16(CAN1_MB03_DATA3)
775#define bfin_write_CAN1_MB03_DATA3(val) bfin_write16(CAN1_MB03_DATA3, val)
776#define bfin_read_CAN1_MB03_LENGTH() bfin_read16(CAN1_MB03_LENGTH)
777#define bfin_write_CAN1_MB03_LENGTH(val) bfin_write16(CAN1_MB03_LENGTH, val)
778#define bfin_read_CAN1_MB03_TIMESTAMP() bfin_read16(CAN1_MB03_TIMESTAMP)
779#define bfin_write_CAN1_MB03_TIMESTAMP(val) bfin_write16(CAN1_MB03_TIMESTAMP, val)
780#define bfin_read_CAN1_MB03_ID0() bfin_read16(CAN1_MB03_ID0)
781#define bfin_write_CAN1_MB03_ID0(val) bfin_write16(CAN1_MB03_ID0, val)
782#define bfin_read_CAN1_MB03_ID1() bfin_read16(CAN1_MB03_ID1)
783#define bfin_write_CAN1_MB03_ID1(val) bfin_write16(CAN1_MB03_ID1, val)
784#define bfin_read_CAN1_MB04_DATA0() bfin_read16(CAN1_MB04_DATA0)
785#define bfin_write_CAN1_MB04_DATA0(val) bfin_write16(CAN1_MB04_DATA0, val)
786#define bfin_read_CAN1_MB04_DATA1() bfin_read16(CAN1_MB04_DATA1)
787#define bfin_write_CAN1_MB04_DATA1(val) bfin_write16(CAN1_MB04_DATA1, val)
788#define bfin_read_CAN1_MB04_DATA2() bfin_read16(CAN1_MB04_DATA2)
789#define bfin_write_CAN1_MB04_DATA2(val) bfin_write16(CAN1_MB04_DATA2, val)
790#define bfin_read_CAN1_MB04_DATA3() bfin_read16(CAN1_MB04_DATA3)
791#define bfin_write_CAN1_MB04_DATA3(val) bfin_write16(CAN1_MB04_DATA3, val)
792#define bfin_read_CAN1_MB04_LENGTH() bfin_read16(CAN1_MB04_LENGTH)
793#define bfin_write_CAN1_MB04_LENGTH(val) bfin_write16(CAN1_MB04_LENGTH, val)
794#define bfin_read_CAN1_MB04_TIMESTAMP() bfin_read16(CAN1_MB04_TIMESTAMP)
795#define bfin_write_CAN1_MB04_TIMESTAMP(val) bfin_write16(CAN1_MB04_TIMESTAMP, val)
796#define bfin_read_CAN1_MB04_ID0() bfin_read16(CAN1_MB04_ID0)
797#define bfin_write_CAN1_MB04_ID0(val) bfin_write16(CAN1_MB04_ID0, val)
798#define bfin_read_CAN1_MB04_ID1() bfin_read16(CAN1_MB04_ID1)
799#define bfin_write_CAN1_MB04_ID1(val) bfin_write16(CAN1_MB04_ID1, val)
800#define bfin_read_CAN1_MB05_DATA0() bfin_read16(CAN1_MB05_DATA0)
801#define bfin_write_CAN1_MB05_DATA0(val) bfin_write16(CAN1_MB05_DATA0, val)
802#define bfin_read_CAN1_MB05_DATA1() bfin_read16(CAN1_MB05_DATA1)
803#define bfin_write_CAN1_MB05_DATA1(val) bfin_write16(CAN1_MB05_DATA1, val)
804#define bfin_read_CAN1_MB05_DATA2() bfin_read16(CAN1_MB05_DATA2)
805#define bfin_write_CAN1_MB05_DATA2(val) bfin_write16(CAN1_MB05_DATA2, val)
806#define bfin_read_CAN1_MB05_DATA3() bfin_read16(CAN1_MB05_DATA3)
807#define bfin_write_CAN1_MB05_DATA3(val) bfin_write16(CAN1_MB05_DATA3, val)
808#define bfin_read_CAN1_MB05_LENGTH() bfin_read16(CAN1_MB05_LENGTH)
809#define bfin_write_CAN1_MB05_LENGTH(val) bfin_write16(CAN1_MB05_LENGTH, val)
810#define bfin_read_CAN1_MB05_TIMESTAMP() bfin_read16(CAN1_MB05_TIMESTAMP)
811#define bfin_write_CAN1_MB05_TIMESTAMP(val) bfin_write16(CAN1_MB05_TIMESTAMP, val)
812#define bfin_read_CAN1_MB05_ID0() bfin_read16(CAN1_MB05_ID0)
813#define bfin_write_CAN1_MB05_ID0(val) bfin_write16(CAN1_MB05_ID0, val)
814#define bfin_read_CAN1_MB05_ID1() bfin_read16(CAN1_MB05_ID1)
815#define bfin_write_CAN1_MB05_ID1(val) bfin_write16(CAN1_MB05_ID1, val)
816#define bfin_read_CAN1_MB06_DATA0() bfin_read16(CAN1_MB06_DATA0)
817#define bfin_write_CAN1_MB06_DATA0(val) bfin_write16(CAN1_MB06_DATA0, val)
818#define bfin_read_CAN1_MB06_DATA1() bfin_read16(CAN1_MB06_DATA1)
819#define bfin_write_CAN1_MB06_DATA1(val) bfin_write16(CAN1_MB06_DATA1, val)
820#define bfin_read_CAN1_MB06_DATA2() bfin_read16(CAN1_MB06_DATA2)
821#define bfin_write_CAN1_MB06_DATA2(val) bfin_write16(CAN1_MB06_DATA2, val)
822#define bfin_read_CAN1_MB06_DATA3() bfin_read16(CAN1_MB06_DATA3)
823#define bfin_write_CAN1_MB06_DATA3(val) bfin_write16(CAN1_MB06_DATA3, val)
824#define bfin_read_CAN1_MB06_LENGTH() bfin_read16(CAN1_MB06_LENGTH)
825#define bfin_write_CAN1_MB06_LENGTH(val) bfin_write16(CAN1_MB06_LENGTH, val)
826#define bfin_read_CAN1_MB06_TIMESTAMP() bfin_read16(CAN1_MB06_TIMESTAMP)
827#define bfin_write_CAN1_MB06_TIMESTAMP(val) bfin_write16(CAN1_MB06_TIMESTAMP, val)
828#define bfin_read_CAN1_MB06_ID0() bfin_read16(CAN1_MB06_ID0)
829#define bfin_write_CAN1_MB06_ID0(val) bfin_write16(CAN1_MB06_ID0, val)
830#define bfin_read_CAN1_MB06_ID1() bfin_read16(CAN1_MB06_ID1)
831#define bfin_write_CAN1_MB06_ID1(val) bfin_write16(CAN1_MB06_ID1, val)
832#define bfin_read_CAN1_MB07_DATA0() bfin_read16(CAN1_MB07_DATA0)
833#define bfin_write_CAN1_MB07_DATA0(val) bfin_write16(CAN1_MB07_DATA0, val)
834#define bfin_read_CAN1_MB07_DATA1() bfin_read16(CAN1_MB07_DATA1)
835#define bfin_write_CAN1_MB07_DATA1(val) bfin_write16(CAN1_MB07_DATA1, val)
836#define bfin_read_CAN1_MB07_DATA2() bfin_read16(CAN1_MB07_DATA2)
837#define bfin_write_CAN1_MB07_DATA2(val) bfin_write16(CAN1_MB07_DATA2, val)
838#define bfin_read_CAN1_MB07_DATA3() bfin_read16(CAN1_MB07_DATA3)
839#define bfin_write_CAN1_MB07_DATA3(val) bfin_write16(CAN1_MB07_DATA3, val)
840#define bfin_read_CAN1_MB07_LENGTH() bfin_read16(CAN1_MB07_LENGTH)
841#define bfin_write_CAN1_MB07_LENGTH(val) bfin_write16(CAN1_MB07_LENGTH, val)
842#define bfin_read_CAN1_MB07_TIMESTAMP() bfin_read16(CAN1_MB07_TIMESTAMP)
843#define bfin_write_CAN1_MB07_TIMESTAMP(val) bfin_write16(CAN1_MB07_TIMESTAMP, val)
844#define bfin_read_CAN1_MB07_ID0() bfin_read16(CAN1_MB07_ID0)
845#define bfin_write_CAN1_MB07_ID0(val) bfin_write16(CAN1_MB07_ID0, val)
846#define bfin_read_CAN1_MB07_ID1() bfin_read16(CAN1_MB07_ID1)
847#define bfin_write_CAN1_MB07_ID1(val) bfin_write16(CAN1_MB07_ID1, val)
848#define bfin_read_CAN1_MB08_DATA0() bfin_read16(CAN1_MB08_DATA0)
849#define bfin_write_CAN1_MB08_DATA0(val) bfin_write16(CAN1_MB08_DATA0, val)
850#define bfin_read_CAN1_MB08_DATA1() bfin_read16(CAN1_MB08_DATA1)
851#define bfin_write_CAN1_MB08_DATA1(val) bfin_write16(CAN1_MB08_DATA1, val)
852#define bfin_read_CAN1_MB08_DATA2() bfin_read16(CAN1_MB08_DATA2)
853#define bfin_write_CAN1_MB08_DATA2(val) bfin_write16(CAN1_MB08_DATA2, val)
854#define bfin_read_CAN1_MB08_DATA3() bfin_read16(CAN1_MB08_DATA3)
855#define bfin_write_CAN1_MB08_DATA3(val) bfin_write16(CAN1_MB08_DATA3, val)
856#define bfin_read_CAN1_MB08_LENGTH() bfin_read16(CAN1_MB08_LENGTH)
857#define bfin_write_CAN1_MB08_LENGTH(val) bfin_write16(CAN1_MB08_LENGTH, val)
858#define bfin_read_CAN1_MB08_TIMESTAMP() bfin_read16(CAN1_MB08_TIMESTAMP)
859#define bfin_write_CAN1_MB08_TIMESTAMP(val) bfin_write16(CAN1_MB08_TIMESTAMP, val)
860#define bfin_read_CAN1_MB08_ID0() bfin_read16(CAN1_MB08_ID0)
861#define bfin_write_CAN1_MB08_ID0(val) bfin_write16(CAN1_MB08_ID0, val)
862#define bfin_read_CAN1_MB08_ID1() bfin_read16(CAN1_MB08_ID1)
863#define bfin_write_CAN1_MB08_ID1(val) bfin_write16(CAN1_MB08_ID1, val)
864#define bfin_read_CAN1_MB09_DATA0() bfin_read16(CAN1_MB09_DATA0)
865#define bfin_write_CAN1_MB09_DATA0(val) bfin_write16(CAN1_MB09_DATA0, val)
866#define bfin_read_CAN1_MB09_DATA1() bfin_read16(CAN1_MB09_DATA1)
867#define bfin_write_CAN1_MB09_DATA1(val) bfin_write16(CAN1_MB09_DATA1, val)
868#define bfin_read_CAN1_MB09_DATA2() bfin_read16(CAN1_MB09_DATA2)
869#define bfin_write_CAN1_MB09_DATA2(val) bfin_write16(CAN1_MB09_DATA2, val)
870#define bfin_read_CAN1_MB09_DATA3() bfin_read16(CAN1_MB09_DATA3)
871#define bfin_write_CAN1_MB09_DATA3(val) bfin_write16(CAN1_MB09_DATA3, val)
872#define bfin_read_CAN1_MB09_LENGTH() bfin_read16(CAN1_MB09_LENGTH)
873#define bfin_write_CAN1_MB09_LENGTH(val) bfin_write16(CAN1_MB09_LENGTH, val)
874#define bfin_read_CAN1_MB09_TIMESTAMP() bfin_read16(CAN1_MB09_TIMESTAMP)
875#define bfin_write_CAN1_MB09_TIMESTAMP(val) bfin_write16(CAN1_MB09_TIMESTAMP, val)
876#define bfin_read_CAN1_MB09_ID0() bfin_read16(CAN1_MB09_ID0)
877#define bfin_write_CAN1_MB09_ID0(val) bfin_write16(CAN1_MB09_ID0, val)
878#define bfin_read_CAN1_MB09_ID1() bfin_read16(CAN1_MB09_ID1)
879#define bfin_write_CAN1_MB09_ID1(val) bfin_write16(CAN1_MB09_ID1, val)
880#define bfin_read_CAN1_MB10_DATA0() bfin_read16(CAN1_MB10_DATA0)
881#define bfin_write_CAN1_MB10_DATA0(val) bfin_write16(CAN1_MB10_DATA0, val)
882#define bfin_read_CAN1_MB10_DATA1() bfin_read16(CAN1_MB10_DATA1)
883#define bfin_write_CAN1_MB10_DATA1(val) bfin_write16(CAN1_MB10_DATA1, val)
884#define bfin_read_CAN1_MB10_DATA2() bfin_read16(CAN1_MB10_DATA2)
885#define bfin_write_CAN1_MB10_DATA2(val) bfin_write16(CAN1_MB10_DATA2, val)
886#define bfin_read_CAN1_MB10_DATA3() bfin_read16(CAN1_MB10_DATA3)
887#define bfin_write_CAN1_MB10_DATA3(val) bfin_write16(CAN1_MB10_DATA3, val)
888#define bfin_read_CAN1_MB10_LENGTH() bfin_read16(CAN1_MB10_LENGTH)
889#define bfin_write_CAN1_MB10_LENGTH(val) bfin_write16(CAN1_MB10_LENGTH, val)
890#define bfin_read_CAN1_MB10_TIMESTAMP() bfin_read16(CAN1_MB10_TIMESTAMP)
891#define bfin_write_CAN1_MB10_TIMESTAMP(val) bfin_write16(CAN1_MB10_TIMESTAMP, val)
892#define bfin_read_CAN1_MB10_ID0() bfin_read16(CAN1_MB10_ID0)
893#define bfin_write_CAN1_MB10_ID0(val) bfin_write16(CAN1_MB10_ID0, val)
894#define bfin_read_CAN1_MB10_ID1() bfin_read16(CAN1_MB10_ID1)
895#define bfin_write_CAN1_MB10_ID1(val) bfin_write16(CAN1_MB10_ID1, val)
896#define bfin_read_CAN1_MB11_DATA0() bfin_read16(CAN1_MB11_DATA0)
897#define bfin_write_CAN1_MB11_DATA0(val) bfin_write16(CAN1_MB11_DATA0, val)
898#define bfin_read_CAN1_MB11_DATA1() bfin_read16(CAN1_MB11_DATA1)
899#define bfin_write_CAN1_MB11_DATA1(val) bfin_write16(CAN1_MB11_DATA1, val)
900#define bfin_read_CAN1_MB11_DATA2() bfin_read16(CAN1_MB11_DATA2)
901#define bfin_write_CAN1_MB11_DATA2(val) bfin_write16(CAN1_MB11_DATA2, val)
902#define bfin_read_CAN1_MB11_DATA3() bfin_read16(CAN1_MB11_DATA3)
903#define bfin_write_CAN1_MB11_DATA3(val) bfin_write16(CAN1_MB11_DATA3, val)
904#define bfin_read_CAN1_MB11_LENGTH() bfin_read16(CAN1_MB11_LENGTH)
905#define bfin_write_CAN1_MB11_LENGTH(val) bfin_write16(CAN1_MB11_LENGTH, val)
906#define bfin_read_CAN1_MB11_TIMESTAMP() bfin_read16(CAN1_MB11_TIMESTAMP)
907#define bfin_write_CAN1_MB11_TIMESTAMP(val) bfin_write16(CAN1_MB11_TIMESTAMP, val)
908#define bfin_read_CAN1_MB11_ID0() bfin_read16(CAN1_MB11_ID0)
909#define bfin_write_CAN1_MB11_ID0(val) bfin_write16(CAN1_MB11_ID0, val)
910#define bfin_read_CAN1_MB11_ID1() bfin_read16(CAN1_MB11_ID1)
911#define bfin_write_CAN1_MB11_ID1(val) bfin_write16(CAN1_MB11_ID1, val)
912#define bfin_read_CAN1_MB12_DATA0() bfin_read16(CAN1_MB12_DATA0)
913#define bfin_write_CAN1_MB12_DATA0(val) bfin_write16(CAN1_MB12_DATA0, val)
914#define bfin_read_CAN1_MB12_DATA1() bfin_read16(CAN1_MB12_DATA1)
915#define bfin_write_CAN1_MB12_DATA1(val) bfin_write16(CAN1_MB12_DATA1, val)
916#define bfin_read_CAN1_MB12_DATA2() bfin_read16(CAN1_MB12_DATA2)
917#define bfin_write_CAN1_MB12_DATA2(val) bfin_write16(CAN1_MB12_DATA2, val)
918#define bfin_read_CAN1_MB12_DATA3() bfin_read16(CAN1_MB12_DATA3)
919#define bfin_write_CAN1_MB12_DATA3(val) bfin_write16(CAN1_MB12_DATA3, val)
920#define bfin_read_CAN1_MB12_LENGTH() bfin_read16(CAN1_MB12_LENGTH)
921#define bfin_write_CAN1_MB12_LENGTH(val) bfin_write16(CAN1_MB12_LENGTH, val)
922#define bfin_read_CAN1_MB12_TIMESTAMP() bfin_read16(CAN1_MB12_TIMESTAMP)
923#define bfin_write_CAN1_MB12_TIMESTAMP(val) bfin_write16(CAN1_MB12_TIMESTAMP, val)
924#define bfin_read_CAN1_MB12_ID0() bfin_read16(CAN1_MB12_ID0)
925#define bfin_write_CAN1_MB12_ID0(val) bfin_write16(CAN1_MB12_ID0, val)
926#define bfin_read_CAN1_MB12_ID1() bfin_read16(CAN1_MB12_ID1)
927#define bfin_write_CAN1_MB12_ID1(val) bfin_write16(CAN1_MB12_ID1, val)
928#define bfin_read_CAN1_MB13_DATA0() bfin_read16(CAN1_MB13_DATA0)
929#define bfin_write_CAN1_MB13_DATA0(val) bfin_write16(CAN1_MB13_DATA0, val)
930#define bfin_read_CAN1_MB13_DATA1() bfin_read16(CAN1_MB13_DATA1)
931#define bfin_write_CAN1_MB13_DATA1(val) bfin_write16(CAN1_MB13_DATA1, val)
932#define bfin_read_CAN1_MB13_DATA2() bfin_read16(CAN1_MB13_DATA2)
933#define bfin_write_CAN1_MB13_DATA2(val) bfin_write16(CAN1_MB13_DATA2, val)
934#define bfin_read_CAN1_MB13_DATA3() bfin_read16(CAN1_MB13_DATA3)
935#define bfin_write_CAN1_MB13_DATA3(val) bfin_write16(CAN1_MB13_DATA3, val)
936#define bfin_read_CAN1_MB13_LENGTH() bfin_read16(CAN1_MB13_LENGTH)
937#define bfin_write_CAN1_MB13_LENGTH(val) bfin_write16(CAN1_MB13_LENGTH, val)
938#define bfin_read_CAN1_MB13_TIMESTAMP() bfin_read16(CAN1_MB13_TIMESTAMP)
939#define bfin_write_CAN1_MB13_TIMESTAMP(val) bfin_write16(CAN1_MB13_TIMESTAMP, val)
940#define bfin_read_CAN1_MB13_ID0() bfin_read16(CAN1_MB13_ID0)
941#define bfin_write_CAN1_MB13_ID0(val) bfin_write16(CAN1_MB13_ID0, val)
942#define bfin_read_CAN1_MB13_ID1() bfin_read16(CAN1_MB13_ID1)
943#define bfin_write_CAN1_MB13_ID1(val) bfin_write16(CAN1_MB13_ID1, val)
944#define bfin_read_CAN1_MB14_DATA0() bfin_read16(CAN1_MB14_DATA0)
945#define bfin_write_CAN1_MB14_DATA0(val) bfin_write16(CAN1_MB14_DATA0, val)
946#define bfin_read_CAN1_MB14_DATA1() bfin_read16(CAN1_MB14_DATA1)
947#define bfin_write_CAN1_MB14_DATA1(val) bfin_write16(CAN1_MB14_DATA1, val)
948#define bfin_read_CAN1_MB14_DATA2() bfin_read16(CAN1_MB14_DATA2)
949#define bfin_write_CAN1_MB14_DATA2(val) bfin_write16(CAN1_MB14_DATA2, val)
950#define bfin_read_CAN1_MB14_DATA3() bfin_read16(CAN1_MB14_DATA3)
951#define bfin_write_CAN1_MB14_DATA3(val) bfin_write16(CAN1_MB14_DATA3, val)
952#define bfin_read_CAN1_MB14_LENGTH() bfin_read16(CAN1_MB14_LENGTH)
953#define bfin_write_CAN1_MB14_LENGTH(val) bfin_write16(CAN1_MB14_LENGTH, val)
954#define bfin_read_CAN1_MB14_TIMESTAMP() bfin_read16(CAN1_MB14_TIMESTAMP)
955#define bfin_write_CAN1_MB14_TIMESTAMP(val) bfin_write16(CAN1_MB14_TIMESTAMP, val)
956#define bfin_read_CAN1_MB14_ID0() bfin_read16(CAN1_MB14_ID0)
957#define bfin_write_CAN1_MB14_ID0(val) bfin_write16(CAN1_MB14_ID0, val)
958#define bfin_read_CAN1_MB14_ID1() bfin_read16(CAN1_MB14_ID1)
959#define bfin_write_CAN1_MB14_ID1(val) bfin_write16(CAN1_MB14_ID1, val)
960#define bfin_read_CAN1_MB15_DATA0() bfin_read16(CAN1_MB15_DATA0)
961#define bfin_write_CAN1_MB15_DATA0(val) bfin_write16(CAN1_MB15_DATA0, val)
962#define bfin_read_CAN1_MB15_DATA1() bfin_read16(CAN1_MB15_DATA1)
963#define bfin_write_CAN1_MB15_DATA1(val) bfin_write16(CAN1_MB15_DATA1, val)
964#define bfin_read_CAN1_MB15_DATA2() bfin_read16(CAN1_MB15_DATA2)
965#define bfin_write_CAN1_MB15_DATA2(val) bfin_write16(CAN1_MB15_DATA2, val)
966#define bfin_read_CAN1_MB15_DATA3() bfin_read16(CAN1_MB15_DATA3)
967#define bfin_write_CAN1_MB15_DATA3(val) bfin_write16(CAN1_MB15_DATA3, val)
968#define bfin_read_CAN1_MB15_LENGTH() bfin_read16(CAN1_MB15_LENGTH)
969#define bfin_write_CAN1_MB15_LENGTH(val) bfin_write16(CAN1_MB15_LENGTH, val)
970#define bfin_read_CAN1_MB15_TIMESTAMP() bfin_read16(CAN1_MB15_TIMESTAMP)
971#define bfin_write_CAN1_MB15_TIMESTAMP(val) bfin_write16(CAN1_MB15_TIMESTAMP, val)
972#define bfin_read_CAN1_MB15_ID0() bfin_read16(CAN1_MB15_ID0)
973#define bfin_write_CAN1_MB15_ID0(val) bfin_write16(CAN1_MB15_ID0, val)
974#define bfin_read_CAN1_MB15_ID1() bfin_read16(CAN1_MB15_ID1)
975#define bfin_write_CAN1_MB15_ID1(val) bfin_write16(CAN1_MB15_ID1, val)
976
977/* CAN Controller 1 Mailbox Data Registers */
978
979#define bfin_read_CAN1_MB16_DATA0() bfin_read16(CAN1_MB16_DATA0)
980#define bfin_write_CAN1_MB16_DATA0(val) bfin_write16(CAN1_MB16_DATA0, val)
981#define bfin_read_CAN1_MB16_DATA1() bfin_read16(CAN1_MB16_DATA1)
982#define bfin_write_CAN1_MB16_DATA1(val) bfin_write16(CAN1_MB16_DATA1, val)
983#define bfin_read_CAN1_MB16_DATA2() bfin_read16(CAN1_MB16_DATA2)
984#define bfin_write_CAN1_MB16_DATA2(val) bfin_write16(CAN1_MB16_DATA2, val)
985#define bfin_read_CAN1_MB16_DATA3() bfin_read16(CAN1_MB16_DATA3)
986#define bfin_write_CAN1_MB16_DATA3(val) bfin_write16(CAN1_MB16_DATA3, val)
987#define bfin_read_CAN1_MB16_LENGTH() bfin_read16(CAN1_MB16_LENGTH)
988#define bfin_write_CAN1_MB16_LENGTH(val) bfin_write16(CAN1_MB16_LENGTH, val)
989#define bfin_read_CAN1_MB16_TIMESTAMP() bfin_read16(CAN1_MB16_TIMESTAMP)
990#define bfin_write_CAN1_MB16_TIMESTAMP(val) bfin_write16(CAN1_MB16_TIMESTAMP, val)
991#define bfin_read_CAN1_MB16_ID0() bfin_read16(CAN1_MB16_ID0)
992#define bfin_write_CAN1_MB16_ID0(val) bfin_write16(CAN1_MB16_ID0, val)
993#define bfin_read_CAN1_MB16_ID1() bfin_read16(CAN1_MB16_ID1)
994#define bfin_write_CAN1_MB16_ID1(val) bfin_write16(CAN1_MB16_ID1, val)
995#define bfin_read_CAN1_MB17_DATA0() bfin_read16(CAN1_MB17_DATA0)
996#define bfin_write_CAN1_MB17_DATA0(val) bfin_write16(CAN1_MB17_DATA0, val)
997#define bfin_read_CAN1_MB17_DATA1() bfin_read16(CAN1_MB17_DATA1)
998#define bfin_write_CAN1_MB17_DATA1(val) bfin_write16(CAN1_MB17_DATA1, val)
999#define bfin_read_CAN1_MB17_DATA2() bfin_read16(CAN1_MB17_DATA2)
1000#define bfin_write_CAN1_MB17_DATA2(val) bfin_write16(CAN1_MB17_DATA2, val)
1001#define bfin_read_CAN1_MB17_DATA3() bfin_read16(CAN1_MB17_DATA3)
1002#define bfin_write_CAN1_MB17_DATA3(val) bfin_write16(CAN1_MB17_DATA3, val)
1003#define bfin_read_CAN1_MB17_LENGTH() bfin_read16(CAN1_MB17_LENGTH)
1004#define bfin_write_CAN1_MB17_LENGTH(val) bfin_write16(CAN1_MB17_LENGTH, val)
1005#define bfin_read_CAN1_MB17_TIMESTAMP() bfin_read16(CAN1_MB17_TIMESTAMP)
1006#define bfin_write_CAN1_MB17_TIMESTAMP(val) bfin_write16(CAN1_MB17_TIMESTAMP, val)
1007#define bfin_read_CAN1_MB17_ID0() bfin_read16(CAN1_MB17_ID0)
1008#define bfin_write_CAN1_MB17_ID0(val) bfin_write16(CAN1_MB17_ID0, val)
1009#define bfin_read_CAN1_MB17_ID1() bfin_read16(CAN1_MB17_ID1)
1010#define bfin_write_CAN1_MB17_ID1(val) bfin_write16(CAN1_MB17_ID1, val)
1011#define bfin_read_CAN1_MB18_DATA0() bfin_read16(CAN1_MB18_DATA0)
1012#define bfin_write_CAN1_MB18_DATA0(val) bfin_write16(CAN1_MB18_DATA0, val)
1013#define bfin_read_CAN1_MB18_DATA1() bfin_read16(CAN1_MB18_DATA1)
1014#define bfin_write_CAN1_MB18_DATA1(val) bfin_write16(CAN1_MB18_DATA1, val)
1015#define bfin_read_CAN1_MB18_DATA2() bfin_read16(CAN1_MB18_DATA2)
1016#define bfin_write_CAN1_MB18_DATA2(val) bfin_write16(CAN1_MB18_DATA2, val)
1017#define bfin_read_CAN1_MB18_DATA3() bfin_read16(CAN1_MB18_DATA3)
1018#define bfin_write_CAN1_MB18_DATA3(val) bfin_write16(CAN1_MB18_DATA3, val)
1019#define bfin_read_CAN1_MB18_LENGTH() bfin_read16(CAN1_MB18_LENGTH)
1020#define bfin_write_CAN1_MB18_LENGTH(val) bfin_write16(CAN1_MB18_LENGTH, val)
1021#define bfin_read_CAN1_MB18_TIMESTAMP() bfin_read16(CAN1_MB18_TIMESTAMP)
1022#define bfin_write_CAN1_MB18_TIMESTAMP(val) bfin_write16(CAN1_MB18_TIMESTAMP, val)
1023#define bfin_read_CAN1_MB18_ID0() bfin_read16(CAN1_MB18_ID0)
1024#define bfin_write_CAN1_MB18_ID0(val) bfin_write16(CAN1_MB18_ID0, val)
1025#define bfin_read_CAN1_MB18_ID1() bfin_read16(CAN1_MB18_ID1)
1026#define bfin_write_CAN1_MB18_ID1(val) bfin_write16(CAN1_MB18_ID1, val)
1027#define bfin_read_CAN1_MB19_DATA0() bfin_read16(CAN1_MB19_DATA0)
1028#define bfin_write_CAN1_MB19_DATA0(val) bfin_write16(CAN1_MB19_DATA0, val)
1029#define bfin_read_CAN1_MB19_DATA1() bfin_read16(CAN1_MB19_DATA1)
1030#define bfin_write_CAN1_MB19_DATA1(val) bfin_write16(CAN1_MB19_DATA1, val)
1031#define bfin_read_CAN1_MB19_DATA2() bfin_read16(CAN1_MB19_DATA2)
1032#define bfin_write_CAN1_MB19_DATA2(val) bfin_write16(CAN1_MB19_DATA2, val)
1033#define bfin_read_CAN1_MB19_DATA3() bfin_read16(CAN1_MB19_DATA3)
1034#define bfin_write_CAN1_MB19_DATA3(val) bfin_write16(CAN1_MB19_DATA3, val)
1035#define bfin_read_CAN1_MB19_LENGTH() bfin_read16(CAN1_MB19_LENGTH)
1036#define bfin_write_CAN1_MB19_LENGTH(val) bfin_write16(CAN1_MB19_LENGTH, val)
1037#define bfin_read_CAN1_MB19_TIMESTAMP() bfin_read16(CAN1_MB19_TIMESTAMP)
1038#define bfin_write_CAN1_MB19_TIMESTAMP(val) bfin_write16(CAN1_MB19_TIMESTAMP, val)
1039#define bfin_read_CAN1_MB19_ID0() bfin_read16(CAN1_MB19_ID0)
1040#define bfin_write_CAN1_MB19_ID0(val) bfin_write16(CAN1_MB19_ID0, val)
1041#define bfin_read_CAN1_MB19_ID1() bfin_read16(CAN1_MB19_ID1)
1042#define bfin_write_CAN1_MB19_ID1(val) bfin_write16(CAN1_MB19_ID1, val)
1043#define bfin_read_CAN1_MB20_DATA0() bfin_read16(CAN1_MB20_DATA0)
1044#define bfin_write_CAN1_MB20_DATA0(val) bfin_write16(CAN1_MB20_DATA0, val)
1045#define bfin_read_CAN1_MB20_DATA1() bfin_read16(CAN1_MB20_DATA1)
1046#define bfin_write_CAN1_MB20_DATA1(val) bfin_write16(CAN1_MB20_DATA1, val)
1047#define bfin_read_CAN1_MB20_DATA2() bfin_read16(CAN1_MB20_DATA2)
1048#define bfin_write_CAN1_MB20_DATA2(val) bfin_write16(CAN1_MB20_DATA2, val)
1049#define bfin_read_CAN1_MB20_DATA3() bfin_read16(CAN1_MB20_DATA3)
1050#define bfin_write_CAN1_MB20_DATA3(val) bfin_write16(CAN1_MB20_DATA3, val)
1051#define bfin_read_CAN1_MB20_LENGTH() bfin_read16(CAN1_MB20_LENGTH)
1052#define bfin_write_CAN1_MB20_LENGTH(val) bfin_write16(CAN1_MB20_LENGTH, val)
1053#define bfin_read_CAN1_MB20_TIMESTAMP() bfin_read16(CAN1_MB20_TIMESTAMP)
1054#define bfin_write_CAN1_MB20_TIMESTAMP(val) bfin_write16(CAN1_MB20_TIMESTAMP, val)
1055#define bfin_read_CAN1_MB20_ID0() bfin_read16(CAN1_MB20_ID0)
1056#define bfin_write_CAN1_MB20_ID0(val) bfin_write16(CAN1_MB20_ID0, val)
1057#define bfin_read_CAN1_MB20_ID1() bfin_read16(CAN1_MB20_ID1)
1058#define bfin_write_CAN1_MB20_ID1(val) bfin_write16(CAN1_MB20_ID1, val)
1059#define bfin_read_CAN1_MB21_DATA0() bfin_read16(CAN1_MB21_DATA0)
1060#define bfin_write_CAN1_MB21_DATA0(val) bfin_write16(CAN1_MB21_DATA0, val)
1061#define bfin_read_CAN1_MB21_DATA1() bfin_read16(CAN1_MB21_DATA1)
1062#define bfin_write_CAN1_MB21_DATA1(val) bfin_write16(CAN1_MB21_DATA1, val)
1063#define bfin_read_CAN1_MB21_DATA2() bfin_read16(CAN1_MB21_DATA2)
1064#define bfin_write_CAN1_MB21_DATA2(val) bfin_write16(CAN1_MB21_DATA2, val)
1065#define bfin_read_CAN1_MB21_DATA3() bfin_read16(CAN1_MB21_DATA3)
1066#define bfin_write_CAN1_MB21_DATA3(val) bfin_write16(CAN1_MB21_DATA3, val)
1067#define bfin_read_CAN1_MB21_LENGTH() bfin_read16(CAN1_MB21_LENGTH)
1068#define bfin_write_CAN1_MB21_LENGTH(val) bfin_write16(CAN1_MB21_LENGTH, val)
1069#define bfin_read_CAN1_MB21_TIMESTAMP() bfin_read16(CAN1_MB21_TIMESTAMP)
1070#define bfin_write_CAN1_MB21_TIMESTAMP(val) bfin_write16(CAN1_MB21_TIMESTAMP, val)
1071#define bfin_read_CAN1_MB21_ID0() bfin_read16(CAN1_MB21_ID0)
1072#define bfin_write_CAN1_MB21_ID0(val) bfin_write16(CAN1_MB21_ID0, val)
1073#define bfin_read_CAN1_MB21_ID1() bfin_read16(CAN1_MB21_ID1)
1074#define bfin_write_CAN1_MB21_ID1(val) bfin_write16(CAN1_MB21_ID1, val)
1075#define bfin_read_CAN1_MB22_DATA0() bfin_read16(CAN1_MB22_DATA0)
1076#define bfin_write_CAN1_MB22_DATA0(val) bfin_write16(CAN1_MB22_DATA0, val)
1077#define bfin_read_CAN1_MB22_DATA1() bfin_read16(CAN1_MB22_DATA1)
1078#define bfin_write_CAN1_MB22_DATA1(val) bfin_write16(CAN1_MB22_DATA1, val)
1079#define bfin_read_CAN1_MB22_DATA2() bfin_read16(CAN1_MB22_DATA2)
1080#define bfin_write_CAN1_MB22_DATA2(val) bfin_write16(CAN1_MB22_DATA2, val)
1081#define bfin_read_CAN1_MB22_DATA3() bfin_read16(CAN1_MB22_DATA3)
1082#define bfin_write_CAN1_MB22_DATA3(val) bfin_write16(CAN1_MB22_DATA3, val)
1083#define bfin_read_CAN1_MB22_LENGTH() bfin_read16(CAN1_MB22_LENGTH)
1084#define bfin_write_CAN1_MB22_LENGTH(val) bfin_write16(CAN1_MB22_LENGTH, val)
1085#define bfin_read_CAN1_MB22_TIMESTAMP() bfin_read16(CAN1_MB22_TIMESTAMP)
1086#define bfin_write_CAN1_MB22_TIMESTAMP(val) bfin_write16(CAN1_MB22_TIMESTAMP, val)
1087#define bfin_read_CAN1_MB22_ID0() bfin_read16(CAN1_MB22_ID0)
1088#define bfin_write_CAN1_MB22_ID0(val) bfin_write16(CAN1_MB22_ID0, val)
1089#define bfin_read_CAN1_MB22_ID1() bfin_read16(CAN1_MB22_ID1)
1090#define bfin_write_CAN1_MB22_ID1(val) bfin_write16(CAN1_MB22_ID1, val)
1091#define bfin_read_CAN1_MB23_DATA0() bfin_read16(CAN1_MB23_DATA0)
1092#define bfin_write_CAN1_MB23_DATA0(val) bfin_write16(CAN1_MB23_DATA0, val)
1093#define bfin_read_CAN1_MB23_DATA1() bfin_read16(CAN1_MB23_DATA1)
1094#define bfin_write_CAN1_MB23_DATA1(val) bfin_write16(CAN1_MB23_DATA1, val)
1095#define bfin_read_CAN1_MB23_DATA2() bfin_read16(CAN1_MB23_DATA2)
1096#define bfin_write_CAN1_MB23_DATA2(val) bfin_write16(CAN1_MB23_DATA2, val)
1097#define bfin_read_CAN1_MB23_DATA3() bfin_read16(CAN1_MB23_DATA3)
1098#define bfin_write_CAN1_MB23_DATA3(val) bfin_write16(CAN1_MB23_DATA3, val)
1099#define bfin_read_CAN1_MB23_LENGTH() bfin_read16(CAN1_MB23_LENGTH)
1100#define bfin_write_CAN1_MB23_LENGTH(val) bfin_write16(CAN1_MB23_LENGTH, val)
1101#define bfin_read_CAN1_MB23_TIMESTAMP() bfin_read16(CAN1_MB23_TIMESTAMP)
1102#define bfin_write_CAN1_MB23_TIMESTAMP(val) bfin_write16(CAN1_MB23_TIMESTAMP, val)
1103#define bfin_read_CAN1_MB23_ID0() bfin_read16(CAN1_MB23_ID0)
1104#define bfin_write_CAN1_MB23_ID0(val) bfin_write16(CAN1_MB23_ID0, val)
1105#define bfin_read_CAN1_MB23_ID1() bfin_read16(CAN1_MB23_ID1)
1106#define bfin_write_CAN1_MB23_ID1(val) bfin_write16(CAN1_MB23_ID1, val)
1107#define bfin_read_CAN1_MB24_DATA0() bfin_read16(CAN1_MB24_DATA0)
1108#define bfin_write_CAN1_MB24_DATA0(val) bfin_write16(CAN1_MB24_DATA0, val)
1109#define bfin_read_CAN1_MB24_DATA1() bfin_read16(CAN1_MB24_DATA1)
1110#define bfin_write_CAN1_MB24_DATA1(val) bfin_write16(CAN1_MB24_DATA1, val)
1111#define bfin_read_CAN1_MB24_DATA2() bfin_read16(CAN1_MB24_DATA2)
1112#define bfin_write_CAN1_MB24_DATA2(val) bfin_write16(CAN1_MB24_DATA2, val)
1113#define bfin_read_CAN1_MB24_DATA3() bfin_read16(CAN1_MB24_DATA3)
1114#define bfin_write_CAN1_MB24_DATA3(val) bfin_write16(CAN1_MB24_DATA3, val)
1115#define bfin_read_CAN1_MB24_LENGTH() bfin_read16(CAN1_MB24_LENGTH)
1116#define bfin_write_CAN1_MB24_LENGTH(val) bfin_write16(CAN1_MB24_LENGTH, val)
1117#define bfin_read_CAN1_MB24_TIMESTAMP() bfin_read16(CAN1_MB24_TIMESTAMP)
1118#define bfin_write_CAN1_MB24_TIMESTAMP(val) bfin_write16(CAN1_MB24_TIMESTAMP, val)
1119#define bfin_read_CAN1_MB24_ID0() bfin_read16(CAN1_MB24_ID0)
1120#define bfin_write_CAN1_MB24_ID0(val) bfin_write16(CAN1_MB24_ID0, val)
1121#define bfin_read_CAN1_MB24_ID1() bfin_read16(CAN1_MB24_ID1)
1122#define bfin_write_CAN1_MB24_ID1(val) bfin_write16(CAN1_MB24_ID1, val)
1123#define bfin_read_CAN1_MB25_DATA0() bfin_read16(CAN1_MB25_DATA0)
1124#define bfin_write_CAN1_MB25_DATA0(val) bfin_write16(CAN1_MB25_DATA0, val)
1125#define bfin_read_CAN1_MB25_DATA1() bfin_read16(CAN1_MB25_DATA1)
1126#define bfin_write_CAN1_MB25_DATA1(val) bfin_write16(CAN1_MB25_DATA1, val)
1127#define bfin_read_CAN1_MB25_DATA2() bfin_read16(CAN1_MB25_DATA2)
1128#define bfin_write_CAN1_MB25_DATA2(val) bfin_write16(CAN1_MB25_DATA2, val)
1129#define bfin_read_CAN1_MB25_DATA3() bfin_read16(CAN1_MB25_DATA3)
1130#define bfin_write_CAN1_MB25_DATA3(val) bfin_write16(CAN1_MB25_DATA3, val)
1131#define bfin_read_CAN1_MB25_LENGTH() bfin_read16(CAN1_MB25_LENGTH)
1132#define bfin_write_CAN1_MB25_LENGTH(val) bfin_write16(CAN1_MB25_LENGTH, val)
1133#define bfin_read_CAN1_MB25_TIMESTAMP() bfin_read16(CAN1_MB25_TIMESTAMP)
1134#define bfin_write_CAN1_MB25_TIMESTAMP(val) bfin_write16(CAN1_MB25_TIMESTAMP, val)
1135#define bfin_read_CAN1_MB25_ID0() bfin_read16(CAN1_MB25_ID0)
1136#define bfin_write_CAN1_MB25_ID0(val) bfin_write16(CAN1_MB25_ID0, val)
1137#define bfin_read_CAN1_MB25_ID1() bfin_read16(CAN1_MB25_ID1)
1138#define bfin_write_CAN1_MB25_ID1(val) bfin_write16(CAN1_MB25_ID1, val)
1139#define bfin_read_CAN1_MB26_DATA0() bfin_read16(CAN1_MB26_DATA0)
1140#define bfin_write_CAN1_MB26_DATA0(val) bfin_write16(CAN1_MB26_DATA0, val)
1141#define bfin_read_CAN1_MB26_DATA1() bfin_read16(CAN1_MB26_DATA1)
1142#define bfin_write_CAN1_MB26_DATA1(val) bfin_write16(CAN1_MB26_DATA1, val)
1143#define bfin_read_CAN1_MB26_DATA2() bfin_read16(CAN1_MB26_DATA2)
1144#define bfin_write_CAN1_MB26_DATA2(val) bfin_write16(CAN1_MB26_DATA2, val)
1145#define bfin_read_CAN1_MB26_DATA3() bfin_read16(CAN1_MB26_DATA3)
1146#define bfin_write_CAN1_MB26_DATA3(val) bfin_write16(CAN1_MB26_DATA3, val)
1147#define bfin_read_CAN1_MB26_LENGTH() bfin_read16(CAN1_MB26_LENGTH)
1148#define bfin_write_CAN1_MB26_LENGTH(val) bfin_write16(CAN1_MB26_LENGTH, val)
1149#define bfin_read_CAN1_MB26_TIMESTAMP() bfin_read16(CAN1_MB26_TIMESTAMP)
1150#define bfin_write_CAN1_MB26_TIMESTAMP(val) bfin_write16(CAN1_MB26_TIMESTAMP, val)
1151#define bfin_read_CAN1_MB26_ID0() bfin_read16(CAN1_MB26_ID0)
1152#define bfin_write_CAN1_MB26_ID0(val) bfin_write16(CAN1_MB26_ID0, val)
1153#define bfin_read_CAN1_MB26_ID1() bfin_read16(CAN1_MB26_ID1)
1154#define bfin_write_CAN1_MB26_ID1(val) bfin_write16(CAN1_MB26_ID1, val)
1155#define bfin_read_CAN1_MB27_DATA0() bfin_read16(CAN1_MB27_DATA0)
1156#define bfin_write_CAN1_MB27_DATA0(val) bfin_write16(CAN1_MB27_DATA0, val)
1157#define bfin_read_CAN1_MB27_DATA1() bfin_read16(CAN1_MB27_DATA1)
1158#define bfin_write_CAN1_MB27_DATA1(val) bfin_write16(CAN1_MB27_DATA1, val)
1159#define bfin_read_CAN1_MB27_DATA2() bfin_read16(CAN1_MB27_DATA2)
1160#define bfin_write_CAN1_MB27_DATA2(val) bfin_write16(CAN1_MB27_DATA2, val)
1161#define bfin_read_CAN1_MB27_DATA3() bfin_read16(CAN1_MB27_DATA3)
1162#define bfin_write_CAN1_MB27_DATA3(val) bfin_write16(CAN1_MB27_DATA3, val)
1163#define bfin_read_CAN1_MB27_LENGTH() bfin_read16(CAN1_MB27_LENGTH)
1164#define bfin_write_CAN1_MB27_LENGTH(val) bfin_write16(CAN1_MB27_LENGTH, val)
1165#define bfin_read_CAN1_MB27_TIMESTAMP() bfin_read16(CAN1_MB27_TIMESTAMP)
1166#define bfin_write_CAN1_MB27_TIMESTAMP(val) bfin_write16(CAN1_MB27_TIMESTAMP, val)
1167#define bfin_read_CAN1_MB27_ID0() bfin_read16(CAN1_MB27_ID0)
1168#define bfin_write_CAN1_MB27_ID0(val) bfin_write16(CAN1_MB27_ID0, val)
1169#define bfin_read_CAN1_MB27_ID1() bfin_read16(CAN1_MB27_ID1)
1170#define bfin_write_CAN1_MB27_ID1(val) bfin_write16(CAN1_MB27_ID1, val)
1171#define bfin_read_CAN1_MB28_DATA0() bfin_read16(CAN1_MB28_DATA0)
1172#define bfin_write_CAN1_MB28_DATA0(val) bfin_write16(CAN1_MB28_DATA0, val)
1173#define bfin_read_CAN1_MB28_DATA1() bfin_read16(CAN1_MB28_DATA1)
1174#define bfin_write_CAN1_MB28_DATA1(val) bfin_write16(CAN1_MB28_DATA1, val)
1175#define bfin_read_CAN1_MB28_DATA2() bfin_read16(CAN1_MB28_DATA2)
1176#define bfin_write_CAN1_MB28_DATA2(val) bfin_write16(CAN1_MB28_DATA2, val)
1177#define bfin_read_CAN1_MB28_DATA3() bfin_read16(CAN1_MB28_DATA3)
1178#define bfin_write_CAN1_MB28_DATA3(val) bfin_write16(CAN1_MB28_DATA3, val)
1179#define bfin_read_CAN1_MB28_LENGTH() bfin_read16(CAN1_MB28_LENGTH)
1180#define bfin_write_CAN1_MB28_LENGTH(val) bfin_write16(CAN1_MB28_LENGTH, val)
1181#define bfin_read_CAN1_MB28_TIMESTAMP() bfin_read16(CAN1_MB28_TIMESTAMP)
1182#define bfin_write_CAN1_MB28_TIMESTAMP(val) bfin_write16(CAN1_MB28_TIMESTAMP, val)
1183#define bfin_read_CAN1_MB28_ID0() bfin_read16(CAN1_MB28_ID0)
1184#define bfin_write_CAN1_MB28_ID0(val) bfin_write16(CAN1_MB28_ID0, val)
1185#define bfin_read_CAN1_MB28_ID1() bfin_read16(CAN1_MB28_ID1)
1186#define bfin_write_CAN1_MB28_ID1(val) bfin_write16(CAN1_MB28_ID1, val)
1187#define bfin_read_CAN1_MB29_DATA0() bfin_read16(CAN1_MB29_DATA0)
1188#define bfin_write_CAN1_MB29_DATA0(val) bfin_write16(CAN1_MB29_DATA0, val)
1189#define bfin_read_CAN1_MB29_DATA1() bfin_read16(CAN1_MB29_DATA1)
1190#define bfin_write_CAN1_MB29_DATA1(val) bfin_write16(CAN1_MB29_DATA1, val)
1191#define bfin_read_CAN1_MB29_DATA2() bfin_read16(CAN1_MB29_DATA2)
1192#define bfin_write_CAN1_MB29_DATA2(val) bfin_write16(CAN1_MB29_DATA2, val)
1193#define bfin_read_CAN1_MB29_DATA3() bfin_read16(CAN1_MB29_DATA3)
1194#define bfin_write_CAN1_MB29_DATA3(val) bfin_write16(CAN1_MB29_DATA3, val)
1195#define bfin_read_CAN1_MB29_LENGTH() bfin_read16(CAN1_MB29_LENGTH)
1196#define bfin_write_CAN1_MB29_LENGTH(val) bfin_write16(CAN1_MB29_LENGTH, val)
1197#define bfin_read_CAN1_MB29_TIMESTAMP() bfin_read16(CAN1_MB29_TIMESTAMP)
1198#define bfin_write_CAN1_MB29_TIMESTAMP(val) bfin_write16(CAN1_MB29_TIMESTAMP, val)
1199#define bfin_read_CAN1_MB29_ID0() bfin_read16(CAN1_MB29_ID0)
1200#define bfin_write_CAN1_MB29_ID0(val) bfin_write16(CAN1_MB29_ID0, val)
1201#define bfin_read_CAN1_MB29_ID1() bfin_read16(CAN1_MB29_ID1)
1202#define bfin_write_CAN1_MB29_ID1(val) bfin_write16(CAN1_MB29_ID1, val)
1203#define bfin_read_CAN1_MB30_DATA0() bfin_read16(CAN1_MB30_DATA0)
1204#define bfin_write_CAN1_MB30_DATA0(val) bfin_write16(CAN1_MB30_DATA0, val)
1205#define bfin_read_CAN1_MB30_DATA1() bfin_read16(CAN1_MB30_DATA1)
1206#define bfin_write_CAN1_MB30_DATA1(val) bfin_write16(CAN1_MB30_DATA1, val)
1207#define bfin_read_CAN1_MB30_DATA2() bfin_read16(CAN1_MB30_DATA2)
1208#define bfin_write_CAN1_MB30_DATA2(val) bfin_write16(CAN1_MB30_DATA2, val)
1209#define bfin_read_CAN1_MB30_DATA3() bfin_read16(CAN1_MB30_DATA3)
1210#define bfin_write_CAN1_MB30_DATA3(val) bfin_write16(CAN1_MB30_DATA3, val)
1211#define bfin_read_CAN1_MB30_LENGTH() bfin_read16(CAN1_MB30_LENGTH)
1212#define bfin_write_CAN1_MB30_LENGTH(val) bfin_write16(CAN1_MB30_LENGTH, val)
1213#define bfin_read_CAN1_MB30_TIMESTAMP() bfin_read16(CAN1_MB30_TIMESTAMP)
1214#define bfin_write_CAN1_MB30_TIMESTAMP(val) bfin_write16(CAN1_MB30_TIMESTAMP, val)
1215#define bfin_read_CAN1_MB30_ID0() bfin_read16(CAN1_MB30_ID0)
1216#define bfin_write_CAN1_MB30_ID0(val) bfin_write16(CAN1_MB30_ID0, val)
1217#define bfin_read_CAN1_MB30_ID1() bfin_read16(CAN1_MB30_ID1)
1218#define bfin_write_CAN1_MB30_ID1(val) bfin_write16(CAN1_MB30_ID1, val)
1219#define bfin_read_CAN1_MB31_DATA0() bfin_read16(CAN1_MB31_DATA0)
1220#define bfin_write_CAN1_MB31_DATA0(val) bfin_write16(CAN1_MB31_DATA0, val)
1221#define bfin_read_CAN1_MB31_DATA1() bfin_read16(CAN1_MB31_DATA1)
1222#define bfin_write_CAN1_MB31_DATA1(val) bfin_write16(CAN1_MB31_DATA1, val)
1223#define bfin_read_CAN1_MB31_DATA2() bfin_read16(CAN1_MB31_DATA2)
1224#define bfin_write_CAN1_MB31_DATA2(val) bfin_write16(CAN1_MB31_DATA2, val)
1225#define bfin_read_CAN1_MB31_DATA3() bfin_read16(CAN1_MB31_DATA3)
1226#define bfin_write_CAN1_MB31_DATA3(val) bfin_write16(CAN1_MB31_DATA3, val)
1227#define bfin_read_CAN1_MB31_LENGTH() bfin_read16(CAN1_MB31_LENGTH)
1228#define bfin_write_CAN1_MB31_LENGTH(val) bfin_write16(CAN1_MB31_LENGTH, val)
1229#define bfin_read_CAN1_MB31_TIMESTAMP() bfin_read16(CAN1_MB31_TIMESTAMP)
1230#define bfin_write_CAN1_MB31_TIMESTAMP(val) bfin_write16(CAN1_MB31_TIMESTAMP, val)
1231#define bfin_read_CAN1_MB31_ID0() bfin_read16(CAN1_MB31_ID0)
1232#define bfin_write_CAN1_MB31_ID0(val) bfin_write16(CAN1_MB31_ID0, val)
1233#define bfin_read_CAN1_MB31_ID1() bfin_read16(CAN1_MB31_ID1)
1234#define bfin_write_CAN1_MB31_ID1(val) bfin_write16(CAN1_MB31_ID1, val)
1235
1236/* ATAPI Registers */
1237
1238#define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL)
1239#define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val)
1240#define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS)
1241#define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val)
1242#define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR)
1243#define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val)
1244#define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF)
1245#define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val)
1246#define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF)
1247#define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val)
1248#define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK)
1249#define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val)
1250#define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS)
1251#define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val)
1252#define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN)
1253#define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val)
1254#define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS)
1255#define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val)
1256#define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE)
1257#define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val)
1258#define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE)
1259#define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val)
1260#define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT)
1261#define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val)
1262#define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT)
1263#define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val)
1264#define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT)
1265#define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val)
1266#define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT)
1267#define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val)
1268#define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0)
1269#define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val)
1270#define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0)
1271#define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val)
1272#define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1)
1273#define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val)
1274#define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0)
1275#define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val)
1276#define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1)
1277#define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val)
1278#define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2)
1279#define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val)
1280#define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0)
1281#define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val)
1282#define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1)
1283#define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val)
1284#define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2)
1285#define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val)
1286#define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3)
1287#define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val)
1288
1289/* SDH Registers */
1290
1291#define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL)
1292#define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val)
1293#define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL)
1294#define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val)
1295#define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT)
1296#define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val)
1297#define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND)
1298#define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val)
1299#define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD)
1300#define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val)
1301#define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0)
1302#define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val)
1303#define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1)
1304#define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val)
1305#define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2)
1306#define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val)
1307#define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3)
1308#define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val)
1309#define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER)
1310#define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val)
1311#define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH)
1312#define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val)
1313#define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL)
1314#define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val)
1315#define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT)
1316#define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val)
1317#define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS)
1318#define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val)
1319#define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR)
1320#define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val)
1321#define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0)
1322#define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val)
1323#define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1)
1324#define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val)
1325#define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT)
1326#define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val)
1327#define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO)
1328#define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val)
1329#define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS)
1330#define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val)
1331#define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK)
1332#define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val)
1333#define bfin_read_SDH_CFG() bfin_read16(SDH_CFG)
1334#define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val)
1335#define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN)
1336#define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val)
1337#define bfin_read_SDH_PID0() bfin_read16(SDH_PID0)
1338#define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val)
1339#define bfin_read_SDH_PID1() bfin_read16(SDH_PID1)
1340#define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val)
1341#define bfin_read_SDH_PID2() bfin_read16(SDH_PID2)
1342#define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val)
1343#define bfin_read_SDH_PID3() bfin_read16(SDH_PID3)
1344#define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val)
1345#define bfin_read_SDH_PID4() bfin_read16(SDH_PID4)
1346#define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val)
1347#define bfin_read_SDH_PID5() bfin_read16(SDH_PID5)
1348#define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val)
1349#define bfin_read_SDH_PID6() bfin_read16(SDH_PID6)
1350#define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val)
1351#define bfin_read_SDH_PID7() bfin_read16(SDH_PID7)
1352#define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val)
1353
1354/* HOST Port Registers */
1355
1356#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
1357#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
1358#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
1359#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
1360#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
1361#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
1362
1363/* USB Control Registers */
1364
1365#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
1366#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
1367#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
1368#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
1369#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
1370#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
1371#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
1372#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
1373#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
1374#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
1375#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
1376#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
1377#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
1378#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
1379#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
1380#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
1381#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
1382#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
1383#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
1384#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
1385#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
1386#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
1387#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
1388#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
1389#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
1390#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
1391
1392/* USB Packet Control Registers */
1393
1394#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
1395#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
1396#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
1397#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
1398#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
1399#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
1400#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
1401#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
1402#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
1403#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
1404#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
1405#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
1406#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
1407#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
1408#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
1409#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
1410#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
1411#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
1412#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
1413#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
1414#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
1415#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
1416#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
1417#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
1418#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
1419#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
1420
1421/* USB Endbfin_read_()oint FIFO Registers */
1422
1423#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
1424#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
1425#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
1426#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
1427#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
1428#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
1429#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
1430#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
1431#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
1432#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
1433#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
1434#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
1435#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
1436#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
1437#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
1438#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
1439
1440/* USB OTG Control Registers */
1441
1442#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
1443#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
1444#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
1445#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
1446#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
1447#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
1448
1449/* USB Phy Control Registers */
1450
1451#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
1452#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
1453#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
1454#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
1455#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
1456#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
1457#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
1458#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
1459#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
1460#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
1461
1462/* (APHY_CNTRL is for ADI usage only) */
1463
1464#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
1465#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
1466
1467/* (APHY_CALIB is for ADI usage only) */
1468
1469#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
1470#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
1471#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
1472#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
1473
1474/* (PHY_TEST is for ADI usage only) */
1475
1476#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
1477#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
1478#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
1479#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
1480#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
1481#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
1482
1483/* USB Endbfin_read_()oint 0 Control Registers */
1484
1485#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
1486#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
1487#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
1488#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
1489#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
1490#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
1491#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
1492#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
1493#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
1494#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
1495#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
1496#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
1497#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
1498#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
1499#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
1500#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
1501#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
1502#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
1503
1504/* USB Endbfin_read_()oint 1 Control Registers */
1505
1506#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
1507#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
1508#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
1509#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
1510#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
1511#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
1512#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
1513#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
1514#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
1515#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
1516#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
1517#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
1518#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
1519#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
1520#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
1521#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
1522#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
1523#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
1524#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
1525#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
1526
1527/* USB Endbfin_read_()oint 2 Control Registers */
1528
1529#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
1530#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
1531#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
1532#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
1533#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
1534#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
1535#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
1536#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
1537#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
1538#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
1539#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
1540#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
1541#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
1542#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
1543#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
1544#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
1545#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
1546#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
1547#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
1548#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
1549
1550/* USB Endbfin_read_()oint 3 Control Registers */
1551
1552#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
1553#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
1554#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
1555#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
1556#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
1557#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
1558#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
1559#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
1560#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
1561#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
1562#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
1563#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
1564#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
1565#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
1566#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
1567#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
1568#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
1569#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
1570#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
1571#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
1572
1573/* USB Endbfin_read_()oint 4 Control Registers */
1574
1575#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
1576#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
1577#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
1578#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
1579#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
1580#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
1581#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
1582#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
1583#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
1584#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
1585#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
1586#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
1587#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
1588#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
1589#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
1590#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
1591#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
1592#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
1593#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
1594#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
1595
1596/* USB Endbfin_read_()oint 5 Control Registers */
1597
1598#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
1599#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
1600#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
1601#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
1602#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
1603#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
1604#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
1605#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
1606#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
1607#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
1608#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
1609#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
1610#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
1611#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
1612#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
1613#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
1614#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
1615#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
1616#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
1617#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
1618
1619/* USB Endbfin_read_()oint 6 Control Registers */
1620
1621#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
1622#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
1623#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
1624#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
1625#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
1626#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
1627#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
1628#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
1629#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
1630#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
1631#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
1632#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
1633#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
1634#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
1635#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
1636#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
1637#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
1638#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
1639#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
1640#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
1641
1642/* USB Endbfin_read_()oint 7 Control Registers */
1643
1644#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
1645#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
1646#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
1647#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
1648#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
1649#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
1650#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
1651#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
1652#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
1653#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
1654#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
1655#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
1656#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
1657#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
1658#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
1659#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
1660#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
1661#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
1662#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
1663#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
1664#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
1665#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
1666#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
1667#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
1668
1669/* USB Channel 0 Config Registers */
1670
1671#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
1672#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
1673#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
1674#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
1675#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
1676#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
1677#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
1678#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
1679#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
1680#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
1681
1682/* USB Channel 1 Config Registers */
1683
1684#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
1685#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
1686#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
1687#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
1688#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
1689#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
1690#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
1691#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
1692#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
1693#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
1694
1695/* USB Channel 2 Config Registers */
1696
1697#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
1698#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
1699#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
1700#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
1701#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
1702#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
1703#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
1704#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
1705#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
1706#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
1707
1708/* USB Channel 3 Config Registers */
1709
1710#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
1711#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
1712#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
1713#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
1714#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
1715#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
1716#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
1717#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
1718#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
1719#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
1720
1721/* USB Channel 4 Config Registers */
1722
1723#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
1724#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
1725#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
1726#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
1727#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
1728#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
1729#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
1730#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
1731#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
1732#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
1733
1734/* USB Channel 5 Config Registers */
1735
1736#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
1737#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
1738#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
1739#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
1740#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
1741#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
1742#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
1743#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
1744#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
1745#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
1746
1747/* USB Channel 6 Config Registers */
1748
1749#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
1750#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
1751#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
1752#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
1753#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
1754#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
1755#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
1756#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
1757#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
1758#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
1759
1760/* USB Channel 7 Config Registers */
1761
1762#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
1763#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
1764#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
1765#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
1766#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
1767#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
1768#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
1769#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
1770#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
1771#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
1772
1773/* Keybfin_read_()ad Registers */
1774
1775#define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL)
1776#define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val)
1777#define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE)
1778#define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val)
1779#define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL)
1780#define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val)
1781#define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL)
1782#define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val)
1783#define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT)
1784#define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val)
1785#define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL)
1786#define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val)
1787
1788/* Pixel Combfin_read_()ositor (PIXC) Registers */
1789
1790#define bfin_read_PIXC_CTL() bfin_read16(PIXC_CTL)
1791#define bfin_write_PIXC_CTL(val) bfin_write16(PIXC_CTL, val)
1792#define bfin_read_PIXC_PPL() bfin_read16(PIXC_PPL)
1793#define bfin_write_PIXC_PPL(val) bfin_write16(PIXC_PPL, val)
1794#define bfin_read_PIXC_LPF() bfin_read16(PIXC_LPF)
1795#define bfin_write_PIXC_LPF(val) bfin_write16(PIXC_LPF, val)
1796#define bfin_read_PIXC_AHSTART() bfin_read16(PIXC_AHSTART)
1797#define bfin_write_PIXC_AHSTART(val) bfin_write16(PIXC_AHSTART, val)
1798#define bfin_read_PIXC_AHEND() bfin_read16(PIXC_AHEND)
1799#define bfin_write_PIXC_AHEND(val) bfin_write16(PIXC_AHEND, val)
1800#define bfin_read_PIXC_AVSTART() bfin_read16(PIXC_AVSTART)
1801#define bfin_write_PIXC_AVSTART(val) bfin_write16(PIXC_AVSTART, val)
1802#define bfin_read_PIXC_AVEND() bfin_read16(PIXC_AVEND)
1803#define bfin_write_PIXC_AVEND(val) bfin_write16(PIXC_AVEND, val)
1804#define bfin_read_PIXC_ATRANSP() bfin_read16(PIXC_ATRANSP)
1805#define bfin_write_PIXC_ATRANSP(val) bfin_write16(PIXC_ATRANSP, val)
1806#define bfin_read_PIXC_BHSTART() bfin_read16(PIXC_BHSTART)
1807#define bfin_write_PIXC_BHSTART(val) bfin_write16(PIXC_BHSTART, val)
1808#define bfin_read_PIXC_BHEND() bfin_read16(PIXC_BHEND)
1809#define bfin_write_PIXC_BHEND(val) bfin_write16(PIXC_BHEND, val)
1810#define bfin_read_PIXC_BVSTART() bfin_read16(PIXC_BVSTART)
1811#define bfin_write_PIXC_BVSTART(val) bfin_write16(PIXC_BVSTART, val)
1812#define bfin_read_PIXC_BVEND() bfin_read16(PIXC_BVEND)
1813#define bfin_write_PIXC_BVEND(val) bfin_write16(PIXC_BVEND, val)
1814#define bfin_read_PIXC_BTRANSP() bfin_read16(PIXC_BTRANSP)
1815#define bfin_write_PIXC_BTRANSP(val) bfin_write16(PIXC_BTRANSP, val)
1816#define bfin_read_PIXC_INTRSTAT() bfin_read16(PIXC_INTRSTAT)
1817#define bfin_write_PIXC_INTRSTAT(val) bfin_write16(PIXC_INTRSTAT, val)
1818#define bfin_read_PIXC_RYCON() bfin_read32(PIXC_RYCON)
1819#define bfin_write_PIXC_RYCON(val) bfin_write32(PIXC_RYCON, val)
1820#define bfin_read_PIXC_GUCON() bfin_read32(PIXC_GUCON)
1821#define bfin_write_PIXC_GUCON(val) bfin_write32(PIXC_GUCON, val)
1822#define bfin_read_PIXC_BVCON() bfin_read32(PIXC_BVCON)
1823#define bfin_write_PIXC_BVCON(val) bfin_write32(PIXC_BVCON, val)
1824#define bfin_read_PIXC_CCBIAS() bfin_read32(PIXC_CCBIAS)
1825#define bfin_write_PIXC_CCBIAS(val) bfin_write32(PIXC_CCBIAS, val)
1826#define bfin_read_PIXC_TC() bfin_read32(PIXC_TC)
1827#define bfin_write_PIXC_TC(val) bfin_write32(PIXC_TC, val)
1828
1829/* Handshake MDMA 0 Registers */
1830
1831#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
1832#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
1833#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
1834#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
1835#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
1836#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
1837#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
1838#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
1839#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
1840#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
1841#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
1842#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
1843#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
1844#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
1845
1846/* Handshake MDMA 1 Registers */
1847
1848#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
1849#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
1850#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
1851#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
1852#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
1853#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
1854#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
1855#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
1856#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
1857#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
1858#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
1859#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
1860#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
1861#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
1862
1863#endif /* _CDEF_BF549_H */
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h
deleted file mode 100644
index 57ac8cb9b1f6..000000000000
--- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h
+++ /dev/null
@@ -1,2750 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/cdefBF54x_base.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF54X_H
32#define _CDEF_BF54X_H
33
34#include <asm/blackfin.h>
35
36#include "defBF54x_base.h"
37#include <asm/system.h>
38
39/* ************************************************************** */
40/* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */
41/* ************************************************************** */
42
43/* PLL Registers */
44
45#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
46/* Writing to PLL_CTL initiates a PLL relock sequence. */
47static __inline__ void bfin_write_PLL_CTL(unsigned int val)
48{
49 unsigned long flags, iwr0, iwr1, iwr2;
50
51 if (val == bfin_read_PLL_CTL())
52 return;
53
54 local_irq_save(flags);
55 /* Enable the PLL Wakeup bit in SIC IWR */
56 iwr0 = bfin_read32(SIC_IWR0);
57 iwr1 = bfin_read32(SIC_IWR1);
58 iwr2 = bfin_read32(SIC_IWR2);
59 /* Only allow PPL Wakeup) */
60 bfin_write32(SIC_IWR0, IWR_ENABLE(0));
61 bfin_write32(SIC_IWR1, 0);
62 bfin_write32(SIC_IWR2, 0);
63
64 bfin_write16(PLL_CTL, val);
65 SSYNC();
66 asm("IDLE;");
67
68 bfin_write32(SIC_IWR0, iwr0);
69 bfin_write32(SIC_IWR1, iwr1);
70 bfin_write32(SIC_IWR2, iwr2);
71 local_irq_restore(flags);
72}
73#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
74#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val)
75#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
76/* Writing to VR_CTL initiates a PLL relock sequence. */
77static __inline__ void bfin_write_VR_CTL(unsigned int val)
78{
79 unsigned long flags, iwr0, iwr1, iwr2;
80
81 if (val == bfin_read_VR_CTL())
82 return;
83
84 local_irq_save(flags);
85 /* Enable the PLL Wakeup bit in SIC IWR */
86 iwr0 = bfin_read32(SIC_IWR0);
87 iwr1 = bfin_read32(SIC_IWR1);
88 iwr2 = bfin_read32(SIC_IWR2);
89 /* Only allow PPL Wakeup) */
90 bfin_write32(SIC_IWR0, IWR_ENABLE(0));
91 bfin_write32(SIC_IWR1, 0);
92 bfin_write32(SIC_IWR2, 0);
93
94 bfin_write16(VR_CTL, val);
95 SSYNC();
96 asm("IDLE;");
97
98 bfin_write32(SIC_IWR0, iwr0);
99 bfin_write32(SIC_IWR1, iwr1);
100 bfin_write32(SIC_IWR2, iwr2);
101 local_irq_restore(flags);
102}
103#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
104#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val)
105#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
106#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT, val)
107
108/* Debug/MP/Emulation Registers (0xFFC00014 - 0xFFC00014) */
109
110#define bfin_read_CHIPID() bfin_read32(CHIPID)
111#define bfin_write_CHIPID(val) bfin_write32(CHIPID, val)
112
113/* System Reset and Interrubfin_read_()t Controller (0xFFC00100 - 0xFFC00104) */
114
115#define bfin_read_SWRST() bfin_read16(SWRST)
116#define bfin_write_SWRST(val) bfin_write16(SWRST, val)
117#define bfin_read_SYSCR() bfin_read16(SYSCR)
118#define bfin_write_SYSCR(val) bfin_write16(SYSCR, val)
119
120/* SIC Registers */
121
122#define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0)
123#define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0, val)
124#define bfin_read_SIC_IMASK1() bfin_read32(SIC_IMASK1)
125#define bfin_write_SIC_IMASK1(val) bfin_write32(SIC_IMASK1, val)
126#define bfin_read_SIC_IMASK2() bfin_read32(SIC_IMASK2)
127#define bfin_write_SIC_IMASK2(val) bfin_write32(SIC_IMASK2, val)
128#define bfin_read_SIC_IMASK(x) bfin_read32(SIC_IMASK0 + (x << 2))
129#define bfin_write_SIC_IMASK(x, val) bfin_write32((SIC_IMASK0 + (x << 2)), val)
130
131#define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0)
132#define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val)
133#define bfin_read_SIC_ISR1() bfin_read32(SIC_ISR1)
134#define bfin_write_SIC_ISR1(val) bfin_write32(SIC_ISR1, val)
135#define bfin_read_SIC_ISR2() bfin_read32(SIC_ISR2)
136#define bfin_write_SIC_ISR2(val) bfin_write32(SIC_ISR2, val)
137#define bfin_read_SIC_ISR(x) bfin_read32(SIC_ISR0 + (x << 2))
138#define bfin_write_SIC_ISR(x, val) bfin_write32((SIC_ISR0 + (x << 2)), val)
139
140#define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0)
141#define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val)
142#define bfin_read_SIC_IWR1() bfin_read32(SIC_IWR1)
143#define bfin_write_SIC_IWR1(val) bfin_write32(SIC_IWR1, val)
144#define bfin_read_SIC_IWR2() bfin_read32(SIC_IWR2)
145#define bfin_write_SIC_IWR2(val) bfin_write32(SIC_IWR2, val)
146#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
147#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0, val)
148#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
149#define bfin_write_SIC_IAR1(val) bfin_write32(SIC_IAR1, val)
150#define bfin_read_SIC_IAR2() bfin_read32(SIC_IAR2)
151#define bfin_write_SIC_IAR2(val) bfin_write32(SIC_IAR2, val)
152#define bfin_read_SIC_IAR3() bfin_read32(SIC_IAR3)
153#define bfin_write_SIC_IAR3(val) bfin_write32(SIC_IAR3, val)
154#define bfin_read_SIC_IAR4() bfin_read32(SIC_IAR4)
155#define bfin_write_SIC_IAR4(val) bfin_write32(SIC_IAR4, val)
156#define bfin_read_SIC_IAR5() bfin_read32(SIC_IAR5)
157#define bfin_write_SIC_IAR5(val) bfin_write32(SIC_IAR5, val)
158#define bfin_read_SIC_IAR6() bfin_read32(SIC_IAR6)
159#define bfin_write_SIC_IAR6(val) bfin_write32(SIC_IAR6, val)
160#define bfin_read_SIC_IAR7() bfin_read32(SIC_IAR7)
161#define bfin_write_SIC_IAR7(val) bfin_write32(SIC_IAR7, val)
162#define bfin_read_SIC_IAR8() bfin_read32(SIC_IAR8)
163#define bfin_write_SIC_IAR8(val) bfin_write32(SIC_IAR8, val)
164#define bfin_read_SIC_IAR9() bfin_read32(SIC_IAR9)
165#define bfin_write_SIC_IAR9(val) bfin_write32(SIC_IAR9, val)
166#define bfin_read_SIC_IAR10() bfin_read32(SIC_IAR10)
167#define bfin_write_SIC_IAR10(val) bfin_write32(SIC_IAR10, val)
168#define bfin_read_SIC_IAR11() bfin_read32(SIC_IAR11)
169#define bfin_write_SIC_IAR11(val) bfin_write32(SIC_IAR11, val)
170
171/* Watchdog Timer Registers */
172
173#define bfin_read_WDOG_CTL() bfin_read16(WDOG_CTL)
174#define bfin_write_WDOG_CTL(val) bfin_write16(WDOG_CTL, val)
175#define bfin_read_WDOG_CNT() bfin_read32(WDOG_CNT)
176#define bfin_write_WDOG_CNT(val) bfin_write32(WDOG_CNT, val)
177#define bfin_read_WDOG_STAT() bfin_read32(WDOG_STAT)
178#define bfin_write_WDOG_STAT(val) bfin_write32(WDOG_STAT, val)
179
180/* RTC Registers */
181
182#define bfin_read_RTC_STAT() bfin_read32(RTC_STAT)
183#define bfin_write_RTC_STAT(val) bfin_write32(RTC_STAT, val)
184#define bfin_read_RTC_ICTL() bfin_read16(RTC_ICTL)
185#define bfin_write_RTC_ICTL(val) bfin_write16(RTC_ICTL, val)
186#define bfin_read_RTC_ISTAT() bfin_read16(RTC_ISTAT)
187#define bfin_write_RTC_ISTAT(val) bfin_write16(RTC_ISTAT, val)
188#define bfin_read_RTC_SWCNT() bfin_read16(RTC_SWCNT)
189#define bfin_write_RTC_SWCNT(val) bfin_write16(RTC_SWCNT, val)
190#define bfin_read_RTC_ALARM() bfin_read32(RTC_ALARM)
191#define bfin_write_RTC_ALARM(val) bfin_write32(RTC_ALARM, val)
192#define bfin_read_RTC_PREN() bfin_read16(RTC_PREN)
193#define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN, val)
194
195/* UART0 Registers */
196
197#define bfin_read_UART0_DLL() bfin_read16(UART0_DLL)
198#define bfin_write_UART0_DLL(val) bfin_write16(UART0_DLL, val)
199#define bfin_read_UART0_DLH() bfin_read16(UART0_DLH)
200#define bfin_write_UART0_DLH(val) bfin_write16(UART0_DLH, val)
201#define bfin_read_UART0_GCTL() bfin_read16(UART0_GCTL)
202#define bfin_write_UART0_GCTL(val) bfin_write16(UART0_GCTL, val)
203#define bfin_read_UART0_LCR() bfin_read16(UART0_LCR)
204#define bfin_write_UART0_LCR(val) bfin_write16(UART0_LCR, val)
205#define bfin_read_UART0_MCR() bfin_read16(UART0_MCR)
206#define bfin_write_UART0_MCR(val) bfin_write16(UART0_MCR, val)
207#define bfin_read_UART0_LSR() bfin_read16(UART0_LSR)
208#define bfin_write_UART0_LSR(val) bfin_write16(UART0_LSR, val)
209#define bfin_read_UART0_MSR() bfin_read16(UART0_MSR)
210#define bfin_write_UART0_MSR(val) bfin_write16(UART0_MSR, val)
211#define bfin_read_UART0_SCR() bfin_read16(UART0_SCR)
212#define bfin_write_UART0_SCR(val) bfin_write16(UART0_SCR, val)
213#define bfin_read_UART0_IER_SET() bfin_read16(UART0_IER_SET)
214#define bfin_write_UART0_IER_SET(val) bfin_write16(UART0_IER_SET, val)
215#define bfin_read_UART0_IER_CLEAR() bfin_read16(UART0_IER_CLEAR)
216#define bfin_write_UART0_IER_CLEAR(val) bfin_write16(UART0_IER_CLEAR, val)
217#define bfin_read_UART0_THR() bfin_read16(UART0_THR)
218#define bfin_write_UART0_THR(val) bfin_write16(UART0_THR, val)
219#define bfin_read_UART0_RBR() bfin_read16(UART0_RBR)
220#define bfin_write_UART0_RBR(val) bfin_write16(UART0_RBR, val)
221
222/* SPI0 Registers */
223
224#define bfin_read_SPI0_CTL() bfin_read16(SPI0_CTL)
225#define bfin_write_SPI0_CTL(val) bfin_write16(SPI0_CTL, val)
226#define bfin_read_SPI0_FLG() bfin_read16(SPI0_FLG)
227#define bfin_write_SPI0_FLG(val) bfin_write16(SPI0_FLG, val)
228#define bfin_read_SPI0_STAT() bfin_read16(SPI0_STAT)
229#define bfin_write_SPI0_STAT(val) bfin_write16(SPI0_STAT, val)
230#define bfin_read_SPI0_TDBR() bfin_read16(SPI0_TDBR)
231#define bfin_write_SPI0_TDBR(val) bfin_write16(SPI0_TDBR, val)
232#define bfin_read_SPI0_RDBR() bfin_read16(SPI0_RDBR)
233#define bfin_write_SPI0_RDBR(val) bfin_write16(SPI0_RDBR, val)
234#define bfin_read_SPI0_BAUD() bfin_read16(SPI0_BAUD)
235#define bfin_write_SPI0_BAUD(val) bfin_write16(SPI0_BAUD, val)
236#define bfin_read_SPI0_SHADOW() bfin_read16(SPI0_SHADOW)
237#define bfin_write_SPI0_SHADOW(val) bfin_write16(SPI0_SHADOW, val)
238
239/* Timer Groubfin_read_() of 3 registers are not defined in the shared file because they are not available on the ADSP-BF542 processor */
240
241/* Two Wire Interface Registers (TWI0) */
242
243/* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */
244
245/* SPORT1 Registers */
246
247#define bfin_read_SPORT1_TCR1() bfin_read16(SPORT1_TCR1)
248#define bfin_write_SPORT1_TCR1(val) bfin_write16(SPORT1_TCR1, val)
249#define bfin_read_SPORT1_TCR2() bfin_read16(SPORT1_TCR2)
250#define bfin_write_SPORT1_TCR2(val) bfin_write16(SPORT1_TCR2, val)
251#define bfin_read_SPORT1_TCLKDIV() bfin_read16(SPORT1_TCLKDIV)
252#define bfin_write_SPORT1_TCLKDIV(val) bfin_write16(SPORT1_TCLKDIV, val)
253#define bfin_read_SPORT1_TFSDIV() bfin_read16(SPORT1_TFSDIV)
254#define bfin_write_SPORT1_TFSDIV(val) bfin_write16(SPORT1_TFSDIV, val)
255#define bfin_read_SPORT1_TX() bfin_read32(SPORT1_TX)
256#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX, val)
257#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
258#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX, val)
259#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
260#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1, val)
261#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
262#define bfin_write_SPORT1_RCR2(val) bfin_write16(SPORT1_RCR2, val)
263#define bfin_read_SPORT1_RCLKDIV() bfin_read16(SPORT1_RCLKDIV)
264#define bfin_write_SPORT1_RCLKDIV(val) bfin_write16(SPORT1_RCLKDIV, val)
265#define bfin_read_SPORT1_RFSDIV() bfin_read16(SPORT1_RFSDIV)
266#define bfin_write_SPORT1_RFSDIV(val) bfin_write16(SPORT1_RFSDIV, val)
267#define bfin_read_SPORT1_STAT() bfin_read16(SPORT1_STAT)
268#define bfin_write_SPORT1_STAT(val) bfin_write16(SPORT1_STAT, val)
269#define bfin_read_SPORT1_CHNL() bfin_read16(SPORT1_CHNL)
270#define bfin_write_SPORT1_CHNL(val) bfin_write16(SPORT1_CHNL, val)
271#define bfin_read_SPORT1_MCMC1() bfin_read16(SPORT1_MCMC1)
272#define bfin_write_SPORT1_MCMC1(val) bfin_write16(SPORT1_MCMC1, val)
273#define bfin_read_SPORT1_MCMC2() bfin_read16(SPORT1_MCMC2)
274#define bfin_write_SPORT1_MCMC2(val) bfin_write16(SPORT1_MCMC2, val)
275#define bfin_read_SPORT1_MTCS0() bfin_read32(SPORT1_MTCS0)
276#define bfin_write_SPORT1_MTCS0(val) bfin_write32(SPORT1_MTCS0, val)
277#define bfin_read_SPORT1_MTCS1() bfin_read32(SPORT1_MTCS1)
278#define bfin_write_SPORT1_MTCS1(val) bfin_write32(SPORT1_MTCS1, val)
279#define bfin_read_SPORT1_MTCS2() bfin_read32(SPORT1_MTCS2)
280#define bfin_write_SPORT1_MTCS2(val) bfin_write32(SPORT1_MTCS2, val)
281#define bfin_read_SPORT1_MTCS3() bfin_read32(SPORT1_MTCS3)
282#define bfin_write_SPORT1_MTCS3(val) bfin_write32(SPORT1_MTCS3, val)
283#define bfin_read_SPORT1_MRCS0() bfin_read32(SPORT1_MRCS0)
284#define bfin_write_SPORT1_MRCS0(val) bfin_write32(SPORT1_MRCS0, val)
285#define bfin_read_SPORT1_MRCS1() bfin_read32(SPORT1_MRCS1)
286#define bfin_write_SPORT1_MRCS1(val) bfin_write32(SPORT1_MRCS1, val)
287#define bfin_read_SPORT1_MRCS2() bfin_read32(SPORT1_MRCS2)
288#define bfin_write_SPORT1_MRCS2(val) bfin_write32(SPORT1_MRCS2, val)
289#define bfin_read_SPORT1_MRCS3() bfin_read32(SPORT1_MRCS3)
290#define bfin_write_SPORT1_MRCS3(val) bfin_write32(SPORT1_MRCS3, val)
291
292/* Asynchronous Memory Control Registers */
293
294#define bfin_read_EBIU_AMGCTL() bfin_read16(EBIU_AMGCTL)
295#define bfin_write_EBIU_AMGCTL(val) bfin_write16(EBIU_AMGCTL, val)
296#define bfin_read_EBIU_AMBCTL0() bfin_read32(EBIU_AMBCTL0)
297#define bfin_write_EBIU_AMBCTL0(val) bfin_write32(EBIU_AMBCTL0, val)
298#define bfin_read_EBIU_AMBCTL1() bfin_read32(EBIU_AMBCTL1)
299#define bfin_write_EBIU_AMBCTL1(val) bfin_write32(EBIU_AMBCTL1, val)
300#define bfin_read_EBIU_MBSCTL() bfin_read16(EBIU_MBSCTL)
301#define bfin_write_EBIU_MBSCTL(val) bfin_write16(EBIU_MBSCTL, val)
302#define bfin_read_EBIU_ARBSTAT() bfin_read32(EBIU_ARBSTAT)
303#define bfin_write_EBIU_ARBSTAT(val) bfin_write32(EBIU_ARBSTAT, val)
304#define bfin_read_EBIU_MODE() bfin_read32(EBIU_MODE)
305#define bfin_write_EBIU_MODE(val) bfin_write32(EBIU_MODE, val)
306#define bfin_read_EBIU_FCTL() bfin_read16(EBIU_FCTL)
307#define bfin_write_EBIU_FCTL(val) bfin_write16(EBIU_FCTL, val)
308
309/* DDR Memory Control Registers */
310
311#define bfin_read_EBIU_DDRCTL0() bfin_read32(EBIU_DDRCTL0)
312#define bfin_write_EBIU_DDRCTL0(val) bfin_write32(EBIU_DDRCTL0, val)
313#define bfin_read_EBIU_DDRCTL1() bfin_read32(EBIU_DDRCTL1)
314#define bfin_write_EBIU_DDRCTL1(val) bfin_write32(EBIU_DDRCTL1, val)
315#define bfin_read_EBIU_DDRCTL2() bfin_read32(EBIU_DDRCTL2)
316#define bfin_write_EBIU_DDRCTL2(val) bfin_write32(EBIU_DDRCTL2, val)
317#define bfin_read_EBIU_DDRCTL3() bfin_read32(EBIU_DDRCTL3)
318#define bfin_write_EBIU_DDRCTL3(val) bfin_write32(EBIU_DDRCTL3, val)
319#define bfin_read_EBIU_DDRQUE() bfin_read32(EBIU_DDRQUE)
320#define bfin_write_EBIU_DDRQUE(val) bfin_write32(EBIU_DDRQUE, val)
321#define bfin_read_EBIU_ERRADD() bfin_read32(EBIU_ERRADD)
322#define bfin_write_EBIU_ERRADD(val) bfin_write32(EBIU_ERRADD, val)
323#define bfin_read_EBIU_ERRMST() bfin_read16(EBIU_ERRMST)
324#define bfin_write_EBIU_ERRMST(val) bfin_write16(EBIU_ERRMST, val)
325#define bfin_read_EBIU_RSTCTL() bfin_read16(EBIU_RSTCTL)
326#define bfin_write_EBIU_RSTCTL(val) bfin_write16(EBIU_RSTCTL, val)
327
328/* DDR BankRead and Write Count Registers */
329
330#define bfin_read_EBIU_DDRBRC0() bfin_read32(EBIU_DDRBRC0)
331#define bfin_write_EBIU_DDRBRC0(val) bfin_write32(EBIU_DDRBRC0, val)
332#define bfin_read_EBIU_DDRBRC1() bfin_read32(EBIU_DDRBRC1)
333#define bfin_write_EBIU_DDRBRC1(val) bfin_write32(EBIU_DDRBRC1, val)
334#define bfin_read_EBIU_DDRBRC2() bfin_read32(EBIU_DDRBRC2)
335#define bfin_write_EBIU_DDRBRC2(val) bfin_write32(EBIU_DDRBRC2, val)
336#define bfin_read_EBIU_DDRBRC3() bfin_read32(EBIU_DDRBRC3)
337#define bfin_write_EBIU_DDRBRC3(val) bfin_write32(EBIU_DDRBRC3, val)
338#define bfin_read_EBIU_DDRBRC4() bfin_read32(EBIU_DDRBRC4)
339#define bfin_write_EBIU_DDRBRC4(val) bfin_write32(EBIU_DDRBRC4, val)
340#define bfin_read_EBIU_DDRBRC5() bfin_read32(EBIU_DDRBRC5)
341#define bfin_write_EBIU_DDRBRC5(val) bfin_write32(EBIU_DDRBRC5, val)
342#define bfin_read_EBIU_DDRBRC6() bfin_read32(EBIU_DDRBRC6)
343#define bfin_write_EBIU_DDRBRC6(val) bfin_write32(EBIU_DDRBRC6, val)
344#define bfin_read_EBIU_DDRBRC7() bfin_read32(EBIU_DDRBRC7)
345#define bfin_write_EBIU_DDRBRC7(val) bfin_write32(EBIU_DDRBRC7, val)
346#define bfin_read_EBIU_DDRBWC0() bfin_read32(EBIU_DDRBWC0)
347#define bfin_write_EBIU_DDRBWC0(val) bfin_write32(EBIU_DDRBWC0, val)
348#define bfin_read_EBIU_DDRBWC1() bfin_read32(EBIU_DDRBWC1)
349#define bfin_write_EBIU_DDRBWC1(val) bfin_write32(EBIU_DDRBWC1, val)
350#define bfin_read_EBIU_DDRBWC2() bfin_read32(EBIU_DDRBWC2)
351#define bfin_write_EBIU_DDRBWC2(val) bfin_write32(EBIU_DDRBWC2, val)
352#define bfin_read_EBIU_DDRBWC3() bfin_read32(EBIU_DDRBWC3)
353#define bfin_write_EBIU_DDRBWC3(val) bfin_write32(EBIU_DDRBWC3, val)
354#define bfin_read_EBIU_DDRBWC4() bfin_read32(EBIU_DDRBWC4)
355#define bfin_write_EBIU_DDRBWC4(val) bfin_write32(EBIU_DDRBWC4, val)
356#define bfin_read_EBIU_DDRBWC5() bfin_read32(EBIU_DDRBWC5)
357#define bfin_write_EBIU_DDRBWC5(val) bfin_write32(EBIU_DDRBWC5, val)
358#define bfin_read_EBIU_DDRBWC6() bfin_read32(EBIU_DDRBWC6)
359#define bfin_write_EBIU_DDRBWC6(val) bfin_write32(EBIU_DDRBWC6, val)
360#define bfin_read_EBIU_DDRBWC7() bfin_read32(EBIU_DDRBWC7)
361#define bfin_write_EBIU_DDRBWC7(val) bfin_write32(EBIU_DDRBWC7, val)
362#define bfin_read_EBIU_DDRACCT() bfin_read32(EBIU_DDRACCT)
363#define bfin_write_EBIU_DDRACCT(val) bfin_write32(EBIU_DDRACCT, val)
364#define bfin_read_EBIU_DDRTACT() bfin_read32(EBIU_DDRTACT)
365#define bfin_write_EBIU_DDRTACT(val) bfin_write32(EBIU_DDRTACT, val)
366#define bfin_read_EBIU_DDRARCT() bfin_read32(EBIU_DDRARCT)
367#define bfin_write_EBIU_DDRARCT(val) bfin_write32(EBIU_DDRARCT, val)
368#define bfin_read_EBIU_DDRGC0() bfin_read32(EBIU_DDRGC0)
369#define bfin_write_EBIU_DDRGC0(val) bfin_write32(EBIU_DDRGC0, val)
370#define bfin_read_EBIU_DDRGC1() bfin_read32(EBIU_DDRGC1)
371#define bfin_write_EBIU_DDRGC1(val) bfin_write32(EBIU_DDRGC1, val)
372#define bfin_read_EBIU_DDRGC2() bfin_read32(EBIU_DDRGC2)
373#define bfin_write_EBIU_DDRGC2(val) bfin_write32(EBIU_DDRGC2, val)
374#define bfin_read_EBIU_DDRGC3() bfin_read32(EBIU_DDRGC3)
375#define bfin_write_EBIU_DDRGC3(val) bfin_write32(EBIU_DDRGC3, val)
376#define bfin_read_EBIU_DDRMCEN() bfin_read32(EBIU_DDRMCEN)
377#define bfin_write_EBIU_DDRMCEN(val) bfin_write32(EBIU_DDRMCEN, val)
378#define bfin_read_EBIU_DDRMCCL() bfin_read32(EBIU_DDRMCCL)
379#define bfin_write_EBIU_DDRMCCL(val) bfin_write32(EBIU_DDRMCCL, val)
380
381/* DMAC0 Registers */
382
383#define bfin_read_DMAC0_TCPER() bfin_read16(DMAC0_TCPER)
384#define bfin_write_DMAC0_TCPER(val) bfin_write16(DMAC0_TCPER, val)
385#define bfin_read_DMAC0_TCCNT() bfin_read16(DMAC0_TCCNT)
386#define bfin_write_DMAC0_TCCNT(val) bfin_write16(DMAC0_TCCNT, val)
387
388/* DMA Channel 0 Registers */
389
390#define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR)
391#define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR, val)
392#define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR)
393#define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR, val)
394#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
395#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG, val)
396#define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT)
397#define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT, val)
398#define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY)
399#define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY, val)
400#define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT)
401#define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT, val)
402#define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY)
403#define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY, val)
404#define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR)
405#define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR, val)
406#define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR)
407#define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR, val)
408#define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS)
409#define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS, val)
410#define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP)
411#define bfin_write_DMA0_PERIPHERAL_MAP(val) bfin_write16(DMA0_PERIPHERAL_MAP, val)
412#define bfin_read_DMA0_CURR_X_COUNT() bfin_read16(DMA0_CURR_X_COUNT)
413#define bfin_write_DMA0_CURR_X_COUNT(val) bfin_write16(DMA0_CURR_X_COUNT, val)
414#define bfin_read_DMA0_CURR_Y_COUNT() bfin_read16(DMA0_CURR_Y_COUNT)
415#define bfin_write_DMA0_CURR_Y_COUNT(val) bfin_write16(DMA0_CURR_Y_COUNT, val)
416
417/* DMA Channel 1 Registers */
418
419#define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR)
420#define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR, val)
421#define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR)
422#define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR, val)
423#define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG)
424#define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG, val)
425#define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT)
426#define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT, val)
427#define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY)
428#define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY, val)
429#define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT)
430#define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT, val)
431#define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY)
432#define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY, val)
433#define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR)
434#define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR, val)
435#define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR)
436#define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR, val)
437#define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS)
438#define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS, val)
439#define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP)
440#define bfin_write_DMA1_PERIPHERAL_MAP(val) bfin_write16(DMA1_PERIPHERAL_MAP, val)
441#define bfin_read_DMA1_CURR_X_COUNT() bfin_read16(DMA1_CURR_X_COUNT)
442#define bfin_write_DMA1_CURR_X_COUNT(val) bfin_write16(DMA1_CURR_X_COUNT, val)
443#define bfin_read_DMA1_CURR_Y_COUNT() bfin_read16(DMA1_CURR_Y_COUNT)
444#define bfin_write_DMA1_CURR_Y_COUNT(val) bfin_write16(DMA1_CURR_Y_COUNT, val)
445
446/* DMA Channel 2 Registers */
447
448#define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR)
449#define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR, val)
450#define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR)
451#define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR, val)
452#define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG)
453#define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG, val)
454#define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT)
455#define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT, val)
456#define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY)
457#define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY, val)
458#define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT)
459#define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT, val)
460#define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY)
461#define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY, val)
462#define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR)
463#define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR, val)
464#define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR)
465#define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR, val)
466#define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS)
467#define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS, val)
468#define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP)
469#define bfin_write_DMA2_PERIPHERAL_MAP(val) bfin_write16(DMA2_PERIPHERAL_MAP, val)
470#define bfin_read_DMA2_CURR_X_COUNT() bfin_read16(DMA2_CURR_X_COUNT)
471#define bfin_write_DMA2_CURR_X_COUNT(val) bfin_write16(DMA2_CURR_X_COUNT, val)
472#define bfin_read_DMA2_CURR_Y_COUNT() bfin_read16(DMA2_CURR_Y_COUNT)
473#define bfin_write_DMA2_CURR_Y_COUNT(val) bfin_write16(DMA2_CURR_Y_COUNT, val)
474
475/* DMA Channel 3 Registers */
476
477#define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR)
478#define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR, val)
479#define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR)
480#define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR, val)
481#define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG)
482#define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG, val)
483#define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT)
484#define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT, val)
485#define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY)
486#define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY, val)
487#define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT)
488#define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT, val)
489#define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY)
490#define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY, val)
491#define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR)
492#define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR, val)
493#define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR)
494#define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR, val)
495#define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS)
496#define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS, val)
497#define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP)
498#define bfin_write_DMA3_PERIPHERAL_MAP(val) bfin_write16(DMA3_PERIPHERAL_MAP, val)
499#define bfin_read_DMA3_CURR_X_COUNT() bfin_read16(DMA3_CURR_X_COUNT)
500#define bfin_write_DMA3_CURR_X_COUNT(val) bfin_write16(DMA3_CURR_X_COUNT, val)
501#define bfin_read_DMA3_CURR_Y_COUNT() bfin_read16(DMA3_CURR_Y_COUNT)
502#define bfin_write_DMA3_CURR_Y_COUNT(val) bfin_write16(DMA3_CURR_Y_COUNT, val)
503
504/* DMA Channel 4 Registers */
505
506#define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR)
507#define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR, val)
508#define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR)
509#define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR, val)
510#define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG)
511#define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG, val)
512#define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT)
513#define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT, val)
514#define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY)
515#define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY, val)
516#define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT)
517#define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT, val)
518#define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY)
519#define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY, val)
520#define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR)
521#define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR, val)
522#define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR)
523#define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR, val)
524#define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS)
525#define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS, val)
526#define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP)
527#define bfin_write_DMA4_PERIPHERAL_MAP(val) bfin_write16(DMA4_PERIPHERAL_MAP, val)
528#define bfin_read_DMA4_CURR_X_COUNT() bfin_read16(DMA4_CURR_X_COUNT)
529#define bfin_write_DMA4_CURR_X_COUNT(val) bfin_write16(DMA4_CURR_X_COUNT, val)
530#define bfin_read_DMA4_CURR_Y_COUNT() bfin_read16(DMA4_CURR_Y_COUNT)
531#define bfin_write_DMA4_CURR_Y_COUNT(val) bfin_write16(DMA4_CURR_Y_COUNT, val)
532
533/* DMA Channel 5 Registers */
534
535#define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR)
536#define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR, val)
537#define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR)
538#define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR, val)
539#define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG)
540#define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG, val)
541#define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT)
542#define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT, val)
543#define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY)
544#define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY, val)
545#define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT)
546#define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT, val)
547#define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY)
548#define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY, val)
549#define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR)
550#define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR, val)
551#define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR)
552#define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR, val)
553#define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS)
554#define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS, val)
555#define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP)
556#define bfin_write_DMA5_PERIPHERAL_MAP(val) bfin_write16(DMA5_PERIPHERAL_MAP, val)
557#define bfin_read_DMA5_CURR_X_COUNT() bfin_read16(DMA5_CURR_X_COUNT)
558#define bfin_write_DMA5_CURR_X_COUNT(val) bfin_write16(DMA5_CURR_X_COUNT, val)
559#define bfin_read_DMA5_CURR_Y_COUNT() bfin_read16(DMA5_CURR_Y_COUNT)
560#define bfin_write_DMA5_CURR_Y_COUNT(val) bfin_write16(DMA5_CURR_Y_COUNT, val)
561
562/* DMA Channel 6 Registers */
563
564#define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR)
565#define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR, val)
566#define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR)
567#define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR, val)
568#define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG)
569#define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG, val)
570#define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT)
571#define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT, val)
572#define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY)
573#define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY, val)
574#define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT)
575#define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT, val)
576#define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY)
577#define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY, val)
578#define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR)
579#define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR, val)
580#define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR)
581#define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR, val)
582#define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS)
583#define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS, val)
584#define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP)
585#define bfin_write_DMA6_PERIPHERAL_MAP(val) bfin_write16(DMA6_PERIPHERAL_MAP, val)
586#define bfin_read_DMA6_CURR_X_COUNT() bfin_read16(DMA6_CURR_X_COUNT)
587#define bfin_write_DMA6_CURR_X_COUNT(val) bfin_write16(DMA6_CURR_X_COUNT, val)
588#define bfin_read_DMA6_CURR_Y_COUNT() bfin_read16(DMA6_CURR_Y_COUNT)
589#define bfin_write_DMA6_CURR_Y_COUNT(val) bfin_write16(DMA6_CURR_Y_COUNT, val)
590
591/* DMA Channel 7 Registers */
592
593#define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR)
594#define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR, val)
595#define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR)
596#define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR, val)
597#define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG)
598#define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG, val)
599#define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT)
600#define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT, val)
601#define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY)
602#define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY, val)
603#define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT)
604#define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT, val)
605#define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY)
606#define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY, val)
607#define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR)
608#define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR, val)
609#define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR)
610#define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR, val)
611#define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS)
612#define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS, val)
613#define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP)
614#define bfin_write_DMA7_PERIPHERAL_MAP(val) bfin_write16(DMA7_PERIPHERAL_MAP, val)
615#define bfin_read_DMA7_CURR_X_COUNT() bfin_read16(DMA7_CURR_X_COUNT)
616#define bfin_write_DMA7_CURR_X_COUNT(val) bfin_write16(DMA7_CURR_X_COUNT, val)
617#define bfin_read_DMA7_CURR_Y_COUNT() bfin_read16(DMA7_CURR_Y_COUNT)
618#define bfin_write_DMA7_CURR_Y_COUNT(val) bfin_write16(DMA7_CURR_Y_COUNT, val)
619
620/* DMA Channel 8 Registers */
621
622#define bfin_read_DMA8_NEXT_DESC_PTR() bfin_read32(DMA8_NEXT_DESC_PTR)
623#define bfin_write_DMA8_NEXT_DESC_PTR(val) bfin_write32(DMA8_NEXT_DESC_PTR, val)
624#define bfin_read_DMA8_START_ADDR() bfin_read32(DMA8_START_ADDR)
625#define bfin_write_DMA8_START_ADDR(val) bfin_write32(DMA8_START_ADDR, val)
626#define bfin_read_DMA8_CONFIG() bfin_read16(DMA8_CONFIG)
627#define bfin_write_DMA8_CONFIG(val) bfin_write16(DMA8_CONFIG, val)
628#define bfin_read_DMA8_X_COUNT() bfin_read16(DMA8_X_COUNT)
629#define bfin_write_DMA8_X_COUNT(val) bfin_write16(DMA8_X_COUNT, val)
630#define bfin_read_DMA8_X_MODIFY() bfin_read16(DMA8_X_MODIFY)
631#define bfin_write_DMA8_X_MODIFY(val) bfin_write16(DMA8_X_MODIFY, val)
632#define bfin_read_DMA8_Y_COUNT() bfin_read16(DMA8_Y_COUNT)
633#define bfin_write_DMA8_Y_COUNT(val) bfin_write16(DMA8_Y_COUNT, val)
634#define bfin_read_DMA8_Y_MODIFY() bfin_read16(DMA8_Y_MODIFY)
635#define bfin_write_DMA8_Y_MODIFY(val) bfin_write16(DMA8_Y_MODIFY, val)
636#define bfin_read_DMA8_CURR_DESC_PTR() bfin_read32(DMA8_CURR_DESC_PTR)
637#define bfin_write_DMA8_CURR_DESC_PTR(val) bfin_write32(DMA8_CURR_DESC_PTR, val)
638#define bfin_read_DMA8_CURR_ADDR() bfin_read32(DMA8_CURR_ADDR)
639#define bfin_write_DMA8_CURR_ADDR(val) bfin_write32(DMA8_CURR_ADDR, val)
640#define bfin_read_DMA8_IRQ_STATUS() bfin_read16(DMA8_IRQ_STATUS)
641#define bfin_write_DMA8_IRQ_STATUS(val) bfin_write16(DMA8_IRQ_STATUS, val)
642#define bfin_read_DMA8_PERIPHERAL_MAP() bfin_read16(DMA8_PERIPHERAL_MAP)
643#define bfin_write_DMA8_PERIPHERAL_MAP(val) bfin_write16(DMA8_PERIPHERAL_MAP, val)
644#define bfin_read_DMA8_CURR_X_COUNT() bfin_read16(DMA8_CURR_X_COUNT)
645#define bfin_write_DMA8_CURR_X_COUNT(val) bfin_write16(DMA8_CURR_X_COUNT, val)
646#define bfin_read_DMA8_CURR_Y_COUNT() bfin_read16(DMA8_CURR_Y_COUNT)
647#define bfin_write_DMA8_CURR_Y_COUNT(val) bfin_write16(DMA8_CURR_Y_COUNT, val)
648
649/* DMA Channel 9 Registers */
650
651#define bfin_read_DMA9_NEXT_DESC_PTR() bfin_read32(DMA9_NEXT_DESC_PTR)
652#define bfin_write_DMA9_NEXT_DESC_PTR(val) bfin_write32(DMA9_NEXT_DESC_PTR, val)
653#define bfin_read_DMA9_START_ADDR() bfin_read32(DMA9_START_ADDR)
654#define bfin_write_DMA9_START_ADDR(val) bfin_write32(DMA9_START_ADDR, val)
655#define bfin_read_DMA9_CONFIG() bfin_read16(DMA9_CONFIG)
656#define bfin_write_DMA9_CONFIG(val) bfin_write16(DMA9_CONFIG, val)
657#define bfin_read_DMA9_X_COUNT() bfin_read16(DMA9_X_COUNT)
658#define bfin_write_DMA9_X_COUNT(val) bfin_write16(DMA9_X_COUNT, val)
659#define bfin_read_DMA9_X_MODIFY() bfin_read16(DMA9_X_MODIFY)
660#define bfin_write_DMA9_X_MODIFY(val) bfin_write16(DMA9_X_MODIFY, val)
661#define bfin_read_DMA9_Y_COUNT() bfin_read16(DMA9_Y_COUNT)
662#define bfin_write_DMA9_Y_COUNT(val) bfin_write16(DMA9_Y_COUNT, val)
663#define bfin_read_DMA9_Y_MODIFY() bfin_read16(DMA9_Y_MODIFY)
664#define bfin_write_DMA9_Y_MODIFY(val) bfin_write16(DMA9_Y_MODIFY, val)
665#define bfin_read_DMA9_CURR_DESC_PTR() bfin_read32(DMA9_CURR_DESC_PTR)
666#define bfin_write_DMA9_CURR_DESC_PTR(val) bfin_write32(DMA9_CURR_DESC_PTR, val)
667#define bfin_read_DMA9_CURR_ADDR() bfin_read32(DMA9_CURR_ADDR)
668#define bfin_write_DMA9_CURR_ADDR(val) bfin_write32(DMA9_CURR_ADDR, val)
669#define bfin_read_DMA9_IRQ_STATUS() bfin_read16(DMA9_IRQ_STATUS)
670#define bfin_write_DMA9_IRQ_STATUS(val) bfin_write16(DMA9_IRQ_STATUS, val)
671#define bfin_read_DMA9_PERIPHERAL_MAP() bfin_read16(DMA9_PERIPHERAL_MAP)
672#define bfin_write_DMA9_PERIPHERAL_MAP(val) bfin_write16(DMA9_PERIPHERAL_MAP, val)
673#define bfin_read_DMA9_CURR_X_COUNT() bfin_read16(DMA9_CURR_X_COUNT)
674#define bfin_write_DMA9_CURR_X_COUNT(val) bfin_write16(DMA9_CURR_X_COUNT, val)
675#define bfin_read_DMA9_CURR_Y_COUNT() bfin_read16(DMA9_CURR_Y_COUNT)
676#define bfin_write_DMA9_CURR_Y_COUNT(val) bfin_write16(DMA9_CURR_Y_COUNT, val)
677
678/* DMA Channel 10 Registers */
679
680#define bfin_read_DMA10_NEXT_DESC_PTR() bfin_read32(DMA10_NEXT_DESC_PTR)
681#define bfin_write_DMA10_NEXT_DESC_PTR(val) bfin_write32(DMA10_NEXT_DESC_PTR, val)
682#define bfin_read_DMA10_START_ADDR() bfin_read32(DMA10_START_ADDR)
683#define bfin_write_DMA10_START_ADDR(val) bfin_write32(DMA10_START_ADDR, val)
684#define bfin_read_DMA10_CONFIG() bfin_read16(DMA10_CONFIG)
685#define bfin_write_DMA10_CONFIG(val) bfin_write16(DMA10_CONFIG, val)
686#define bfin_read_DMA10_X_COUNT() bfin_read16(DMA10_X_COUNT)
687#define bfin_write_DMA10_X_COUNT(val) bfin_write16(DMA10_X_COUNT, val)
688#define bfin_read_DMA10_X_MODIFY() bfin_read16(DMA10_X_MODIFY)
689#define bfin_write_DMA10_X_MODIFY(val) bfin_write16(DMA10_X_MODIFY, val)
690#define bfin_read_DMA10_Y_COUNT() bfin_read16(DMA10_Y_COUNT)
691#define bfin_write_DMA10_Y_COUNT(val) bfin_write16(DMA10_Y_COUNT, val)
692#define bfin_read_DMA10_Y_MODIFY() bfin_read16(DMA10_Y_MODIFY)
693#define bfin_write_DMA10_Y_MODIFY(val) bfin_write16(DMA10_Y_MODIFY, val)
694#define bfin_read_DMA10_CURR_DESC_PTR() bfin_read32(DMA10_CURR_DESC_PTR)
695#define bfin_write_DMA10_CURR_DESC_PTR(val) bfin_write32(DMA10_CURR_DESC_PTR, val)
696#define bfin_read_DMA10_CURR_ADDR() bfin_read32(DMA10_CURR_ADDR)
697#define bfin_write_DMA10_CURR_ADDR(val) bfin_write32(DMA10_CURR_ADDR, val)
698#define bfin_read_DMA10_IRQ_STATUS() bfin_read16(DMA10_IRQ_STATUS)
699#define bfin_write_DMA10_IRQ_STATUS(val) bfin_write16(DMA10_IRQ_STATUS, val)
700#define bfin_read_DMA10_PERIPHERAL_MAP() bfin_read16(DMA10_PERIPHERAL_MAP)
701#define bfin_write_DMA10_PERIPHERAL_MAP(val) bfin_write16(DMA10_PERIPHERAL_MAP, val)
702#define bfin_read_DMA10_CURR_X_COUNT() bfin_read16(DMA10_CURR_X_COUNT)
703#define bfin_write_DMA10_CURR_X_COUNT(val) bfin_write16(DMA10_CURR_X_COUNT, val)
704#define bfin_read_DMA10_CURR_Y_COUNT() bfin_read16(DMA10_CURR_Y_COUNT)
705#define bfin_write_DMA10_CURR_Y_COUNT(val) bfin_write16(DMA10_CURR_Y_COUNT, val)
706
707/* DMA Channel 11 Registers */
708
709#define bfin_read_DMA11_NEXT_DESC_PTR() bfin_read32(DMA11_NEXT_DESC_PTR)
710#define bfin_write_DMA11_NEXT_DESC_PTR(val) bfin_write32(DMA11_NEXT_DESC_PTR, val)
711#define bfin_read_DMA11_START_ADDR() bfin_read32(DMA11_START_ADDR)
712#define bfin_write_DMA11_START_ADDR(val) bfin_write32(DMA11_START_ADDR, val)
713#define bfin_read_DMA11_CONFIG() bfin_read16(DMA11_CONFIG)
714#define bfin_write_DMA11_CONFIG(val) bfin_write16(DMA11_CONFIG, val)
715#define bfin_read_DMA11_X_COUNT() bfin_read16(DMA11_X_COUNT)
716#define bfin_write_DMA11_X_COUNT(val) bfin_write16(DMA11_X_COUNT, val)
717#define bfin_read_DMA11_X_MODIFY() bfin_read16(DMA11_X_MODIFY)
718#define bfin_write_DMA11_X_MODIFY(val) bfin_write16(DMA11_X_MODIFY, val)
719#define bfin_read_DMA11_Y_COUNT() bfin_read16(DMA11_Y_COUNT)
720#define bfin_write_DMA11_Y_COUNT(val) bfin_write16(DMA11_Y_COUNT, val)
721#define bfin_read_DMA11_Y_MODIFY() bfin_read16(DMA11_Y_MODIFY)
722#define bfin_write_DMA11_Y_MODIFY(val) bfin_write16(DMA11_Y_MODIFY, val)
723#define bfin_read_DMA11_CURR_DESC_PTR() bfin_read32(DMA11_CURR_DESC_PTR)
724#define bfin_write_DMA11_CURR_DESC_PTR(val) bfin_write32(DMA11_CURR_DESC_PTR, val)
725#define bfin_read_DMA11_CURR_ADDR() bfin_read32(DMA11_CURR_ADDR)
726#define bfin_write_DMA11_CURR_ADDR(val) bfin_write32(DMA11_CURR_ADDR, val)
727#define bfin_read_DMA11_IRQ_STATUS() bfin_read16(DMA11_IRQ_STATUS)
728#define bfin_write_DMA11_IRQ_STATUS(val) bfin_write16(DMA11_IRQ_STATUS, val)
729#define bfin_read_DMA11_PERIPHERAL_MAP() bfin_read16(DMA11_PERIPHERAL_MAP)
730#define bfin_write_DMA11_PERIPHERAL_MAP(val) bfin_write16(DMA11_PERIPHERAL_MAP, val)
731#define bfin_read_DMA11_CURR_X_COUNT() bfin_read16(DMA11_CURR_X_COUNT)
732#define bfin_write_DMA11_CURR_X_COUNT(val) bfin_write16(DMA11_CURR_X_COUNT, val)
733#define bfin_read_DMA11_CURR_Y_COUNT() bfin_read16(DMA11_CURR_Y_COUNT)
734#define bfin_write_DMA11_CURR_Y_COUNT(val) bfin_write16(DMA11_CURR_Y_COUNT, val)
735
736/* MDMA Stream 0 Registers */
737
738#define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR)
739#define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR, val)
740#define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR)
741#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR, val)
742#define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG)
743#define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG, val)
744#define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT)
745#define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT, val)
746#define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY)
747#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY, val)
748#define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT)
749#define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT, val)
750#define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY)
751#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY, val)
752#define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR)
753#define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR, val)
754#define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR)
755#define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR, val)
756#define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS)
757#define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS, val)
758#define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP)
759#define bfin_write_MDMA_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA_D0_PERIPHERAL_MAP, val)
760#define bfin_read_MDMA_D0_CURR_X_COUNT() bfin_read16(MDMA_D0_CURR_X_COUNT)
761#define bfin_write_MDMA_D0_CURR_X_COUNT(val) bfin_write16(MDMA_D0_CURR_X_COUNT, val)
762#define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT)
763#define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT, val)
764#define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR)
765#define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR, val)
766#define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR)
767#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR, val)
768#define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG)
769#define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG, val)
770#define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT)
771#define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT, val)
772#define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY)
773#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY, val)
774#define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT)
775#define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT, val)
776#define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY)
777#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY, val)
778#define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR)
779#define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR, val)
780#define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR)
781#define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR, val)
782#define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS)
783#define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS, val)
784#define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP)
785#define bfin_write_MDMA_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA_S0_PERIPHERAL_MAP, val)
786#define bfin_read_MDMA_S0_CURR_X_COUNT() bfin_read16(MDMA_S0_CURR_X_COUNT)
787#define bfin_write_MDMA_S0_CURR_X_COUNT(val) bfin_write16(MDMA_S0_CURR_X_COUNT, val)
788#define bfin_read_MDMA_S0_CURR_Y_COUNT() bfin_read16(MDMA_S0_CURR_Y_COUNT)
789#define bfin_write_MDMA_S0_CURR_Y_COUNT(val) bfin_write16(MDMA_S0_CURR_Y_COUNT, val)
790
791/* MDMA Stream 1 Registers */
792
793#define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR)
794#define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR, val)
795#define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR)
796#define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR, val)
797#define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG)
798#define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG, val)
799#define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT)
800#define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT, val)
801#define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY)
802#define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY, val)
803#define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT)
804#define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT, val)
805#define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY)
806#define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY, val)
807#define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR)
808#define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR, val)
809#define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR)
810#define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR, val)
811#define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS)
812#define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS, val)
813#define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP)
814#define bfin_write_MDMA_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA_D1_PERIPHERAL_MAP, val)
815#define bfin_read_MDMA_D1_CURR_X_COUNT() bfin_read16(MDMA_D1_CURR_X_COUNT)
816#define bfin_write_MDMA_D1_CURR_X_COUNT(val) bfin_write16(MDMA_D1_CURR_X_COUNT, val)
817#define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT)
818#define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT, val)
819#define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR)
820#define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR, val)
821#define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR)
822#define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR, val)
823#define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG)
824#define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG, val)
825#define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT)
826#define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT, val)
827#define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY)
828#define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY, val)
829#define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT)
830#define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT, val)
831#define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY)
832#define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY, val)
833#define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR)
834#define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR, val)
835#define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR)
836#define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR, val)
837#define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS)
838#define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS, val)
839#define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP)
840#define bfin_write_MDMA_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA_S1_PERIPHERAL_MAP, val)
841#define bfin_read_MDMA_S1_CURR_X_COUNT() bfin_read16(MDMA_S1_CURR_X_COUNT)
842#define bfin_write_MDMA_S1_CURR_X_COUNT(val) bfin_write16(MDMA_S1_CURR_X_COUNT, val)
843#define bfin_read_MDMA_S1_CURR_Y_COUNT() bfin_read16(MDMA_S1_CURR_Y_COUNT)
844#define bfin_write_MDMA_S1_CURR_Y_COUNT(val) bfin_write16(MDMA_S1_CURR_Y_COUNT, val)
845
846/* EPPI1 Registers */
847
848#define bfin_read_EPPI1_STATUS() bfin_read16(EPPI1_STATUS)
849#define bfin_write_EPPI1_STATUS(val) bfin_write16(EPPI1_STATUS, val)
850#define bfin_read_EPPI1_HCOUNT() bfin_read16(EPPI1_HCOUNT)
851#define bfin_write_EPPI1_HCOUNT(val) bfin_write16(EPPI1_HCOUNT, val)
852#define bfin_read_EPPI1_HDELAY() bfin_read16(EPPI1_HDELAY)
853#define bfin_write_EPPI1_HDELAY(val) bfin_write16(EPPI1_HDELAY, val)
854#define bfin_read_EPPI1_VCOUNT() bfin_read16(EPPI1_VCOUNT)
855#define bfin_write_EPPI1_VCOUNT(val) bfin_write16(EPPI1_VCOUNT, val)
856#define bfin_read_EPPI1_VDELAY() bfin_read16(EPPI1_VDELAY)
857#define bfin_write_EPPI1_VDELAY(val) bfin_write16(EPPI1_VDELAY, val)
858#define bfin_read_EPPI1_FRAME() bfin_read16(EPPI1_FRAME)
859#define bfin_write_EPPI1_FRAME(val) bfin_write16(EPPI1_FRAME, val)
860#define bfin_read_EPPI1_LINE() bfin_read16(EPPI1_LINE)
861#define bfin_write_EPPI1_LINE(val) bfin_write16(EPPI1_LINE, val)
862#define bfin_read_EPPI1_CLKDIV() bfin_read16(EPPI1_CLKDIV)
863#define bfin_write_EPPI1_CLKDIV(val) bfin_write16(EPPI1_CLKDIV, val)
864#define bfin_read_EPPI1_CONTROL() bfin_read32(EPPI1_CONTROL)
865#define bfin_write_EPPI1_CONTROL(val) bfin_write32(EPPI1_CONTROL, val)
866#define bfin_read_EPPI1_FS1W_HBL() bfin_read32(EPPI1_FS1W_HBL)
867#define bfin_write_EPPI1_FS1W_HBL(val) bfin_write32(EPPI1_FS1W_HBL, val)
868#define bfin_read_EPPI1_FS1P_AVPL() bfin_read32(EPPI1_FS1P_AVPL)
869#define bfin_write_EPPI1_FS1P_AVPL(val) bfin_write32(EPPI1_FS1P_AVPL, val)
870#define bfin_read_EPPI1_FS2W_LVB() bfin_read32(EPPI1_FS2W_LVB)
871#define bfin_write_EPPI1_FS2W_LVB(val) bfin_write32(EPPI1_FS2W_LVB, val)
872#define bfin_read_EPPI1_FS2P_LAVF() bfin_read32(EPPI1_FS2P_LAVF)
873#define bfin_write_EPPI1_FS2P_LAVF(val) bfin_write32(EPPI1_FS2P_LAVF, val)
874#define bfin_read_EPPI1_CLIP() bfin_read32(EPPI1_CLIP)
875#define bfin_write_EPPI1_CLIP(val) bfin_write32(EPPI1_CLIP, val)
876
877/* Port Interrubfin_read_()t 0 Registers (32-bit) */
878
879#define bfin_read_PINT0_MASK_SET() bfin_read32(PINT0_MASK_SET)
880#define bfin_write_PINT0_MASK_SET(val) bfin_write32(PINT0_MASK_SET, val)
881#define bfin_read_PINT0_MASK_CLEAR() bfin_read32(PINT0_MASK_CLEAR)
882#define bfin_write_PINT0_MASK_CLEAR(val) bfin_write32(PINT0_MASK_CLEAR, val)
883#define bfin_read_PINT0_REQUEST() bfin_read32(PINT0_REQUEST)
884#define bfin_write_PINT0_REQUEST(val) bfin_write32(PINT0_REQUEST, val)
885#define bfin_read_PINT0_ASSIGN() bfin_read32(PINT0_ASSIGN)
886#define bfin_write_PINT0_ASSIGN(val) bfin_write32(PINT0_ASSIGN, val)
887#define bfin_read_PINT0_EDGE_SET() bfin_read32(PINT0_EDGE_SET)
888#define bfin_write_PINT0_EDGE_SET(val) bfin_write32(PINT0_EDGE_SET, val)
889#define bfin_read_PINT0_EDGE_CLEAR() bfin_read32(PINT0_EDGE_CLEAR)
890#define bfin_write_PINT0_EDGE_CLEAR(val) bfin_write32(PINT0_EDGE_CLEAR, val)
891#define bfin_read_PINT0_INVERT_SET() bfin_read32(PINT0_INVERT_SET)
892#define bfin_write_PINT0_INVERT_SET(val) bfin_write32(PINT0_INVERT_SET, val)
893#define bfin_read_PINT0_INVERT_CLEAR() bfin_read32(PINT0_INVERT_CLEAR)
894#define bfin_write_PINT0_INVERT_CLEAR(val) bfin_write32(PINT0_INVERT_CLEAR, val)
895#define bfin_read_PINT0_PINSTATE() bfin_read32(PINT0_PINSTATE)
896#define bfin_write_PINT0_PINSTATE(val) bfin_write32(PINT0_PINSTATE, val)
897#define bfin_read_PINT0_LATCH() bfin_read32(PINT0_LATCH)
898#define bfin_write_PINT0_LATCH(val) bfin_write32(PINT0_LATCH, val)
899
900/* Port Interrubfin_read_()t 1 Registers (32-bit) */
901
902#define bfin_read_PINT1_MASK_SET() bfin_read32(PINT1_MASK_SET)
903#define bfin_write_PINT1_MASK_SET(val) bfin_write32(PINT1_MASK_SET, val)
904#define bfin_read_PINT1_MASK_CLEAR() bfin_read32(PINT1_MASK_CLEAR)
905#define bfin_write_PINT1_MASK_CLEAR(val) bfin_write32(PINT1_MASK_CLEAR, val)
906#define bfin_read_PINT1_REQUEST() bfin_read32(PINT1_REQUEST)
907#define bfin_write_PINT1_REQUEST(val) bfin_write32(PINT1_REQUEST, val)
908#define bfin_read_PINT1_ASSIGN() bfin_read32(PINT1_ASSIGN)
909#define bfin_write_PINT1_ASSIGN(val) bfin_write32(PINT1_ASSIGN, val)
910#define bfin_read_PINT1_EDGE_SET() bfin_read32(PINT1_EDGE_SET)
911#define bfin_write_PINT1_EDGE_SET(val) bfin_write32(PINT1_EDGE_SET, val)
912#define bfin_read_PINT1_EDGE_CLEAR() bfin_read32(PINT1_EDGE_CLEAR)
913#define bfin_write_PINT1_EDGE_CLEAR(val) bfin_write32(PINT1_EDGE_CLEAR, val)
914#define bfin_read_PINT1_INVERT_SET() bfin_read32(PINT1_INVERT_SET)
915#define bfin_write_PINT1_INVERT_SET(val) bfin_write32(PINT1_INVERT_SET, val)
916#define bfin_read_PINT1_INVERT_CLEAR() bfin_read32(PINT1_INVERT_CLEAR)
917#define bfin_write_PINT1_INVERT_CLEAR(val) bfin_write32(PINT1_INVERT_CLEAR, val)
918#define bfin_read_PINT1_PINSTATE() bfin_read32(PINT1_PINSTATE)
919#define bfin_write_PINT1_PINSTATE(val) bfin_write32(PINT1_PINSTATE, val)
920#define bfin_read_PINT1_LATCH() bfin_read32(PINT1_LATCH)
921#define bfin_write_PINT1_LATCH(val) bfin_write32(PINT1_LATCH, val)
922
923/* Port Interrubfin_read_()t 2 Registers (32-bit) */
924
925#define bfin_read_PINT2_MASK_SET() bfin_read32(PINT2_MASK_SET)
926#define bfin_write_PINT2_MASK_SET(val) bfin_write32(PINT2_MASK_SET, val)
927#define bfin_read_PINT2_MASK_CLEAR() bfin_read32(PINT2_MASK_CLEAR)
928#define bfin_write_PINT2_MASK_CLEAR(val) bfin_write32(PINT2_MASK_CLEAR, val)
929#define bfin_read_PINT2_REQUEST() bfin_read32(PINT2_REQUEST)
930#define bfin_write_PINT2_REQUEST(val) bfin_write32(PINT2_REQUEST, val)
931#define bfin_read_PINT2_ASSIGN() bfin_read32(PINT2_ASSIGN)
932#define bfin_write_PINT2_ASSIGN(val) bfin_write32(PINT2_ASSIGN, val)
933#define bfin_read_PINT2_EDGE_SET() bfin_read32(PINT2_EDGE_SET)
934#define bfin_write_PINT2_EDGE_SET(val) bfin_write32(PINT2_EDGE_SET, val)
935#define bfin_read_PINT2_EDGE_CLEAR() bfin_read32(PINT2_EDGE_CLEAR)
936#define bfin_write_PINT2_EDGE_CLEAR(val) bfin_write32(PINT2_EDGE_CLEAR, val)
937#define bfin_read_PINT2_INVERT_SET() bfin_read32(PINT2_INVERT_SET)
938#define bfin_write_PINT2_INVERT_SET(val) bfin_write32(PINT2_INVERT_SET, val)
939#define bfin_read_PINT2_INVERT_CLEAR() bfin_read32(PINT2_INVERT_CLEAR)
940#define bfin_write_PINT2_INVERT_CLEAR(val) bfin_write32(PINT2_INVERT_CLEAR, val)
941#define bfin_read_PINT2_PINSTATE() bfin_read32(PINT2_PINSTATE)
942#define bfin_write_PINT2_PINSTATE(val) bfin_write32(PINT2_PINSTATE, val)
943#define bfin_read_PINT2_LATCH() bfin_read32(PINT2_LATCH)
944#define bfin_write_PINT2_LATCH(val) bfin_write32(PINT2_LATCH, val)
945
946/* Port Interrubfin_read_()t 3 Registers (32-bit) */
947
948#define bfin_read_PINT3_MASK_SET() bfin_read32(PINT3_MASK_SET)
949#define bfin_write_PINT3_MASK_SET(val) bfin_write32(PINT3_MASK_SET, val)
950#define bfin_read_PINT3_MASK_CLEAR() bfin_read32(PINT3_MASK_CLEAR)
951#define bfin_write_PINT3_MASK_CLEAR(val) bfin_write32(PINT3_MASK_CLEAR, val)
952#define bfin_read_PINT3_REQUEST() bfin_read32(PINT3_REQUEST)
953#define bfin_write_PINT3_REQUEST(val) bfin_write32(PINT3_REQUEST, val)
954#define bfin_read_PINT3_ASSIGN() bfin_read32(PINT3_ASSIGN)
955#define bfin_write_PINT3_ASSIGN(val) bfin_write32(PINT3_ASSIGN, val)
956#define bfin_read_PINT3_EDGE_SET() bfin_read32(PINT3_EDGE_SET)
957#define bfin_write_PINT3_EDGE_SET(val) bfin_write32(PINT3_EDGE_SET, val)
958#define bfin_read_PINT3_EDGE_CLEAR() bfin_read32(PINT3_EDGE_CLEAR)
959#define bfin_write_PINT3_EDGE_CLEAR(val) bfin_write32(PINT3_EDGE_CLEAR, val)
960#define bfin_read_PINT3_INVERT_SET() bfin_read32(PINT3_INVERT_SET)
961#define bfin_write_PINT3_INVERT_SET(val) bfin_write32(PINT3_INVERT_SET, val)
962#define bfin_read_PINT3_INVERT_CLEAR() bfin_read32(PINT3_INVERT_CLEAR)
963#define bfin_write_PINT3_INVERT_CLEAR(val) bfin_write32(PINT3_INVERT_CLEAR, val)
964#define bfin_read_PINT3_PINSTATE() bfin_read32(PINT3_PINSTATE)
965#define bfin_write_PINT3_PINSTATE(val) bfin_write32(PINT3_PINSTATE, val)
966#define bfin_read_PINT3_LATCH() bfin_read32(PINT3_LATCH)
967#define bfin_write_PINT3_LATCH(val) bfin_write32(PINT3_LATCH, val)
968
969/* Port A Registers */
970
971#define bfin_read_PORTA_FER() bfin_read16(PORTA_FER)
972#define bfin_write_PORTA_FER(val) bfin_write16(PORTA_FER, val)
973#define bfin_read_PORTA() bfin_read16(PORTA)
974#define bfin_write_PORTA(val) bfin_write16(PORTA, val)
975#define bfin_read_PORTA_SET() bfin_read16(PORTA_SET)
976#define bfin_write_PORTA_SET(val) bfin_write16(PORTA_SET, val)
977#define bfin_read_PORTA_CLEAR() bfin_read16(PORTA_CLEAR)
978#define bfin_write_PORTA_CLEAR(val) bfin_write16(PORTA_CLEAR, val)
979#define bfin_read_PORTA_DIR_SET() bfin_read16(PORTA_DIR_SET)
980#define bfin_write_PORTA_DIR_SET(val) bfin_write16(PORTA_DIR_SET, val)
981#define bfin_read_PORTA_DIR_CLEAR() bfin_read16(PORTA_DIR_CLEAR)
982#define bfin_write_PORTA_DIR_CLEAR(val) bfin_write16(PORTA_DIR_CLEAR, val)
983#define bfin_read_PORTA_INEN() bfin_read16(PORTA_INEN)
984#define bfin_write_PORTA_INEN(val) bfin_write16(PORTA_INEN, val)
985#define bfin_read_PORTA_MUX() bfin_read32(PORTA_MUX)
986#define bfin_write_PORTA_MUX(val) bfin_write32(PORTA_MUX, val)
987
988/* Port B Registers */
989
990#define bfin_read_PORTB_FER() bfin_read16(PORTB_FER)
991#define bfin_write_PORTB_FER(val) bfin_write16(PORTB_FER, val)
992#define bfin_read_PORTB() bfin_read16(PORTB)
993#define bfin_write_PORTB(val) bfin_write16(PORTB, val)
994#define bfin_read_PORTB_SET() bfin_read16(PORTB_SET)
995#define bfin_write_PORTB_SET(val) bfin_write16(PORTB_SET, val)
996#define bfin_read_PORTB_CLEAR() bfin_read16(PORTB_CLEAR)
997#define bfin_write_PORTB_CLEAR(val) bfin_write16(PORTB_CLEAR, val)
998#define bfin_read_PORTB_DIR_SET() bfin_read16(PORTB_DIR_SET)
999#define bfin_write_PORTB_DIR_SET(val) bfin_write16(PORTB_DIR_SET, val)
1000#define bfin_read_PORTB_DIR_CLEAR() bfin_read16(PORTB_DIR_CLEAR)
1001#define bfin_write_PORTB_DIR_CLEAR(val) bfin_write16(PORTB_DIR_CLEAR, val)
1002#define bfin_read_PORTB_INEN() bfin_read16(PORTB_INEN)
1003#define bfin_write_PORTB_INEN(val) bfin_write16(PORTB_INEN, val)
1004#define bfin_read_PORTB_MUX() bfin_read32(PORTB_MUX)
1005#define bfin_write_PORTB_MUX(val) bfin_write32(PORTB_MUX, val)
1006
1007/* Port C Registers */
1008
1009#define bfin_read_PORTC_FER() bfin_read16(PORTC_FER)
1010#define bfin_write_PORTC_FER(val) bfin_write16(PORTC_FER, val)
1011#define bfin_read_PORTC() bfin_read16(PORTC)
1012#define bfin_write_PORTC(val) bfin_write16(PORTC, val)
1013#define bfin_read_PORTC_SET() bfin_read16(PORTC_SET)
1014#define bfin_write_PORTC_SET(val) bfin_write16(PORTC_SET, val)
1015#define bfin_read_PORTC_CLEAR() bfin_read16(PORTC_CLEAR)
1016#define bfin_write_PORTC_CLEAR(val) bfin_write16(PORTC_CLEAR, val)
1017#define bfin_read_PORTC_DIR_SET() bfin_read16(PORTC_DIR_SET)
1018#define bfin_write_PORTC_DIR_SET(val) bfin_write16(PORTC_DIR_SET, val)
1019#define bfin_read_PORTC_DIR_CLEAR() bfin_read16(PORTC_DIR_CLEAR)
1020#define bfin_write_PORTC_DIR_CLEAR(val) bfin_write16(PORTC_DIR_CLEAR, val)
1021#define bfin_read_PORTC_INEN() bfin_read16(PORTC_INEN)
1022#define bfin_write_PORTC_INEN(val) bfin_write16(PORTC_INEN, val)
1023#define bfin_read_PORTC_MUX() bfin_read32(PORTC_MUX)
1024#define bfin_write_PORTC_MUX(val) bfin_write32(PORTC_MUX, val)
1025
1026/* Port D Registers */
1027
1028#define bfin_read_PORTD_FER() bfin_read16(PORTD_FER)
1029#define bfin_write_PORTD_FER(val) bfin_write16(PORTD_FER, val)
1030#define bfin_read_PORTD() bfin_read16(PORTD)
1031#define bfin_write_PORTD(val) bfin_write16(PORTD, val)
1032#define bfin_read_PORTD_SET() bfin_read16(PORTD_SET)
1033#define bfin_write_PORTD_SET(val) bfin_write16(PORTD_SET, val)
1034#define bfin_read_PORTD_CLEAR() bfin_read16(PORTD_CLEAR)
1035#define bfin_write_PORTD_CLEAR(val) bfin_write16(PORTD_CLEAR, val)
1036#define bfin_read_PORTD_DIR_SET() bfin_read16(PORTD_DIR_SET)
1037#define bfin_write_PORTD_DIR_SET(val) bfin_write16(PORTD_DIR_SET, val)
1038#define bfin_read_PORTD_DIR_CLEAR() bfin_read16(PORTD_DIR_CLEAR)
1039#define bfin_write_PORTD_DIR_CLEAR(val) bfin_write16(PORTD_DIR_CLEAR, val)
1040#define bfin_read_PORTD_INEN() bfin_read16(PORTD_INEN)
1041#define bfin_write_PORTD_INEN(val) bfin_write16(PORTD_INEN, val)
1042#define bfin_read_PORTD_MUX() bfin_read32(PORTD_MUX)
1043#define bfin_write_PORTD_MUX(val) bfin_write32(PORTD_MUX, val)
1044
1045/* Port E Registers */
1046
1047#define bfin_read_PORTE_FER() bfin_read16(PORTE_FER)
1048#define bfin_write_PORTE_FER(val) bfin_write16(PORTE_FER, val)
1049#define bfin_read_PORTE() bfin_read16(PORTE)
1050#define bfin_write_PORTE(val) bfin_write16(PORTE, val)
1051#define bfin_read_PORTE_SET() bfin_read16(PORTE_SET)
1052#define bfin_write_PORTE_SET(val) bfin_write16(PORTE_SET, val)
1053#define bfin_read_PORTE_CLEAR() bfin_read16(PORTE_CLEAR)
1054#define bfin_write_PORTE_CLEAR(val) bfin_write16(PORTE_CLEAR, val)
1055#define bfin_read_PORTE_DIR_SET() bfin_read16(PORTE_DIR_SET)
1056#define bfin_write_PORTE_DIR_SET(val) bfin_write16(PORTE_DIR_SET, val)
1057#define bfin_read_PORTE_DIR_CLEAR() bfin_read16(PORTE_DIR_CLEAR)
1058#define bfin_write_PORTE_DIR_CLEAR(val) bfin_write16(PORTE_DIR_CLEAR, val)
1059#define bfin_read_PORTE_INEN() bfin_read16(PORTE_INEN)
1060#define bfin_write_PORTE_INEN(val) bfin_write16(PORTE_INEN, val)
1061#define bfin_read_PORTE_MUX() bfin_read32(PORTE_MUX)
1062#define bfin_write_PORTE_MUX(val) bfin_write32(PORTE_MUX, val)
1063
1064/* Port F Registers */
1065
1066#define bfin_read_PORTF_FER() bfin_read16(PORTF_FER)
1067#define bfin_write_PORTF_FER(val) bfin_write16(PORTF_FER, val)
1068#define bfin_read_PORTF() bfin_read16(PORTF)
1069#define bfin_write_PORTF(val) bfin_write16(PORTF, val)
1070#define bfin_read_PORTF_SET() bfin_read16(PORTF_SET)
1071#define bfin_write_PORTF_SET(val) bfin_write16(PORTF_SET, val)
1072#define bfin_read_PORTF_CLEAR() bfin_read16(PORTF_CLEAR)
1073#define bfin_write_PORTF_CLEAR(val) bfin_write16(PORTF_CLEAR, val)
1074#define bfin_read_PORTF_DIR_SET() bfin_read16(PORTF_DIR_SET)
1075#define bfin_write_PORTF_DIR_SET(val) bfin_write16(PORTF_DIR_SET, val)
1076#define bfin_read_PORTF_DIR_CLEAR() bfin_read16(PORTF_DIR_CLEAR)
1077#define bfin_write_PORTF_DIR_CLEAR(val) bfin_write16(PORTF_DIR_CLEAR, val)
1078#define bfin_read_PORTF_INEN() bfin_read16(PORTF_INEN)
1079#define bfin_write_PORTF_INEN(val) bfin_write16(PORTF_INEN, val)
1080#define bfin_read_PORTF_MUX() bfin_read32(PORTF_MUX)
1081#define bfin_write_PORTF_MUX(val) bfin_write32(PORTF_MUX, val)
1082
1083/* Port G Registers */
1084
1085#define bfin_read_PORTG_FER() bfin_read16(PORTG_FER)
1086#define bfin_write_PORTG_FER(val) bfin_write16(PORTG_FER, val)
1087#define bfin_read_PORTG() bfin_read16(PORTG)
1088#define bfin_write_PORTG(val) bfin_write16(PORTG, val)
1089#define bfin_read_PORTG_SET() bfin_read16(PORTG_SET)
1090#define bfin_write_PORTG_SET(val) bfin_write16(PORTG_SET, val)
1091#define bfin_read_PORTG_CLEAR() bfin_read16(PORTG_CLEAR)
1092#define bfin_write_PORTG_CLEAR(val) bfin_write16(PORTG_CLEAR, val)
1093#define bfin_read_PORTG_DIR_SET() bfin_read16(PORTG_DIR_SET)
1094#define bfin_write_PORTG_DIR_SET(val) bfin_write16(PORTG_DIR_SET, val)
1095#define bfin_read_PORTG_DIR_CLEAR() bfin_read16(PORTG_DIR_CLEAR)
1096#define bfin_write_PORTG_DIR_CLEAR(val) bfin_write16(PORTG_DIR_CLEAR, val)
1097#define bfin_read_PORTG_INEN() bfin_read16(PORTG_INEN)
1098#define bfin_write_PORTG_INEN(val) bfin_write16(PORTG_INEN, val)
1099#define bfin_read_PORTG_MUX() bfin_read32(PORTG_MUX)
1100#define bfin_write_PORTG_MUX(val) bfin_write32(PORTG_MUX, val)
1101
1102/* Port H Registers */
1103
1104#define bfin_read_PORTH_FER() bfin_read16(PORTH_FER)
1105#define bfin_write_PORTH_FER(val) bfin_write16(PORTH_FER, val)
1106#define bfin_read_PORTH() bfin_read16(PORTH)
1107#define bfin_write_PORTH(val) bfin_write16(PORTH, val)
1108#define bfin_read_PORTH_SET() bfin_read16(PORTH_SET)
1109#define bfin_write_PORTH_SET(val) bfin_write16(PORTH_SET, val)
1110#define bfin_read_PORTH_CLEAR() bfin_read16(PORTH_CLEAR)
1111#define bfin_write_PORTH_CLEAR(val) bfin_write16(PORTH_CLEAR, val)
1112#define bfin_read_PORTH_DIR_SET() bfin_read16(PORTH_DIR_SET)
1113#define bfin_write_PORTH_DIR_SET(val) bfin_write16(PORTH_DIR_SET, val)
1114#define bfin_read_PORTH_DIR_CLEAR() bfin_read16(PORTH_DIR_CLEAR)
1115#define bfin_write_PORTH_DIR_CLEAR(val) bfin_write16(PORTH_DIR_CLEAR, val)
1116#define bfin_read_PORTH_INEN() bfin_read16(PORTH_INEN)
1117#define bfin_write_PORTH_INEN(val) bfin_write16(PORTH_INEN, val)
1118#define bfin_read_PORTH_MUX() bfin_read32(PORTH_MUX)
1119#define bfin_write_PORTH_MUX(val) bfin_write32(PORTH_MUX, val)
1120
1121/* Port I Registers */
1122
1123#define bfin_read_PORTI_FER() bfin_read16(PORTI_FER)
1124#define bfin_write_PORTI_FER(val) bfin_write16(PORTI_FER, val)
1125#define bfin_read_PORTI() bfin_read16(PORTI)
1126#define bfin_write_PORTI(val) bfin_write16(PORTI, val)
1127#define bfin_read_PORTI_SET() bfin_read16(PORTI_SET)
1128#define bfin_write_PORTI_SET(val) bfin_write16(PORTI_SET, val)
1129#define bfin_read_PORTI_CLEAR() bfin_read16(PORTI_CLEAR)
1130#define bfin_write_PORTI_CLEAR(val) bfin_write16(PORTI_CLEAR, val)
1131#define bfin_read_PORTI_DIR_SET() bfin_read16(PORTI_DIR_SET)
1132#define bfin_write_PORTI_DIR_SET(val) bfin_write16(PORTI_DIR_SET, val)
1133#define bfin_read_PORTI_DIR_CLEAR() bfin_read16(PORTI_DIR_CLEAR)
1134#define bfin_write_PORTI_DIR_CLEAR(val) bfin_write16(PORTI_DIR_CLEAR, val)
1135#define bfin_read_PORTI_INEN() bfin_read16(PORTI_INEN)
1136#define bfin_write_PORTI_INEN(val) bfin_write16(PORTI_INEN, val)
1137#define bfin_read_PORTI_MUX() bfin_read32(PORTI_MUX)
1138#define bfin_write_PORTI_MUX(val) bfin_write32(PORTI_MUX, val)
1139
1140/* Port J Registers */
1141
1142#define bfin_read_PORTJ_FER() bfin_read16(PORTJ_FER)
1143#define bfin_write_PORTJ_FER(val) bfin_write16(PORTJ_FER, val)
1144#define bfin_read_PORTJ() bfin_read16(PORTJ)
1145#define bfin_write_PORTJ(val) bfin_write16(PORTJ, val)
1146#define bfin_read_PORTJ_SET() bfin_read16(PORTJ_SET)
1147#define bfin_write_PORTJ_SET(val) bfin_write16(PORTJ_SET, val)
1148#define bfin_read_PORTJ_CLEAR() bfin_read16(PORTJ_CLEAR)
1149#define bfin_write_PORTJ_CLEAR(val) bfin_write16(PORTJ_CLEAR, val)
1150#define bfin_read_PORTJ_DIR_SET() bfin_read16(PORTJ_DIR_SET)
1151#define bfin_write_PORTJ_DIR_SET(val) bfin_write16(PORTJ_DIR_SET, val)
1152#define bfin_read_PORTJ_DIR_CLEAR() bfin_read16(PORTJ_DIR_CLEAR)
1153#define bfin_write_PORTJ_DIR_CLEAR(val) bfin_write16(PORTJ_DIR_CLEAR, val)
1154#define bfin_read_PORTJ_INEN() bfin_read16(PORTJ_INEN)
1155#define bfin_write_PORTJ_INEN(val) bfin_write16(PORTJ_INEN, val)
1156#define bfin_read_PORTJ_MUX() bfin_read32(PORTJ_MUX)
1157#define bfin_write_PORTJ_MUX(val) bfin_write32(PORTJ_MUX, val)
1158
1159/* PWM Timer Registers */
1160
1161#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
1162#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG, val)
1163#define bfin_read_TIMER0_COUNTER() bfin_read32(TIMER0_COUNTER)
1164#define bfin_write_TIMER0_COUNTER(val) bfin_write32(TIMER0_COUNTER, val)
1165#define bfin_read_TIMER0_PERIOD() bfin_read32(TIMER0_PERIOD)
1166#define bfin_write_TIMER0_PERIOD(val) bfin_write32(TIMER0_PERIOD, val)
1167#define bfin_read_TIMER0_WIDTH() bfin_read32(TIMER0_WIDTH)
1168#define bfin_write_TIMER0_WIDTH(val) bfin_write32(TIMER0_WIDTH, val)
1169#define bfin_read_TIMER1_CONFIG() bfin_read16(TIMER1_CONFIG)
1170#define bfin_write_TIMER1_CONFIG(val) bfin_write16(TIMER1_CONFIG, val)
1171#define bfin_read_TIMER1_COUNTER() bfin_read32(TIMER1_COUNTER)
1172#define bfin_write_TIMER1_COUNTER(val) bfin_write32(TIMER1_COUNTER, val)
1173#define bfin_read_TIMER1_PERIOD() bfin_read32(TIMER1_PERIOD)
1174#define bfin_write_TIMER1_PERIOD(val) bfin_write32(TIMER1_PERIOD, val)
1175#define bfin_read_TIMER1_WIDTH() bfin_read32(TIMER1_WIDTH)
1176#define bfin_write_TIMER1_WIDTH(val) bfin_write32(TIMER1_WIDTH, val)
1177#define bfin_read_TIMER2_CONFIG() bfin_read16(TIMER2_CONFIG)
1178#define bfin_write_TIMER2_CONFIG(val) bfin_write16(TIMER2_CONFIG, val)
1179#define bfin_read_TIMER2_COUNTER() bfin_read32(TIMER2_COUNTER)
1180#define bfin_write_TIMER2_COUNTER(val) bfin_write32(TIMER2_COUNTER, val)
1181#define bfin_read_TIMER2_PERIOD() bfin_read32(TIMER2_PERIOD)
1182#define bfin_write_TIMER2_PERIOD(val) bfin_write32(TIMER2_PERIOD, val)
1183#define bfin_read_TIMER2_WIDTH() bfin_read32(TIMER2_WIDTH)
1184#define bfin_write_TIMER2_WIDTH(val) bfin_write32(TIMER2_WIDTH, val)
1185#define bfin_read_TIMER3_CONFIG() bfin_read16(TIMER3_CONFIG)
1186#define bfin_write_TIMER3_CONFIG(val) bfin_write16(TIMER3_CONFIG, val)
1187#define bfin_read_TIMER3_COUNTER() bfin_read32(TIMER3_COUNTER)
1188#define bfin_write_TIMER3_COUNTER(val) bfin_write32(TIMER3_COUNTER, val)
1189#define bfin_read_TIMER3_PERIOD() bfin_read32(TIMER3_PERIOD)
1190#define bfin_write_TIMER3_PERIOD(val) bfin_write32(TIMER3_PERIOD, val)
1191#define bfin_read_TIMER3_WIDTH() bfin_read32(TIMER3_WIDTH)
1192#define bfin_write_TIMER3_WIDTH(val) bfin_write32(TIMER3_WIDTH, val)
1193#define bfin_read_TIMER4_CONFIG() bfin_read16(TIMER4_CONFIG)
1194#define bfin_write_TIMER4_CONFIG(val) bfin_write16(TIMER4_CONFIG, val)
1195#define bfin_read_TIMER4_COUNTER() bfin_read32(TIMER4_COUNTER)
1196#define bfin_write_TIMER4_COUNTER(val) bfin_write32(TIMER4_COUNTER, val)
1197#define bfin_read_TIMER4_PERIOD() bfin_read32(TIMER4_PERIOD)
1198#define bfin_write_TIMER4_PERIOD(val) bfin_write32(TIMER4_PERIOD, val)
1199#define bfin_read_TIMER4_WIDTH() bfin_read32(TIMER4_WIDTH)
1200#define bfin_write_TIMER4_WIDTH(val) bfin_write32(TIMER4_WIDTH, val)
1201#define bfin_read_TIMER5_CONFIG() bfin_read16(TIMER5_CONFIG)
1202#define bfin_write_TIMER5_CONFIG(val) bfin_write16(TIMER5_CONFIG, val)
1203#define bfin_read_TIMER5_COUNTER() bfin_read32(TIMER5_COUNTER)
1204#define bfin_write_TIMER5_COUNTER(val) bfin_write32(TIMER5_COUNTER, val)
1205#define bfin_read_TIMER5_PERIOD() bfin_read32(TIMER5_PERIOD)
1206#define bfin_write_TIMER5_PERIOD(val) bfin_write32(TIMER5_PERIOD, val)
1207#define bfin_read_TIMER5_WIDTH() bfin_read32(TIMER5_WIDTH)
1208#define bfin_write_TIMER5_WIDTH(val) bfin_write32(TIMER5_WIDTH, val)
1209#define bfin_read_TIMER6_CONFIG() bfin_read16(TIMER6_CONFIG)
1210#define bfin_write_TIMER6_CONFIG(val) bfin_write16(TIMER6_CONFIG, val)
1211#define bfin_read_TIMER6_COUNTER() bfin_read32(TIMER6_COUNTER)
1212#define bfin_write_TIMER6_COUNTER(val) bfin_write32(TIMER6_COUNTER, val)
1213#define bfin_read_TIMER6_PERIOD() bfin_read32(TIMER6_PERIOD)
1214#define bfin_write_TIMER6_PERIOD(val) bfin_write32(TIMER6_PERIOD, val)
1215#define bfin_read_TIMER6_WIDTH() bfin_read32(TIMER6_WIDTH)
1216#define bfin_write_TIMER6_WIDTH(val) bfin_write32(TIMER6_WIDTH, val)
1217#define bfin_read_TIMER7_CONFIG() bfin_read16(TIMER7_CONFIG)
1218#define bfin_write_TIMER7_CONFIG(val) bfin_write16(TIMER7_CONFIG, val)
1219#define bfin_read_TIMER7_COUNTER() bfin_read32(TIMER7_COUNTER)
1220#define bfin_write_TIMER7_COUNTER(val) bfin_write32(TIMER7_COUNTER, val)
1221#define bfin_read_TIMER7_PERIOD() bfin_read32(TIMER7_PERIOD)
1222#define bfin_write_TIMER7_PERIOD(val) bfin_write32(TIMER7_PERIOD, val)
1223#define bfin_read_TIMER7_WIDTH() bfin_read32(TIMER7_WIDTH)
1224#define bfin_write_TIMER7_WIDTH(val) bfin_write32(TIMER7_WIDTH, val)
1225
1226/* Timer Groubfin_read_() of 8 */
1227
1228#define bfin_read_TIMER_ENABLE0() bfin_read16(TIMER_ENABLE0)
1229#define bfin_write_TIMER_ENABLE0(val) bfin_write16(TIMER_ENABLE0, val)
1230#define bfin_read_TIMER_DISABLE0() bfin_read16(TIMER_DISABLE0)
1231#define bfin_write_TIMER_DISABLE0(val) bfin_write16(TIMER_DISABLE0, val)
1232#define bfin_read_TIMER_STATUS0() bfin_read32(TIMER_STATUS0)
1233#define bfin_write_TIMER_STATUS0(val) bfin_write32(TIMER_STATUS0, val)
1234
1235/* DMAC1 Registers */
1236
1237#define bfin_read_DMAC1_TCPER() bfin_read16(DMAC1_TCPER)
1238#define bfin_write_DMAC1_TCPER(val) bfin_write16(DMAC1_TCPER, val)
1239#define bfin_read_DMAC1_TCCNT() bfin_read16(DMAC1_TCCNT)
1240#define bfin_write_DMAC1_TCCNT(val) bfin_write16(DMAC1_TCCNT, val)
1241
1242/* DMA Channel 12 Registers */
1243
1244#define bfin_read_DMA12_NEXT_DESC_PTR() bfin_read32(DMA12_NEXT_DESC_PTR)
1245#define bfin_write_DMA12_NEXT_DESC_PTR(val) bfin_write32(DMA12_NEXT_DESC_PTR, val)
1246#define bfin_read_DMA12_START_ADDR() bfin_read32(DMA12_START_ADDR)
1247#define bfin_write_DMA12_START_ADDR(val) bfin_write32(DMA12_START_ADDR, val)
1248#define bfin_read_DMA12_CONFIG() bfin_read16(DMA12_CONFIG)
1249#define bfin_write_DMA12_CONFIG(val) bfin_write16(DMA12_CONFIG, val)
1250#define bfin_read_DMA12_X_COUNT() bfin_read16(DMA12_X_COUNT)
1251#define bfin_write_DMA12_X_COUNT(val) bfin_write16(DMA12_X_COUNT, val)
1252#define bfin_read_DMA12_X_MODIFY() bfin_read16(DMA12_X_MODIFY)
1253#define bfin_write_DMA12_X_MODIFY(val) bfin_write16(DMA12_X_MODIFY, val)
1254#define bfin_read_DMA12_Y_COUNT() bfin_read16(DMA12_Y_COUNT)
1255#define bfin_write_DMA12_Y_COUNT(val) bfin_write16(DMA12_Y_COUNT, val)
1256#define bfin_read_DMA12_Y_MODIFY() bfin_read16(DMA12_Y_MODIFY)
1257#define bfin_write_DMA12_Y_MODIFY(val) bfin_write16(DMA12_Y_MODIFY, val)
1258#define bfin_read_DMA12_CURR_DESC_PTR() bfin_read32(DMA12_CURR_DESC_PTR)
1259#define bfin_write_DMA12_CURR_DESC_PTR(val) bfin_write32(DMA12_CURR_DESC_PTR, val)
1260#define bfin_read_DMA12_CURR_ADDR() bfin_read32(DMA12_CURR_ADDR)
1261#define bfin_write_DMA12_CURR_ADDR(val) bfin_write32(DMA12_CURR_ADDR, val)
1262#define bfin_read_DMA12_IRQ_STATUS() bfin_read16(DMA12_IRQ_STATUS)
1263#define bfin_write_DMA12_IRQ_STATUS(val) bfin_write16(DMA12_IRQ_STATUS, val)
1264#define bfin_read_DMA12_PERIPHERAL_MAP() bfin_read16(DMA12_PERIPHERAL_MAP)
1265#define bfin_write_DMA12_PERIPHERAL_MAP(val) bfin_write16(DMA12_PERIPHERAL_MAP, val)
1266#define bfin_read_DMA12_CURR_X_COUNT() bfin_read16(DMA12_CURR_X_COUNT)
1267#define bfin_write_DMA12_CURR_X_COUNT(val) bfin_write16(DMA12_CURR_X_COUNT, val)
1268#define bfin_read_DMA12_CURR_Y_COUNT() bfin_read16(DMA12_CURR_Y_COUNT)
1269#define bfin_write_DMA12_CURR_Y_COUNT(val) bfin_write16(DMA12_CURR_Y_COUNT, val)
1270
1271/* DMA Channel 13 Registers */
1272
1273#define bfin_read_DMA13_NEXT_DESC_PTR() bfin_read32(DMA13_NEXT_DESC_PTR)
1274#define bfin_write_DMA13_NEXT_DESC_PTR(val) bfin_write32(DMA13_NEXT_DESC_PTR, val)
1275#define bfin_read_DMA13_START_ADDR() bfin_read32(DMA13_START_ADDR)
1276#define bfin_write_DMA13_START_ADDR(val) bfin_write32(DMA13_START_ADDR, val)
1277#define bfin_read_DMA13_CONFIG() bfin_read16(DMA13_CONFIG)
1278#define bfin_write_DMA13_CONFIG(val) bfin_write16(DMA13_CONFIG, val)
1279#define bfin_read_DMA13_X_COUNT() bfin_read16(DMA13_X_COUNT)
1280#define bfin_write_DMA13_X_COUNT(val) bfin_write16(DMA13_X_COUNT, val)
1281#define bfin_read_DMA13_X_MODIFY() bfin_read16(DMA13_X_MODIFY)
1282#define bfin_write_DMA13_X_MODIFY(val) bfin_write16(DMA13_X_MODIFY, val)
1283#define bfin_read_DMA13_Y_COUNT() bfin_read16(DMA13_Y_COUNT)
1284#define bfin_write_DMA13_Y_COUNT(val) bfin_write16(DMA13_Y_COUNT, val)
1285#define bfin_read_DMA13_Y_MODIFY() bfin_read16(DMA13_Y_MODIFY)
1286#define bfin_write_DMA13_Y_MODIFY(val) bfin_write16(DMA13_Y_MODIFY, val)
1287#define bfin_read_DMA13_CURR_DESC_PTR() bfin_read32(DMA13_CURR_DESC_PTR)
1288#define bfin_write_DMA13_CURR_DESC_PTR(val) bfin_write32(DMA13_CURR_DESC_PTR, val)
1289#define bfin_read_DMA13_CURR_ADDR() bfin_read32(DMA13_CURR_ADDR)
1290#define bfin_write_DMA13_CURR_ADDR(val) bfin_write32(DMA13_CURR_ADDR, val)
1291#define bfin_read_DMA13_IRQ_STATUS() bfin_read16(DMA13_IRQ_STATUS)
1292#define bfin_write_DMA13_IRQ_STATUS(val) bfin_write16(DMA13_IRQ_STATUS, val)
1293#define bfin_read_DMA13_PERIPHERAL_MAP() bfin_read16(DMA13_PERIPHERAL_MAP)
1294#define bfin_write_DMA13_PERIPHERAL_MAP(val) bfin_write16(DMA13_PERIPHERAL_MAP, val)
1295#define bfin_read_DMA13_CURR_X_COUNT() bfin_read16(DMA13_CURR_X_COUNT)
1296#define bfin_write_DMA13_CURR_X_COUNT(val) bfin_write16(DMA13_CURR_X_COUNT, val)
1297#define bfin_read_DMA13_CURR_Y_COUNT() bfin_read16(DMA13_CURR_Y_COUNT)
1298#define bfin_write_DMA13_CURR_Y_COUNT(val) bfin_write16(DMA13_CURR_Y_COUNT, val)
1299
1300/* DMA Channel 14 Registers */
1301
1302#define bfin_read_DMA14_NEXT_DESC_PTR() bfin_read32(DMA14_NEXT_DESC_PTR)
1303#define bfin_write_DMA14_NEXT_DESC_PTR(val) bfin_write32(DMA14_NEXT_DESC_PTR, val)
1304#define bfin_read_DMA14_START_ADDR() bfin_read32(DMA14_START_ADDR)
1305#define bfin_write_DMA14_START_ADDR(val) bfin_write32(DMA14_START_ADDR, val)
1306#define bfin_read_DMA14_CONFIG() bfin_read16(DMA14_CONFIG)
1307#define bfin_write_DMA14_CONFIG(val) bfin_write16(DMA14_CONFIG, val)
1308#define bfin_read_DMA14_X_COUNT() bfin_read16(DMA14_X_COUNT)
1309#define bfin_write_DMA14_X_COUNT(val) bfin_write16(DMA14_X_COUNT, val)
1310#define bfin_read_DMA14_X_MODIFY() bfin_read16(DMA14_X_MODIFY)
1311#define bfin_write_DMA14_X_MODIFY(val) bfin_write16(DMA14_X_MODIFY, val)
1312#define bfin_read_DMA14_Y_COUNT() bfin_read16(DMA14_Y_COUNT)
1313#define bfin_write_DMA14_Y_COUNT(val) bfin_write16(DMA14_Y_COUNT, val)
1314#define bfin_read_DMA14_Y_MODIFY() bfin_read16(DMA14_Y_MODIFY)
1315#define bfin_write_DMA14_Y_MODIFY(val) bfin_write16(DMA14_Y_MODIFY, val)
1316#define bfin_read_DMA14_CURR_DESC_PTR() bfin_read32(DMA14_CURR_DESC_PTR)
1317#define bfin_write_DMA14_CURR_DESC_PTR(val) bfin_write32(DMA14_CURR_DESC_PTR, val)
1318#define bfin_read_DMA14_CURR_ADDR() bfin_read32(DMA14_CURR_ADDR)
1319#define bfin_write_DMA14_CURR_ADDR(val) bfin_write32(DMA14_CURR_ADDR, val)
1320#define bfin_read_DMA14_IRQ_STATUS() bfin_read16(DMA14_IRQ_STATUS)
1321#define bfin_write_DMA14_IRQ_STATUS(val) bfin_write16(DMA14_IRQ_STATUS, val)
1322#define bfin_read_DMA14_PERIPHERAL_MAP() bfin_read16(DMA14_PERIPHERAL_MAP)
1323#define bfin_write_DMA14_PERIPHERAL_MAP(val) bfin_write16(DMA14_PERIPHERAL_MAP, val)
1324#define bfin_read_DMA14_CURR_X_COUNT() bfin_read16(DMA14_CURR_X_COUNT)
1325#define bfin_write_DMA14_CURR_X_COUNT(val) bfin_write16(DMA14_CURR_X_COUNT, val)
1326#define bfin_read_DMA14_CURR_Y_COUNT() bfin_read16(DMA14_CURR_Y_COUNT)
1327#define bfin_write_DMA14_CURR_Y_COUNT(val) bfin_write16(DMA14_CURR_Y_COUNT, val)
1328
1329/* DMA Channel 15 Registers */
1330
1331#define bfin_read_DMA15_NEXT_DESC_PTR() bfin_read32(DMA15_NEXT_DESC_PTR)
1332#define bfin_write_DMA15_NEXT_DESC_PTR(val) bfin_write32(DMA15_NEXT_DESC_PTR, val)
1333#define bfin_read_DMA15_START_ADDR() bfin_read32(DMA15_START_ADDR)
1334#define bfin_write_DMA15_START_ADDR(val) bfin_write32(DMA15_START_ADDR, val)
1335#define bfin_read_DMA15_CONFIG() bfin_read16(DMA15_CONFIG)
1336#define bfin_write_DMA15_CONFIG(val) bfin_write16(DMA15_CONFIG, val)
1337#define bfin_read_DMA15_X_COUNT() bfin_read16(DMA15_X_COUNT)
1338#define bfin_write_DMA15_X_COUNT(val) bfin_write16(DMA15_X_COUNT, val)
1339#define bfin_read_DMA15_X_MODIFY() bfin_read16(DMA15_X_MODIFY)
1340#define bfin_write_DMA15_X_MODIFY(val) bfin_write16(DMA15_X_MODIFY, val)
1341#define bfin_read_DMA15_Y_COUNT() bfin_read16(DMA15_Y_COUNT)
1342#define bfin_write_DMA15_Y_COUNT(val) bfin_write16(DMA15_Y_COUNT, val)
1343#define bfin_read_DMA15_Y_MODIFY() bfin_read16(DMA15_Y_MODIFY)
1344#define bfin_write_DMA15_Y_MODIFY(val) bfin_write16(DMA15_Y_MODIFY, val)
1345#define bfin_read_DMA15_CURR_DESC_PTR() bfin_read32(DMA15_CURR_DESC_PTR)
1346#define bfin_write_DMA15_CURR_DESC_PTR(val) bfin_write32(DMA15_CURR_DESC_PTR, val)
1347#define bfin_read_DMA15_CURR_ADDR() bfin_read32(DMA15_CURR_ADDR)
1348#define bfin_write_DMA15_CURR_ADDR(val) bfin_write32(DMA15_CURR_ADDR, val)
1349#define bfin_read_DMA15_IRQ_STATUS() bfin_read16(DMA15_IRQ_STATUS)
1350#define bfin_write_DMA15_IRQ_STATUS(val) bfin_write16(DMA15_IRQ_STATUS, val)
1351#define bfin_read_DMA15_PERIPHERAL_MAP() bfin_read16(DMA15_PERIPHERAL_MAP)
1352#define bfin_write_DMA15_PERIPHERAL_MAP(val) bfin_write16(DMA15_PERIPHERAL_MAP, val)
1353#define bfin_read_DMA15_CURR_X_COUNT() bfin_read16(DMA15_CURR_X_COUNT)
1354#define bfin_write_DMA15_CURR_X_COUNT(val) bfin_write16(DMA15_CURR_X_COUNT, val)
1355#define bfin_read_DMA15_CURR_Y_COUNT() bfin_read16(DMA15_CURR_Y_COUNT)
1356#define bfin_write_DMA15_CURR_Y_COUNT(val) bfin_write16(DMA15_CURR_Y_COUNT, val)
1357
1358/* DMA Channel 16 Registers */
1359
1360#define bfin_read_DMA16_NEXT_DESC_PTR() bfin_read32(DMA16_NEXT_DESC_PTR)
1361#define bfin_write_DMA16_NEXT_DESC_PTR(val) bfin_write32(DMA16_NEXT_DESC_PTR, val)
1362#define bfin_read_DMA16_START_ADDR() bfin_read32(DMA16_START_ADDR)
1363#define bfin_write_DMA16_START_ADDR(val) bfin_write32(DMA16_START_ADDR, val)
1364#define bfin_read_DMA16_CONFIG() bfin_read16(DMA16_CONFIG)
1365#define bfin_write_DMA16_CONFIG(val) bfin_write16(DMA16_CONFIG, val)
1366#define bfin_read_DMA16_X_COUNT() bfin_read16(DMA16_X_COUNT)
1367#define bfin_write_DMA16_X_COUNT(val) bfin_write16(DMA16_X_COUNT, val)
1368#define bfin_read_DMA16_X_MODIFY() bfin_read16(DMA16_X_MODIFY)
1369#define bfin_write_DMA16_X_MODIFY(val) bfin_write16(DMA16_X_MODIFY, val)
1370#define bfin_read_DMA16_Y_COUNT() bfin_read16(DMA16_Y_COUNT)
1371#define bfin_write_DMA16_Y_COUNT(val) bfin_write16(DMA16_Y_COUNT, val)
1372#define bfin_read_DMA16_Y_MODIFY() bfin_read16(DMA16_Y_MODIFY)
1373#define bfin_write_DMA16_Y_MODIFY(val) bfin_write16(DMA16_Y_MODIFY, val)
1374#define bfin_read_DMA16_CURR_DESC_PTR() bfin_read32(DMA16_CURR_DESC_PTR)
1375#define bfin_write_DMA16_CURR_DESC_PTR(val) bfin_write32(DMA16_CURR_DESC_PTR, val)
1376#define bfin_read_DMA16_CURR_ADDR() bfin_read32(DMA16_CURR_ADDR)
1377#define bfin_write_DMA16_CURR_ADDR(val) bfin_write32(DMA16_CURR_ADDR, val)
1378#define bfin_read_DMA16_IRQ_STATUS() bfin_read16(DMA16_IRQ_STATUS)
1379#define bfin_write_DMA16_IRQ_STATUS(val) bfin_write16(DMA16_IRQ_STATUS, val)
1380#define bfin_read_DMA16_PERIPHERAL_MAP() bfin_read16(DMA16_PERIPHERAL_MAP)
1381#define bfin_write_DMA16_PERIPHERAL_MAP(val) bfin_write16(DMA16_PERIPHERAL_MAP, val)
1382#define bfin_read_DMA16_CURR_X_COUNT() bfin_read16(DMA16_CURR_X_COUNT)
1383#define bfin_write_DMA16_CURR_X_COUNT(val) bfin_write16(DMA16_CURR_X_COUNT, val)
1384#define bfin_read_DMA16_CURR_Y_COUNT() bfin_read16(DMA16_CURR_Y_COUNT)
1385#define bfin_write_DMA16_CURR_Y_COUNT(val) bfin_write16(DMA16_CURR_Y_COUNT, val)
1386
1387/* DMA Channel 17 Registers */
1388
1389#define bfin_read_DMA17_NEXT_DESC_PTR() bfin_read32(DMA17_NEXT_DESC_PTR)
1390#define bfin_write_DMA17_NEXT_DESC_PTR(val) bfin_write32(DMA17_NEXT_DESC_PTR, val)
1391#define bfin_read_DMA17_START_ADDR() bfin_read32(DMA17_START_ADDR)
1392#define bfin_write_DMA17_START_ADDR(val) bfin_write32(DMA17_START_ADDR, val)
1393#define bfin_read_DMA17_CONFIG() bfin_read16(DMA17_CONFIG)
1394#define bfin_write_DMA17_CONFIG(val) bfin_write16(DMA17_CONFIG, val)
1395#define bfin_read_DMA17_X_COUNT() bfin_read16(DMA17_X_COUNT)
1396#define bfin_write_DMA17_X_COUNT(val) bfin_write16(DMA17_X_COUNT, val)
1397#define bfin_read_DMA17_X_MODIFY() bfin_read16(DMA17_X_MODIFY)
1398#define bfin_write_DMA17_X_MODIFY(val) bfin_write16(DMA17_X_MODIFY, val)
1399#define bfin_read_DMA17_Y_COUNT() bfin_read16(DMA17_Y_COUNT)
1400#define bfin_write_DMA17_Y_COUNT(val) bfin_write16(DMA17_Y_COUNT, val)
1401#define bfin_read_DMA17_Y_MODIFY() bfin_read16(DMA17_Y_MODIFY)
1402#define bfin_write_DMA17_Y_MODIFY(val) bfin_write16(DMA17_Y_MODIFY, val)
1403#define bfin_read_DMA17_CURR_DESC_PTR() bfin_read32(DMA17_CURR_DESC_PTR)
1404#define bfin_write_DMA17_CURR_DESC_PTR(val) bfin_write32(DMA17_CURR_DESC_PTR, val)
1405#define bfin_read_DMA17_CURR_ADDR() bfin_read32(DMA17_CURR_ADDR)
1406#define bfin_write_DMA17_CURR_ADDR(val) bfin_write32(DMA17_CURR_ADDR, val)
1407#define bfin_read_DMA17_IRQ_STATUS() bfin_read16(DMA17_IRQ_STATUS)
1408#define bfin_write_DMA17_IRQ_STATUS(val) bfin_write16(DMA17_IRQ_STATUS, val)
1409#define bfin_read_DMA17_PERIPHERAL_MAP() bfin_read16(DMA17_PERIPHERAL_MAP)
1410#define bfin_write_DMA17_PERIPHERAL_MAP(val) bfin_write16(DMA17_PERIPHERAL_MAP, val)
1411#define bfin_read_DMA17_CURR_X_COUNT() bfin_read16(DMA17_CURR_X_COUNT)
1412#define bfin_write_DMA17_CURR_X_COUNT(val) bfin_write16(DMA17_CURR_X_COUNT, val)
1413#define bfin_read_DMA17_CURR_Y_COUNT() bfin_read16(DMA17_CURR_Y_COUNT)
1414#define bfin_write_DMA17_CURR_Y_COUNT(val) bfin_write16(DMA17_CURR_Y_COUNT, val)
1415
1416/* DMA Channel 18 Registers */
1417
1418#define bfin_read_DMA18_NEXT_DESC_PTR() bfin_read32(DMA18_NEXT_DESC_PTR)
1419#define bfin_write_DMA18_NEXT_DESC_PTR(val) bfin_write32(DMA18_NEXT_DESC_PTR, val)
1420#define bfin_read_DMA18_START_ADDR() bfin_read32(DMA18_START_ADDR)
1421#define bfin_write_DMA18_START_ADDR(val) bfin_write32(DMA18_START_ADDR, val)
1422#define bfin_read_DMA18_CONFIG() bfin_read16(DMA18_CONFIG)
1423#define bfin_write_DMA18_CONFIG(val) bfin_write16(DMA18_CONFIG, val)
1424#define bfin_read_DMA18_X_COUNT() bfin_read16(DMA18_X_COUNT)
1425#define bfin_write_DMA18_X_COUNT(val) bfin_write16(DMA18_X_COUNT, val)
1426#define bfin_read_DMA18_X_MODIFY() bfin_read16(DMA18_X_MODIFY)
1427#define bfin_write_DMA18_X_MODIFY(val) bfin_write16(DMA18_X_MODIFY, val)
1428#define bfin_read_DMA18_Y_COUNT() bfin_read16(DMA18_Y_COUNT)
1429#define bfin_write_DMA18_Y_COUNT(val) bfin_write16(DMA18_Y_COUNT, val)
1430#define bfin_read_DMA18_Y_MODIFY() bfin_read16(DMA18_Y_MODIFY)
1431#define bfin_write_DMA18_Y_MODIFY(val) bfin_write16(DMA18_Y_MODIFY, val)
1432#define bfin_read_DMA18_CURR_DESC_PTR() bfin_read32(DMA18_CURR_DESC_PTR)
1433#define bfin_write_DMA18_CURR_DESC_PTR(val) bfin_write32(DMA18_CURR_DESC_PTR, val)
1434#define bfin_read_DMA18_CURR_ADDR() bfin_read32(DMA18_CURR_ADDR)
1435#define bfin_write_DMA18_CURR_ADDR(val) bfin_write32(DMA18_CURR_ADDR, val)
1436#define bfin_read_DMA18_IRQ_STATUS() bfin_read16(DMA18_IRQ_STATUS)
1437#define bfin_write_DMA18_IRQ_STATUS(val) bfin_write16(DMA18_IRQ_STATUS, val)
1438#define bfin_read_DMA18_PERIPHERAL_MAP() bfin_read16(DMA18_PERIPHERAL_MAP)
1439#define bfin_write_DMA18_PERIPHERAL_MAP(val) bfin_write16(DMA18_PERIPHERAL_MAP, val)
1440#define bfin_read_DMA18_CURR_X_COUNT() bfin_read16(DMA18_CURR_X_COUNT)
1441#define bfin_write_DMA18_CURR_X_COUNT(val) bfin_write16(DMA18_CURR_X_COUNT, val)
1442#define bfin_read_DMA18_CURR_Y_COUNT() bfin_read16(DMA18_CURR_Y_COUNT)
1443#define bfin_write_DMA18_CURR_Y_COUNT(val) bfin_write16(DMA18_CURR_Y_COUNT, val)
1444
1445/* DMA Channel 19 Registers */
1446
1447#define bfin_read_DMA19_NEXT_DESC_PTR() bfin_read32(DMA19_NEXT_DESC_PTR)
1448#define bfin_write_DMA19_NEXT_DESC_PTR(val) bfin_write32(DMA19_NEXT_DESC_PTR, val)
1449#define bfin_read_DMA19_START_ADDR() bfin_read32(DMA19_START_ADDR)
1450#define bfin_write_DMA19_START_ADDR(val) bfin_write32(DMA19_START_ADDR, val)
1451#define bfin_read_DMA19_CONFIG() bfin_read16(DMA19_CONFIG)
1452#define bfin_write_DMA19_CONFIG(val) bfin_write16(DMA19_CONFIG, val)
1453#define bfin_read_DMA19_X_COUNT() bfin_read16(DMA19_X_COUNT)
1454#define bfin_write_DMA19_X_COUNT(val) bfin_write16(DMA19_X_COUNT, val)
1455#define bfin_read_DMA19_X_MODIFY() bfin_read16(DMA19_X_MODIFY)
1456#define bfin_write_DMA19_X_MODIFY(val) bfin_write16(DMA19_X_MODIFY, val)
1457#define bfin_read_DMA19_Y_COUNT() bfin_read16(DMA19_Y_COUNT)
1458#define bfin_write_DMA19_Y_COUNT(val) bfin_write16(DMA19_Y_COUNT, val)
1459#define bfin_read_DMA19_Y_MODIFY() bfin_read16(DMA19_Y_MODIFY)
1460#define bfin_write_DMA19_Y_MODIFY(val) bfin_write16(DMA19_Y_MODIFY, val)
1461#define bfin_read_DMA19_CURR_DESC_PTR() bfin_read32(DMA19_CURR_DESC_PTR)
1462#define bfin_write_DMA19_CURR_DESC_PTR(val) bfin_write32(DMA19_CURR_DESC_PTR, val)
1463#define bfin_read_DMA19_CURR_ADDR() bfin_read32(DMA19_CURR_ADDR)
1464#define bfin_write_DMA19_CURR_ADDR(val) bfin_write32(DMA19_CURR_ADDR, val)
1465#define bfin_read_DMA19_IRQ_STATUS() bfin_read16(DMA19_IRQ_STATUS)
1466#define bfin_write_DMA19_IRQ_STATUS(val) bfin_write16(DMA19_IRQ_STATUS, val)
1467#define bfin_read_DMA19_PERIPHERAL_MAP() bfin_read16(DMA19_PERIPHERAL_MAP)
1468#define bfin_write_DMA19_PERIPHERAL_MAP(val) bfin_write16(DMA19_PERIPHERAL_MAP, val)
1469#define bfin_read_DMA19_CURR_X_COUNT() bfin_read16(DMA19_CURR_X_COUNT)
1470#define bfin_write_DMA19_CURR_X_COUNT(val) bfin_write16(DMA19_CURR_X_COUNT, val)
1471#define bfin_read_DMA19_CURR_Y_COUNT() bfin_read16(DMA19_CURR_Y_COUNT)
1472#define bfin_write_DMA19_CURR_Y_COUNT(val) bfin_write16(DMA19_CURR_Y_COUNT, val)
1473
1474/* DMA Channel 20 Registers */
1475
1476#define bfin_read_DMA20_NEXT_DESC_PTR() bfin_read32(DMA20_NEXT_DESC_PTR)
1477#define bfin_write_DMA20_NEXT_DESC_PTR(val) bfin_write32(DMA20_NEXT_DESC_PTR, val)
1478#define bfin_read_DMA20_START_ADDR() bfin_read32(DMA20_START_ADDR)
1479#define bfin_write_DMA20_START_ADDR(val) bfin_write32(DMA20_START_ADDR, val)
1480#define bfin_read_DMA20_CONFIG() bfin_read16(DMA20_CONFIG)
1481#define bfin_write_DMA20_CONFIG(val) bfin_write16(DMA20_CONFIG, val)
1482#define bfin_read_DMA20_X_COUNT() bfin_read16(DMA20_X_COUNT)
1483#define bfin_write_DMA20_X_COUNT(val) bfin_write16(DMA20_X_COUNT, val)
1484#define bfin_read_DMA20_X_MODIFY() bfin_read16(DMA20_X_MODIFY)
1485#define bfin_write_DMA20_X_MODIFY(val) bfin_write16(DMA20_X_MODIFY, val)
1486#define bfin_read_DMA20_Y_COUNT() bfin_read16(DMA20_Y_COUNT)
1487#define bfin_write_DMA20_Y_COUNT(val) bfin_write16(DMA20_Y_COUNT, val)
1488#define bfin_read_DMA20_Y_MODIFY() bfin_read16(DMA20_Y_MODIFY)
1489#define bfin_write_DMA20_Y_MODIFY(val) bfin_write16(DMA20_Y_MODIFY, val)
1490#define bfin_read_DMA20_CURR_DESC_PTR() bfin_read32(DMA20_CURR_DESC_PTR)
1491#define bfin_write_DMA20_CURR_DESC_PTR(val) bfin_write32(DMA20_CURR_DESC_PTR, val)
1492#define bfin_read_DMA20_CURR_ADDR() bfin_read32(DMA20_CURR_ADDR)
1493#define bfin_write_DMA20_CURR_ADDR(val) bfin_write32(DMA20_CURR_ADDR, val)
1494#define bfin_read_DMA20_IRQ_STATUS() bfin_read16(DMA20_IRQ_STATUS)
1495#define bfin_write_DMA20_IRQ_STATUS(val) bfin_write16(DMA20_IRQ_STATUS, val)
1496#define bfin_read_DMA20_PERIPHERAL_MAP() bfin_read16(DMA20_PERIPHERAL_MAP)
1497#define bfin_write_DMA20_PERIPHERAL_MAP(val) bfin_write16(DMA20_PERIPHERAL_MAP, val)
1498#define bfin_read_DMA20_CURR_X_COUNT() bfin_read16(DMA20_CURR_X_COUNT)
1499#define bfin_write_DMA20_CURR_X_COUNT(val) bfin_write16(DMA20_CURR_X_COUNT, val)
1500#define bfin_read_DMA20_CURR_Y_COUNT() bfin_read16(DMA20_CURR_Y_COUNT)
1501#define bfin_write_DMA20_CURR_Y_COUNT(val) bfin_write16(DMA20_CURR_Y_COUNT, val)
1502
1503/* DMA Channel 21 Registers */
1504
1505#define bfin_read_DMA21_NEXT_DESC_PTR() bfin_read32(DMA21_NEXT_DESC_PTR)
1506#define bfin_write_DMA21_NEXT_DESC_PTR(val) bfin_write32(DMA21_NEXT_DESC_PTR, val)
1507#define bfin_read_DMA21_START_ADDR() bfin_read32(DMA21_START_ADDR)
1508#define bfin_write_DMA21_START_ADDR(val) bfin_write32(DMA21_START_ADDR, val)
1509#define bfin_read_DMA21_CONFIG() bfin_read16(DMA21_CONFIG)
1510#define bfin_write_DMA21_CONFIG(val) bfin_write16(DMA21_CONFIG, val)
1511#define bfin_read_DMA21_X_COUNT() bfin_read16(DMA21_X_COUNT)
1512#define bfin_write_DMA21_X_COUNT(val) bfin_write16(DMA21_X_COUNT, val)
1513#define bfin_read_DMA21_X_MODIFY() bfin_read16(DMA21_X_MODIFY)
1514#define bfin_write_DMA21_X_MODIFY(val) bfin_write16(DMA21_X_MODIFY, val)
1515#define bfin_read_DMA21_Y_COUNT() bfin_read16(DMA21_Y_COUNT)
1516#define bfin_write_DMA21_Y_COUNT(val) bfin_write16(DMA21_Y_COUNT, val)
1517#define bfin_read_DMA21_Y_MODIFY() bfin_read16(DMA21_Y_MODIFY)
1518#define bfin_write_DMA21_Y_MODIFY(val) bfin_write16(DMA21_Y_MODIFY, val)
1519#define bfin_read_DMA21_CURR_DESC_PTR() bfin_read32(DMA21_CURR_DESC_PTR)
1520#define bfin_write_DMA21_CURR_DESC_PTR(val) bfin_write32(DMA21_CURR_DESC_PTR, val)
1521#define bfin_read_DMA21_CURR_ADDR() bfin_read32(DMA21_CURR_ADDR)
1522#define bfin_write_DMA21_CURR_ADDR(val) bfin_write32(DMA21_CURR_ADDR, val)
1523#define bfin_read_DMA21_IRQ_STATUS() bfin_read16(DMA21_IRQ_STATUS)
1524#define bfin_write_DMA21_IRQ_STATUS(val) bfin_write16(DMA21_IRQ_STATUS, val)
1525#define bfin_read_DMA21_PERIPHERAL_MAP() bfin_read16(DMA21_PERIPHERAL_MAP)
1526#define bfin_write_DMA21_PERIPHERAL_MAP(val) bfin_write16(DMA21_PERIPHERAL_MAP, val)
1527#define bfin_read_DMA21_CURR_X_COUNT() bfin_read16(DMA21_CURR_X_COUNT)
1528#define bfin_write_DMA21_CURR_X_COUNT(val) bfin_write16(DMA21_CURR_X_COUNT, val)
1529#define bfin_read_DMA21_CURR_Y_COUNT() bfin_read16(DMA21_CURR_Y_COUNT)
1530#define bfin_write_DMA21_CURR_Y_COUNT(val) bfin_write16(DMA21_CURR_Y_COUNT, val)
1531
1532/* DMA Channel 22 Registers */
1533
1534#define bfin_read_DMA22_NEXT_DESC_PTR() bfin_read32(DMA22_NEXT_DESC_PTR)
1535#define bfin_write_DMA22_NEXT_DESC_PTR(val) bfin_write32(DMA22_NEXT_DESC_PTR, val)
1536#define bfin_read_DMA22_START_ADDR() bfin_read32(DMA22_START_ADDR)
1537#define bfin_write_DMA22_START_ADDR(val) bfin_write32(DMA22_START_ADDR, val)
1538#define bfin_read_DMA22_CONFIG() bfin_read16(DMA22_CONFIG)
1539#define bfin_write_DMA22_CONFIG(val) bfin_write16(DMA22_CONFIG, val)
1540#define bfin_read_DMA22_X_COUNT() bfin_read16(DMA22_X_COUNT)
1541#define bfin_write_DMA22_X_COUNT(val) bfin_write16(DMA22_X_COUNT, val)
1542#define bfin_read_DMA22_X_MODIFY() bfin_read16(DMA22_X_MODIFY)
1543#define bfin_write_DMA22_X_MODIFY(val) bfin_write16(DMA22_X_MODIFY, val)
1544#define bfin_read_DMA22_Y_COUNT() bfin_read16(DMA22_Y_COUNT)
1545#define bfin_write_DMA22_Y_COUNT(val) bfin_write16(DMA22_Y_COUNT, val)
1546#define bfin_read_DMA22_Y_MODIFY() bfin_read16(DMA22_Y_MODIFY)
1547#define bfin_write_DMA22_Y_MODIFY(val) bfin_write16(DMA22_Y_MODIFY, val)
1548#define bfin_read_DMA22_CURR_DESC_PTR() bfin_read32(DMA22_CURR_DESC_PTR)
1549#define bfin_write_DMA22_CURR_DESC_PTR(val) bfin_write32(DMA22_CURR_DESC_PTR, val)
1550#define bfin_read_DMA22_CURR_ADDR() bfin_read32(DMA22_CURR_ADDR)
1551#define bfin_write_DMA22_CURR_ADDR(val) bfin_write32(DMA22_CURR_ADDR, val)
1552#define bfin_read_DMA22_IRQ_STATUS() bfin_read16(DMA22_IRQ_STATUS)
1553#define bfin_write_DMA22_IRQ_STATUS(val) bfin_write16(DMA22_IRQ_STATUS, val)
1554#define bfin_read_DMA22_PERIPHERAL_MAP() bfin_read16(DMA22_PERIPHERAL_MAP)
1555#define bfin_write_DMA22_PERIPHERAL_MAP(val) bfin_write16(DMA22_PERIPHERAL_MAP, val)
1556#define bfin_read_DMA22_CURR_X_COUNT() bfin_read16(DMA22_CURR_X_COUNT)
1557#define bfin_write_DMA22_CURR_X_COUNT(val) bfin_write16(DMA22_CURR_X_COUNT, val)
1558#define bfin_read_DMA22_CURR_Y_COUNT() bfin_read16(DMA22_CURR_Y_COUNT)
1559#define bfin_write_DMA22_CURR_Y_COUNT(val) bfin_write16(DMA22_CURR_Y_COUNT, val)
1560
1561/* DMA Channel 23 Registers */
1562
1563#define bfin_read_DMA23_NEXT_DESC_PTR() bfin_read32(DMA23_NEXT_DESC_PTR)
1564#define bfin_write_DMA23_NEXT_DESC_PTR(val) bfin_write32(DMA23_NEXT_DESC_PTR, val)
1565#define bfin_read_DMA23_START_ADDR() bfin_read32(DMA23_START_ADDR)
1566#define bfin_write_DMA23_START_ADDR(val) bfin_write32(DMA23_START_ADDR, val)
1567#define bfin_read_DMA23_CONFIG() bfin_read16(DMA23_CONFIG)
1568#define bfin_write_DMA23_CONFIG(val) bfin_write16(DMA23_CONFIG, val)
1569#define bfin_read_DMA23_X_COUNT() bfin_read16(DMA23_X_COUNT)
1570#define bfin_write_DMA23_X_COUNT(val) bfin_write16(DMA23_X_COUNT, val)
1571#define bfin_read_DMA23_X_MODIFY() bfin_read16(DMA23_X_MODIFY)
1572#define bfin_write_DMA23_X_MODIFY(val) bfin_write16(DMA23_X_MODIFY, val)
1573#define bfin_read_DMA23_Y_COUNT() bfin_read16(DMA23_Y_COUNT)
1574#define bfin_write_DMA23_Y_COUNT(val) bfin_write16(DMA23_Y_COUNT, val)
1575#define bfin_read_DMA23_Y_MODIFY() bfin_read16(DMA23_Y_MODIFY)
1576#define bfin_write_DMA23_Y_MODIFY(val) bfin_write16(DMA23_Y_MODIFY, val)
1577#define bfin_read_DMA23_CURR_DESC_PTR() bfin_read32(DMA23_CURR_DESC_PTR)
1578#define bfin_write_DMA23_CURR_DESC_PTR(val) bfin_write32(DMA23_CURR_DESC_PTR, val)
1579#define bfin_read_DMA23_CURR_ADDR() bfin_read32(DMA23_CURR_ADDR)
1580#define bfin_write_DMA23_CURR_ADDR(val) bfin_write32(DMA23_CURR_ADDR, val)
1581#define bfin_read_DMA23_IRQ_STATUS() bfin_read16(DMA23_IRQ_STATUS)
1582#define bfin_write_DMA23_IRQ_STATUS(val) bfin_write16(DMA23_IRQ_STATUS, val)
1583#define bfin_read_DMA23_PERIPHERAL_MAP() bfin_read16(DMA23_PERIPHERAL_MAP)
1584#define bfin_write_DMA23_PERIPHERAL_MAP(val) bfin_write16(DMA23_PERIPHERAL_MAP, val)
1585#define bfin_read_DMA23_CURR_X_COUNT() bfin_read16(DMA23_CURR_X_COUNT)
1586#define bfin_write_DMA23_CURR_X_COUNT(val) bfin_write16(DMA23_CURR_X_COUNT, val)
1587#define bfin_read_DMA23_CURR_Y_COUNT() bfin_read16(DMA23_CURR_Y_COUNT)
1588#define bfin_write_DMA23_CURR_Y_COUNT(val) bfin_write16(DMA23_CURR_Y_COUNT, val)
1589
1590/* MDMA Stream 2 Registers */
1591
1592#define bfin_read_MDMA_D2_NEXT_DESC_PTR() bfin_read32(MDMA_D2_NEXT_DESC_PTR)
1593#define bfin_write_MDMA_D2_NEXT_DESC_PTR(val) bfin_write32(MDMA_D2_NEXT_DESC_PTR, val)
1594#define bfin_read_MDMA_D2_START_ADDR() bfin_read32(MDMA_D2_START_ADDR)
1595#define bfin_write_MDMA_D2_START_ADDR(val) bfin_write32(MDMA_D2_START_ADDR, val)
1596#define bfin_read_MDMA_D2_CONFIG() bfin_read16(MDMA_D2_CONFIG)
1597#define bfin_write_MDMA_D2_CONFIG(val) bfin_write16(MDMA_D2_CONFIG, val)
1598#define bfin_read_MDMA_D2_X_COUNT() bfin_read16(MDMA_D2_X_COUNT)
1599#define bfin_write_MDMA_D2_X_COUNT(val) bfin_write16(MDMA_D2_X_COUNT, val)
1600#define bfin_read_MDMA_D2_X_MODIFY() bfin_read16(MDMA_D2_X_MODIFY)
1601#define bfin_write_MDMA_D2_X_MODIFY(val) bfin_write16(MDMA_D2_X_MODIFY, val)
1602#define bfin_read_MDMA_D2_Y_COUNT() bfin_read16(MDMA_D2_Y_COUNT)
1603#define bfin_write_MDMA_D2_Y_COUNT(val) bfin_write16(MDMA_D2_Y_COUNT, val)
1604#define bfin_read_MDMA_D2_Y_MODIFY() bfin_read16(MDMA_D2_Y_MODIFY)
1605#define bfin_write_MDMA_D2_Y_MODIFY(val) bfin_write16(MDMA_D2_Y_MODIFY, val)
1606#define bfin_read_MDMA_D2_CURR_DESC_PTR() bfin_read32(MDMA_D2_CURR_DESC_PTR)
1607#define bfin_write_MDMA_D2_CURR_DESC_PTR(val) bfin_write32(MDMA_D2_CURR_DESC_PTR, val)
1608#define bfin_read_MDMA_D2_CURR_ADDR() bfin_read32(MDMA_D2_CURR_ADDR)
1609#define bfin_write_MDMA_D2_CURR_ADDR(val) bfin_write32(MDMA_D2_CURR_ADDR, val)
1610#define bfin_read_MDMA_D2_IRQ_STATUS() bfin_read16(MDMA_D2_IRQ_STATUS)
1611#define bfin_write_MDMA_D2_IRQ_STATUS(val) bfin_write16(MDMA_D2_IRQ_STATUS, val)
1612#define bfin_read_MDMA_D2_PERIPHERAL_MAP() bfin_read16(MDMA_D2_PERIPHERAL_MAP)
1613#define bfin_write_MDMA_D2_PERIPHERAL_MAP(val) bfin_write16(MDMA_D2_PERIPHERAL_MAP, val)
1614#define bfin_read_MDMA_D2_CURR_X_COUNT() bfin_read16(MDMA_D2_CURR_X_COUNT)
1615#define bfin_write_MDMA_D2_CURR_X_COUNT(val) bfin_write16(MDMA_D2_CURR_X_COUNT, val)
1616#define bfin_read_MDMA_D2_CURR_Y_COUNT() bfin_read16(MDMA_D2_CURR_Y_COUNT)
1617#define bfin_write_MDMA_D2_CURR_Y_COUNT(val) bfin_write16(MDMA_D2_CURR_Y_COUNT, val)
1618#define bfin_read_MDMA_S2_NEXT_DESC_PTR() bfin_read32(MDMA_S2_NEXT_DESC_PTR)
1619#define bfin_write_MDMA_S2_NEXT_DESC_PTR(val) bfin_write32(MDMA_S2_NEXT_DESC_PTR, val)
1620#define bfin_read_MDMA_S2_START_ADDR() bfin_read32(MDMA_S2_START_ADDR)
1621#define bfin_write_MDMA_S2_START_ADDR(val) bfin_write32(MDMA_S2_START_ADDR, val)
1622#define bfin_read_MDMA_S2_CONFIG() bfin_read16(MDMA_S2_CONFIG)
1623#define bfin_write_MDMA_S2_CONFIG(val) bfin_write16(MDMA_S2_CONFIG, val)
1624#define bfin_read_MDMA_S2_X_COUNT() bfin_read16(MDMA_S2_X_COUNT)
1625#define bfin_write_MDMA_S2_X_COUNT(val) bfin_write16(MDMA_S2_X_COUNT, val)
1626#define bfin_read_MDMA_S2_X_MODIFY() bfin_read16(MDMA_S2_X_MODIFY)
1627#define bfin_write_MDMA_S2_X_MODIFY(val) bfin_write16(MDMA_S2_X_MODIFY, val)
1628#define bfin_read_MDMA_S2_Y_COUNT() bfin_read16(MDMA_S2_Y_COUNT)
1629#define bfin_write_MDMA_S2_Y_COUNT(val) bfin_write16(MDMA_S2_Y_COUNT, val)
1630#define bfin_read_MDMA_S2_Y_MODIFY() bfin_read16(MDMA_S2_Y_MODIFY)
1631#define bfin_write_MDMA_S2_Y_MODIFY(val) bfin_write16(MDMA_S2_Y_MODIFY, val)
1632#define bfin_read_MDMA_S2_CURR_DESC_PTR() bfin_read32(MDMA_S2_CURR_DESC_PTR)
1633#define bfin_write_MDMA_S2_CURR_DESC_PTR(val) bfin_write32(MDMA_S2_CURR_DESC_PTR, val)
1634#define bfin_read_MDMA_S2_CURR_ADDR() bfin_read32(MDMA_S2_CURR_ADDR)
1635#define bfin_write_MDMA_S2_CURR_ADDR(val) bfin_write32(MDMA_S2_CURR_ADDR, val)
1636#define bfin_read_MDMA_S2_IRQ_STATUS() bfin_read16(MDMA_S2_IRQ_STATUS)
1637#define bfin_write_MDMA_S2_IRQ_STATUS(val) bfin_write16(MDMA_S2_IRQ_STATUS, val)
1638#define bfin_read_MDMA_S2_PERIPHERAL_MAP() bfin_read16(MDMA_S2_PERIPHERAL_MAP)
1639#define bfin_write_MDMA_S2_PERIPHERAL_MAP(val) bfin_write16(MDMA_S2_PERIPHERAL_MAP, val)
1640#define bfin_read_MDMA_S2_CURR_X_COUNT() bfin_read16(MDMA_S2_CURR_X_COUNT)
1641#define bfin_write_MDMA_S2_CURR_X_COUNT(val) bfin_write16(MDMA_S2_CURR_X_COUNT, val)
1642#define bfin_read_MDMA_S2_CURR_Y_COUNT() bfin_read16(MDMA_S2_CURR_Y_COUNT)
1643#define bfin_write_MDMA_S2_CURR_Y_COUNT(val) bfin_write16(MDMA_S2_CURR_Y_COUNT, val)
1644
1645/* MDMA Stream 3 Registers */
1646
1647#define bfin_read_MDMA_D3_NEXT_DESC_PTR() bfin_read32(MDMA_D3_NEXT_DESC_PTR)
1648#define bfin_write_MDMA_D3_NEXT_DESC_PTR(val) bfin_write32(MDMA_D3_NEXT_DESC_PTR, val)
1649#define bfin_read_MDMA_D3_START_ADDR() bfin_read32(MDMA_D3_START_ADDR)
1650#define bfin_write_MDMA_D3_START_ADDR(val) bfin_write32(MDMA_D3_START_ADDR, val)
1651#define bfin_read_MDMA_D3_CONFIG() bfin_read16(MDMA_D3_CONFIG)
1652#define bfin_write_MDMA_D3_CONFIG(val) bfin_write16(MDMA_D3_CONFIG, val)
1653#define bfin_read_MDMA_D3_X_COUNT() bfin_read16(MDMA_D3_X_COUNT)
1654#define bfin_write_MDMA_D3_X_COUNT(val) bfin_write16(MDMA_D3_X_COUNT, val)
1655#define bfin_read_MDMA_D3_X_MODIFY() bfin_read16(MDMA_D3_X_MODIFY)
1656#define bfin_write_MDMA_D3_X_MODIFY(val) bfin_write16(MDMA_D3_X_MODIFY, val)
1657#define bfin_read_MDMA_D3_Y_COUNT() bfin_read16(MDMA_D3_Y_COUNT)
1658#define bfin_write_MDMA_D3_Y_COUNT(val) bfin_write16(MDMA_D3_Y_COUNT, val)
1659#define bfin_read_MDMA_D3_Y_MODIFY() bfin_read16(MDMA_D3_Y_MODIFY)
1660#define bfin_write_MDMA_D3_Y_MODIFY(val) bfin_write16(MDMA_D3_Y_MODIFY, val)
1661#define bfin_read_MDMA_D3_CURR_DESC_PTR() bfin_read32(MDMA_D3_CURR_DESC_PTR)
1662#define bfin_write_MDMA_D3_CURR_DESC_PTR(val) bfin_write32(MDMA_D3_CURR_DESC_PTR, val)
1663#define bfin_read_MDMA_D3_CURR_ADDR() bfin_read32(MDMA_D3_CURR_ADDR)
1664#define bfin_write_MDMA_D3_CURR_ADDR(val) bfin_write32(MDMA_D3_CURR_ADDR, val)
1665#define bfin_read_MDMA_D3_IRQ_STATUS() bfin_read16(MDMA_D3_IRQ_STATUS)
1666#define bfin_write_MDMA_D3_IRQ_STATUS(val) bfin_write16(MDMA_D3_IRQ_STATUS, val)
1667#define bfin_read_MDMA_D3_PERIPHERAL_MAP() bfin_read16(MDMA_D3_PERIPHERAL_MAP)
1668#define bfin_write_MDMA_D3_PERIPHERAL_MAP(val) bfin_write16(MDMA_D3_PERIPHERAL_MAP, val)
1669#define bfin_read_MDMA_D3_CURR_X_COUNT() bfin_read16(MDMA_D3_CURR_X_COUNT)
1670#define bfin_write_MDMA_D3_CURR_X_COUNT(val) bfin_write16(MDMA_D3_CURR_X_COUNT, val)
1671#define bfin_read_MDMA_D3_CURR_Y_COUNT() bfin_read16(MDMA_D3_CURR_Y_COUNT)
1672#define bfin_write_MDMA_D3_CURR_Y_COUNT(val) bfin_write16(MDMA_D3_CURR_Y_COUNT, val)
1673#define bfin_read_MDMA_S3_NEXT_DESC_PTR() bfin_read32(MDMA_S3_NEXT_DESC_PTR)
1674#define bfin_write_MDMA_S3_NEXT_DESC_PTR(val) bfin_write32(MDMA_S3_NEXT_DESC_PTR, val)
1675#define bfin_read_MDMA_S3_START_ADDR() bfin_read32(MDMA_S3_START_ADDR)
1676#define bfin_write_MDMA_S3_START_ADDR(val) bfin_write32(MDMA_S3_START_ADDR, val)
1677#define bfin_read_MDMA_S3_CONFIG() bfin_read16(MDMA_S3_CONFIG)
1678#define bfin_write_MDMA_S3_CONFIG(val) bfin_write16(MDMA_S3_CONFIG, val)
1679#define bfin_read_MDMA_S3_X_COUNT() bfin_read16(MDMA_S3_X_COUNT)
1680#define bfin_write_MDMA_S3_X_COUNT(val) bfin_write16(MDMA_S3_X_COUNT, val)
1681#define bfin_read_MDMA_S3_X_MODIFY() bfin_read16(MDMA_S3_X_MODIFY)
1682#define bfin_write_MDMA_S3_X_MODIFY(val) bfin_write16(MDMA_S3_X_MODIFY, val)
1683#define bfin_read_MDMA_S3_Y_COUNT() bfin_read16(MDMA_S3_Y_COUNT)
1684#define bfin_write_MDMA_S3_Y_COUNT(val) bfin_write16(MDMA_S3_Y_COUNT, val)
1685#define bfin_read_MDMA_S3_Y_MODIFY() bfin_read16(MDMA_S3_Y_MODIFY)
1686#define bfin_write_MDMA_S3_Y_MODIFY(val) bfin_write16(MDMA_S3_Y_MODIFY, val)
1687#define bfin_read_MDMA_S3_CURR_DESC_PTR() bfin_read32(MDMA_S3_CURR_DESC_PTR)
1688#define bfin_write_MDMA_S3_CURR_DESC_PTR(val) bfin_write32(MDMA_S3_CURR_DESC_PTR, val)
1689#define bfin_read_MDMA_S3_CURR_ADDR() bfin_read32(MDMA_S3_CURR_ADDR)
1690#define bfin_write_MDMA_S3_CURR_ADDR(val) bfin_write32(MDMA_S3_CURR_ADDR, val)
1691#define bfin_read_MDMA_S3_IRQ_STATUS() bfin_read16(MDMA_S3_IRQ_STATUS)
1692#define bfin_write_MDMA_S3_IRQ_STATUS(val) bfin_write16(MDMA_S3_IRQ_STATUS, val)
1693#define bfin_read_MDMA_S3_PERIPHERAL_MAP() bfin_read16(MDMA_S3_PERIPHERAL_MAP)
1694#define bfin_write_MDMA_S3_PERIPHERAL_MAP(val) bfin_write16(MDMA_S3_PERIPHERAL_MAP, val)
1695#define bfin_read_MDMA_S3_CURR_X_COUNT() bfin_read16(MDMA_S3_CURR_X_COUNT)
1696#define bfin_write_MDMA_S3_CURR_X_COUNT(val) bfin_write16(MDMA_S3_CURR_X_COUNT, val)
1697#define bfin_read_MDMA_S3_CURR_Y_COUNT() bfin_read16(MDMA_S3_CURR_Y_COUNT)
1698#define bfin_write_MDMA_S3_CURR_Y_COUNT(val) bfin_write16(MDMA_S3_CURR_Y_COUNT, val)
1699
1700/* UART1 Registers */
1701
1702#define bfin_read_UART1_DLL() bfin_read16(UART1_DLL)
1703#define bfin_write_UART1_DLL(val) bfin_write16(UART1_DLL, val)
1704#define bfin_read_UART1_DLH() bfin_read16(UART1_DLH)
1705#define bfin_write_UART1_DLH(val) bfin_write16(UART1_DLH, val)
1706#define bfin_read_UART1_GCTL() bfin_read16(UART1_GCTL)
1707#define bfin_write_UART1_GCTL(val) bfin_write16(UART1_GCTL, val)
1708#define bfin_read_UART1_LCR() bfin_read16(UART1_LCR)
1709#define bfin_write_UART1_LCR(val) bfin_write16(UART1_LCR, val)
1710#define bfin_read_UART1_MCR() bfin_read16(UART1_MCR)
1711#define bfin_write_UART1_MCR(val) bfin_write16(UART1_MCR, val)
1712#define bfin_read_UART1_LSR() bfin_read16(UART1_LSR)
1713#define bfin_write_UART1_LSR(val) bfin_write16(UART1_LSR, val)
1714#define bfin_read_UART1_MSR() bfin_read16(UART1_MSR)
1715#define bfin_write_UART1_MSR(val) bfin_write16(UART1_MSR, val)
1716#define bfin_read_UART1_SCR() bfin_read16(UART1_SCR)
1717#define bfin_write_UART1_SCR(val) bfin_write16(UART1_SCR, val)
1718#define bfin_read_UART1_IER_SET() bfin_read16(UART1_IER_SET)
1719#define bfin_write_UART1_IER_SET(val) bfin_write16(UART1_IER_SET, val)
1720#define bfin_read_UART1_IER_CLEAR() bfin_read16(UART1_IER_CLEAR)
1721#define bfin_write_UART1_IER_CLEAR(val) bfin_write16(UART1_IER_CLEAR, val)
1722#define bfin_read_UART1_THR() bfin_read16(UART1_THR)
1723#define bfin_write_UART1_THR(val) bfin_write16(UART1_THR, val)
1724#define bfin_read_UART1_RBR() bfin_read16(UART1_RBR)
1725#define bfin_write_UART1_RBR(val) bfin_write16(UART1_RBR, val)
1726
1727/* UART2 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */
1728
1729/* SPI1 Registers */
1730
1731#define bfin_read_SPI1_CTL() bfin_read16(SPI1_CTL)
1732#define bfin_write_SPI1_CTL(val) bfin_write16(SPI1_CTL, val)
1733#define bfin_read_SPI1_FLG() bfin_read16(SPI1_FLG)
1734#define bfin_write_SPI1_FLG(val) bfin_write16(SPI1_FLG, val)
1735#define bfin_read_SPI1_STAT() bfin_read16(SPI1_STAT)
1736#define bfin_write_SPI1_STAT(val) bfin_write16(SPI1_STAT, val)
1737#define bfin_read_SPI1_TDBR() bfin_read16(SPI1_TDBR)
1738#define bfin_write_SPI1_TDBR(val) bfin_write16(SPI1_TDBR, val)
1739#define bfin_read_SPI1_RDBR() bfin_read16(SPI1_RDBR)
1740#define bfin_write_SPI1_RDBR(val) bfin_write16(SPI1_RDBR, val)
1741#define bfin_read_SPI1_BAUD() bfin_read16(SPI1_BAUD)
1742#define bfin_write_SPI1_BAUD(val) bfin_write16(SPI1_BAUD, val)
1743#define bfin_read_SPI1_SHADOW() bfin_read16(SPI1_SHADOW)
1744#define bfin_write_SPI1_SHADOW(val) bfin_write16(SPI1_SHADOW, val)
1745
1746/* SPORT2 Registers */
1747
1748#define bfin_read_SPORT2_TCR1() bfin_read16(SPORT2_TCR1)
1749#define bfin_write_SPORT2_TCR1(val) bfin_write16(SPORT2_TCR1, val)
1750#define bfin_read_SPORT2_TCR2() bfin_read16(SPORT2_TCR2)
1751#define bfin_write_SPORT2_TCR2(val) bfin_write16(SPORT2_TCR2, val)
1752#define bfin_read_SPORT2_TCLKDIV() bfin_read16(SPORT2_TCLKDIV)
1753#define bfin_write_SPORT2_TCLKDIV(val) bfin_write16(SPORT2_TCLKDIV, val)
1754#define bfin_read_SPORT2_TFSDIV() bfin_read16(SPORT2_TFSDIV)
1755#define bfin_write_SPORT2_TFSDIV(val) bfin_write16(SPORT2_TFSDIV, val)
1756#define bfin_read_SPORT2_TX() bfin_read32(SPORT2_TX)
1757#define bfin_write_SPORT2_TX(val) bfin_write32(SPORT2_TX, val)
1758#define bfin_read_SPORT2_RX() bfin_read32(SPORT2_RX)
1759#define bfin_write_SPORT2_RX(val) bfin_write32(SPORT2_RX, val)
1760#define bfin_read_SPORT2_RCR1() bfin_read16(SPORT2_RCR1)
1761#define bfin_write_SPORT2_RCR1(val) bfin_write16(SPORT2_RCR1, val)
1762#define bfin_read_SPORT2_RCR2() bfin_read16(SPORT2_RCR2)
1763#define bfin_write_SPORT2_RCR2(val) bfin_write16(SPORT2_RCR2, val)
1764#define bfin_read_SPORT2_RCLKDIV() bfin_read16(SPORT2_RCLKDIV)
1765#define bfin_write_SPORT2_RCLKDIV(val) bfin_write16(SPORT2_RCLKDIV, val)
1766#define bfin_read_SPORT2_RFSDIV() bfin_read16(SPORT2_RFSDIV)
1767#define bfin_write_SPORT2_RFSDIV(val) bfin_write16(SPORT2_RFSDIV, val)
1768#define bfin_read_SPORT2_STAT() bfin_read16(SPORT2_STAT)
1769#define bfin_write_SPORT2_STAT(val) bfin_write16(SPORT2_STAT, val)
1770#define bfin_read_SPORT2_CHNL() bfin_read16(SPORT2_CHNL)
1771#define bfin_write_SPORT2_CHNL(val) bfin_write16(SPORT2_CHNL, val)
1772#define bfin_read_SPORT2_MCMC1() bfin_read16(SPORT2_MCMC1)
1773#define bfin_write_SPORT2_MCMC1(val) bfin_write16(SPORT2_MCMC1, val)
1774#define bfin_read_SPORT2_MCMC2() bfin_read16(SPORT2_MCMC2)
1775#define bfin_write_SPORT2_MCMC2(val) bfin_write16(SPORT2_MCMC2, val)
1776#define bfin_read_SPORT2_MTCS0() bfin_read32(SPORT2_MTCS0)
1777#define bfin_write_SPORT2_MTCS0(val) bfin_write32(SPORT2_MTCS0, val)
1778#define bfin_read_SPORT2_MTCS1() bfin_read32(SPORT2_MTCS1)
1779#define bfin_write_SPORT2_MTCS1(val) bfin_write32(SPORT2_MTCS1, val)
1780#define bfin_read_SPORT2_MTCS2() bfin_read32(SPORT2_MTCS2)
1781#define bfin_write_SPORT2_MTCS2(val) bfin_write32(SPORT2_MTCS2, val)
1782#define bfin_read_SPORT2_MTCS3() bfin_read32(SPORT2_MTCS3)
1783#define bfin_write_SPORT2_MTCS3(val) bfin_write32(SPORT2_MTCS3, val)
1784#define bfin_read_SPORT2_MRCS0() bfin_read32(SPORT2_MRCS0)
1785#define bfin_write_SPORT2_MRCS0(val) bfin_write32(SPORT2_MRCS0, val)
1786#define bfin_read_SPORT2_MRCS1() bfin_read32(SPORT2_MRCS1)
1787#define bfin_write_SPORT2_MRCS1(val) bfin_write32(SPORT2_MRCS1, val)
1788#define bfin_read_SPORT2_MRCS2() bfin_read32(SPORT2_MRCS2)
1789#define bfin_write_SPORT2_MRCS2(val) bfin_write32(SPORT2_MRCS2, val)
1790#define bfin_read_SPORT2_MRCS3() bfin_read32(SPORT2_MRCS3)
1791#define bfin_write_SPORT2_MRCS3(val) bfin_write32(SPORT2_MRCS3, val)
1792
1793/* SPORT3 Registers */
1794
1795#define bfin_read_SPORT3_TCR1() bfin_read16(SPORT3_TCR1)
1796#define bfin_write_SPORT3_TCR1(val) bfin_write16(SPORT3_TCR1, val)
1797#define bfin_read_SPORT3_TCR2() bfin_read16(SPORT3_TCR2)
1798#define bfin_write_SPORT3_TCR2(val) bfin_write16(SPORT3_TCR2, val)
1799#define bfin_read_SPORT3_TCLKDIV() bfin_read16(SPORT3_TCLKDIV)
1800#define bfin_write_SPORT3_TCLKDIV(val) bfin_write16(SPORT3_TCLKDIV, val)
1801#define bfin_read_SPORT3_TFSDIV() bfin_read16(SPORT3_TFSDIV)
1802#define bfin_write_SPORT3_TFSDIV(val) bfin_write16(SPORT3_TFSDIV, val)
1803#define bfin_read_SPORT3_TX() bfin_read32(SPORT3_TX)
1804#define bfin_write_SPORT3_TX(val) bfin_write32(SPORT3_TX, val)
1805#define bfin_read_SPORT3_RX() bfin_read32(SPORT3_RX)
1806#define bfin_write_SPORT3_RX(val) bfin_write32(SPORT3_RX, val)
1807#define bfin_read_SPORT3_RCR1() bfin_read16(SPORT3_RCR1)
1808#define bfin_write_SPORT3_RCR1(val) bfin_write16(SPORT3_RCR1, val)
1809#define bfin_read_SPORT3_RCR2() bfin_read16(SPORT3_RCR2)
1810#define bfin_write_SPORT3_RCR2(val) bfin_write16(SPORT3_RCR2, val)
1811#define bfin_read_SPORT3_RCLKDIV() bfin_read16(SPORT3_RCLKDIV)
1812#define bfin_write_SPORT3_RCLKDIV(val) bfin_write16(SPORT3_RCLKDIV, val)
1813#define bfin_read_SPORT3_RFSDIV() bfin_read16(SPORT3_RFSDIV)
1814#define bfin_write_SPORT3_RFSDIV(val) bfin_write16(SPORT3_RFSDIV, val)
1815#define bfin_read_SPORT3_STAT() bfin_read16(SPORT3_STAT)
1816#define bfin_write_SPORT3_STAT(val) bfin_write16(SPORT3_STAT, val)
1817#define bfin_read_SPORT3_CHNL() bfin_read16(SPORT3_CHNL)
1818#define bfin_write_SPORT3_CHNL(val) bfin_write16(SPORT3_CHNL, val)
1819#define bfin_read_SPORT3_MCMC1() bfin_read16(SPORT3_MCMC1)
1820#define bfin_write_SPORT3_MCMC1(val) bfin_write16(SPORT3_MCMC1, val)
1821#define bfin_read_SPORT3_MCMC2() bfin_read16(SPORT3_MCMC2)
1822#define bfin_write_SPORT3_MCMC2(val) bfin_write16(SPORT3_MCMC2, val)
1823#define bfin_read_SPORT3_MTCS0() bfin_read32(SPORT3_MTCS0)
1824#define bfin_write_SPORT3_MTCS0(val) bfin_write32(SPORT3_MTCS0, val)
1825#define bfin_read_SPORT3_MTCS1() bfin_read32(SPORT3_MTCS1)
1826#define bfin_write_SPORT3_MTCS1(val) bfin_write32(SPORT3_MTCS1, val)
1827#define bfin_read_SPORT3_MTCS2() bfin_read32(SPORT3_MTCS2)
1828#define bfin_write_SPORT3_MTCS2(val) bfin_write32(SPORT3_MTCS2, val)
1829#define bfin_read_SPORT3_MTCS3() bfin_read32(SPORT3_MTCS3)
1830#define bfin_write_SPORT3_MTCS3(val) bfin_write32(SPORT3_MTCS3, val)
1831#define bfin_read_SPORT3_MRCS0() bfin_read32(SPORT3_MRCS0)
1832#define bfin_write_SPORT3_MRCS0(val) bfin_write32(SPORT3_MRCS0, val)
1833#define bfin_read_SPORT3_MRCS1() bfin_read32(SPORT3_MRCS1)
1834#define bfin_write_SPORT3_MRCS1(val) bfin_write32(SPORT3_MRCS1, val)
1835#define bfin_read_SPORT3_MRCS2() bfin_read32(SPORT3_MRCS2)
1836#define bfin_write_SPORT3_MRCS2(val) bfin_write32(SPORT3_MRCS2, val)
1837#define bfin_read_SPORT3_MRCS3() bfin_read32(SPORT3_MRCS3)
1838#define bfin_write_SPORT3_MRCS3(val) bfin_write32(SPORT3_MRCS3, val)
1839
1840/* EPPI2 Registers */
1841
1842#define bfin_read_EPPI2_STATUS() bfin_read16(EPPI2_STATUS)
1843#define bfin_write_EPPI2_STATUS(val) bfin_write16(EPPI2_STATUS, val)
1844#define bfin_read_EPPI2_HCOUNT() bfin_read16(EPPI2_HCOUNT)
1845#define bfin_write_EPPI2_HCOUNT(val) bfin_write16(EPPI2_HCOUNT, val)
1846#define bfin_read_EPPI2_HDELAY() bfin_read16(EPPI2_HDELAY)
1847#define bfin_write_EPPI2_HDELAY(val) bfin_write16(EPPI2_HDELAY, val)
1848#define bfin_read_EPPI2_VCOUNT() bfin_read16(EPPI2_VCOUNT)
1849#define bfin_write_EPPI2_VCOUNT(val) bfin_write16(EPPI2_VCOUNT, val)
1850#define bfin_read_EPPI2_VDELAY() bfin_read16(EPPI2_VDELAY)
1851#define bfin_write_EPPI2_VDELAY(val) bfin_write16(EPPI2_VDELAY, val)
1852#define bfin_read_EPPI2_FRAME() bfin_read16(EPPI2_FRAME)
1853#define bfin_write_EPPI2_FRAME(val) bfin_write16(EPPI2_FRAME, val)
1854#define bfin_read_EPPI2_LINE() bfin_read16(EPPI2_LINE)
1855#define bfin_write_EPPI2_LINE(val) bfin_write16(EPPI2_LINE, val)
1856#define bfin_read_EPPI2_CLKDIV() bfin_read16(EPPI2_CLKDIV)
1857#define bfin_write_EPPI2_CLKDIV(val) bfin_write16(EPPI2_CLKDIV, val)
1858#define bfin_read_EPPI2_CONTROL() bfin_read32(EPPI2_CONTROL)
1859#define bfin_write_EPPI2_CONTROL(val) bfin_write32(EPPI2_CONTROL, val)
1860#define bfin_read_EPPI2_FS1W_HBL() bfin_read32(EPPI2_FS1W_HBL)
1861#define bfin_write_EPPI2_FS1W_HBL(val) bfin_write32(EPPI2_FS1W_HBL, val)
1862#define bfin_read_EPPI2_FS1P_AVPL() bfin_read32(EPPI2_FS1P_AVPL)
1863#define bfin_write_EPPI2_FS1P_AVPL(val) bfin_write32(EPPI2_FS1P_AVPL, val)
1864#define bfin_read_EPPI2_FS2W_LVB() bfin_read32(EPPI2_FS2W_LVB)
1865#define bfin_write_EPPI2_FS2W_LVB(val) bfin_write32(EPPI2_FS2W_LVB, val)
1866#define bfin_read_EPPI2_FS2P_LAVF() bfin_read32(EPPI2_FS2P_LAVF)
1867#define bfin_write_EPPI2_FS2P_LAVF(val) bfin_write32(EPPI2_FS2P_LAVF, val)
1868#define bfin_read_EPPI2_CLIP() bfin_read32(EPPI2_CLIP)
1869#define bfin_write_EPPI2_CLIP(val) bfin_write32(EPPI2_CLIP, val)
1870
1871/* CAN Controller 0 Config 1 Registers */
1872
1873#define bfin_read_CAN0_MC1() bfin_read16(CAN0_MC1)
1874#define bfin_write_CAN0_MC1(val) bfin_write16(CAN0_MC1, val)
1875#define bfin_read_CAN0_MD1() bfin_read16(CAN0_MD1)
1876#define bfin_write_CAN0_MD1(val) bfin_write16(CAN0_MD1, val)
1877#define bfin_read_CAN0_TRS1() bfin_read16(CAN0_TRS1)
1878#define bfin_write_CAN0_TRS1(val) bfin_write16(CAN0_TRS1, val)
1879#define bfin_read_CAN0_TRR1() bfin_read16(CAN0_TRR1)
1880#define bfin_write_CAN0_TRR1(val) bfin_write16(CAN0_TRR1, val)
1881#define bfin_read_CAN0_TA1() bfin_read16(CAN0_TA1)
1882#define bfin_write_CAN0_TA1(val) bfin_write16(CAN0_TA1, val)
1883#define bfin_read_CAN0_AA1() bfin_read16(CAN0_AA1)
1884#define bfin_write_CAN0_AA1(val) bfin_write16(CAN0_AA1, val)
1885#define bfin_read_CAN0_RMP1() bfin_read16(CAN0_RMP1)
1886#define bfin_write_CAN0_RMP1(val) bfin_write16(CAN0_RMP1, val)
1887#define bfin_read_CAN0_RML1() bfin_read16(CAN0_RML1)
1888#define bfin_write_CAN0_RML1(val) bfin_write16(CAN0_RML1, val)
1889#define bfin_read_CAN0_MBTIF1() bfin_read16(CAN0_MBTIF1)
1890#define bfin_write_CAN0_MBTIF1(val) bfin_write16(CAN0_MBTIF1, val)
1891#define bfin_read_CAN0_MBRIF1() bfin_read16(CAN0_MBRIF1)
1892#define bfin_write_CAN0_MBRIF1(val) bfin_write16(CAN0_MBRIF1, val)
1893#define bfin_read_CAN0_MBIM1() bfin_read16(CAN0_MBIM1)
1894#define bfin_write_CAN0_MBIM1(val) bfin_write16(CAN0_MBIM1, val)
1895#define bfin_read_CAN0_RFH1() bfin_read16(CAN0_RFH1)
1896#define bfin_write_CAN0_RFH1(val) bfin_write16(CAN0_RFH1, val)
1897#define bfin_read_CAN0_OPSS1() bfin_read16(CAN0_OPSS1)
1898#define bfin_write_CAN0_OPSS1(val) bfin_write16(CAN0_OPSS1, val)
1899
1900/* CAN Controller 0 Config 2 Registers */
1901
1902#define bfin_read_CAN0_MC2() bfin_read16(CAN0_MC2)
1903#define bfin_write_CAN0_MC2(val) bfin_write16(CAN0_MC2, val)
1904#define bfin_read_CAN0_MD2() bfin_read16(CAN0_MD2)
1905#define bfin_write_CAN0_MD2(val) bfin_write16(CAN0_MD2, val)
1906#define bfin_read_CAN0_TRS2() bfin_read16(CAN0_TRS2)
1907#define bfin_write_CAN0_TRS2(val) bfin_write16(CAN0_TRS2, val)
1908#define bfin_read_CAN0_TRR2() bfin_read16(CAN0_TRR2)
1909#define bfin_write_CAN0_TRR2(val) bfin_write16(CAN0_TRR2, val)
1910#define bfin_read_CAN0_TA2() bfin_read16(CAN0_TA2)
1911#define bfin_write_CAN0_TA2(val) bfin_write16(CAN0_TA2, val)
1912#define bfin_read_CAN0_AA2() bfin_read16(CAN0_AA2)
1913#define bfin_write_CAN0_AA2(val) bfin_write16(CAN0_AA2, val)
1914#define bfin_read_CAN0_RMP2() bfin_read16(CAN0_RMP2)
1915#define bfin_write_CAN0_RMP2(val) bfin_write16(CAN0_RMP2, val)
1916#define bfin_read_CAN0_RML2() bfin_read16(CAN0_RML2)
1917#define bfin_write_CAN0_RML2(val) bfin_write16(CAN0_RML2, val)
1918#define bfin_read_CAN0_MBTIF2() bfin_read16(CAN0_MBTIF2)
1919#define bfin_write_CAN0_MBTIF2(val) bfin_write16(CAN0_MBTIF2, val)
1920#define bfin_read_CAN0_MBRIF2() bfin_read16(CAN0_MBRIF2)
1921#define bfin_write_CAN0_MBRIF2(val) bfin_write16(CAN0_MBRIF2, val)
1922#define bfin_read_CAN0_MBIM2() bfin_read16(CAN0_MBIM2)
1923#define bfin_write_CAN0_MBIM2(val) bfin_write16(CAN0_MBIM2, val)
1924#define bfin_read_CAN0_RFH2() bfin_read16(CAN0_RFH2)
1925#define bfin_write_CAN0_RFH2(val) bfin_write16(CAN0_RFH2, val)
1926#define bfin_read_CAN0_OPSS2() bfin_read16(CAN0_OPSS2)
1927#define bfin_write_CAN0_OPSS2(val) bfin_write16(CAN0_OPSS2, val)
1928
1929/* CAN Controller 0 Clock/Interrubfin_read_()t/Counter Registers */
1930
1931#define bfin_read_CAN0_CLOCK() bfin_read16(CAN0_CLOCK)
1932#define bfin_write_CAN0_CLOCK(val) bfin_write16(CAN0_CLOCK, val)
1933#define bfin_read_CAN0_TIMING() bfin_read16(CAN0_TIMING)
1934#define bfin_write_CAN0_TIMING(val) bfin_write16(CAN0_TIMING, val)
1935#define bfin_read_CAN0_DEBUG() bfin_read16(CAN0_DEBUG)
1936#define bfin_write_CAN0_DEBUG(val) bfin_write16(CAN0_DEBUG, val)
1937#define bfin_read_CAN0_STATUS() bfin_read16(CAN0_STATUS)
1938#define bfin_write_CAN0_STATUS(val) bfin_write16(CAN0_STATUS, val)
1939#define bfin_read_CAN0_CEC() bfin_read16(CAN0_CEC)
1940#define bfin_write_CAN0_CEC(val) bfin_write16(CAN0_CEC, val)
1941#define bfin_read_CAN0_GIS() bfin_read16(CAN0_GIS)
1942#define bfin_write_CAN0_GIS(val) bfin_write16(CAN0_GIS, val)
1943#define bfin_read_CAN0_GIM() bfin_read16(CAN0_GIM)
1944#define bfin_write_CAN0_GIM(val) bfin_write16(CAN0_GIM, val)
1945#define bfin_read_CAN0_GIF() bfin_read16(CAN0_GIF)
1946#define bfin_write_CAN0_GIF(val) bfin_write16(CAN0_GIF, val)
1947#define bfin_read_CAN0_CONTROL() bfin_read16(CAN0_CONTROL)
1948#define bfin_write_CAN0_CONTROL(val) bfin_write16(CAN0_CONTROL, val)
1949#define bfin_read_CAN0_INTR() bfin_read16(CAN0_INTR)
1950#define bfin_write_CAN0_INTR(val) bfin_write16(CAN0_INTR, val)
1951#define bfin_read_CAN0_MBTD() bfin_read16(CAN0_MBTD)
1952#define bfin_write_CAN0_MBTD(val) bfin_write16(CAN0_MBTD, val)
1953#define bfin_read_CAN0_EWR() bfin_read16(CAN0_EWR)
1954#define bfin_write_CAN0_EWR(val) bfin_write16(CAN0_EWR, val)
1955#define bfin_read_CAN0_ESR() bfin_read16(CAN0_ESR)
1956#define bfin_write_CAN0_ESR(val) bfin_write16(CAN0_ESR, val)
1957#define bfin_read_CAN0_UCCNT() bfin_read16(CAN0_UCCNT)
1958#define bfin_write_CAN0_UCCNT(val) bfin_write16(CAN0_UCCNT, val)
1959#define bfin_read_CAN0_UCRC() bfin_read16(CAN0_UCRC)
1960#define bfin_write_CAN0_UCRC(val) bfin_write16(CAN0_UCRC, val)
1961#define bfin_read_CAN0_UCCNF() bfin_read16(CAN0_UCCNF)
1962#define bfin_write_CAN0_UCCNF(val) bfin_write16(CAN0_UCCNF, val)
1963
1964/* CAN Controller 0 Accebfin_read_()tance Registers */
1965
1966#define bfin_read_CAN0_AM00L() bfin_read16(CAN0_AM00L)
1967#define bfin_write_CAN0_AM00L(val) bfin_write16(CAN0_AM00L, val)
1968#define bfin_read_CAN0_AM00H() bfin_read16(CAN0_AM00H)
1969#define bfin_write_CAN0_AM00H(val) bfin_write16(CAN0_AM00H, val)
1970#define bfin_read_CAN0_AM01L() bfin_read16(CAN0_AM01L)
1971#define bfin_write_CAN0_AM01L(val) bfin_write16(CAN0_AM01L, val)
1972#define bfin_read_CAN0_AM01H() bfin_read16(CAN0_AM01H)
1973#define bfin_write_CAN0_AM01H(val) bfin_write16(CAN0_AM01H, val)
1974#define bfin_read_CAN0_AM02L() bfin_read16(CAN0_AM02L)
1975#define bfin_write_CAN0_AM02L(val) bfin_write16(CAN0_AM02L, val)
1976#define bfin_read_CAN0_AM02H() bfin_read16(CAN0_AM02H)
1977#define bfin_write_CAN0_AM02H(val) bfin_write16(CAN0_AM02H, val)
1978#define bfin_read_CAN0_AM03L() bfin_read16(CAN0_AM03L)
1979#define bfin_write_CAN0_AM03L(val) bfin_write16(CAN0_AM03L, val)
1980#define bfin_read_CAN0_AM03H() bfin_read16(CAN0_AM03H)
1981#define bfin_write_CAN0_AM03H(val) bfin_write16(CAN0_AM03H, val)
1982#define bfin_read_CAN0_AM04L() bfin_read16(CAN0_AM04L)
1983#define bfin_write_CAN0_AM04L(val) bfin_write16(CAN0_AM04L, val)
1984#define bfin_read_CAN0_AM04H() bfin_read16(CAN0_AM04H)
1985#define bfin_write_CAN0_AM04H(val) bfin_write16(CAN0_AM04H, val)
1986#define bfin_read_CAN0_AM05L() bfin_read16(CAN0_AM05L)
1987#define bfin_write_CAN0_AM05L(val) bfin_write16(CAN0_AM05L, val)
1988#define bfin_read_CAN0_AM05H() bfin_read16(CAN0_AM05H)
1989#define bfin_write_CAN0_AM05H(val) bfin_write16(CAN0_AM05H, val)
1990#define bfin_read_CAN0_AM06L() bfin_read16(CAN0_AM06L)
1991#define bfin_write_CAN0_AM06L(val) bfin_write16(CAN0_AM06L, val)
1992#define bfin_read_CAN0_AM06H() bfin_read16(CAN0_AM06H)
1993#define bfin_write_CAN0_AM06H(val) bfin_write16(CAN0_AM06H, val)
1994#define bfin_read_CAN0_AM07L() bfin_read16(CAN0_AM07L)
1995#define bfin_write_CAN0_AM07L(val) bfin_write16(CAN0_AM07L, val)
1996#define bfin_read_CAN0_AM07H() bfin_read16(CAN0_AM07H)
1997#define bfin_write_CAN0_AM07H(val) bfin_write16(CAN0_AM07H, val)
1998#define bfin_read_CAN0_AM08L() bfin_read16(CAN0_AM08L)
1999#define bfin_write_CAN0_AM08L(val) bfin_write16(CAN0_AM08L, val)
2000#define bfin_read_CAN0_AM08H() bfin_read16(CAN0_AM08H)
2001#define bfin_write_CAN0_AM08H(val) bfin_write16(CAN0_AM08H, val)
2002#define bfin_read_CAN0_AM09L() bfin_read16(CAN0_AM09L)
2003#define bfin_write_CAN0_AM09L(val) bfin_write16(CAN0_AM09L, val)
2004#define bfin_read_CAN0_AM09H() bfin_read16(CAN0_AM09H)
2005#define bfin_write_CAN0_AM09H(val) bfin_write16(CAN0_AM09H, val)
2006#define bfin_read_CAN0_AM10L() bfin_read16(CAN0_AM10L)
2007#define bfin_write_CAN0_AM10L(val) bfin_write16(CAN0_AM10L, val)
2008#define bfin_read_CAN0_AM10H() bfin_read16(CAN0_AM10H)
2009#define bfin_write_CAN0_AM10H(val) bfin_write16(CAN0_AM10H, val)
2010#define bfin_read_CAN0_AM11L() bfin_read16(CAN0_AM11L)
2011#define bfin_write_CAN0_AM11L(val) bfin_write16(CAN0_AM11L, val)
2012#define bfin_read_CAN0_AM11H() bfin_read16(CAN0_AM11H)
2013#define bfin_write_CAN0_AM11H(val) bfin_write16(CAN0_AM11H, val)
2014#define bfin_read_CAN0_AM12L() bfin_read16(CAN0_AM12L)
2015#define bfin_write_CAN0_AM12L(val) bfin_write16(CAN0_AM12L, val)
2016#define bfin_read_CAN0_AM12H() bfin_read16(CAN0_AM12H)
2017#define bfin_write_CAN0_AM12H(val) bfin_write16(CAN0_AM12H, val)
2018#define bfin_read_CAN0_AM13L() bfin_read16(CAN0_AM13L)
2019#define bfin_write_CAN0_AM13L(val) bfin_write16(CAN0_AM13L, val)
2020#define bfin_read_CAN0_AM13H() bfin_read16(CAN0_AM13H)
2021#define bfin_write_CAN0_AM13H(val) bfin_write16(CAN0_AM13H, val)
2022#define bfin_read_CAN0_AM14L() bfin_read16(CAN0_AM14L)
2023#define bfin_write_CAN0_AM14L(val) bfin_write16(CAN0_AM14L, val)
2024#define bfin_read_CAN0_AM14H() bfin_read16(CAN0_AM14H)
2025#define bfin_write_CAN0_AM14H(val) bfin_write16(CAN0_AM14H, val)
2026#define bfin_read_CAN0_AM15L() bfin_read16(CAN0_AM15L)
2027#define bfin_write_CAN0_AM15L(val) bfin_write16(CAN0_AM15L, val)
2028#define bfin_read_CAN0_AM15H() bfin_read16(CAN0_AM15H)
2029#define bfin_write_CAN0_AM15H(val) bfin_write16(CAN0_AM15H, val)
2030
2031/* CAN Controller 0 Accebfin_read_()tance Registers */
2032
2033#define bfin_read_CAN0_AM16L() bfin_read16(CAN0_AM16L)
2034#define bfin_write_CAN0_AM16L(val) bfin_write16(CAN0_AM16L, val)
2035#define bfin_read_CAN0_AM16H() bfin_read16(CAN0_AM16H)
2036#define bfin_write_CAN0_AM16H(val) bfin_write16(CAN0_AM16H, val)
2037#define bfin_read_CAN0_AM17L() bfin_read16(CAN0_AM17L)
2038#define bfin_write_CAN0_AM17L(val) bfin_write16(CAN0_AM17L, val)
2039#define bfin_read_CAN0_AM17H() bfin_read16(CAN0_AM17H)
2040#define bfin_write_CAN0_AM17H(val) bfin_write16(CAN0_AM17H, val)
2041#define bfin_read_CAN0_AM18L() bfin_read16(CAN0_AM18L)
2042#define bfin_write_CAN0_AM18L(val) bfin_write16(CAN0_AM18L, val)
2043#define bfin_read_CAN0_AM18H() bfin_read16(CAN0_AM18H)
2044#define bfin_write_CAN0_AM18H(val) bfin_write16(CAN0_AM18H, val)
2045#define bfin_read_CAN0_AM19L() bfin_read16(CAN0_AM19L)
2046#define bfin_write_CAN0_AM19L(val) bfin_write16(CAN0_AM19L, val)
2047#define bfin_read_CAN0_AM19H() bfin_read16(CAN0_AM19H)
2048#define bfin_write_CAN0_AM19H(val) bfin_write16(CAN0_AM19H, val)
2049#define bfin_read_CAN0_AM20L() bfin_read16(CAN0_AM20L)
2050#define bfin_write_CAN0_AM20L(val) bfin_write16(CAN0_AM20L, val)
2051#define bfin_read_CAN0_AM20H() bfin_read16(CAN0_AM20H)
2052#define bfin_write_CAN0_AM20H(val) bfin_write16(CAN0_AM20H, val)
2053#define bfin_read_CAN0_AM21L() bfin_read16(CAN0_AM21L)
2054#define bfin_write_CAN0_AM21L(val) bfin_write16(CAN0_AM21L, val)
2055#define bfin_read_CAN0_AM21H() bfin_read16(CAN0_AM21H)
2056#define bfin_write_CAN0_AM21H(val) bfin_write16(CAN0_AM21H, val)
2057#define bfin_read_CAN0_AM22L() bfin_read16(CAN0_AM22L)
2058#define bfin_write_CAN0_AM22L(val) bfin_write16(CAN0_AM22L, val)
2059#define bfin_read_CAN0_AM22H() bfin_read16(CAN0_AM22H)
2060#define bfin_write_CAN0_AM22H(val) bfin_write16(CAN0_AM22H, val)
2061#define bfin_read_CAN0_AM23L() bfin_read16(CAN0_AM23L)
2062#define bfin_write_CAN0_AM23L(val) bfin_write16(CAN0_AM23L, val)
2063#define bfin_read_CAN0_AM23H() bfin_read16(CAN0_AM23H)
2064#define bfin_write_CAN0_AM23H(val) bfin_write16(CAN0_AM23H, val)
2065#define bfin_read_CAN0_AM24L() bfin_read16(CAN0_AM24L)
2066#define bfin_write_CAN0_AM24L(val) bfin_write16(CAN0_AM24L, val)
2067#define bfin_read_CAN0_AM24H() bfin_read16(CAN0_AM24H)
2068#define bfin_write_CAN0_AM24H(val) bfin_write16(CAN0_AM24H, val)
2069#define bfin_read_CAN0_AM25L() bfin_read16(CAN0_AM25L)
2070#define bfin_write_CAN0_AM25L(val) bfin_write16(CAN0_AM25L, val)
2071#define bfin_read_CAN0_AM25H() bfin_read16(CAN0_AM25H)
2072#define bfin_write_CAN0_AM25H(val) bfin_write16(CAN0_AM25H, val)
2073#define bfin_read_CAN0_AM26L() bfin_read16(CAN0_AM26L)
2074#define bfin_write_CAN0_AM26L(val) bfin_write16(CAN0_AM26L, val)
2075#define bfin_read_CAN0_AM26H() bfin_read16(CAN0_AM26H)
2076#define bfin_write_CAN0_AM26H(val) bfin_write16(CAN0_AM26H, val)
2077#define bfin_read_CAN0_AM27L() bfin_read16(CAN0_AM27L)
2078#define bfin_write_CAN0_AM27L(val) bfin_write16(CAN0_AM27L, val)
2079#define bfin_read_CAN0_AM27H() bfin_read16(CAN0_AM27H)
2080#define bfin_write_CAN0_AM27H(val) bfin_write16(CAN0_AM27H, val)
2081#define bfin_read_CAN0_AM28L() bfin_read16(CAN0_AM28L)
2082#define bfin_write_CAN0_AM28L(val) bfin_write16(CAN0_AM28L, val)
2083#define bfin_read_CAN0_AM28H() bfin_read16(CAN0_AM28H)
2084#define bfin_write_CAN0_AM28H(val) bfin_write16(CAN0_AM28H, val)
2085#define bfin_read_CAN0_AM29L() bfin_read16(CAN0_AM29L)
2086#define bfin_write_CAN0_AM29L(val) bfin_write16(CAN0_AM29L, val)
2087#define bfin_read_CAN0_AM29H() bfin_read16(CAN0_AM29H)
2088#define bfin_write_CAN0_AM29H(val) bfin_write16(CAN0_AM29H, val)
2089#define bfin_read_CAN0_AM30L() bfin_read16(CAN0_AM30L)
2090#define bfin_write_CAN0_AM30L(val) bfin_write16(CAN0_AM30L, val)
2091#define bfin_read_CAN0_AM30H() bfin_read16(CAN0_AM30H)
2092#define bfin_write_CAN0_AM30H(val) bfin_write16(CAN0_AM30H, val)
2093#define bfin_read_CAN0_AM31L() bfin_read16(CAN0_AM31L)
2094#define bfin_write_CAN0_AM31L(val) bfin_write16(CAN0_AM31L, val)
2095#define bfin_read_CAN0_AM31H() bfin_read16(CAN0_AM31H)
2096#define bfin_write_CAN0_AM31H(val) bfin_write16(CAN0_AM31H, val)
2097
2098/* CAN Controller 0 Mailbox Data Registers */
2099
2100#define bfin_read_CAN0_MB00_DATA0() bfin_read16(CAN0_MB00_DATA0)
2101#define bfin_write_CAN0_MB00_DATA0(val) bfin_write16(CAN0_MB00_DATA0, val)
2102#define bfin_read_CAN0_MB00_DATA1() bfin_read16(CAN0_MB00_DATA1)
2103#define bfin_write_CAN0_MB00_DATA1(val) bfin_write16(CAN0_MB00_DATA1, val)
2104#define bfin_read_CAN0_MB00_DATA2() bfin_read16(CAN0_MB00_DATA2)
2105#define bfin_write_CAN0_MB00_DATA2(val) bfin_write16(CAN0_MB00_DATA2, val)
2106#define bfin_read_CAN0_MB00_DATA3() bfin_read16(CAN0_MB00_DATA3)
2107#define bfin_write_CAN0_MB00_DATA3(val) bfin_write16(CAN0_MB00_DATA3, val)
2108#define bfin_read_CAN0_MB00_LENGTH() bfin_read16(CAN0_MB00_LENGTH)
2109#define bfin_write_CAN0_MB00_LENGTH(val) bfin_write16(CAN0_MB00_LENGTH, val)
2110#define bfin_read_CAN0_MB00_TIMESTAMP() bfin_read16(CAN0_MB00_TIMESTAMP)
2111#define bfin_write_CAN0_MB00_TIMESTAMP(val) bfin_write16(CAN0_MB00_TIMESTAMP, val)
2112#define bfin_read_CAN0_MB00_ID0() bfin_read16(CAN0_MB00_ID0)
2113#define bfin_write_CAN0_MB00_ID0(val) bfin_write16(CAN0_MB00_ID0, val)
2114#define bfin_read_CAN0_MB00_ID1() bfin_read16(CAN0_MB00_ID1)
2115#define bfin_write_CAN0_MB00_ID1(val) bfin_write16(CAN0_MB00_ID1, val)
2116#define bfin_read_CAN0_MB01_DATA0() bfin_read16(CAN0_MB01_DATA0)
2117#define bfin_write_CAN0_MB01_DATA0(val) bfin_write16(CAN0_MB01_DATA0, val)
2118#define bfin_read_CAN0_MB01_DATA1() bfin_read16(CAN0_MB01_DATA1)
2119#define bfin_write_CAN0_MB01_DATA1(val) bfin_write16(CAN0_MB01_DATA1, val)
2120#define bfin_read_CAN0_MB01_DATA2() bfin_read16(CAN0_MB01_DATA2)
2121#define bfin_write_CAN0_MB01_DATA2(val) bfin_write16(CAN0_MB01_DATA2, val)
2122#define bfin_read_CAN0_MB01_DATA3() bfin_read16(CAN0_MB01_DATA3)
2123#define bfin_write_CAN0_MB01_DATA3(val) bfin_write16(CAN0_MB01_DATA3, val)
2124#define bfin_read_CAN0_MB01_LENGTH() bfin_read16(CAN0_MB01_LENGTH)
2125#define bfin_write_CAN0_MB01_LENGTH(val) bfin_write16(CAN0_MB01_LENGTH, val)
2126#define bfin_read_CAN0_MB01_TIMESTAMP() bfin_read16(CAN0_MB01_TIMESTAMP)
2127#define bfin_write_CAN0_MB01_TIMESTAMP(val) bfin_write16(CAN0_MB01_TIMESTAMP, val)
2128#define bfin_read_CAN0_MB01_ID0() bfin_read16(CAN0_MB01_ID0)
2129#define bfin_write_CAN0_MB01_ID0(val) bfin_write16(CAN0_MB01_ID0, val)
2130#define bfin_read_CAN0_MB01_ID1() bfin_read16(CAN0_MB01_ID1)
2131#define bfin_write_CAN0_MB01_ID1(val) bfin_write16(CAN0_MB01_ID1, val)
2132#define bfin_read_CAN0_MB02_DATA0() bfin_read16(CAN0_MB02_DATA0)
2133#define bfin_write_CAN0_MB02_DATA0(val) bfin_write16(CAN0_MB02_DATA0, val)
2134#define bfin_read_CAN0_MB02_DATA1() bfin_read16(CAN0_MB02_DATA1)
2135#define bfin_write_CAN0_MB02_DATA1(val) bfin_write16(CAN0_MB02_DATA1, val)
2136#define bfin_read_CAN0_MB02_DATA2() bfin_read16(CAN0_MB02_DATA2)
2137#define bfin_write_CAN0_MB02_DATA2(val) bfin_write16(CAN0_MB02_DATA2, val)
2138#define bfin_read_CAN0_MB02_DATA3() bfin_read16(CAN0_MB02_DATA3)
2139#define bfin_write_CAN0_MB02_DATA3(val) bfin_write16(CAN0_MB02_DATA3, val)
2140#define bfin_read_CAN0_MB02_LENGTH() bfin_read16(CAN0_MB02_LENGTH)
2141#define bfin_write_CAN0_MB02_LENGTH(val) bfin_write16(CAN0_MB02_LENGTH, val)
2142#define bfin_read_CAN0_MB02_TIMESTAMP() bfin_read16(CAN0_MB02_TIMESTAMP)
2143#define bfin_write_CAN0_MB02_TIMESTAMP(val) bfin_write16(CAN0_MB02_TIMESTAMP, val)
2144#define bfin_read_CAN0_MB02_ID0() bfin_read16(CAN0_MB02_ID0)
2145#define bfin_write_CAN0_MB02_ID0(val) bfin_write16(CAN0_MB02_ID0, val)
2146#define bfin_read_CAN0_MB02_ID1() bfin_read16(CAN0_MB02_ID1)
2147#define bfin_write_CAN0_MB02_ID1(val) bfin_write16(CAN0_MB02_ID1, val)
2148#define bfin_read_CAN0_MB03_DATA0() bfin_read16(CAN0_MB03_DATA0)
2149#define bfin_write_CAN0_MB03_DATA0(val) bfin_write16(CAN0_MB03_DATA0, val)
2150#define bfin_read_CAN0_MB03_DATA1() bfin_read16(CAN0_MB03_DATA1)
2151#define bfin_write_CAN0_MB03_DATA1(val) bfin_write16(CAN0_MB03_DATA1, val)
2152#define bfin_read_CAN0_MB03_DATA2() bfin_read16(CAN0_MB03_DATA2)
2153#define bfin_write_CAN0_MB03_DATA2(val) bfin_write16(CAN0_MB03_DATA2, val)
2154#define bfin_read_CAN0_MB03_DATA3() bfin_read16(CAN0_MB03_DATA3)
2155#define bfin_write_CAN0_MB03_DATA3(val) bfin_write16(CAN0_MB03_DATA3, val)
2156#define bfin_read_CAN0_MB03_LENGTH() bfin_read16(CAN0_MB03_LENGTH)
2157#define bfin_write_CAN0_MB03_LENGTH(val) bfin_write16(CAN0_MB03_LENGTH, val)
2158#define bfin_read_CAN0_MB03_TIMESTAMP() bfin_read16(CAN0_MB03_TIMESTAMP)
2159#define bfin_write_CAN0_MB03_TIMESTAMP(val) bfin_write16(CAN0_MB03_TIMESTAMP, val)
2160#define bfin_read_CAN0_MB03_ID0() bfin_read16(CAN0_MB03_ID0)
2161#define bfin_write_CAN0_MB03_ID0(val) bfin_write16(CAN0_MB03_ID0, val)
2162#define bfin_read_CAN0_MB03_ID1() bfin_read16(CAN0_MB03_ID1)
2163#define bfin_write_CAN0_MB03_ID1(val) bfin_write16(CAN0_MB03_ID1, val)
2164#define bfin_read_CAN0_MB04_DATA0() bfin_read16(CAN0_MB04_DATA0)
2165#define bfin_write_CAN0_MB04_DATA0(val) bfin_write16(CAN0_MB04_DATA0, val)
2166#define bfin_read_CAN0_MB04_DATA1() bfin_read16(CAN0_MB04_DATA1)
2167#define bfin_write_CAN0_MB04_DATA1(val) bfin_write16(CAN0_MB04_DATA1, val)
2168#define bfin_read_CAN0_MB04_DATA2() bfin_read16(CAN0_MB04_DATA2)
2169#define bfin_write_CAN0_MB04_DATA2(val) bfin_write16(CAN0_MB04_DATA2, val)
2170#define bfin_read_CAN0_MB04_DATA3() bfin_read16(CAN0_MB04_DATA3)
2171#define bfin_write_CAN0_MB04_DATA3(val) bfin_write16(CAN0_MB04_DATA3, val)
2172#define bfin_read_CAN0_MB04_LENGTH() bfin_read16(CAN0_MB04_LENGTH)
2173#define bfin_write_CAN0_MB04_LENGTH(val) bfin_write16(CAN0_MB04_LENGTH, val)
2174#define bfin_read_CAN0_MB04_TIMESTAMP() bfin_read16(CAN0_MB04_TIMESTAMP)
2175#define bfin_write_CAN0_MB04_TIMESTAMP(val) bfin_write16(CAN0_MB04_TIMESTAMP, val)
2176#define bfin_read_CAN0_MB04_ID0() bfin_read16(CAN0_MB04_ID0)
2177#define bfin_write_CAN0_MB04_ID0(val) bfin_write16(CAN0_MB04_ID0, val)
2178#define bfin_read_CAN0_MB04_ID1() bfin_read16(CAN0_MB04_ID1)
2179#define bfin_write_CAN0_MB04_ID1(val) bfin_write16(CAN0_MB04_ID1, val)
2180#define bfin_read_CAN0_MB05_DATA0() bfin_read16(CAN0_MB05_DATA0)
2181#define bfin_write_CAN0_MB05_DATA0(val) bfin_write16(CAN0_MB05_DATA0, val)
2182#define bfin_read_CAN0_MB05_DATA1() bfin_read16(CAN0_MB05_DATA1)
2183#define bfin_write_CAN0_MB05_DATA1(val) bfin_write16(CAN0_MB05_DATA1, val)
2184#define bfin_read_CAN0_MB05_DATA2() bfin_read16(CAN0_MB05_DATA2)
2185#define bfin_write_CAN0_MB05_DATA2(val) bfin_write16(CAN0_MB05_DATA2, val)
2186#define bfin_read_CAN0_MB05_DATA3() bfin_read16(CAN0_MB05_DATA3)
2187#define bfin_write_CAN0_MB05_DATA3(val) bfin_write16(CAN0_MB05_DATA3, val)
2188#define bfin_read_CAN0_MB05_LENGTH() bfin_read16(CAN0_MB05_LENGTH)
2189#define bfin_write_CAN0_MB05_LENGTH(val) bfin_write16(CAN0_MB05_LENGTH, val)
2190#define bfin_read_CAN0_MB05_TIMESTAMP() bfin_read16(CAN0_MB05_TIMESTAMP)
2191#define bfin_write_CAN0_MB05_TIMESTAMP(val) bfin_write16(CAN0_MB05_TIMESTAMP, val)
2192#define bfin_read_CAN0_MB05_ID0() bfin_read16(CAN0_MB05_ID0)
2193#define bfin_write_CAN0_MB05_ID0(val) bfin_write16(CAN0_MB05_ID0, val)
2194#define bfin_read_CAN0_MB05_ID1() bfin_read16(CAN0_MB05_ID1)
2195#define bfin_write_CAN0_MB05_ID1(val) bfin_write16(CAN0_MB05_ID1, val)
2196#define bfin_read_CAN0_MB06_DATA0() bfin_read16(CAN0_MB06_DATA0)
2197#define bfin_write_CAN0_MB06_DATA0(val) bfin_write16(CAN0_MB06_DATA0, val)
2198#define bfin_read_CAN0_MB06_DATA1() bfin_read16(CAN0_MB06_DATA1)
2199#define bfin_write_CAN0_MB06_DATA1(val) bfin_write16(CAN0_MB06_DATA1, val)
2200#define bfin_read_CAN0_MB06_DATA2() bfin_read16(CAN0_MB06_DATA2)
2201#define bfin_write_CAN0_MB06_DATA2(val) bfin_write16(CAN0_MB06_DATA2, val)
2202#define bfin_read_CAN0_MB06_DATA3() bfin_read16(CAN0_MB06_DATA3)
2203#define bfin_write_CAN0_MB06_DATA3(val) bfin_write16(CAN0_MB06_DATA3, val)
2204#define bfin_read_CAN0_MB06_LENGTH() bfin_read16(CAN0_MB06_LENGTH)
2205#define bfin_write_CAN0_MB06_LENGTH(val) bfin_write16(CAN0_MB06_LENGTH, val)
2206#define bfin_read_CAN0_MB06_TIMESTAMP() bfin_read16(CAN0_MB06_TIMESTAMP)
2207#define bfin_write_CAN0_MB06_TIMESTAMP(val) bfin_write16(CAN0_MB06_TIMESTAMP, val)
2208#define bfin_read_CAN0_MB06_ID0() bfin_read16(CAN0_MB06_ID0)
2209#define bfin_write_CAN0_MB06_ID0(val) bfin_write16(CAN0_MB06_ID0, val)
2210#define bfin_read_CAN0_MB06_ID1() bfin_read16(CAN0_MB06_ID1)
2211#define bfin_write_CAN0_MB06_ID1(val) bfin_write16(CAN0_MB06_ID1, val)
2212#define bfin_read_CAN0_MB07_DATA0() bfin_read16(CAN0_MB07_DATA0)
2213#define bfin_write_CAN0_MB07_DATA0(val) bfin_write16(CAN0_MB07_DATA0, val)
2214#define bfin_read_CAN0_MB07_DATA1() bfin_read16(CAN0_MB07_DATA1)
2215#define bfin_write_CAN0_MB07_DATA1(val) bfin_write16(CAN0_MB07_DATA1, val)
2216#define bfin_read_CAN0_MB07_DATA2() bfin_read16(CAN0_MB07_DATA2)
2217#define bfin_write_CAN0_MB07_DATA2(val) bfin_write16(CAN0_MB07_DATA2, val)
2218#define bfin_read_CAN0_MB07_DATA3() bfin_read16(CAN0_MB07_DATA3)
2219#define bfin_write_CAN0_MB07_DATA3(val) bfin_write16(CAN0_MB07_DATA3, val)
2220#define bfin_read_CAN0_MB07_LENGTH() bfin_read16(CAN0_MB07_LENGTH)
2221#define bfin_write_CAN0_MB07_LENGTH(val) bfin_write16(CAN0_MB07_LENGTH, val)
2222#define bfin_read_CAN0_MB07_TIMESTAMP() bfin_read16(CAN0_MB07_TIMESTAMP)
2223#define bfin_write_CAN0_MB07_TIMESTAMP(val) bfin_write16(CAN0_MB07_TIMESTAMP, val)
2224#define bfin_read_CAN0_MB07_ID0() bfin_read16(CAN0_MB07_ID0)
2225#define bfin_write_CAN0_MB07_ID0(val) bfin_write16(CAN0_MB07_ID0, val)
2226#define bfin_read_CAN0_MB07_ID1() bfin_read16(CAN0_MB07_ID1)
2227#define bfin_write_CAN0_MB07_ID1(val) bfin_write16(CAN0_MB07_ID1, val)
2228#define bfin_read_CAN0_MB08_DATA0() bfin_read16(CAN0_MB08_DATA0)
2229#define bfin_write_CAN0_MB08_DATA0(val) bfin_write16(CAN0_MB08_DATA0, val)
2230#define bfin_read_CAN0_MB08_DATA1() bfin_read16(CAN0_MB08_DATA1)
2231#define bfin_write_CAN0_MB08_DATA1(val) bfin_write16(CAN0_MB08_DATA1, val)
2232#define bfin_read_CAN0_MB08_DATA2() bfin_read16(CAN0_MB08_DATA2)
2233#define bfin_write_CAN0_MB08_DATA2(val) bfin_write16(CAN0_MB08_DATA2, val)
2234#define bfin_read_CAN0_MB08_DATA3() bfin_read16(CAN0_MB08_DATA3)
2235#define bfin_write_CAN0_MB08_DATA3(val) bfin_write16(CAN0_MB08_DATA3, val)
2236#define bfin_read_CAN0_MB08_LENGTH() bfin_read16(CAN0_MB08_LENGTH)
2237#define bfin_write_CAN0_MB08_LENGTH(val) bfin_write16(CAN0_MB08_LENGTH, val)
2238#define bfin_read_CAN0_MB08_TIMESTAMP() bfin_read16(CAN0_MB08_TIMESTAMP)
2239#define bfin_write_CAN0_MB08_TIMESTAMP(val) bfin_write16(CAN0_MB08_TIMESTAMP, val)
2240#define bfin_read_CAN0_MB08_ID0() bfin_read16(CAN0_MB08_ID0)
2241#define bfin_write_CAN0_MB08_ID0(val) bfin_write16(CAN0_MB08_ID0, val)
2242#define bfin_read_CAN0_MB08_ID1() bfin_read16(CAN0_MB08_ID1)
2243#define bfin_write_CAN0_MB08_ID1(val) bfin_write16(CAN0_MB08_ID1, val)
2244#define bfin_read_CAN0_MB09_DATA0() bfin_read16(CAN0_MB09_DATA0)
2245#define bfin_write_CAN0_MB09_DATA0(val) bfin_write16(CAN0_MB09_DATA0, val)
2246#define bfin_read_CAN0_MB09_DATA1() bfin_read16(CAN0_MB09_DATA1)
2247#define bfin_write_CAN0_MB09_DATA1(val) bfin_write16(CAN0_MB09_DATA1, val)
2248#define bfin_read_CAN0_MB09_DATA2() bfin_read16(CAN0_MB09_DATA2)
2249#define bfin_write_CAN0_MB09_DATA2(val) bfin_write16(CAN0_MB09_DATA2, val)
2250#define bfin_read_CAN0_MB09_DATA3() bfin_read16(CAN0_MB09_DATA3)
2251#define bfin_write_CAN0_MB09_DATA3(val) bfin_write16(CAN0_MB09_DATA3, val)
2252#define bfin_read_CAN0_MB09_LENGTH() bfin_read16(CAN0_MB09_LENGTH)
2253#define bfin_write_CAN0_MB09_LENGTH(val) bfin_write16(CAN0_MB09_LENGTH, val)
2254#define bfin_read_CAN0_MB09_TIMESTAMP() bfin_read16(CAN0_MB09_TIMESTAMP)
2255#define bfin_write_CAN0_MB09_TIMESTAMP(val) bfin_write16(CAN0_MB09_TIMESTAMP, val)
2256#define bfin_read_CAN0_MB09_ID0() bfin_read16(CAN0_MB09_ID0)
2257#define bfin_write_CAN0_MB09_ID0(val) bfin_write16(CAN0_MB09_ID0, val)
2258#define bfin_read_CAN0_MB09_ID1() bfin_read16(CAN0_MB09_ID1)
2259#define bfin_write_CAN0_MB09_ID1(val) bfin_write16(CAN0_MB09_ID1, val)
2260#define bfin_read_CAN0_MB10_DATA0() bfin_read16(CAN0_MB10_DATA0)
2261#define bfin_write_CAN0_MB10_DATA0(val) bfin_write16(CAN0_MB10_DATA0, val)
2262#define bfin_read_CAN0_MB10_DATA1() bfin_read16(CAN0_MB10_DATA1)
2263#define bfin_write_CAN0_MB10_DATA1(val) bfin_write16(CAN0_MB10_DATA1, val)
2264#define bfin_read_CAN0_MB10_DATA2() bfin_read16(CAN0_MB10_DATA2)
2265#define bfin_write_CAN0_MB10_DATA2(val) bfin_write16(CAN0_MB10_DATA2, val)
2266#define bfin_read_CAN0_MB10_DATA3() bfin_read16(CAN0_MB10_DATA3)
2267#define bfin_write_CAN0_MB10_DATA3(val) bfin_write16(CAN0_MB10_DATA3, val)
2268#define bfin_read_CAN0_MB10_LENGTH() bfin_read16(CAN0_MB10_LENGTH)
2269#define bfin_write_CAN0_MB10_LENGTH(val) bfin_write16(CAN0_MB10_LENGTH, val)
2270#define bfin_read_CAN0_MB10_TIMESTAMP() bfin_read16(CAN0_MB10_TIMESTAMP)
2271#define bfin_write_CAN0_MB10_TIMESTAMP(val) bfin_write16(CAN0_MB10_TIMESTAMP, val)
2272#define bfin_read_CAN0_MB10_ID0() bfin_read16(CAN0_MB10_ID0)
2273#define bfin_write_CAN0_MB10_ID0(val) bfin_write16(CAN0_MB10_ID0, val)
2274#define bfin_read_CAN0_MB10_ID1() bfin_read16(CAN0_MB10_ID1)
2275#define bfin_write_CAN0_MB10_ID1(val) bfin_write16(CAN0_MB10_ID1, val)
2276#define bfin_read_CAN0_MB11_DATA0() bfin_read16(CAN0_MB11_DATA0)
2277#define bfin_write_CAN0_MB11_DATA0(val) bfin_write16(CAN0_MB11_DATA0, val)
2278#define bfin_read_CAN0_MB11_DATA1() bfin_read16(CAN0_MB11_DATA1)
2279#define bfin_write_CAN0_MB11_DATA1(val) bfin_write16(CAN0_MB11_DATA1, val)
2280#define bfin_read_CAN0_MB11_DATA2() bfin_read16(CAN0_MB11_DATA2)
2281#define bfin_write_CAN0_MB11_DATA2(val) bfin_write16(CAN0_MB11_DATA2, val)
2282#define bfin_read_CAN0_MB11_DATA3() bfin_read16(CAN0_MB11_DATA3)
2283#define bfin_write_CAN0_MB11_DATA3(val) bfin_write16(CAN0_MB11_DATA3, val)
2284#define bfin_read_CAN0_MB11_LENGTH() bfin_read16(CAN0_MB11_LENGTH)
2285#define bfin_write_CAN0_MB11_LENGTH(val) bfin_write16(CAN0_MB11_LENGTH, val)
2286#define bfin_read_CAN0_MB11_TIMESTAMP() bfin_read16(CAN0_MB11_TIMESTAMP)
2287#define bfin_write_CAN0_MB11_TIMESTAMP(val) bfin_write16(CAN0_MB11_TIMESTAMP, val)
2288#define bfin_read_CAN0_MB11_ID0() bfin_read16(CAN0_MB11_ID0)
2289#define bfin_write_CAN0_MB11_ID0(val) bfin_write16(CAN0_MB11_ID0, val)
2290#define bfin_read_CAN0_MB11_ID1() bfin_read16(CAN0_MB11_ID1)
2291#define bfin_write_CAN0_MB11_ID1(val) bfin_write16(CAN0_MB11_ID1, val)
2292#define bfin_read_CAN0_MB12_DATA0() bfin_read16(CAN0_MB12_DATA0)
2293#define bfin_write_CAN0_MB12_DATA0(val) bfin_write16(CAN0_MB12_DATA0, val)
2294#define bfin_read_CAN0_MB12_DATA1() bfin_read16(CAN0_MB12_DATA1)
2295#define bfin_write_CAN0_MB12_DATA1(val) bfin_write16(CAN0_MB12_DATA1, val)
2296#define bfin_read_CAN0_MB12_DATA2() bfin_read16(CAN0_MB12_DATA2)
2297#define bfin_write_CAN0_MB12_DATA2(val) bfin_write16(CAN0_MB12_DATA2, val)
2298#define bfin_read_CAN0_MB12_DATA3() bfin_read16(CAN0_MB12_DATA3)
2299#define bfin_write_CAN0_MB12_DATA3(val) bfin_write16(CAN0_MB12_DATA3, val)
2300#define bfin_read_CAN0_MB12_LENGTH() bfin_read16(CAN0_MB12_LENGTH)
2301#define bfin_write_CAN0_MB12_LENGTH(val) bfin_write16(CAN0_MB12_LENGTH, val)
2302#define bfin_read_CAN0_MB12_TIMESTAMP() bfin_read16(CAN0_MB12_TIMESTAMP)
2303#define bfin_write_CAN0_MB12_TIMESTAMP(val) bfin_write16(CAN0_MB12_TIMESTAMP, val)
2304#define bfin_read_CAN0_MB12_ID0() bfin_read16(CAN0_MB12_ID0)
2305#define bfin_write_CAN0_MB12_ID0(val) bfin_write16(CAN0_MB12_ID0, val)
2306#define bfin_read_CAN0_MB12_ID1() bfin_read16(CAN0_MB12_ID1)
2307#define bfin_write_CAN0_MB12_ID1(val) bfin_write16(CAN0_MB12_ID1, val)
2308#define bfin_read_CAN0_MB13_DATA0() bfin_read16(CAN0_MB13_DATA0)
2309#define bfin_write_CAN0_MB13_DATA0(val) bfin_write16(CAN0_MB13_DATA0, val)
2310#define bfin_read_CAN0_MB13_DATA1() bfin_read16(CAN0_MB13_DATA1)
2311#define bfin_write_CAN0_MB13_DATA1(val) bfin_write16(CAN0_MB13_DATA1, val)
2312#define bfin_read_CAN0_MB13_DATA2() bfin_read16(CAN0_MB13_DATA2)
2313#define bfin_write_CAN0_MB13_DATA2(val) bfin_write16(CAN0_MB13_DATA2, val)
2314#define bfin_read_CAN0_MB13_DATA3() bfin_read16(CAN0_MB13_DATA3)
2315#define bfin_write_CAN0_MB13_DATA3(val) bfin_write16(CAN0_MB13_DATA3, val)
2316#define bfin_read_CAN0_MB13_LENGTH() bfin_read16(CAN0_MB13_LENGTH)
2317#define bfin_write_CAN0_MB13_LENGTH(val) bfin_write16(CAN0_MB13_LENGTH, val)
2318#define bfin_read_CAN0_MB13_TIMESTAMP() bfin_read16(CAN0_MB13_TIMESTAMP)
2319#define bfin_write_CAN0_MB13_TIMESTAMP(val) bfin_write16(CAN0_MB13_TIMESTAMP, val)
2320#define bfin_read_CAN0_MB13_ID0() bfin_read16(CAN0_MB13_ID0)
2321#define bfin_write_CAN0_MB13_ID0(val) bfin_write16(CAN0_MB13_ID0, val)
2322#define bfin_read_CAN0_MB13_ID1() bfin_read16(CAN0_MB13_ID1)
2323#define bfin_write_CAN0_MB13_ID1(val) bfin_write16(CAN0_MB13_ID1, val)
2324#define bfin_read_CAN0_MB14_DATA0() bfin_read16(CAN0_MB14_DATA0)
2325#define bfin_write_CAN0_MB14_DATA0(val) bfin_write16(CAN0_MB14_DATA0, val)
2326#define bfin_read_CAN0_MB14_DATA1() bfin_read16(CAN0_MB14_DATA1)
2327#define bfin_write_CAN0_MB14_DATA1(val) bfin_write16(CAN0_MB14_DATA1, val)
2328#define bfin_read_CAN0_MB14_DATA2() bfin_read16(CAN0_MB14_DATA2)
2329#define bfin_write_CAN0_MB14_DATA2(val) bfin_write16(CAN0_MB14_DATA2, val)
2330#define bfin_read_CAN0_MB14_DATA3() bfin_read16(CAN0_MB14_DATA3)
2331#define bfin_write_CAN0_MB14_DATA3(val) bfin_write16(CAN0_MB14_DATA3, val)
2332#define bfin_read_CAN0_MB14_LENGTH() bfin_read16(CAN0_MB14_LENGTH)
2333#define bfin_write_CAN0_MB14_LENGTH(val) bfin_write16(CAN0_MB14_LENGTH, val)
2334#define bfin_read_CAN0_MB14_TIMESTAMP() bfin_read16(CAN0_MB14_TIMESTAMP)
2335#define bfin_write_CAN0_MB14_TIMESTAMP(val) bfin_write16(CAN0_MB14_TIMESTAMP, val)
2336#define bfin_read_CAN0_MB14_ID0() bfin_read16(CAN0_MB14_ID0)
2337#define bfin_write_CAN0_MB14_ID0(val) bfin_write16(CAN0_MB14_ID0, val)
2338#define bfin_read_CAN0_MB14_ID1() bfin_read16(CAN0_MB14_ID1)
2339#define bfin_write_CAN0_MB14_ID1(val) bfin_write16(CAN0_MB14_ID1, val)
2340#define bfin_read_CAN0_MB15_DATA0() bfin_read16(CAN0_MB15_DATA0)
2341#define bfin_write_CAN0_MB15_DATA0(val) bfin_write16(CAN0_MB15_DATA0, val)
2342#define bfin_read_CAN0_MB15_DATA1() bfin_read16(CAN0_MB15_DATA1)
2343#define bfin_write_CAN0_MB15_DATA1(val) bfin_write16(CAN0_MB15_DATA1, val)
2344#define bfin_read_CAN0_MB15_DATA2() bfin_read16(CAN0_MB15_DATA2)
2345#define bfin_write_CAN0_MB15_DATA2(val) bfin_write16(CAN0_MB15_DATA2, val)
2346#define bfin_read_CAN0_MB15_DATA3() bfin_read16(CAN0_MB15_DATA3)
2347#define bfin_write_CAN0_MB15_DATA3(val) bfin_write16(CAN0_MB15_DATA3, val)
2348#define bfin_read_CAN0_MB15_LENGTH() bfin_read16(CAN0_MB15_LENGTH)
2349#define bfin_write_CAN0_MB15_LENGTH(val) bfin_write16(CAN0_MB15_LENGTH, val)
2350#define bfin_read_CAN0_MB15_TIMESTAMP() bfin_read16(CAN0_MB15_TIMESTAMP)
2351#define bfin_write_CAN0_MB15_TIMESTAMP(val) bfin_write16(CAN0_MB15_TIMESTAMP, val)
2352#define bfin_read_CAN0_MB15_ID0() bfin_read16(CAN0_MB15_ID0)
2353#define bfin_write_CAN0_MB15_ID0(val) bfin_write16(CAN0_MB15_ID0, val)
2354#define bfin_read_CAN0_MB15_ID1() bfin_read16(CAN0_MB15_ID1)
2355#define bfin_write_CAN0_MB15_ID1(val) bfin_write16(CAN0_MB15_ID1, val)
2356
2357/* CAN Controller 0 Mailbox Data Registers */
2358
2359#define bfin_read_CAN0_MB16_DATA0() bfin_read16(CAN0_MB16_DATA0)
2360#define bfin_write_CAN0_MB16_DATA0(val) bfin_write16(CAN0_MB16_DATA0, val)
2361#define bfin_read_CAN0_MB16_DATA1() bfin_read16(CAN0_MB16_DATA1)
2362#define bfin_write_CAN0_MB16_DATA1(val) bfin_write16(CAN0_MB16_DATA1, val)
2363#define bfin_read_CAN0_MB16_DATA2() bfin_read16(CAN0_MB16_DATA2)
2364#define bfin_write_CAN0_MB16_DATA2(val) bfin_write16(CAN0_MB16_DATA2, val)
2365#define bfin_read_CAN0_MB16_DATA3() bfin_read16(CAN0_MB16_DATA3)
2366#define bfin_write_CAN0_MB16_DATA3(val) bfin_write16(CAN0_MB16_DATA3, val)
2367#define bfin_read_CAN0_MB16_LENGTH() bfin_read16(CAN0_MB16_LENGTH)
2368#define bfin_write_CAN0_MB16_LENGTH(val) bfin_write16(CAN0_MB16_LENGTH, val)
2369#define bfin_read_CAN0_MB16_TIMESTAMP() bfin_read16(CAN0_MB16_TIMESTAMP)
2370#define bfin_write_CAN0_MB16_TIMESTAMP(val) bfin_write16(CAN0_MB16_TIMESTAMP, val)
2371#define bfin_read_CAN0_MB16_ID0() bfin_read16(CAN0_MB16_ID0)
2372#define bfin_write_CAN0_MB16_ID0(val) bfin_write16(CAN0_MB16_ID0, val)
2373#define bfin_read_CAN0_MB16_ID1() bfin_read16(CAN0_MB16_ID1)
2374#define bfin_write_CAN0_MB16_ID1(val) bfin_write16(CAN0_MB16_ID1, val)
2375#define bfin_read_CAN0_MB17_DATA0() bfin_read16(CAN0_MB17_DATA0)
2376#define bfin_write_CAN0_MB17_DATA0(val) bfin_write16(CAN0_MB17_DATA0, val)
2377#define bfin_read_CAN0_MB17_DATA1() bfin_read16(CAN0_MB17_DATA1)
2378#define bfin_write_CAN0_MB17_DATA1(val) bfin_write16(CAN0_MB17_DATA1, val)
2379#define bfin_read_CAN0_MB17_DATA2() bfin_read16(CAN0_MB17_DATA2)
2380#define bfin_write_CAN0_MB17_DATA2(val) bfin_write16(CAN0_MB17_DATA2, val)
2381#define bfin_read_CAN0_MB17_DATA3() bfin_read16(CAN0_MB17_DATA3)
2382#define bfin_write_CAN0_MB17_DATA3(val) bfin_write16(CAN0_MB17_DATA3, val)
2383#define bfin_read_CAN0_MB17_LENGTH() bfin_read16(CAN0_MB17_LENGTH)
2384#define bfin_write_CAN0_MB17_LENGTH(val) bfin_write16(CAN0_MB17_LENGTH, val)
2385#define bfin_read_CAN0_MB17_TIMESTAMP() bfin_read16(CAN0_MB17_TIMESTAMP)
2386#define bfin_write_CAN0_MB17_TIMESTAMP(val) bfin_write16(CAN0_MB17_TIMESTAMP, val)
2387#define bfin_read_CAN0_MB17_ID0() bfin_read16(CAN0_MB17_ID0)
2388#define bfin_write_CAN0_MB17_ID0(val) bfin_write16(CAN0_MB17_ID0, val)
2389#define bfin_read_CAN0_MB17_ID1() bfin_read16(CAN0_MB17_ID1)
2390#define bfin_write_CAN0_MB17_ID1(val) bfin_write16(CAN0_MB17_ID1, val)
2391#define bfin_read_CAN0_MB18_DATA0() bfin_read16(CAN0_MB18_DATA0)
2392#define bfin_write_CAN0_MB18_DATA0(val) bfin_write16(CAN0_MB18_DATA0, val)
2393#define bfin_read_CAN0_MB18_DATA1() bfin_read16(CAN0_MB18_DATA1)
2394#define bfin_write_CAN0_MB18_DATA1(val) bfin_write16(CAN0_MB18_DATA1, val)
2395#define bfin_read_CAN0_MB18_DATA2() bfin_read16(CAN0_MB18_DATA2)
2396#define bfin_write_CAN0_MB18_DATA2(val) bfin_write16(CAN0_MB18_DATA2, val)
2397#define bfin_read_CAN0_MB18_DATA3() bfin_read16(CAN0_MB18_DATA3)
2398#define bfin_write_CAN0_MB18_DATA3(val) bfin_write16(CAN0_MB18_DATA3, val)
2399#define bfin_read_CAN0_MB18_LENGTH() bfin_read16(CAN0_MB18_LENGTH)
2400#define bfin_write_CAN0_MB18_LENGTH(val) bfin_write16(CAN0_MB18_LENGTH, val)
2401#define bfin_read_CAN0_MB18_TIMESTAMP() bfin_read16(CAN0_MB18_TIMESTAMP)
2402#define bfin_write_CAN0_MB18_TIMESTAMP(val) bfin_write16(CAN0_MB18_TIMESTAMP, val)
2403#define bfin_read_CAN0_MB18_ID0() bfin_read16(CAN0_MB18_ID0)
2404#define bfin_write_CAN0_MB18_ID0(val) bfin_write16(CAN0_MB18_ID0, val)
2405#define bfin_read_CAN0_MB18_ID1() bfin_read16(CAN0_MB18_ID1)
2406#define bfin_write_CAN0_MB18_ID1(val) bfin_write16(CAN0_MB18_ID1, val)
2407#define bfin_read_CAN0_MB19_DATA0() bfin_read16(CAN0_MB19_DATA0)
2408#define bfin_write_CAN0_MB19_DATA0(val) bfin_write16(CAN0_MB19_DATA0, val)
2409#define bfin_read_CAN0_MB19_DATA1() bfin_read16(CAN0_MB19_DATA1)
2410#define bfin_write_CAN0_MB19_DATA1(val) bfin_write16(CAN0_MB19_DATA1, val)
2411#define bfin_read_CAN0_MB19_DATA2() bfin_read16(CAN0_MB19_DATA2)
2412#define bfin_write_CAN0_MB19_DATA2(val) bfin_write16(CAN0_MB19_DATA2, val)
2413#define bfin_read_CAN0_MB19_DATA3() bfin_read16(CAN0_MB19_DATA3)
2414#define bfin_write_CAN0_MB19_DATA3(val) bfin_write16(CAN0_MB19_DATA3, val)
2415#define bfin_read_CAN0_MB19_LENGTH() bfin_read16(CAN0_MB19_LENGTH)
2416#define bfin_write_CAN0_MB19_LENGTH(val) bfin_write16(CAN0_MB19_LENGTH, val)
2417#define bfin_read_CAN0_MB19_TIMESTAMP() bfin_read16(CAN0_MB19_TIMESTAMP)
2418#define bfin_write_CAN0_MB19_TIMESTAMP(val) bfin_write16(CAN0_MB19_TIMESTAMP, val)
2419#define bfin_read_CAN0_MB19_ID0() bfin_read16(CAN0_MB19_ID0)
2420#define bfin_write_CAN0_MB19_ID0(val) bfin_write16(CAN0_MB19_ID0, val)
2421#define bfin_read_CAN0_MB19_ID1() bfin_read16(CAN0_MB19_ID1)
2422#define bfin_write_CAN0_MB19_ID1(val) bfin_write16(CAN0_MB19_ID1, val)
2423#define bfin_read_CAN0_MB20_DATA0() bfin_read16(CAN0_MB20_DATA0)
2424#define bfin_write_CAN0_MB20_DATA0(val) bfin_write16(CAN0_MB20_DATA0, val)
2425#define bfin_read_CAN0_MB20_DATA1() bfin_read16(CAN0_MB20_DATA1)
2426#define bfin_write_CAN0_MB20_DATA1(val) bfin_write16(CAN0_MB20_DATA1, val)
2427#define bfin_read_CAN0_MB20_DATA2() bfin_read16(CAN0_MB20_DATA2)
2428#define bfin_write_CAN0_MB20_DATA2(val) bfin_write16(CAN0_MB20_DATA2, val)
2429#define bfin_read_CAN0_MB20_DATA3() bfin_read16(CAN0_MB20_DATA3)
2430#define bfin_write_CAN0_MB20_DATA3(val) bfin_write16(CAN0_MB20_DATA3, val)
2431#define bfin_read_CAN0_MB20_LENGTH() bfin_read16(CAN0_MB20_LENGTH)
2432#define bfin_write_CAN0_MB20_LENGTH(val) bfin_write16(CAN0_MB20_LENGTH, val)
2433#define bfin_read_CAN0_MB20_TIMESTAMP() bfin_read16(CAN0_MB20_TIMESTAMP)
2434#define bfin_write_CAN0_MB20_TIMESTAMP(val) bfin_write16(CAN0_MB20_TIMESTAMP, val)
2435#define bfin_read_CAN0_MB20_ID0() bfin_read16(CAN0_MB20_ID0)
2436#define bfin_write_CAN0_MB20_ID0(val) bfin_write16(CAN0_MB20_ID0, val)
2437#define bfin_read_CAN0_MB20_ID1() bfin_read16(CAN0_MB20_ID1)
2438#define bfin_write_CAN0_MB20_ID1(val) bfin_write16(CAN0_MB20_ID1, val)
2439#define bfin_read_CAN0_MB21_DATA0() bfin_read16(CAN0_MB21_DATA0)
2440#define bfin_write_CAN0_MB21_DATA0(val) bfin_write16(CAN0_MB21_DATA0, val)
2441#define bfin_read_CAN0_MB21_DATA1() bfin_read16(CAN0_MB21_DATA1)
2442#define bfin_write_CAN0_MB21_DATA1(val) bfin_write16(CAN0_MB21_DATA1, val)
2443#define bfin_read_CAN0_MB21_DATA2() bfin_read16(CAN0_MB21_DATA2)
2444#define bfin_write_CAN0_MB21_DATA2(val) bfin_write16(CAN0_MB21_DATA2, val)
2445#define bfin_read_CAN0_MB21_DATA3() bfin_read16(CAN0_MB21_DATA3)
2446#define bfin_write_CAN0_MB21_DATA3(val) bfin_write16(CAN0_MB21_DATA3, val)
2447#define bfin_read_CAN0_MB21_LENGTH() bfin_read16(CAN0_MB21_LENGTH)
2448#define bfin_write_CAN0_MB21_LENGTH(val) bfin_write16(CAN0_MB21_LENGTH, val)
2449#define bfin_read_CAN0_MB21_TIMESTAMP() bfin_read16(CAN0_MB21_TIMESTAMP)
2450#define bfin_write_CAN0_MB21_TIMESTAMP(val) bfin_write16(CAN0_MB21_TIMESTAMP, val)
2451#define bfin_read_CAN0_MB21_ID0() bfin_read16(CAN0_MB21_ID0)
2452#define bfin_write_CAN0_MB21_ID0(val) bfin_write16(CAN0_MB21_ID0, val)
2453#define bfin_read_CAN0_MB21_ID1() bfin_read16(CAN0_MB21_ID1)
2454#define bfin_write_CAN0_MB21_ID1(val) bfin_write16(CAN0_MB21_ID1, val)
2455#define bfin_read_CAN0_MB22_DATA0() bfin_read16(CAN0_MB22_DATA0)
2456#define bfin_write_CAN0_MB22_DATA0(val) bfin_write16(CAN0_MB22_DATA0, val)
2457#define bfin_read_CAN0_MB22_DATA1() bfin_read16(CAN0_MB22_DATA1)
2458#define bfin_write_CAN0_MB22_DATA1(val) bfin_write16(CAN0_MB22_DATA1, val)
2459#define bfin_read_CAN0_MB22_DATA2() bfin_read16(CAN0_MB22_DATA2)
2460#define bfin_write_CAN0_MB22_DATA2(val) bfin_write16(CAN0_MB22_DATA2, val)
2461#define bfin_read_CAN0_MB22_DATA3() bfin_read16(CAN0_MB22_DATA3)
2462#define bfin_write_CAN0_MB22_DATA3(val) bfin_write16(CAN0_MB22_DATA3, val)
2463#define bfin_read_CAN0_MB22_LENGTH() bfin_read16(CAN0_MB22_LENGTH)
2464#define bfin_write_CAN0_MB22_LENGTH(val) bfin_write16(CAN0_MB22_LENGTH, val)
2465#define bfin_read_CAN0_MB22_TIMESTAMP() bfin_read16(CAN0_MB22_TIMESTAMP)
2466#define bfin_write_CAN0_MB22_TIMESTAMP(val) bfin_write16(CAN0_MB22_TIMESTAMP, val)
2467#define bfin_read_CAN0_MB22_ID0() bfin_read16(CAN0_MB22_ID0)
2468#define bfin_write_CAN0_MB22_ID0(val) bfin_write16(CAN0_MB22_ID0, val)
2469#define bfin_read_CAN0_MB22_ID1() bfin_read16(CAN0_MB22_ID1)
2470#define bfin_write_CAN0_MB22_ID1(val) bfin_write16(CAN0_MB22_ID1, val)
2471#define bfin_read_CAN0_MB23_DATA0() bfin_read16(CAN0_MB23_DATA0)
2472#define bfin_write_CAN0_MB23_DATA0(val) bfin_write16(CAN0_MB23_DATA0, val)
2473#define bfin_read_CAN0_MB23_DATA1() bfin_read16(CAN0_MB23_DATA1)
2474#define bfin_write_CAN0_MB23_DATA1(val) bfin_write16(CAN0_MB23_DATA1, val)
2475#define bfin_read_CAN0_MB23_DATA2() bfin_read16(CAN0_MB23_DATA2)
2476#define bfin_write_CAN0_MB23_DATA2(val) bfin_write16(CAN0_MB23_DATA2, val)
2477#define bfin_read_CAN0_MB23_DATA3() bfin_read16(CAN0_MB23_DATA3)
2478#define bfin_write_CAN0_MB23_DATA3(val) bfin_write16(CAN0_MB23_DATA3, val)
2479#define bfin_read_CAN0_MB23_LENGTH() bfin_read16(CAN0_MB23_LENGTH)
2480#define bfin_write_CAN0_MB23_LENGTH(val) bfin_write16(CAN0_MB23_LENGTH, val)
2481#define bfin_read_CAN0_MB23_TIMESTAMP() bfin_read16(CAN0_MB23_TIMESTAMP)
2482#define bfin_write_CAN0_MB23_TIMESTAMP(val) bfin_write16(CAN0_MB23_TIMESTAMP, val)
2483#define bfin_read_CAN0_MB23_ID0() bfin_read16(CAN0_MB23_ID0)
2484#define bfin_write_CAN0_MB23_ID0(val) bfin_write16(CAN0_MB23_ID0, val)
2485#define bfin_read_CAN0_MB23_ID1() bfin_read16(CAN0_MB23_ID1)
2486#define bfin_write_CAN0_MB23_ID1(val) bfin_write16(CAN0_MB23_ID1, val)
2487#define bfin_read_CAN0_MB24_DATA0() bfin_read16(CAN0_MB24_DATA0)
2488#define bfin_write_CAN0_MB24_DATA0(val) bfin_write16(CAN0_MB24_DATA0, val)
2489#define bfin_read_CAN0_MB24_DATA1() bfin_read16(CAN0_MB24_DATA1)
2490#define bfin_write_CAN0_MB24_DATA1(val) bfin_write16(CAN0_MB24_DATA1, val)
2491#define bfin_read_CAN0_MB24_DATA2() bfin_read16(CAN0_MB24_DATA2)
2492#define bfin_write_CAN0_MB24_DATA2(val) bfin_write16(CAN0_MB24_DATA2, val)
2493#define bfin_read_CAN0_MB24_DATA3() bfin_read16(CAN0_MB24_DATA3)
2494#define bfin_write_CAN0_MB24_DATA3(val) bfin_write16(CAN0_MB24_DATA3, val)
2495#define bfin_read_CAN0_MB24_LENGTH() bfin_read16(CAN0_MB24_LENGTH)
2496#define bfin_write_CAN0_MB24_LENGTH(val) bfin_write16(CAN0_MB24_LENGTH, val)
2497#define bfin_read_CAN0_MB24_TIMESTAMP() bfin_read16(CAN0_MB24_TIMESTAMP)
2498#define bfin_write_CAN0_MB24_TIMESTAMP(val) bfin_write16(CAN0_MB24_TIMESTAMP, val)
2499#define bfin_read_CAN0_MB24_ID0() bfin_read16(CAN0_MB24_ID0)
2500#define bfin_write_CAN0_MB24_ID0(val) bfin_write16(CAN0_MB24_ID0, val)
2501#define bfin_read_CAN0_MB24_ID1() bfin_read16(CAN0_MB24_ID1)
2502#define bfin_write_CAN0_MB24_ID1(val) bfin_write16(CAN0_MB24_ID1, val)
2503#define bfin_read_CAN0_MB25_DATA0() bfin_read16(CAN0_MB25_DATA0)
2504#define bfin_write_CAN0_MB25_DATA0(val) bfin_write16(CAN0_MB25_DATA0, val)
2505#define bfin_read_CAN0_MB25_DATA1() bfin_read16(CAN0_MB25_DATA1)
2506#define bfin_write_CAN0_MB25_DATA1(val) bfin_write16(CAN0_MB25_DATA1, val)
2507#define bfin_read_CAN0_MB25_DATA2() bfin_read16(CAN0_MB25_DATA2)
2508#define bfin_write_CAN0_MB25_DATA2(val) bfin_write16(CAN0_MB25_DATA2, val)
2509#define bfin_read_CAN0_MB25_DATA3() bfin_read16(CAN0_MB25_DATA3)
2510#define bfin_write_CAN0_MB25_DATA3(val) bfin_write16(CAN0_MB25_DATA3, val)
2511#define bfin_read_CAN0_MB25_LENGTH() bfin_read16(CAN0_MB25_LENGTH)
2512#define bfin_write_CAN0_MB25_LENGTH(val) bfin_write16(CAN0_MB25_LENGTH, val)
2513#define bfin_read_CAN0_MB25_TIMESTAMP() bfin_read16(CAN0_MB25_TIMESTAMP)
2514#define bfin_write_CAN0_MB25_TIMESTAMP(val) bfin_write16(CAN0_MB25_TIMESTAMP, val)
2515#define bfin_read_CAN0_MB25_ID0() bfin_read16(CAN0_MB25_ID0)
2516#define bfin_write_CAN0_MB25_ID0(val) bfin_write16(CAN0_MB25_ID0, val)
2517#define bfin_read_CAN0_MB25_ID1() bfin_read16(CAN0_MB25_ID1)
2518#define bfin_write_CAN0_MB25_ID1(val) bfin_write16(CAN0_MB25_ID1, val)
2519#define bfin_read_CAN0_MB26_DATA0() bfin_read16(CAN0_MB26_DATA0)
2520#define bfin_write_CAN0_MB26_DATA0(val) bfin_write16(CAN0_MB26_DATA0, val)
2521#define bfin_read_CAN0_MB26_DATA1() bfin_read16(CAN0_MB26_DATA1)
2522#define bfin_write_CAN0_MB26_DATA1(val) bfin_write16(CAN0_MB26_DATA1, val)
2523#define bfin_read_CAN0_MB26_DATA2() bfin_read16(CAN0_MB26_DATA2)
2524#define bfin_write_CAN0_MB26_DATA2(val) bfin_write16(CAN0_MB26_DATA2, val)
2525#define bfin_read_CAN0_MB26_DATA3() bfin_read16(CAN0_MB26_DATA3)
2526#define bfin_write_CAN0_MB26_DATA3(val) bfin_write16(CAN0_MB26_DATA3, val)
2527#define bfin_read_CAN0_MB26_LENGTH() bfin_read16(CAN0_MB26_LENGTH)
2528#define bfin_write_CAN0_MB26_LENGTH(val) bfin_write16(CAN0_MB26_LENGTH, val)
2529#define bfin_read_CAN0_MB26_TIMESTAMP() bfin_read16(CAN0_MB26_TIMESTAMP)
2530#define bfin_write_CAN0_MB26_TIMESTAMP(val) bfin_write16(CAN0_MB26_TIMESTAMP, val)
2531#define bfin_read_CAN0_MB26_ID0() bfin_read16(CAN0_MB26_ID0)
2532#define bfin_write_CAN0_MB26_ID0(val) bfin_write16(CAN0_MB26_ID0, val)
2533#define bfin_read_CAN0_MB26_ID1() bfin_read16(CAN0_MB26_ID1)
2534#define bfin_write_CAN0_MB26_ID1(val) bfin_write16(CAN0_MB26_ID1, val)
2535#define bfin_read_CAN0_MB27_DATA0() bfin_read16(CAN0_MB27_DATA0)
2536#define bfin_write_CAN0_MB27_DATA0(val) bfin_write16(CAN0_MB27_DATA0, val)
2537#define bfin_read_CAN0_MB27_DATA1() bfin_read16(CAN0_MB27_DATA1)
2538#define bfin_write_CAN0_MB27_DATA1(val) bfin_write16(CAN0_MB27_DATA1, val)
2539#define bfin_read_CAN0_MB27_DATA2() bfin_read16(CAN0_MB27_DATA2)
2540#define bfin_write_CAN0_MB27_DATA2(val) bfin_write16(CAN0_MB27_DATA2, val)
2541#define bfin_read_CAN0_MB27_DATA3() bfin_read16(CAN0_MB27_DATA3)
2542#define bfin_write_CAN0_MB27_DATA3(val) bfin_write16(CAN0_MB27_DATA3, val)
2543#define bfin_read_CAN0_MB27_LENGTH() bfin_read16(CAN0_MB27_LENGTH)
2544#define bfin_write_CAN0_MB27_LENGTH(val) bfin_write16(CAN0_MB27_LENGTH, val)
2545#define bfin_read_CAN0_MB27_TIMESTAMP() bfin_read16(CAN0_MB27_TIMESTAMP)
2546#define bfin_write_CAN0_MB27_TIMESTAMP(val) bfin_write16(CAN0_MB27_TIMESTAMP, val)
2547#define bfin_read_CAN0_MB27_ID0() bfin_read16(CAN0_MB27_ID0)
2548#define bfin_write_CAN0_MB27_ID0(val) bfin_write16(CAN0_MB27_ID0, val)
2549#define bfin_read_CAN0_MB27_ID1() bfin_read16(CAN0_MB27_ID1)
2550#define bfin_write_CAN0_MB27_ID1(val) bfin_write16(CAN0_MB27_ID1, val)
2551#define bfin_read_CAN0_MB28_DATA0() bfin_read16(CAN0_MB28_DATA0)
2552#define bfin_write_CAN0_MB28_DATA0(val) bfin_write16(CAN0_MB28_DATA0, val)
2553#define bfin_read_CAN0_MB28_DATA1() bfin_read16(CAN0_MB28_DATA1)
2554#define bfin_write_CAN0_MB28_DATA1(val) bfin_write16(CAN0_MB28_DATA1, val)
2555#define bfin_read_CAN0_MB28_DATA2() bfin_read16(CAN0_MB28_DATA2)
2556#define bfin_write_CAN0_MB28_DATA2(val) bfin_write16(CAN0_MB28_DATA2, val)
2557#define bfin_read_CAN0_MB28_DATA3() bfin_read16(CAN0_MB28_DATA3)
2558#define bfin_write_CAN0_MB28_DATA3(val) bfin_write16(CAN0_MB28_DATA3, val)
2559#define bfin_read_CAN0_MB28_LENGTH() bfin_read16(CAN0_MB28_LENGTH)
2560#define bfin_write_CAN0_MB28_LENGTH(val) bfin_write16(CAN0_MB28_LENGTH, val)
2561#define bfin_read_CAN0_MB28_TIMESTAMP() bfin_read16(CAN0_MB28_TIMESTAMP)
2562#define bfin_write_CAN0_MB28_TIMESTAMP(val) bfin_write16(CAN0_MB28_TIMESTAMP, val)
2563#define bfin_read_CAN0_MB28_ID0() bfin_read16(CAN0_MB28_ID0)
2564#define bfin_write_CAN0_MB28_ID0(val) bfin_write16(CAN0_MB28_ID0, val)
2565#define bfin_read_CAN0_MB28_ID1() bfin_read16(CAN0_MB28_ID1)
2566#define bfin_write_CAN0_MB28_ID1(val) bfin_write16(CAN0_MB28_ID1, val)
2567#define bfin_read_CAN0_MB29_DATA0() bfin_read16(CAN0_MB29_DATA0)
2568#define bfin_write_CAN0_MB29_DATA0(val) bfin_write16(CAN0_MB29_DATA0, val)
2569#define bfin_read_CAN0_MB29_DATA1() bfin_read16(CAN0_MB29_DATA1)
2570#define bfin_write_CAN0_MB29_DATA1(val) bfin_write16(CAN0_MB29_DATA1, val)
2571#define bfin_read_CAN0_MB29_DATA2() bfin_read16(CAN0_MB29_DATA2)
2572#define bfin_write_CAN0_MB29_DATA2(val) bfin_write16(CAN0_MB29_DATA2, val)
2573#define bfin_read_CAN0_MB29_DATA3() bfin_read16(CAN0_MB29_DATA3)
2574#define bfin_write_CAN0_MB29_DATA3(val) bfin_write16(CAN0_MB29_DATA3, val)
2575#define bfin_read_CAN0_MB29_LENGTH() bfin_read16(CAN0_MB29_LENGTH)
2576#define bfin_write_CAN0_MB29_LENGTH(val) bfin_write16(CAN0_MB29_LENGTH, val)
2577#define bfin_read_CAN0_MB29_TIMESTAMP() bfin_read16(CAN0_MB29_TIMESTAMP)
2578#define bfin_write_CAN0_MB29_TIMESTAMP(val) bfin_write16(CAN0_MB29_TIMESTAMP, val)
2579#define bfin_read_CAN0_MB29_ID0() bfin_read16(CAN0_MB29_ID0)
2580#define bfin_write_CAN0_MB29_ID0(val) bfin_write16(CAN0_MB29_ID0, val)
2581#define bfin_read_CAN0_MB29_ID1() bfin_read16(CAN0_MB29_ID1)
2582#define bfin_write_CAN0_MB29_ID1(val) bfin_write16(CAN0_MB29_ID1, val)
2583#define bfin_read_CAN0_MB30_DATA0() bfin_read16(CAN0_MB30_DATA0)
2584#define bfin_write_CAN0_MB30_DATA0(val) bfin_write16(CAN0_MB30_DATA0, val)
2585#define bfin_read_CAN0_MB30_DATA1() bfin_read16(CAN0_MB30_DATA1)
2586#define bfin_write_CAN0_MB30_DATA1(val) bfin_write16(CAN0_MB30_DATA1, val)
2587#define bfin_read_CAN0_MB30_DATA2() bfin_read16(CAN0_MB30_DATA2)
2588#define bfin_write_CAN0_MB30_DATA2(val) bfin_write16(CAN0_MB30_DATA2, val)
2589#define bfin_read_CAN0_MB30_DATA3() bfin_read16(CAN0_MB30_DATA3)
2590#define bfin_write_CAN0_MB30_DATA3(val) bfin_write16(CAN0_MB30_DATA3, val)
2591#define bfin_read_CAN0_MB30_LENGTH() bfin_read16(CAN0_MB30_LENGTH)
2592#define bfin_write_CAN0_MB30_LENGTH(val) bfin_write16(CAN0_MB30_LENGTH, val)
2593#define bfin_read_CAN0_MB30_TIMESTAMP() bfin_read16(CAN0_MB30_TIMESTAMP)
2594#define bfin_write_CAN0_MB30_TIMESTAMP(val) bfin_write16(CAN0_MB30_TIMESTAMP, val)
2595#define bfin_read_CAN0_MB30_ID0() bfin_read16(CAN0_MB30_ID0)
2596#define bfin_write_CAN0_MB30_ID0(val) bfin_write16(CAN0_MB30_ID0, val)
2597#define bfin_read_CAN0_MB30_ID1() bfin_read16(CAN0_MB30_ID1)
2598#define bfin_write_CAN0_MB30_ID1(val) bfin_write16(CAN0_MB30_ID1, val)
2599#define bfin_read_CAN0_MB31_DATA0() bfin_read16(CAN0_MB31_DATA0)
2600#define bfin_write_CAN0_MB31_DATA0(val) bfin_write16(CAN0_MB31_DATA0, val)
2601#define bfin_read_CAN0_MB31_DATA1() bfin_read16(CAN0_MB31_DATA1)
2602#define bfin_write_CAN0_MB31_DATA1(val) bfin_write16(CAN0_MB31_DATA1, val)
2603#define bfin_read_CAN0_MB31_DATA2() bfin_read16(CAN0_MB31_DATA2)
2604#define bfin_write_CAN0_MB31_DATA2(val) bfin_write16(CAN0_MB31_DATA2, val)
2605#define bfin_read_CAN0_MB31_DATA3() bfin_read16(CAN0_MB31_DATA3)
2606#define bfin_write_CAN0_MB31_DATA3(val) bfin_write16(CAN0_MB31_DATA3, val)
2607#define bfin_read_CAN0_MB31_LENGTH() bfin_read16(CAN0_MB31_LENGTH)
2608#define bfin_write_CAN0_MB31_LENGTH(val) bfin_write16(CAN0_MB31_LENGTH, val)
2609#define bfin_read_CAN0_MB31_TIMESTAMP() bfin_read16(CAN0_MB31_TIMESTAMP)
2610#define bfin_write_CAN0_MB31_TIMESTAMP(val) bfin_write16(CAN0_MB31_TIMESTAMP, val)
2611#define bfin_read_CAN0_MB31_ID0() bfin_read16(CAN0_MB31_ID0)
2612#define bfin_write_CAN0_MB31_ID0(val) bfin_write16(CAN0_MB31_ID0, val)
2613#define bfin_read_CAN0_MB31_ID1() bfin_read16(CAN0_MB31_ID1)
2614#define bfin_write_CAN0_MB31_ID1(val) bfin_write16(CAN0_MB31_ID1, val)
2615
2616/* UART3 Registers */
2617
2618#define bfin_read_UART3_DLL() bfin_read16(UART3_DLL)
2619#define bfin_write_UART3_DLL(val) bfin_write16(UART3_DLL, val)
2620#define bfin_read_UART3_DLH() bfin_read16(UART3_DLH)
2621#define bfin_write_UART3_DLH(val) bfin_write16(UART3_DLH, val)
2622#define bfin_read_UART3_GCTL() bfin_read16(UART3_GCTL)
2623#define bfin_write_UART3_GCTL(val) bfin_write16(UART3_GCTL, val)
2624#define bfin_read_UART3_LCR() bfin_read16(UART3_LCR)
2625#define bfin_write_UART3_LCR(val) bfin_write16(UART3_LCR, val)
2626#define bfin_read_UART3_MCR() bfin_read16(UART3_MCR)
2627#define bfin_write_UART3_MCR(val) bfin_write16(UART3_MCR, val)
2628#define bfin_read_UART3_LSR() bfin_read16(UART3_LSR)
2629#define bfin_write_UART3_LSR(val) bfin_write16(UART3_LSR, val)
2630#define bfin_read_UART3_MSR() bfin_read16(UART3_MSR)
2631#define bfin_write_UART3_MSR(val) bfin_write16(UART3_MSR, val)
2632#define bfin_read_UART3_SCR() bfin_read16(UART3_SCR)
2633#define bfin_write_UART3_SCR(val) bfin_write16(UART3_SCR, val)
2634#define bfin_read_UART3_IER_SET() bfin_read16(UART3_IER_SET)
2635#define bfin_write_UART3_IER_SET(val) bfin_write16(UART3_IER_SET, val)
2636#define bfin_read_UART3_IER_CLEAR() bfin_read16(UART3_IER_CLEAR)
2637#define bfin_write_UART3_IER_CLEAR(val) bfin_write16(UART3_IER_CLEAR, val)
2638#define bfin_read_UART3_THR() bfin_read16(UART3_THR)
2639#define bfin_write_UART3_THR(val) bfin_write16(UART3_THR, val)
2640#define bfin_read_UART3_RBR() bfin_read16(UART3_RBR)
2641#define bfin_write_UART3_RBR(val) bfin_write16(UART3_RBR, val)
2642
2643/* NFC Registers */
2644
2645#define bfin_read_NFC_CTL() bfin_read16(NFC_CTL)
2646#define bfin_write_NFC_CTL(val) bfin_write16(NFC_CTL, val)
2647#define bfin_read_NFC_STAT() bfin_read16(NFC_STAT)
2648#define bfin_write_NFC_STAT(val) bfin_write16(NFC_STAT, val)
2649#define bfin_read_NFC_IRQSTAT() bfin_read16(NFC_IRQSTAT)
2650#define bfin_write_NFC_IRQSTAT(val) bfin_write16(NFC_IRQSTAT, val)
2651#define bfin_read_NFC_IRQMASK() bfin_read16(NFC_IRQMASK)
2652#define bfin_write_NFC_IRQMASK(val) bfin_write16(NFC_IRQMASK, val)
2653#define bfin_read_NFC_ECC0() bfin_read16(NFC_ECC0)
2654#define bfin_write_NFC_ECC0(val) bfin_write16(NFC_ECC0, val)
2655#define bfin_read_NFC_ECC1() bfin_read16(NFC_ECC1)
2656#define bfin_write_NFC_ECC1(val) bfin_write16(NFC_ECC1, val)
2657#define bfin_read_NFC_ECC2() bfin_read16(NFC_ECC2)
2658#define bfin_write_NFC_ECC2(val) bfin_write16(NFC_ECC2, val)
2659#define bfin_read_NFC_ECC3() bfin_read16(NFC_ECC3)
2660#define bfin_write_NFC_ECC3(val) bfin_write16(NFC_ECC3, val)
2661#define bfin_read_NFC_COUNT() bfin_read16(NFC_COUNT)
2662#define bfin_write_NFC_COUNT(val) bfin_write16(NFC_COUNT, val)
2663#define bfin_read_NFC_RST() bfin_read16(NFC_RST)
2664#define bfin_write_NFC_RST(val) bfin_write16(NFC_RST, val)
2665#define bfin_read_NFC_PGCTL() bfin_read16(NFC_PGCTL)
2666#define bfin_write_NFC_PGCTL(val) bfin_write16(NFC_PGCTL, val)
2667#define bfin_read_NFC_READ() bfin_read16(NFC_READ)
2668#define bfin_write_NFC_READ(val) bfin_write16(NFC_READ, val)
2669#define bfin_read_NFC_ADDR() bfin_read16(NFC_ADDR)
2670#define bfin_write_NFC_ADDR(val) bfin_write16(NFC_ADDR, val)
2671#define bfin_read_NFC_CMD() bfin_read16(NFC_CMD)
2672#define bfin_write_NFC_CMD(val) bfin_write16(NFC_CMD, val)
2673#define bfin_read_NFC_DATA_WR() bfin_read16(NFC_DATA_WR)
2674#define bfin_write_NFC_DATA_WR(val) bfin_write16(NFC_DATA_WR, val)
2675#define bfin_read_NFC_DATA_RD() bfin_read16(NFC_DATA_RD)
2676#define bfin_write_NFC_DATA_RD(val) bfin_write16(NFC_DATA_RD, val)
2677
2678/* Counter Registers */
2679
2680#define bfin_read_CNT_CONFIG() bfin_read16(CNT_CONFIG)
2681#define bfin_write_CNT_CONFIG(val) bfin_write16(CNT_CONFIG, val)
2682#define bfin_read_CNT_IMASK() bfin_read16(CNT_IMASK)
2683#define bfin_write_CNT_IMASK(val) bfin_write16(CNT_IMASK, val)
2684#define bfin_read_CNT_STATUS() bfin_read16(CNT_STATUS)
2685#define bfin_write_CNT_STATUS(val) bfin_write16(CNT_STATUS, val)
2686#define bfin_read_CNT_COMMAND() bfin_read16(CNT_COMMAND)
2687#define bfin_write_CNT_COMMAND(val) bfin_write16(CNT_COMMAND, val)
2688#define bfin_read_CNT_DEBOUNCE() bfin_read16(CNT_DEBOUNCE)
2689#define bfin_write_CNT_DEBOUNCE(val) bfin_write16(CNT_DEBOUNCE, val)
2690#define bfin_read_CNT_COUNTER() bfin_read32(CNT_COUNTER)
2691#define bfin_write_CNT_COUNTER(val) bfin_write32(CNT_COUNTER, val)
2692#define bfin_read_CNT_MAX() bfin_read32(CNT_MAX)
2693#define bfin_write_CNT_MAX(val) bfin_write32(CNT_MAX, val)
2694#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN)
2695#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val)
2696
2697/* OTP/FUSE Registers */
2698
2699#define bfin_read_OTP_CONTROL() bfin_read16(OTP_CONTROL)
2700#define bfin_write_OTP_CONTROL(val) bfin_write16(OTP_CONTROL, val)
2701#define bfin_read_OTP_BEN() bfin_read16(OTP_BEN)
2702#define bfin_write_OTP_BEN(val) bfin_write16(OTP_BEN, val)
2703#define bfin_read_OTP_STATUS() bfin_read16(OTP_STATUS)
2704#define bfin_write_OTP_STATUS(val) bfin_write16(OTP_STATUS, val)
2705#define bfin_read_OTP_TIMING() bfin_read32(OTP_TIMING)
2706#define bfin_write_OTP_TIMING(val) bfin_write32(OTP_TIMING, val)
2707
2708/* Security Registers */
2709
2710#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT)
2711#define bfin_write_SECURE_SYSSWT(val) bfin_write32(SECURE_SYSSWT, val)
2712#define bfin_read_SECURE_CONTROL() bfin_read16(SECURE_CONTROL)
2713#define bfin_write_SECURE_CONTROL(val) bfin_write16(SECURE_CONTROL, val)
2714#define bfin_read_SECURE_STATUS() bfin_read16(SECURE_STATUS)
2715#define bfin_write_SECURE_STATUS(val) bfin_write16(SECURE_STATUS, val)
2716
2717/* DMA Peribfin_read_()heral Mux Register */
2718
2719#define bfin_read_DMAC1_PERIMUX() bfin_read16(DMAC1_PERIMUX)
2720#define bfin_write_DMAC1_PERIMUX(val) bfin_write16(DMAC1_PERIMUX, val)
2721
2722/* OTP Read/Write Data Buffer Registers */
2723
2724#define bfin_read_OTP_DATA0() bfin_read32(OTP_DATA0)
2725#define bfin_write_OTP_DATA0(val) bfin_write32(OTP_DATA0, val)
2726#define bfin_read_OTP_DATA1() bfin_read32(OTP_DATA1)
2727#define bfin_write_OTP_DATA1(val) bfin_write32(OTP_DATA1, val)
2728#define bfin_read_OTP_DATA2() bfin_read32(OTP_DATA2)
2729#define bfin_write_OTP_DATA2(val) bfin_write32(OTP_DATA2, val)
2730#define bfin_read_OTP_DATA3() bfin_read32(OTP_DATA3)
2731#define bfin_write_OTP_DATA3(val) bfin_write32(OTP_DATA3, val)
2732
2733/* Handshake MDMA is not defined in the shared file because it is not available on the ADSP-BF542 bfin_read_()rocessor */
2734
2735/* legacy definitions */
2736#define bfin_read_EBIU_AMCBCTL0 bfin_read_EBIU_AMBCTL0
2737#define bfin_write_EBIU_AMCBCTL0 bfin_write_EBIU_AMBCTL0
2738#define bfin_read_EBIU_AMCBCTL1 bfin_read_EBIU_AMBCTL1
2739#define bfin_write_EBIU_AMCBCTL1 bfin_write_EBIU_AMBCTL1
2740#define bfin_read_PINT0_IRQ bfin_read_PINT0_REQUEST
2741#define bfin_write_PINT0_IRQ bfin_write_PINT0_REQUEST
2742#define bfin_read_PINT1_IRQ bfin_read_PINT1_REQUEST
2743#define bfin_write_PINT1_IRQ bfin_write_PINT1_REQUEST
2744#define bfin_read_PINT2_IRQ bfin_read_PINT2_REQUEST
2745#define bfin_write_PINT2_IRQ bfin_write_PINT2_REQUEST
2746#define bfin_read_PINT3_IRQ bfin_read_PINT3_REQUEST
2747#define bfin_write_PINT3_IRQ bfin_write_PINT3_REQUEST
2748
2749#endif /* _CDEF_BF54X_H */
2750
diff --git a/include/asm-blackfin/mach-bf548/defBF542.h b/include/asm-blackfin/mach-bf548/defBF542.h
deleted file mode 100644
index a7c809f29ede..000000000000
--- a/include/asm-blackfin/mach-bf548/defBF542.h
+++ /dev/null
@@ -1,925 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/defBF542.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF542_H
32#define _DEF_BF542_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF542 */
38
39/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
40#include "defBF54x_base.h"
41
42/* The following are the #defines needed by ADSP-BF542 that are not in the common header */
43
44/* ATAPI Registers */
45
46#define ATAPI_CONTROL 0xffc03800 /* ATAPI Control Register */
47#define ATAPI_STATUS 0xffc03804 /* ATAPI Status Register */
48#define ATAPI_DEV_ADDR 0xffc03808 /* ATAPI Device Register Address */
49#define ATAPI_DEV_TXBUF 0xffc0380c /* ATAPI Device Register Write Data */
50#define ATAPI_DEV_RXBUF 0xffc03810 /* ATAPI Device Register Read Data */
51#define ATAPI_INT_MASK 0xffc03814 /* ATAPI Interrupt Mask Register */
52#define ATAPI_INT_STATUS 0xffc03818 /* ATAPI Interrupt Status Register */
53#define ATAPI_XFER_LEN 0xffc0381c /* ATAPI Length of Transfer */
54#define ATAPI_LINE_STATUS 0xffc03820 /* ATAPI Line Status */
55#define ATAPI_SM_STATE 0xffc03824 /* ATAPI State Machine Status */
56#define ATAPI_TERMINATE 0xffc03828 /* ATAPI Host Terminate */
57#define ATAPI_PIO_TFRCNT 0xffc0382c /* ATAPI PIO mode transfer count */
58#define ATAPI_DMA_TFRCNT 0xffc03830 /* ATAPI DMA mode transfer count */
59#define ATAPI_UMAIN_TFRCNT 0xffc03834 /* ATAPI UDMAIN transfer count */
60#define ATAPI_UDMAOUT_TFRCNT 0xffc03838 /* ATAPI UDMAOUT transfer count */
61#define ATAPI_REG_TIM_0 0xffc03840 /* ATAPI Register Transfer Timing 0 */
62#define ATAPI_PIO_TIM_0 0xffc03844 /* ATAPI PIO Timing 0 Register */
63#define ATAPI_PIO_TIM_1 0xffc03848 /* ATAPI PIO Timing 1 Register */
64#define ATAPI_MULTI_TIM_0 0xffc03850 /* ATAPI Multi-DMA Timing 0 Register */
65#define ATAPI_MULTI_TIM_1 0xffc03854 /* ATAPI Multi-DMA Timing 1 Register */
66#define ATAPI_MULTI_TIM_2 0xffc03858 /* ATAPI Multi-DMA Timing 2 Register */
67#define ATAPI_ULTRA_TIM_0 0xffc03860 /* ATAPI Ultra-DMA Timing 0 Register */
68#define ATAPI_ULTRA_TIM_1 0xffc03864 /* ATAPI Ultra-DMA Timing 1 Register */
69#define ATAPI_ULTRA_TIM_2 0xffc03868 /* ATAPI Ultra-DMA Timing 2 Register */
70#define ATAPI_ULTRA_TIM_3 0xffc0386c /* ATAPI Ultra-DMA Timing 3 Register */
71
72/* SDH Registers */
73
74#define SDH_PWR_CTL 0xffc03900 /* SDH Power Control */
75#define SDH_CLK_CTL 0xffc03904 /* SDH Clock Control */
76#define SDH_ARGUMENT 0xffc03908 /* SDH Argument */
77#define SDH_COMMAND 0xffc0390c /* SDH Command */
78#define SDH_RESP_CMD 0xffc03910 /* SDH Response Command */
79#define SDH_RESPONSE0 0xffc03914 /* SDH Response0 */
80#define SDH_RESPONSE1 0xffc03918 /* SDH Response1 */
81#define SDH_RESPONSE2 0xffc0391c /* SDH Response2 */
82#define SDH_RESPONSE3 0xffc03920 /* SDH Response3 */
83#define SDH_DATA_TIMER 0xffc03924 /* SDH Data Timer */
84#define SDH_DATA_LGTH 0xffc03928 /* SDH Data Length */
85#define SDH_DATA_CTL 0xffc0392c /* SDH Data Control */
86#define SDH_DATA_CNT 0xffc03930 /* SDH Data Counter */
87#define SDH_STATUS 0xffc03934 /* SDH Status */
88#define SDH_STATUS_CLR 0xffc03938 /* SDH Status Clear */
89#define SDH_MASK0 0xffc0393c /* SDH Interrupt0 Mask */
90#define SDH_MASK1 0xffc03940 /* SDH Interrupt1 Mask */
91#define SDH_FIFO_CNT 0xffc03948 /* SDH FIFO Counter */
92#define SDH_FIFO 0xffc03980 /* SDH Data FIFO */
93#define SDH_E_STATUS 0xffc039c0 /* SDH Exception Status */
94#define SDH_E_MASK 0xffc039c4 /* SDH Exception Mask */
95#define SDH_CFG 0xffc039c8 /* SDH Configuration */
96#define SDH_RD_WAIT_EN 0xffc039cc /* SDH Read Wait Enable */
97#define SDH_PID0 0xffc039d0 /* SDH Peripheral Identification0 */
98#define SDH_PID1 0xffc039d4 /* SDH Peripheral Identification1 */
99#define SDH_PID2 0xffc039d8 /* SDH Peripheral Identification2 */
100#define SDH_PID3 0xffc039dc /* SDH Peripheral Identification3 */
101#define SDH_PID4 0xffc039e0 /* SDH Peripheral Identification4 */
102#define SDH_PID5 0xffc039e4 /* SDH Peripheral Identification5 */
103#define SDH_PID6 0xffc039e8 /* SDH Peripheral Identification6 */
104#define SDH_PID7 0xffc039ec /* SDH Peripheral Identification7 */
105
106/* USB Control Registers */
107
108#define USB_FADDR 0xffc03c00 /* Function address register */
109#define USB_POWER 0xffc03c04 /* Power management register */
110#define USB_INTRTX 0xffc03c08 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
111#define USB_INTRRX 0xffc03c0c /* Interrupt register for Rx endpoints 1 to 7 */
112#define USB_INTRTXE 0xffc03c10 /* Interrupt enable register for IntrTx */
113#define USB_INTRRXE 0xffc03c14 /* Interrupt enable register for IntrRx */
114#define USB_INTRUSB 0xffc03c18 /* Interrupt register for common USB interrupts */
115#define USB_INTRUSBE 0xffc03c1c /* Interrupt enable register for IntrUSB */
116#define USB_FRAME 0xffc03c20 /* USB frame number */
117#define USB_INDEX 0xffc03c24 /* Index register for selecting the indexed endpoint registers */
118#define USB_TESTMODE 0xffc03c28 /* Enabled USB 20 test modes */
119#define USB_GLOBINTR 0xffc03c2c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
120#define USB_GLOBAL_CTL 0xffc03c30 /* Global Clock Control for the core */
121
122/* USB Packet Control Registers */
123
124#define USB_TX_MAX_PACKET 0xffc03c40 /* Maximum packet size for Host Tx endpoint */
125#define USB_CSR0 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
126#define USB_TXCSR 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
127#define USB_RX_MAX_PACKET 0xffc03c48 /* Maximum packet size for Host Rx endpoint */
128#define USB_RXCSR 0xffc03c4c /* Control Status register for Host Rx endpoint */
129#define USB_COUNT0 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
130#define USB_RXCOUNT 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
131#define USB_TXTYPE 0xffc03c54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
132#define USB_NAKLIMIT0 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
133#define USB_TXINTERVAL 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
134#define USB_RXTYPE 0xffc03c5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
135#define USB_RXINTERVAL 0xffc03c60 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
136#define USB_TXCOUNT 0xffc03c68 /* Number of bytes to be written to the selected endpoint Tx FIFO */
137
138/* USB Endpoint FIFO Registers */
139
140#define USB_EP0_FIFO 0xffc03c80 /* Endpoint 0 FIFO */
141#define USB_EP1_FIFO 0xffc03c88 /* Endpoint 1 FIFO */
142#define USB_EP2_FIFO 0xffc03c90 /* Endpoint 2 FIFO */
143#define USB_EP3_FIFO 0xffc03c98 /* Endpoint 3 FIFO */
144#define USB_EP4_FIFO 0xffc03ca0 /* Endpoint 4 FIFO */
145#define USB_EP5_FIFO 0xffc03ca8 /* Endpoint 5 FIFO */
146#define USB_EP6_FIFO 0xffc03cb0 /* Endpoint 6 FIFO */
147#define USB_EP7_FIFO 0xffc03cb8 /* Endpoint 7 FIFO */
148
149/* USB OTG Control Registers */
150
151#define USB_OTG_DEV_CTL 0xffc03d00 /* OTG Device Control Register */
152#define USB_OTG_VBUS_IRQ 0xffc03d04 /* OTG VBUS Control Interrupts */
153#define USB_OTG_VBUS_MASK 0xffc03d08 /* VBUS Control Interrupt Enable */
154
155/* USB Phy Control Registers */
156
157#define USB_LINKINFO 0xffc03d48 /* Enables programming of some PHY-side delays */
158#define USB_VPLEN 0xffc03d4c /* Determines duration of VBUS pulse for VBUS charging */
159#define USB_HS_EOF1 0xffc03d50 /* Time buffer for High-Speed transactions */
160#define USB_FS_EOF1 0xffc03d54 /* Time buffer for Full-Speed transactions */
161#define USB_LS_EOF1 0xffc03d58 /* Time buffer for Low-Speed transactions */
162
163/* (APHY_CNTRL is for ADI usage only) */
164
165#define USB_APHY_CNTRL 0xffc03de0 /* Register that increases visibility of Analog PHY */
166
167/* (APHY_CALIB is for ADI usage only) */
168
169#define USB_APHY_CALIB 0xffc03de4 /* Register used to set some calibration values */
170#define USB_APHY_CNTRL2 0xffc03de8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
171
172/* (PHY_TEST is for ADI usage only) */
173
174#define USB_PHY_TEST 0xffc03dec /* Used for reducing simulation time and simplifies FIFO testability */
175#define USB_PLLOSC_CTRL 0xffc03df0 /* Used to program different parameters for USB PLL and Oscillator */
176#define USB_SRP_CLKDIV 0xffc03df4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
177
178/* USB Endpoint 0 Control Registers */
179
180#define USB_EP_NI0_TXMAXP 0xffc03e00 /* Maximum packet size for Host Tx endpoint0 */
181#define USB_EP_NI0_TXCSR 0xffc03e04 /* Control Status register for endpoint 0 */
182#define USB_EP_NI0_RXMAXP 0xffc03e08 /* Maximum packet size for Host Rx endpoint0 */
183#define USB_EP_NI0_RXCSR 0xffc03e0c /* Control Status register for Host Rx endpoint0 */
184#define USB_EP_NI0_RXCOUNT 0xffc03e10 /* Number of bytes received in endpoint 0 FIFO */
185#define USB_EP_NI0_TXTYPE 0xffc03e14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
186#define USB_EP_NI0_TXINTERVAL 0xffc03e18 /* Sets the NAK response timeout on Endpoint 0 */
187#define USB_EP_NI0_RXTYPE 0xffc03e1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
188#define USB_EP_NI0_RXINTERVAL 0xffc03e20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
189
190/* USB Endpoint 1 Control Registers */
191
192#define USB_EP_NI0_TXCOUNT 0xffc03e28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
193#define USB_EP_NI1_TXMAXP 0xffc03e40 /* Maximum packet size for Host Tx endpoint1 */
194#define USB_EP_NI1_TXCSR 0xffc03e44 /* Control Status register for endpoint1 */
195#define USB_EP_NI1_RXMAXP 0xffc03e48 /* Maximum packet size for Host Rx endpoint1 */
196#define USB_EP_NI1_RXCSR 0xffc03e4c /* Control Status register for Host Rx endpoint1 */
197#define USB_EP_NI1_RXCOUNT 0xffc03e50 /* Number of bytes received in endpoint1 FIFO */
198#define USB_EP_NI1_TXTYPE 0xffc03e54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
199#define USB_EP_NI1_TXINTERVAL 0xffc03e58 /* Sets the NAK response timeout on Endpoint1 */
200#define USB_EP_NI1_RXTYPE 0xffc03e5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
201#define USB_EP_NI1_RXINTERVAL 0xffc03e60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
202
203/* USB Endpoint 2 Control Registers */
204
205#define USB_EP_NI1_TXCOUNT 0xffc03e68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
206#define USB_EP_NI2_TXMAXP 0xffc03e80 /* Maximum packet size for Host Tx endpoint2 */
207#define USB_EP_NI2_TXCSR 0xffc03e84 /* Control Status register for endpoint2 */
208#define USB_EP_NI2_RXMAXP 0xffc03e88 /* Maximum packet size for Host Rx endpoint2 */
209#define USB_EP_NI2_RXCSR 0xffc03e8c /* Control Status register for Host Rx endpoint2 */
210#define USB_EP_NI2_RXCOUNT 0xffc03e90 /* Number of bytes received in endpoint2 FIFO */
211#define USB_EP_NI2_TXTYPE 0xffc03e94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
212#define USB_EP_NI2_TXINTERVAL 0xffc03e98 /* Sets the NAK response timeout on Endpoint2 */
213#define USB_EP_NI2_RXTYPE 0xffc03e9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
214#define USB_EP_NI2_RXINTERVAL 0xffc03ea0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
215
216/* USB Endpoint 3 Control Registers */
217
218#define USB_EP_NI2_TXCOUNT 0xffc03ea8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
219#define USB_EP_NI3_TXMAXP 0xffc03ec0 /* Maximum packet size for Host Tx endpoint3 */
220#define USB_EP_NI3_TXCSR 0xffc03ec4 /* Control Status register for endpoint3 */
221#define USB_EP_NI3_RXMAXP 0xffc03ec8 /* Maximum packet size for Host Rx endpoint3 */
222#define USB_EP_NI3_RXCSR 0xffc03ecc /* Control Status register for Host Rx endpoint3 */
223#define USB_EP_NI3_RXCOUNT 0xffc03ed0 /* Number of bytes received in endpoint3 FIFO */
224#define USB_EP_NI3_TXTYPE 0xffc03ed4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
225#define USB_EP_NI3_TXINTERVAL 0xffc03ed8 /* Sets the NAK response timeout on Endpoint3 */
226#define USB_EP_NI3_RXTYPE 0xffc03edc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
227#define USB_EP_NI3_RXINTERVAL 0xffc03ee0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
228
229/* USB Endpoint 4 Control Registers */
230
231#define USB_EP_NI3_TXCOUNT 0xffc03ee8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
232#define USB_EP_NI4_TXMAXP 0xffc03f00 /* Maximum packet size for Host Tx endpoint4 */
233#define USB_EP_NI4_TXCSR 0xffc03f04 /* Control Status register for endpoint4 */
234#define USB_EP_NI4_RXMAXP 0xffc03f08 /* Maximum packet size for Host Rx endpoint4 */
235#define USB_EP_NI4_RXCSR 0xffc03f0c /* Control Status register for Host Rx endpoint4 */
236#define USB_EP_NI4_RXCOUNT 0xffc03f10 /* Number of bytes received in endpoint4 FIFO */
237#define USB_EP_NI4_TXTYPE 0xffc03f14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
238#define USB_EP_NI4_TXINTERVAL 0xffc03f18 /* Sets the NAK response timeout on Endpoint4 */
239#define USB_EP_NI4_RXTYPE 0xffc03f1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
240#define USB_EP_NI4_RXINTERVAL 0xffc03f20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
241
242/* USB Endpoint 5 Control Registers */
243
244#define USB_EP_NI4_TXCOUNT 0xffc03f28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
245#define USB_EP_NI5_TXMAXP 0xffc03f40 /* Maximum packet size for Host Tx endpoint5 */
246#define USB_EP_NI5_TXCSR 0xffc03f44 /* Control Status register for endpoint5 */
247#define USB_EP_NI5_RXMAXP 0xffc03f48 /* Maximum packet size for Host Rx endpoint5 */
248#define USB_EP_NI5_RXCSR 0xffc03f4c /* Control Status register for Host Rx endpoint5 */
249#define USB_EP_NI5_RXCOUNT 0xffc03f50 /* Number of bytes received in endpoint5 FIFO */
250#define USB_EP_NI5_TXTYPE 0xffc03f54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
251#define USB_EP_NI5_TXINTERVAL 0xffc03f58 /* Sets the NAK response timeout on Endpoint5 */
252#define USB_EP_NI5_RXTYPE 0xffc03f5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
253#define USB_EP_NI5_RXINTERVAL 0xffc03f60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
254
255/* USB Endpoint 6 Control Registers */
256
257#define USB_EP_NI5_TXCOUNT 0xffc03f68 /* Number of bytes to be written to the H145endpoint5 Tx FIFO */
258#define USB_EP_NI6_TXMAXP 0xffc03f80 /* Maximum packet size for Host Tx endpoint6 */
259#define USB_EP_NI6_TXCSR 0xffc03f84 /* Control Status register for endpoint6 */
260#define USB_EP_NI6_RXMAXP 0xffc03f88 /* Maximum packet size for Host Rx endpoint6 */
261#define USB_EP_NI6_RXCSR 0xffc03f8c /* Control Status register for Host Rx endpoint6 */
262#define USB_EP_NI6_RXCOUNT 0xffc03f90 /* Number of bytes received in endpoint6 FIFO */
263#define USB_EP_NI6_TXTYPE 0xffc03f94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
264#define USB_EP_NI6_TXINTERVAL 0xffc03f98 /* Sets the NAK response timeout on Endpoint6 */
265#define USB_EP_NI6_RXTYPE 0xffc03f9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
266#define USB_EP_NI6_RXINTERVAL 0xffc03fa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
267
268/* USB Endpoint 7 Control Registers */
269
270#define USB_EP_NI6_TXCOUNT 0xffc03fa8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
271#define USB_EP_NI7_TXMAXP 0xffc03fc0 /* Maximum packet size for Host Tx endpoint7 */
272#define USB_EP_NI7_TXCSR 0xffc03fc4 /* Control Status register for endpoint7 */
273#define USB_EP_NI7_RXMAXP 0xffc03fc8 /* Maximum packet size for Host Rx endpoint7 */
274#define USB_EP_NI7_RXCSR 0xffc03fcc /* Control Status register for Host Rx endpoint7 */
275#define USB_EP_NI7_RXCOUNT 0xffc03fd0 /* Number of bytes received in endpoint7 FIFO */
276#define USB_EP_NI7_TXTYPE 0xffc03fd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
277#define USB_EP_NI7_TXINTERVAL 0xffc03fd8 /* Sets the NAK response timeout on Endpoint7 */
278#define USB_EP_NI7_RXTYPE 0xffc03fdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
279#define USB_EP_NI7_RXINTERVAL 0xffc03ff0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
280#define USB_EP_NI7_TXCOUNT 0xffc03ff8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
281#define USB_DMA_INTERRUPT 0xffc04000 /* Indicates pending interrupts for the DMA channels */
282
283/* USB Channel 0 Config Registers */
284
285#define USB_DMA0CONTROL 0xffc04004 /* DMA master channel 0 configuration */
286#define USB_DMA0ADDRLOW 0xffc04008 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
287#define USB_DMA0ADDRHIGH 0xffc0400c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
288#define USB_DMA0COUNTLOW 0xffc04010 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
289#define USB_DMA0COUNTHIGH 0xffc04014 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
290
291/* USB Channel 1 Config Registers */
292
293#define USB_DMA1CONTROL 0xffc04024 /* DMA master channel 1 configuration */
294#define USB_DMA1ADDRLOW 0xffc04028 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
295#define USB_DMA1ADDRHIGH 0xffc0402c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
296#define USB_DMA1COUNTLOW 0xffc04030 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
297#define USB_DMA1COUNTHIGH 0xffc04034 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
298
299/* USB Channel 2 Config Registers */
300
301#define USB_DMA2CONTROL 0xffc04044 /* DMA master channel 2 configuration */
302#define USB_DMA2ADDRLOW 0xffc04048 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
303#define USB_DMA2ADDRHIGH 0xffc0404c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
304#define USB_DMA2COUNTLOW 0xffc04050 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
305#define USB_DMA2COUNTHIGH 0xffc04054 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
306
307/* USB Channel 3 Config Registers */
308
309#define USB_DMA3CONTROL 0xffc04064 /* DMA master channel 3 configuration */
310#define USB_DMA3ADDRLOW 0xffc04068 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
311#define USB_DMA3ADDRHIGH 0xffc0406c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
312#define USB_DMA3COUNTLOW 0xffc04070 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
313#define USB_DMA3COUNTHIGH 0xffc04074 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
314
315/* USB Channel 4 Config Registers */
316
317#define USB_DMA4CONTROL 0xffc04084 /* DMA master channel 4 configuration */
318#define USB_DMA4ADDRLOW 0xffc04088 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
319#define USB_DMA4ADDRHIGH 0xffc0408c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
320#define USB_DMA4COUNTLOW 0xffc04090 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
321#define USB_DMA4COUNTHIGH 0xffc04094 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
322
323/* USB Channel 5 Config Registers */
324
325#define USB_DMA5CONTROL 0xffc040a4 /* DMA master channel 5 configuration */
326#define USB_DMA5ADDRLOW 0xffc040a8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
327#define USB_DMA5ADDRHIGH 0xffc040ac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
328#define USB_DMA5COUNTLOW 0xffc040b0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
329#define USB_DMA5COUNTHIGH 0xffc040b4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
330
331/* USB Channel 6 Config Registers */
332
333#define USB_DMA6CONTROL 0xffc040c4 /* DMA master channel 6 configuration */
334#define USB_DMA6ADDRLOW 0xffc040c8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
335#define USB_DMA6ADDRHIGH 0xffc040cc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
336#define USB_DMA6COUNTLOW 0xffc040d0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
337#define USB_DMA6COUNTHIGH 0xffc040d4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
338
339/* USB Channel 7 Config Registers */
340
341#define USB_DMA7CONTROL 0xffc040e4 /* DMA master channel 7 configuration */
342#define USB_DMA7ADDRLOW 0xffc040e8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
343#define USB_DMA7ADDRHIGH 0xffc040ec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
344#define USB_DMA7COUNTLOW 0xffc040f0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
345#define USB_DMA7COUNTHIGH 0xffc040f4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
346
347/* Keypad Registers */
348
349#define KPAD_CTL 0xffc04100 /* Controls keypad module enable and disable */
350#define KPAD_PRESCALE 0xffc04104 /* Establish a time base for programing the KPAD_MSEL register */
351#define KPAD_MSEL 0xffc04108 /* Selects delay parameters for keypad interface sensitivity */
352#define KPAD_ROWCOL 0xffc0410c /* Captures the row and column output values of the keys pressed */
353#define KPAD_STAT 0xffc04110 /* Holds and clears the status of the keypad interface interrupt */
354#define KPAD_SOFTEVAL 0xffc04114 /* Lets software force keypad interface to check for keys being pressed */
355
356
357/* ********************************************************** */
358/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
359/* and MULTI BIT READ MACROS */
360/* ********************************************************** */
361
362/* Bit masks for KPAD_CTL */
363
364#define KPAD_EN 0x1 /* Keypad Enable */
365#define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */
366#define KPAD_ROWEN 0x1c00 /* Row Enable Width */
367#define KPAD_COLEN 0xe000 /* Column Enable Width */
368
369/* Bit masks for KPAD_PRESCALE */
370
371#define KPAD_PRESCALE_VAL 0x3f /* Key Prescale Value */
372
373/* Bit masks for KPAD_MSEL */
374
375#define DBON_SCALE 0xff /* Debounce Scale Value */
376#define COLDRV_SCALE 0xff00 /* Column Driver Scale Value */
377
378/* Bit masks for KPAD_ROWCOL */
379
380#define KPAD_ROW 0xff /* Rows Pressed */
381#define KPAD_COL 0xff00 /* Columns Pressed */
382
383/* Bit masks for KPAD_STAT */
384
385#define KPAD_IRQ 0x1 /* Keypad Interrupt Status */
386#define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */
387#define KPAD_PRESSED 0x8 /* Key press current status */
388
389/* Bit masks for KPAD_SOFTEVAL */
390
391#define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */
392
393/* Bit masks for SDH_COMMAND */
394
395#define CMD_IDX 0x3f /* Command Index */
396#define CMD_RSP 0x40 /* Response */
397#define CMD_L_RSP 0x80 /* Long Response */
398#define CMD_INT_E 0x100 /* Command Interrupt */
399#define CMD_PEND_E 0x200 /* Command Pending */
400#define CMD_E 0x400 /* Command Enable */
401
402/* Bit masks for SDH_PWR_CTL */
403
404#define PWR_ON 0x3 /* Power On */
405#if 0
406#define TBD 0x3c /* TBD */
407#endif
408#define SD_CMD_OD 0x40 /* Open Drain Output */
409#define ROD_CTL 0x80 /* Rod Control */
410
411/* Bit masks for SDH_CLK_CTL */
412
413#define CLKDIV 0xff /* MC_CLK Divisor */
414#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
415#define PWR_SV_E 0x200 /* Power Save Enable */
416#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
417#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
418
419/* Bit masks for SDH_RESP_CMD */
420
421#define RESP_CMD 0x3f /* Response Command */
422
423/* Bit masks for SDH_DATA_CTL */
424
425#define DTX_E 0x1 /* Data Transfer Enable */
426#define DTX_DIR 0x2 /* Data Transfer Direction */
427#define DTX_MODE 0x4 /* Data Transfer Mode */
428#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
429#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
430
431/* Bit masks for SDH_STATUS */
432
433#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
434#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
435#define CMD_TIME_OUT 0x4 /* CMD Time Out */
436#define DAT_TIME_OUT 0x8 /* Data Time Out */
437#define TX_UNDERRUN 0x10 /* Transmit Underrun */
438#define RX_OVERRUN 0x20 /* Receive Overrun */
439#define CMD_RESP_END 0x40 /* CMD Response End */
440#define CMD_SENT 0x80 /* CMD Sent */
441#define DAT_END 0x100 /* Data End */
442#define START_BIT_ERR 0x200 /* Start Bit Error */
443#define DAT_BLK_END 0x400 /* Data Block End */
444#define CMD_ACT 0x800 /* CMD Active */
445#define TX_ACT 0x1000 /* Transmit Active */
446#define RX_ACT 0x2000 /* Receive Active */
447#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
448#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
449#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
450#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
451#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
452#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
453#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
454#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
455
456/* Bit masks for SDH_STATUS_CLR */
457
458#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
459#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
460#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
461#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
462#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
463#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
464#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
465#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
466#define DAT_END_STAT 0x100 /* Data End Status */
467#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
468#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
469
470/* Bit masks for SDH_MASK0 */
471
472#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
473#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
474#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
475#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
476#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
477#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
478#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
479#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
480#define DAT_END_MASK 0x100 /* Data End Mask */
481#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
482#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
483#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
484#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
485#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
486#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
487#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
488#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
489#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
490#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
491#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
492#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
493#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
494
495/* Bit masks for SDH_FIFO_CNT */
496
497#define FIFO_COUNT 0x7fff /* FIFO Count */
498
499/* Bit masks for SDH_E_STATUS */
500
501#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
502#define SD_CARD_DET 0x10 /* SD Card Detect */
503
504/* Bit masks for SDH_E_MASK */
505
506#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
507#define SCD_MSK 0x40 /* Mask Card Detect */
508
509/* Bit masks for SDH_CFG */
510
511#define CLKS_EN 0x1 /* Clocks Enable */
512#define SD4E 0x4 /* SDIO 4-Bit Enable */
513#define MWE 0x8 /* Moving Window Enable */
514#define SD_RST 0x10 /* SDMMC Reset */
515#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
516#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
517#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
518
519/* Bit masks for SDH_RD_WAIT_EN */
520
521#define RWR 0x1 /* Read Wait Request */
522
523/* Bit masks for ATAPI_CONTROL */
524
525#define PIO_START 0x1 /* Start PIO/Reg Op */
526#define MULTI_START 0x2 /* Start Multi-DMA Op */
527#define ULTRA_START 0x4 /* Start Ultra-DMA Op */
528#define XFER_DIR 0x8 /* Transfer Direction */
529#define IORDY_EN 0x10 /* IORDY Enable */
530#define FIFO_FLUSH 0x20 /* Flush FIFOs */
531#define SOFT_RST 0x40 /* Soft Reset */
532#define DEV_RST 0x80 /* Device Reset */
533#define TFRCNT_RST 0x100 /* Trans Count Reset */
534#define END_ON_TERM 0x200 /* End/Terminate Select */
535#define PIO_USE_DMA 0x400 /* PIO-DMA Enable */
536#define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */
537
538/* Bit masks for ATAPI_STATUS */
539
540#define PIO_XFER_ON 0x1 /* PIO transfer in progress */
541#define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */
542#define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */
543#define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */
544
545/* Bit masks for ATAPI_DEV_ADDR */
546
547#define DEV_ADDR 0x1f /* Device Address */
548
549/* Bit masks for ATAPI_INT_MASK */
550
551#define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */
552#define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */
553#define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */
554#define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */
555#define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */
556#define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */
557#define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */
558#define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */
559#define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */
560
561/* Bit masks for ATAPI_INT_STATUS */
562
563#define ATAPI_DEV_INT 0x1 /* Device interrupt status */
564#define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */
565#define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */
566#define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */
567#define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */
568#define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */
569#define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */
570#define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */
571#define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */
572
573/* Bit masks for ATAPI_LINE_STATUS */
574
575#define ATAPI_INTR 0x1 /* Device interrupt to host line status */
576#define ATAPI_DASP 0x2 /* Device dasp to host line status */
577#define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */
578#define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */
579#define ATAPI_ADDR 0x70 /* ATAPI address line status */
580#define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */
581#define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */
582#define ATAPI_DIOWN 0x200 /* ATAPI write line status */
583#define ATAPI_DIORN 0x400 /* ATAPI read line status */
584#define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */
585
586/* Bit masks for ATAPI_SM_STATE */
587
588#define PIO_CSTATE 0xf /* PIO mode state machine current state */
589#define DMA_CSTATE 0xf0 /* DMA mode state machine current state */
590#define UDMAIN_CSTATE 0xf00 /* Ultra DMA-In mode state machine current state */
591#define UDMAOUT_CSTATE 0xf000 /* ATAPI IORDY line status */
592
593/* Bit masks for ATAPI_TERMINATE */
594
595#define ATAPI_HOST_TERM 0x1 /* Host terminationation */
596
597/* Bit masks for ATAPI_REG_TIM_0 */
598
599#define T2_REG 0xff /* End of cycle time for register access transfers */
600#define TEOC_REG 0xff00 /* Selects DIOR/DIOW pulsewidth */
601
602/* Bit masks for ATAPI_PIO_TIM_0 */
603
604#define T1_REG 0xf /* Time from address valid to DIOR/DIOW */
605#define T2_REG_PIO 0xff0 /* DIOR/DIOW pulsewidth */
606#define T4_REG 0xf000 /* DIOW data hold */
607
608/* Bit masks for ATAPI_PIO_TIM_1 */
609
610#define TEOC_REG_PIO 0xff /* End of cycle time for PIO access transfers. */
611
612/* Bit masks for ATAPI_MULTI_TIM_0 */
613
614#define TD 0xff /* DIOR/DIOW asserted pulsewidth */
615#define TM 0xff00 /* Time from address valid to DIOR/DIOW */
616
617/* Bit masks for ATAPI_MULTI_TIM_1 */
618
619#define TKW 0xff /* Selects DIOW negated pulsewidth */
620#define TKR 0xff00 /* Selects DIOR negated pulsewidth */
621
622/* Bit masks for ATAPI_MULTI_TIM_2 */
623
624#define TH 0xff /* Selects DIOW data hold */
625#define TEOC 0xff00 /* Selects end of cycle for DMA */
626
627/* Bit masks for ATAPI_ULTRA_TIM_0 */
628
629#define TACK 0xff /* Selects setup and hold times for TACK */
630#define TENV 0xff00 /* Selects envelope time */
631
632/* Bit masks for ATAPI_ULTRA_TIM_1 */
633
634#define TDVS 0xff /* Selects data valid setup time */
635#define TCYC_TDVS 0xff00 /* Selects cycle time - TDVS time */
636
637/* Bit masks for ATAPI_ULTRA_TIM_2 */
638
639#define TSS 0xff /* Selects time from STROBE edge to negation of DMARQ or assertion of STOP */
640#define TMLI 0xff00 /* Selects interlock time */
641
642/* Bit masks for ATAPI_ULTRA_TIM_3 */
643
644#define TZAH 0xff /* Selects minimum delay required for output */
645#define READY_PAUSE 0xff00 /* Selects ready to pause */
646
647/* Bit masks for USB_FADDR */
648
649#define FUNCTION_ADDRESS 0x7f /* Function address */
650
651/* Bit masks for USB_POWER */
652
653#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
654#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
655#define RESUME_MODE 0x4 /* DMA Mode */
656#define RESET 0x8 /* Reset indicator */
657#define HS_MODE 0x10 /* High Speed mode indicator */
658#define HS_ENABLE 0x20 /* high Speed Enable */
659#define SOFT_CONN 0x40 /* Soft connect */
660#define ISO_UPDATE 0x80 /* Isochronous update */
661
662/* Bit masks for USB_INTRTX */
663
664#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
665#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
666#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
667#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
668#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
669#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
670#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
671#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
672
673/* Bit masks for USB_INTRRX */
674
675#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
676#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
677#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
678#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
679#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
680#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
681#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
682
683/* Bit masks for USB_INTRTXE */
684
685#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
686#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
687#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
688#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
689#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
690#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
691#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
692#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
693
694/* Bit masks for USB_INTRRXE */
695
696#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
697#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
698#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
699#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
700#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
701#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
702#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
703
704/* Bit masks for USB_INTRUSB */
705
706#define SUSPEND_B 0x1 /* Suspend indicator */
707#define RESUME_B 0x2 /* Resume indicator */
708#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
709#define SOF_B 0x8 /* Start of frame */
710#define CONN_B 0x10 /* Connection indicator */
711#define DISCON_B 0x20 /* Disconnect indicator */
712#define SESSION_REQ_B 0x40 /* Session Request */
713#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
714
715/* Bit masks for USB_INTRUSBE */
716
717#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
718#define RESUME_BE 0x2 /* Resume indicator int enable */
719#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
720#define SOF_BE 0x8 /* Start of frame int enable */
721#define CONN_BE 0x10 /* Connection indicator int enable */
722#define DISCON_BE 0x20 /* Disconnect indicator int enable */
723#define SESSION_REQ_BE 0x40 /* Session Request int enable */
724#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
725
726/* Bit masks for USB_FRAME */
727
728#define FRAME_NUMBER 0x7ff /* Frame number */
729
730/* Bit masks for USB_INDEX */
731
732#define SELECTED_ENDPOINT 0xf /* selected endpoint */
733
734/* Bit masks for USB_GLOBAL_CTL */
735
736#define GLOBAL_ENA 0x1 /* enables USB module */
737#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
738#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
739#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
740#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
741#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
742#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
743#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
744#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
745#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
746#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
747#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
748#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
749#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
750#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
751
752/* Bit masks for USB_OTG_DEV_CTL */
753
754#define SESSION 0x1 /* session indicator */
755#define HOST_REQ 0x2 /* Host negotiation request */
756#define HOST_MODE 0x4 /* indicates USBDRC is a host */
757#define VBUS0 0x8 /* Vbus level indicator[0] */
758#define VBUS1 0x10 /* Vbus level indicator[1] */
759#define LSDEV 0x20 /* Low-speed indicator */
760#define FSDEV 0x40 /* Full or High-speed indicator */
761#define B_DEVICE 0x80 /* A' or 'B' device indicator */
762
763/* Bit masks for USB_OTG_VBUS_IRQ */
764
765#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
766#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
767#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
768#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
769#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
770#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
771
772/* Bit masks for USB_OTG_VBUS_MASK */
773
774#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
775#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
776#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
777#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
778#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
779#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
780
781/* Bit masks for USB_CSR0 */
782
783#define RXPKTRDY 0x1 /* data packet receive indicator */
784#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
785#define STALL_SENT 0x4 /* STALL handshake sent */
786#define DATAEND 0x8 /* Data end indicator */
787#define SETUPEND 0x10 /* Setup end */
788#define SENDSTALL 0x20 /* Send STALL handshake */
789#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
790#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
791#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
792#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
793#define SETUPPKT_H 0x8 /* send Setup token host mode */
794#define ERROR_H 0x10 /* timeout error indicator host mode */
795#define REQPKT_H 0x20 /* Request an IN transaction host mode */
796#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
797#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
798
799/* Bit masks for USB_COUNT0 */
800
801#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
802
803/* Bit masks for USB_NAKLIMIT0 */
804
805#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
806
807/* Bit masks for USB_TX_MAX_PACKET */
808
809#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
810
811/* Bit masks for USB_RX_MAX_PACKET */
812
813#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
814
815/* Bit masks for USB_TXCSR */
816
817#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
818#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
819#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
820#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
821#define STALL_SEND_T 0x10 /* issue a Stall handshake */
822#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
823#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
824#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
825#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
826#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
827#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
828#define ISO_T 0x4000 /* enable Isochronous transfers */
829#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
830#define ERROR_TH 0x4 /* error condition host mode */
831#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
832#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
833
834/* Bit masks for USB_TXCOUNT */
835
836#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
837
838/* Bit masks for USB_RXCSR */
839
840#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
841#define FIFO_FULL_R 0x2 /* FIFO not empty */
842#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
843#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
844#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
845#define STALL_SEND_R 0x20 /* issue a Stall handshake */
846#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
847#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
848#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
849#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
850#define DISNYET_R 0x1000 /* disable Nyet handshakes */
851#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
852#define ISO_R 0x4000 /* enable Isochronous transfers */
853#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
854#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
855#define REQPKT_RH 0x20 /* request an IN transaction host mode */
856#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
857#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
858#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
859#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
860
861/* Bit masks for USB_RXCOUNT */
862
863#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
864
865/* Bit masks for USB_TXTYPE */
866
867#define TARGET_EP_NO_T 0xf /* EP number */
868#define PROTOCOL_T 0xc /* transfer type */
869
870/* Bit masks for USB_TXINTERVAL */
871
872#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
873
874/* Bit masks for USB_RXTYPE */
875
876#define TARGET_EP_NO_R 0xf /* EP number */
877#define PROTOCOL_R 0xc /* transfer type */
878
879/* Bit masks for USB_RXINTERVAL */
880
881#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
882
883/* Bit masks for USB_DMA_INTERRUPT */
884
885#define DMA0_INT 0x1 /* DMA0 pending interrupt */
886#define DMA1_INT 0x2 /* DMA1 pending interrupt */
887#define DMA2_INT 0x4 /* DMA2 pending interrupt */
888#define DMA3_INT 0x8 /* DMA3 pending interrupt */
889#define DMA4_INT 0x10 /* DMA4 pending interrupt */
890#define DMA5_INT 0x20 /* DMA5 pending interrupt */
891#define DMA6_INT 0x40 /* DMA6 pending interrupt */
892#define DMA7_INT 0x80 /* DMA7 pending interrupt */
893
894/* Bit masks for USB_DMAxCONTROL */
895
896#define DMA_ENA 0x1 /* DMA enable */
897#define DIRECTION 0x2 /* direction of DMA transfer */
898#define MODE 0x4 /* DMA Bus error */
899#define INT_ENA 0x8 /* Interrupt enable */
900#define EPNUM 0xf0 /* EP number */
901#define BUSERROR 0x100 /* DMA Bus error */
902
903/* Bit masks for USB_DMAxADDRHIGH */
904
905#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
906
907/* Bit masks for USB_DMAxADDRLOW */
908
909#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
910
911/* Bit masks for USB_DMAxCOUNTHIGH */
912
913#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
914
915/* Bit masks for USB_DMAxCOUNTLOW */
916
917#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
918
919
920/* ******************************************* */
921/* MULTI BIT MACRO ENUMERATIONS */
922/* ******************************************* */
923
924
925#endif /* _DEF_BF542_H */
diff --git a/include/asm-blackfin/mach-bf548/defBF544.h b/include/asm-blackfin/mach-bf548/defBF544.h
deleted file mode 100644
index b8b9870e2697..000000000000
--- a/include/asm-blackfin/mach-bf548/defBF544.h
+++ /dev/null
@@ -1,707 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/defBF544.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF544_H
32#define _DEF_BF544_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF544 */
38
39/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
40#include "defBF54x_base.h"
41
42/* The following are the #defines needed by ADSP-BF544 that are not in the common header */
43
44/* Timer Registers */
45
46#define TIMER8_CONFIG 0xffc00600 /* Timer 8 Configuration Register */
47#define TIMER8_COUNTER 0xffc00604 /* Timer 8 Counter Register */
48#define TIMER8_PERIOD 0xffc00608 /* Timer 8 Period Register */
49#define TIMER8_WIDTH 0xffc0060c /* Timer 8 Width Register */
50#define TIMER9_CONFIG 0xffc00610 /* Timer 9 Configuration Register */
51#define TIMER9_COUNTER 0xffc00614 /* Timer 9 Counter Register */
52#define TIMER9_PERIOD 0xffc00618 /* Timer 9 Period Register */
53#define TIMER9_WIDTH 0xffc0061c /* Timer 9 Width Register */
54#define TIMER10_CONFIG 0xffc00620 /* Timer 10 Configuration Register */
55#define TIMER10_COUNTER 0xffc00624 /* Timer 10 Counter Register */
56#define TIMER10_PERIOD 0xffc00628 /* Timer 10 Period Register */
57#define TIMER10_WIDTH 0xffc0062c /* Timer 10 Width Register */
58
59/* Timer Group of 3 Registers */
60
61#define TIMER_ENABLE1 0xffc00640 /* Timer Group of 3 Enable Register */
62#define TIMER_DISABLE1 0xffc00644 /* Timer Group of 3 Disable Register */
63#define TIMER_STATUS1 0xffc00648 /* Timer Group of 3 Status Register */
64
65/* EPPI0 Registers */
66
67#define EPPI0_STATUS 0xffc01000 /* EPPI0 Status Register */
68#define EPPI0_HCOUNT 0xffc01004 /* EPPI0 Horizontal Transfer Count Register */
69#define EPPI0_HDELAY 0xffc01008 /* EPPI0 Horizontal Delay Count Register */
70#define EPPI0_VCOUNT 0xffc0100c /* EPPI0 Vertical Transfer Count Register */
71#define EPPI0_VDELAY 0xffc01010 /* EPPI0 Vertical Delay Count Register */
72#define EPPI0_FRAME 0xffc01014 /* EPPI0 Lines per Frame Register */
73#define EPPI0_LINE 0xffc01018 /* EPPI0 Samples per Line Register */
74#define EPPI0_CLKDIV 0xffc0101c /* EPPI0 Clock Divide Register */
75#define EPPI0_CONTROL 0xffc01020 /* EPPI0 Control Register */
76#define EPPI0_FS1W_HBL 0xffc01024 /* EPPI0 FS1 Width Register / EPPI0 Horizontal Blanking Samples Per Line Register */
77#define EPPI0_FS1P_AVPL 0xffc01028 /* EPPI0 FS1 Period Register / EPPI0 Active Video Samples Per Line Register */
78#define EPPI0_FS2W_LVB 0xffc0102c /* EPPI0 FS2 Width Register / EPPI0 Lines of Vertical Blanking Register */
79#define EPPI0_FS2P_LAVF 0xffc01030 /* EPPI0 FS2 Period Register/ EPPI0 Lines of Active Video Per Field Register */
80#define EPPI0_CLIP 0xffc01034 /* EPPI0 Clipping Register */
81
82/* Two Wire Interface Registers (TWI1) */
83
84#define TWI1_REGBASE 0xffc02200
85#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
86#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
87#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
88#define TWI1_SLAVE_STAT 0xffc0220c /* TWI Slave Mode Status Register */
89#define TWI1_SLAVE_ADDR 0xffc02210 /* TWI Slave Mode Address Register */
90#define TWI1_MASTER_CTRL 0xffc02214 /* TWI Master Mode Control Register */
91#define TWI1_MASTER_STAT 0xffc02218 /* TWI Master Mode Status Register */
92#define TWI1_MASTER_ADDR 0xffc0221c /* TWI Master Mode Address Register */
93#define TWI1_INT_STAT 0xffc02220 /* TWI Interrupt Status Register */
94#define TWI1_INT_MASK 0xffc02224 /* TWI Interrupt Mask Register */
95#define TWI1_FIFO_CTRL 0xffc02228 /* TWI FIFO Control Register */
96#define TWI1_FIFO_STAT 0xffc0222c /* TWI FIFO Status Register */
97#define TWI1_XMT_DATA8 0xffc02280 /* TWI FIFO Transmit Data Single Byte Register */
98#define TWI1_XMT_DATA16 0xffc02284 /* TWI FIFO Transmit Data Double Byte Register */
99#define TWI1_RCV_DATA8 0xffc02288 /* TWI FIFO Receive Data Single Byte Register */
100#define TWI1_RCV_DATA16 0xffc0228c /* TWI FIFO Receive Data Double Byte Register */
101
102/* CAN Controller 1 Config 1 Registers */
103
104#define CAN1_MC1 0xffc03200 /* CAN Controller 1 Mailbox Configuration Register 1 */
105#define CAN1_MD1 0xffc03204 /* CAN Controller 1 Mailbox Direction Register 1 */
106#define CAN1_TRS1 0xffc03208 /* CAN Controller 1 Transmit Request Set Register 1 */
107#define CAN1_TRR1 0xffc0320c /* CAN Controller 1 Transmit Request Reset Register 1 */
108#define CAN1_TA1 0xffc03210 /* CAN Controller 1 Transmit Acknowledge Register 1 */
109#define CAN1_AA1 0xffc03214 /* CAN Controller 1 Abort Acknowledge Register 1 */
110#define CAN1_RMP1 0xffc03218 /* CAN Controller 1 Receive Message Pending Register 1 */
111#define CAN1_RML1 0xffc0321c /* CAN Controller 1 Receive Message Lost Register 1 */
112#define CAN1_MBTIF1 0xffc03220 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 1 */
113#define CAN1_MBRIF1 0xffc03224 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 1 */
114#define CAN1_MBIM1 0xffc03228 /* CAN Controller 1 Mailbox Interrupt Mask Register 1 */
115#define CAN1_RFH1 0xffc0322c /* CAN Controller 1 Remote Frame Handling Enable Register 1 */
116#define CAN1_OPSS1 0xffc03230 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 1 */
117
118/* CAN Controller 1 Config 2 Registers */
119
120#define CAN1_MC2 0xffc03240 /* CAN Controller 1 Mailbox Configuration Register 2 */
121#define CAN1_MD2 0xffc03244 /* CAN Controller 1 Mailbox Direction Register 2 */
122#define CAN1_TRS2 0xffc03248 /* CAN Controller 1 Transmit Request Set Register 2 */
123#define CAN1_TRR2 0xffc0324c /* CAN Controller 1 Transmit Request Reset Register 2 */
124#define CAN1_TA2 0xffc03250 /* CAN Controller 1 Transmit Acknowledge Register 2 */
125#define CAN1_AA2 0xffc03254 /* CAN Controller 1 Abort Acknowledge Register 2 */
126#define CAN1_RMP2 0xffc03258 /* CAN Controller 1 Receive Message Pending Register 2 */
127#define CAN1_RML2 0xffc0325c /* CAN Controller 1 Receive Message Lost Register 2 */
128#define CAN1_MBTIF2 0xffc03260 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 2 */
129#define CAN1_MBRIF2 0xffc03264 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 2 */
130#define CAN1_MBIM2 0xffc03268 /* CAN Controller 1 Mailbox Interrupt Mask Register 2 */
131#define CAN1_RFH2 0xffc0326c /* CAN Controller 1 Remote Frame Handling Enable Register 2 */
132#define CAN1_OPSS2 0xffc03270 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 2 */
133
134/* CAN Controller 1 Clock/Interrupt/Counter Registers */
135
136#define CAN1_CLOCK 0xffc03280 /* CAN Controller 1 Clock Register */
137#define CAN1_TIMING 0xffc03284 /* CAN Controller 1 Timing Register */
138#define CAN1_DEBUG 0xffc03288 /* CAN Controller 1 Debug Register */
139#define CAN1_STATUS 0xffc0328c /* CAN Controller 1 Global Status Register */
140#define CAN1_CEC 0xffc03290 /* CAN Controller 1 Error Counter Register */
141#define CAN1_GIS 0xffc03294 /* CAN Controller 1 Global Interrupt Status Register */
142#define CAN1_GIM 0xffc03298 /* CAN Controller 1 Global Interrupt Mask Register */
143#define CAN1_GIF 0xffc0329c /* CAN Controller 1 Global Interrupt Flag Register */
144#define CAN1_CONTROL 0xffc032a0 /* CAN Controller 1 Master Control Register */
145#define CAN1_INTR 0xffc032a4 /* CAN Controller 1 Interrupt Pending Register */
146#define CAN1_MBTD 0xffc032ac /* CAN Controller 1 Mailbox Temporary Disable Register */
147#define CAN1_EWR 0xffc032b0 /* CAN Controller 1 Programmable Warning Level Register */
148#define CAN1_ESR 0xffc032b4 /* CAN Controller 1 Error Status Register */
149#define CAN1_UCCNT 0xffc032c4 /* CAN Controller 1 Universal Counter Register */
150#define CAN1_UCRC 0xffc032c8 /* CAN Controller 1 Universal Counter Force Reload Register */
151#define CAN1_UCCNF 0xffc032cc /* CAN Controller 1 Universal Counter Configuration Register */
152
153/* CAN Controller 1 Mailbox Acceptance Registers */
154
155#define CAN1_AM00L 0xffc03300 /* CAN Controller 1 Mailbox 0 Acceptance Mask High Register */
156#define CAN1_AM00H 0xffc03304 /* CAN Controller 1 Mailbox 0 Acceptance Mask Low Register */
157#define CAN1_AM01L 0xffc03308 /* CAN Controller 1 Mailbox 1 Acceptance Mask High Register */
158#define CAN1_AM01H 0xffc0330c /* CAN Controller 1 Mailbox 1 Acceptance Mask Low Register */
159#define CAN1_AM02L 0xffc03310 /* CAN Controller 1 Mailbox 2 Acceptance Mask High Register */
160#define CAN1_AM02H 0xffc03314 /* CAN Controller 1 Mailbox 2 Acceptance Mask Low Register */
161#define CAN1_AM03L 0xffc03318 /* CAN Controller 1 Mailbox 3 Acceptance Mask High Register */
162#define CAN1_AM03H 0xffc0331c /* CAN Controller 1 Mailbox 3 Acceptance Mask Low Register */
163#define CAN1_AM04L 0xffc03320 /* CAN Controller 1 Mailbox 4 Acceptance Mask High Register */
164#define CAN1_AM04H 0xffc03324 /* CAN Controller 1 Mailbox 4 Acceptance Mask Low Register */
165#define CAN1_AM05L 0xffc03328 /* CAN Controller 1 Mailbox 5 Acceptance Mask High Register */
166#define CAN1_AM05H 0xffc0332c /* CAN Controller 1 Mailbox 5 Acceptance Mask Low Register */
167#define CAN1_AM06L 0xffc03330 /* CAN Controller 1 Mailbox 6 Acceptance Mask High Register */
168#define CAN1_AM06H 0xffc03334 /* CAN Controller 1 Mailbox 6 Acceptance Mask Low Register */
169#define CAN1_AM07L 0xffc03338 /* CAN Controller 1 Mailbox 7 Acceptance Mask High Register */
170#define CAN1_AM07H 0xffc0333c /* CAN Controller 1 Mailbox 7 Acceptance Mask Low Register */
171#define CAN1_AM08L 0xffc03340 /* CAN Controller 1 Mailbox 8 Acceptance Mask High Register */
172#define CAN1_AM08H 0xffc03344 /* CAN Controller 1 Mailbox 8 Acceptance Mask Low Register */
173#define CAN1_AM09L 0xffc03348 /* CAN Controller 1 Mailbox 9 Acceptance Mask High Register */
174#define CAN1_AM09H 0xffc0334c /* CAN Controller 1 Mailbox 9 Acceptance Mask Low Register */
175#define CAN1_AM10L 0xffc03350 /* CAN Controller 1 Mailbox 10 Acceptance Mask High Register */
176#define CAN1_AM10H 0xffc03354 /* CAN Controller 1 Mailbox 10 Acceptance Mask Low Register */
177#define CAN1_AM11L 0xffc03358 /* CAN Controller 1 Mailbox 11 Acceptance Mask High Register */
178#define CAN1_AM11H 0xffc0335c /* CAN Controller 1 Mailbox 11 Acceptance Mask Low Register */
179#define CAN1_AM12L 0xffc03360 /* CAN Controller 1 Mailbox 12 Acceptance Mask High Register */
180#define CAN1_AM12H 0xffc03364 /* CAN Controller 1 Mailbox 12 Acceptance Mask Low Register */
181#define CAN1_AM13L 0xffc03368 /* CAN Controller 1 Mailbox 13 Acceptance Mask High Register */
182#define CAN1_AM13H 0xffc0336c /* CAN Controller 1 Mailbox 13 Acceptance Mask Low Register */
183#define CAN1_AM14L 0xffc03370 /* CAN Controller 1 Mailbox 14 Acceptance Mask High Register */
184#define CAN1_AM14H 0xffc03374 /* CAN Controller 1 Mailbox 14 Acceptance Mask Low Register */
185#define CAN1_AM15L 0xffc03378 /* CAN Controller 1 Mailbox 15 Acceptance Mask High Register */
186#define CAN1_AM15H 0xffc0337c /* CAN Controller 1 Mailbox 15 Acceptance Mask Low Register */
187
188/* CAN Controller 1 Mailbox Acceptance Registers */
189
190#define CAN1_AM16L 0xffc03380 /* CAN Controller 1 Mailbox 16 Acceptance Mask High Register */
191#define CAN1_AM16H 0xffc03384 /* CAN Controller 1 Mailbox 16 Acceptance Mask Low Register */
192#define CAN1_AM17L 0xffc03388 /* CAN Controller 1 Mailbox 17 Acceptance Mask High Register */
193#define CAN1_AM17H 0xffc0338c /* CAN Controller 1 Mailbox 17 Acceptance Mask Low Register */
194#define CAN1_AM18L 0xffc03390 /* CAN Controller 1 Mailbox 18 Acceptance Mask High Register */
195#define CAN1_AM18H 0xffc03394 /* CAN Controller 1 Mailbox 18 Acceptance Mask Low Register */
196#define CAN1_AM19L 0xffc03398 /* CAN Controller 1 Mailbox 19 Acceptance Mask High Register */
197#define CAN1_AM19H 0xffc0339c /* CAN Controller 1 Mailbox 19 Acceptance Mask Low Register */
198#define CAN1_AM20L 0xffc033a0 /* CAN Controller 1 Mailbox 20 Acceptance Mask High Register */
199#define CAN1_AM20H 0xffc033a4 /* CAN Controller 1 Mailbox 20 Acceptance Mask Low Register */
200#define CAN1_AM21L 0xffc033a8 /* CAN Controller 1 Mailbox 21 Acceptance Mask High Register */
201#define CAN1_AM21H 0xffc033ac /* CAN Controller 1 Mailbox 21 Acceptance Mask Low Register */
202#define CAN1_AM22L 0xffc033b0 /* CAN Controller 1 Mailbox 22 Acceptance Mask High Register */
203#define CAN1_AM22H 0xffc033b4 /* CAN Controller 1 Mailbox 22 Acceptance Mask Low Register */
204#define CAN1_AM23L 0xffc033b8 /* CAN Controller 1 Mailbox 23 Acceptance Mask High Register */
205#define CAN1_AM23H 0xffc033bc /* CAN Controller 1 Mailbox 23 Acceptance Mask Low Register */
206#define CAN1_AM24L 0xffc033c0 /* CAN Controller 1 Mailbox 24 Acceptance Mask High Register */
207#define CAN1_AM24H 0xffc033c4 /* CAN Controller 1 Mailbox 24 Acceptance Mask Low Register */
208#define CAN1_AM25L 0xffc033c8 /* CAN Controller 1 Mailbox 25 Acceptance Mask High Register */
209#define CAN1_AM25H 0xffc033cc /* CAN Controller 1 Mailbox 25 Acceptance Mask Low Register */
210#define CAN1_AM26L 0xffc033d0 /* CAN Controller 1 Mailbox 26 Acceptance Mask High Register */
211#define CAN1_AM26H 0xffc033d4 /* CAN Controller 1 Mailbox 26 Acceptance Mask Low Register */
212#define CAN1_AM27L 0xffc033d8 /* CAN Controller 1 Mailbox 27 Acceptance Mask High Register */
213#define CAN1_AM27H 0xffc033dc /* CAN Controller 1 Mailbox 27 Acceptance Mask Low Register */
214#define CAN1_AM28L 0xffc033e0 /* CAN Controller 1 Mailbox 28 Acceptance Mask High Register */
215#define CAN1_AM28H 0xffc033e4 /* CAN Controller 1 Mailbox 28 Acceptance Mask Low Register */
216#define CAN1_AM29L 0xffc033e8 /* CAN Controller 1 Mailbox 29 Acceptance Mask High Register */
217#define CAN1_AM29H 0xffc033ec /* CAN Controller 1 Mailbox 29 Acceptance Mask Low Register */
218#define CAN1_AM30L 0xffc033f0 /* CAN Controller 1 Mailbox 30 Acceptance Mask High Register */
219#define CAN1_AM30H 0xffc033f4 /* CAN Controller 1 Mailbox 30 Acceptance Mask Low Register */
220#define CAN1_AM31L 0xffc033f8 /* CAN Controller 1 Mailbox 31 Acceptance Mask High Register */
221#define CAN1_AM31H 0xffc033fc /* CAN Controller 1 Mailbox 31 Acceptance Mask Low Register */
222
223/* CAN Controller 1 Mailbox Data Registers */
224
225#define CAN1_MB00_DATA0 0xffc03400 /* CAN Controller 1 Mailbox 0 Data 0 Register */
226#define CAN1_MB00_DATA1 0xffc03404 /* CAN Controller 1 Mailbox 0 Data 1 Register */
227#define CAN1_MB00_DATA2 0xffc03408 /* CAN Controller 1 Mailbox 0 Data 2 Register */
228#define CAN1_MB00_DATA3 0xffc0340c /* CAN Controller 1 Mailbox 0 Data 3 Register */
229#define CAN1_MB00_LENGTH 0xffc03410 /* CAN Controller 1 Mailbox 0 Length Register */
230#define CAN1_MB00_TIMESTAMP 0xffc03414 /* CAN Controller 1 Mailbox 0 Timestamp Register */
231#define CAN1_MB00_ID0 0xffc03418 /* CAN Controller 1 Mailbox 0 ID0 Register */
232#define CAN1_MB00_ID1 0xffc0341c /* CAN Controller 1 Mailbox 0 ID1 Register */
233#define CAN1_MB01_DATA0 0xffc03420 /* CAN Controller 1 Mailbox 1 Data 0 Register */
234#define CAN1_MB01_DATA1 0xffc03424 /* CAN Controller 1 Mailbox 1 Data 1 Register */
235#define CAN1_MB01_DATA2 0xffc03428 /* CAN Controller 1 Mailbox 1 Data 2 Register */
236#define CAN1_MB01_DATA3 0xffc0342c /* CAN Controller 1 Mailbox 1 Data 3 Register */
237#define CAN1_MB01_LENGTH 0xffc03430 /* CAN Controller 1 Mailbox 1 Length Register */
238#define CAN1_MB01_TIMESTAMP 0xffc03434 /* CAN Controller 1 Mailbox 1 Timestamp Register */
239#define CAN1_MB01_ID0 0xffc03438 /* CAN Controller 1 Mailbox 1 ID0 Register */
240#define CAN1_MB01_ID1 0xffc0343c /* CAN Controller 1 Mailbox 1 ID1 Register */
241#define CAN1_MB02_DATA0 0xffc03440 /* CAN Controller 1 Mailbox 2 Data 0 Register */
242#define CAN1_MB02_DATA1 0xffc03444 /* CAN Controller 1 Mailbox 2 Data 1 Register */
243#define CAN1_MB02_DATA2 0xffc03448 /* CAN Controller 1 Mailbox 2 Data 2 Register */
244#define CAN1_MB02_DATA3 0xffc0344c /* CAN Controller 1 Mailbox 2 Data 3 Register */
245#define CAN1_MB02_LENGTH 0xffc03450 /* CAN Controller 1 Mailbox 2 Length Register */
246#define CAN1_MB02_TIMESTAMP 0xffc03454 /* CAN Controller 1 Mailbox 2 Timestamp Register */
247#define CAN1_MB02_ID0 0xffc03458 /* CAN Controller 1 Mailbox 2 ID0 Register */
248#define CAN1_MB02_ID1 0xffc0345c /* CAN Controller 1 Mailbox 2 ID1 Register */
249#define CAN1_MB03_DATA0 0xffc03460 /* CAN Controller 1 Mailbox 3 Data 0 Register */
250#define CAN1_MB03_DATA1 0xffc03464 /* CAN Controller 1 Mailbox 3 Data 1 Register */
251#define CAN1_MB03_DATA2 0xffc03468 /* CAN Controller 1 Mailbox 3 Data 2 Register */
252#define CAN1_MB03_DATA3 0xffc0346c /* CAN Controller 1 Mailbox 3 Data 3 Register */
253#define CAN1_MB03_LENGTH 0xffc03470 /* CAN Controller 1 Mailbox 3 Length Register */
254#define CAN1_MB03_TIMESTAMP 0xffc03474 /* CAN Controller 1 Mailbox 3 Timestamp Register */
255#define CAN1_MB03_ID0 0xffc03478 /* CAN Controller 1 Mailbox 3 ID0 Register */
256#define CAN1_MB03_ID1 0xffc0347c /* CAN Controller 1 Mailbox 3 ID1 Register */
257#define CAN1_MB04_DATA0 0xffc03480 /* CAN Controller 1 Mailbox 4 Data 0 Register */
258#define CAN1_MB04_DATA1 0xffc03484 /* CAN Controller 1 Mailbox 4 Data 1 Register */
259#define CAN1_MB04_DATA2 0xffc03488 /* CAN Controller 1 Mailbox 4 Data 2 Register */
260#define CAN1_MB04_DATA3 0xffc0348c /* CAN Controller 1 Mailbox 4 Data 3 Register */
261#define CAN1_MB04_LENGTH 0xffc03490 /* CAN Controller 1 Mailbox 4 Length Register */
262#define CAN1_MB04_TIMESTAMP 0xffc03494 /* CAN Controller 1 Mailbox 4 Timestamp Register */
263#define CAN1_MB04_ID0 0xffc03498 /* CAN Controller 1 Mailbox 4 ID0 Register */
264#define CAN1_MB04_ID1 0xffc0349c /* CAN Controller 1 Mailbox 4 ID1 Register */
265#define CAN1_MB05_DATA0 0xffc034a0 /* CAN Controller 1 Mailbox 5 Data 0 Register */
266#define CAN1_MB05_DATA1 0xffc034a4 /* CAN Controller 1 Mailbox 5 Data 1 Register */
267#define CAN1_MB05_DATA2 0xffc034a8 /* CAN Controller 1 Mailbox 5 Data 2 Register */
268#define CAN1_MB05_DATA3 0xffc034ac /* CAN Controller 1 Mailbox 5 Data 3 Register */
269#define CAN1_MB05_LENGTH 0xffc034b0 /* CAN Controller 1 Mailbox 5 Length Register */
270#define CAN1_MB05_TIMESTAMP 0xffc034b4 /* CAN Controller 1 Mailbox 5 Timestamp Register */
271#define CAN1_MB05_ID0 0xffc034b8 /* CAN Controller 1 Mailbox 5 ID0 Register */
272#define CAN1_MB05_ID1 0xffc034bc /* CAN Controller 1 Mailbox 5 ID1 Register */
273#define CAN1_MB06_DATA0 0xffc034c0 /* CAN Controller 1 Mailbox 6 Data 0 Register */
274#define CAN1_MB06_DATA1 0xffc034c4 /* CAN Controller 1 Mailbox 6 Data 1 Register */
275#define CAN1_MB06_DATA2 0xffc034c8 /* CAN Controller 1 Mailbox 6 Data 2 Register */
276#define CAN1_MB06_DATA3 0xffc034cc /* CAN Controller 1 Mailbox 6 Data 3 Register */
277#define CAN1_MB06_LENGTH 0xffc034d0 /* CAN Controller 1 Mailbox 6 Length Register */
278#define CAN1_MB06_TIMESTAMP 0xffc034d4 /* CAN Controller 1 Mailbox 6 Timestamp Register */
279#define CAN1_MB06_ID0 0xffc034d8 /* CAN Controller 1 Mailbox 6 ID0 Register */
280#define CAN1_MB06_ID1 0xffc034dc /* CAN Controller 1 Mailbox 6 ID1 Register */
281#define CAN1_MB07_DATA0 0xffc034e0 /* CAN Controller 1 Mailbox 7 Data 0 Register */
282#define CAN1_MB07_DATA1 0xffc034e4 /* CAN Controller 1 Mailbox 7 Data 1 Register */
283#define CAN1_MB07_DATA2 0xffc034e8 /* CAN Controller 1 Mailbox 7 Data 2 Register */
284#define CAN1_MB07_DATA3 0xffc034ec /* CAN Controller 1 Mailbox 7 Data 3 Register */
285#define CAN1_MB07_LENGTH 0xffc034f0 /* CAN Controller 1 Mailbox 7 Length Register */
286#define CAN1_MB07_TIMESTAMP 0xffc034f4 /* CAN Controller 1 Mailbox 7 Timestamp Register */
287#define CAN1_MB07_ID0 0xffc034f8 /* CAN Controller 1 Mailbox 7 ID0 Register */
288#define CAN1_MB07_ID1 0xffc034fc /* CAN Controller 1 Mailbox 7 ID1 Register */
289#define CAN1_MB08_DATA0 0xffc03500 /* CAN Controller 1 Mailbox 8 Data 0 Register */
290#define CAN1_MB08_DATA1 0xffc03504 /* CAN Controller 1 Mailbox 8 Data 1 Register */
291#define CAN1_MB08_DATA2 0xffc03508 /* CAN Controller 1 Mailbox 8 Data 2 Register */
292#define CAN1_MB08_DATA3 0xffc0350c /* CAN Controller 1 Mailbox 8 Data 3 Register */
293#define CAN1_MB08_LENGTH 0xffc03510 /* CAN Controller 1 Mailbox 8 Length Register */
294#define CAN1_MB08_TIMESTAMP 0xffc03514 /* CAN Controller 1 Mailbox 8 Timestamp Register */
295#define CAN1_MB08_ID0 0xffc03518 /* CAN Controller 1 Mailbox 8 ID0 Register */
296#define CAN1_MB08_ID1 0xffc0351c /* CAN Controller 1 Mailbox 8 ID1 Register */
297#define CAN1_MB09_DATA0 0xffc03520 /* CAN Controller 1 Mailbox 9 Data 0 Register */
298#define CAN1_MB09_DATA1 0xffc03524 /* CAN Controller 1 Mailbox 9 Data 1 Register */
299#define CAN1_MB09_DATA2 0xffc03528 /* CAN Controller 1 Mailbox 9 Data 2 Register */
300#define CAN1_MB09_DATA3 0xffc0352c /* CAN Controller 1 Mailbox 9 Data 3 Register */
301#define CAN1_MB09_LENGTH 0xffc03530 /* CAN Controller 1 Mailbox 9 Length Register */
302#define CAN1_MB09_TIMESTAMP 0xffc03534 /* CAN Controller 1 Mailbox 9 Timestamp Register */
303#define CAN1_MB09_ID0 0xffc03538 /* CAN Controller 1 Mailbox 9 ID0 Register */
304#define CAN1_MB09_ID1 0xffc0353c /* CAN Controller 1 Mailbox 9 ID1 Register */
305#define CAN1_MB10_DATA0 0xffc03540 /* CAN Controller 1 Mailbox 10 Data 0 Register */
306#define CAN1_MB10_DATA1 0xffc03544 /* CAN Controller 1 Mailbox 10 Data 1 Register */
307#define CAN1_MB10_DATA2 0xffc03548 /* CAN Controller 1 Mailbox 10 Data 2 Register */
308#define CAN1_MB10_DATA3 0xffc0354c /* CAN Controller 1 Mailbox 10 Data 3 Register */
309#define CAN1_MB10_LENGTH 0xffc03550 /* CAN Controller 1 Mailbox 10 Length Register */
310#define CAN1_MB10_TIMESTAMP 0xffc03554 /* CAN Controller 1 Mailbox 10 Timestamp Register */
311#define CAN1_MB10_ID0 0xffc03558 /* CAN Controller 1 Mailbox 10 ID0 Register */
312#define CAN1_MB10_ID1 0xffc0355c /* CAN Controller 1 Mailbox 10 ID1 Register */
313#define CAN1_MB11_DATA0 0xffc03560 /* CAN Controller 1 Mailbox 11 Data 0 Register */
314#define CAN1_MB11_DATA1 0xffc03564 /* CAN Controller 1 Mailbox 11 Data 1 Register */
315#define CAN1_MB11_DATA2 0xffc03568 /* CAN Controller 1 Mailbox 11 Data 2 Register */
316#define CAN1_MB11_DATA3 0xffc0356c /* CAN Controller 1 Mailbox 11 Data 3 Register */
317#define CAN1_MB11_LENGTH 0xffc03570 /* CAN Controller 1 Mailbox 11 Length Register */
318#define CAN1_MB11_TIMESTAMP 0xffc03574 /* CAN Controller 1 Mailbox 11 Timestamp Register */
319#define CAN1_MB11_ID0 0xffc03578 /* CAN Controller 1 Mailbox 11 ID0 Register */
320#define CAN1_MB11_ID1 0xffc0357c /* CAN Controller 1 Mailbox 11 ID1 Register */
321#define CAN1_MB12_DATA0 0xffc03580 /* CAN Controller 1 Mailbox 12 Data 0 Register */
322#define CAN1_MB12_DATA1 0xffc03584 /* CAN Controller 1 Mailbox 12 Data 1 Register */
323#define CAN1_MB12_DATA2 0xffc03588 /* CAN Controller 1 Mailbox 12 Data 2 Register */
324#define CAN1_MB12_DATA3 0xffc0358c /* CAN Controller 1 Mailbox 12 Data 3 Register */
325#define CAN1_MB12_LENGTH 0xffc03590 /* CAN Controller 1 Mailbox 12 Length Register */
326#define CAN1_MB12_TIMESTAMP 0xffc03594 /* CAN Controller 1 Mailbox 12 Timestamp Register */
327#define CAN1_MB12_ID0 0xffc03598 /* CAN Controller 1 Mailbox 12 ID0 Register */
328#define CAN1_MB12_ID1 0xffc0359c /* CAN Controller 1 Mailbox 12 ID1 Register */
329#define CAN1_MB13_DATA0 0xffc035a0 /* CAN Controller 1 Mailbox 13 Data 0 Register */
330#define CAN1_MB13_DATA1 0xffc035a4 /* CAN Controller 1 Mailbox 13 Data 1 Register */
331#define CAN1_MB13_DATA2 0xffc035a8 /* CAN Controller 1 Mailbox 13 Data 2 Register */
332#define CAN1_MB13_DATA3 0xffc035ac /* CAN Controller 1 Mailbox 13 Data 3 Register */
333#define CAN1_MB13_LENGTH 0xffc035b0 /* CAN Controller 1 Mailbox 13 Length Register */
334#define CAN1_MB13_TIMESTAMP 0xffc035b4 /* CAN Controller 1 Mailbox 13 Timestamp Register */
335#define CAN1_MB13_ID0 0xffc035b8 /* CAN Controller 1 Mailbox 13 ID0 Register */
336#define CAN1_MB13_ID1 0xffc035bc /* CAN Controller 1 Mailbox 13 ID1 Register */
337#define CAN1_MB14_DATA0 0xffc035c0 /* CAN Controller 1 Mailbox 14 Data 0 Register */
338#define CAN1_MB14_DATA1 0xffc035c4 /* CAN Controller 1 Mailbox 14 Data 1 Register */
339#define CAN1_MB14_DATA2 0xffc035c8 /* CAN Controller 1 Mailbox 14 Data 2 Register */
340#define CAN1_MB14_DATA3 0xffc035cc /* CAN Controller 1 Mailbox 14 Data 3 Register */
341#define CAN1_MB14_LENGTH 0xffc035d0 /* CAN Controller 1 Mailbox 14 Length Register */
342#define CAN1_MB14_TIMESTAMP 0xffc035d4 /* CAN Controller 1 Mailbox 14 Timestamp Register */
343#define CAN1_MB14_ID0 0xffc035d8 /* CAN Controller 1 Mailbox 14 ID0 Register */
344#define CAN1_MB14_ID1 0xffc035dc /* CAN Controller 1 Mailbox 14 ID1 Register */
345#define CAN1_MB15_DATA0 0xffc035e0 /* CAN Controller 1 Mailbox 15 Data 0 Register */
346#define CAN1_MB15_DATA1 0xffc035e4 /* CAN Controller 1 Mailbox 15 Data 1 Register */
347#define CAN1_MB15_DATA2 0xffc035e8 /* CAN Controller 1 Mailbox 15 Data 2 Register */
348#define CAN1_MB15_DATA3 0xffc035ec /* CAN Controller 1 Mailbox 15 Data 3 Register */
349#define CAN1_MB15_LENGTH 0xffc035f0 /* CAN Controller 1 Mailbox 15 Length Register */
350#define CAN1_MB15_TIMESTAMP 0xffc035f4 /* CAN Controller 1 Mailbox 15 Timestamp Register */
351#define CAN1_MB15_ID0 0xffc035f8 /* CAN Controller 1 Mailbox 15 ID0 Register */
352#define CAN1_MB15_ID1 0xffc035fc /* CAN Controller 1 Mailbox 15 ID1 Register */
353
354/* CAN Controller 1 Mailbox Data Registers */
355
356#define CAN1_MB16_DATA0 0xffc03600 /* CAN Controller 1 Mailbox 16 Data 0 Register */
357#define CAN1_MB16_DATA1 0xffc03604 /* CAN Controller 1 Mailbox 16 Data 1 Register */
358#define CAN1_MB16_DATA2 0xffc03608 /* CAN Controller 1 Mailbox 16 Data 2 Register */
359#define CAN1_MB16_DATA3 0xffc0360c /* CAN Controller 1 Mailbox 16 Data 3 Register */
360#define CAN1_MB16_LENGTH 0xffc03610 /* CAN Controller 1 Mailbox 16 Length Register */
361#define CAN1_MB16_TIMESTAMP 0xffc03614 /* CAN Controller 1 Mailbox 16 Timestamp Register */
362#define CAN1_MB16_ID0 0xffc03618 /* CAN Controller 1 Mailbox 16 ID0 Register */
363#define CAN1_MB16_ID1 0xffc0361c /* CAN Controller 1 Mailbox 16 ID1 Register */
364#define CAN1_MB17_DATA0 0xffc03620 /* CAN Controller 1 Mailbox 17 Data 0 Register */
365#define CAN1_MB17_DATA1 0xffc03624 /* CAN Controller 1 Mailbox 17 Data 1 Register */
366#define CAN1_MB17_DATA2 0xffc03628 /* CAN Controller 1 Mailbox 17 Data 2 Register */
367#define CAN1_MB17_DATA3 0xffc0362c /* CAN Controller 1 Mailbox 17 Data 3 Register */
368#define CAN1_MB17_LENGTH 0xffc03630 /* CAN Controller 1 Mailbox 17 Length Register */
369#define CAN1_MB17_TIMESTAMP 0xffc03634 /* CAN Controller 1 Mailbox 17 Timestamp Register */
370#define CAN1_MB17_ID0 0xffc03638 /* CAN Controller 1 Mailbox 17 ID0 Register */
371#define CAN1_MB17_ID1 0xffc0363c /* CAN Controller 1 Mailbox 17 ID1 Register */
372#define CAN1_MB18_DATA0 0xffc03640 /* CAN Controller 1 Mailbox 18 Data 0 Register */
373#define CAN1_MB18_DATA1 0xffc03644 /* CAN Controller 1 Mailbox 18 Data 1 Register */
374#define CAN1_MB18_DATA2 0xffc03648 /* CAN Controller 1 Mailbox 18 Data 2 Register */
375#define CAN1_MB18_DATA3 0xffc0364c /* CAN Controller 1 Mailbox 18 Data 3 Register */
376#define CAN1_MB18_LENGTH 0xffc03650 /* CAN Controller 1 Mailbox 18 Length Register */
377#define CAN1_MB18_TIMESTAMP 0xffc03654 /* CAN Controller 1 Mailbox 18 Timestamp Register */
378#define CAN1_MB18_ID0 0xffc03658 /* CAN Controller 1 Mailbox 18 ID0 Register */
379#define CAN1_MB18_ID1 0xffc0365c /* CAN Controller 1 Mailbox 18 ID1 Register */
380#define CAN1_MB19_DATA0 0xffc03660 /* CAN Controller 1 Mailbox 19 Data 0 Register */
381#define CAN1_MB19_DATA1 0xffc03664 /* CAN Controller 1 Mailbox 19 Data 1 Register */
382#define CAN1_MB19_DATA2 0xffc03668 /* CAN Controller 1 Mailbox 19 Data 2 Register */
383#define CAN1_MB19_DATA3 0xffc0366c /* CAN Controller 1 Mailbox 19 Data 3 Register */
384#define CAN1_MB19_LENGTH 0xffc03670 /* CAN Controller 1 Mailbox 19 Length Register */
385#define CAN1_MB19_TIMESTAMP 0xffc03674 /* CAN Controller 1 Mailbox 19 Timestamp Register */
386#define CAN1_MB19_ID0 0xffc03678 /* CAN Controller 1 Mailbox 19 ID0 Register */
387#define CAN1_MB19_ID1 0xffc0367c /* CAN Controller 1 Mailbox 19 ID1 Register */
388#define CAN1_MB20_DATA0 0xffc03680 /* CAN Controller 1 Mailbox 20 Data 0 Register */
389#define CAN1_MB20_DATA1 0xffc03684 /* CAN Controller 1 Mailbox 20 Data 1 Register */
390#define CAN1_MB20_DATA2 0xffc03688 /* CAN Controller 1 Mailbox 20 Data 2 Register */
391#define CAN1_MB20_DATA3 0xffc0368c /* CAN Controller 1 Mailbox 20 Data 3 Register */
392#define CAN1_MB20_LENGTH 0xffc03690 /* CAN Controller 1 Mailbox 20 Length Register */
393#define CAN1_MB20_TIMESTAMP 0xffc03694 /* CAN Controller 1 Mailbox 20 Timestamp Register */
394#define CAN1_MB20_ID0 0xffc03698 /* CAN Controller 1 Mailbox 20 ID0 Register */
395#define CAN1_MB20_ID1 0xffc0369c /* CAN Controller 1 Mailbox 20 ID1 Register */
396#define CAN1_MB21_DATA0 0xffc036a0 /* CAN Controller 1 Mailbox 21 Data 0 Register */
397#define CAN1_MB21_DATA1 0xffc036a4 /* CAN Controller 1 Mailbox 21 Data 1 Register */
398#define CAN1_MB21_DATA2 0xffc036a8 /* CAN Controller 1 Mailbox 21 Data 2 Register */
399#define CAN1_MB21_DATA3 0xffc036ac /* CAN Controller 1 Mailbox 21 Data 3 Register */
400#define CAN1_MB21_LENGTH 0xffc036b0 /* CAN Controller 1 Mailbox 21 Length Register */
401#define CAN1_MB21_TIMESTAMP 0xffc036b4 /* CAN Controller 1 Mailbox 21 Timestamp Register */
402#define CAN1_MB21_ID0 0xffc036b8 /* CAN Controller 1 Mailbox 21 ID0 Register */
403#define CAN1_MB21_ID1 0xffc036bc /* CAN Controller 1 Mailbox 21 ID1 Register */
404#define CAN1_MB22_DATA0 0xffc036c0 /* CAN Controller 1 Mailbox 22 Data 0 Register */
405#define CAN1_MB22_DATA1 0xffc036c4 /* CAN Controller 1 Mailbox 22 Data 1 Register */
406#define CAN1_MB22_DATA2 0xffc036c8 /* CAN Controller 1 Mailbox 22 Data 2 Register */
407#define CAN1_MB22_DATA3 0xffc036cc /* CAN Controller 1 Mailbox 22 Data 3 Register */
408#define CAN1_MB22_LENGTH 0xffc036d0 /* CAN Controller 1 Mailbox 22 Length Register */
409#define CAN1_MB22_TIMESTAMP 0xffc036d4 /* CAN Controller 1 Mailbox 22 Timestamp Register */
410#define CAN1_MB22_ID0 0xffc036d8 /* CAN Controller 1 Mailbox 22 ID0 Register */
411#define CAN1_MB22_ID1 0xffc036dc /* CAN Controller 1 Mailbox 22 ID1 Register */
412#define CAN1_MB23_DATA0 0xffc036e0 /* CAN Controller 1 Mailbox 23 Data 0 Register */
413#define CAN1_MB23_DATA1 0xffc036e4 /* CAN Controller 1 Mailbox 23 Data 1 Register */
414#define CAN1_MB23_DATA2 0xffc036e8 /* CAN Controller 1 Mailbox 23 Data 2 Register */
415#define CAN1_MB23_DATA3 0xffc036ec /* CAN Controller 1 Mailbox 23 Data 3 Register */
416#define CAN1_MB23_LENGTH 0xffc036f0 /* CAN Controller 1 Mailbox 23 Length Register */
417#define CAN1_MB23_TIMESTAMP 0xffc036f4 /* CAN Controller 1 Mailbox 23 Timestamp Register */
418#define CAN1_MB23_ID0 0xffc036f8 /* CAN Controller 1 Mailbox 23 ID0 Register */
419#define CAN1_MB23_ID1 0xffc036fc /* CAN Controller 1 Mailbox 23 ID1 Register */
420#define CAN1_MB24_DATA0 0xffc03700 /* CAN Controller 1 Mailbox 24 Data 0 Register */
421#define CAN1_MB24_DATA1 0xffc03704 /* CAN Controller 1 Mailbox 24 Data 1 Register */
422#define CAN1_MB24_DATA2 0xffc03708 /* CAN Controller 1 Mailbox 24 Data 2 Register */
423#define CAN1_MB24_DATA3 0xffc0370c /* CAN Controller 1 Mailbox 24 Data 3 Register */
424#define CAN1_MB24_LENGTH 0xffc03710 /* CAN Controller 1 Mailbox 24 Length Register */
425#define CAN1_MB24_TIMESTAMP 0xffc03714 /* CAN Controller 1 Mailbox 24 Timestamp Register */
426#define CAN1_MB24_ID0 0xffc03718 /* CAN Controller 1 Mailbox 24 ID0 Register */
427#define CAN1_MB24_ID1 0xffc0371c /* CAN Controller 1 Mailbox 24 ID1 Register */
428#define CAN1_MB25_DATA0 0xffc03720 /* CAN Controller 1 Mailbox 25 Data 0 Register */
429#define CAN1_MB25_DATA1 0xffc03724 /* CAN Controller 1 Mailbox 25 Data 1 Register */
430#define CAN1_MB25_DATA2 0xffc03728 /* CAN Controller 1 Mailbox 25 Data 2 Register */
431#define CAN1_MB25_DATA3 0xffc0372c /* CAN Controller 1 Mailbox 25 Data 3 Register */
432#define CAN1_MB25_LENGTH 0xffc03730 /* CAN Controller 1 Mailbox 25 Length Register */
433#define CAN1_MB25_TIMESTAMP 0xffc03734 /* CAN Controller 1 Mailbox 25 Timestamp Register */
434#define CAN1_MB25_ID0 0xffc03738 /* CAN Controller 1 Mailbox 25 ID0 Register */
435#define CAN1_MB25_ID1 0xffc0373c /* CAN Controller 1 Mailbox 25 ID1 Register */
436#define CAN1_MB26_DATA0 0xffc03740 /* CAN Controller 1 Mailbox 26 Data 0 Register */
437#define CAN1_MB26_DATA1 0xffc03744 /* CAN Controller 1 Mailbox 26 Data 1 Register */
438#define CAN1_MB26_DATA2 0xffc03748 /* CAN Controller 1 Mailbox 26 Data 2 Register */
439#define CAN1_MB26_DATA3 0xffc0374c /* CAN Controller 1 Mailbox 26 Data 3 Register */
440#define CAN1_MB26_LENGTH 0xffc03750 /* CAN Controller 1 Mailbox 26 Length Register */
441#define CAN1_MB26_TIMESTAMP 0xffc03754 /* CAN Controller 1 Mailbox 26 Timestamp Register */
442#define CAN1_MB26_ID0 0xffc03758 /* CAN Controller 1 Mailbox 26 ID0 Register */
443#define CAN1_MB26_ID1 0xffc0375c /* CAN Controller 1 Mailbox 26 ID1 Register */
444#define CAN1_MB27_DATA0 0xffc03760 /* CAN Controller 1 Mailbox 27 Data 0 Register */
445#define CAN1_MB27_DATA1 0xffc03764 /* CAN Controller 1 Mailbox 27 Data 1 Register */
446#define CAN1_MB27_DATA2 0xffc03768 /* CAN Controller 1 Mailbox 27 Data 2 Register */
447#define CAN1_MB27_DATA3 0xffc0376c /* CAN Controller 1 Mailbox 27 Data 3 Register */
448#define CAN1_MB27_LENGTH 0xffc03770 /* CAN Controller 1 Mailbox 27 Length Register */
449#define CAN1_MB27_TIMESTAMP 0xffc03774 /* CAN Controller 1 Mailbox 27 Timestamp Register */
450#define CAN1_MB27_ID0 0xffc03778 /* CAN Controller 1 Mailbox 27 ID0 Register */
451#define CAN1_MB27_ID1 0xffc0377c /* CAN Controller 1 Mailbox 27 ID1 Register */
452#define CAN1_MB28_DATA0 0xffc03780 /* CAN Controller 1 Mailbox 28 Data 0 Register */
453#define CAN1_MB28_DATA1 0xffc03784 /* CAN Controller 1 Mailbox 28 Data 1 Register */
454#define CAN1_MB28_DATA2 0xffc03788 /* CAN Controller 1 Mailbox 28 Data 2 Register */
455#define CAN1_MB28_DATA3 0xffc0378c /* CAN Controller 1 Mailbox 28 Data 3 Register */
456#define CAN1_MB28_LENGTH 0xffc03790 /* CAN Controller 1 Mailbox 28 Length Register */
457#define CAN1_MB28_TIMESTAMP 0xffc03794 /* CAN Controller 1 Mailbox 28 Timestamp Register */
458#define CAN1_MB28_ID0 0xffc03798 /* CAN Controller 1 Mailbox 28 ID0 Register */
459#define CAN1_MB28_ID1 0xffc0379c /* CAN Controller 1 Mailbox 28 ID1 Register */
460#define CAN1_MB29_DATA0 0xffc037a0 /* CAN Controller 1 Mailbox 29 Data 0 Register */
461#define CAN1_MB29_DATA1 0xffc037a4 /* CAN Controller 1 Mailbox 29 Data 1 Register */
462#define CAN1_MB29_DATA2 0xffc037a8 /* CAN Controller 1 Mailbox 29 Data 2 Register */
463#define CAN1_MB29_DATA3 0xffc037ac /* CAN Controller 1 Mailbox 29 Data 3 Register */
464#define CAN1_MB29_LENGTH 0xffc037b0 /* CAN Controller 1 Mailbox 29 Length Register */
465#define CAN1_MB29_TIMESTAMP 0xffc037b4 /* CAN Controller 1 Mailbox 29 Timestamp Register */
466#define CAN1_MB29_ID0 0xffc037b8 /* CAN Controller 1 Mailbox 29 ID0 Register */
467#define CAN1_MB29_ID1 0xffc037bc /* CAN Controller 1 Mailbox 29 ID1 Register */
468#define CAN1_MB30_DATA0 0xffc037c0 /* CAN Controller 1 Mailbox 30 Data 0 Register */
469#define CAN1_MB30_DATA1 0xffc037c4 /* CAN Controller 1 Mailbox 30 Data 1 Register */
470#define CAN1_MB30_DATA2 0xffc037c8 /* CAN Controller 1 Mailbox 30 Data 2 Register */
471#define CAN1_MB30_DATA3 0xffc037cc /* CAN Controller 1 Mailbox 30 Data 3 Register */
472#define CAN1_MB30_LENGTH 0xffc037d0 /* CAN Controller 1 Mailbox 30 Length Register */
473#define CAN1_MB30_TIMESTAMP 0xffc037d4 /* CAN Controller 1 Mailbox 30 Timestamp Register */
474#define CAN1_MB30_ID0 0xffc037d8 /* CAN Controller 1 Mailbox 30 ID0 Register */
475#define CAN1_MB30_ID1 0xffc037dc /* CAN Controller 1 Mailbox 30 ID1 Register */
476#define CAN1_MB31_DATA0 0xffc037e0 /* CAN Controller 1 Mailbox 31 Data 0 Register */
477#define CAN1_MB31_DATA1 0xffc037e4 /* CAN Controller 1 Mailbox 31 Data 1 Register */
478#define CAN1_MB31_DATA2 0xffc037e8 /* CAN Controller 1 Mailbox 31 Data 2 Register */
479#define CAN1_MB31_DATA3 0xffc037ec /* CAN Controller 1 Mailbox 31 Data 3 Register */
480#define CAN1_MB31_LENGTH 0xffc037f0 /* CAN Controller 1 Mailbox 31 Length Register */
481#define CAN1_MB31_TIMESTAMP 0xffc037f4 /* CAN Controller 1 Mailbox 31 Timestamp Register */
482#define CAN1_MB31_ID0 0xffc037f8 /* CAN Controller 1 Mailbox 31 ID0 Register */
483#define CAN1_MB31_ID1 0xffc037fc /* CAN Controller 1 Mailbox 31 ID1 Register */
484
485/* HOST Port Registers */
486
487#define HOST_CONTROL 0xffc03a00 /* HOST Control Register */
488#define HOST_STATUS 0xffc03a04 /* HOST Status Register */
489#define HOST_TIMEOUT 0xffc03a08 /* HOST Acknowledge Mode Timeout Register */
490
491/* Pixel Compositor (PIXC) Registers */
492
493#define PIXC_CTL 0xffc04400 /* Overlay enable, resampling mode, I/O data format, transparency enable, watermark level, FIFO status */
494#define PIXC_PPL 0xffc04404 /* Holds the number of pixels per line of the display */
495#define PIXC_LPF 0xffc04408 /* Holds the number of lines per frame of the display */
496#define PIXC_AHSTART 0xffc0440c /* Contains horizontal start pixel information of the overlay data (set A) */
497#define PIXC_AHEND 0xffc04410 /* Contains horizontal end pixel information of the overlay data (set A) */
498#define PIXC_AVSTART 0xffc04414 /* Contains vertical start pixel information of the overlay data (set A) */
499#define PIXC_AVEND 0xffc04418 /* Contains vertical end pixel information of the overlay data (set A) */
500#define PIXC_ATRANSP 0xffc0441c /* Contains the transparency ratio (set A) */
501#define PIXC_BHSTART 0xffc04420 /* Contains horizontal start pixel information of the overlay data (set B) */
502#define PIXC_BHEND 0xffc04424 /* Contains horizontal end pixel information of the overlay data (set B) */
503#define PIXC_BVSTART 0xffc04428 /* Contains vertical start pixel information of the overlay data (set B) */
504#define PIXC_BVEND 0xffc0442c /* Contains vertical end pixel information of the overlay data (set B) */
505#define PIXC_BTRANSP 0xffc04430 /* Contains the transparency ratio (set B) */
506#define PIXC_INTRSTAT 0xffc0443c /* Overlay interrupt configuration/status */
507#define PIXC_RYCON 0xffc04440 /* Color space conversion matrix register. Contains the R/Y conversion coefficients */
508#define PIXC_GUCON 0xffc04444 /* Color space conversion matrix register. Contains the G/U conversion coefficients */
509#define PIXC_BVCON 0xffc04448 /* Color space conversion matrix register. Contains the B/V conversion coefficients */
510#define PIXC_CCBIAS 0xffc0444c /* Bias values for the color space conversion matrix */
511#define PIXC_TC 0xffc04450 /* Holds the transparent color value */
512
513/* Handshake MDMA 0 Registers */
514
515#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
516#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
517#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
518#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */
519#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
520#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
521#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
522
523/* Handshake MDMA 1 Registers */
524
525#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
526#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
527#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
528#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */
529#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
530#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
531#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
532
533
534/* ********************************************************** */
535/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
536/* and MULTI BIT READ MACROS */
537/* ********************************************************** */
538
539/* Bit masks for PIXC_CTL */
540
541#define PIXC_EN 0x1 /* Pixel Compositor Enable */
542#define OVR_A_EN 0x2 /* Overlay A Enable */
543#define OVR_B_EN 0x4 /* Overlay B Enable */
544#define IMG_FORM 0x8 /* Image Data Format */
545#define OVR_FORM 0x10 /* Overlay Data Format */
546#define OUT_FORM 0x20 /* Output Data Format */
547#define UDS_MOD 0x40 /* Resampling Mode */
548#define TC_EN 0x80 /* Transparent Color Enable */
549#define IMG_STAT 0x300 /* Image FIFO Status */
550#define OVR_STAT 0xc00 /* Overlay FIFO Status */
551#define WM_LVL 0x3000 /* FIFO Watermark Level */
552
553/* Bit masks for PIXC_AHSTART */
554
555#define A_HSTART 0xfff /* Horizontal Start Coordinates */
556
557/* Bit masks for PIXC_AHEND */
558
559#define A_HEND 0xfff /* Horizontal End Coordinates */
560
561/* Bit masks for PIXC_AVSTART */
562
563#define A_VSTART 0x3ff /* Vertical Start Coordinates */
564
565/* Bit masks for PIXC_AVEND */
566
567#define A_VEND 0x3ff /* Vertical End Coordinates */
568
569/* Bit masks for PIXC_ATRANSP */
570
571#define A_TRANSP 0xf /* Transparency Value */
572
573/* Bit masks for PIXC_BHSTART */
574
575#define B_HSTART 0xfff /* Horizontal Start Coordinates */
576
577/* Bit masks for PIXC_BHEND */
578
579#define B_HEND 0xfff /* Horizontal End Coordinates */
580
581/* Bit masks for PIXC_BVSTART */
582
583#define B_VSTART 0x3ff /* Vertical Start Coordinates */
584
585/* Bit masks for PIXC_BVEND */
586
587#define B_VEND 0x3ff /* Vertical End Coordinates */
588
589/* Bit masks for PIXC_BTRANSP */
590
591#define B_TRANSP 0xf /* Transparency Value */
592
593/* Bit masks for PIXC_INTRSTAT */
594
595#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
596#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
597#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
598#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
599
600/* Bit masks for PIXC_RYCON */
601
602#define A11 0x3ff /* A11 in the Coefficient Matrix */
603#define A12 0xffc00 /* A12 in the Coefficient Matrix */
604#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
605#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
606
607/* Bit masks for PIXC_GUCON */
608
609#define A21 0x3ff /* A21 in the Coefficient Matrix */
610#define A22 0xffc00 /* A22 in the Coefficient Matrix */
611#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
612#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
613
614/* Bit masks for PIXC_BVCON */
615
616#define A31 0x3ff /* A31 in the Coefficient Matrix */
617#define A32 0xffc00 /* A32 in the Coefficient Matrix */
618#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
619#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
620
621/* Bit masks for PIXC_CCBIAS */
622
623#define A14 0x3ff /* A14 in the Bias Vector */
624#define A24 0xffc00 /* A24 in the Bias Vector */
625#define A34 0x3ff00000 /* A34 in the Bias Vector */
626
627/* Bit masks for PIXC_TC */
628
629#define RY_TRANS 0xff /* Transparent Color - R/Y Component */
630#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
631#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
632
633/* Bit masks for HOST_CONTROL */
634
635#define HOST_EN 0x1 /* Host Enable */
636#define HOST_END 0x2 /* Host Endianess */
637#define DATA_SIZE 0x4 /* Data Size */
638#define HOST_RST 0x8 /* Host Reset */
639#define HRDY_OVR 0x20 /* Host Ready Override */
640#define INT_MODE 0x40 /* Interrupt Mode */
641#define BT_EN 0x80 /* Bus Timeout Enable */
642#define EHW 0x100 /* Enable Host Write */
643#define EHR 0x200 /* Enable Host Read */
644#define BDR 0x400 /* Burst DMA Requests */
645
646/* Bit masks for HOST_STATUS */
647
648#define DMA_READY 0x1 /* DMA Ready */
649#define FIFOFULL 0x2 /* FIFO Full */
650#define FIFOEMPTY 0x4 /* FIFO Empty */
651#define COMPLETE 0x8 /* DMA Complete */
652#define HSHK 0x10 /* Host Handshake */
653#define TIMEOUT 0x20 /* Host Timeout */
654#define HIRQ 0x40 /* Host Interrupt Request */
655#define ALLOW_CNFG 0x80 /* Allow New Configuration */
656#define DMA_DIR 0x100 /* DMA Direction */
657#define BTE 0x200 /* Bus Timeout Enabled */
658
659/* Bit masks for HOST_TIMEOUT */
660
661#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
662
663/* Bit masks for TIMER_ENABLE1 */
664
665#define TIMEN8 0x1 /* Timer 8 Enable */
666#define TIMEN9 0x2 /* Timer 9 Enable */
667#define TIMEN10 0x4 /* Timer 10 Enable */
668
669/* Bit masks for TIMER_DISABLE1 */
670
671#define TIMDIS8 0x1 /* Timer 8 Disable */
672#define TIMDIS9 0x2 /* Timer 9 Disable */
673#define TIMDIS10 0x4 /* Timer 10 Disable */
674
675/* Bit masks for TIMER_STATUS1 */
676
677#define TIMIL8 0x1 /* Timer 8 Interrupt */
678#define TIMIL9 0x2 /* Timer 9 Interrupt */
679#define TIMIL10 0x4 /* Timer 10 Interrupt */
680#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
681#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
682#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
683#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
684#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
685#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
686
687/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
688
689/* Bit masks for HMDMAx_CONTROL */
690
691#define HMDMAEN 0x1 /* Handshake MDMA Enable */
692#define REP 0x2 /* Handshake MDMA Request Polarity */
693#define UTE 0x8 /* Urgency Threshold Enable */
694#define OIE 0x10 /* Overflow Interrupt Enable */
695#define BDIE 0x20 /* Block Done Interrupt Enable */
696#define MBDI 0x40 /* Mask Block Done Interrupt */
697#define DRQ 0x300 /* Handshake MDMA Request Type */
698#define RBC 0x1000 /* Force Reload of BCOUNT */
699#define PS 0x2000 /* Pin Status */
700#define OI 0x4000 /* Overflow Interrupt Generated */
701#define BDI 0x8000 /* Block Done Interrupt Generated */
702
703/* ******************************************* */
704/* MULTI BIT MACRO ENUMERATIONS */
705/* ******************************************* */
706
707#endif /* _DEF_BF544_H */
diff --git a/include/asm-blackfin/mach-bf548/defBF547.h b/include/asm-blackfin/mach-bf548/defBF547.h
deleted file mode 100644
index 3a3a18ebb10e..000000000000
--- a/include/asm-blackfin/mach-bf548/defBF547.h
+++ /dev/null
@@ -1,1244 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/defBF547.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF548_H
32#define _DEF_BF548_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF548 */
38
39/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
40#include "defBF54x_base.h"
41
42/* The following are the #defines needed by ADSP-BF548 that are not in the common header */
43
44/* Timer Registers */
45
46#define TIMER8_CONFIG 0xffc00600 /* Timer 8 Configuration Register */
47#define TIMER8_COUNTER 0xffc00604 /* Timer 8 Counter Register */
48#define TIMER8_PERIOD 0xffc00608 /* Timer 8 Period Register */
49#define TIMER8_WIDTH 0xffc0060c /* Timer 8 Width Register */
50#define TIMER9_CONFIG 0xffc00610 /* Timer 9 Configuration Register */
51#define TIMER9_COUNTER 0xffc00614 /* Timer 9 Counter Register */
52#define TIMER9_PERIOD 0xffc00618 /* Timer 9 Period Register */
53#define TIMER9_WIDTH 0xffc0061c /* Timer 9 Width Register */
54#define TIMER10_CONFIG 0xffc00620 /* Timer 10 Configuration Register */
55#define TIMER10_COUNTER 0xffc00624 /* Timer 10 Counter Register */
56#define TIMER10_PERIOD 0xffc00628 /* Timer 10 Period Register */
57#define TIMER10_WIDTH 0xffc0062c /* Timer 10 Width Register */
58
59/* Timer Group of 3 Registers */
60
61#define TIMER_ENABLE1 0xffc00640 /* Timer Group of 3 Enable Register */
62#define TIMER_DISABLE1 0xffc00644 /* Timer Group of 3 Disable Register */
63#define TIMER_STATUS1 0xffc00648 /* Timer Group of 3 Status Register */
64
65/* SPORT0 Registers */
66
67#define SPORT0_TCR1 0xffc00800 /* SPORT0 Transmit Configuration 1 Register */
68#define SPORT0_TCR2 0xffc00804 /* SPORT0 Transmit Configuration 2 Register */
69#define SPORT0_TCLKDIV 0xffc00808 /* SPORT0 Transmit Serial Clock Divider Register */
70#define SPORT0_TFSDIV 0xffc0080c /* SPORT0 Transmit Frame Sync Divider Register */
71#define SPORT0_TX 0xffc00810 /* SPORT0 Transmit Data Register */
72#define SPORT0_RX 0xffc00818 /* SPORT0 Receive Data Register */
73#define SPORT0_RCR1 0xffc00820 /* SPORT0 Receive Configuration 1 Register */
74#define SPORT0_RCR2 0xffc00824 /* SPORT0 Receive Configuration 2 Register */
75#define SPORT0_RCLKDIV 0xffc00828 /* SPORT0 Receive Serial Clock Divider Register */
76#define SPORT0_RFSDIV 0xffc0082c /* SPORT0 Receive Frame Sync Divider Register */
77#define SPORT0_STAT 0xffc00830 /* SPORT0 Status Register */
78#define SPORT0_CHNL 0xffc00834 /* SPORT0 Current Channel Register */
79#define SPORT0_MCMC1 0xffc00838 /* SPORT0 Multi channel Configuration Register 1 */
80#define SPORT0_MCMC2 0xffc0083c /* SPORT0 Multi channel Configuration Register 2 */
81#define SPORT0_MTCS0 0xffc00840 /* SPORT0 Multi channel Transmit Select Register 0 */
82#define SPORT0_MTCS1 0xffc00844 /* SPORT0 Multi channel Transmit Select Register 1 */
83#define SPORT0_MTCS2 0xffc00848 /* SPORT0 Multi channel Transmit Select Register 2 */
84#define SPORT0_MTCS3 0xffc0084c /* SPORT0 Multi channel Transmit Select Register 3 */
85#define SPORT0_MRCS0 0xffc00850 /* SPORT0 Multi channel Receive Select Register 0 */
86#define SPORT0_MRCS1 0xffc00854 /* SPORT0 Multi channel Receive Select Register 1 */
87#define SPORT0_MRCS2 0xffc00858 /* SPORT0 Multi channel Receive Select Register 2 */
88#define SPORT0_MRCS3 0xffc0085c /* SPORT0 Multi channel Receive Select Register 3 */
89
90/* EPPI0 Registers */
91
92#define EPPI0_STATUS 0xffc01000 /* EPPI0 Status Register */
93#define EPPI0_HCOUNT 0xffc01004 /* EPPI0 Horizontal Transfer Count Register */
94#define EPPI0_HDELAY 0xffc01008 /* EPPI0 Horizontal Delay Count Register */
95#define EPPI0_VCOUNT 0xffc0100c /* EPPI0 Vertical Transfer Count Register */
96#define EPPI0_VDELAY 0xffc01010 /* EPPI0 Vertical Delay Count Register */
97#define EPPI0_FRAME 0xffc01014 /* EPPI0 Lines per Frame Register */
98#define EPPI0_LINE 0xffc01018 /* EPPI0 Samples per Line Register */
99#define EPPI0_CLKDIV 0xffc0101c /* EPPI0 Clock Divide Register */
100#define EPPI0_CONTROL 0xffc01020 /* EPPI0 Control Register */
101#define EPPI0_FS1W_HBL 0xffc01024 /* EPPI0 FS1 Width Register / EPPI0 Horizontal Blanking Samples Per Line Register */
102#define EPPI0_FS1P_AVPL 0xffc01028 /* EPPI0 FS1 Period Register / EPPI0 Active Video Samples Per Line Register */
103#define EPPI0_FS2W_LVB 0xffc0102c /* EPPI0 FS2 Width Register / EPPI0 Lines of Vertical Blanking Register */
104#define EPPI0_FS2P_LAVF 0xffc01030 /* EPPI0 FS2 Period Register/ EPPI0 Lines of Active Video Per Field Register */
105#define EPPI0_CLIP 0xffc01034 /* EPPI0 Clipping Register */
106
107/* UART2 Registers */
108
109#define UART2_DLL 0xffc02100 /* Divisor Latch Low Byte */
110#define UART2_DLH 0xffc02104 /* Divisor Latch High Byte */
111#define UART2_GCTL 0xffc02108 /* Global Control Register */
112#define UART2_LCR 0xffc0210c /* Line Control Register */
113#define UART2_MCR 0xffc02110 /* Modem Control Register */
114#define UART2_LSR 0xffc02114 /* Line Status Register */
115#define UART2_MSR 0xffc02118 /* Modem Status Register */
116#define UART2_SCR 0xffc0211c /* Scratch Register */
117#define UART2_IER_SET 0xffc02120 /* Interrupt Enable Register Set */
118#define UART2_IER_CLEAR 0xffc02124 /* Interrupt Enable Register Clear */
119#define UART2_RBR 0xffc0212c /* Receive Buffer Register */
120
121/* Two Wire Interface Registers (TWI1) */
122
123#define TWI1_REGBASE 0xffc02200
124#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
125#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
126#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
127#define TWI1_SLAVE_STAT 0xffc0220c /* TWI Slave Mode Status Register */
128#define TWI1_SLAVE_ADDR 0xffc02210 /* TWI Slave Mode Address Register */
129#define TWI1_MASTER_CTRL 0xffc02214 /* TWI Master Mode Control Register */
130#define TWI1_MASTER_STAT 0xffc02218 /* TWI Master Mode Status Register */
131#define TWI1_MASTER_ADDR 0xffc0221c /* TWI Master Mode Address Register */
132#define TWI1_INT_STAT 0xffc02220 /* TWI Interrupt Status Register */
133#define TWI1_INT_MASK 0xffc02224 /* TWI Interrupt Mask Register */
134#define TWI1_FIFO_CTRL 0xffc02228 /* TWI FIFO Control Register */
135#define TWI1_FIFO_STAT 0xffc0222c /* TWI FIFO Status Register */
136#define TWI1_XMT_DATA8 0xffc02280 /* TWI FIFO Transmit Data Single Byte Register */
137#define TWI1_XMT_DATA16 0xffc02284 /* TWI FIFO Transmit Data Double Byte Register */
138#define TWI1_RCV_DATA8 0xffc02288 /* TWI FIFO Receive Data Single Byte Register */
139#define TWI1_RCV_DATA16 0xffc0228c /* TWI FIFO Receive Data Double Byte Register */
140
141/* SPI2 Registers */
142
143#define SPI2_REGBASE 0xffc02400
144#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
145#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
146#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
147#define SPI2_TDBR 0xffc0240c /* SPI2 Transmit Data Buffer Register */
148#define SPI2_RDBR 0xffc02410 /* SPI2 Receive Data Buffer Register */
149#define SPI2_BAUD 0xffc02414 /* SPI2 Baud Rate Register */
150#define SPI2_SHADOW 0xffc02418 /* SPI2 Receive Data Buffer Shadow Register */
151
152/* ATAPI Registers */
153
154#define ATAPI_CONTROL 0xffc03800 /* ATAPI Control Register */
155#define ATAPI_STATUS 0xffc03804 /* ATAPI Status Register */
156#define ATAPI_DEV_ADDR 0xffc03808 /* ATAPI Device Register Address */
157#define ATAPI_DEV_TXBUF 0xffc0380c /* ATAPI Device Register Write Data */
158#define ATAPI_DEV_RXBUF 0xffc03810 /* ATAPI Device Register Read Data */
159#define ATAPI_INT_MASK 0xffc03814 /* ATAPI Interrupt Mask Register */
160#define ATAPI_INT_STATUS 0xffc03818 /* ATAPI Interrupt Status Register */
161#define ATAPI_XFER_LEN 0xffc0381c /* ATAPI Length of Transfer */
162#define ATAPI_LINE_STATUS 0xffc03820 /* ATAPI Line Status */
163#define ATAPI_SM_STATE 0xffc03824 /* ATAPI State Machine Status */
164#define ATAPI_TERMINATE 0xffc03828 /* ATAPI Host Terminate */
165#define ATAPI_PIO_TFRCNT 0xffc0382c /* ATAPI PIO mode transfer count */
166#define ATAPI_DMA_TFRCNT 0xffc03830 /* ATAPI DMA mode transfer count */
167#define ATAPI_UMAIN_TFRCNT 0xffc03834 /* ATAPI UDMAIN transfer count */
168#define ATAPI_UDMAOUT_TFRCNT 0xffc03838 /* ATAPI UDMAOUT transfer count */
169#define ATAPI_REG_TIM_0 0xffc03840 /* ATAPI Register Transfer Timing 0 */
170#define ATAPI_PIO_TIM_0 0xffc03844 /* ATAPI PIO Timing 0 Register */
171#define ATAPI_PIO_TIM_1 0xffc03848 /* ATAPI PIO Timing 1 Register */
172#define ATAPI_MULTI_TIM_0 0xffc03850 /* ATAPI Multi-DMA Timing 0 Register */
173#define ATAPI_MULTI_TIM_1 0xffc03854 /* ATAPI Multi-DMA Timing 1 Register */
174#define ATAPI_MULTI_TIM_2 0xffc03858 /* ATAPI Multi-DMA Timing 2 Register */
175#define ATAPI_ULTRA_TIM_0 0xffc03860 /* ATAPI Ultra-DMA Timing 0 Register */
176#define ATAPI_ULTRA_TIM_1 0xffc03864 /* ATAPI Ultra-DMA Timing 1 Register */
177#define ATAPI_ULTRA_TIM_2 0xffc03868 /* ATAPI Ultra-DMA Timing 2 Register */
178#define ATAPI_ULTRA_TIM_3 0xffc0386c /* ATAPI Ultra-DMA Timing 3 Register */
179
180/* SDH Registers */
181
182#define SDH_PWR_CTL 0xffc03900 /* SDH Power Control */
183#define SDH_CLK_CTL 0xffc03904 /* SDH Clock Control */
184#define SDH_ARGUMENT 0xffc03908 /* SDH Argument */
185#define SDH_COMMAND 0xffc0390c /* SDH Command */
186#define SDH_RESP_CMD 0xffc03910 /* SDH Response Command */
187#define SDH_RESPONSE0 0xffc03914 /* SDH Response0 */
188#define SDH_RESPONSE1 0xffc03918 /* SDH Response1 */
189#define SDH_RESPONSE2 0xffc0391c /* SDH Response2 */
190#define SDH_RESPONSE3 0xffc03920 /* SDH Response3 */
191#define SDH_DATA_TIMER 0xffc03924 /* SDH Data Timer */
192#define SDH_DATA_LGTH 0xffc03928 /* SDH Data Length */
193#define SDH_DATA_CTL 0xffc0392c /* SDH Data Control */
194#define SDH_DATA_CNT 0xffc03930 /* SDH Data Counter */
195#define SDH_STATUS 0xffc03934 /* SDH Status */
196#define SDH_STATUS_CLR 0xffc03938 /* SDH Status Clear */
197#define SDH_MASK0 0xffc0393c /* SDH Interrupt0 Mask */
198#define SDH_MASK1 0xffc03940 /* SDH Interrupt1 Mask */
199#define SDH_FIFO_CNT 0xffc03948 /* SDH FIFO Counter */
200#define SDH_FIFO 0xffc03980 /* SDH Data FIFO */
201#define SDH_E_STATUS 0xffc039c0 /* SDH Exception Status */
202#define SDH_E_MASK 0xffc039c4 /* SDH Exception Mask */
203#define SDH_CFG 0xffc039c8 /* SDH Configuration */
204#define SDH_RD_WAIT_EN 0xffc039cc /* SDH Read Wait Enable */
205#define SDH_PID0 0xffc039d0 /* SDH Peripheral Identification0 */
206#define SDH_PID1 0xffc039d4 /* SDH Peripheral Identification1 */
207#define SDH_PID2 0xffc039d8 /* SDH Peripheral Identification2 */
208#define SDH_PID3 0xffc039dc /* SDH Peripheral Identification3 */
209#define SDH_PID4 0xffc039e0 /* SDH Peripheral Identification4 */
210#define SDH_PID5 0xffc039e4 /* SDH Peripheral Identification5 */
211#define SDH_PID6 0xffc039e8 /* SDH Peripheral Identification6 */
212#define SDH_PID7 0xffc039ec /* SDH Peripheral Identification7 */
213
214/* HOST Port Registers */
215
216#define HOST_CONTROL 0xffc03a00 /* HOST Control Register */
217#define HOST_STATUS 0xffc03a04 /* HOST Status Register */
218#define HOST_TIMEOUT 0xffc03a08 /* HOST Acknowledge Mode Timeout Register */
219
220/* USB Control Registers */
221
222#define USB_FADDR 0xffc03c00 /* Function address register */
223#define USB_POWER 0xffc03c04 /* Power management register */
224#define USB_INTRTX 0xffc03c08 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
225#define USB_INTRRX 0xffc03c0c /* Interrupt register for Rx endpoints 1 to 7 */
226#define USB_INTRTXE 0xffc03c10 /* Interrupt enable register for IntrTx */
227#define USB_INTRRXE 0xffc03c14 /* Interrupt enable register for IntrRx */
228#define USB_INTRUSB 0xffc03c18 /* Interrupt register for common USB interrupts */
229#define USB_INTRUSBE 0xffc03c1c /* Interrupt enable register for IntrUSB */
230#define USB_FRAME 0xffc03c20 /* USB frame number */
231#define USB_INDEX 0xffc03c24 /* Index register for selecting the indexed endpoint registers */
232#define USB_TESTMODE 0xffc03c28 /* Enabled USB 20 test modes */
233#define USB_GLOBINTR 0xffc03c2c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
234#define USB_GLOBAL_CTL 0xffc03c30 /* Global Clock Control for the core */
235
236/* USB Packet Control Registers */
237
238#define USB_TX_MAX_PACKET 0xffc03c40 /* Maximum packet size for Host Tx endpoint */
239#define USB_CSR0 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
240#define USB_TXCSR 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
241#define USB_RX_MAX_PACKET 0xffc03c48 /* Maximum packet size for Host Rx endpoint */
242#define USB_RXCSR 0xffc03c4c /* Control Status register for Host Rx endpoint */
243#define USB_COUNT0 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
244#define USB_RXCOUNT 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
245#define USB_TXTYPE 0xffc03c54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
246#define USB_NAKLIMIT0 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
247#define USB_TXINTERVAL 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
248#define USB_RXTYPE 0xffc03c5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
249#define USB_RXINTERVAL 0xffc03c60 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
250#define USB_TXCOUNT 0xffc03c68 /* Number of bytes to be written to the selected endpoint Tx FIFO */
251
252/* USB Endpoint FIFO Registers */
253
254#define USB_EP0_FIFO 0xffc03c80 /* Endpoint 0 FIFO */
255#define USB_EP1_FIFO 0xffc03c88 /* Endpoint 1 FIFO */
256#define USB_EP2_FIFO 0xffc03c90 /* Endpoint 2 FIFO */
257#define USB_EP3_FIFO 0xffc03c98 /* Endpoint 3 FIFO */
258#define USB_EP4_FIFO 0xffc03ca0 /* Endpoint 4 FIFO */
259#define USB_EP5_FIFO 0xffc03ca8 /* Endpoint 5 FIFO */
260#define USB_EP6_FIFO 0xffc03cb0 /* Endpoint 6 FIFO */
261#define USB_EP7_FIFO 0xffc03cb8 /* Endpoint 7 FIFO */
262
263/* USB OTG Control Registers */
264
265#define USB_OTG_DEV_CTL 0xffc03d00 /* OTG Device Control Register */
266#define USB_OTG_VBUS_IRQ 0xffc03d04 /* OTG VBUS Control Interrupts */
267#define USB_OTG_VBUS_MASK 0xffc03d08 /* VBUS Control Interrupt Enable */
268
269/* USB Phy Control Registers */
270
271#define USB_LINKINFO 0xffc03d48 /* Enables programming of some PHY-side delays */
272#define USB_VPLEN 0xffc03d4c /* Determines duration of VBUS pulse for VBUS charging */
273#define USB_HS_EOF1 0xffc03d50 /* Time buffer for High-Speed transactions */
274#define USB_FS_EOF1 0xffc03d54 /* Time buffer for Full-Speed transactions */
275#define USB_LS_EOF1 0xffc03d58 /* Time buffer for Low-Speed transactions */
276
277/* (APHY_CNTRL is for ADI usage only) */
278
279#define USB_APHY_CNTRL 0xffc03de0 /* Register that increases visibility of Analog PHY */
280
281/* (APHY_CALIB is for ADI usage only) */
282
283#define USB_APHY_CALIB 0xffc03de4 /* Register used to set some calibration values */
284#define USB_APHY_CNTRL2 0xffc03de8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
285
286/* (PHY_TEST is for ADI usage only) */
287
288#define USB_PHY_TEST 0xffc03dec /* Used for reducing simulation time and simplifies FIFO testability */
289#define USB_PLLOSC_CTRL 0xffc03df0 /* Used to program different parameters for USB PLL and Oscillator */
290#define USB_SRP_CLKDIV 0xffc03df4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
291
292/* USB Endpoint 0 Control Registers */
293
294#define USB_EP_NI0_TXMAXP 0xffc03e00 /* Maximum packet size for Host Tx endpoint0 */
295#define USB_EP_NI0_TXCSR 0xffc03e04 /* Control Status register for endpoint 0 */
296#define USB_EP_NI0_RXMAXP 0xffc03e08 /* Maximum packet size for Host Rx endpoint0 */
297#define USB_EP_NI0_RXCSR 0xffc03e0c /* Control Status register for Host Rx endpoint0 */
298#define USB_EP_NI0_RXCOUNT 0xffc03e10 /* Number of bytes received in endpoint 0 FIFO */
299#define USB_EP_NI0_TXTYPE 0xffc03e14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
300#define USB_EP_NI0_TXINTERVAL 0xffc03e18 /* Sets the NAK response timeout on Endpoint 0 */
301#define USB_EP_NI0_RXTYPE 0xffc03e1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
302#define USB_EP_NI0_RXINTERVAL 0xffc03e20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
303
304/* USB Endpoint 1 Control Registers */
305
306#define USB_EP_NI0_TXCOUNT 0xffc03e28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
307#define USB_EP_NI1_TXMAXP 0xffc03e40 /* Maximum packet size for Host Tx endpoint1 */
308#define USB_EP_NI1_TXCSR 0xffc03e44 /* Control Status register for endpoint1 */
309#define USB_EP_NI1_RXMAXP 0xffc03e48 /* Maximum packet size for Host Rx endpoint1 */
310#define USB_EP_NI1_RXCSR 0xffc03e4c /* Control Status register for Host Rx endpoint1 */
311#define USB_EP_NI1_RXCOUNT 0xffc03e50 /* Number of bytes received in endpoint1 FIFO */
312#define USB_EP_NI1_TXTYPE 0xffc03e54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
313#define USB_EP_NI1_TXINTERVAL 0xffc03e58 /* Sets the NAK response timeout on Endpoint1 */
314#define USB_EP_NI1_RXTYPE 0xffc03e5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
315#define USB_EP_NI1_RXINTERVAL 0xffc03e60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
316
317/* USB Endpoint 2 Control Registers */
318
319#define USB_EP_NI1_TXCOUNT 0xffc03e68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
320#define USB_EP_NI2_TXMAXP 0xffc03e80 /* Maximum packet size for Host Tx endpoint2 */
321#define USB_EP_NI2_TXCSR 0xffc03e84 /* Control Status register for endpoint2 */
322#define USB_EP_NI2_RXMAXP 0xffc03e88 /* Maximum packet size for Host Rx endpoint2 */
323#define USB_EP_NI2_RXCSR 0xffc03e8c /* Control Status register for Host Rx endpoint2 */
324#define USB_EP_NI2_RXCOUNT 0xffc03e90 /* Number of bytes received in endpoint2 FIFO */
325#define USB_EP_NI2_TXTYPE 0xffc03e94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
326#define USB_EP_NI2_TXINTERVAL 0xffc03e98 /* Sets the NAK response timeout on Endpoint2 */
327#define USB_EP_NI2_RXTYPE 0xffc03e9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
328#define USB_EP_NI2_RXINTERVAL 0xffc03ea0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
329
330/* USB Endpoint 3 Control Registers */
331
332#define USB_EP_NI2_TXCOUNT 0xffc03ea8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
333#define USB_EP_NI3_TXMAXP 0xffc03ec0 /* Maximum packet size for Host Tx endpoint3 */
334#define USB_EP_NI3_TXCSR 0xffc03ec4 /* Control Status register for endpoint3 */
335#define USB_EP_NI3_RXMAXP 0xffc03ec8 /* Maximum packet size for Host Rx endpoint3 */
336#define USB_EP_NI3_RXCSR 0xffc03ecc /* Control Status register for Host Rx endpoint3 */
337#define USB_EP_NI3_RXCOUNT 0xffc03ed0 /* Number of bytes received in endpoint3 FIFO */
338#define USB_EP_NI3_TXTYPE 0xffc03ed4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
339#define USB_EP_NI3_TXINTERVAL 0xffc03ed8 /* Sets the NAK response timeout on Endpoint3 */
340#define USB_EP_NI3_RXTYPE 0xffc03edc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
341#define USB_EP_NI3_RXINTERVAL 0xffc03ee0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
342
343/* USB Endpoint 4 Control Registers */
344
345#define USB_EP_NI3_TXCOUNT 0xffc03ee8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
346#define USB_EP_NI4_TXMAXP 0xffc03f00 /* Maximum packet size for Host Tx endpoint4 */
347#define USB_EP_NI4_TXCSR 0xffc03f04 /* Control Status register for endpoint4 */
348#define USB_EP_NI4_RXMAXP 0xffc03f08 /* Maximum packet size for Host Rx endpoint4 */
349#define USB_EP_NI4_RXCSR 0xffc03f0c /* Control Status register for Host Rx endpoint4 */
350#define USB_EP_NI4_RXCOUNT 0xffc03f10 /* Number of bytes received in endpoint4 FIFO */
351#define USB_EP_NI4_TXTYPE 0xffc03f14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
352#define USB_EP_NI4_TXINTERVAL 0xffc03f18 /* Sets the NAK response timeout on Endpoint4 */
353#define USB_EP_NI4_RXTYPE 0xffc03f1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
354#define USB_EP_NI4_RXINTERVAL 0xffc03f20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
355
356/* USB Endpoint 5 Control Registers */
357
358#define USB_EP_NI4_TXCOUNT 0xffc03f28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
359#define USB_EP_NI5_TXMAXP 0xffc03f40 /* Maximum packet size for Host Tx endpoint5 */
360#define USB_EP_NI5_TXCSR 0xffc03f44 /* Control Status register for endpoint5 */
361#define USB_EP_NI5_RXMAXP 0xffc03f48 /* Maximum packet size for Host Rx endpoint5 */
362#define USB_EP_NI5_RXCSR 0xffc03f4c /* Control Status register for Host Rx endpoint5 */
363#define USB_EP_NI5_RXCOUNT 0xffc03f50 /* Number of bytes received in endpoint5 FIFO */
364#define USB_EP_NI5_TXTYPE 0xffc03f54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
365#define USB_EP_NI5_TXINTERVAL 0xffc03f58 /* Sets the NAK response timeout on Endpoint5 */
366#define USB_EP_NI5_RXTYPE 0xffc03f5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
367#define USB_EP_NI5_RXINTERVAL 0xffc03f60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
368
369/* USB Endpoint 6 Control Registers */
370
371#define USB_EP_NI5_TXCOUNT 0xffc03f68 /* Number of bytes to be written to the H145endpoint5 Tx FIFO */
372#define USB_EP_NI6_TXMAXP 0xffc03f80 /* Maximum packet size for Host Tx endpoint6 */
373#define USB_EP_NI6_TXCSR 0xffc03f84 /* Control Status register for endpoint6 */
374#define USB_EP_NI6_RXMAXP 0xffc03f88 /* Maximum packet size for Host Rx endpoint6 */
375#define USB_EP_NI6_RXCSR 0xffc03f8c /* Control Status register for Host Rx endpoint6 */
376#define USB_EP_NI6_RXCOUNT 0xffc03f90 /* Number of bytes received in endpoint6 FIFO */
377#define USB_EP_NI6_TXTYPE 0xffc03f94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
378#define USB_EP_NI6_TXINTERVAL 0xffc03f98 /* Sets the NAK response timeout on Endpoint6 */
379#define USB_EP_NI6_RXTYPE 0xffc03f9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
380#define USB_EP_NI6_RXINTERVAL 0xffc03fa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
381
382/* USB Endpoint 7 Control Registers */
383
384#define USB_EP_NI6_TXCOUNT 0xffc03fa8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
385#define USB_EP_NI7_TXMAXP 0xffc03fc0 /* Maximum packet size for Host Tx endpoint7 */
386#define USB_EP_NI7_TXCSR 0xffc03fc4 /* Control Status register for endpoint7 */
387#define USB_EP_NI7_RXMAXP 0xffc03fc8 /* Maximum packet size for Host Rx endpoint7 */
388#define USB_EP_NI7_RXCSR 0xffc03fcc /* Control Status register for Host Rx endpoint7 */
389#define USB_EP_NI7_RXCOUNT 0xffc03fd0 /* Number of bytes received in endpoint7 FIFO */
390#define USB_EP_NI7_TXTYPE 0xffc03fd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
391#define USB_EP_NI7_TXINTERVAL 0xffc03fd8 /* Sets the NAK response timeout on Endpoint7 */
392#define USB_EP_NI7_RXTYPE 0xffc03fdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
393#define USB_EP_NI7_RXINTERVAL 0xffc03ff0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
394#define USB_EP_NI7_TXCOUNT 0xffc03ff8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
395#define USB_DMA_INTERRUPT 0xffc04000 /* Indicates pending interrupts for the DMA channels */
396
397/* USB Channel 0 Config Registers */
398
399#define USB_DMA0CONTROL 0xffc04004 /* DMA master channel 0 configuration */
400#define USB_DMA0ADDRLOW 0xffc04008 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
401#define USB_DMA0ADDRHIGH 0xffc0400c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
402#define USB_DMA0COUNTLOW 0xffc04010 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
403#define USB_DMA0COUNTHIGH 0xffc04014 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
404
405/* USB Channel 1 Config Registers */
406
407#define USB_DMA1CONTROL 0xffc04024 /* DMA master channel 1 configuration */
408#define USB_DMA1ADDRLOW 0xffc04028 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
409#define USB_DMA1ADDRHIGH 0xffc0402c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
410#define USB_DMA1COUNTLOW 0xffc04030 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
411#define USB_DMA1COUNTHIGH 0xffc04034 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
412
413/* USB Channel 2 Config Registers */
414
415#define USB_DMA2CONTROL 0xffc04044 /* DMA master channel 2 configuration */
416#define USB_DMA2ADDRLOW 0xffc04048 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
417#define USB_DMA2ADDRHIGH 0xffc0404c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
418#define USB_DMA2COUNTLOW 0xffc04050 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
419#define USB_DMA2COUNTHIGH 0xffc04054 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
420
421/* USB Channel 3 Config Registers */
422
423#define USB_DMA3CONTROL 0xffc04064 /* DMA master channel 3 configuration */
424#define USB_DMA3ADDRLOW 0xffc04068 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
425#define USB_DMA3ADDRHIGH 0xffc0406c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
426#define USB_DMA3COUNTLOW 0xffc04070 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
427#define USB_DMA3COUNTHIGH 0xffc04074 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
428
429/* USB Channel 4 Config Registers */
430
431#define USB_DMA4CONTROL 0xffc04084 /* DMA master channel 4 configuration */
432#define USB_DMA4ADDRLOW 0xffc04088 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
433#define USB_DMA4ADDRHIGH 0xffc0408c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
434#define USB_DMA4COUNTLOW 0xffc04090 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
435#define USB_DMA4COUNTHIGH 0xffc04094 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
436
437/* USB Channel 5 Config Registers */
438
439#define USB_DMA5CONTROL 0xffc040a4 /* DMA master channel 5 configuration */
440#define USB_DMA5ADDRLOW 0xffc040a8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
441#define USB_DMA5ADDRHIGH 0xffc040ac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
442#define USB_DMA5COUNTLOW 0xffc040b0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
443#define USB_DMA5COUNTHIGH 0xffc040b4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
444
445/* USB Channel 6 Config Registers */
446
447#define USB_DMA6CONTROL 0xffc040c4 /* DMA master channel 6 configuration */
448#define USB_DMA6ADDRLOW 0xffc040c8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
449#define USB_DMA6ADDRHIGH 0xffc040cc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
450#define USB_DMA6COUNTLOW 0xffc040d0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
451#define USB_DMA6COUNTHIGH 0xffc040d4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
452
453/* USB Channel 7 Config Registers */
454
455#define USB_DMA7CONTROL 0xffc040e4 /* DMA master channel 7 configuration */
456#define USB_DMA7ADDRLOW 0xffc040e8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
457#define USB_DMA7ADDRHIGH 0xffc040ec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
458#define USB_DMA7COUNTLOW 0xffc040f0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
459#define USB_DMA7COUNTHIGH 0xffc040f4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
460
461/* Keypad Registers */
462
463#define KPAD_CTL 0xffc04100 /* Controls keypad module enable and disable */
464#define KPAD_PRESCALE 0xffc04104 /* Establish a time base for programing the KPAD_MSEL register */
465#define KPAD_MSEL 0xffc04108 /* Selects delay parameters for keypad interface sensitivity */
466#define KPAD_ROWCOL 0xffc0410c /* Captures the row and column output values of the keys pressed */
467#define KPAD_STAT 0xffc04110 /* Holds and clears the status of the keypad interface interrupt */
468#define KPAD_SOFTEVAL 0xffc04114 /* Lets software force keypad interface to check for keys being pressed */
469
470/* Pixel Compositor (PIXC) Registers */
471
472#define PIXC_CTL 0xffc04400 /* Overlay enable, resampling mode, I/O data format, transparency enable, watermark level, FIFO status */
473#define PIXC_PPL 0xffc04404 /* Holds the number of pixels per line of the display */
474#define PIXC_LPF 0xffc04408 /* Holds the number of lines per frame of the display */
475#define PIXC_AHSTART 0xffc0440c /* Contains horizontal start pixel information of the overlay data (set A) */
476#define PIXC_AHEND 0xffc04410 /* Contains horizontal end pixel information of the overlay data (set A) */
477#define PIXC_AVSTART 0xffc04414 /* Contains vertical start pixel information of the overlay data (set A) */
478#define PIXC_AVEND 0xffc04418 /* Contains vertical end pixel information of the overlay data (set A) */
479#define PIXC_ATRANSP 0xffc0441c /* Contains the transparency ratio (set A) */
480#define PIXC_BHSTART 0xffc04420 /* Contains horizontal start pixel information of the overlay data (set B) */
481#define PIXC_BHEND 0xffc04424 /* Contains horizontal end pixel information of the overlay data (set B) */
482#define PIXC_BVSTART 0xffc04428 /* Contains vertical start pixel information of the overlay data (set B) */
483#define PIXC_BVEND 0xffc0442c /* Contains vertical end pixel information of the overlay data (set B) */
484#define PIXC_BTRANSP 0xffc04430 /* Contains the transparency ratio (set B) */
485#define PIXC_INTRSTAT 0xffc0443c /* Overlay interrupt configuration/status */
486#define PIXC_RYCON 0xffc04440 /* Color space conversion matrix register. Contains the R/Y conversion coefficients */
487#define PIXC_GUCON 0xffc04444 /* Color space conversion matrix register. Contains the G/U conversion coefficients */
488#define PIXC_BVCON 0xffc04448 /* Color space conversion matrix register. Contains the B/V conversion coefficients */
489#define PIXC_CCBIAS 0xffc0444c /* Bias values for the color space conversion matrix */
490#define PIXC_TC 0xffc04450 /* Holds the transparent color value */
491
492/* Handshake MDMA 0 Registers */
493
494#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
495#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
496#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
497#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */
498#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
499#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
500#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
501
502/* Handshake MDMA 1 Registers */
503
504#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
505#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
506#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
507#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */
508#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
509#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
510#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
511
512
513/* ********************************************************** */
514/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
515/* and MULTI BIT READ MACROS */
516/* ********************************************************** */
517
518/* Bit masks for PIXC_CTL */
519
520#define PIXC_EN 0x1 /* Pixel Compositor Enable */
521#define OVR_A_EN 0x2 /* Overlay A Enable */
522#define OVR_B_EN 0x4 /* Overlay B Enable */
523#define IMG_FORM 0x8 /* Image Data Format */
524#define OVR_FORM 0x10 /* Overlay Data Format */
525#define OUT_FORM 0x20 /* Output Data Format */
526#define UDS_MOD 0x40 /* Resampling Mode */
527#define TC_EN 0x80 /* Transparent Color Enable */
528#define IMG_STAT 0x300 /* Image FIFO Status */
529#define OVR_STAT 0xc00 /* Overlay FIFO Status */
530#define WM_LVL 0x3000 /* FIFO Watermark Level */
531
532/* Bit masks for PIXC_AHSTART */
533
534#define A_HSTART 0xfff /* Horizontal Start Coordinates */
535
536/* Bit masks for PIXC_AHEND */
537
538#define A_HEND 0xfff /* Horizontal End Coordinates */
539
540/* Bit masks for PIXC_AVSTART */
541
542#define A_VSTART 0x3ff /* Vertical Start Coordinates */
543
544/* Bit masks for PIXC_AVEND */
545
546#define A_VEND 0x3ff /* Vertical End Coordinates */
547
548/* Bit masks for PIXC_ATRANSP */
549
550#define A_TRANSP 0xf /* Transparency Value */
551
552/* Bit masks for PIXC_BHSTART */
553
554#define B_HSTART 0xfff /* Horizontal Start Coordinates */
555
556/* Bit masks for PIXC_BHEND */
557
558#define B_HEND 0xfff /* Horizontal End Coordinates */
559
560/* Bit masks for PIXC_BVSTART */
561
562#define B_VSTART 0x3ff /* Vertical Start Coordinates */
563
564/* Bit masks for PIXC_BVEND */
565
566#define B_VEND 0x3ff /* Vertical End Coordinates */
567
568/* Bit masks for PIXC_BTRANSP */
569
570#define B_TRANSP 0xf /* Transparency Value */
571
572/* Bit masks for PIXC_INTRSTAT */
573
574#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
575#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
576#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
577#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
578
579/* Bit masks for PIXC_RYCON */
580
581#define A11 0x3ff /* A11 in the Coefficient Matrix */
582#define A12 0xffc00 /* A12 in the Coefficient Matrix */
583#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
584#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
585
586/* Bit masks for PIXC_GUCON */
587
588#define A21 0x3ff /* A21 in the Coefficient Matrix */
589#define A22 0xffc00 /* A22 in the Coefficient Matrix */
590#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
591#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
592
593/* Bit masks for PIXC_BVCON */
594
595#define A31 0x3ff /* A31 in the Coefficient Matrix */
596#define A32 0xffc00 /* A32 in the Coefficient Matrix */
597#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
598#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
599
600/* Bit masks for PIXC_CCBIAS */
601
602#define A14 0x3ff /* A14 in the Bias Vector */
603#define A24 0xffc00 /* A24 in the Bias Vector */
604#define A34 0x3ff00000 /* A34 in the Bias Vector */
605
606/* Bit masks for PIXC_TC */
607
608#define RY_TRANS 0xff /* Transparent Color - R/Y Component */
609#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
610#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
611
612/* Bit masks for HOST_CONTROL */
613
614#define HOST_EN 0x1 /* Host Enable */
615#define HOST_END 0x2 /* Host Endianess */
616#define DATA_SIZE 0x4 /* Data Size */
617#define HOST_RST 0x8 /* Host Reset */
618#define HRDY_OVR 0x20 /* Host Ready Override */
619#define INT_MODE 0x40 /* Interrupt Mode */
620#define BT_EN 0x80 /* Bus Timeout Enable */
621#define EHW 0x100 /* Enable Host Write */
622#define EHR 0x200 /* Enable Host Read */
623#define BDR 0x400 /* Burst DMA Requests */
624
625/* Bit masks for HOST_STATUS */
626
627#define DMA_READY 0x1 /* DMA Ready */
628#define FIFOFULL 0x2 /* FIFO Full */
629#define FIFOEMPTY 0x4 /* FIFO Empty */
630#define DMA_COMPLETE 0x8 /* DMA Complete */
631#define HSHK 0x10 /* Host Handshake */
632#define HSTIMEOUT 0x20 /* Host Timeout */
633#define HIRQ 0x40 /* Host Interrupt Request */
634#define ALLOW_CNFG 0x80 /* Allow New Configuration */
635#define DMA_DIR 0x100 /* DMA Direction */
636#define BTE 0x200 /* Bus Timeout Enabled */
637
638/* Bit masks for HOST_TIMEOUT */
639
640#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
641
642/* Bit masks for KPAD_CTL */
643
644#define KPAD_EN 0x1 /* Keypad Enable */
645#define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */
646#define KPAD_ROWEN 0x1c00 /* Row Enable Width */
647#define KPAD_COLEN 0xe000 /* Column Enable Width */
648
649/* Bit masks for KPAD_PRESCALE */
650
651#define KPAD_PRESCALE_VAL 0x3f /* Key Prescale Value */
652
653/* Bit masks for KPAD_MSEL */
654
655#define DBON_SCALE 0xff /* Debounce Scale Value */
656#define COLDRV_SCALE 0xff00 /* Column Driver Scale Value */
657
658/* Bit masks for KPAD_ROWCOL */
659
660#define KPAD_ROW 0xff /* Rows Pressed */
661#define KPAD_COL 0xff00 /* Columns Pressed */
662
663/* Bit masks for KPAD_STAT */
664
665#define KPAD_IRQ 0x1 /* Keypad Interrupt Status */
666#define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */
667#define KPAD_PRESSED 0x8 /* Key press current status */
668
669/* Bit masks for KPAD_SOFTEVAL */
670
671#define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */
672
673/* Bit masks for SDH_COMMAND */
674
675#define CMD_IDX 0x3f /* Command Index */
676#define CMD_RSP 0x40 /* Response */
677#define CMD_L_RSP 0x80 /* Long Response */
678#define CMD_INT_E 0x100 /* Command Interrupt */
679#define CMD_PEND_E 0x200 /* Command Pending */
680#define CMD_E 0x400 /* Command Enable */
681
682/* Bit masks for SDH_PWR_CTL */
683
684#define PWR_ON 0x3 /* Power On */
685#if 0
686#define TBD 0x3c /* TBD */
687#endif
688#define SD_CMD_OD 0x40 /* Open Drain Output */
689#define ROD_CTL 0x80 /* Rod Control */
690
691/* Bit masks for SDH_CLK_CTL */
692
693#define CLKDIV 0xff /* MC_CLK Divisor */
694#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
695#define PWR_SV_E 0x200 /* Power Save Enable */
696#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
697#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
698
699/* Bit masks for SDH_RESP_CMD */
700
701#define RESP_CMD 0x3f /* Response Command */
702
703/* Bit masks for SDH_DATA_CTL */
704
705#define DTX_E 0x1 /* Data Transfer Enable */
706#define DTX_DIR 0x2 /* Data Transfer Direction */
707#define DTX_MODE 0x4 /* Data Transfer Mode */
708#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
709#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
710
711/* Bit masks for SDH_STATUS */
712
713#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
714#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
715#define CMD_TIME_OUT 0x4 /* CMD Time Out */
716#define DAT_TIME_OUT 0x8 /* Data Time Out */
717#define TX_UNDERRUN 0x10 /* Transmit Underrun */
718#define RX_OVERRUN 0x20 /* Receive Overrun */
719#define CMD_RESP_END 0x40 /* CMD Response End */
720#define CMD_SENT 0x80 /* CMD Sent */
721#define DAT_END 0x100 /* Data End */
722#define START_BIT_ERR 0x200 /* Start Bit Error */
723#define DAT_BLK_END 0x400 /* Data Block End */
724#define CMD_ACT 0x800 /* CMD Active */
725#define TX_ACT 0x1000 /* Transmit Active */
726#define RX_ACT 0x2000 /* Receive Active */
727#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
728#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
729#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
730#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
731#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
732#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
733#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
734#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
735
736/* Bit masks for SDH_STATUS_CLR */
737
738#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
739#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
740#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
741#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
742#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
743#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
744#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
745#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
746#define DAT_END_STAT 0x100 /* Data End Status */
747#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
748#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
749
750/* Bit masks for SDH_MASK0 */
751
752#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
753#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
754#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
755#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
756#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
757#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
758#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
759#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
760#define DAT_END_MASK 0x100 /* Data End Mask */
761#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
762#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
763#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
764#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
765#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
766#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
767#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
768#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
769#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
770#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
771#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
772#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
773#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
774
775/* Bit masks for SDH_FIFO_CNT */
776
777#define FIFO_COUNT 0x7fff /* FIFO Count */
778
779/* Bit masks for SDH_E_STATUS */
780
781#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
782#define SD_CARD_DET 0x10 /* SD Card Detect */
783
784/* Bit masks for SDH_E_MASK */
785
786#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
787#define SCD_MSK 0x40 /* Mask Card Detect */
788
789/* Bit masks for SDH_CFG */
790
791#define CLKS_EN 0x1 /* Clocks Enable */
792#define SD4E 0x4 /* SDIO 4-Bit Enable */
793#define MWE 0x8 /* Moving Window Enable */
794#define SD_RST 0x10 /* SDMMC Reset */
795#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
796#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
797#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
798
799/* Bit masks for SDH_RD_WAIT_EN */
800
801#define RWR 0x1 /* Read Wait Request */
802
803/* Bit masks for ATAPI_CONTROL */
804
805#define PIO_START 0x1 /* Start PIO/Reg Op */
806#define MULTI_START 0x2 /* Start Multi-DMA Op */
807#define ULTRA_START 0x4 /* Start Ultra-DMA Op */
808#define XFER_DIR 0x8 /* Transfer Direction */
809#define IORDY_EN 0x10 /* IORDY Enable */
810#define FIFO_FLUSH 0x20 /* Flush FIFOs */
811#define SOFT_RST 0x40 /* Soft Reset */
812#define DEV_RST 0x80 /* Device Reset */
813#define TFRCNT_RST 0x100 /* Trans Count Reset */
814#define END_ON_TERM 0x200 /* End/Terminate Select */
815#define PIO_USE_DMA 0x400 /* PIO-DMA Enable */
816#define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */
817
818/* Bit masks for ATAPI_STATUS */
819
820#define PIO_XFER_ON 0x1 /* PIO transfer in progress */
821#define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */
822#define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */
823#define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */
824
825/* Bit masks for ATAPI_DEV_ADDR */
826
827#define DEV_ADDR 0x1f /* Device Address */
828
829/* Bit masks for ATAPI_INT_MASK */
830
831#define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */
832#define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */
833#define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */
834#define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */
835#define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */
836#define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */
837#define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */
838#define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */
839#define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */
840
841/* Bit masks for ATAPI_INT_STATUS */
842
843#define ATAPI_DEV_INT 0x1 /* Device interrupt status */
844#define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */
845#define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */
846#define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */
847#define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */
848#define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */
849#define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */
850#define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */
851#define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */
852
853/* Bit masks for ATAPI_LINE_STATUS */
854
855#define ATAPI_INTR 0x1 /* Device interrupt to host line status */
856#define ATAPI_DASP 0x2 /* Device dasp to host line status */
857#define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */
858#define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */
859#define ATAPI_ADDR 0x70 /* ATAPI address line status */
860#define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */
861#define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */
862#define ATAPI_DIOWN 0x200 /* ATAPI write line status */
863#define ATAPI_DIORN 0x400 /* ATAPI read line status */
864#define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */
865
866/* Bit masks for ATAPI_SM_STATE */
867
868#define PIO_CSTATE 0xf /* PIO mode state machine current state */
869#define DMA_CSTATE 0xf0 /* DMA mode state machine current state */
870#define UDMAIN_CSTATE 0xf00 /* Ultra DMA-In mode state machine current state */
871#define UDMAOUT_CSTATE 0xf000 /* ATAPI IORDY line status */
872
873/* Bit masks for ATAPI_TERMINATE */
874
875#define ATAPI_HOST_TERM 0x1 /* Host terminationation */
876
877/* Bit masks for ATAPI_REG_TIM_0 */
878
879#define T2_REG 0xff /* End of cycle time for register access transfers */
880#define TEOC_REG 0xff00 /* Selects DIOR/DIOW pulsewidth */
881
882/* Bit masks for ATAPI_PIO_TIM_0 */
883
884#define T1_REG 0xf /* Time from address valid to DIOR/DIOW */
885#define T2_REG_PIO 0xff0 /* DIOR/DIOW pulsewidth */
886#define T4_REG 0xf000 /* DIOW data hold */
887
888/* Bit masks for ATAPI_PIO_TIM_1 */
889
890#define TEOC_REG_PIO 0xff /* End of cycle time for PIO access transfers. */
891
892/* Bit masks for ATAPI_MULTI_TIM_0 */
893
894#define TD 0xff /* DIOR/DIOW asserted pulsewidth */
895#define TM 0xff00 /* Time from address valid to DIOR/DIOW */
896
897/* Bit masks for ATAPI_MULTI_TIM_1 */
898
899#define TKW 0xff /* Selects DIOW negated pulsewidth */
900#define TKR 0xff00 /* Selects DIOR negated pulsewidth */
901
902/* Bit masks for ATAPI_MULTI_TIM_2 */
903
904#define TH 0xff /* Selects DIOW data hold */
905#define TEOC 0xff00 /* Selects end of cycle for DMA */
906
907/* Bit masks for ATAPI_ULTRA_TIM_0 */
908
909#define TACK 0xff /* Selects setup and hold times for TACK */
910#define TENV 0xff00 /* Selects envelope time */
911
912/* Bit masks for ATAPI_ULTRA_TIM_1 */
913
914#define TDVS 0xff /* Selects data valid setup time */
915#define TCYC_TDVS 0xff00 /* Selects cycle time - TDVS time */
916
917/* Bit masks for ATAPI_ULTRA_TIM_2 */
918
919#define TSS 0xff /* Selects time from STROBE edge to negation of DMARQ or assertion of STOP */
920#define TMLI 0xff00 /* Selects interlock time */
921
922/* Bit masks for ATAPI_ULTRA_TIM_3 */
923
924#define TZAH 0xff /* Selects minimum delay required for output */
925#define READY_PAUSE 0xff00 /* Selects ready to pause */
926
927/* Bit masks for TIMER_ENABLE1 */
928
929#define TIMEN8 0x1 /* Timer 8 Enable */
930#define TIMEN9 0x2 /* Timer 9 Enable */
931#define TIMEN10 0x4 /* Timer 10 Enable */
932
933/* Bit masks for TIMER_DISABLE1 */
934
935#define TIMDIS8 0x1 /* Timer 8 Disable */
936#define TIMDIS9 0x2 /* Timer 9 Disable */
937#define TIMDIS10 0x4 /* Timer 10 Disable */
938
939/* Bit masks for TIMER_STATUS1 */
940
941#define TIMIL8 0x1 /* Timer 8 Interrupt */
942#define TIMIL9 0x2 /* Timer 9 Interrupt */
943#define TIMIL10 0x4 /* Timer 10 Interrupt */
944#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
945#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
946#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
947#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
948#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
949#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
950
951/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
952
953/* Bit masks for USB_FADDR */
954
955#define FUNCTION_ADDRESS 0x7f /* Function address */
956
957/* Bit masks for USB_POWER */
958
959#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
960#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
961#define RESUME_MODE 0x4 /* DMA Mode */
962#define RESET 0x8 /* Reset indicator */
963#define HS_MODE 0x10 /* High Speed mode indicator */
964#define HS_ENABLE 0x20 /* high Speed Enable */
965#define SOFT_CONN 0x40 /* Soft connect */
966#define ISO_UPDATE 0x80 /* Isochronous update */
967
968/* Bit masks for USB_INTRTX */
969
970#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
971#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
972#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
973#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
974#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
975#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
976#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
977#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
978
979/* Bit masks for USB_INTRRX */
980
981#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
982#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
983#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
984#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
985#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
986#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
987#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
988
989/* Bit masks for USB_INTRTXE */
990
991#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
992#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
993#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
994#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
995#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
996#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
997#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
998#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
999
1000/* Bit masks for USB_INTRRXE */
1001
1002#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
1003#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
1004#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
1005#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
1006#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
1007#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
1008#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
1009
1010/* Bit masks for USB_INTRUSB */
1011
1012#define SUSPEND_B 0x1 /* Suspend indicator */
1013#define RESUME_B 0x2 /* Resume indicator */
1014#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
1015#define SOF_B 0x8 /* Start of frame */
1016#define CONN_B 0x10 /* Connection indicator */
1017#define DISCON_B 0x20 /* Disconnect indicator */
1018#define SESSION_REQ_B 0x40 /* Session Request */
1019#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
1020
1021/* Bit masks for USB_INTRUSBE */
1022
1023#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
1024#define RESUME_BE 0x2 /* Resume indicator int enable */
1025#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
1026#define SOF_BE 0x8 /* Start of frame int enable */
1027#define CONN_BE 0x10 /* Connection indicator int enable */
1028#define DISCON_BE 0x20 /* Disconnect indicator int enable */
1029#define SESSION_REQ_BE 0x40 /* Session Request int enable */
1030#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
1031
1032/* Bit masks for USB_FRAME */
1033
1034#define FRAME_NUMBER 0x7ff /* Frame number */
1035
1036/* Bit masks for USB_INDEX */
1037
1038#define SELECTED_ENDPOINT 0xf /* selected endpoint */
1039
1040/* Bit masks for USB_GLOBAL_CTL */
1041
1042#define GLOBAL_ENA 0x1 /* enables USB module */
1043#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
1044#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
1045#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
1046#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
1047#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
1048#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
1049#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
1050#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
1051#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
1052#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
1053#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
1054#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
1055#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
1056#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
1057
1058/* Bit masks for USB_OTG_DEV_CTL */
1059
1060#define SESSION 0x1 /* session indicator */
1061#define HOST_REQ 0x2 /* Host negotiation request */
1062#define HOST_MODE 0x4 /* indicates USBDRC is a host */
1063#define VBUS0 0x8 /* Vbus level indicator[0] */
1064#define VBUS1 0x10 /* Vbus level indicator[1] */
1065#define LSDEV 0x20 /* Low-speed indicator */
1066#define FSDEV 0x40 /* Full or High-speed indicator */
1067#define B_DEVICE 0x80 /* A' or 'B' device indicator */
1068
1069/* Bit masks for USB_OTG_VBUS_IRQ */
1070
1071#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
1072#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
1073#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
1074#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
1075#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
1076#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
1077
1078/* Bit masks for USB_OTG_VBUS_MASK */
1079
1080#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
1081#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
1082#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
1083#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
1084#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
1085#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
1086
1087/* Bit masks for USB_CSR0 */
1088
1089#define RXPKTRDY 0x1 /* data packet receive indicator */
1090#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
1091#define STALL_SENT 0x4 /* STALL handshake sent */
1092#define DATAEND 0x8 /* Data end indicator */
1093#define SETUPEND 0x10 /* Setup end */
1094#define SENDSTALL 0x20 /* Send STALL handshake */
1095#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
1096#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
1097#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
1098#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
1099#define SETUPPKT_H 0x8 /* send Setup token host mode */
1100#define ERROR_H 0x10 /* timeout error indicator host mode */
1101#define REQPKT_H 0x20 /* Request an IN transaction host mode */
1102#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
1103#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
1104
1105/* Bit masks for USB_COUNT0 */
1106
1107#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
1108
1109/* Bit masks for USB_NAKLIMIT0 */
1110
1111#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
1112
1113/* Bit masks for USB_TX_MAX_PACKET */
1114
1115#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
1116
1117/* Bit masks for USB_RX_MAX_PACKET */
1118
1119#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
1120
1121/* Bit masks for USB_TXCSR */
1122
1123#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
1124#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
1125#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
1126#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
1127#define STALL_SEND_T 0x10 /* issue a Stall handshake */
1128#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
1129#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
1130#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
1131#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
1132#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
1133#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
1134#define ISO_T 0x4000 /* enable Isochronous transfers */
1135#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
1136#define ERROR_TH 0x4 /* error condition host mode */
1137#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
1138#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
1139
1140/* Bit masks for USB_TXCOUNT */
1141
1142#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
1143
1144/* Bit masks for USB_RXCSR */
1145
1146#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
1147#define FIFO_FULL_R 0x2 /* FIFO not empty */
1148#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
1149#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
1150#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
1151#define STALL_SEND_R 0x20 /* issue a Stall handshake */
1152#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
1153#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
1154#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
1155#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
1156#define DISNYET_R 0x1000 /* disable Nyet handshakes */
1157#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
1158#define ISO_R 0x4000 /* enable Isochronous transfers */
1159#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
1160#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
1161#define REQPKT_RH 0x20 /* request an IN transaction host mode */
1162#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
1163#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
1164#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
1165#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
1166
1167/* Bit masks for USB_RXCOUNT */
1168
1169#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
1170
1171/* Bit masks for USB_TXTYPE */
1172
1173#define TARGET_EP_NO_T 0xf /* EP number */
1174#define PROTOCOL_T 0xc /* transfer type */
1175
1176/* Bit masks for USB_TXINTERVAL */
1177
1178#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
1179
1180/* Bit masks for USB_RXTYPE */
1181
1182#define TARGET_EP_NO_R 0xf /* EP number */
1183#define PROTOCOL_R 0xc /* transfer type */
1184
1185/* Bit masks for USB_RXINTERVAL */
1186
1187#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
1188
1189/* Bit masks for USB_DMA_INTERRUPT */
1190
1191#define DMA0_INT 0x1 /* DMA0 pending interrupt */
1192#define DMA1_INT 0x2 /* DMA1 pending interrupt */
1193#define DMA2_INT 0x4 /* DMA2 pending interrupt */
1194#define DMA3_INT 0x8 /* DMA3 pending interrupt */
1195#define DMA4_INT 0x10 /* DMA4 pending interrupt */
1196#define DMA5_INT 0x20 /* DMA5 pending interrupt */
1197#define DMA6_INT 0x40 /* DMA6 pending interrupt */
1198#define DMA7_INT 0x80 /* DMA7 pending interrupt */
1199
1200/* Bit masks for USB_DMAxCONTROL */
1201
1202#define DMA_ENA 0x1 /* DMA enable */
1203#define DIRECTION 0x2 /* direction of DMA transfer */
1204#define MODE 0x4 /* DMA Bus error */
1205#define INT_ENA 0x8 /* Interrupt enable */
1206#define EPNUM 0xf0 /* EP number */
1207#define BUSERROR 0x100 /* DMA Bus error */
1208
1209/* Bit masks for USB_DMAxADDRHIGH */
1210
1211#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
1212
1213/* Bit masks for USB_DMAxADDRLOW */
1214
1215#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
1216
1217/* Bit masks for USB_DMAxCOUNTHIGH */
1218
1219#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
1220
1221/* Bit masks for USB_DMAxCOUNTLOW */
1222
1223#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
1224
1225/* Bit masks for HMDMAx_CONTROL */
1226
1227#define HMDMAEN 0x1 /* Handshake MDMA Enable */
1228#define REP 0x2 /* Handshake MDMA Request Polarity */
1229#define UTE 0x8 /* Urgency Threshold Enable */
1230#define OIE 0x10 /* Overflow Interrupt Enable */
1231#define BDIE 0x20 /* Block Done Interrupt Enable */
1232#define MBDI 0x40 /* Mask Block Done Interrupt */
1233#define DRQ 0x300 /* Handshake MDMA Request Type */
1234#define RBC 0x1000 /* Force Reload of BCOUNT */
1235#define PS 0x2000 /* Pin Status */
1236#define OI 0x4000 /* Overflow Interrupt Generated */
1237#define BDI 0x8000 /* Block Done Interrupt Generated */
1238
1239/* ******************************************* */
1240/* MULTI BIT MACRO ENUMERATIONS */
1241/* ******************************************* */
1242
1243
1244#endif /* _DEF_BF548_H */
diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h
deleted file mode 100644
index 1d7c96edb038..000000000000
--- a/include/asm-blackfin/mach-bf548/defBF548.h
+++ /dev/null
@@ -1,1627 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/defBF548.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF548_H
32#define _DEF_BF548_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF548 */
38
39/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
40#include "defBF54x_base.h"
41
42/* The following are the #defines needed by ADSP-BF548 that are not in the common header */
43
44/* Timer Registers */
45
46#define TIMER8_CONFIG 0xffc00600 /* Timer 8 Configuration Register */
47#define TIMER8_COUNTER 0xffc00604 /* Timer 8 Counter Register */
48#define TIMER8_PERIOD 0xffc00608 /* Timer 8 Period Register */
49#define TIMER8_WIDTH 0xffc0060c /* Timer 8 Width Register */
50#define TIMER9_CONFIG 0xffc00610 /* Timer 9 Configuration Register */
51#define TIMER9_COUNTER 0xffc00614 /* Timer 9 Counter Register */
52#define TIMER9_PERIOD 0xffc00618 /* Timer 9 Period Register */
53#define TIMER9_WIDTH 0xffc0061c /* Timer 9 Width Register */
54#define TIMER10_CONFIG 0xffc00620 /* Timer 10 Configuration Register */
55#define TIMER10_COUNTER 0xffc00624 /* Timer 10 Counter Register */
56#define TIMER10_PERIOD 0xffc00628 /* Timer 10 Period Register */
57#define TIMER10_WIDTH 0xffc0062c /* Timer 10 Width Register */
58
59/* Timer Group of 3 Registers */
60
61#define TIMER_ENABLE1 0xffc00640 /* Timer Group of 3 Enable Register */
62#define TIMER_DISABLE1 0xffc00644 /* Timer Group of 3 Disable Register */
63#define TIMER_STATUS1 0xffc00648 /* Timer Group of 3 Status Register */
64
65/* SPORT0 Registers */
66
67#define SPORT0_TCR1 0xffc00800 /* SPORT0 Transmit Configuration 1 Register */
68#define SPORT0_TCR2 0xffc00804 /* SPORT0 Transmit Configuration 2 Register */
69#define SPORT0_TCLKDIV 0xffc00808 /* SPORT0 Transmit Serial Clock Divider Register */
70#define SPORT0_TFSDIV 0xffc0080c /* SPORT0 Transmit Frame Sync Divider Register */
71#define SPORT0_TX 0xffc00810 /* SPORT0 Transmit Data Register */
72#define SPORT0_RX 0xffc00818 /* SPORT0 Receive Data Register */
73#define SPORT0_RCR1 0xffc00820 /* SPORT0 Receive Configuration 1 Register */
74#define SPORT0_RCR2 0xffc00824 /* SPORT0 Receive Configuration 2 Register */
75#define SPORT0_RCLKDIV 0xffc00828 /* SPORT0 Receive Serial Clock Divider Register */
76#define SPORT0_RFSDIV 0xffc0082c /* SPORT0 Receive Frame Sync Divider Register */
77#define SPORT0_STAT 0xffc00830 /* SPORT0 Status Register */
78#define SPORT0_CHNL 0xffc00834 /* SPORT0 Current Channel Register */
79#define SPORT0_MCMC1 0xffc00838 /* SPORT0 Multi channel Configuration Register 1 */
80#define SPORT0_MCMC2 0xffc0083c /* SPORT0 Multi channel Configuration Register 2 */
81#define SPORT0_MTCS0 0xffc00840 /* SPORT0 Multi channel Transmit Select Register 0 */
82#define SPORT0_MTCS1 0xffc00844 /* SPORT0 Multi channel Transmit Select Register 1 */
83#define SPORT0_MTCS2 0xffc00848 /* SPORT0 Multi channel Transmit Select Register 2 */
84#define SPORT0_MTCS3 0xffc0084c /* SPORT0 Multi channel Transmit Select Register 3 */
85#define SPORT0_MRCS0 0xffc00850 /* SPORT0 Multi channel Receive Select Register 0 */
86#define SPORT0_MRCS1 0xffc00854 /* SPORT0 Multi channel Receive Select Register 1 */
87#define SPORT0_MRCS2 0xffc00858 /* SPORT0 Multi channel Receive Select Register 2 */
88#define SPORT0_MRCS3 0xffc0085c /* SPORT0 Multi channel Receive Select Register 3 */
89
90/* EPPI0 Registers */
91
92#define EPPI0_STATUS 0xffc01000 /* EPPI0 Status Register */
93#define EPPI0_HCOUNT 0xffc01004 /* EPPI0 Horizontal Transfer Count Register */
94#define EPPI0_HDELAY 0xffc01008 /* EPPI0 Horizontal Delay Count Register */
95#define EPPI0_VCOUNT 0xffc0100c /* EPPI0 Vertical Transfer Count Register */
96#define EPPI0_VDELAY 0xffc01010 /* EPPI0 Vertical Delay Count Register */
97#define EPPI0_FRAME 0xffc01014 /* EPPI0 Lines per Frame Register */
98#define EPPI0_LINE 0xffc01018 /* EPPI0 Samples per Line Register */
99#define EPPI0_CLKDIV 0xffc0101c /* EPPI0 Clock Divide Register */
100#define EPPI0_CONTROL 0xffc01020 /* EPPI0 Control Register */
101#define EPPI0_FS1W_HBL 0xffc01024 /* EPPI0 FS1 Width Register / EPPI0 Horizontal Blanking Samples Per Line Register */
102#define EPPI0_FS1P_AVPL 0xffc01028 /* EPPI0 FS1 Period Register / EPPI0 Active Video Samples Per Line Register */
103#define EPPI0_FS2W_LVB 0xffc0102c /* EPPI0 FS2 Width Register / EPPI0 Lines of Vertical Blanking Register */
104#define EPPI0_FS2P_LAVF 0xffc01030 /* EPPI0 FS2 Period Register/ EPPI0 Lines of Active Video Per Field Register */
105#define EPPI0_CLIP 0xffc01034 /* EPPI0 Clipping Register */
106
107/* UART2 Registers */
108
109#define UART2_DLL 0xffc02100 /* Divisor Latch Low Byte */
110#define UART2_DLH 0xffc02104 /* Divisor Latch High Byte */
111#define UART2_GCTL 0xffc02108 /* Global Control Register */
112#define UART2_LCR 0xffc0210c /* Line Control Register */
113#define UART2_MCR 0xffc02110 /* Modem Control Register */
114#define UART2_LSR 0xffc02114 /* Line Status Register */
115#define UART2_MSR 0xffc02118 /* Modem Status Register */
116#define UART2_SCR 0xffc0211c /* Scratch Register */
117#define UART2_IER_SET 0xffc02120 /* Interrupt Enable Register Set */
118#define UART2_IER_CLEAR 0xffc02124 /* Interrupt Enable Register Clear */
119#define UART2_RBR 0xffc0212c /* Receive Buffer Register */
120
121/* Two Wire Interface Registers (TWI1) */
122
123#define TWI1_REGBASE 0xffc02200
124#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
125#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
126#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
127#define TWI1_SLAVE_STAT 0xffc0220c /* TWI Slave Mode Status Register */
128#define TWI1_SLAVE_ADDR 0xffc02210 /* TWI Slave Mode Address Register */
129#define TWI1_MASTER_CTRL 0xffc02214 /* TWI Master Mode Control Register */
130#define TWI1_MASTER_STAT 0xffc02218 /* TWI Master Mode Status Register */
131#define TWI1_MASTER_ADDR 0xffc0221c /* TWI Master Mode Address Register */
132#define TWI1_INT_STAT 0xffc02220 /* TWI Interrupt Status Register */
133#define TWI1_INT_MASK 0xffc02224 /* TWI Interrupt Mask Register */
134#define TWI1_FIFO_CTRL 0xffc02228 /* TWI FIFO Control Register */
135#define TWI1_FIFO_STAT 0xffc0222c /* TWI FIFO Status Register */
136#define TWI1_XMT_DATA8 0xffc02280 /* TWI FIFO Transmit Data Single Byte Register */
137#define TWI1_XMT_DATA16 0xffc02284 /* TWI FIFO Transmit Data Double Byte Register */
138#define TWI1_RCV_DATA8 0xffc02288 /* TWI FIFO Receive Data Single Byte Register */
139#define TWI1_RCV_DATA16 0xffc0228c /* TWI FIFO Receive Data Double Byte Register */
140
141/* SPI2 Registers */
142
143#define SPI2_REGBASE 0xffc02400
144#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
145#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
146#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
147#define SPI2_TDBR 0xffc0240c /* SPI2 Transmit Data Buffer Register */
148#define SPI2_RDBR 0xffc02410 /* SPI2 Receive Data Buffer Register */
149#define SPI2_BAUD 0xffc02414 /* SPI2 Baud Rate Register */
150#define SPI2_SHADOW 0xffc02418 /* SPI2 Receive Data Buffer Shadow Register */
151
152/* CAN Controller 1 Config 1 Registers */
153
154#define CAN1_MC1 0xffc03200 /* CAN Controller 1 Mailbox Configuration Register 1 */
155#define CAN1_MD1 0xffc03204 /* CAN Controller 1 Mailbox Direction Register 1 */
156#define CAN1_TRS1 0xffc03208 /* CAN Controller 1 Transmit Request Set Register 1 */
157#define CAN1_TRR1 0xffc0320c /* CAN Controller 1 Transmit Request Reset Register 1 */
158#define CAN1_TA1 0xffc03210 /* CAN Controller 1 Transmit Acknowledge Register 1 */
159#define CAN1_AA1 0xffc03214 /* CAN Controller 1 Abort Acknowledge Register 1 */
160#define CAN1_RMP1 0xffc03218 /* CAN Controller 1 Receive Message Pending Register 1 */
161#define CAN1_RML1 0xffc0321c /* CAN Controller 1 Receive Message Lost Register 1 */
162#define CAN1_MBTIF1 0xffc03220 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 1 */
163#define CAN1_MBRIF1 0xffc03224 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 1 */
164#define CAN1_MBIM1 0xffc03228 /* CAN Controller 1 Mailbox Interrupt Mask Register 1 */
165#define CAN1_RFH1 0xffc0322c /* CAN Controller 1 Remote Frame Handling Enable Register 1 */
166#define CAN1_OPSS1 0xffc03230 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 1 */
167
168/* CAN Controller 1 Config 2 Registers */
169
170#define CAN1_MC2 0xffc03240 /* CAN Controller 1 Mailbox Configuration Register 2 */
171#define CAN1_MD2 0xffc03244 /* CAN Controller 1 Mailbox Direction Register 2 */
172#define CAN1_TRS2 0xffc03248 /* CAN Controller 1 Transmit Request Set Register 2 */
173#define CAN1_TRR2 0xffc0324c /* CAN Controller 1 Transmit Request Reset Register 2 */
174#define CAN1_TA2 0xffc03250 /* CAN Controller 1 Transmit Acknowledge Register 2 */
175#define CAN1_AA2 0xffc03254 /* CAN Controller 1 Abort Acknowledge Register 2 */
176#define CAN1_RMP2 0xffc03258 /* CAN Controller 1 Receive Message Pending Register 2 */
177#define CAN1_RML2 0xffc0325c /* CAN Controller 1 Receive Message Lost Register 2 */
178#define CAN1_MBTIF2 0xffc03260 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 2 */
179#define CAN1_MBRIF2 0xffc03264 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 2 */
180#define CAN1_MBIM2 0xffc03268 /* CAN Controller 1 Mailbox Interrupt Mask Register 2 */
181#define CAN1_RFH2 0xffc0326c /* CAN Controller 1 Remote Frame Handling Enable Register 2 */
182#define CAN1_OPSS2 0xffc03270 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 2 */
183
184/* CAN Controller 1 Clock/Interrupt/Counter Registers */
185
186#define CAN1_CLOCK 0xffc03280 /* CAN Controller 1 Clock Register */
187#define CAN1_TIMING 0xffc03284 /* CAN Controller 1 Timing Register */
188#define CAN1_DEBUG 0xffc03288 /* CAN Controller 1 Debug Register */
189#define CAN1_STATUS 0xffc0328c /* CAN Controller 1 Global Status Register */
190#define CAN1_CEC 0xffc03290 /* CAN Controller 1 Error Counter Register */
191#define CAN1_GIS 0xffc03294 /* CAN Controller 1 Global Interrupt Status Register */
192#define CAN1_GIM 0xffc03298 /* CAN Controller 1 Global Interrupt Mask Register */
193#define CAN1_GIF 0xffc0329c /* CAN Controller 1 Global Interrupt Flag Register */
194#define CAN1_CONTROL 0xffc032a0 /* CAN Controller 1 Master Control Register */
195#define CAN1_INTR 0xffc032a4 /* CAN Controller 1 Interrupt Pending Register */
196#define CAN1_MBTD 0xffc032ac /* CAN Controller 1 Mailbox Temporary Disable Register */
197#define CAN1_EWR 0xffc032b0 /* CAN Controller 1 Programmable Warning Level Register */
198#define CAN1_ESR 0xffc032b4 /* CAN Controller 1 Error Status Register */
199#define CAN1_UCCNT 0xffc032c4 /* CAN Controller 1 Universal Counter Register */
200#define CAN1_UCRC 0xffc032c8 /* CAN Controller 1 Universal Counter Force Reload Register */
201#define CAN1_UCCNF 0xffc032cc /* CAN Controller 1 Universal Counter Configuration Register */
202
203/* CAN Controller 1 Mailbox Acceptance Registers */
204
205#define CAN1_AM00L 0xffc03300 /* CAN Controller 1 Mailbox 0 Acceptance Mask High Register */
206#define CAN1_AM00H 0xffc03304 /* CAN Controller 1 Mailbox 0 Acceptance Mask Low Register */
207#define CAN1_AM01L 0xffc03308 /* CAN Controller 1 Mailbox 1 Acceptance Mask High Register */
208#define CAN1_AM01H 0xffc0330c /* CAN Controller 1 Mailbox 1 Acceptance Mask Low Register */
209#define CAN1_AM02L 0xffc03310 /* CAN Controller 1 Mailbox 2 Acceptance Mask High Register */
210#define CAN1_AM02H 0xffc03314 /* CAN Controller 1 Mailbox 2 Acceptance Mask Low Register */
211#define CAN1_AM03L 0xffc03318 /* CAN Controller 1 Mailbox 3 Acceptance Mask High Register */
212#define CAN1_AM03H 0xffc0331c /* CAN Controller 1 Mailbox 3 Acceptance Mask Low Register */
213#define CAN1_AM04L 0xffc03320 /* CAN Controller 1 Mailbox 4 Acceptance Mask High Register */
214#define CAN1_AM04H 0xffc03324 /* CAN Controller 1 Mailbox 4 Acceptance Mask Low Register */
215#define CAN1_AM05L 0xffc03328 /* CAN Controller 1 Mailbox 5 Acceptance Mask High Register */
216#define CAN1_AM05H 0xffc0332c /* CAN Controller 1 Mailbox 5 Acceptance Mask Low Register */
217#define CAN1_AM06L 0xffc03330 /* CAN Controller 1 Mailbox 6 Acceptance Mask High Register */
218#define CAN1_AM06H 0xffc03334 /* CAN Controller 1 Mailbox 6 Acceptance Mask Low Register */
219#define CAN1_AM07L 0xffc03338 /* CAN Controller 1 Mailbox 7 Acceptance Mask High Register */
220#define CAN1_AM07H 0xffc0333c /* CAN Controller 1 Mailbox 7 Acceptance Mask Low Register */
221#define CAN1_AM08L 0xffc03340 /* CAN Controller 1 Mailbox 8 Acceptance Mask High Register */
222#define CAN1_AM08H 0xffc03344 /* CAN Controller 1 Mailbox 8 Acceptance Mask Low Register */
223#define CAN1_AM09L 0xffc03348 /* CAN Controller 1 Mailbox 9 Acceptance Mask High Register */
224#define CAN1_AM09H 0xffc0334c /* CAN Controller 1 Mailbox 9 Acceptance Mask Low Register */
225#define CAN1_AM10L 0xffc03350 /* CAN Controller 1 Mailbox 10 Acceptance Mask High Register */
226#define CAN1_AM10H 0xffc03354 /* CAN Controller 1 Mailbox 10 Acceptance Mask Low Register */
227#define CAN1_AM11L 0xffc03358 /* CAN Controller 1 Mailbox 11 Acceptance Mask High Register */
228#define CAN1_AM11H 0xffc0335c /* CAN Controller 1 Mailbox 11 Acceptance Mask Low Register */
229#define CAN1_AM12L 0xffc03360 /* CAN Controller 1 Mailbox 12 Acceptance Mask High Register */
230#define CAN1_AM12H 0xffc03364 /* CAN Controller 1 Mailbox 12 Acceptance Mask Low Register */
231#define CAN1_AM13L 0xffc03368 /* CAN Controller 1 Mailbox 13 Acceptance Mask High Register */
232#define CAN1_AM13H 0xffc0336c /* CAN Controller 1 Mailbox 13 Acceptance Mask Low Register */
233#define CAN1_AM14L 0xffc03370 /* CAN Controller 1 Mailbox 14 Acceptance Mask High Register */
234#define CAN1_AM14H 0xffc03374 /* CAN Controller 1 Mailbox 14 Acceptance Mask Low Register */
235#define CAN1_AM15L 0xffc03378 /* CAN Controller 1 Mailbox 15 Acceptance Mask High Register */
236#define CAN1_AM15H 0xffc0337c /* CAN Controller 1 Mailbox 15 Acceptance Mask Low Register */
237
238/* CAN Controller 1 Mailbox Acceptance Registers */
239
240#define CAN1_AM16L 0xffc03380 /* CAN Controller 1 Mailbox 16 Acceptance Mask High Register */
241#define CAN1_AM16H 0xffc03384 /* CAN Controller 1 Mailbox 16 Acceptance Mask Low Register */
242#define CAN1_AM17L 0xffc03388 /* CAN Controller 1 Mailbox 17 Acceptance Mask High Register */
243#define CAN1_AM17H 0xffc0338c /* CAN Controller 1 Mailbox 17 Acceptance Mask Low Register */
244#define CAN1_AM18L 0xffc03390 /* CAN Controller 1 Mailbox 18 Acceptance Mask High Register */
245#define CAN1_AM18H 0xffc03394 /* CAN Controller 1 Mailbox 18 Acceptance Mask Low Register */
246#define CAN1_AM19L 0xffc03398 /* CAN Controller 1 Mailbox 19 Acceptance Mask High Register */
247#define CAN1_AM19H 0xffc0339c /* CAN Controller 1 Mailbox 19 Acceptance Mask Low Register */
248#define CAN1_AM20L 0xffc033a0 /* CAN Controller 1 Mailbox 20 Acceptance Mask High Register */
249#define CAN1_AM20H 0xffc033a4 /* CAN Controller 1 Mailbox 20 Acceptance Mask Low Register */
250#define CAN1_AM21L 0xffc033a8 /* CAN Controller 1 Mailbox 21 Acceptance Mask High Register */
251#define CAN1_AM21H 0xffc033ac /* CAN Controller 1 Mailbox 21 Acceptance Mask Low Register */
252#define CAN1_AM22L 0xffc033b0 /* CAN Controller 1 Mailbox 22 Acceptance Mask High Register */
253#define CAN1_AM22H 0xffc033b4 /* CAN Controller 1 Mailbox 22 Acceptance Mask Low Register */
254#define CAN1_AM23L 0xffc033b8 /* CAN Controller 1 Mailbox 23 Acceptance Mask High Register */
255#define CAN1_AM23H 0xffc033bc /* CAN Controller 1 Mailbox 23 Acceptance Mask Low Register */
256#define CAN1_AM24L 0xffc033c0 /* CAN Controller 1 Mailbox 24 Acceptance Mask High Register */
257#define CAN1_AM24H 0xffc033c4 /* CAN Controller 1 Mailbox 24 Acceptance Mask Low Register */
258#define CAN1_AM25L 0xffc033c8 /* CAN Controller 1 Mailbox 25 Acceptance Mask High Register */
259#define CAN1_AM25H 0xffc033cc /* CAN Controller 1 Mailbox 25 Acceptance Mask Low Register */
260#define CAN1_AM26L 0xffc033d0 /* CAN Controller 1 Mailbox 26 Acceptance Mask High Register */
261#define CAN1_AM26H 0xffc033d4 /* CAN Controller 1 Mailbox 26 Acceptance Mask Low Register */
262#define CAN1_AM27L 0xffc033d8 /* CAN Controller 1 Mailbox 27 Acceptance Mask High Register */
263#define CAN1_AM27H 0xffc033dc /* CAN Controller 1 Mailbox 27 Acceptance Mask Low Register */
264#define CAN1_AM28L 0xffc033e0 /* CAN Controller 1 Mailbox 28 Acceptance Mask High Register */
265#define CAN1_AM28H 0xffc033e4 /* CAN Controller 1 Mailbox 28 Acceptance Mask Low Register */
266#define CAN1_AM29L 0xffc033e8 /* CAN Controller 1 Mailbox 29 Acceptance Mask High Register */
267#define CAN1_AM29H 0xffc033ec /* CAN Controller 1 Mailbox 29 Acceptance Mask Low Register */
268#define CAN1_AM30L 0xffc033f0 /* CAN Controller 1 Mailbox 30 Acceptance Mask High Register */
269#define CAN1_AM30H 0xffc033f4 /* CAN Controller 1 Mailbox 30 Acceptance Mask Low Register */
270#define CAN1_AM31L 0xffc033f8 /* CAN Controller 1 Mailbox 31 Acceptance Mask High Register */
271#define CAN1_AM31H 0xffc033fc /* CAN Controller 1 Mailbox 31 Acceptance Mask Low Register */
272
273/* CAN Controller 1 Mailbox Data Registers */
274
275#define CAN1_MB00_DATA0 0xffc03400 /* CAN Controller 1 Mailbox 0 Data 0 Register */
276#define CAN1_MB00_DATA1 0xffc03404 /* CAN Controller 1 Mailbox 0 Data 1 Register */
277#define CAN1_MB00_DATA2 0xffc03408 /* CAN Controller 1 Mailbox 0 Data 2 Register */
278#define CAN1_MB00_DATA3 0xffc0340c /* CAN Controller 1 Mailbox 0 Data 3 Register */
279#define CAN1_MB00_LENGTH 0xffc03410 /* CAN Controller 1 Mailbox 0 Length Register */
280#define CAN1_MB00_TIMESTAMP 0xffc03414 /* CAN Controller 1 Mailbox 0 Timestamp Register */
281#define CAN1_MB00_ID0 0xffc03418 /* CAN Controller 1 Mailbox 0 ID0 Register */
282#define CAN1_MB00_ID1 0xffc0341c /* CAN Controller 1 Mailbox 0 ID1 Register */
283#define CAN1_MB01_DATA0 0xffc03420 /* CAN Controller 1 Mailbox 1 Data 0 Register */
284#define CAN1_MB01_DATA1 0xffc03424 /* CAN Controller 1 Mailbox 1 Data 1 Register */
285#define CAN1_MB01_DATA2 0xffc03428 /* CAN Controller 1 Mailbox 1 Data 2 Register */
286#define CAN1_MB01_DATA3 0xffc0342c /* CAN Controller 1 Mailbox 1 Data 3 Register */
287#define CAN1_MB01_LENGTH 0xffc03430 /* CAN Controller 1 Mailbox 1 Length Register */
288#define CAN1_MB01_TIMESTAMP 0xffc03434 /* CAN Controller 1 Mailbox 1 Timestamp Register */
289#define CAN1_MB01_ID0 0xffc03438 /* CAN Controller 1 Mailbox 1 ID0 Register */
290#define CAN1_MB01_ID1 0xffc0343c /* CAN Controller 1 Mailbox 1 ID1 Register */
291#define CAN1_MB02_DATA0 0xffc03440 /* CAN Controller 1 Mailbox 2 Data 0 Register */
292#define CAN1_MB02_DATA1 0xffc03444 /* CAN Controller 1 Mailbox 2 Data 1 Register */
293#define CAN1_MB02_DATA2 0xffc03448 /* CAN Controller 1 Mailbox 2 Data 2 Register */
294#define CAN1_MB02_DATA3 0xffc0344c /* CAN Controller 1 Mailbox 2 Data 3 Register */
295#define CAN1_MB02_LENGTH 0xffc03450 /* CAN Controller 1 Mailbox 2 Length Register */
296#define CAN1_MB02_TIMESTAMP 0xffc03454 /* CAN Controller 1 Mailbox 2 Timestamp Register */
297#define CAN1_MB02_ID0 0xffc03458 /* CAN Controller 1 Mailbox 2 ID0 Register */
298#define CAN1_MB02_ID1 0xffc0345c /* CAN Controller 1 Mailbox 2 ID1 Register */
299#define CAN1_MB03_DATA0 0xffc03460 /* CAN Controller 1 Mailbox 3 Data 0 Register */
300#define CAN1_MB03_DATA1 0xffc03464 /* CAN Controller 1 Mailbox 3 Data 1 Register */
301#define CAN1_MB03_DATA2 0xffc03468 /* CAN Controller 1 Mailbox 3 Data 2 Register */
302#define CAN1_MB03_DATA3 0xffc0346c /* CAN Controller 1 Mailbox 3 Data 3 Register */
303#define CAN1_MB03_LENGTH 0xffc03470 /* CAN Controller 1 Mailbox 3 Length Register */
304#define CAN1_MB03_TIMESTAMP 0xffc03474 /* CAN Controller 1 Mailbox 3 Timestamp Register */
305#define CAN1_MB03_ID0 0xffc03478 /* CAN Controller 1 Mailbox 3 ID0 Register */
306#define CAN1_MB03_ID1 0xffc0347c /* CAN Controller 1 Mailbox 3 ID1 Register */
307#define CAN1_MB04_DATA0 0xffc03480 /* CAN Controller 1 Mailbox 4 Data 0 Register */
308#define CAN1_MB04_DATA1 0xffc03484 /* CAN Controller 1 Mailbox 4 Data 1 Register */
309#define CAN1_MB04_DATA2 0xffc03488 /* CAN Controller 1 Mailbox 4 Data 2 Register */
310#define CAN1_MB04_DATA3 0xffc0348c /* CAN Controller 1 Mailbox 4 Data 3 Register */
311#define CAN1_MB04_LENGTH 0xffc03490 /* CAN Controller 1 Mailbox 4 Length Register */
312#define CAN1_MB04_TIMESTAMP 0xffc03494 /* CAN Controller 1 Mailbox 4 Timestamp Register */
313#define CAN1_MB04_ID0 0xffc03498 /* CAN Controller 1 Mailbox 4 ID0 Register */
314#define CAN1_MB04_ID1 0xffc0349c /* CAN Controller 1 Mailbox 4 ID1 Register */
315#define CAN1_MB05_DATA0 0xffc034a0 /* CAN Controller 1 Mailbox 5 Data 0 Register */
316#define CAN1_MB05_DATA1 0xffc034a4 /* CAN Controller 1 Mailbox 5 Data 1 Register */
317#define CAN1_MB05_DATA2 0xffc034a8 /* CAN Controller 1 Mailbox 5 Data 2 Register */
318#define CAN1_MB05_DATA3 0xffc034ac /* CAN Controller 1 Mailbox 5 Data 3 Register */
319#define CAN1_MB05_LENGTH 0xffc034b0 /* CAN Controller 1 Mailbox 5 Length Register */
320#define CAN1_MB05_TIMESTAMP 0xffc034b4 /* CAN Controller 1 Mailbox 5 Timestamp Register */
321#define CAN1_MB05_ID0 0xffc034b8 /* CAN Controller 1 Mailbox 5 ID0 Register */
322#define CAN1_MB05_ID1 0xffc034bc /* CAN Controller 1 Mailbox 5 ID1 Register */
323#define CAN1_MB06_DATA0 0xffc034c0 /* CAN Controller 1 Mailbox 6 Data 0 Register */
324#define CAN1_MB06_DATA1 0xffc034c4 /* CAN Controller 1 Mailbox 6 Data 1 Register */
325#define CAN1_MB06_DATA2 0xffc034c8 /* CAN Controller 1 Mailbox 6 Data 2 Register */
326#define CAN1_MB06_DATA3 0xffc034cc /* CAN Controller 1 Mailbox 6 Data 3 Register */
327#define CAN1_MB06_LENGTH 0xffc034d0 /* CAN Controller 1 Mailbox 6 Length Register */
328#define CAN1_MB06_TIMESTAMP 0xffc034d4 /* CAN Controller 1 Mailbox 6 Timestamp Register */
329#define CAN1_MB06_ID0 0xffc034d8 /* CAN Controller 1 Mailbox 6 ID0 Register */
330#define CAN1_MB06_ID1 0xffc034dc /* CAN Controller 1 Mailbox 6 ID1 Register */
331#define CAN1_MB07_DATA0 0xffc034e0 /* CAN Controller 1 Mailbox 7 Data 0 Register */
332#define CAN1_MB07_DATA1 0xffc034e4 /* CAN Controller 1 Mailbox 7 Data 1 Register */
333#define CAN1_MB07_DATA2 0xffc034e8 /* CAN Controller 1 Mailbox 7 Data 2 Register */
334#define CAN1_MB07_DATA3 0xffc034ec /* CAN Controller 1 Mailbox 7 Data 3 Register */
335#define CAN1_MB07_LENGTH 0xffc034f0 /* CAN Controller 1 Mailbox 7 Length Register */
336#define CAN1_MB07_TIMESTAMP 0xffc034f4 /* CAN Controller 1 Mailbox 7 Timestamp Register */
337#define CAN1_MB07_ID0 0xffc034f8 /* CAN Controller 1 Mailbox 7 ID0 Register */
338#define CAN1_MB07_ID1 0xffc034fc /* CAN Controller 1 Mailbox 7 ID1 Register */
339#define CAN1_MB08_DATA0 0xffc03500 /* CAN Controller 1 Mailbox 8 Data 0 Register */
340#define CAN1_MB08_DATA1 0xffc03504 /* CAN Controller 1 Mailbox 8 Data 1 Register */
341#define CAN1_MB08_DATA2 0xffc03508 /* CAN Controller 1 Mailbox 8 Data 2 Register */
342#define CAN1_MB08_DATA3 0xffc0350c /* CAN Controller 1 Mailbox 8 Data 3 Register */
343#define CAN1_MB08_LENGTH 0xffc03510 /* CAN Controller 1 Mailbox 8 Length Register */
344#define CAN1_MB08_TIMESTAMP 0xffc03514 /* CAN Controller 1 Mailbox 8 Timestamp Register */
345#define CAN1_MB08_ID0 0xffc03518 /* CAN Controller 1 Mailbox 8 ID0 Register */
346#define CAN1_MB08_ID1 0xffc0351c /* CAN Controller 1 Mailbox 8 ID1 Register */
347#define CAN1_MB09_DATA0 0xffc03520 /* CAN Controller 1 Mailbox 9 Data 0 Register */
348#define CAN1_MB09_DATA1 0xffc03524 /* CAN Controller 1 Mailbox 9 Data 1 Register */
349#define CAN1_MB09_DATA2 0xffc03528 /* CAN Controller 1 Mailbox 9 Data 2 Register */
350#define CAN1_MB09_DATA3 0xffc0352c /* CAN Controller 1 Mailbox 9 Data 3 Register */
351#define CAN1_MB09_LENGTH 0xffc03530 /* CAN Controller 1 Mailbox 9 Length Register */
352#define CAN1_MB09_TIMESTAMP 0xffc03534 /* CAN Controller 1 Mailbox 9 Timestamp Register */
353#define CAN1_MB09_ID0 0xffc03538 /* CAN Controller 1 Mailbox 9 ID0 Register */
354#define CAN1_MB09_ID1 0xffc0353c /* CAN Controller 1 Mailbox 9 ID1 Register */
355#define CAN1_MB10_DATA0 0xffc03540 /* CAN Controller 1 Mailbox 10 Data 0 Register */
356#define CAN1_MB10_DATA1 0xffc03544 /* CAN Controller 1 Mailbox 10 Data 1 Register */
357#define CAN1_MB10_DATA2 0xffc03548 /* CAN Controller 1 Mailbox 10 Data 2 Register */
358#define CAN1_MB10_DATA3 0xffc0354c /* CAN Controller 1 Mailbox 10 Data 3 Register */
359#define CAN1_MB10_LENGTH 0xffc03550 /* CAN Controller 1 Mailbox 10 Length Register */
360#define CAN1_MB10_TIMESTAMP 0xffc03554 /* CAN Controller 1 Mailbox 10 Timestamp Register */
361#define CAN1_MB10_ID0 0xffc03558 /* CAN Controller 1 Mailbox 10 ID0 Register */
362#define CAN1_MB10_ID1 0xffc0355c /* CAN Controller 1 Mailbox 10 ID1 Register */
363#define CAN1_MB11_DATA0 0xffc03560 /* CAN Controller 1 Mailbox 11 Data 0 Register */
364#define CAN1_MB11_DATA1 0xffc03564 /* CAN Controller 1 Mailbox 11 Data 1 Register */
365#define CAN1_MB11_DATA2 0xffc03568 /* CAN Controller 1 Mailbox 11 Data 2 Register */
366#define CAN1_MB11_DATA3 0xffc0356c /* CAN Controller 1 Mailbox 11 Data 3 Register */
367#define CAN1_MB11_LENGTH 0xffc03570 /* CAN Controller 1 Mailbox 11 Length Register */
368#define CAN1_MB11_TIMESTAMP 0xffc03574 /* CAN Controller 1 Mailbox 11 Timestamp Register */
369#define CAN1_MB11_ID0 0xffc03578 /* CAN Controller 1 Mailbox 11 ID0 Register */
370#define CAN1_MB11_ID1 0xffc0357c /* CAN Controller 1 Mailbox 11 ID1 Register */
371#define CAN1_MB12_DATA0 0xffc03580 /* CAN Controller 1 Mailbox 12 Data 0 Register */
372#define CAN1_MB12_DATA1 0xffc03584 /* CAN Controller 1 Mailbox 12 Data 1 Register */
373#define CAN1_MB12_DATA2 0xffc03588 /* CAN Controller 1 Mailbox 12 Data 2 Register */
374#define CAN1_MB12_DATA3 0xffc0358c /* CAN Controller 1 Mailbox 12 Data 3 Register */
375#define CAN1_MB12_LENGTH 0xffc03590 /* CAN Controller 1 Mailbox 12 Length Register */
376#define CAN1_MB12_TIMESTAMP 0xffc03594 /* CAN Controller 1 Mailbox 12 Timestamp Register */
377#define CAN1_MB12_ID0 0xffc03598 /* CAN Controller 1 Mailbox 12 ID0 Register */
378#define CAN1_MB12_ID1 0xffc0359c /* CAN Controller 1 Mailbox 12 ID1 Register */
379#define CAN1_MB13_DATA0 0xffc035a0 /* CAN Controller 1 Mailbox 13 Data 0 Register */
380#define CAN1_MB13_DATA1 0xffc035a4 /* CAN Controller 1 Mailbox 13 Data 1 Register */
381#define CAN1_MB13_DATA2 0xffc035a8 /* CAN Controller 1 Mailbox 13 Data 2 Register */
382#define CAN1_MB13_DATA3 0xffc035ac /* CAN Controller 1 Mailbox 13 Data 3 Register */
383#define CAN1_MB13_LENGTH 0xffc035b0 /* CAN Controller 1 Mailbox 13 Length Register */
384#define CAN1_MB13_TIMESTAMP 0xffc035b4 /* CAN Controller 1 Mailbox 13 Timestamp Register */
385#define CAN1_MB13_ID0 0xffc035b8 /* CAN Controller 1 Mailbox 13 ID0 Register */
386#define CAN1_MB13_ID1 0xffc035bc /* CAN Controller 1 Mailbox 13 ID1 Register */
387#define CAN1_MB14_DATA0 0xffc035c0 /* CAN Controller 1 Mailbox 14 Data 0 Register */
388#define CAN1_MB14_DATA1 0xffc035c4 /* CAN Controller 1 Mailbox 14 Data 1 Register */
389#define CAN1_MB14_DATA2 0xffc035c8 /* CAN Controller 1 Mailbox 14 Data 2 Register */
390#define CAN1_MB14_DATA3 0xffc035cc /* CAN Controller 1 Mailbox 14 Data 3 Register */
391#define CAN1_MB14_LENGTH 0xffc035d0 /* CAN Controller 1 Mailbox 14 Length Register */
392#define CAN1_MB14_TIMESTAMP 0xffc035d4 /* CAN Controller 1 Mailbox 14 Timestamp Register */
393#define CAN1_MB14_ID0 0xffc035d8 /* CAN Controller 1 Mailbox 14 ID0 Register */
394#define CAN1_MB14_ID1 0xffc035dc /* CAN Controller 1 Mailbox 14 ID1 Register */
395#define CAN1_MB15_DATA0 0xffc035e0 /* CAN Controller 1 Mailbox 15 Data 0 Register */
396#define CAN1_MB15_DATA1 0xffc035e4 /* CAN Controller 1 Mailbox 15 Data 1 Register */
397#define CAN1_MB15_DATA2 0xffc035e8 /* CAN Controller 1 Mailbox 15 Data 2 Register */
398#define CAN1_MB15_DATA3 0xffc035ec /* CAN Controller 1 Mailbox 15 Data 3 Register */
399#define CAN1_MB15_LENGTH 0xffc035f0 /* CAN Controller 1 Mailbox 15 Length Register */
400#define CAN1_MB15_TIMESTAMP 0xffc035f4 /* CAN Controller 1 Mailbox 15 Timestamp Register */
401#define CAN1_MB15_ID0 0xffc035f8 /* CAN Controller 1 Mailbox 15 ID0 Register */
402#define CAN1_MB15_ID1 0xffc035fc /* CAN Controller 1 Mailbox 15 ID1 Register */
403
404/* CAN Controller 1 Mailbox Data Registers */
405
406#define CAN1_MB16_DATA0 0xffc03600 /* CAN Controller 1 Mailbox 16 Data 0 Register */
407#define CAN1_MB16_DATA1 0xffc03604 /* CAN Controller 1 Mailbox 16 Data 1 Register */
408#define CAN1_MB16_DATA2 0xffc03608 /* CAN Controller 1 Mailbox 16 Data 2 Register */
409#define CAN1_MB16_DATA3 0xffc0360c /* CAN Controller 1 Mailbox 16 Data 3 Register */
410#define CAN1_MB16_LENGTH 0xffc03610 /* CAN Controller 1 Mailbox 16 Length Register */
411#define CAN1_MB16_TIMESTAMP 0xffc03614 /* CAN Controller 1 Mailbox 16 Timestamp Register */
412#define CAN1_MB16_ID0 0xffc03618 /* CAN Controller 1 Mailbox 16 ID0 Register */
413#define CAN1_MB16_ID1 0xffc0361c /* CAN Controller 1 Mailbox 16 ID1 Register */
414#define CAN1_MB17_DATA0 0xffc03620 /* CAN Controller 1 Mailbox 17 Data 0 Register */
415#define CAN1_MB17_DATA1 0xffc03624 /* CAN Controller 1 Mailbox 17 Data 1 Register */
416#define CAN1_MB17_DATA2 0xffc03628 /* CAN Controller 1 Mailbox 17 Data 2 Register */
417#define CAN1_MB17_DATA3 0xffc0362c /* CAN Controller 1 Mailbox 17 Data 3 Register */
418#define CAN1_MB17_LENGTH 0xffc03630 /* CAN Controller 1 Mailbox 17 Length Register */
419#define CAN1_MB17_TIMESTAMP 0xffc03634 /* CAN Controller 1 Mailbox 17 Timestamp Register */
420#define CAN1_MB17_ID0 0xffc03638 /* CAN Controller 1 Mailbox 17 ID0 Register */
421#define CAN1_MB17_ID1 0xffc0363c /* CAN Controller 1 Mailbox 17 ID1 Register */
422#define CAN1_MB18_DATA0 0xffc03640 /* CAN Controller 1 Mailbox 18 Data 0 Register */
423#define CAN1_MB18_DATA1 0xffc03644 /* CAN Controller 1 Mailbox 18 Data 1 Register */
424#define CAN1_MB18_DATA2 0xffc03648 /* CAN Controller 1 Mailbox 18 Data 2 Register */
425#define CAN1_MB18_DATA3 0xffc0364c /* CAN Controller 1 Mailbox 18 Data 3 Register */
426#define CAN1_MB18_LENGTH 0xffc03650 /* CAN Controller 1 Mailbox 18 Length Register */
427#define CAN1_MB18_TIMESTAMP 0xffc03654 /* CAN Controller 1 Mailbox 18 Timestamp Register */
428#define CAN1_MB18_ID0 0xffc03658 /* CAN Controller 1 Mailbox 18 ID0 Register */
429#define CAN1_MB18_ID1 0xffc0365c /* CAN Controller 1 Mailbox 18 ID1 Register */
430#define CAN1_MB19_DATA0 0xffc03660 /* CAN Controller 1 Mailbox 19 Data 0 Register */
431#define CAN1_MB19_DATA1 0xffc03664 /* CAN Controller 1 Mailbox 19 Data 1 Register */
432#define CAN1_MB19_DATA2 0xffc03668 /* CAN Controller 1 Mailbox 19 Data 2 Register */
433#define CAN1_MB19_DATA3 0xffc0366c /* CAN Controller 1 Mailbox 19 Data 3 Register */
434#define CAN1_MB19_LENGTH 0xffc03670 /* CAN Controller 1 Mailbox 19 Length Register */
435#define CAN1_MB19_TIMESTAMP 0xffc03674 /* CAN Controller 1 Mailbox 19 Timestamp Register */
436#define CAN1_MB19_ID0 0xffc03678 /* CAN Controller 1 Mailbox 19 ID0 Register */
437#define CAN1_MB19_ID1 0xffc0367c /* CAN Controller 1 Mailbox 19 ID1 Register */
438#define CAN1_MB20_DATA0 0xffc03680 /* CAN Controller 1 Mailbox 20 Data 0 Register */
439#define CAN1_MB20_DATA1 0xffc03684 /* CAN Controller 1 Mailbox 20 Data 1 Register */
440#define CAN1_MB20_DATA2 0xffc03688 /* CAN Controller 1 Mailbox 20 Data 2 Register */
441#define CAN1_MB20_DATA3 0xffc0368c /* CAN Controller 1 Mailbox 20 Data 3 Register */
442#define CAN1_MB20_LENGTH 0xffc03690 /* CAN Controller 1 Mailbox 20 Length Register */
443#define CAN1_MB20_TIMESTAMP 0xffc03694 /* CAN Controller 1 Mailbox 20 Timestamp Register */
444#define CAN1_MB20_ID0 0xffc03698 /* CAN Controller 1 Mailbox 20 ID0 Register */
445#define CAN1_MB20_ID1 0xffc0369c /* CAN Controller 1 Mailbox 20 ID1 Register */
446#define CAN1_MB21_DATA0 0xffc036a0 /* CAN Controller 1 Mailbox 21 Data 0 Register */
447#define CAN1_MB21_DATA1 0xffc036a4 /* CAN Controller 1 Mailbox 21 Data 1 Register */
448#define CAN1_MB21_DATA2 0xffc036a8 /* CAN Controller 1 Mailbox 21 Data 2 Register */
449#define CAN1_MB21_DATA3 0xffc036ac /* CAN Controller 1 Mailbox 21 Data 3 Register */
450#define CAN1_MB21_LENGTH 0xffc036b0 /* CAN Controller 1 Mailbox 21 Length Register */
451#define CAN1_MB21_TIMESTAMP 0xffc036b4 /* CAN Controller 1 Mailbox 21 Timestamp Register */
452#define CAN1_MB21_ID0 0xffc036b8 /* CAN Controller 1 Mailbox 21 ID0 Register */
453#define CAN1_MB21_ID1 0xffc036bc /* CAN Controller 1 Mailbox 21 ID1 Register */
454#define CAN1_MB22_DATA0 0xffc036c0 /* CAN Controller 1 Mailbox 22 Data 0 Register */
455#define CAN1_MB22_DATA1 0xffc036c4 /* CAN Controller 1 Mailbox 22 Data 1 Register */
456#define CAN1_MB22_DATA2 0xffc036c8 /* CAN Controller 1 Mailbox 22 Data 2 Register */
457#define CAN1_MB22_DATA3 0xffc036cc /* CAN Controller 1 Mailbox 22 Data 3 Register */
458#define CAN1_MB22_LENGTH 0xffc036d0 /* CAN Controller 1 Mailbox 22 Length Register */
459#define CAN1_MB22_TIMESTAMP 0xffc036d4 /* CAN Controller 1 Mailbox 22 Timestamp Register */
460#define CAN1_MB22_ID0 0xffc036d8 /* CAN Controller 1 Mailbox 22 ID0 Register */
461#define CAN1_MB22_ID1 0xffc036dc /* CAN Controller 1 Mailbox 22 ID1 Register */
462#define CAN1_MB23_DATA0 0xffc036e0 /* CAN Controller 1 Mailbox 23 Data 0 Register */
463#define CAN1_MB23_DATA1 0xffc036e4 /* CAN Controller 1 Mailbox 23 Data 1 Register */
464#define CAN1_MB23_DATA2 0xffc036e8 /* CAN Controller 1 Mailbox 23 Data 2 Register */
465#define CAN1_MB23_DATA3 0xffc036ec /* CAN Controller 1 Mailbox 23 Data 3 Register */
466#define CAN1_MB23_LENGTH 0xffc036f0 /* CAN Controller 1 Mailbox 23 Length Register */
467#define CAN1_MB23_TIMESTAMP 0xffc036f4 /* CAN Controller 1 Mailbox 23 Timestamp Register */
468#define CAN1_MB23_ID0 0xffc036f8 /* CAN Controller 1 Mailbox 23 ID0 Register */
469#define CAN1_MB23_ID1 0xffc036fc /* CAN Controller 1 Mailbox 23 ID1 Register */
470#define CAN1_MB24_DATA0 0xffc03700 /* CAN Controller 1 Mailbox 24 Data 0 Register */
471#define CAN1_MB24_DATA1 0xffc03704 /* CAN Controller 1 Mailbox 24 Data 1 Register */
472#define CAN1_MB24_DATA2 0xffc03708 /* CAN Controller 1 Mailbox 24 Data 2 Register */
473#define CAN1_MB24_DATA3 0xffc0370c /* CAN Controller 1 Mailbox 24 Data 3 Register */
474#define CAN1_MB24_LENGTH 0xffc03710 /* CAN Controller 1 Mailbox 24 Length Register */
475#define CAN1_MB24_TIMESTAMP 0xffc03714 /* CAN Controller 1 Mailbox 24 Timestamp Register */
476#define CAN1_MB24_ID0 0xffc03718 /* CAN Controller 1 Mailbox 24 ID0 Register */
477#define CAN1_MB24_ID1 0xffc0371c /* CAN Controller 1 Mailbox 24 ID1 Register */
478#define CAN1_MB25_DATA0 0xffc03720 /* CAN Controller 1 Mailbox 25 Data 0 Register */
479#define CAN1_MB25_DATA1 0xffc03724 /* CAN Controller 1 Mailbox 25 Data 1 Register */
480#define CAN1_MB25_DATA2 0xffc03728 /* CAN Controller 1 Mailbox 25 Data 2 Register */
481#define CAN1_MB25_DATA3 0xffc0372c /* CAN Controller 1 Mailbox 25 Data 3 Register */
482#define CAN1_MB25_LENGTH 0xffc03730 /* CAN Controller 1 Mailbox 25 Length Register */
483#define CAN1_MB25_TIMESTAMP 0xffc03734 /* CAN Controller 1 Mailbox 25 Timestamp Register */
484#define CAN1_MB25_ID0 0xffc03738 /* CAN Controller 1 Mailbox 25 ID0 Register */
485#define CAN1_MB25_ID1 0xffc0373c /* CAN Controller 1 Mailbox 25 ID1 Register */
486#define CAN1_MB26_DATA0 0xffc03740 /* CAN Controller 1 Mailbox 26 Data 0 Register */
487#define CAN1_MB26_DATA1 0xffc03744 /* CAN Controller 1 Mailbox 26 Data 1 Register */
488#define CAN1_MB26_DATA2 0xffc03748 /* CAN Controller 1 Mailbox 26 Data 2 Register */
489#define CAN1_MB26_DATA3 0xffc0374c /* CAN Controller 1 Mailbox 26 Data 3 Register */
490#define CAN1_MB26_LENGTH 0xffc03750 /* CAN Controller 1 Mailbox 26 Length Register */
491#define CAN1_MB26_TIMESTAMP 0xffc03754 /* CAN Controller 1 Mailbox 26 Timestamp Register */
492#define CAN1_MB26_ID0 0xffc03758 /* CAN Controller 1 Mailbox 26 ID0 Register */
493#define CAN1_MB26_ID1 0xffc0375c /* CAN Controller 1 Mailbox 26 ID1 Register */
494#define CAN1_MB27_DATA0 0xffc03760 /* CAN Controller 1 Mailbox 27 Data 0 Register */
495#define CAN1_MB27_DATA1 0xffc03764 /* CAN Controller 1 Mailbox 27 Data 1 Register */
496#define CAN1_MB27_DATA2 0xffc03768 /* CAN Controller 1 Mailbox 27 Data 2 Register */
497#define CAN1_MB27_DATA3 0xffc0376c /* CAN Controller 1 Mailbox 27 Data 3 Register */
498#define CAN1_MB27_LENGTH 0xffc03770 /* CAN Controller 1 Mailbox 27 Length Register */
499#define CAN1_MB27_TIMESTAMP 0xffc03774 /* CAN Controller 1 Mailbox 27 Timestamp Register */
500#define CAN1_MB27_ID0 0xffc03778 /* CAN Controller 1 Mailbox 27 ID0 Register */
501#define CAN1_MB27_ID1 0xffc0377c /* CAN Controller 1 Mailbox 27 ID1 Register */
502#define CAN1_MB28_DATA0 0xffc03780 /* CAN Controller 1 Mailbox 28 Data 0 Register */
503#define CAN1_MB28_DATA1 0xffc03784 /* CAN Controller 1 Mailbox 28 Data 1 Register */
504#define CAN1_MB28_DATA2 0xffc03788 /* CAN Controller 1 Mailbox 28 Data 2 Register */
505#define CAN1_MB28_DATA3 0xffc0378c /* CAN Controller 1 Mailbox 28 Data 3 Register */
506#define CAN1_MB28_LENGTH 0xffc03790 /* CAN Controller 1 Mailbox 28 Length Register */
507#define CAN1_MB28_TIMESTAMP 0xffc03794 /* CAN Controller 1 Mailbox 28 Timestamp Register */
508#define CAN1_MB28_ID0 0xffc03798 /* CAN Controller 1 Mailbox 28 ID0 Register */
509#define CAN1_MB28_ID1 0xffc0379c /* CAN Controller 1 Mailbox 28 ID1 Register */
510#define CAN1_MB29_DATA0 0xffc037a0 /* CAN Controller 1 Mailbox 29 Data 0 Register */
511#define CAN1_MB29_DATA1 0xffc037a4 /* CAN Controller 1 Mailbox 29 Data 1 Register */
512#define CAN1_MB29_DATA2 0xffc037a8 /* CAN Controller 1 Mailbox 29 Data 2 Register */
513#define CAN1_MB29_DATA3 0xffc037ac /* CAN Controller 1 Mailbox 29 Data 3 Register */
514#define CAN1_MB29_LENGTH 0xffc037b0 /* CAN Controller 1 Mailbox 29 Length Register */
515#define CAN1_MB29_TIMESTAMP 0xffc037b4 /* CAN Controller 1 Mailbox 29 Timestamp Register */
516#define CAN1_MB29_ID0 0xffc037b8 /* CAN Controller 1 Mailbox 29 ID0 Register */
517#define CAN1_MB29_ID1 0xffc037bc /* CAN Controller 1 Mailbox 29 ID1 Register */
518#define CAN1_MB30_DATA0 0xffc037c0 /* CAN Controller 1 Mailbox 30 Data 0 Register */
519#define CAN1_MB30_DATA1 0xffc037c4 /* CAN Controller 1 Mailbox 30 Data 1 Register */
520#define CAN1_MB30_DATA2 0xffc037c8 /* CAN Controller 1 Mailbox 30 Data 2 Register */
521#define CAN1_MB30_DATA3 0xffc037cc /* CAN Controller 1 Mailbox 30 Data 3 Register */
522#define CAN1_MB30_LENGTH 0xffc037d0 /* CAN Controller 1 Mailbox 30 Length Register */
523#define CAN1_MB30_TIMESTAMP 0xffc037d4 /* CAN Controller 1 Mailbox 30 Timestamp Register */
524#define CAN1_MB30_ID0 0xffc037d8 /* CAN Controller 1 Mailbox 30 ID0 Register */
525#define CAN1_MB30_ID1 0xffc037dc /* CAN Controller 1 Mailbox 30 ID1 Register */
526#define CAN1_MB31_DATA0 0xffc037e0 /* CAN Controller 1 Mailbox 31 Data 0 Register */
527#define CAN1_MB31_DATA1 0xffc037e4 /* CAN Controller 1 Mailbox 31 Data 1 Register */
528#define CAN1_MB31_DATA2 0xffc037e8 /* CAN Controller 1 Mailbox 31 Data 2 Register */
529#define CAN1_MB31_DATA3 0xffc037ec /* CAN Controller 1 Mailbox 31 Data 3 Register */
530#define CAN1_MB31_LENGTH 0xffc037f0 /* CAN Controller 1 Mailbox 31 Length Register */
531#define CAN1_MB31_TIMESTAMP 0xffc037f4 /* CAN Controller 1 Mailbox 31 Timestamp Register */
532#define CAN1_MB31_ID0 0xffc037f8 /* CAN Controller 1 Mailbox 31 ID0 Register */
533#define CAN1_MB31_ID1 0xffc037fc /* CAN Controller 1 Mailbox 31 ID1 Register */
534
535/* ATAPI Registers */
536
537#define ATAPI_CONTROL 0xffc03800 /* ATAPI Control Register */
538#define ATAPI_STATUS 0xffc03804 /* ATAPI Status Register */
539#define ATAPI_DEV_ADDR 0xffc03808 /* ATAPI Device Register Address */
540#define ATAPI_DEV_TXBUF 0xffc0380c /* ATAPI Device Register Write Data */
541#define ATAPI_DEV_RXBUF 0xffc03810 /* ATAPI Device Register Read Data */
542#define ATAPI_INT_MASK 0xffc03814 /* ATAPI Interrupt Mask Register */
543#define ATAPI_INT_STATUS 0xffc03818 /* ATAPI Interrupt Status Register */
544#define ATAPI_XFER_LEN 0xffc0381c /* ATAPI Length of Transfer */
545#define ATAPI_LINE_STATUS 0xffc03820 /* ATAPI Line Status */
546#define ATAPI_SM_STATE 0xffc03824 /* ATAPI State Machine Status */
547#define ATAPI_TERMINATE 0xffc03828 /* ATAPI Host Terminate */
548#define ATAPI_PIO_TFRCNT 0xffc0382c /* ATAPI PIO mode transfer count */
549#define ATAPI_DMA_TFRCNT 0xffc03830 /* ATAPI DMA mode transfer count */
550#define ATAPI_UMAIN_TFRCNT 0xffc03834 /* ATAPI UDMAIN transfer count */
551#define ATAPI_UDMAOUT_TFRCNT 0xffc03838 /* ATAPI UDMAOUT transfer count */
552#define ATAPI_REG_TIM_0 0xffc03840 /* ATAPI Register Transfer Timing 0 */
553#define ATAPI_PIO_TIM_0 0xffc03844 /* ATAPI PIO Timing 0 Register */
554#define ATAPI_PIO_TIM_1 0xffc03848 /* ATAPI PIO Timing 1 Register */
555#define ATAPI_MULTI_TIM_0 0xffc03850 /* ATAPI Multi-DMA Timing 0 Register */
556#define ATAPI_MULTI_TIM_1 0xffc03854 /* ATAPI Multi-DMA Timing 1 Register */
557#define ATAPI_MULTI_TIM_2 0xffc03858 /* ATAPI Multi-DMA Timing 2 Register */
558#define ATAPI_ULTRA_TIM_0 0xffc03860 /* ATAPI Ultra-DMA Timing 0 Register */
559#define ATAPI_ULTRA_TIM_1 0xffc03864 /* ATAPI Ultra-DMA Timing 1 Register */
560#define ATAPI_ULTRA_TIM_2 0xffc03868 /* ATAPI Ultra-DMA Timing 2 Register */
561#define ATAPI_ULTRA_TIM_3 0xffc0386c /* ATAPI Ultra-DMA Timing 3 Register */
562
563/* SDH Registers */
564
565#define SDH_PWR_CTL 0xffc03900 /* SDH Power Control */
566#define SDH_CLK_CTL 0xffc03904 /* SDH Clock Control */
567#define SDH_ARGUMENT 0xffc03908 /* SDH Argument */
568#define SDH_COMMAND 0xffc0390c /* SDH Command */
569#define SDH_RESP_CMD 0xffc03910 /* SDH Response Command */
570#define SDH_RESPONSE0 0xffc03914 /* SDH Response0 */
571#define SDH_RESPONSE1 0xffc03918 /* SDH Response1 */
572#define SDH_RESPONSE2 0xffc0391c /* SDH Response2 */
573#define SDH_RESPONSE3 0xffc03920 /* SDH Response3 */
574#define SDH_DATA_TIMER 0xffc03924 /* SDH Data Timer */
575#define SDH_DATA_LGTH 0xffc03928 /* SDH Data Length */
576#define SDH_DATA_CTL 0xffc0392c /* SDH Data Control */
577#define SDH_DATA_CNT 0xffc03930 /* SDH Data Counter */
578#define SDH_STATUS 0xffc03934 /* SDH Status */
579#define SDH_STATUS_CLR 0xffc03938 /* SDH Status Clear */
580#define SDH_MASK0 0xffc0393c /* SDH Interrupt0 Mask */
581#define SDH_MASK1 0xffc03940 /* SDH Interrupt1 Mask */
582#define SDH_FIFO_CNT 0xffc03948 /* SDH FIFO Counter */
583#define SDH_FIFO 0xffc03980 /* SDH Data FIFO */
584#define SDH_E_STATUS 0xffc039c0 /* SDH Exception Status */
585#define SDH_E_MASK 0xffc039c4 /* SDH Exception Mask */
586#define SDH_CFG 0xffc039c8 /* SDH Configuration */
587#define SDH_RD_WAIT_EN 0xffc039cc /* SDH Read Wait Enable */
588#define SDH_PID0 0xffc039d0 /* SDH Peripheral Identification0 */
589#define SDH_PID1 0xffc039d4 /* SDH Peripheral Identification1 */
590#define SDH_PID2 0xffc039d8 /* SDH Peripheral Identification2 */
591#define SDH_PID3 0xffc039dc /* SDH Peripheral Identification3 */
592#define SDH_PID4 0xffc039e0 /* SDH Peripheral Identification4 */
593#define SDH_PID5 0xffc039e4 /* SDH Peripheral Identification5 */
594#define SDH_PID6 0xffc039e8 /* SDH Peripheral Identification6 */
595#define SDH_PID7 0xffc039ec /* SDH Peripheral Identification7 */
596
597/* HOST Port Registers */
598
599#define HOST_CONTROL 0xffc03a00 /* HOST Control Register */
600#define HOST_STATUS 0xffc03a04 /* HOST Status Register */
601#define HOST_TIMEOUT 0xffc03a08 /* HOST Acknowledge Mode Timeout Register */
602
603/* USB Control Registers */
604
605#define USB_FADDR 0xffc03c00 /* Function address register */
606#define USB_POWER 0xffc03c04 /* Power management register */
607#define USB_INTRTX 0xffc03c08 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
608#define USB_INTRRX 0xffc03c0c /* Interrupt register for Rx endpoints 1 to 7 */
609#define USB_INTRTXE 0xffc03c10 /* Interrupt enable register for IntrTx */
610#define USB_INTRRXE 0xffc03c14 /* Interrupt enable register for IntrRx */
611#define USB_INTRUSB 0xffc03c18 /* Interrupt register for common USB interrupts */
612#define USB_INTRUSBE 0xffc03c1c /* Interrupt enable register for IntrUSB */
613#define USB_FRAME 0xffc03c20 /* USB frame number */
614#define USB_INDEX 0xffc03c24 /* Index register for selecting the indexed endpoint registers */
615#define USB_TESTMODE 0xffc03c28 /* Enabled USB 20 test modes */
616#define USB_GLOBINTR 0xffc03c2c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
617#define USB_GLOBAL_CTL 0xffc03c30 /* Global Clock Control for the core */
618
619/* USB Packet Control Registers */
620
621#define USB_TX_MAX_PACKET 0xffc03c40 /* Maximum packet size for Host Tx endpoint */
622#define USB_CSR0 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
623#define USB_TXCSR 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
624#define USB_RX_MAX_PACKET 0xffc03c48 /* Maximum packet size for Host Rx endpoint */
625#define USB_RXCSR 0xffc03c4c /* Control Status register for Host Rx endpoint */
626#define USB_COUNT0 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
627#define USB_RXCOUNT 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
628#define USB_TXTYPE 0xffc03c54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
629#define USB_NAKLIMIT0 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
630#define USB_TXINTERVAL 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
631#define USB_RXTYPE 0xffc03c5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
632#define USB_RXINTERVAL 0xffc03c60 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
633#define USB_TXCOUNT 0xffc03c68 /* Number of bytes to be written to the selected endpoint Tx FIFO */
634
635/* USB Endpoint FIFO Registers */
636
637#define USB_EP0_FIFO 0xffc03c80 /* Endpoint 0 FIFO */
638#define USB_EP1_FIFO 0xffc03c88 /* Endpoint 1 FIFO */
639#define USB_EP2_FIFO 0xffc03c90 /* Endpoint 2 FIFO */
640#define USB_EP3_FIFO 0xffc03c98 /* Endpoint 3 FIFO */
641#define USB_EP4_FIFO 0xffc03ca0 /* Endpoint 4 FIFO */
642#define USB_EP5_FIFO 0xffc03ca8 /* Endpoint 5 FIFO */
643#define USB_EP6_FIFO 0xffc03cb0 /* Endpoint 6 FIFO */
644#define USB_EP7_FIFO 0xffc03cb8 /* Endpoint 7 FIFO */
645
646/* USB OTG Control Registers */
647
648#define USB_OTG_DEV_CTL 0xffc03d00 /* OTG Device Control Register */
649#define USB_OTG_VBUS_IRQ 0xffc03d04 /* OTG VBUS Control Interrupts */
650#define USB_OTG_VBUS_MASK 0xffc03d08 /* VBUS Control Interrupt Enable */
651
652/* USB Phy Control Registers */
653
654#define USB_LINKINFO 0xffc03d48 /* Enables programming of some PHY-side delays */
655#define USB_VPLEN 0xffc03d4c /* Determines duration of VBUS pulse for VBUS charging */
656#define USB_HS_EOF1 0xffc03d50 /* Time buffer for High-Speed transactions */
657#define USB_FS_EOF1 0xffc03d54 /* Time buffer for Full-Speed transactions */
658#define USB_LS_EOF1 0xffc03d58 /* Time buffer for Low-Speed transactions */
659
660/* (APHY_CNTRL is for ADI usage only) */
661
662#define USB_APHY_CNTRL 0xffc03de0 /* Register that increases visibility of Analog PHY */
663
664/* (APHY_CALIB is for ADI usage only) */
665
666#define USB_APHY_CALIB 0xffc03de4 /* Register used to set some calibration values */
667#define USB_APHY_CNTRL2 0xffc03de8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
668
669/* (PHY_TEST is for ADI usage only) */
670
671#define USB_PHY_TEST 0xffc03dec /* Used for reducing simulation time and simplifies FIFO testability */
672#define USB_PLLOSC_CTRL 0xffc03df0 /* Used to program different parameters for USB PLL and Oscillator */
673#define USB_SRP_CLKDIV 0xffc03df4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
674
675/* USB Endpoint 0 Control Registers */
676
677#define USB_EP_NI0_TXMAXP 0xffc03e00 /* Maximum packet size for Host Tx endpoint0 */
678#define USB_EP_NI0_TXCSR 0xffc03e04 /* Control Status register for endpoint 0 */
679#define USB_EP_NI0_RXMAXP 0xffc03e08 /* Maximum packet size for Host Rx endpoint0 */
680#define USB_EP_NI0_RXCSR 0xffc03e0c /* Control Status register for Host Rx endpoint0 */
681#define USB_EP_NI0_RXCOUNT 0xffc03e10 /* Number of bytes received in endpoint 0 FIFO */
682#define USB_EP_NI0_TXTYPE 0xffc03e14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
683#define USB_EP_NI0_TXINTERVAL 0xffc03e18 /* Sets the NAK response timeout on Endpoint 0 */
684#define USB_EP_NI0_RXTYPE 0xffc03e1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
685#define USB_EP_NI0_RXINTERVAL 0xffc03e20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
686
687/* USB Endpoint 1 Control Registers */
688
689#define USB_EP_NI0_TXCOUNT 0xffc03e28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
690#define USB_EP_NI1_TXMAXP 0xffc03e40 /* Maximum packet size for Host Tx endpoint1 */
691#define USB_EP_NI1_TXCSR 0xffc03e44 /* Control Status register for endpoint1 */
692#define USB_EP_NI1_RXMAXP 0xffc03e48 /* Maximum packet size for Host Rx endpoint1 */
693#define USB_EP_NI1_RXCSR 0xffc03e4c /* Control Status register for Host Rx endpoint1 */
694#define USB_EP_NI1_RXCOUNT 0xffc03e50 /* Number of bytes received in endpoint1 FIFO */
695#define USB_EP_NI1_TXTYPE 0xffc03e54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
696#define USB_EP_NI1_TXINTERVAL 0xffc03e58 /* Sets the NAK response timeout on Endpoint1 */
697#define USB_EP_NI1_RXTYPE 0xffc03e5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
698#define USB_EP_NI1_RXINTERVAL 0xffc03e60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
699
700/* USB Endpoint 2 Control Registers */
701
702#define USB_EP_NI1_TXCOUNT 0xffc03e68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
703#define USB_EP_NI2_TXMAXP 0xffc03e80 /* Maximum packet size for Host Tx endpoint2 */
704#define USB_EP_NI2_TXCSR 0xffc03e84 /* Control Status register for endpoint2 */
705#define USB_EP_NI2_RXMAXP 0xffc03e88 /* Maximum packet size for Host Rx endpoint2 */
706#define USB_EP_NI2_RXCSR 0xffc03e8c /* Control Status register for Host Rx endpoint2 */
707#define USB_EP_NI2_RXCOUNT 0xffc03e90 /* Number of bytes received in endpoint2 FIFO */
708#define USB_EP_NI2_TXTYPE 0xffc03e94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
709#define USB_EP_NI2_TXINTERVAL 0xffc03e98 /* Sets the NAK response timeout on Endpoint2 */
710#define USB_EP_NI2_RXTYPE 0xffc03e9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
711#define USB_EP_NI2_RXINTERVAL 0xffc03ea0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
712
713/* USB Endpoint 3 Control Registers */
714
715#define USB_EP_NI2_TXCOUNT 0xffc03ea8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
716#define USB_EP_NI3_TXMAXP 0xffc03ec0 /* Maximum packet size for Host Tx endpoint3 */
717#define USB_EP_NI3_TXCSR 0xffc03ec4 /* Control Status register for endpoint3 */
718#define USB_EP_NI3_RXMAXP 0xffc03ec8 /* Maximum packet size for Host Rx endpoint3 */
719#define USB_EP_NI3_RXCSR 0xffc03ecc /* Control Status register for Host Rx endpoint3 */
720#define USB_EP_NI3_RXCOUNT 0xffc03ed0 /* Number of bytes received in endpoint3 FIFO */
721#define USB_EP_NI3_TXTYPE 0xffc03ed4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
722#define USB_EP_NI3_TXINTERVAL 0xffc03ed8 /* Sets the NAK response timeout on Endpoint3 */
723#define USB_EP_NI3_RXTYPE 0xffc03edc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
724#define USB_EP_NI3_RXINTERVAL 0xffc03ee0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
725
726/* USB Endpoint 4 Control Registers */
727
728#define USB_EP_NI3_TXCOUNT 0xffc03ee8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
729#define USB_EP_NI4_TXMAXP 0xffc03f00 /* Maximum packet size for Host Tx endpoint4 */
730#define USB_EP_NI4_TXCSR 0xffc03f04 /* Control Status register for endpoint4 */
731#define USB_EP_NI4_RXMAXP 0xffc03f08 /* Maximum packet size for Host Rx endpoint4 */
732#define USB_EP_NI4_RXCSR 0xffc03f0c /* Control Status register for Host Rx endpoint4 */
733#define USB_EP_NI4_RXCOUNT 0xffc03f10 /* Number of bytes received in endpoint4 FIFO */
734#define USB_EP_NI4_TXTYPE 0xffc03f14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
735#define USB_EP_NI4_TXINTERVAL 0xffc03f18 /* Sets the NAK response timeout on Endpoint4 */
736#define USB_EP_NI4_RXTYPE 0xffc03f1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
737#define USB_EP_NI4_RXINTERVAL 0xffc03f20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
738
739/* USB Endpoint 5 Control Registers */
740
741#define USB_EP_NI4_TXCOUNT 0xffc03f28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
742#define USB_EP_NI5_TXMAXP 0xffc03f40 /* Maximum packet size for Host Tx endpoint5 */
743#define USB_EP_NI5_TXCSR 0xffc03f44 /* Control Status register for endpoint5 */
744#define USB_EP_NI5_RXMAXP 0xffc03f48 /* Maximum packet size for Host Rx endpoint5 */
745#define USB_EP_NI5_RXCSR 0xffc03f4c /* Control Status register for Host Rx endpoint5 */
746#define USB_EP_NI5_RXCOUNT 0xffc03f50 /* Number of bytes received in endpoint5 FIFO */
747#define USB_EP_NI5_TXTYPE 0xffc03f54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
748#define USB_EP_NI5_TXINTERVAL 0xffc03f58 /* Sets the NAK response timeout on Endpoint5 */
749#define USB_EP_NI5_RXTYPE 0xffc03f5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
750#define USB_EP_NI5_RXINTERVAL 0xffc03f60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
751
752/* USB Endpoint 6 Control Registers */
753
754#define USB_EP_NI5_TXCOUNT 0xffc03f68 /* Number of bytes to be written to the H145endpoint5 Tx FIFO */
755#define USB_EP_NI6_TXMAXP 0xffc03f80 /* Maximum packet size for Host Tx endpoint6 */
756#define USB_EP_NI6_TXCSR 0xffc03f84 /* Control Status register for endpoint6 */
757#define USB_EP_NI6_RXMAXP 0xffc03f88 /* Maximum packet size for Host Rx endpoint6 */
758#define USB_EP_NI6_RXCSR 0xffc03f8c /* Control Status register for Host Rx endpoint6 */
759#define USB_EP_NI6_RXCOUNT 0xffc03f90 /* Number of bytes received in endpoint6 FIFO */
760#define USB_EP_NI6_TXTYPE 0xffc03f94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
761#define USB_EP_NI6_TXINTERVAL 0xffc03f98 /* Sets the NAK response timeout on Endpoint6 */
762#define USB_EP_NI6_RXTYPE 0xffc03f9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
763#define USB_EP_NI6_RXINTERVAL 0xffc03fa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
764
765/* USB Endpoint 7 Control Registers */
766
767#define USB_EP_NI6_TXCOUNT 0xffc03fa8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
768#define USB_EP_NI7_TXMAXP 0xffc03fc0 /* Maximum packet size for Host Tx endpoint7 */
769#define USB_EP_NI7_TXCSR 0xffc03fc4 /* Control Status register for endpoint7 */
770#define USB_EP_NI7_RXMAXP 0xffc03fc8 /* Maximum packet size for Host Rx endpoint7 */
771#define USB_EP_NI7_RXCSR 0xffc03fcc /* Control Status register for Host Rx endpoint7 */
772#define USB_EP_NI7_RXCOUNT 0xffc03fd0 /* Number of bytes received in endpoint7 FIFO */
773#define USB_EP_NI7_TXTYPE 0xffc03fd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
774#define USB_EP_NI7_TXINTERVAL 0xffc03fd8 /* Sets the NAK response timeout on Endpoint7 */
775#define USB_EP_NI7_RXTYPE 0xffc03fdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
776#define USB_EP_NI7_RXINTERVAL 0xffc03ff0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
777#define USB_EP_NI7_TXCOUNT 0xffc03ff8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
778#define USB_DMA_INTERRUPT 0xffc04000 /* Indicates pending interrupts for the DMA channels */
779
780/* USB Channel 0 Config Registers */
781
782#define USB_DMA0CONTROL 0xffc04004 /* DMA master channel 0 configuration */
783#define USB_DMA0ADDRLOW 0xffc04008 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
784#define USB_DMA0ADDRHIGH 0xffc0400c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
785#define USB_DMA0COUNTLOW 0xffc04010 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
786#define USB_DMA0COUNTHIGH 0xffc04014 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
787
788/* USB Channel 1 Config Registers */
789
790#define USB_DMA1CONTROL 0xffc04024 /* DMA master channel 1 configuration */
791#define USB_DMA1ADDRLOW 0xffc04028 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
792#define USB_DMA1ADDRHIGH 0xffc0402c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
793#define USB_DMA1COUNTLOW 0xffc04030 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
794#define USB_DMA1COUNTHIGH 0xffc04034 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
795
796/* USB Channel 2 Config Registers */
797
798#define USB_DMA2CONTROL 0xffc04044 /* DMA master channel 2 configuration */
799#define USB_DMA2ADDRLOW 0xffc04048 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
800#define USB_DMA2ADDRHIGH 0xffc0404c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
801#define USB_DMA2COUNTLOW 0xffc04050 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
802#define USB_DMA2COUNTHIGH 0xffc04054 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
803
804/* USB Channel 3 Config Registers */
805
806#define USB_DMA3CONTROL 0xffc04064 /* DMA master channel 3 configuration */
807#define USB_DMA3ADDRLOW 0xffc04068 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
808#define USB_DMA3ADDRHIGH 0xffc0406c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
809#define USB_DMA3COUNTLOW 0xffc04070 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
810#define USB_DMA3COUNTHIGH 0xffc04074 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
811
812/* USB Channel 4 Config Registers */
813
814#define USB_DMA4CONTROL 0xffc04084 /* DMA master channel 4 configuration */
815#define USB_DMA4ADDRLOW 0xffc04088 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
816#define USB_DMA4ADDRHIGH 0xffc0408c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
817#define USB_DMA4COUNTLOW 0xffc04090 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
818#define USB_DMA4COUNTHIGH 0xffc04094 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
819
820/* USB Channel 5 Config Registers */
821
822#define USB_DMA5CONTROL 0xffc040a4 /* DMA master channel 5 configuration */
823#define USB_DMA5ADDRLOW 0xffc040a8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
824#define USB_DMA5ADDRHIGH 0xffc040ac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
825#define USB_DMA5COUNTLOW 0xffc040b0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
826#define USB_DMA5COUNTHIGH 0xffc040b4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
827
828/* USB Channel 6 Config Registers */
829
830#define USB_DMA6CONTROL 0xffc040c4 /* DMA master channel 6 configuration */
831#define USB_DMA6ADDRLOW 0xffc040c8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
832#define USB_DMA6ADDRHIGH 0xffc040cc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
833#define USB_DMA6COUNTLOW 0xffc040d0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
834#define USB_DMA6COUNTHIGH 0xffc040d4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
835
836/* USB Channel 7 Config Registers */
837
838#define USB_DMA7CONTROL 0xffc040e4 /* DMA master channel 7 configuration */
839#define USB_DMA7ADDRLOW 0xffc040e8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
840#define USB_DMA7ADDRHIGH 0xffc040ec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
841#define USB_DMA7COUNTLOW 0xffc040f0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
842#define USB_DMA7COUNTHIGH 0xffc040f4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
843
844/* Keypad Registers */
845
846#define KPAD_CTL 0xffc04100 /* Controls keypad module enable and disable */
847#define KPAD_PRESCALE 0xffc04104 /* Establish a time base for programing the KPAD_MSEL register */
848#define KPAD_MSEL 0xffc04108 /* Selects delay parameters for keypad interface sensitivity */
849#define KPAD_ROWCOL 0xffc0410c /* Captures the row and column output values of the keys pressed */
850#define KPAD_STAT 0xffc04110 /* Holds and clears the status of the keypad interface interrupt */
851#define KPAD_SOFTEVAL 0xffc04114 /* Lets software force keypad interface to check for keys being pressed */
852
853/* Pixel Compositor (PIXC) Registers */
854
855#define PIXC_CTL 0xffc04400 /* Overlay enable, resampling mode, I/O data format, transparency enable, watermark level, FIFO status */
856#define PIXC_PPL 0xffc04404 /* Holds the number of pixels per line of the display */
857#define PIXC_LPF 0xffc04408 /* Holds the number of lines per frame of the display */
858#define PIXC_AHSTART 0xffc0440c /* Contains horizontal start pixel information of the overlay data (set A) */
859#define PIXC_AHEND 0xffc04410 /* Contains horizontal end pixel information of the overlay data (set A) */
860#define PIXC_AVSTART 0xffc04414 /* Contains vertical start pixel information of the overlay data (set A) */
861#define PIXC_AVEND 0xffc04418 /* Contains vertical end pixel information of the overlay data (set A) */
862#define PIXC_ATRANSP 0xffc0441c /* Contains the transparency ratio (set A) */
863#define PIXC_BHSTART 0xffc04420 /* Contains horizontal start pixel information of the overlay data (set B) */
864#define PIXC_BHEND 0xffc04424 /* Contains horizontal end pixel information of the overlay data (set B) */
865#define PIXC_BVSTART 0xffc04428 /* Contains vertical start pixel information of the overlay data (set B) */
866#define PIXC_BVEND 0xffc0442c /* Contains vertical end pixel information of the overlay data (set B) */
867#define PIXC_BTRANSP 0xffc04430 /* Contains the transparency ratio (set B) */
868#define PIXC_INTRSTAT 0xffc0443c /* Overlay interrupt configuration/status */
869#define PIXC_RYCON 0xffc04440 /* Color space conversion matrix register. Contains the R/Y conversion coefficients */
870#define PIXC_GUCON 0xffc04444 /* Color space conversion matrix register. Contains the G/U conversion coefficients */
871#define PIXC_BVCON 0xffc04448 /* Color space conversion matrix register. Contains the B/V conversion coefficients */
872#define PIXC_CCBIAS 0xffc0444c /* Bias values for the color space conversion matrix */
873#define PIXC_TC 0xffc04450 /* Holds the transparent color value */
874
875/* Handshake MDMA 0 Registers */
876
877#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
878#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
879#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
880#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */
881#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
882#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
883#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
884
885/* Handshake MDMA 1 Registers */
886
887#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
888#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
889#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
890#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */
891#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
892#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
893#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
894
895
896/* ********************************************************** */
897/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
898/* and MULTI BIT READ MACROS */
899/* ********************************************************** */
900
901/* Bit masks for PIXC_CTL */
902
903#define PIXC_EN 0x1 /* Pixel Compositor Enable */
904#define OVR_A_EN 0x2 /* Overlay A Enable */
905#define OVR_B_EN 0x4 /* Overlay B Enable */
906#define IMG_FORM 0x8 /* Image Data Format */
907#define OVR_FORM 0x10 /* Overlay Data Format */
908#define OUT_FORM 0x20 /* Output Data Format */
909#define UDS_MOD 0x40 /* Resampling Mode */
910#define TC_EN 0x80 /* Transparent Color Enable */
911#define IMG_STAT 0x300 /* Image FIFO Status */
912#define OVR_STAT 0xc00 /* Overlay FIFO Status */
913#define WM_LVL 0x3000 /* FIFO Watermark Level */
914
915/* Bit masks for PIXC_AHSTART */
916
917#define A_HSTART 0xfff /* Horizontal Start Coordinates */
918
919/* Bit masks for PIXC_AHEND */
920
921#define A_HEND 0xfff /* Horizontal End Coordinates */
922
923/* Bit masks for PIXC_AVSTART */
924
925#define A_VSTART 0x3ff /* Vertical Start Coordinates */
926
927/* Bit masks for PIXC_AVEND */
928
929#define A_VEND 0x3ff /* Vertical End Coordinates */
930
931/* Bit masks for PIXC_ATRANSP */
932
933#define A_TRANSP 0xf /* Transparency Value */
934
935/* Bit masks for PIXC_BHSTART */
936
937#define B_HSTART 0xfff /* Horizontal Start Coordinates */
938
939/* Bit masks for PIXC_BHEND */
940
941#define B_HEND 0xfff /* Horizontal End Coordinates */
942
943/* Bit masks for PIXC_BVSTART */
944
945#define B_VSTART 0x3ff /* Vertical Start Coordinates */
946
947/* Bit masks for PIXC_BVEND */
948
949#define B_VEND 0x3ff /* Vertical End Coordinates */
950
951/* Bit masks for PIXC_BTRANSP */
952
953#define B_TRANSP 0xf /* Transparency Value */
954
955/* Bit masks for PIXC_INTRSTAT */
956
957#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
958#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
959#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
960#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
961
962/* Bit masks for PIXC_RYCON */
963
964#define A11 0x3ff /* A11 in the Coefficient Matrix */
965#define A12 0xffc00 /* A12 in the Coefficient Matrix */
966#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
967#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
968
969/* Bit masks for PIXC_GUCON */
970
971#define A21 0x3ff /* A21 in the Coefficient Matrix */
972#define A22 0xffc00 /* A22 in the Coefficient Matrix */
973#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
974#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
975
976/* Bit masks for PIXC_BVCON */
977
978#define A31 0x3ff /* A31 in the Coefficient Matrix */
979#define A32 0xffc00 /* A32 in the Coefficient Matrix */
980#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
981#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
982
983/* Bit masks for PIXC_CCBIAS */
984
985#define A14 0x3ff /* A14 in the Bias Vector */
986#define A24 0xffc00 /* A24 in the Bias Vector */
987#define A34 0x3ff00000 /* A34 in the Bias Vector */
988
989/* Bit masks for PIXC_TC */
990
991#define RY_TRANS 0xff /* Transparent Color - R/Y Component */
992#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
993#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
994
995/* Bit masks for HOST_CONTROL */
996
997#define HOST_EN 0x1 /* Host Enable */
998#define HOST_END 0x2 /* Host Endianess */
999#define DATA_SIZE 0x4 /* Data Size */
1000#define HOST_RST 0x8 /* Host Reset */
1001#define HRDY_OVR 0x20 /* Host Ready Override */
1002#define INT_MODE 0x40 /* Interrupt Mode */
1003#define BT_EN 0x80 /* Bus Timeout Enable */
1004#define EHW 0x100 /* Enable Host Write */
1005#define EHR 0x200 /* Enable Host Read */
1006#define BDR 0x400 /* Burst DMA Requests */
1007
1008/* Bit masks for HOST_STATUS */
1009
1010#define DMA_READY 0x1 /* DMA Ready */
1011#define FIFOFULL 0x2 /* FIFO Full */
1012#define FIFOEMPTY 0x4 /* FIFO Empty */
1013#define DMA_COMPLETE 0x8 /* DMA Complete */
1014#define HSHK 0x10 /* Host Handshake */
1015#define HSTIMEOUT 0x20 /* Host Timeout */
1016#define HIRQ 0x40 /* Host Interrupt Request */
1017#define ALLOW_CNFG 0x80 /* Allow New Configuration */
1018#define DMA_DIR 0x100 /* DMA Direction */
1019#define BTE 0x200 /* Bus Timeout Enabled */
1020
1021/* Bit masks for HOST_TIMEOUT */
1022
1023#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
1024
1025/* Bit masks for KPAD_CTL */
1026
1027#define KPAD_EN 0x1 /* Keypad Enable */
1028#define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */
1029#define KPAD_ROWEN 0x1c00 /* Row Enable Width */
1030#define KPAD_COLEN 0xe000 /* Column Enable Width */
1031
1032/* Bit masks for KPAD_PRESCALE */
1033
1034#define KPAD_PRESCALE_VAL 0x3f /* Key Prescale Value */
1035
1036/* Bit masks for KPAD_MSEL */
1037
1038#define DBON_SCALE 0xff /* Debounce Scale Value */
1039#define COLDRV_SCALE 0xff00 /* Column Driver Scale Value */
1040
1041/* Bit masks for KPAD_ROWCOL */
1042
1043#define KPAD_ROW 0xff /* Rows Pressed */
1044#define KPAD_COL 0xff00 /* Columns Pressed */
1045
1046/* Bit masks for KPAD_STAT */
1047
1048#define KPAD_IRQ 0x1 /* Keypad Interrupt Status */
1049#define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */
1050#define KPAD_PRESSED 0x8 /* Key press current status */
1051
1052/* Bit masks for KPAD_SOFTEVAL */
1053
1054#define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */
1055
1056/* Bit masks for SDH_COMMAND */
1057
1058#define CMD_IDX 0x3f /* Command Index */
1059#define CMD_RSP 0x40 /* Response */
1060#define CMD_L_RSP 0x80 /* Long Response */
1061#define CMD_INT_E 0x100 /* Command Interrupt */
1062#define CMD_PEND_E 0x200 /* Command Pending */
1063#define CMD_E 0x400 /* Command Enable */
1064
1065/* Bit masks for SDH_PWR_CTL */
1066
1067#define PWR_ON 0x3 /* Power On */
1068#if 0
1069#define TBD 0x3c /* TBD */
1070#endif
1071#define SD_CMD_OD 0x40 /* Open Drain Output */
1072#define ROD_CTL 0x80 /* Rod Control */
1073
1074/* Bit masks for SDH_CLK_CTL */
1075
1076#define CLKDIV 0xff /* MC_CLK Divisor */
1077#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
1078#define PWR_SV_E 0x200 /* Power Save Enable */
1079#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
1080#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
1081
1082/* Bit masks for SDH_RESP_CMD */
1083
1084#define RESP_CMD 0x3f /* Response Command */
1085
1086/* Bit masks for SDH_DATA_CTL */
1087
1088#define DTX_E 0x1 /* Data Transfer Enable */
1089#define DTX_DIR 0x2 /* Data Transfer Direction */
1090#define DTX_MODE 0x4 /* Data Transfer Mode */
1091#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
1092#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
1093
1094/* Bit masks for SDH_STATUS */
1095
1096#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
1097#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
1098#define CMD_TIME_OUT 0x4 /* CMD Time Out */
1099#define DAT_TIME_OUT 0x8 /* Data Time Out */
1100#define TX_UNDERRUN 0x10 /* Transmit Underrun */
1101#define RX_OVERRUN 0x20 /* Receive Overrun */
1102#define CMD_RESP_END 0x40 /* CMD Response End */
1103#define CMD_SENT 0x80 /* CMD Sent */
1104#define DAT_END 0x100 /* Data End */
1105#define START_BIT_ERR 0x200 /* Start Bit Error */
1106#define DAT_BLK_END 0x400 /* Data Block End */
1107#define CMD_ACT 0x800 /* CMD Active */
1108#define TX_ACT 0x1000 /* Transmit Active */
1109#define RX_ACT 0x2000 /* Receive Active */
1110#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
1111#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
1112#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
1113#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
1114#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
1115#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
1116#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
1117#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
1118
1119/* Bit masks for SDH_STATUS_CLR */
1120
1121#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
1122#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
1123#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
1124#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
1125#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
1126#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
1127#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
1128#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
1129#define DAT_END_STAT 0x100 /* Data End Status */
1130#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
1131#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
1132
1133/* Bit masks for SDH_MASK0 */
1134
1135#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
1136#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
1137#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
1138#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
1139#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
1140#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
1141#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
1142#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
1143#define DAT_END_MASK 0x100 /* Data End Mask */
1144#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
1145#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
1146#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
1147#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
1148#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
1149#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
1150#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
1151#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
1152#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
1153#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
1154#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
1155#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
1156#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
1157
1158/* Bit masks for SDH_FIFO_CNT */
1159
1160#define FIFO_COUNT 0x7fff /* FIFO Count */
1161
1162/* Bit masks for SDH_E_STATUS */
1163
1164#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
1165#define SD_CARD_DET 0x10 /* SD Card Detect */
1166
1167/* Bit masks for SDH_E_MASK */
1168
1169#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
1170#define SCD_MSK 0x40 /* Mask Card Detect */
1171
1172/* Bit masks for SDH_CFG */
1173
1174#define CLKS_EN 0x1 /* Clocks Enable */
1175#define SD4E 0x4 /* SDIO 4-Bit Enable */
1176#define MWE 0x8 /* Moving Window Enable */
1177#define SD_RST 0x10 /* SDMMC Reset */
1178#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
1179#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
1180#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
1181
1182/* Bit masks for SDH_RD_WAIT_EN */
1183
1184#define RWR 0x1 /* Read Wait Request */
1185
1186/* Bit masks for ATAPI_CONTROL */
1187
1188#define PIO_START 0x1 /* Start PIO/Reg Op */
1189#define MULTI_START 0x2 /* Start Multi-DMA Op */
1190#define ULTRA_START 0x4 /* Start Ultra-DMA Op */
1191#define XFER_DIR 0x8 /* Transfer Direction */
1192#define IORDY_EN 0x10 /* IORDY Enable */
1193#define FIFO_FLUSH 0x20 /* Flush FIFOs */
1194#define SOFT_RST 0x40 /* Soft Reset */
1195#define DEV_RST 0x80 /* Device Reset */
1196#define TFRCNT_RST 0x100 /* Trans Count Reset */
1197#define END_ON_TERM 0x200 /* End/Terminate Select */
1198#define PIO_USE_DMA 0x400 /* PIO-DMA Enable */
1199#define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */
1200
1201/* Bit masks for ATAPI_STATUS */
1202
1203#define PIO_XFER_ON 0x1 /* PIO transfer in progress */
1204#define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */
1205#define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */
1206#define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */
1207
1208/* Bit masks for ATAPI_DEV_ADDR */
1209
1210#define DEV_ADDR 0x1f /* Device Address */
1211
1212/* Bit masks for ATAPI_INT_MASK */
1213
1214#define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */
1215#define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */
1216#define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */
1217#define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */
1218#define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */
1219#define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */
1220#define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */
1221#define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */
1222#define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */
1223
1224/* Bit masks for ATAPI_INT_STATUS */
1225
1226#define ATAPI_DEV_INT 0x1 /* Device interrupt status */
1227#define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */
1228#define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */
1229#define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */
1230#define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */
1231#define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */
1232#define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */
1233#define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */
1234#define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */
1235
1236/* Bit masks for ATAPI_LINE_STATUS */
1237
1238#define ATAPI_INTR 0x1 /* Device interrupt to host line status */
1239#define ATAPI_DASP 0x2 /* Device dasp to host line status */
1240#define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */
1241#define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */
1242#define ATAPI_ADDR 0x70 /* ATAPI address line status */
1243#define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */
1244#define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */
1245#define ATAPI_DIOWN 0x200 /* ATAPI write line status */
1246#define ATAPI_DIORN 0x400 /* ATAPI read line status */
1247#define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */
1248
1249/* Bit masks for ATAPI_SM_STATE */
1250
1251#define PIO_CSTATE 0xf /* PIO mode state machine current state */
1252#define DMA_CSTATE 0xf0 /* DMA mode state machine current state */
1253#define UDMAIN_CSTATE 0xf00 /* Ultra DMA-In mode state machine current state */
1254#define UDMAOUT_CSTATE 0xf000 /* ATAPI IORDY line status */
1255
1256/* Bit masks for ATAPI_TERMINATE */
1257
1258#define ATAPI_HOST_TERM 0x1 /* Host terminationation */
1259
1260/* Bit masks for ATAPI_REG_TIM_0 */
1261
1262#define T2_REG 0xff /* End of cycle time for register access transfers */
1263#define TEOC_REG 0xff00 /* Selects DIOR/DIOW pulsewidth */
1264
1265/* Bit masks for ATAPI_PIO_TIM_0 */
1266
1267#define T1_REG 0xf /* Time from address valid to DIOR/DIOW */
1268#define T2_REG_PIO 0xff0 /* DIOR/DIOW pulsewidth */
1269#define T4_REG 0xf000 /* DIOW data hold */
1270
1271/* Bit masks for ATAPI_PIO_TIM_1 */
1272
1273#define TEOC_REG_PIO 0xff /* End of cycle time for PIO access transfers. */
1274
1275/* Bit masks for ATAPI_MULTI_TIM_0 */
1276
1277#define TD 0xff /* DIOR/DIOW asserted pulsewidth */
1278#define TM 0xff00 /* Time from address valid to DIOR/DIOW */
1279
1280/* Bit masks for ATAPI_MULTI_TIM_1 */
1281
1282#define TKW 0xff /* Selects DIOW negated pulsewidth */
1283#define TKR 0xff00 /* Selects DIOR negated pulsewidth */
1284
1285/* Bit masks for ATAPI_MULTI_TIM_2 */
1286
1287#define TH 0xff /* Selects DIOW data hold */
1288#define TEOC 0xff00 /* Selects end of cycle for DMA */
1289
1290/* Bit masks for ATAPI_ULTRA_TIM_0 */
1291
1292#define TACK 0xff /* Selects setup and hold times for TACK */
1293#define TENV 0xff00 /* Selects envelope time */
1294
1295/* Bit masks for ATAPI_ULTRA_TIM_1 */
1296
1297#define TDVS 0xff /* Selects data valid setup time */
1298#define TCYC_TDVS 0xff00 /* Selects cycle time - TDVS time */
1299
1300/* Bit masks for ATAPI_ULTRA_TIM_2 */
1301
1302#define TSS 0xff /* Selects time from STROBE edge to negation of DMARQ or assertion of STOP */
1303#define TMLI 0xff00 /* Selects interlock time */
1304
1305/* Bit masks for ATAPI_ULTRA_TIM_3 */
1306
1307#define TZAH 0xff /* Selects minimum delay required for output */
1308#define READY_PAUSE 0xff00 /* Selects ready to pause */
1309
1310/* Bit masks for TIMER_ENABLE1 */
1311
1312#define TIMEN8 0x1 /* Timer 8 Enable */
1313#define TIMEN9 0x2 /* Timer 9 Enable */
1314#define TIMEN10 0x4 /* Timer 10 Enable */
1315
1316/* Bit masks for TIMER_DISABLE1 */
1317
1318#define TIMDIS8 0x1 /* Timer 8 Disable */
1319#define TIMDIS9 0x2 /* Timer 9 Disable */
1320#define TIMDIS10 0x4 /* Timer 10 Disable */
1321
1322/* Bit masks for TIMER_STATUS1 */
1323
1324#define TIMIL8 0x1 /* Timer 8 Interrupt */
1325#define TIMIL9 0x2 /* Timer 9 Interrupt */
1326#define TIMIL10 0x4 /* Timer 10 Interrupt */
1327#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
1328#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
1329#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
1330#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
1331#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
1332#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
1333
1334/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
1335
1336/* Bit masks for USB_FADDR */
1337
1338#define FUNCTION_ADDRESS 0x7f /* Function address */
1339
1340/* Bit masks for USB_POWER */
1341
1342#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
1343#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
1344#define RESUME_MODE 0x4 /* DMA Mode */
1345#define RESET 0x8 /* Reset indicator */
1346#define HS_MODE 0x10 /* High Speed mode indicator */
1347#define HS_ENABLE 0x20 /* high Speed Enable */
1348#define SOFT_CONN 0x40 /* Soft connect */
1349#define ISO_UPDATE 0x80 /* Isochronous update */
1350
1351/* Bit masks for USB_INTRTX */
1352
1353#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
1354#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
1355#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
1356#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
1357#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
1358#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
1359#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
1360#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
1361
1362/* Bit masks for USB_INTRRX */
1363
1364#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
1365#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
1366#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
1367#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
1368#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
1369#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
1370#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
1371
1372/* Bit masks for USB_INTRTXE */
1373
1374#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
1375#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
1376#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
1377#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
1378#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
1379#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
1380#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
1381#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
1382
1383/* Bit masks for USB_INTRRXE */
1384
1385#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
1386#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
1387#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
1388#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
1389#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
1390#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
1391#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
1392
1393/* Bit masks for USB_INTRUSB */
1394
1395#define SUSPEND_B 0x1 /* Suspend indicator */
1396#define RESUME_B 0x2 /* Resume indicator */
1397#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
1398#define SOF_B 0x8 /* Start of frame */
1399#define CONN_B 0x10 /* Connection indicator */
1400#define DISCON_B 0x20 /* Disconnect indicator */
1401#define SESSION_REQ_B 0x40 /* Session Request */
1402#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
1403
1404/* Bit masks for USB_INTRUSBE */
1405
1406#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
1407#define RESUME_BE 0x2 /* Resume indicator int enable */
1408#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
1409#define SOF_BE 0x8 /* Start of frame int enable */
1410#define CONN_BE 0x10 /* Connection indicator int enable */
1411#define DISCON_BE 0x20 /* Disconnect indicator int enable */
1412#define SESSION_REQ_BE 0x40 /* Session Request int enable */
1413#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
1414
1415/* Bit masks for USB_FRAME */
1416
1417#define FRAME_NUMBER 0x7ff /* Frame number */
1418
1419/* Bit masks for USB_INDEX */
1420
1421#define SELECTED_ENDPOINT 0xf /* selected endpoint */
1422
1423/* Bit masks for USB_GLOBAL_CTL */
1424
1425#define GLOBAL_ENA 0x1 /* enables USB module */
1426#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
1427#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
1428#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
1429#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
1430#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
1431#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
1432#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
1433#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
1434#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
1435#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
1436#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
1437#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
1438#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
1439#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
1440
1441/* Bit masks for USB_OTG_DEV_CTL */
1442
1443#define SESSION 0x1 /* session indicator */
1444#define HOST_REQ 0x2 /* Host negotiation request */
1445#define HOST_MODE 0x4 /* indicates USBDRC is a host */
1446#define VBUS0 0x8 /* Vbus level indicator[0] */
1447#define VBUS1 0x10 /* Vbus level indicator[1] */
1448#define LSDEV 0x20 /* Low-speed indicator */
1449#define FSDEV 0x40 /* Full or High-speed indicator */
1450#define B_DEVICE 0x80 /* A' or 'B' device indicator */
1451
1452/* Bit masks for USB_OTG_VBUS_IRQ */
1453
1454#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
1455#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
1456#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
1457#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
1458#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
1459#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
1460
1461/* Bit masks for USB_OTG_VBUS_MASK */
1462
1463#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
1464#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
1465#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
1466#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
1467#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
1468#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
1469
1470/* Bit masks for USB_CSR0 */
1471
1472#define RXPKTRDY 0x1 /* data packet receive indicator */
1473#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
1474#define STALL_SENT 0x4 /* STALL handshake sent */
1475#define DATAEND 0x8 /* Data end indicator */
1476#define SETUPEND 0x10 /* Setup end */
1477#define SENDSTALL 0x20 /* Send STALL handshake */
1478#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
1479#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
1480#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
1481#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
1482#define SETUPPKT_H 0x8 /* send Setup token host mode */
1483#define ERROR_H 0x10 /* timeout error indicator host mode */
1484#define REQPKT_H 0x20 /* Request an IN transaction host mode */
1485#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
1486#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
1487
1488/* Bit masks for USB_COUNT0 */
1489
1490#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
1491
1492/* Bit masks for USB_NAKLIMIT0 */
1493
1494#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
1495
1496/* Bit masks for USB_TX_MAX_PACKET */
1497
1498#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
1499
1500/* Bit masks for USB_RX_MAX_PACKET */
1501
1502#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
1503
1504/* Bit masks for USB_TXCSR */
1505
1506#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
1507#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
1508#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
1509#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
1510#define STALL_SEND_T 0x10 /* issue a Stall handshake */
1511#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
1512#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
1513#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
1514#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
1515#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
1516#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
1517#define ISO_T 0x4000 /* enable Isochronous transfers */
1518#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
1519#define ERROR_TH 0x4 /* error condition host mode */
1520#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
1521#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
1522
1523/* Bit masks for USB_TXCOUNT */
1524
1525#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
1526
1527/* Bit masks for USB_RXCSR */
1528
1529#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
1530#define FIFO_FULL_R 0x2 /* FIFO not empty */
1531#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
1532#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
1533#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
1534#define STALL_SEND_R 0x20 /* issue a Stall handshake */
1535#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
1536#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
1537#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
1538#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
1539#define DISNYET_R 0x1000 /* disable Nyet handshakes */
1540#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
1541#define ISO_R 0x4000 /* enable Isochronous transfers */
1542#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
1543#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
1544#define REQPKT_RH 0x20 /* request an IN transaction host mode */
1545#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
1546#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
1547#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
1548#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
1549
1550/* Bit masks for USB_RXCOUNT */
1551
1552#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
1553
1554/* Bit masks for USB_TXTYPE */
1555
1556#define TARGET_EP_NO_T 0xf /* EP number */
1557#define PROTOCOL_T 0xc /* transfer type */
1558
1559/* Bit masks for USB_TXINTERVAL */
1560
1561#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
1562
1563/* Bit masks for USB_RXTYPE */
1564
1565#define TARGET_EP_NO_R 0xf /* EP number */
1566#define PROTOCOL_R 0xc /* transfer type */
1567
1568/* Bit masks for USB_RXINTERVAL */
1569
1570#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
1571
1572/* Bit masks for USB_DMA_INTERRUPT */
1573
1574#define DMA0_INT 0x1 /* DMA0 pending interrupt */
1575#define DMA1_INT 0x2 /* DMA1 pending interrupt */
1576#define DMA2_INT 0x4 /* DMA2 pending interrupt */
1577#define DMA3_INT 0x8 /* DMA3 pending interrupt */
1578#define DMA4_INT 0x10 /* DMA4 pending interrupt */
1579#define DMA5_INT 0x20 /* DMA5 pending interrupt */
1580#define DMA6_INT 0x40 /* DMA6 pending interrupt */
1581#define DMA7_INT 0x80 /* DMA7 pending interrupt */
1582
1583/* Bit masks for USB_DMAxCONTROL */
1584
1585#define DMA_ENA 0x1 /* DMA enable */
1586#define DIRECTION 0x2 /* direction of DMA transfer */
1587#define MODE 0x4 /* DMA Bus error */
1588#define INT_ENA 0x8 /* Interrupt enable */
1589#define EPNUM 0xf0 /* EP number */
1590#define BUSERROR 0x100 /* DMA Bus error */
1591
1592/* Bit masks for USB_DMAxADDRHIGH */
1593
1594#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
1595
1596/* Bit masks for USB_DMAxADDRLOW */
1597
1598#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
1599
1600/* Bit masks for USB_DMAxCOUNTHIGH */
1601
1602#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
1603
1604/* Bit masks for USB_DMAxCOUNTLOW */
1605
1606#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
1607
1608/* Bit masks for HMDMAx_CONTROL */
1609
1610#define HMDMAEN 0x1 /* Handshake MDMA Enable */
1611#define REP 0x2 /* Handshake MDMA Request Polarity */
1612#define UTE 0x8 /* Urgency Threshold Enable */
1613#define OIE 0x10 /* Overflow Interrupt Enable */
1614#define BDIE 0x20 /* Block Done Interrupt Enable */
1615#define MBDI 0x40 /* Mask Block Done Interrupt */
1616#define DRQ 0x300 /* Handshake MDMA Request Type */
1617#define RBC 0x1000 /* Force Reload of BCOUNT */
1618#define PS 0x2000 /* Pin Status */
1619#define OI 0x4000 /* Overflow Interrupt Generated */
1620#define BDI 0x8000 /* Block Done Interrupt Generated */
1621
1622/* ******************************************* */
1623/* MULTI BIT MACRO ENUMERATIONS */
1624/* ******************************************* */
1625
1626
1627#endif /* _DEF_BF548_H */
diff --git a/include/asm-blackfin/mach-bf548/defBF549.h b/include/asm-blackfin/mach-bf548/defBF549.h
deleted file mode 100644
index fcb72b41e007..000000000000
--- a/include/asm-blackfin/mach-bf548/defBF549.h
+++ /dev/null
@@ -1,2737 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/defBF549.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF549_H
32#define _DEF_BF549_H
33
34/* Include all Core registers and bit definitions */
35#include <asm/mach-common/def_LPBlackfin.h>
36
37
38/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF549 */
39
40/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
41#include "defBF54x_base.h"
42
43/* The following are the #defines needed by ADSP-BF549 that are not in the common header */
44
45/* Timer Registers */
46
47#define TIMER8_CONFIG 0xffc00600 /* Timer 8 Configuration Register */
48#define TIMER8_COUNTER 0xffc00604 /* Timer 8 Counter Register */
49#define TIMER8_PERIOD 0xffc00608 /* Timer 8 Period Register */
50#define TIMER8_WIDTH 0xffc0060c /* Timer 8 Width Register */
51#define TIMER9_CONFIG 0xffc00610 /* Timer 9 Configuration Register */
52#define TIMER9_COUNTER 0xffc00614 /* Timer 9 Counter Register */
53#define TIMER9_PERIOD 0xffc00618 /* Timer 9 Period Register */
54#define TIMER9_WIDTH 0xffc0061c /* Timer 9 Width Register */
55#define TIMER10_CONFIG 0xffc00620 /* Timer 10 Configuration Register */
56#define TIMER10_COUNTER 0xffc00624 /* Timer 10 Counter Register */
57#define TIMER10_PERIOD 0xffc00628 /* Timer 10 Period Register */
58#define TIMER10_WIDTH 0xffc0062c /* Timer 10 Width Register */
59
60/* Timer Group of 3 Registers */
61
62#define TIMER_ENABLE1 0xffc00640 /* Timer Group of 3 Enable Register */
63#define TIMER_DISABLE1 0xffc00644 /* Timer Group of 3 Disable Register */
64#define TIMER_STATUS1 0xffc00648 /* Timer Group of 3 Status Register */
65
66/* SPORT0 Registers */
67
68#define SPORT0_TCR1 0xffc00800 /* SPORT0 Transmit Configuration 1 Register */
69#define SPORT0_TCR2 0xffc00804 /* SPORT0 Transmit Configuration 2 Register */
70#define SPORT0_TCLKDIV 0xffc00808 /* SPORT0 Transmit Serial Clock Divider Register */
71#define SPORT0_TFSDIV 0xffc0080c /* SPORT0 Transmit Frame Sync Divider Register */
72#define SPORT0_TX 0xffc00810 /* SPORT0 Transmit Data Register */
73#define SPORT0_RX 0xffc00818 /* SPORT0 Receive Data Register */
74#define SPORT0_RCR1 0xffc00820 /* SPORT0 Receive Configuration 1 Register */
75#define SPORT0_RCR2 0xffc00824 /* SPORT0 Receive Configuration 2 Register */
76#define SPORT0_RCLKDIV 0xffc00828 /* SPORT0 Receive Serial Clock Divider Register */
77#define SPORT0_RFSDIV 0xffc0082c /* SPORT0 Receive Frame Sync Divider Register */
78#define SPORT0_STAT 0xffc00830 /* SPORT0 Status Register */
79#define SPORT0_CHNL 0xffc00834 /* SPORT0 Current Channel Register */
80#define SPORT0_MCMC1 0xffc00838 /* SPORT0 Multi channel Configuration Register 1 */
81#define SPORT0_MCMC2 0xffc0083c /* SPORT0 Multi channel Configuration Register 2 */
82#define SPORT0_MTCS0 0xffc00840 /* SPORT0 Multi channel Transmit Select Register 0 */
83#define SPORT0_MTCS1 0xffc00844 /* SPORT0 Multi channel Transmit Select Register 1 */
84#define SPORT0_MTCS2 0xffc00848 /* SPORT0 Multi channel Transmit Select Register 2 */
85#define SPORT0_MTCS3 0xffc0084c /* SPORT0 Multi channel Transmit Select Register 3 */
86#define SPORT0_MRCS0 0xffc00850 /* SPORT0 Multi channel Receive Select Register 0 */
87#define SPORT0_MRCS1 0xffc00854 /* SPORT0 Multi channel Receive Select Register 1 */
88#define SPORT0_MRCS2 0xffc00858 /* SPORT0 Multi channel Receive Select Register 2 */
89#define SPORT0_MRCS3 0xffc0085c /* SPORT0 Multi channel Receive Select Register 3 */
90
91/* EPPI0 Registers */
92
93#define EPPI0_STATUS 0xffc01000 /* EPPI0 Status Register */
94#define EPPI0_HCOUNT 0xffc01004 /* EPPI0 Horizontal Transfer Count Register */
95#define EPPI0_HDELAY 0xffc01008 /* EPPI0 Horizontal Delay Count Register */
96#define EPPI0_VCOUNT 0xffc0100c /* EPPI0 Vertical Transfer Count Register */
97#define EPPI0_VDELAY 0xffc01010 /* EPPI0 Vertical Delay Count Register */
98#define EPPI0_FRAME 0xffc01014 /* EPPI0 Lines per Frame Register */
99#define EPPI0_LINE 0xffc01018 /* EPPI0 Samples per Line Register */
100#define EPPI0_CLKDIV 0xffc0101c /* EPPI0 Clock Divide Register */
101#define EPPI0_CONTROL 0xffc01020 /* EPPI0 Control Register */
102#define EPPI0_FS1W_HBL 0xffc01024 /* EPPI0 FS1 Width Register / EPPI0 Horizontal Blanking Samples Per Line Register */
103#define EPPI0_FS1P_AVPL 0xffc01028 /* EPPI0 FS1 Period Register / EPPI0 Active Video Samples Per Line Register */
104#define EPPI0_FS2W_LVB 0xffc0102c /* EPPI0 FS2 Width Register / EPPI0 Lines of Vertical Blanking Register */
105#define EPPI0_FS2P_LAVF 0xffc01030 /* EPPI0 FS2 Period Register/ EPPI0 Lines of Active Video Per Field Register */
106#define EPPI0_CLIP 0xffc01034 /* EPPI0 Clipping Register */
107
108/* UART2 Registers */
109
110#define UART2_DLL 0xffc02100 /* Divisor Latch Low Byte */
111#define UART2_DLH 0xffc02104 /* Divisor Latch High Byte */
112#define UART2_GCTL 0xffc02108 /* Global Control Register */
113#define UART2_LCR 0xffc0210c /* Line Control Register */
114#define UART2_MCR 0xffc02110 /* Modem Control Register */
115#define UART2_LSR 0xffc02114 /* Line Status Register */
116#define UART2_MSR 0xffc02118 /* Modem Status Register */
117#define UART2_SCR 0xffc0211c /* Scratch Register */
118#define UART2_IER_SET 0xffc02120 /* Interrupt Enable Register Set */
119#define UART2_IER_CLEAR 0xffc02124 /* Interrupt Enable Register Clear */
120#define UART2_RBR 0xffc0212c /* Receive Buffer Register */
121
122/* Two Wire Interface Registers (TWI1) */
123
124#define TWI1_REGBASE 0xffc02200
125#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
126#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
127#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
128#define TWI1_SLAVE_STAT 0xffc0220c /* TWI Slave Mode Status Register */
129#define TWI1_SLAVE_ADDR 0xffc02210 /* TWI Slave Mode Address Register */
130#define TWI1_MASTER_CTRL 0xffc02214 /* TWI Master Mode Control Register */
131#define TWI1_MASTER_STAT 0xffc02218 /* TWI Master Mode Status Register */
132#define TWI1_MASTER_ADDR 0xffc0221c /* TWI Master Mode Address Register */
133#define TWI1_INT_STAT 0xffc02220 /* TWI Interrupt Status Register */
134#define TWI1_INT_MASK 0xffc02224 /* TWI Interrupt Mask Register */
135#define TWI1_FIFO_CTRL 0xffc02228 /* TWI FIFO Control Register */
136#define TWI1_FIFO_STAT 0xffc0222c /* TWI FIFO Status Register */
137#define TWI1_XMT_DATA8 0xffc02280 /* TWI FIFO Transmit Data Single Byte Register */
138#define TWI1_XMT_DATA16 0xffc02284 /* TWI FIFO Transmit Data Double Byte Register */
139#define TWI1_RCV_DATA8 0xffc02288 /* TWI FIFO Receive Data Single Byte Register */
140#define TWI1_RCV_DATA16 0xffc0228c /* TWI FIFO Receive Data Double Byte Register */
141
142/* SPI2 Registers */
143
144#define SPI2_REGBASE 0xffc02400
145#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
146#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
147#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
148#define SPI2_TDBR 0xffc0240c /* SPI2 Transmit Data Buffer Register */
149#define SPI2_RDBR 0xffc02410 /* SPI2 Receive Data Buffer Register */
150#define SPI2_BAUD 0xffc02414 /* SPI2 Baud Rate Register */
151#define SPI2_SHADOW 0xffc02418 /* SPI2 Receive Data Buffer Shadow Register */
152
153/* MXVR Registers */
154
155#define MXVR_CONFIG 0xffc02700 /* MXVR Configuration Register */
156#define MXVR_STATE_0 0xffc02708 /* MXVR State Register 0 */
157#define MXVR_STATE_1 0xffc0270c /* MXVR State Register 1 */
158#define MXVR_INT_STAT_0 0xffc02710 /* MXVR Interrupt Status Register 0 */
159#define MXVR_INT_STAT_1 0xffc02714 /* MXVR Interrupt Status Register 1 */
160#define MXVR_INT_EN_0 0xffc02718 /* MXVR Interrupt Enable Register 0 */
161#define MXVR_INT_EN_1 0xffc0271c /* MXVR Interrupt Enable Register 1 */
162#define MXVR_POSITION 0xffc02720 /* MXVR Node Position Register */
163#define MXVR_MAX_POSITION 0xffc02724 /* MXVR Maximum Node Position Register */
164#define MXVR_DELAY 0xffc02728 /* MXVR Node Frame Delay Register */
165#define MXVR_MAX_DELAY 0xffc0272c /* MXVR Maximum Node Frame Delay Register */
166#define MXVR_LADDR 0xffc02730 /* MXVR Logical Address Register */
167#define MXVR_GADDR 0xffc02734 /* MXVR Group Address Register */
168#define MXVR_AADDR 0xffc02738 /* MXVR Alternate Address Register */
169
170/* MXVR Allocation Table Registers */
171
172#define MXVR_ALLOC_0 0xffc0273c /* MXVR Allocation Table Register 0 */
173#define MXVR_ALLOC_1 0xffc02740 /* MXVR Allocation Table Register 1 */
174#define MXVR_ALLOC_2 0xffc02744 /* MXVR Allocation Table Register 2 */
175#define MXVR_ALLOC_3 0xffc02748 /* MXVR Allocation Table Register 3 */
176#define MXVR_ALLOC_4 0xffc0274c /* MXVR Allocation Table Register 4 */
177#define MXVR_ALLOC_5 0xffc02750 /* MXVR Allocation Table Register 5 */
178#define MXVR_ALLOC_6 0xffc02754 /* MXVR Allocation Table Register 6 */
179#define MXVR_ALLOC_7 0xffc02758 /* MXVR Allocation Table Register 7 */
180#define MXVR_ALLOC_8 0xffc0275c /* MXVR Allocation Table Register 8 */
181#define MXVR_ALLOC_9 0xffc02760 /* MXVR Allocation Table Register 9 */
182#define MXVR_ALLOC_10 0xffc02764 /* MXVR Allocation Table Register 10 */
183#define MXVR_ALLOC_11 0xffc02768 /* MXVR Allocation Table Register 11 */
184#define MXVR_ALLOC_12 0xffc0276c /* MXVR Allocation Table Register 12 */
185#define MXVR_ALLOC_13 0xffc02770 /* MXVR Allocation Table Register 13 */
186#define MXVR_ALLOC_14 0xffc02774 /* MXVR Allocation Table Register 14 */
187
188/* MXVR Channel Assign Registers */
189
190#define MXVR_SYNC_LCHAN_0 0xffc02778 /* MXVR Sync Data Logical Channel Assign Register 0 */
191#define MXVR_SYNC_LCHAN_1 0xffc0277c /* MXVR Sync Data Logical Channel Assign Register 1 */
192#define MXVR_SYNC_LCHAN_2 0xffc02780 /* MXVR Sync Data Logical Channel Assign Register 2 */
193#define MXVR_SYNC_LCHAN_3 0xffc02784 /* MXVR Sync Data Logical Channel Assign Register 3 */
194#define MXVR_SYNC_LCHAN_4 0xffc02788 /* MXVR Sync Data Logical Channel Assign Register 4 */
195#define MXVR_SYNC_LCHAN_5 0xffc0278c /* MXVR Sync Data Logical Channel Assign Register 5 */
196#define MXVR_SYNC_LCHAN_6 0xffc02790 /* MXVR Sync Data Logical Channel Assign Register 6 */
197#define MXVR_SYNC_LCHAN_7 0xffc02794 /* MXVR Sync Data Logical Channel Assign Register 7 */
198
199/* MXVR DMA0 Registers */
200
201#define MXVR_DMA0_CONFIG 0xffc02798 /* MXVR Sync Data DMA0 Config Register */
202#define MXVR_DMA0_START_ADDR 0xffc0279c /* MXVR Sync Data DMA0 Start Address */
203#define MXVR_DMA0_COUNT 0xffc027a0 /* MXVR Sync Data DMA0 Loop Count Register */
204#define MXVR_DMA0_CURR_ADDR 0xffc027a4 /* MXVR Sync Data DMA0 Current Address */
205#define MXVR_DMA0_CURR_COUNT 0xffc027a8 /* MXVR Sync Data DMA0 Current Loop Count */
206
207/* MXVR DMA1 Registers */
208
209#define MXVR_DMA1_CONFIG 0xffc027ac /* MXVR Sync Data DMA1 Config Register */
210#define MXVR_DMA1_START_ADDR 0xffc027b0 /* MXVR Sync Data DMA1 Start Address */
211#define MXVR_DMA1_COUNT 0xffc027b4 /* MXVR Sync Data DMA1 Loop Count Register */
212#define MXVR_DMA1_CURR_ADDR 0xffc027b8 /* MXVR Sync Data DMA1 Current Address */
213#define MXVR_DMA1_CURR_COUNT 0xffc027bc /* MXVR Sync Data DMA1 Current Loop Count */
214
215/* MXVR DMA2 Registers */
216
217#define MXVR_DMA2_CONFIG 0xffc027c0 /* MXVR Sync Data DMA2 Config Register */
218#define MXVR_DMA2_START_ADDR 0xffc027c4 /* MXVR Sync Data DMA2 Start Address */
219#define MXVR_DMA2_COUNT 0xffc027c8 /* MXVR Sync Data DMA2 Loop Count Register */
220#define MXVR_DMA2_CURR_ADDR 0xffc027cc /* MXVR Sync Data DMA2 Current Address */
221#define MXVR_DMA2_CURR_COUNT 0xffc027d0 /* MXVR Sync Data DMA2 Current Loop Count */
222
223/* MXVR DMA3 Registers */
224
225#define MXVR_DMA3_CONFIG 0xffc027d4 /* MXVR Sync Data DMA3 Config Register */
226#define MXVR_DMA3_START_ADDR 0xffc027d8 /* MXVR Sync Data DMA3 Start Address */
227#define MXVR_DMA3_COUNT 0xffc027dc /* MXVR Sync Data DMA3 Loop Count Register */
228#define MXVR_DMA3_CURR_ADDR 0xffc027e0 /* MXVR Sync Data DMA3 Current Address */
229#define MXVR_DMA3_CURR_COUNT 0xffc027e4 /* MXVR Sync Data DMA3 Current Loop Count */
230
231/* MXVR DMA4 Registers */
232
233#define MXVR_DMA4_CONFIG 0xffc027e8 /* MXVR Sync Data DMA4 Config Register */
234#define MXVR_DMA4_START_ADDR 0xffc027ec /* MXVR Sync Data DMA4 Start Address */
235#define MXVR_DMA4_COUNT 0xffc027f0 /* MXVR Sync Data DMA4 Loop Count Register */
236#define MXVR_DMA4_CURR_ADDR 0xffc027f4 /* MXVR Sync Data DMA4 Current Address */
237#define MXVR_DMA4_CURR_COUNT 0xffc027f8 /* MXVR Sync Data DMA4 Current Loop Count */
238
239/* MXVR DMA5 Registers */
240
241#define MXVR_DMA5_CONFIG 0xffc027fc /* MXVR Sync Data DMA5 Config Register */
242#define MXVR_DMA5_START_ADDR 0xffc02800 /* MXVR Sync Data DMA5 Start Address */
243#define MXVR_DMA5_COUNT 0xffc02804 /* MXVR Sync Data DMA5 Loop Count Register */
244#define MXVR_DMA5_CURR_ADDR 0xffc02808 /* MXVR Sync Data DMA5 Current Address */
245#define MXVR_DMA5_CURR_COUNT 0xffc0280c /* MXVR Sync Data DMA5 Current Loop Count */
246
247/* MXVR DMA6 Registers */
248
249#define MXVR_DMA6_CONFIG 0xffc02810 /* MXVR Sync Data DMA6 Config Register */
250#define MXVR_DMA6_START_ADDR 0xffc02814 /* MXVR Sync Data DMA6 Start Address */
251#define MXVR_DMA6_COUNT 0xffc02818 /* MXVR Sync Data DMA6 Loop Count Register */
252#define MXVR_DMA6_CURR_ADDR 0xffc0281c /* MXVR Sync Data DMA6 Current Address */
253#define MXVR_DMA6_CURR_COUNT 0xffc02820 /* MXVR Sync Data DMA6 Current Loop Count */
254
255/* MXVR DMA7 Registers */
256
257#define MXVR_DMA7_CONFIG 0xffc02824 /* MXVR Sync Data DMA7 Config Register */
258#define MXVR_DMA7_START_ADDR 0xffc02828 /* MXVR Sync Data DMA7 Start Address */
259#define MXVR_DMA7_COUNT 0xffc0282c /* MXVR Sync Data DMA7 Loop Count Register */
260#define MXVR_DMA7_CURR_ADDR 0xffc02830 /* MXVR Sync Data DMA7 Current Address */
261#define MXVR_DMA7_CURR_COUNT 0xffc02834 /* MXVR Sync Data DMA7 Current Loop Count */
262
263/* MXVR Asynch Packet Registers */
264
265#define MXVR_AP_CTL 0xffc02838 /* MXVR Async Packet Control Register */
266#define MXVR_APRB_START_ADDR 0xffc0283c /* MXVR Async Packet RX Buffer Start Addr Register */
267#define MXVR_APRB_CURR_ADDR 0xffc02840 /* MXVR Async Packet RX Buffer Current Addr Register */
268#define MXVR_APTB_START_ADDR 0xffc02844 /* MXVR Async Packet TX Buffer Start Addr Register */
269#define MXVR_APTB_CURR_ADDR 0xffc02848 /* MXVR Async Packet TX Buffer Current Addr Register */
270
271/* MXVR Control Message Registers */
272
273#define MXVR_CM_CTL 0xffc0284c /* MXVR Control Message Control Register */
274#define MXVR_CMRB_START_ADDR 0xffc02850 /* MXVR Control Message RX Buffer Start Addr Register */
275#define MXVR_CMRB_CURR_ADDR 0xffc02854 /* MXVR Control Message RX Buffer Current Address */
276#define MXVR_CMTB_START_ADDR 0xffc02858 /* MXVR Control Message TX Buffer Start Addr Register */
277#define MXVR_CMTB_CURR_ADDR 0xffc0285c /* MXVR Control Message TX Buffer Current Address */
278
279/* MXVR Remote Read Registers */
280
281#define MXVR_RRDB_START_ADDR 0xffc02860 /* MXVR Remote Read Buffer Start Addr Register */
282#define MXVR_RRDB_CURR_ADDR 0xffc02864 /* MXVR Remote Read Buffer Current Addr Register */
283
284/* MXVR Pattern Data Registers */
285
286#define MXVR_PAT_DATA_0 0xffc02868 /* MXVR Pattern Data Register 0 */
287#define MXVR_PAT_EN_0 0xffc0286c /* MXVR Pattern Enable Register 0 */
288#define MXVR_PAT_DATA_1 0xffc02870 /* MXVR Pattern Data Register 1 */
289#define MXVR_PAT_EN_1 0xffc02874 /* MXVR Pattern Enable Register 1 */
290
291/* MXVR Frame Counter Registers */
292
293#define MXVR_FRAME_CNT_0 0xffc02878 /* MXVR Frame Counter 0 */
294#define MXVR_FRAME_CNT_1 0xffc0287c /* MXVR Frame Counter 1 */
295
296/* MXVR Routing Table Registers */
297
298#define MXVR_ROUTING_0 0xffc02880 /* MXVR Routing Table Register 0 */
299#define MXVR_ROUTING_1 0xffc02884 /* MXVR Routing Table Register 1 */
300#define MXVR_ROUTING_2 0xffc02888 /* MXVR Routing Table Register 2 */
301#define MXVR_ROUTING_3 0xffc0288c /* MXVR Routing Table Register 3 */
302#define MXVR_ROUTING_4 0xffc02890 /* MXVR Routing Table Register 4 */
303#define MXVR_ROUTING_5 0xffc02894 /* MXVR Routing Table Register 5 */
304#define MXVR_ROUTING_6 0xffc02898 /* MXVR Routing Table Register 6 */
305#define MXVR_ROUTING_7 0xffc0289c /* MXVR Routing Table Register 7 */
306#define MXVR_ROUTING_8 0xffc028a0 /* MXVR Routing Table Register 8 */
307#define MXVR_ROUTING_9 0xffc028a4 /* MXVR Routing Table Register 9 */
308#define MXVR_ROUTING_10 0xffc028a8 /* MXVR Routing Table Register 10 */
309#define MXVR_ROUTING_11 0xffc028ac /* MXVR Routing Table Register 11 */
310#define MXVR_ROUTING_12 0xffc028b0 /* MXVR Routing Table Register 12 */
311#define MXVR_ROUTING_13 0xffc028b4 /* MXVR Routing Table Register 13 */
312#define MXVR_ROUTING_14 0xffc028b8 /* MXVR Routing Table Register 14 */
313
314/* MXVR Counter-Clock-Control Registers */
315
316#define MXVR_BLOCK_CNT 0xffc028c0 /* MXVR Block Counter */
317#define MXVR_CLK_CTL 0xffc028d0 /* MXVR Clock Control Register */
318#define MXVR_CDRPLL_CTL 0xffc028d4 /* MXVR Clock/Data Recovery PLL Control Register */
319#define MXVR_FMPLL_CTL 0xffc028d8 /* MXVR Frequency Multiply PLL Control Register */
320#define MXVR_PIN_CTL 0xffc028dc /* MXVR Pin Control Register */
321#define MXVR_SCLK_CNT 0xffc028e0 /* MXVR System Clock Counter Register */
322
323/* CAN Controller 1 Config 1 Registers */
324
325#define CAN1_MC1 0xffc03200 /* CAN Controller 1 Mailbox Configuration Register 1 */
326#define CAN1_MD1 0xffc03204 /* CAN Controller 1 Mailbox Direction Register 1 */
327#define CAN1_TRS1 0xffc03208 /* CAN Controller 1 Transmit Request Set Register 1 */
328#define CAN1_TRR1 0xffc0320c /* CAN Controller 1 Transmit Request Reset Register 1 */
329#define CAN1_TA1 0xffc03210 /* CAN Controller 1 Transmit Acknowledge Register 1 */
330#define CAN1_AA1 0xffc03214 /* CAN Controller 1 Abort Acknowledge Register 1 */
331#define CAN1_RMP1 0xffc03218 /* CAN Controller 1 Receive Message Pending Register 1 */
332#define CAN1_RML1 0xffc0321c /* CAN Controller 1 Receive Message Lost Register 1 */
333#define CAN1_MBTIF1 0xffc03220 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 1 */
334#define CAN1_MBRIF1 0xffc03224 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 1 */
335#define CAN1_MBIM1 0xffc03228 /* CAN Controller 1 Mailbox Interrupt Mask Register 1 */
336#define CAN1_RFH1 0xffc0322c /* CAN Controller 1 Remote Frame Handling Enable Register 1 */
337#define CAN1_OPSS1 0xffc03230 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 1 */
338
339/* CAN Controller 1 Config 2 Registers */
340
341#define CAN1_MC2 0xffc03240 /* CAN Controller 1 Mailbox Configuration Register 2 */
342#define CAN1_MD2 0xffc03244 /* CAN Controller 1 Mailbox Direction Register 2 */
343#define CAN1_TRS2 0xffc03248 /* CAN Controller 1 Transmit Request Set Register 2 */
344#define CAN1_TRR2 0xffc0324c /* CAN Controller 1 Transmit Request Reset Register 2 */
345#define CAN1_TA2 0xffc03250 /* CAN Controller 1 Transmit Acknowledge Register 2 */
346#define CAN1_AA2 0xffc03254 /* CAN Controller 1 Abort Acknowledge Register 2 */
347#define CAN1_RMP2 0xffc03258 /* CAN Controller 1 Receive Message Pending Register 2 */
348#define CAN1_RML2 0xffc0325c /* CAN Controller 1 Receive Message Lost Register 2 */
349#define CAN1_MBTIF2 0xffc03260 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 2 */
350#define CAN1_MBRIF2 0xffc03264 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 2 */
351#define CAN1_MBIM2 0xffc03268 /* CAN Controller 1 Mailbox Interrupt Mask Register 2 */
352#define CAN1_RFH2 0xffc0326c /* CAN Controller 1 Remote Frame Handling Enable Register 2 */
353#define CAN1_OPSS2 0xffc03270 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 2 */
354
355/* CAN Controller 1 Clock/Interrupt/Counter Registers */
356
357#define CAN1_CLOCK 0xffc03280 /* CAN Controller 1 Clock Register */
358#define CAN1_TIMING 0xffc03284 /* CAN Controller 1 Timing Register */
359#define CAN1_DEBUG 0xffc03288 /* CAN Controller 1 Debug Register */
360#define CAN1_STATUS 0xffc0328c /* CAN Controller 1 Global Status Register */
361#define CAN1_CEC 0xffc03290 /* CAN Controller 1 Error Counter Register */
362#define CAN1_GIS 0xffc03294 /* CAN Controller 1 Global Interrupt Status Register */
363#define CAN1_GIM 0xffc03298 /* CAN Controller 1 Global Interrupt Mask Register */
364#define CAN1_GIF 0xffc0329c /* CAN Controller 1 Global Interrupt Flag Register */
365#define CAN1_CONTROL 0xffc032a0 /* CAN Controller 1 Master Control Register */
366#define CAN1_INTR 0xffc032a4 /* CAN Controller 1 Interrupt Pending Register */
367#define CAN1_MBTD 0xffc032ac /* CAN Controller 1 Mailbox Temporary Disable Register */
368#define CAN1_EWR 0xffc032b0 /* CAN Controller 1 Programmable Warning Level Register */
369#define CAN1_ESR 0xffc032b4 /* CAN Controller 1 Error Status Register */
370#define CAN1_UCCNT 0xffc032c4 /* CAN Controller 1 Universal Counter Register */
371#define CAN1_UCRC 0xffc032c8 /* CAN Controller 1 Universal Counter Force Reload Register */
372#define CAN1_UCCNF 0xffc032cc /* CAN Controller 1 Universal Counter Configuration Register */
373
374/* CAN Controller 1 Mailbox Acceptance Registers */
375
376#define CAN1_AM00L 0xffc03300 /* CAN Controller 1 Mailbox 0 Acceptance Mask High Register */
377#define CAN1_AM00H 0xffc03304 /* CAN Controller 1 Mailbox 0 Acceptance Mask Low Register */
378#define CAN1_AM01L 0xffc03308 /* CAN Controller 1 Mailbox 1 Acceptance Mask High Register */
379#define CAN1_AM01H 0xffc0330c /* CAN Controller 1 Mailbox 1 Acceptance Mask Low Register */
380#define CAN1_AM02L 0xffc03310 /* CAN Controller 1 Mailbox 2 Acceptance Mask High Register */
381#define CAN1_AM02H 0xffc03314 /* CAN Controller 1 Mailbox 2 Acceptance Mask Low Register */
382#define CAN1_AM03L 0xffc03318 /* CAN Controller 1 Mailbox 3 Acceptance Mask High Register */
383#define CAN1_AM03H 0xffc0331c /* CAN Controller 1 Mailbox 3 Acceptance Mask Low Register */
384#define CAN1_AM04L 0xffc03320 /* CAN Controller 1 Mailbox 4 Acceptance Mask High Register */
385#define CAN1_AM04H 0xffc03324 /* CAN Controller 1 Mailbox 4 Acceptance Mask Low Register */
386#define CAN1_AM05L 0xffc03328 /* CAN Controller 1 Mailbox 5 Acceptance Mask High Register */
387#define CAN1_AM05H 0xffc0332c /* CAN Controller 1 Mailbox 5 Acceptance Mask Low Register */
388#define CAN1_AM06L 0xffc03330 /* CAN Controller 1 Mailbox 6 Acceptance Mask High Register */
389#define CAN1_AM06H 0xffc03334 /* CAN Controller 1 Mailbox 6 Acceptance Mask Low Register */
390#define CAN1_AM07L 0xffc03338 /* CAN Controller 1 Mailbox 7 Acceptance Mask High Register */
391#define CAN1_AM07H 0xffc0333c /* CAN Controller 1 Mailbox 7 Acceptance Mask Low Register */
392#define CAN1_AM08L 0xffc03340 /* CAN Controller 1 Mailbox 8 Acceptance Mask High Register */
393#define CAN1_AM08H 0xffc03344 /* CAN Controller 1 Mailbox 8 Acceptance Mask Low Register */
394#define CAN1_AM09L 0xffc03348 /* CAN Controller 1 Mailbox 9 Acceptance Mask High Register */
395#define CAN1_AM09H 0xffc0334c /* CAN Controller 1 Mailbox 9 Acceptance Mask Low Register */
396#define CAN1_AM10L 0xffc03350 /* CAN Controller 1 Mailbox 10 Acceptance Mask High Register */
397#define CAN1_AM10H 0xffc03354 /* CAN Controller 1 Mailbox 10 Acceptance Mask Low Register */
398#define CAN1_AM11L 0xffc03358 /* CAN Controller 1 Mailbox 11 Acceptance Mask High Register */
399#define CAN1_AM11H 0xffc0335c /* CAN Controller 1 Mailbox 11 Acceptance Mask Low Register */
400#define CAN1_AM12L 0xffc03360 /* CAN Controller 1 Mailbox 12 Acceptance Mask High Register */
401#define CAN1_AM12H 0xffc03364 /* CAN Controller 1 Mailbox 12 Acceptance Mask Low Register */
402#define CAN1_AM13L 0xffc03368 /* CAN Controller 1 Mailbox 13 Acceptance Mask High Register */
403#define CAN1_AM13H 0xffc0336c /* CAN Controller 1 Mailbox 13 Acceptance Mask Low Register */
404#define CAN1_AM14L 0xffc03370 /* CAN Controller 1 Mailbox 14 Acceptance Mask High Register */
405#define CAN1_AM14H 0xffc03374 /* CAN Controller 1 Mailbox 14 Acceptance Mask Low Register */
406#define CAN1_AM15L 0xffc03378 /* CAN Controller 1 Mailbox 15 Acceptance Mask High Register */
407#define CAN1_AM15H 0xffc0337c /* CAN Controller 1 Mailbox 15 Acceptance Mask Low Register */
408
409/* CAN Controller 1 Mailbox Acceptance Registers */
410
411#define CAN1_AM16L 0xffc03380 /* CAN Controller 1 Mailbox 16 Acceptance Mask High Register */
412#define CAN1_AM16H 0xffc03384 /* CAN Controller 1 Mailbox 16 Acceptance Mask Low Register */
413#define CAN1_AM17L 0xffc03388 /* CAN Controller 1 Mailbox 17 Acceptance Mask High Register */
414#define CAN1_AM17H 0xffc0338c /* CAN Controller 1 Mailbox 17 Acceptance Mask Low Register */
415#define CAN1_AM18L 0xffc03390 /* CAN Controller 1 Mailbox 18 Acceptance Mask High Register */
416#define CAN1_AM18H 0xffc03394 /* CAN Controller 1 Mailbox 18 Acceptance Mask Low Register */
417#define CAN1_AM19L 0xffc03398 /* CAN Controller 1 Mailbox 19 Acceptance Mask High Register */
418#define CAN1_AM19H 0xffc0339c /* CAN Controller 1 Mailbox 19 Acceptance Mask Low Register */
419#define CAN1_AM20L 0xffc033a0 /* CAN Controller 1 Mailbox 20 Acceptance Mask High Register */
420#define CAN1_AM20H 0xffc033a4 /* CAN Controller 1 Mailbox 20 Acceptance Mask Low Register */
421#define CAN1_AM21L 0xffc033a8 /* CAN Controller 1 Mailbox 21 Acceptance Mask High Register */
422#define CAN1_AM21H 0xffc033ac /* CAN Controller 1 Mailbox 21 Acceptance Mask Low Register */
423#define CAN1_AM22L 0xffc033b0 /* CAN Controller 1 Mailbox 22 Acceptance Mask High Register */
424#define CAN1_AM22H 0xffc033b4 /* CAN Controller 1 Mailbox 22 Acceptance Mask Low Register */
425#define CAN1_AM23L 0xffc033b8 /* CAN Controller 1 Mailbox 23 Acceptance Mask High Register */
426#define CAN1_AM23H 0xffc033bc /* CAN Controller 1 Mailbox 23 Acceptance Mask Low Register */
427#define CAN1_AM24L 0xffc033c0 /* CAN Controller 1 Mailbox 24 Acceptance Mask High Register */
428#define CAN1_AM24H 0xffc033c4 /* CAN Controller 1 Mailbox 24 Acceptance Mask Low Register */
429#define CAN1_AM25L 0xffc033c8 /* CAN Controller 1 Mailbox 25 Acceptance Mask High Register */
430#define CAN1_AM25H 0xffc033cc /* CAN Controller 1 Mailbox 25 Acceptance Mask Low Register */
431#define CAN1_AM26L 0xffc033d0 /* CAN Controller 1 Mailbox 26 Acceptance Mask High Register */
432#define CAN1_AM26H 0xffc033d4 /* CAN Controller 1 Mailbox 26 Acceptance Mask Low Register */
433#define CAN1_AM27L 0xffc033d8 /* CAN Controller 1 Mailbox 27 Acceptance Mask High Register */
434#define CAN1_AM27H 0xffc033dc /* CAN Controller 1 Mailbox 27 Acceptance Mask Low Register */
435#define CAN1_AM28L 0xffc033e0 /* CAN Controller 1 Mailbox 28 Acceptance Mask High Register */
436#define CAN1_AM28H 0xffc033e4 /* CAN Controller 1 Mailbox 28 Acceptance Mask Low Register */
437#define CAN1_AM29L 0xffc033e8 /* CAN Controller 1 Mailbox 29 Acceptance Mask High Register */
438#define CAN1_AM29H 0xffc033ec /* CAN Controller 1 Mailbox 29 Acceptance Mask Low Register */
439#define CAN1_AM30L 0xffc033f0 /* CAN Controller 1 Mailbox 30 Acceptance Mask High Register */
440#define CAN1_AM30H 0xffc033f4 /* CAN Controller 1 Mailbox 30 Acceptance Mask Low Register */
441#define CAN1_AM31L 0xffc033f8 /* CAN Controller 1 Mailbox 31 Acceptance Mask High Register */
442#define CAN1_AM31H 0xffc033fc /* CAN Controller 1 Mailbox 31 Acceptance Mask Low Register */
443
444/* CAN Controller 1 Mailbox Data Registers */
445
446#define CAN1_MB00_DATA0 0xffc03400 /* CAN Controller 1 Mailbox 0 Data 0 Register */
447#define CAN1_MB00_DATA1 0xffc03404 /* CAN Controller 1 Mailbox 0 Data 1 Register */
448#define CAN1_MB00_DATA2 0xffc03408 /* CAN Controller 1 Mailbox 0 Data 2 Register */
449#define CAN1_MB00_DATA3 0xffc0340c /* CAN Controller 1 Mailbox 0 Data 3 Register */
450#define CAN1_MB00_LENGTH 0xffc03410 /* CAN Controller 1 Mailbox 0 Length Register */
451#define CAN1_MB00_TIMESTAMP 0xffc03414 /* CAN Controller 1 Mailbox 0 Timestamp Register */
452#define CAN1_MB00_ID0 0xffc03418 /* CAN Controller 1 Mailbox 0 ID0 Register */
453#define CAN1_MB00_ID1 0xffc0341c /* CAN Controller 1 Mailbox 0 ID1 Register */
454#define CAN1_MB01_DATA0 0xffc03420 /* CAN Controller 1 Mailbox 1 Data 0 Register */
455#define CAN1_MB01_DATA1 0xffc03424 /* CAN Controller 1 Mailbox 1 Data 1 Register */
456#define CAN1_MB01_DATA2 0xffc03428 /* CAN Controller 1 Mailbox 1 Data 2 Register */
457#define CAN1_MB01_DATA3 0xffc0342c /* CAN Controller 1 Mailbox 1 Data 3 Register */
458#define CAN1_MB01_LENGTH 0xffc03430 /* CAN Controller 1 Mailbox 1 Length Register */
459#define CAN1_MB01_TIMESTAMP 0xffc03434 /* CAN Controller 1 Mailbox 1 Timestamp Register */
460#define CAN1_MB01_ID0 0xffc03438 /* CAN Controller 1 Mailbox 1 ID0 Register */
461#define CAN1_MB01_ID1 0xffc0343c /* CAN Controller 1 Mailbox 1 ID1 Register */
462#define CAN1_MB02_DATA0 0xffc03440 /* CAN Controller 1 Mailbox 2 Data 0 Register */
463#define CAN1_MB02_DATA1 0xffc03444 /* CAN Controller 1 Mailbox 2 Data 1 Register */
464#define CAN1_MB02_DATA2 0xffc03448 /* CAN Controller 1 Mailbox 2 Data 2 Register */
465#define CAN1_MB02_DATA3 0xffc0344c /* CAN Controller 1 Mailbox 2 Data 3 Register */
466#define CAN1_MB02_LENGTH 0xffc03450 /* CAN Controller 1 Mailbox 2 Length Register */
467#define CAN1_MB02_TIMESTAMP 0xffc03454 /* CAN Controller 1 Mailbox 2 Timestamp Register */
468#define CAN1_MB02_ID0 0xffc03458 /* CAN Controller 1 Mailbox 2 ID0 Register */
469#define CAN1_MB02_ID1 0xffc0345c /* CAN Controller 1 Mailbox 2 ID1 Register */
470#define CAN1_MB03_DATA0 0xffc03460 /* CAN Controller 1 Mailbox 3 Data 0 Register */
471#define CAN1_MB03_DATA1 0xffc03464 /* CAN Controller 1 Mailbox 3 Data 1 Register */
472#define CAN1_MB03_DATA2 0xffc03468 /* CAN Controller 1 Mailbox 3 Data 2 Register */
473#define CAN1_MB03_DATA3 0xffc0346c /* CAN Controller 1 Mailbox 3 Data 3 Register */
474#define CAN1_MB03_LENGTH 0xffc03470 /* CAN Controller 1 Mailbox 3 Length Register */
475#define CAN1_MB03_TIMESTAMP 0xffc03474 /* CAN Controller 1 Mailbox 3 Timestamp Register */
476#define CAN1_MB03_ID0 0xffc03478 /* CAN Controller 1 Mailbox 3 ID0 Register */
477#define CAN1_MB03_ID1 0xffc0347c /* CAN Controller 1 Mailbox 3 ID1 Register */
478#define CAN1_MB04_DATA0 0xffc03480 /* CAN Controller 1 Mailbox 4 Data 0 Register */
479#define CAN1_MB04_DATA1 0xffc03484 /* CAN Controller 1 Mailbox 4 Data 1 Register */
480#define CAN1_MB04_DATA2 0xffc03488 /* CAN Controller 1 Mailbox 4 Data 2 Register */
481#define CAN1_MB04_DATA3 0xffc0348c /* CAN Controller 1 Mailbox 4 Data 3 Register */
482#define CAN1_MB04_LENGTH 0xffc03490 /* CAN Controller 1 Mailbox 4 Length Register */
483#define CAN1_MB04_TIMESTAMP 0xffc03494 /* CAN Controller 1 Mailbox 4 Timestamp Register */
484#define CAN1_MB04_ID0 0xffc03498 /* CAN Controller 1 Mailbox 4 ID0 Register */
485#define CAN1_MB04_ID1 0xffc0349c /* CAN Controller 1 Mailbox 4 ID1 Register */
486#define CAN1_MB05_DATA0 0xffc034a0 /* CAN Controller 1 Mailbox 5 Data 0 Register */
487#define CAN1_MB05_DATA1 0xffc034a4 /* CAN Controller 1 Mailbox 5 Data 1 Register */
488#define CAN1_MB05_DATA2 0xffc034a8 /* CAN Controller 1 Mailbox 5 Data 2 Register */
489#define CAN1_MB05_DATA3 0xffc034ac /* CAN Controller 1 Mailbox 5 Data 3 Register */
490#define CAN1_MB05_LENGTH 0xffc034b0 /* CAN Controller 1 Mailbox 5 Length Register */
491#define CAN1_MB05_TIMESTAMP 0xffc034b4 /* CAN Controller 1 Mailbox 5 Timestamp Register */
492#define CAN1_MB05_ID0 0xffc034b8 /* CAN Controller 1 Mailbox 5 ID0 Register */
493#define CAN1_MB05_ID1 0xffc034bc /* CAN Controller 1 Mailbox 5 ID1 Register */
494#define CAN1_MB06_DATA0 0xffc034c0 /* CAN Controller 1 Mailbox 6 Data 0 Register */
495#define CAN1_MB06_DATA1 0xffc034c4 /* CAN Controller 1 Mailbox 6 Data 1 Register */
496#define CAN1_MB06_DATA2 0xffc034c8 /* CAN Controller 1 Mailbox 6 Data 2 Register */
497#define CAN1_MB06_DATA3 0xffc034cc /* CAN Controller 1 Mailbox 6 Data 3 Register */
498#define CAN1_MB06_LENGTH 0xffc034d0 /* CAN Controller 1 Mailbox 6 Length Register */
499#define CAN1_MB06_TIMESTAMP 0xffc034d4 /* CAN Controller 1 Mailbox 6 Timestamp Register */
500#define CAN1_MB06_ID0 0xffc034d8 /* CAN Controller 1 Mailbox 6 ID0 Register */
501#define CAN1_MB06_ID1 0xffc034dc /* CAN Controller 1 Mailbox 6 ID1 Register */
502#define CAN1_MB07_DATA0 0xffc034e0 /* CAN Controller 1 Mailbox 7 Data 0 Register */
503#define CAN1_MB07_DATA1 0xffc034e4 /* CAN Controller 1 Mailbox 7 Data 1 Register */
504#define CAN1_MB07_DATA2 0xffc034e8 /* CAN Controller 1 Mailbox 7 Data 2 Register */
505#define CAN1_MB07_DATA3 0xffc034ec /* CAN Controller 1 Mailbox 7 Data 3 Register */
506#define CAN1_MB07_LENGTH 0xffc034f0 /* CAN Controller 1 Mailbox 7 Length Register */
507#define CAN1_MB07_TIMESTAMP 0xffc034f4 /* CAN Controller 1 Mailbox 7 Timestamp Register */
508#define CAN1_MB07_ID0 0xffc034f8 /* CAN Controller 1 Mailbox 7 ID0 Register */
509#define CAN1_MB07_ID1 0xffc034fc /* CAN Controller 1 Mailbox 7 ID1 Register */
510#define CAN1_MB08_DATA0 0xffc03500 /* CAN Controller 1 Mailbox 8 Data 0 Register */
511#define CAN1_MB08_DATA1 0xffc03504 /* CAN Controller 1 Mailbox 8 Data 1 Register */
512#define CAN1_MB08_DATA2 0xffc03508 /* CAN Controller 1 Mailbox 8 Data 2 Register */
513#define CAN1_MB08_DATA3 0xffc0350c /* CAN Controller 1 Mailbox 8 Data 3 Register */
514#define CAN1_MB08_LENGTH 0xffc03510 /* CAN Controller 1 Mailbox 8 Length Register */
515#define CAN1_MB08_TIMESTAMP 0xffc03514 /* CAN Controller 1 Mailbox 8 Timestamp Register */
516#define CAN1_MB08_ID0 0xffc03518 /* CAN Controller 1 Mailbox 8 ID0 Register */
517#define CAN1_MB08_ID1 0xffc0351c /* CAN Controller 1 Mailbox 8 ID1 Register */
518#define CAN1_MB09_DATA0 0xffc03520 /* CAN Controller 1 Mailbox 9 Data 0 Register */
519#define CAN1_MB09_DATA1 0xffc03524 /* CAN Controller 1 Mailbox 9 Data 1 Register */
520#define CAN1_MB09_DATA2 0xffc03528 /* CAN Controller 1 Mailbox 9 Data 2 Register */
521#define CAN1_MB09_DATA3 0xffc0352c /* CAN Controller 1 Mailbox 9 Data 3 Register */
522#define CAN1_MB09_LENGTH 0xffc03530 /* CAN Controller 1 Mailbox 9 Length Register */
523#define CAN1_MB09_TIMESTAMP 0xffc03534 /* CAN Controller 1 Mailbox 9 Timestamp Register */
524#define CAN1_MB09_ID0 0xffc03538 /* CAN Controller 1 Mailbox 9 ID0 Register */
525#define CAN1_MB09_ID1 0xffc0353c /* CAN Controller 1 Mailbox 9 ID1 Register */
526#define CAN1_MB10_DATA0 0xffc03540 /* CAN Controller 1 Mailbox 10 Data 0 Register */
527#define CAN1_MB10_DATA1 0xffc03544 /* CAN Controller 1 Mailbox 10 Data 1 Register */
528#define CAN1_MB10_DATA2 0xffc03548 /* CAN Controller 1 Mailbox 10 Data 2 Register */
529#define CAN1_MB10_DATA3 0xffc0354c /* CAN Controller 1 Mailbox 10 Data 3 Register */
530#define CAN1_MB10_LENGTH 0xffc03550 /* CAN Controller 1 Mailbox 10 Length Register */
531#define CAN1_MB10_TIMESTAMP 0xffc03554 /* CAN Controller 1 Mailbox 10 Timestamp Register */
532#define CAN1_MB10_ID0 0xffc03558 /* CAN Controller 1 Mailbox 10 ID0 Register */
533#define CAN1_MB10_ID1 0xffc0355c /* CAN Controller 1 Mailbox 10 ID1 Register */
534#define CAN1_MB11_DATA0 0xffc03560 /* CAN Controller 1 Mailbox 11 Data 0 Register */
535#define CAN1_MB11_DATA1 0xffc03564 /* CAN Controller 1 Mailbox 11 Data 1 Register */
536#define CAN1_MB11_DATA2 0xffc03568 /* CAN Controller 1 Mailbox 11 Data 2 Register */
537#define CAN1_MB11_DATA3 0xffc0356c /* CAN Controller 1 Mailbox 11 Data 3 Register */
538#define CAN1_MB11_LENGTH 0xffc03570 /* CAN Controller 1 Mailbox 11 Length Register */
539#define CAN1_MB11_TIMESTAMP 0xffc03574 /* CAN Controller 1 Mailbox 11 Timestamp Register */
540#define CAN1_MB11_ID0 0xffc03578 /* CAN Controller 1 Mailbox 11 ID0 Register */
541#define CAN1_MB11_ID1 0xffc0357c /* CAN Controller 1 Mailbox 11 ID1 Register */
542#define CAN1_MB12_DATA0 0xffc03580 /* CAN Controller 1 Mailbox 12 Data 0 Register */
543#define CAN1_MB12_DATA1 0xffc03584 /* CAN Controller 1 Mailbox 12 Data 1 Register */
544#define CAN1_MB12_DATA2 0xffc03588 /* CAN Controller 1 Mailbox 12 Data 2 Register */
545#define CAN1_MB12_DATA3 0xffc0358c /* CAN Controller 1 Mailbox 12 Data 3 Register */
546#define CAN1_MB12_LENGTH 0xffc03590 /* CAN Controller 1 Mailbox 12 Length Register */
547#define CAN1_MB12_TIMESTAMP 0xffc03594 /* CAN Controller 1 Mailbox 12 Timestamp Register */
548#define CAN1_MB12_ID0 0xffc03598 /* CAN Controller 1 Mailbox 12 ID0 Register */
549#define CAN1_MB12_ID1 0xffc0359c /* CAN Controller 1 Mailbox 12 ID1 Register */
550#define CAN1_MB13_DATA0 0xffc035a0 /* CAN Controller 1 Mailbox 13 Data 0 Register */
551#define CAN1_MB13_DATA1 0xffc035a4 /* CAN Controller 1 Mailbox 13 Data 1 Register */
552#define CAN1_MB13_DATA2 0xffc035a8 /* CAN Controller 1 Mailbox 13 Data 2 Register */
553#define CAN1_MB13_DATA3 0xffc035ac /* CAN Controller 1 Mailbox 13 Data 3 Register */
554#define CAN1_MB13_LENGTH 0xffc035b0 /* CAN Controller 1 Mailbox 13 Length Register */
555#define CAN1_MB13_TIMESTAMP 0xffc035b4 /* CAN Controller 1 Mailbox 13 Timestamp Register */
556#define CAN1_MB13_ID0 0xffc035b8 /* CAN Controller 1 Mailbox 13 ID0 Register */
557#define CAN1_MB13_ID1 0xffc035bc /* CAN Controller 1 Mailbox 13 ID1 Register */
558#define CAN1_MB14_DATA0 0xffc035c0 /* CAN Controller 1 Mailbox 14 Data 0 Register */
559#define CAN1_MB14_DATA1 0xffc035c4 /* CAN Controller 1 Mailbox 14 Data 1 Register */
560#define CAN1_MB14_DATA2 0xffc035c8 /* CAN Controller 1 Mailbox 14 Data 2 Register */
561#define CAN1_MB14_DATA3 0xffc035cc /* CAN Controller 1 Mailbox 14 Data 3 Register */
562#define CAN1_MB14_LENGTH 0xffc035d0 /* CAN Controller 1 Mailbox 14 Length Register */
563#define CAN1_MB14_TIMESTAMP 0xffc035d4 /* CAN Controller 1 Mailbox 14 Timestamp Register */
564#define CAN1_MB14_ID0 0xffc035d8 /* CAN Controller 1 Mailbox 14 ID0 Register */
565#define CAN1_MB14_ID1 0xffc035dc /* CAN Controller 1 Mailbox 14 ID1 Register */
566#define CAN1_MB15_DATA0 0xffc035e0 /* CAN Controller 1 Mailbox 15 Data 0 Register */
567#define CAN1_MB15_DATA1 0xffc035e4 /* CAN Controller 1 Mailbox 15 Data 1 Register */
568#define CAN1_MB15_DATA2 0xffc035e8 /* CAN Controller 1 Mailbox 15 Data 2 Register */
569#define CAN1_MB15_DATA3 0xffc035ec /* CAN Controller 1 Mailbox 15 Data 3 Register */
570#define CAN1_MB15_LENGTH 0xffc035f0 /* CAN Controller 1 Mailbox 15 Length Register */
571#define CAN1_MB15_TIMESTAMP 0xffc035f4 /* CAN Controller 1 Mailbox 15 Timestamp Register */
572#define CAN1_MB15_ID0 0xffc035f8 /* CAN Controller 1 Mailbox 15 ID0 Register */
573#define CAN1_MB15_ID1 0xffc035fc /* CAN Controller 1 Mailbox 15 ID1 Register */
574
575/* CAN Controller 1 Mailbox Data Registers */
576
577#define CAN1_MB16_DATA0 0xffc03600 /* CAN Controller 1 Mailbox 16 Data 0 Register */
578#define CAN1_MB16_DATA1 0xffc03604 /* CAN Controller 1 Mailbox 16 Data 1 Register */
579#define CAN1_MB16_DATA2 0xffc03608 /* CAN Controller 1 Mailbox 16 Data 2 Register */
580#define CAN1_MB16_DATA3 0xffc0360c /* CAN Controller 1 Mailbox 16 Data 3 Register */
581#define CAN1_MB16_LENGTH 0xffc03610 /* CAN Controller 1 Mailbox 16 Length Register */
582#define CAN1_MB16_TIMESTAMP 0xffc03614 /* CAN Controller 1 Mailbox 16 Timestamp Register */
583#define CAN1_MB16_ID0 0xffc03618 /* CAN Controller 1 Mailbox 16 ID0 Register */
584#define CAN1_MB16_ID1 0xffc0361c /* CAN Controller 1 Mailbox 16 ID1 Register */
585#define CAN1_MB17_DATA0 0xffc03620 /* CAN Controller 1 Mailbox 17 Data 0 Register */
586#define CAN1_MB17_DATA1 0xffc03624 /* CAN Controller 1 Mailbox 17 Data 1 Register */
587#define CAN1_MB17_DATA2 0xffc03628 /* CAN Controller 1 Mailbox 17 Data 2 Register */
588#define CAN1_MB17_DATA3 0xffc0362c /* CAN Controller 1 Mailbox 17 Data 3 Register */
589#define CAN1_MB17_LENGTH 0xffc03630 /* CAN Controller 1 Mailbox 17 Length Register */
590#define CAN1_MB17_TIMESTAMP 0xffc03634 /* CAN Controller 1 Mailbox 17 Timestamp Register */
591#define CAN1_MB17_ID0 0xffc03638 /* CAN Controller 1 Mailbox 17 ID0 Register */
592#define CAN1_MB17_ID1 0xffc0363c /* CAN Controller 1 Mailbox 17 ID1 Register */
593#define CAN1_MB18_DATA0 0xffc03640 /* CAN Controller 1 Mailbox 18 Data 0 Register */
594#define CAN1_MB18_DATA1 0xffc03644 /* CAN Controller 1 Mailbox 18 Data 1 Register */
595#define CAN1_MB18_DATA2 0xffc03648 /* CAN Controller 1 Mailbox 18 Data 2 Register */
596#define CAN1_MB18_DATA3 0xffc0364c /* CAN Controller 1 Mailbox 18 Data 3 Register */
597#define CAN1_MB18_LENGTH 0xffc03650 /* CAN Controller 1 Mailbox 18 Length Register */
598#define CAN1_MB18_TIMESTAMP 0xffc03654 /* CAN Controller 1 Mailbox 18 Timestamp Register */
599#define CAN1_MB18_ID0 0xffc03658 /* CAN Controller 1 Mailbox 18 ID0 Register */
600#define CAN1_MB18_ID1 0xffc0365c /* CAN Controller 1 Mailbox 18 ID1 Register */
601#define CAN1_MB19_DATA0 0xffc03660 /* CAN Controller 1 Mailbox 19 Data 0 Register */
602#define CAN1_MB19_DATA1 0xffc03664 /* CAN Controller 1 Mailbox 19 Data 1 Register */
603#define CAN1_MB19_DATA2 0xffc03668 /* CAN Controller 1 Mailbox 19 Data 2 Register */
604#define CAN1_MB19_DATA3 0xffc0366c /* CAN Controller 1 Mailbox 19 Data 3 Register */
605#define CAN1_MB19_LENGTH 0xffc03670 /* CAN Controller 1 Mailbox 19 Length Register */
606#define CAN1_MB19_TIMESTAMP 0xffc03674 /* CAN Controller 1 Mailbox 19 Timestamp Register */
607#define CAN1_MB19_ID0 0xffc03678 /* CAN Controller 1 Mailbox 19 ID0 Register */
608#define CAN1_MB19_ID1 0xffc0367c /* CAN Controller 1 Mailbox 19 ID1 Register */
609#define CAN1_MB20_DATA0 0xffc03680 /* CAN Controller 1 Mailbox 20 Data 0 Register */
610#define CAN1_MB20_DATA1 0xffc03684 /* CAN Controller 1 Mailbox 20 Data 1 Register */
611#define CAN1_MB20_DATA2 0xffc03688 /* CAN Controller 1 Mailbox 20 Data 2 Register */
612#define CAN1_MB20_DATA3 0xffc0368c /* CAN Controller 1 Mailbox 20 Data 3 Register */
613#define CAN1_MB20_LENGTH 0xffc03690 /* CAN Controller 1 Mailbox 20 Length Register */
614#define CAN1_MB20_TIMESTAMP 0xffc03694 /* CAN Controller 1 Mailbox 20 Timestamp Register */
615#define CAN1_MB20_ID0 0xffc03698 /* CAN Controller 1 Mailbox 20 ID0 Register */
616#define CAN1_MB20_ID1 0xffc0369c /* CAN Controller 1 Mailbox 20 ID1 Register */
617#define CAN1_MB21_DATA0 0xffc036a0 /* CAN Controller 1 Mailbox 21 Data 0 Register */
618#define CAN1_MB21_DATA1 0xffc036a4 /* CAN Controller 1 Mailbox 21 Data 1 Register */
619#define CAN1_MB21_DATA2 0xffc036a8 /* CAN Controller 1 Mailbox 21 Data 2 Register */
620#define CAN1_MB21_DATA3 0xffc036ac /* CAN Controller 1 Mailbox 21 Data 3 Register */
621#define CAN1_MB21_LENGTH 0xffc036b0 /* CAN Controller 1 Mailbox 21 Length Register */
622#define CAN1_MB21_TIMESTAMP 0xffc036b4 /* CAN Controller 1 Mailbox 21 Timestamp Register */
623#define CAN1_MB21_ID0 0xffc036b8 /* CAN Controller 1 Mailbox 21 ID0 Register */
624#define CAN1_MB21_ID1 0xffc036bc /* CAN Controller 1 Mailbox 21 ID1 Register */
625#define CAN1_MB22_DATA0 0xffc036c0 /* CAN Controller 1 Mailbox 22 Data 0 Register */
626#define CAN1_MB22_DATA1 0xffc036c4 /* CAN Controller 1 Mailbox 22 Data 1 Register */
627#define CAN1_MB22_DATA2 0xffc036c8 /* CAN Controller 1 Mailbox 22 Data 2 Register */
628#define CAN1_MB22_DATA3 0xffc036cc /* CAN Controller 1 Mailbox 22 Data 3 Register */
629#define CAN1_MB22_LENGTH 0xffc036d0 /* CAN Controller 1 Mailbox 22 Length Register */
630#define CAN1_MB22_TIMESTAMP 0xffc036d4 /* CAN Controller 1 Mailbox 22 Timestamp Register */
631#define CAN1_MB22_ID0 0xffc036d8 /* CAN Controller 1 Mailbox 22 ID0 Register */
632#define CAN1_MB22_ID1 0xffc036dc /* CAN Controller 1 Mailbox 22 ID1 Register */
633#define CAN1_MB23_DATA0 0xffc036e0 /* CAN Controller 1 Mailbox 23 Data 0 Register */
634#define CAN1_MB23_DATA1 0xffc036e4 /* CAN Controller 1 Mailbox 23 Data 1 Register */
635#define CAN1_MB23_DATA2 0xffc036e8 /* CAN Controller 1 Mailbox 23 Data 2 Register */
636#define CAN1_MB23_DATA3 0xffc036ec /* CAN Controller 1 Mailbox 23 Data 3 Register */
637#define CAN1_MB23_LENGTH 0xffc036f0 /* CAN Controller 1 Mailbox 23 Length Register */
638#define CAN1_MB23_TIMESTAMP 0xffc036f4 /* CAN Controller 1 Mailbox 23 Timestamp Register */
639#define CAN1_MB23_ID0 0xffc036f8 /* CAN Controller 1 Mailbox 23 ID0 Register */
640#define CAN1_MB23_ID1 0xffc036fc /* CAN Controller 1 Mailbox 23 ID1 Register */
641#define CAN1_MB24_DATA0 0xffc03700 /* CAN Controller 1 Mailbox 24 Data 0 Register */
642#define CAN1_MB24_DATA1 0xffc03704 /* CAN Controller 1 Mailbox 24 Data 1 Register */
643#define CAN1_MB24_DATA2 0xffc03708 /* CAN Controller 1 Mailbox 24 Data 2 Register */
644#define CAN1_MB24_DATA3 0xffc0370c /* CAN Controller 1 Mailbox 24 Data 3 Register */
645#define CAN1_MB24_LENGTH 0xffc03710 /* CAN Controller 1 Mailbox 24 Length Register */
646#define CAN1_MB24_TIMESTAMP 0xffc03714 /* CAN Controller 1 Mailbox 24 Timestamp Register */
647#define CAN1_MB24_ID0 0xffc03718 /* CAN Controller 1 Mailbox 24 ID0 Register */
648#define CAN1_MB24_ID1 0xffc0371c /* CAN Controller 1 Mailbox 24 ID1 Register */
649#define CAN1_MB25_DATA0 0xffc03720 /* CAN Controller 1 Mailbox 25 Data 0 Register */
650#define CAN1_MB25_DATA1 0xffc03724 /* CAN Controller 1 Mailbox 25 Data 1 Register */
651#define CAN1_MB25_DATA2 0xffc03728 /* CAN Controller 1 Mailbox 25 Data 2 Register */
652#define CAN1_MB25_DATA3 0xffc0372c /* CAN Controller 1 Mailbox 25 Data 3 Register */
653#define CAN1_MB25_LENGTH 0xffc03730 /* CAN Controller 1 Mailbox 25 Length Register */
654#define CAN1_MB25_TIMESTAMP 0xffc03734 /* CAN Controller 1 Mailbox 25 Timestamp Register */
655#define CAN1_MB25_ID0 0xffc03738 /* CAN Controller 1 Mailbox 25 ID0 Register */
656#define CAN1_MB25_ID1 0xffc0373c /* CAN Controller 1 Mailbox 25 ID1 Register */
657#define CAN1_MB26_DATA0 0xffc03740 /* CAN Controller 1 Mailbox 26 Data 0 Register */
658#define CAN1_MB26_DATA1 0xffc03744 /* CAN Controller 1 Mailbox 26 Data 1 Register */
659#define CAN1_MB26_DATA2 0xffc03748 /* CAN Controller 1 Mailbox 26 Data 2 Register */
660#define CAN1_MB26_DATA3 0xffc0374c /* CAN Controller 1 Mailbox 26 Data 3 Register */
661#define CAN1_MB26_LENGTH 0xffc03750 /* CAN Controller 1 Mailbox 26 Length Register */
662#define CAN1_MB26_TIMESTAMP 0xffc03754 /* CAN Controller 1 Mailbox 26 Timestamp Register */
663#define CAN1_MB26_ID0 0xffc03758 /* CAN Controller 1 Mailbox 26 ID0 Register */
664#define CAN1_MB26_ID1 0xffc0375c /* CAN Controller 1 Mailbox 26 ID1 Register */
665#define CAN1_MB27_DATA0 0xffc03760 /* CAN Controller 1 Mailbox 27 Data 0 Register */
666#define CAN1_MB27_DATA1 0xffc03764 /* CAN Controller 1 Mailbox 27 Data 1 Register */
667#define CAN1_MB27_DATA2 0xffc03768 /* CAN Controller 1 Mailbox 27 Data 2 Register */
668#define CAN1_MB27_DATA3 0xffc0376c /* CAN Controller 1 Mailbox 27 Data 3 Register */
669#define CAN1_MB27_LENGTH 0xffc03770 /* CAN Controller 1 Mailbox 27 Length Register */
670#define CAN1_MB27_TIMESTAMP 0xffc03774 /* CAN Controller 1 Mailbox 27 Timestamp Register */
671#define CAN1_MB27_ID0 0xffc03778 /* CAN Controller 1 Mailbox 27 ID0 Register */
672#define CAN1_MB27_ID1 0xffc0377c /* CAN Controller 1 Mailbox 27 ID1 Register */
673#define CAN1_MB28_DATA0 0xffc03780 /* CAN Controller 1 Mailbox 28 Data 0 Register */
674#define CAN1_MB28_DATA1 0xffc03784 /* CAN Controller 1 Mailbox 28 Data 1 Register */
675#define CAN1_MB28_DATA2 0xffc03788 /* CAN Controller 1 Mailbox 28 Data 2 Register */
676#define CAN1_MB28_DATA3 0xffc0378c /* CAN Controller 1 Mailbox 28 Data 3 Register */
677#define CAN1_MB28_LENGTH 0xffc03790 /* CAN Controller 1 Mailbox 28 Length Register */
678#define CAN1_MB28_TIMESTAMP 0xffc03794 /* CAN Controller 1 Mailbox 28 Timestamp Register */
679#define CAN1_MB28_ID0 0xffc03798 /* CAN Controller 1 Mailbox 28 ID0 Register */
680#define CAN1_MB28_ID1 0xffc0379c /* CAN Controller 1 Mailbox 28 ID1 Register */
681#define CAN1_MB29_DATA0 0xffc037a0 /* CAN Controller 1 Mailbox 29 Data 0 Register */
682#define CAN1_MB29_DATA1 0xffc037a4 /* CAN Controller 1 Mailbox 29 Data 1 Register */
683#define CAN1_MB29_DATA2 0xffc037a8 /* CAN Controller 1 Mailbox 29 Data 2 Register */
684#define CAN1_MB29_DATA3 0xffc037ac /* CAN Controller 1 Mailbox 29 Data 3 Register */
685#define CAN1_MB29_LENGTH 0xffc037b0 /* CAN Controller 1 Mailbox 29 Length Register */
686#define CAN1_MB29_TIMESTAMP 0xffc037b4 /* CAN Controller 1 Mailbox 29 Timestamp Register */
687#define CAN1_MB29_ID0 0xffc037b8 /* CAN Controller 1 Mailbox 29 ID0 Register */
688#define CAN1_MB29_ID1 0xffc037bc /* CAN Controller 1 Mailbox 29 ID1 Register */
689#define CAN1_MB30_DATA0 0xffc037c0 /* CAN Controller 1 Mailbox 30 Data 0 Register */
690#define CAN1_MB30_DATA1 0xffc037c4 /* CAN Controller 1 Mailbox 30 Data 1 Register */
691#define CAN1_MB30_DATA2 0xffc037c8 /* CAN Controller 1 Mailbox 30 Data 2 Register */
692#define CAN1_MB30_DATA3 0xffc037cc /* CAN Controller 1 Mailbox 30 Data 3 Register */
693#define CAN1_MB30_LENGTH 0xffc037d0 /* CAN Controller 1 Mailbox 30 Length Register */
694#define CAN1_MB30_TIMESTAMP 0xffc037d4 /* CAN Controller 1 Mailbox 30 Timestamp Register */
695#define CAN1_MB30_ID0 0xffc037d8 /* CAN Controller 1 Mailbox 30 ID0 Register */
696#define CAN1_MB30_ID1 0xffc037dc /* CAN Controller 1 Mailbox 30 ID1 Register */
697#define CAN1_MB31_DATA0 0xffc037e0 /* CAN Controller 1 Mailbox 31 Data 0 Register */
698#define CAN1_MB31_DATA1 0xffc037e4 /* CAN Controller 1 Mailbox 31 Data 1 Register */
699#define CAN1_MB31_DATA2 0xffc037e8 /* CAN Controller 1 Mailbox 31 Data 2 Register */
700#define CAN1_MB31_DATA3 0xffc037ec /* CAN Controller 1 Mailbox 31 Data 3 Register */
701#define CAN1_MB31_LENGTH 0xffc037f0 /* CAN Controller 1 Mailbox 31 Length Register */
702#define CAN1_MB31_TIMESTAMP 0xffc037f4 /* CAN Controller 1 Mailbox 31 Timestamp Register */
703#define CAN1_MB31_ID0 0xffc037f8 /* CAN Controller 1 Mailbox 31 ID0 Register */
704#define CAN1_MB31_ID1 0xffc037fc /* CAN Controller 1 Mailbox 31 ID1 Register */
705
706/* ATAPI Registers */
707
708#define ATAPI_CONTROL 0xffc03800 /* ATAPI Control Register */
709#define ATAPI_STATUS 0xffc03804 /* ATAPI Status Register */
710#define ATAPI_DEV_ADDR 0xffc03808 /* ATAPI Device Register Address */
711#define ATAPI_DEV_TXBUF 0xffc0380c /* ATAPI Device Register Write Data */
712#define ATAPI_DEV_RXBUF 0xffc03810 /* ATAPI Device Register Read Data */
713#define ATAPI_INT_MASK 0xffc03814 /* ATAPI Interrupt Mask Register */
714#define ATAPI_INT_STATUS 0xffc03818 /* ATAPI Interrupt Status Register */
715#define ATAPI_XFER_LEN 0xffc0381c /* ATAPI Length of Transfer */
716#define ATAPI_LINE_STATUS 0xffc03820 /* ATAPI Line Status */
717#define ATAPI_SM_STATE 0xffc03824 /* ATAPI State Machine Status */
718#define ATAPI_TERMINATE 0xffc03828 /* ATAPI Host Terminate */
719#define ATAPI_PIO_TFRCNT 0xffc0382c /* ATAPI PIO mode transfer count */
720#define ATAPI_DMA_TFRCNT 0xffc03830 /* ATAPI DMA mode transfer count */
721#define ATAPI_UMAIN_TFRCNT 0xffc03834 /* ATAPI UDMAIN transfer count */
722#define ATAPI_UDMAOUT_TFRCNT 0xffc03838 /* ATAPI UDMAOUT transfer count */
723#define ATAPI_REG_TIM_0 0xffc03840 /* ATAPI Register Transfer Timing 0 */
724#define ATAPI_PIO_TIM_0 0xffc03844 /* ATAPI PIO Timing 0 Register */
725#define ATAPI_PIO_TIM_1 0xffc03848 /* ATAPI PIO Timing 1 Register */
726#define ATAPI_MULTI_TIM_0 0xffc03850 /* ATAPI Multi-DMA Timing 0 Register */
727#define ATAPI_MULTI_TIM_1 0xffc03854 /* ATAPI Multi-DMA Timing 1 Register */
728#define ATAPI_MULTI_TIM_2 0xffc03858 /* ATAPI Multi-DMA Timing 2 Register */
729#define ATAPI_ULTRA_TIM_0 0xffc03860 /* ATAPI Ultra-DMA Timing 0 Register */
730#define ATAPI_ULTRA_TIM_1 0xffc03864 /* ATAPI Ultra-DMA Timing 1 Register */
731#define ATAPI_ULTRA_TIM_2 0xffc03868 /* ATAPI Ultra-DMA Timing 2 Register */
732#define ATAPI_ULTRA_TIM_3 0xffc0386c /* ATAPI Ultra-DMA Timing 3 Register */
733
734/* SDH Registers */
735
736#define SDH_PWR_CTL 0xffc03900 /* SDH Power Control */
737#define SDH_CLK_CTL 0xffc03904 /* SDH Clock Control */
738#define SDH_ARGUMENT 0xffc03908 /* SDH Argument */
739#define SDH_COMMAND 0xffc0390c /* SDH Command */
740#define SDH_RESP_CMD 0xffc03910 /* SDH Response Command */
741#define SDH_RESPONSE0 0xffc03914 /* SDH Response0 */
742#define SDH_RESPONSE1 0xffc03918 /* SDH Response1 */
743#define SDH_RESPONSE2 0xffc0391c /* SDH Response2 */
744#define SDH_RESPONSE3 0xffc03920 /* SDH Response3 */
745#define SDH_DATA_TIMER 0xffc03924 /* SDH Data Timer */
746#define SDH_DATA_LGTH 0xffc03928 /* SDH Data Length */
747#define SDH_DATA_CTL 0xffc0392c /* SDH Data Control */
748#define SDH_DATA_CNT 0xffc03930 /* SDH Data Counter */
749#define SDH_STATUS 0xffc03934 /* SDH Status */
750#define SDH_STATUS_CLR 0xffc03938 /* SDH Status Clear */
751#define SDH_MASK0 0xffc0393c /* SDH Interrupt0 Mask */
752#define SDH_MASK1 0xffc03940 /* SDH Interrupt1 Mask */
753#define SDH_FIFO_CNT 0xffc03948 /* SDH FIFO Counter */
754#define SDH_FIFO 0xffc03980 /* SDH Data FIFO */
755#define SDH_E_STATUS 0xffc039c0 /* SDH Exception Status */
756#define SDH_E_MASK 0xffc039c4 /* SDH Exception Mask */
757#define SDH_CFG 0xffc039c8 /* SDH Configuration */
758#define SDH_RD_WAIT_EN 0xffc039cc /* SDH Read Wait Enable */
759#define SDH_PID0 0xffc039d0 /* SDH Peripheral Identification0 */
760#define SDH_PID1 0xffc039d4 /* SDH Peripheral Identification1 */
761#define SDH_PID2 0xffc039d8 /* SDH Peripheral Identification2 */
762#define SDH_PID3 0xffc039dc /* SDH Peripheral Identification3 */
763#define SDH_PID4 0xffc039e0 /* SDH Peripheral Identification4 */
764#define SDH_PID5 0xffc039e4 /* SDH Peripheral Identification5 */
765#define SDH_PID6 0xffc039e8 /* SDH Peripheral Identification6 */
766#define SDH_PID7 0xffc039ec /* SDH Peripheral Identification7 */
767
768/* HOST Port Registers */
769
770#define HOST_CONTROL 0xffc03a00 /* HOST Control Register */
771#define HOST_STATUS 0xffc03a04 /* HOST Status Register */
772#define HOST_TIMEOUT 0xffc03a08 /* HOST Acknowledge Mode Timeout Register */
773
774/* USB Control Registers */
775
776#define USB_FADDR 0xffc03c00 /* Function address register */
777#define USB_POWER 0xffc03c04 /* Power management register */
778#define USB_INTRTX 0xffc03c08 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
779#define USB_INTRRX 0xffc03c0c /* Interrupt register for Rx endpoints 1 to 7 */
780#define USB_INTRTXE 0xffc03c10 /* Interrupt enable register for IntrTx */
781#define USB_INTRRXE 0xffc03c14 /* Interrupt enable register for IntrRx */
782#define USB_INTRUSB 0xffc03c18 /* Interrupt register for common USB interrupts */
783#define USB_INTRUSBE 0xffc03c1c /* Interrupt enable register for IntrUSB */
784#define USB_FRAME 0xffc03c20 /* USB frame number */
785#define USB_INDEX 0xffc03c24 /* Index register for selecting the indexed endpoint registers */
786#define USB_TESTMODE 0xffc03c28 /* Enabled USB 20 test modes */
787#define USB_GLOBINTR 0xffc03c2c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
788#define USB_GLOBAL_CTL 0xffc03c30 /* Global Clock Control for the core */
789
790/* USB Packet Control Registers */
791
792#define USB_TX_MAX_PACKET 0xffc03c40 /* Maximum packet size for Host Tx endpoint */
793#define USB_CSR0 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
794#define USB_TXCSR 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
795#define USB_RX_MAX_PACKET 0xffc03c48 /* Maximum packet size for Host Rx endpoint */
796#define USB_RXCSR 0xffc03c4c /* Control Status register for Host Rx endpoint */
797#define USB_COUNT0 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
798#define USB_RXCOUNT 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
799#define USB_TXTYPE 0xffc03c54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
800#define USB_NAKLIMIT0 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
801#define USB_TXINTERVAL 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
802#define USB_RXTYPE 0xffc03c5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
803#define USB_RXINTERVAL 0xffc03c60 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
804#define USB_TXCOUNT 0xffc03c68 /* Number of bytes to be written to the selected endpoint Tx FIFO */
805
806/* USB Endpoint FIFO Registers */
807
808#define USB_EP0_FIFO 0xffc03c80 /* Endpoint 0 FIFO */
809#define USB_EP1_FIFO 0xffc03c88 /* Endpoint 1 FIFO */
810#define USB_EP2_FIFO 0xffc03c90 /* Endpoint 2 FIFO */
811#define USB_EP3_FIFO 0xffc03c98 /* Endpoint 3 FIFO */
812#define USB_EP4_FIFO 0xffc03ca0 /* Endpoint 4 FIFO */
813#define USB_EP5_FIFO 0xffc03ca8 /* Endpoint 5 FIFO */
814#define USB_EP6_FIFO 0xffc03cb0 /* Endpoint 6 FIFO */
815#define USB_EP7_FIFO 0xffc03cb8 /* Endpoint 7 FIFO */
816
817/* USB OTG Control Registers */
818
819#define USB_OTG_DEV_CTL 0xffc03d00 /* OTG Device Control Register */
820#define USB_OTG_VBUS_IRQ 0xffc03d04 /* OTG VBUS Control Interrupts */
821#define USB_OTG_VBUS_MASK 0xffc03d08 /* VBUS Control Interrupt Enable */
822
823/* USB Phy Control Registers */
824
825#define USB_LINKINFO 0xffc03d48 /* Enables programming of some PHY-side delays */
826#define USB_VPLEN 0xffc03d4c /* Determines duration of VBUS pulse for VBUS charging */
827#define USB_HS_EOF1 0xffc03d50 /* Time buffer for High-Speed transactions */
828#define USB_FS_EOF1 0xffc03d54 /* Time buffer for Full-Speed transactions */
829#define USB_LS_EOF1 0xffc03d58 /* Time buffer for Low-Speed transactions */
830
831/* (APHY_CNTRL is for ADI usage only) */
832
833#define USB_APHY_CNTRL 0xffc03de0 /* Register that increases visibility of Analog PHY */
834
835/* (APHY_CALIB is for ADI usage only) */
836
837#define USB_APHY_CALIB 0xffc03de4 /* Register used to set some calibration values */
838#define USB_APHY_CNTRL2 0xffc03de8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
839
840/* (PHY_TEST is for ADI usage only) */
841
842#define USB_PHY_TEST 0xffc03dec /* Used for reducing simulation time and simplifies FIFO testability */
843#define USB_PLLOSC_CTRL 0xffc03df0 /* Used to program different parameters for USB PLL and Oscillator */
844#define USB_SRP_CLKDIV 0xffc03df4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
845
846/* USB Endpoint 0 Control Registers */
847
848#define USB_EP_NI0_TXMAXP 0xffc03e00 /* Maximum packet size for Host Tx endpoint0 */
849#define USB_EP_NI0_TXCSR 0xffc03e04 /* Control Status register for endpoint 0 */
850#define USB_EP_NI0_RXMAXP 0xffc03e08 /* Maximum packet size for Host Rx endpoint0 */
851#define USB_EP_NI0_RXCSR 0xffc03e0c /* Control Status register for Host Rx endpoint0 */
852#define USB_EP_NI0_RXCOUNT 0xffc03e10 /* Number of bytes received in endpoint 0 FIFO */
853#define USB_EP_NI0_TXTYPE 0xffc03e14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
854#define USB_EP_NI0_TXINTERVAL 0xffc03e18 /* Sets the NAK response timeout on Endpoint 0 */
855#define USB_EP_NI0_RXTYPE 0xffc03e1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
856#define USB_EP_NI0_RXINTERVAL 0xffc03e20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
857
858/* USB Endpoint 1 Control Registers */
859
860#define USB_EP_NI0_TXCOUNT 0xffc03e28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
861#define USB_EP_NI1_TXMAXP 0xffc03e40 /* Maximum packet size for Host Tx endpoint1 */
862#define USB_EP_NI1_TXCSR 0xffc03e44 /* Control Status register for endpoint1 */
863#define USB_EP_NI1_RXMAXP 0xffc03e48 /* Maximum packet size for Host Rx endpoint1 */
864#define USB_EP_NI1_RXCSR 0xffc03e4c /* Control Status register for Host Rx endpoint1 */
865#define USB_EP_NI1_RXCOUNT 0xffc03e50 /* Number of bytes received in endpoint1 FIFO */
866#define USB_EP_NI1_TXTYPE 0xffc03e54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
867#define USB_EP_NI1_TXINTERVAL 0xffc03e58 /* Sets the NAK response timeout on Endpoint1 */
868#define USB_EP_NI1_RXTYPE 0xffc03e5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
869#define USB_EP_NI1_RXINTERVAL 0xffc03e60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
870
871/* USB Endpoint 2 Control Registers */
872
873#define USB_EP_NI1_TXCOUNT 0xffc03e68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
874#define USB_EP_NI2_TXMAXP 0xffc03e80 /* Maximum packet size for Host Tx endpoint2 */
875#define USB_EP_NI2_TXCSR 0xffc03e84 /* Control Status register for endpoint2 */
876#define USB_EP_NI2_RXMAXP 0xffc03e88 /* Maximum packet size for Host Rx endpoint2 */
877#define USB_EP_NI2_RXCSR 0xffc03e8c /* Control Status register for Host Rx endpoint2 */
878#define USB_EP_NI2_RXCOUNT 0xffc03e90 /* Number of bytes received in endpoint2 FIFO */
879#define USB_EP_NI2_TXTYPE 0xffc03e94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
880#define USB_EP_NI2_TXINTERVAL 0xffc03e98 /* Sets the NAK response timeout on Endpoint2 */
881#define USB_EP_NI2_RXTYPE 0xffc03e9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
882#define USB_EP_NI2_RXINTERVAL 0xffc03ea0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
883
884/* USB Endpoint 3 Control Registers */
885
886#define USB_EP_NI2_TXCOUNT 0xffc03ea8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
887#define USB_EP_NI3_TXMAXP 0xffc03ec0 /* Maximum packet size for Host Tx endpoint3 */
888#define USB_EP_NI3_TXCSR 0xffc03ec4 /* Control Status register for endpoint3 */
889#define USB_EP_NI3_RXMAXP 0xffc03ec8 /* Maximum packet size for Host Rx endpoint3 */
890#define USB_EP_NI3_RXCSR 0xffc03ecc /* Control Status register for Host Rx endpoint3 */
891#define USB_EP_NI3_RXCOUNT 0xffc03ed0 /* Number of bytes received in endpoint3 FIFO */
892#define USB_EP_NI3_TXTYPE 0xffc03ed4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
893#define USB_EP_NI3_TXINTERVAL 0xffc03ed8 /* Sets the NAK response timeout on Endpoint3 */
894#define USB_EP_NI3_RXTYPE 0xffc03edc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
895#define USB_EP_NI3_RXINTERVAL 0xffc03ee0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
896
897/* USB Endpoint 4 Control Registers */
898
899#define USB_EP_NI3_TXCOUNT 0xffc03ee8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
900#define USB_EP_NI4_TXMAXP 0xffc03f00 /* Maximum packet size for Host Tx endpoint4 */
901#define USB_EP_NI4_TXCSR 0xffc03f04 /* Control Status register for endpoint4 */
902#define USB_EP_NI4_RXMAXP 0xffc03f08 /* Maximum packet size for Host Rx endpoint4 */
903#define USB_EP_NI4_RXCSR 0xffc03f0c /* Control Status register for Host Rx endpoint4 */
904#define USB_EP_NI4_RXCOUNT 0xffc03f10 /* Number of bytes received in endpoint4 FIFO */
905#define USB_EP_NI4_TXTYPE 0xffc03f14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
906#define USB_EP_NI4_TXINTERVAL 0xffc03f18 /* Sets the NAK response timeout on Endpoint4 */
907#define USB_EP_NI4_RXTYPE 0xffc03f1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
908#define USB_EP_NI4_RXINTERVAL 0xffc03f20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
909
910/* USB Endpoint 5 Control Registers */
911
912#define USB_EP_NI4_TXCOUNT 0xffc03f28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
913#define USB_EP_NI5_TXMAXP 0xffc03f40 /* Maximum packet size for Host Tx endpoint5 */
914#define USB_EP_NI5_TXCSR 0xffc03f44 /* Control Status register for endpoint5 */
915#define USB_EP_NI5_RXMAXP 0xffc03f48 /* Maximum packet size for Host Rx endpoint5 */
916#define USB_EP_NI5_RXCSR 0xffc03f4c /* Control Status register for Host Rx endpoint5 */
917#define USB_EP_NI5_RXCOUNT 0xffc03f50 /* Number of bytes received in endpoint5 FIFO */
918#define USB_EP_NI5_TXTYPE 0xffc03f54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
919#define USB_EP_NI5_TXINTERVAL 0xffc03f58 /* Sets the NAK response timeout on Endpoint5 */
920#define USB_EP_NI5_RXTYPE 0xffc03f5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
921#define USB_EP_NI5_RXINTERVAL 0xffc03f60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
922
923/* USB Endpoint 6 Control Registers */
924
925#define USB_EP_NI5_TXCOUNT 0xffc03f68 /* Number of bytes to be written to the H145endpoint5 Tx FIFO */
926#define USB_EP_NI6_TXMAXP 0xffc03f80 /* Maximum packet size for Host Tx endpoint6 */
927#define USB_EP_NI6_TXCSR 0xffc03f84 /* Control Status register for endpoint6 */
928#define USB_EP_NI6_RXMAXP 0xffc03f88 /* Maximum packet size for Host Rx endpoint6 */
929#define USB_EP_NI6_RXCSR 0xffc03f8c /* Control Status register for Host Rx endpoint6 */
930#define USB_EP_NI6_RXCOUNT 0xffc03f90 /* Number of bytes received in endpoint6 FIFO */
931#define USB_EP_NI6_TXTYPE 0xffc03f94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
932#define USB_EP_NI6_TXINTERVAL 0xffc03f98 /* Sets the NAK response timeout on Endpoint6 */
933#define USB_EP_NI6_RXTYPE 0xffc03f9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
934#define USB_EP_NI6_RXINTERVAL 0xffc03fa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
935
936/* USB Endpoint 7 Control Registers */
937
938#define USB_EP_NI6_TXCOUNT 0xffc03fa8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
939#define USB_EP_NI7_TXMAXP 0xffc03fc0 /* Maximum packet size for Host Tx endpoint7 */
940#define USB_EP_NI7_TXCSR 0xffc03fc4 /* Control Status register for endpoint7 */
941#define USB_EP_NI7_RXMAXP 0xffc03fc8 /* Maximum packet size for Host Rx endpoint7 */
942#define USB_EP_NI7_RXCSR 0xffc03fcc /* Control Status register for Host Rx endpoint7 */
943#define USB_EP_NI7_RXCOUNT 0xffc03fd0 /* Number of bytes received in endpoint7 FIFO */
944#define USB_EP_NI7_TXTYPE 0xffc03fd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
945#define USB_EP_NI7_TXINTERVAL 0xffc03fd8 /* Sets the NAK response timeout on Endpoint7 */
946#define USB_EP_NI7_RXTYPE 0xffc03fdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
947#define USB_EP_NI7_RXINTERVAL 0xffc03ff0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
948#define USB_EP_NI7_TXCOUNT 0xffc03ff8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
949#define USB_DMA_INTERRUPT 0xffc04000 /* Indicates pending interrupts for the DMA channels */
950
951/* USB Channel 0 Config Registers */
952
953#define USB_DMA0CONTROL 0xffc04004 /* DMA master channel 0 configuration */
954#define USB_DMA0ADDRLOW 0xffc04008 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
955#define USB_DMA0ADDRHIGH 0xffc0400c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
956#define USB_DMA0COUNTLOW 0xffc04010 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
957#define USB_DMA0COUNTHIGH 0xffc04014 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
958
959/* USB Channel 1 Config Registers */
960
961#define USB_DMA1CONTROL 0xffc04024 /* DMA master channel 1 configuration */
962#define USB_DMA1ADDRLOW 0xffc04028 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
963#define USB_DMA1ADDRHIGH 0xffc0402c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
964#define USB_DMA1COUNTLOW 0xffc04030 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
965#define USB_DMA1COUNTHIGH 0xffc04034 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
966
967/* USB Channel 2 Config Registers */
968
969#define USB_DMA2CONTROL 0xffc04044 /* DMA master channel 2 configuration */
970#define USB_DMA2ADDRLOW 0xffc04048 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
971#define USB_DMA2ADDRHIGH 0xffc0404c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
972#define USB_DMA2COUNTLOW 0xffc04050 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
973#define USB_DMA2COUNTHIGH 0xffc04054 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
974
975/* USB Channel 3 Config Registers */
976
977#define USB_DMA3CONTROL 0xffc04064 /* DMA master channel 3 configuration */
978#define USB_DMA3ADDRLOW 0xffc04068 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
979#define USB_DMA3ADDRHIGH 0xffc0406c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
980#define USB_DMA3COUNTLOW 0xffc04070 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
981#define USB_DMA3COUNTHIGH 0xffc04074 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
982
983/* USB Channel 4 Config Registers */
984
985#define USB_DMA4CONTROL 0xffc04084 /* DMA master channel 4 configuration */
986#define USB_DMA4ADDRLOW 0xffc04088 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
987#define USB_DMA4ADDRHIGH 0xffc0408c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
988#define USB_DMA4COUNTLOW 0xffc04090 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
989#define USB_DMA4COUNTHIGH 0xffc04094 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
990
991/* USB Channel 5 Config Registers */
992
993#define USB_DMA5CONTROL 0xffc040a4 /* DMA master channel 5 configuration */
994#define USB_DMA5ADDRLOW 0xffc040a8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
995#define USB_DMA5ADDRHIGH 0xffc040ac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
996#define USB_DMA5COUNTLOW 0xffc040b0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
997#define USB_DMA5COUNTHIGH 0xffc040b4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
998
999/* USB Channel 6 Config Registers */
1000
1001#define USB_DMA6CONTROL 0xffc040c4 /* DMA master channel 6 configuration */
1002#define USB_DMA6ADDRLOW 0xffc040c8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
1003#define USB_DMA6ADDRHIGH 0xffc040cc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
1004#define USB_DMA6COUNTLOW 0xffc040d0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
1005#define USB_DMA6COUNTHIGH 0xffc040d4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
1006
1007/* USB Channel 7 Config Registers */
1008
1009#define USB_DMA7CONTROL 0xffc040e4 /* DMA master channel 7 configuration */
1010#define USB_DMA7ADDRLOW 0xffc040e8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
1011#define USB_DMA7ADDRHIGH 0xffc040ec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
1012#define USB_DMA7COUNTLOW 0xffc040f0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
1013#define USB_DMA7COUNTHIGH 0xffc040f4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
1014
1015/* Keypad Registers */
1016
1017#define KPAD_CTL 0xffc04100 /* Controls keypad module enable and disable */
1018#define KPAD_PRESCALE 0xffc04104 /* Establish a time base for programing the KPAD_MSEL register */
1019#define KPAD_MSEL 0xffc04108 /* Selects delay parameters for keypad interface sensitivity */
1020#define KPAD_ROWCOL 0xffc0410c /* Captures the row and column output values of the keys pressed */
1021#define KPAD_STAT 0xffc04110 /* Holds and clears the status of the keypad interface interrupt */
1022#define KPAD_SOFTEVAL 0xffc04114 /* Lets software force keypad interface to check for keys being pressed */
1023
1024/* Pixel Compositor (PIXC) Registers */
1025
1026#define PIXC_CTL 0xffc04400 /* Overlay enable, resampling mode, I/O data format, transparency enable, watermark level, FIFO status */
1027#define PIXC_PPL 0xffc04404 /* Holds the number of pixels per line of the display */
1028#define PIXC_LPF 0xffc04408 /* Holds the number of lines per frame of the display */
1029#define PIXC_AHSTART 0xffc0440c /* Contains horizontal start pixel information of the overlay data (set A) */
1030#define PIXC_AHEND 0xffc04410 /* Contains horizontal end pixel information of the overlay data (set A) */
1031#define PIXC_AVSTART 0xffc04414 /* Contains vertical start pixel information of the overlay data (set A) */
1032#define PIXC_AVEND 0xffc04418 /* Contains vertical end pixel information of the overlay data (set A) */
1033#define PIXC_ATRANSP 0xffc0441c /* Contains the transparency ratio (set A) */
1034#define PIXC_BHSTART 0xffc04420 /* Contains horizontal start pixel information of the overlay data (set B) */
1035#define PIXC_BHEND 0xffc04424 /* Contains horizontal end pixel information of the overlay data (set B) */
1036#define PIXC_BVSTART 0xffc04428 /* Contains vertical start pixel information of the overlay data (set B) */
1037#define PIXC_BVEND 0xffc0442c /* Contains vertical end pixel information of the overlay data (set B) */
1038#define PIXC_BTRANSP 0xffc04430 /* Contains the transparency ratio (set B) */
1039#define PIXC_INTRSTAT 0xffc0443c /* Overlay interrupt configuration/status */
1040#define PIXC_RYCON 0xffc04440 /* Color space conversion matrix register. Contains the R/Y conversion coefficients */
1041#define PIXC_GUCON 0xffc04444 /* Color space conversion matrix register. Contains the G/U conversion coefficients */
1042#define PIXC_BVCON 0xffc04448 /* Color space conversion matrix register. Contains the B/V conversion coefficients */
1043#define PIXC_CCBIAS 0xffc0444c /* Bias values for the color space conversion matrix */
1044#define PIXC_TC 0xffc04450 /* Holds the transparent color value */
1045
1046/* Handshake MDMA 0 Registers */
1047
1048#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
1049#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
1050#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
1051#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */
1052#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
1053#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
1054#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
1055
1056/* Handshake MDMA 1 Registers */
1057
1058#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
1059#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
1060#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
1061#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */
1062#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
1063#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
1064#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
1065
1066
1067/* ********************************************************** */
1068/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
1069/* and MULTI BIT READ MACROS */
1070/* ********************************************************** */
1071
1072/* Bit masks for PIXC_CTL */
1073
1074#define PIXC_EN 0x1 /* Pixel Compositor Enable */
1075#define OVR_A_EN 0x2 /* Overlay A Enable */
1076#define OVR_B_EN 0x4 /* Overlay B Enable */
1077#define IMG_FORM 0x8 /* Image Data Format */
1078#define OVR_FORM 0x10 /* Overlay Data Format */
1079#define OUT_FORM 0x20 /* Output Data Format */
1080#define UDS_MOD 0x40 /* Resampling Mode */
1081#define TC_EN 0x80 /* Transparent Color Enable */
1082#define IMG_STAT 0x300 /* Image FIFO Status */
1083#define OVR_STAT 0xc00 /* Overlay FIFO Status */
1084#define WM_LVL 0x3000 /* FIFO Watermark Level */
1085
1086/* Bit masks for PIXC_AHSTART */
1087
1088#define A_HSTART 0xfff /* Horizontal Start Coordinates */
1089
1090/* Bit masks for PIXC_AHEND */
1091
1092#define A_HEND 0xfff /* Horizontal End Coordinates */
1093
1094/* Bit masks for PIXC_AVSTART */
1095
1096#define A_VSTART 0x3ff /* Vertical Start Coordinates */
1097
1098/* Bit masks for PIXC_AVEND */
1099
1100#define A_VEND 0x3ff /* Vertical End Coordinates */
1101
1102/* Bit masks for PIXC_ATRANSP */
1103
1104#define A_TRANSP 0xf /* Transparency Value */
1105
1106/* Bit masks for PIXC_BHSTART */
1107
1108#define B_HSTART 0xfff /* Horizontal Start Coordinates */
1109
1110/* Bit masks for PIXC_BHEND */
1111
1112#define B_HEND 0xfff /* Horizontal End Coordinates */
1113
1114/* Bit masks for PIXC_BVSTART */
1115
1116#define B_VSTART 0x3ff /* Vertical Start Coordinates */
1117
1118/* Bit masks for PIXC_BVEND */
1119
1120#define B_VEND 0x3ff /* Vertical End Coordinates */
1121
1122/* Bit masks for PIXC_BTRANSP */
1123
1124#define B_TRANSP 0xf /* Transparency Value */
1125
1126/* Bit masks for PIXC_INTRSTAT */
1127
1128#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
1129#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
1130#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
1131#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
1132
1133/* Bit masks for PIXC_RYCON */
1134
1135#define A11 0x3ff /* A11 in the Coefficient Matrix */
1136#define A12 0xffc00 /* A12 in the Coefficient Matrix */
1137#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
1138#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
1139
1140/* Bit masks for PIXC_GUCON */
1141
1142#define A21 0x3ff /* A21 in the Coefficient Matrix */
1143#define A22 0xffc00 /* A22 in the Coefficient Matrix */
1144#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
1145#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
1146
1147/* Bit masks for PIXC_BVCON */
1148
1149#define A31 0x3ff /* A31 in the Coefficient Matrix */
1150#define A32 0xffc00 /* A32 in the Coefficient Matrix */
1151#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
1152#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
1153
1154/* Bit masks for PIXC_CCBIAS */
1155
1156#define A14 0x3ff /* A14 in the Bias Vector */
1157#define A24 0xffc00 /* A24 in the Bias Vector */
1158#define A34 0x3ff00000 /* A34 in the Bias Vector */
1159
1160/* Bit masks for PIXC_TC */
1161
1162#define RY_TRANS 0xff /* Transparent Color - R/Y Component */
1163#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
1164#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
1165
1166/* Bit masks for HOST_CONTROL */
1167
1168#define HOST_EN 0x1 /* Host Enable */
1169#define HOST_END 0x2 /* Host Endianess */
1170#define DATA_SIZE 0x4 /* Data Size */
1171#define HOST_RST 0x8 /* Host Reset */
1172#define HRDY_OVR 0x20 /* Host Ready Override */
1173#define INT_MODE 0x40 /* Interrupt Mode */
1174#define BT_EN 0x80 /* Bus Timeout Enable */
1175#define EHW 0x100 /* Enable Host Write */
1176#define EHR 0x200 /* Enable Host Read */
1177#define BDR 0x400 /* Burst DMA Requests */
1178
1179/* Bit masks for HOST_STATUS */
1180
1181#define DMA_READY 0x1 /* DMA Ready */
1182#define FIFOFULL 0x2 /* FIFO Full */
1183#define FIFOEMPTY 0x4 /* FIFO Empty */
1184#define DMA_COMPLETE 0x8 /* DMA Complete */
1185#define HSHK 0x10 /* Host Handshake */
1186#define TIMEOUT 0x20 /* Host Timeout */
1187#define HIRQ 0x40 /* Host Interrupt Request */
1188#define ALLOW_CNFG 0x80 /* Allow New Configuration */
1189#define DMA_DIR 0x100 /* DMA Direction */
1190#define BTE 0x200 /* Bus Timeout Enabled */
1191
1192/* Bit masks for HOST_TIMEOUT */
1193
1194#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
1195
1196/* Bit masks for MXVR_CONFIG */
1197
1198#define MXVREN 0x1 /* MXVR Enable */
1199#define MMSM 0x2 /* MXVR Master/Slave Mode Select */
1200#define ACTIVE 0x4 /* Active Mode */
1201#define SDELAY 0x8 /* Synchronous Data Delay */
1202#define NCMRXEN 0x10 /* Normal Control Message Receive Enable */
1203#define RWRRXEN 0x20 /* Remote Write Receive Enable */
1204#define MTXEN 0x40 /* MXVR Transmit Data Enable */
1205#define MTXONB 0x80 /* MXVR Phy Transmitter On */
1206#define EPARITY 0x100 /* Even Parity Select */
1207#define MSB 0x1e00 /* Master Synchronous Boundary */
1208#define APRXEN 0x2000 /* Asynchronous Packet Receive Enable */
1209#define WAKEUP 0x4000 /* Wake-Up */
1210#define LMECH 0x8000 /* Lock Mechanism Select */
1211
1212/* Bit masks for MXVR_STATE_0 */
1213
1214#define NACT 0x1 /* Network Activity */
1215#define SBLOCK 0x2 /* Super Block Lock */
1216#define FMPLLST 0xc /* Frequency Multiply PLL SM State */
1217#define CDRPLLST 0xe0 /* Clock/Data Recovery PLL SM State */
1218#define APBSY 0x100 /* Asynchronous Packet Transmit Buffer Busy */
1219#define APARB 0x200 /* Asynchronous Packet Arbitrating */
1220#define APTX 0x400 /* Asynchronous Packet Transmitting */
1221#define APRX 0x800 /* Receiving Asynchronous Packet */
1222#define CMBSY 0x1000 /* Control Message Transmit Buffer Busy */
1223#define CMARB 0x2000 /* Control Message Arbitrating */
1224#define CMTX 0x4000 /* Control Message Transmitting */
1225#define CMRX 0x8000 /* Receiving Control Message */
1226#define MRXONB 0x10000 /* MRXONB Pin State */
1227#define RGSIP 0x20000 /* Remote Get Source In Progress */
1228#define DALIP 0x40000 /* Resource Deallocate In Progress */
1229#define ALIP 0x80000 /* Resource Allocate In Progress */
1230#define RRDIP 0x100000 /* Remote Read In Progress */
1231#define RWRIP 0x200000 /* Remote Write In Progress */
1232#define FLOCK 0x400000 /* Frame Lock */
1233#define BLOCK 0x800000 /* Block Lock */
1234#define RSB 0xf000000 /* Received Synchronous Boundary */
1235#define DERRNUM 0xf0000000 /* DMA Error Channel Number */
1236
1237/* Bit masks for MXVR_STATE_1 */
1238
1239#define SRXNUMB 0xf /* Synchronous Receive FIFO Number of Bytes */
1240#define STXNUMB 0xf0 /* Synchronous Transmit FIFO Number of Bytes */
1241#define APCONT 0x100 /* Asynchronous Packet Continuation */
1242#define OBERRNUM 0xe00 /* DMA Out of Bounds Error Channel Number */
1243#define DMAACTIVE0 0x10000 /* DMA0 Active */
1244#define DMAACTIVE1 0x20000 /* DMA1 Active */
1245#define DMAACTIVE2 0x40000 /* DMA2 Active */
1246#define DMAACTIVE3 0x80000 /* DMA3 Active */
1247#define DMAACTIVE4 0x100000 /* DMA4 Active */
1248#define DMAACTIVE5 0x200000 /* DMA5 Active */
1249#define DMAACTIVE6 0x400000 /* DMA6 Active */
1250#define DMAACTIVE7 0x800000 /* DMA7 Active */
1251#define DMAPMEN0 0x1000000 /* DMA0 Pattern Matching Enabled */
1252#define DMAPMEN1 0x2000000 /* DMA1 Pattern Matching Enabled */
1253#define DMAPMEN2 0x4000000 /* DMA2 Pattern Matching Enabled */
1254#define DMAPMEN3 0x8000000 /* DMA3 Pattern Matching Enabled */
1255#define DMAPMEN4 0x10000000 /* DMA4 Pattern Matching Enabled */
1256#define DMAPMEN5 0x20000000 /* DMA5 Pattern Matching Enabled */
1257#define DMAPMEN6 0x40000000 /* DMA6 Pattern Matching Enabled */
1258#define DMAPMEN7 0x80000000 /* DMA7 Pattern Matching Enabled */
1259
1260/* Bit masks for MXVR_INT_STAT_0 */
1261
1262#define NI2A 0x1 /* Network Inactive to Active */
1263#define NA2I 0x2 /* Network Active to Inactive */
1264#define SBU2L 0x4 /* Super Block Unlock to Lock */
1265#define SBL2U 0x8 /* Super Block Lock to Unlock */
1266#define PRU 0x10 /* Position Register Updated */
1267#define MPRU 0x20 /* Maximum Position Register Updated */
1268#define DRU 0x40 /* Delay Register Updated */
1269#define MDRU 0x80 /* Maximum Delay Register Updated */
1270#define SBU 0x100 /* Synchronous Boundary Updated */
1271#define ATU 0x200 /* Allocation Table Updated */
1272#define FCZ0 0x400 /* Frame Counter 0 Zero */
1273#define FCZ1 0x800 /* Frame Counter 1 Zero */
1274#define PERR 0x1000 /* Parity Error */
1275#define MH2L 0x2000 /* MRXONB High to Low */
1276#define ML2H 0x4000 /* MRXONB Low to High */
1277#define WUP 0x8000 /* Wake-Up Preamble Received */
1278#define FU2L 0x10000 /* Frame Unlock to Lock */
1279#define FL2U 0x20000 /* Frame Lock to Unlock */
1280#define BU2L 0x40000 /* Block Unlock to Lock */
1281#define BL2U 0x80000 /* Block Lock to Unlock */
1282#define OBERR 0x100000 /* DMA Out of Bounds Error */
1283#define PFL 0x200000 /* PLL Frequency Locked */
1284#define SCZ 0x400000 /* System Clock Counter Zero */
1285#define FERR 0x800000 /* FIFO Error */
1286#define CMR 0x1000000 /* Control Message Received */
1287#define CMROF 0x2000000 /* Control Message Receive Buffer Overflow */
1288#define CMTS 0x4000000 /* Control Message Transmit Buffer Successfully Sent */
1289#define CMTC 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled */
1290#define RWRC 0x10000000 /* Remote Write Control Message Completed */
1291#define BCZ 0x20000000 /* Block Counter Zero */
1292#define BMERR 0x40000000 /* Biphase Mark Coding Error */
1293#define DERR 0x80000000 /* DMA Error */
1294
1295/* Bit masks for MXVR_INT_STAT_1 */
1296
1297#define HDONE0 0x1 /* DMA0 Half Done */
1298#define DONE0 0x2 /* DMA0 Done */
1299#define APR 0x4 /* Asynchronous Packet Received */
1300#define APROF 0x8 /* Asynchronous Packet Receive Buffer Overflow */
1301#define HDONE1 0x10 /* DMA1 Half Done */
1302#define DONE1 0x20 /* DMA1 Done */
1303#define APTS 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent */
1304#define APTC 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled */
1305#define HDONE2 0x100 /* DMA2 Half Done */
1306#define DONE2 0x200 /* DMA2 Done */
1307#define APRCE 0x400 /* Asynchronous Packet Receive CRC Error */
1308#define APRPE 0x800 /* Asynchronous Packet Receive Packet Error */
1309#define HDONE3 0x1000 /* DMA3 Half Done */
1310#define DONE3 0x2000 /* DMA3 Done */
1311#define HDONE4 0x10000 /* DMA4 Half Done */
1312#define DONE4 0x20000 /* DMA4 Done */
1313#define HDONE5 0x100000 /* DMA5 Half Done */
1314#define DONE5 0x200000 /* DMA5 Done */
1315#define HDONE6 0x1000000 /* DMA6 Half Done */
1316#define DONE6 0x2000000 /* DMA6 Done */
1317#define HDONE7 0x10000000 /* DMA7 Half Done */
1318#define DONE7 0x20000000 /* DMA7 Done */
1319
1320/* Bit masks for MXVR_INT_EN_0 */
1321
1322#define NI2AEN 0x1 /* Network Inactive to Active Interrupt Enable */
1323#define NA2IEN 0x2 /* Network Active to Inactive Interrupt Enable */
1324#define SBU2LEN 0x4 /* Super Block Unlock to Lock Interrupt Enable */
1325#define SBL2UEN 0x8 /* Super Block Lock to Unlock Interrupt Enable */
1326#define PRUEN 0x10 /* Position Register Updated Interrupt Enable */
1327#define MPRUEN 0x20 /* Maximum Position Register Updated Interrupt Enable */
1328#define DRUEN 0x40 /* Delay Register Updated Interrupt Enable */
1329#define MDRUEN 0x80 /* Maximum Delay Register Updated Interrupt Enable */
1330#define SBUEN 0x100 /* Synchronous Boundary Updated Interrupt Enable */
1331#define ATUEN 0x200 /* Allocation Table Updated Interrupt Enable */
1332#define FCZ0EN 0x400 /* Frame Counter 0 Zero Interrupt Enable */
1333#define FCZ1EN 0x800 /* Frame Counter 1 Zero Interrupt Enable */
1334#define PERREN 0x1000 /* Parity Error Interrupt Enable */
1335#define MH2LEN 0x2000 /* MRXONB High to Low Interrupt Enable */
1336#define ML2HEN 0x4000 /* MRXONB Low to High Interrupt Enable */
1337#define WUPEN 0x8000 /* Wake-Up Preamble Received Interrupt Enable */
1338#define FU2LEN 0x10000 /* Frame Unlock to Lock Interrupt Enable */
1339#define FL2UEN 0x20000 /* Frame Lock to Unlock Interrupt Enable */
1340#define BU2LEN 0x40000 /* Block Unlock to Lock Interrupt Enable */
1341#define BL2UEN 0x80000 /* Block Lock to Unlock Interrupt Enable */
1342#define OBERREN 0x100000 /* DMA Out of Bounds Error Interrupt Enable */
1343#define PFLEN 0x200000 /* PLL Frequency Locked Interrupt Enable */
1344#define SCZEN 0x400000 /* System Clock Counter Zero Interrupt Enable */
1345#define FERREN 0x800000 /* FIFO Error Interrupt Enable */
1346#define CMREN 0x1000000 /* Control Message Received Interrupt Enable */
1347#define CMROFEN 0x2000000 /* Control Message Receive Buffer Overflow Interrupt Enable */
1348#define CMTSEN 0x4000000 /* Control Message Transmit Buffer Successfully Sent Interrupt Enable */
1349#define CMTCEN 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled Interrupt Enable */
1350#define RWRCEN 0x10000000 /* Remote Write Control Message Completed Interrupt Enable */
1351#define BCZEN 0x20000000 /* Block Counter Zero Interrupt Enable */
1352#define BMERREN 0x40000000 /* Biphase Mark Coding Error Interrupt Enable */
1353#define DERREN 0x80000000 /* DMA Error Interrupt Enable */
1354
1355/* Bit masks for MXVR_INT_EN_1 */
1356
1357#define HDONEEN0 0x1 /* DMA0 Half Done Interrupt Enable */
1358#define DONEEN0 0x2 /* DMA0 Done Interrupt Enable */
1359#define APREN 0x4 /* Asynchronous Packet Received Interrupt Enable */
1360#define APROFEN 0x8 /* Asynchronous Packet Receive Buffer Overflow Interrupt Enable */
1361#define HDONEEN1 0x10 /* DMA1 Half Done Interrupt Enable */
1362#define DONEEN1 0x20 /* DMA1 Done Interrupt Enable */
1363#define APTSEN 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent Interrupt Enable */
1364#define APTCEN 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled Interrupt Enable */
1365#define HDONEEN2 0x100 /* DMA2 Half Done Interrupt Enable */
1366#define DONEEN2 0x200 /* DMA2 Done Interrupt Enable */
1367#define APRCEEN 0x400 /* Asynchronous Packet Receive CRC Error Interrupt Enable */
1368#define APRPEEN 0x800 /* Asynchronous Packet Receive Packet Error Interrupt Enable */
1369#define HDONEEN3 0x1000 /* DMA3 Half Done Interrupt Enable */
1370#define DONEEN3 0x2000 /* DMA3 Done Interrupt Enable */
1371#define HDONEEN4 0x10000 /* DMA4 Half Done Interrupt Enable */
1372#define DONEEN4 0x20000 /* DMA4 Done Interrupt Enable */
1373#define HDONEEN5 0x100000 /* DMA5 Half Done Interrupt Enable */
1374#define DONEEN5 0x200000 /* DMA5 Done Interrupt Enable */
1375#define HDONEEN6 0x1000000 /* DMA6 Half Done Interrupt Enable */
1376#define DONEEN6 0x2000000 /* DMA6 Done Interrupt Enable */
1377#define HDONEEN7 0x10000000 /* DMA7 Half Done Interrupt Enable */
1378#define DONEEN7 0x20000000 /* DMA7 Done Interrupt Enable */
1379
1380/* Bit masks for MXVR_POSITION */
1381
1382#define POSITION 0x3f /* Node Position */
1383#define PVALID 0x8000 /* Node Position Valid */
1384
1385/* Bit masks for MXVR_MAX_POSITION */
1386
1387#define MPOSITION 0x3f /* Maximum Node Position */
1388#define MPVALID 0x8000 /* Maximum Node Position Valid */
1389
1390/* Bit masks for MXVR_DELAY */
1391
1392#define DELAY 0x3f /* Node Frame Delay */
1393#define DVALID 0x8000 /* Node Frame Delay Valid */
1394
1395/* Bit masks for MXVR_MAX_DELAY */
1396
1397#define MDELAY 0x3f /* Maximum Node Frame Delay */
1398#define MDVALID 0x8000 /* Maximum Node Frame Delay Valid */
1399
1400/* Bit masks for MXVR_LADDR */
1401
1402#define LADDR 0xffff /* Logical Address */
1403#define LVALID 0x80000000 /* Logical Address Valid */
1404
1405/* Bit masks for MXVR_GADDR */
1406
1407#define GADDRL 0xff /* Group Address Lower Byte */
1408#define GVALID 0x8000 /* Group Address Valid */
1409
1410/* Bit masks for MXVR_AADDR */
1411
1412#define AADDR 0xffff /* Alternate Address */
1413#define AVALID 0x80000000 /* Alternate Address Valid */
1414
1415/* Bit masks for MXVR_ALLOC_0 */
1416
1417#define CL0 0x7f /* Channel 0 Connection Label */
1418#define CIU0 0x80 /* Channel 0 In Use */
1419#define CL1 0x7f00 /* Channel 0 Connection Label */
1420#define CIU1 0x8000 /* Channel 0 In Use */
1421#define CL2 0x7f0000 /* Channel 0 Connection Label */
1422#define CIU2 0x800000 /* Channel 0 In Use */
1423#define CL3 0x7f000000 /* Channel 0 Connection Label */
1424#define CIU3 0x80000000 /* Channel 0 In Use */
1425
1426/* Bit masks for MXVR_ALLOC_1 */
1427
1428#define CL4 0x7f /* Channel 4 Connection Label */
1429#define CIU4 0x80 /* Channel 4 In Use */
1430#define CL5 0x7f00 /* Channel 5 Connection Label */
1431#define CIU5 0x8000 /* Channel 5 In Use */
1432#define CL6 0x7f0000 /* Channel 6 Connection Label */
1433#define CIU6 0x800000 /* Channel 6 In Use */
1434#define CL7 0x7f000000 /* Channel 7 Connection Label */
1435#define CIU7 0x80000000 /* Channel 7 In Use */
1436
1437/* Bit masks for MXVR_ALLOC_2 */
1438
1439#define CL8 0x7f /* Channel 8 Connection Label */
1440#define CIU8 0x80 /* Channel 8 In Use */
1441#define CL9 0x7f00 /* Channel 9 Connection Label */
1442#define CIU9 0x8000 /* Channel 9 In Use */
1443#define CL10 0x7f0000 /* Channel 10 Connection Label */
1444#define CIU10 0x800000 /* Channel 10 In Use */
1445#define CL11 0x7f000000 /* Channel 11 Connection Label */
1446#define CIU11 0x80000000 /* Channel 11 In Use */
1447
1448/* Bit masks for MXVR_ALLOC_3 */
1449
1450#define CL12 0x7f /* Channel 12 Connection Label */
1451#define CIU12 0x80 /* Channel 12 In Use */
1452#define CL13 0x7f00 /* Channel 13 Connection Label */
1453#define CIU13 0x8000 /* Channel 13 In Use */
1454#define CL14 0x7f0000 /* Channel 14 Connection Label */
1455#define CIU14 0x800000 /* Channel 14 In Use */
1456#define CL15 0x7f000000 /* Channel 15 Connection Label */
1457#define CIU15 0x80000000 /* Channel 15 In Use */
1458
1459/* Bit masks for MXVR_ALLOC_4 */
1460
1461#define CL16 0x7f /* Channel 16 Connection Label */
1462#define CIU16 0x80 /* Channel 16 In Use */
1463#define CL17 0x7f00 /* Channel 17 Connection Label */
1464#define CIU17 0x8000 /* Channel 17 In Use */
1465#define CL18 0x7f0000 /* Channel 18 Connection Label */
1466#define CIU18 0x800000 /* Channel 18 In Use */
1467#define CL19 0x7f000000 /* Channel 19 Connection Label */
1468#define CIU19 0x80000000 /* Channel 19 In Use */
1469
1470/* Bit masks for MXVR_ALLOC_5 */
1471
1472#define CL20 0x7f /* Channel 20 Connection Label */
1473#define CIU20 0x80 /* Channel 20 In Use */
1474#define CL21 0x7f00 /* Channel 21 Connection Label */
1475#define CIU21 0x8000 /* Channel 21 In Use */
1476#define CL22 0x7f0000 /* Channel 22 Connection Label */
1477#define CIU22 0x800000 /* Channel 22 In Use */
1478#define CL23 0x7f000000 /* Channel 23 Connection Label */
1479#define CIU23 0x80000000 /* Channel 23 In Use */
1480
1481/* Bit masks for MXVR_ALLOC_6 */
1482
1483#define CL24 0x7f /* Channel 24 Connection Label */
1484#define CIU24 0x80 /* Channel 24 In Use */
1485#define CL25 0x7f00 /* Channel 25 Connection Label */
1486#define CIU25 0x8000 /* Channel 25 In Use */
1487#define CL26 0x7f0000 /* Channel 26 Connection Label */
1488#define CIU26 0x800000 /* Channel 26 In Use */
1489#define CL27 0x7f000000 /* Channel 27 Connection Label */
1490#define CIU27 0x80000000 /* Channel 27 In Use */
1491
1492/* Bit masks for MXVR_ALLOC_7 */
1493
1494#define CL28 0x7f /* Channel 28 Connection Label */
1495#define CIU28 0x80 /* Channel 28 In Use */
1496#define CL29 0x7f00 /* Channel 29 Connection Label */
1497#define CIU29 0x8000 /* Channel 29 In Use */
1498#define CL30 0x7f0000 /* Channel 30 Connection Label */
1499#define CIU30 0x800000 /* Channel 30 In Use */
1500#define CL31 0x7f000000 /* Channel 31 Connection Label */
1501#define CIU31 0x80000000 /* Channel 31 In Use */
1502
1503/* Bit masks for MXVR_ALLOC_8 */
1504
1505#define CL32 0x7f /* Channel 32 Connection Label */
1506#define CIU32 0x80 /* Channel 32 In Use */
1507#define CL33 0x7f00 /* Channel 33 Connection Label */
1508#define CIU33 0x8000 /* Channel 33 In Use */
1509#define CL34 0x7f0000 /* Channel 34 Connection Label */
1510#define CIU34 0x800000 /* Channel 34 In Use */
1511#define CL35 0x7f000000 /* Channel 35 Connection Label */
1512#define CIU35 0x80000000 /* Channel 35 In Use */
1513
1514/* Bit masks for MXVR_ALLOC_9 */
1515
1516#define CL36 0x7f /* Channel 36 Connection Label */
1517#define CIU36 0x80 /* Channel 36 In Use */
1518#define CL37 0x7f00 /* Channel 37 Connection Label */
1519#define CIU37 0x8000 /* Channel 37 In Use */
1520#define CL38 0x7f0000 /* Channel 38 Connection Label */
1521#define CIU38 0x800000 /* Channel 38 In Use */
1522#define CL39 0x7f000000 /* Channel 39 Connection Label */
1523#define CIU39 0x80000000 /* Channel 39 In Use */
1524
1525/* Bit masks for MXVR_ALLOC_10 */
1526
1527#define CL40 0x7f /* Channel 40 Connection Label */
1528#define CIU40 0x80 /* Channel 40 In Use */
1529#define CL41 0x7f00 /* Channel 41 Connection Label */
1530#define CIU41 0x8000 /* Channel 41 In Use */
1531#define CL42 0x7f0000 /* Channel 42 Connection Label */
1532#define CIU42 0x800000 /* Channel 42 In Use */
1533#define CL43 0x7f000000 /* Channel 43 Connection Label */
1534#define CIU43 0x80000000 /* Channel 43 In Use */
1535
1536/* Bit masks for MXVR_ALLOC_11 */
1537
1538#define CL44 0x7f /* Channel 44 Connection Label */
1539#define CIU44 0x80 /* Channel 44 In Use */
1540#define CL45 0x7f00 /* Channel 45 Connection Label */
1541#define CIU45 0x8000 /* Channel 45 In Use */
1542#define CL46 0x7f0000 /* Channel 46 Connection Label */
1543#define CIU46 0x800000 /* Channel 46 In Use */
1544#define CL47 0x7f000000 /* Channel 47 Connection Label */
1545#define CIU47 0x80000000 /* Channel 47 In Use */
1546
1547/* Bit masks for MXVR_ALLOC_12 */
1548
1549#define CL48 0x7f /* Channel 48 Connection Label */
1550#define CIU48 0x80 /* Channel 48 In Use */
1551#define CL49 0x7f00 /* Channel 49 Connection Label */
1552#define CIU49 0x8000 /* Channel 49 In Use */
1553#define CL50 0x7f0000 /* Channel 50 Connection Label */
1554#define CIU50 0x800000 /* Channel 50 In Use */
1555#define CL51 0x7f000000 /* Channel 51 Connection Label */
1556#define CIU51 0x80000000 /* Channel 51 In Use */
1557
1558/* Bit masks for MXVR_ALLOC_13 */
1559
1560#define CL52 0x7f /* Channel 52 Connection Label */
1561#define CIU52 0x80 /* Channel 52 In Use */
1562#define CL53 0x7f00 /* Channel 53 Connection Label */
1563#define CIU53 0x8000 /* Channel 53 In Use */
1564#define CL54 0x7f0000 /* Channel 54 Connection Label */
1565#define CIU54 0x800000 /* Channel 54 In Use */
1566#define CL55 0x7f000000 /* Channel 55 Connection Label */
1567#define CIU55 0x80000000 /* Channel 55 In Use */
1568
1569/* Bit masks for MXVR_ALLOC_14 */
1570
1571#define CL56 0x7f /* Channel 56 Connection Label */
1572#define CIU56 0x80 /* Channel 56 In Use */
1573#define CL57 0x7f00 /* Channel 57 Connection Label */
1574#define CIU57 0x8000 /* Channel 57 In Use */
1575#define CL58 0x7f0000 /* Channel 58 Connection Label */
1576#define CIU58 0x800000 /* Channel 58 In Use */
1577#define CL59 0x7f000000 /* Channel 59 Connection Label */
1578#define CIU59 0x80000000 /* Channel 59 In Use */
1579
1580/* MXVR_SYNC_LCHAN_0 Masks */
1581
1582#define LCHANPC0 0x0000000Flu
1583#define LCHANPC1 0x000000F0lu
1584#define LCHANPC2 0x00000F00lu
1585#define LCHANPC3 0x0000F000lu
1586#define LCHANPC4 0x000F0000lu
1587#define LCHANPC5 0x00F00000lu
1588#define LCHANPC6 0x0F000000lu
1589#define LCHANPC7 0xF0000000lu
1590
1591
1592/* MXVR_SYNC_LCHAN_1 Masks */
1593
1594#define LCHANPC8 0x0000000Flu
1595#define LCHANPC9 0x000000F0lu
1596#define LCHANPC10 0x00000F00lu
1597#define LCHANPC11 0x0000F000lu
1598#define LCHANPC12 0x000F0000lu
1599#define LCHANPC13 0x00F00000lu
1600#define LCHANPC14 0x0F000000lu
1601#define LCHANPC15 0xF0000000lu
1602
1603
1604/* MXVR_SYNC_LCHAN_2 Masks */
1605
1606#define LCHANPC16 0x0000000Flu
1607#define LCHANPC17 0x000000F0lu
1608#define LCHANPC18 0x00000F00lu
1609#define LCHANPC19 0x0000F000lu
1610#define LCHANPC20 0x000F0000lu
1611#define LCHANPC21 0x00F00000lu
1612#define LCHANPC22 0x0F000000lu
1613#define LCHANPC23 0xF0000000lu
1614
1615
1616/* MXVR_SYNC_LCHAN_3 Masks */
1617
1618#define LCHANPC24 0x0000000Flu
1619#define LCHANPC25 0x000000F0lu
1620#define LCHANPC26 0x00000F00lu
1621#define LCHANPC27 0x0000F000lu
1622#define LCHANPC28 0x000F0000lu
1623#define LCHANPC29 0x00F00000lu
1624#define LCHANPC30 0x0F000000lu
1625#define LCHANPC31 0xF0000000lu
1626
1627
1628/* MXVR_SYNC_LCHAN_4 Masks */
1629
1630#define LCHANPC32 0x0000000Flu
1631#define LCHANPC33 0x000000F0lu
1632#define LCHANPC34 0x00000F00lu
1633#define LCHANPC35 0x0000F000lu
1634#define LCHANPC36 0x000F0000lu
1635#define LCHANPC37 0x00F00000lu
1636#define LCHANPC38 0x0F000000lu
1637#define LCHANPC39 0xF0000000lu
1638
1639
1640/* MXVR_SYNC_LCHAN_5 Masks */
1641
1642#define LCHANPC40 0x0000000Flu
1643#define LCHANPC41 0x000000F0lu
1644#define LCHANPC42 0x00000F00lu
1645#define LCHANPC43 0x0000F000lu
1646#define LCHANPC44 0x000F0000lu
1647#define LCHANPC45 0x00F00000lu
1648#define LCHANPC46 0x0F000000lu
1649#define LCHANPC47 0xF0000000lu
1650
1651
1652/* MXVR_SYNC_LCHAN_6 Masks */
1653
1654#define LCHANPC48 0x0000000Flu
1655#define LCHANPC49 0x000000F0lu
1656#define LCHANPC50 0x00000F00lu
1657#define LCHANPC51 0x0000F000lu
1658#define LCHANPC52 0x000F0000lu
1659#define LCHANPC53 0x00F00000lu
1660#define LCHANPC54 0x0F000000lu
1661#define LCHANPC55 0xF0000000lu
1662
1663
1664/* MXVR_SYNC_LCHAN_7 Masks */
1665
1666#define LCHANPC56 0x0000000Flu
1667#define LCHANPC57 0x000000F0lu
1668#define LCHANPC58 0x00000F00lu
1669#define LCHANPC59 0x0000F000lu
1670
1671/* Bit masks for MXVR_DMAx_CONFIG */
1672
1673#define MDMAEN 0x1 /* DMA Channel Enable */
1674#define DMADD 0x2 /* DMA Channel Direction */
1675#define BY4SWAPEN 0x20 /* DMA Channel Four Byte Swap Enable */
1676#define LCHAN 0x3c0 /* DMA Channel Logical Channel */
1677#define BITSWAPEN 0x400 /* DMA Channel Bit Swap Enable */
1678#define BY2SWAPEN 0x800 /* DMA Channel Two Byte Swap Enable */
1679#define MFLOW 0x7000 /* DMA Channel Operation Flow */
1680#define FIXEDPM 0x80000 /* DMA Channel Fixed Pattern Matching Select */
1681#define STARTPAT 0x300000 /* DMA Channel Start Pattern Select */
1682#define STOPPAT 0xc00000 /* DMA Channel Stop Pattern Select */
1683#define COUNTPOS 0x1c000000 /* DMA Channel Count Position */
1684
1685/* Bit masks for MXVR_AP_CTL */
1686
1687#define STARTAP 0x1 /* Start Asynchronous Packet Transmission */
1688#define CANCELAP 0x2 /* Cancel Asynchronous Packet Transmission */
1689#define RESETAP 0x4 /* Reset Asynchronous Packet Arbitration */
1690#define APRBE0 0x4000 /* Asynchronous Packet Receive Buffer Entry 0 */
1691#define APRBE1 0x8000 /* Asynchronous Packet Receive Buffer Entry 1 */
1692
1693/* Bit masks for MXVR_APRB_START_ADDR */
1694
1695#define MXVR_APRB_START_ADDR_MASK 0x1fffffe /* Asynchronous Packet Receive Buffer Start Address */
1696
1697/* Bit masks for MXVR_APRB_CURR_ADDR */
1698
1699#define MXVR_APRB_CURR_ADDR_MASK 0xffffffff /* Asynchronous Packet Receive Buffer Current Address */
1700
1701/* Bit masks for MXVR_APTB_START_ADDR */
1702
1703#define MXVR_APTB_START_ADDR_MASK 0x1fffffe /* Asynchronous Packet Transmit Buffer Start Address */
1704
1705/* Bit masks for MXVR_APTB_CURR_ADDR */
1706
1707#define MXVR_APTB_CURR_ADDR_MASK 0xffffffff /* Asynchronous Packet Transmit Buffer Current Address */
1708
1709/* Bit masks for MXVR_CM_CTL */
1710
1711#define STARTCM 0x1 /* Start Control Message Transmission */
1712#define CANCELCM 0x2 /* Cancel Control Message Transmission */
1713#define CMRBE0 0x10000 /* Control Message Receive Buffer Entry 0 */
1714#define CMRBE1 0x20000 /* Control Message Receive Buffer Entry 1 */
1715#define CMRBE2 0x40000 /* Control Message Receive Buffer Entry 2 */
1716#define CMRBE3 0x80000 /* Control Message Receive Buffer Entry 3 */
1717#define CMRBE4 0x100000 /* Control Message Receive Buffer Entry 4 */
1718#define CMRBE5 0x200000 /* Control Message Receive Buffer Entry 5 */
1719#define CMRBE6 0x400000 /* Control Message Receive Buffer Entry 6 */
1720#define CMRBE7 0x800000 /* Control Message Receive Buffer Entry 7 */
1721#define CMRBE8 0x1000000 /* Control Message Receive Buffer Entry 8 */
1722#define CMRBE9 0x2000000 /* Control Message Receive Buffer Entry 9 */
1723#define CMRBE10 0x4000000 /* Control Message Receive Buffer Entry 10 */
1724#define CMRBE11 0x8000000 /* Control Message Receive Buffer Entry 11 */
1725#define CMRBE12 0x10000000 /* Control Message Receive Buffer Entry 12 */
1726#define CMRBE13 0x20000000 /* Control Message Receive Buffer Entry 13 */
1727#define CMRBE14 0x40000000 /* Control Message Receive Buffer Entry 14 */
1728#define CMRBE15 0x80000000 /* Control Message Receive Buffer Entry 15 */
1729
1730/* Bit masks for MXVR_CMRB_START_ADDR */
1731
1732#define MXVR_CMRB_START_ADDR_MASK 0x1fffffe /* Control Message Receive Buffer Start Address */
1733
1734/* Bit masks for MXVR_CMRB_CURR_ADDR */
1735
1736#define MXVR_CMRB_CURR_ADDR_MASK 0xffffffff /* Control Message Receive Buffer Current Address */
1737
1738/* Bit masks for MXVR_CMTB_START_ADDR */
1739
1740#define MXVR_CMTB_START_ADDR_MASK 0x1fffffe /* Control Message Transmit Buffer Start Address */
1741
1742/* Bit masks for MXVR_CMTB_CURR_ADDR */
1743
1744#define MXVR_CMTB_CURR_ADDR_MASK 0xffffffff /* Control Message Transmit Buffer Current Address */
1745
1746/* Bit masks for MXVR_RRDB_START_ADDR */
1747
1748#define MXVR_RRDB_START_ADDR_MASK 0x1fffffe /* Remote Read Buffer Start Address */
1749
1750/* Bit masks for MXVR_RRDB_CURR_ADDR */
1751
1752#define MXVR_RRDB_CURR_ADDR_MASK 0xffffffff /* Remote Read Buffer Current Address */
1753
1754/* Bit masks for MXVR_PAT_DATAx */
1755
1756#define MATCH_DATA_0 0xff /* Pattern Match Data Byte 0 */
1757#define MATCH_DATA_1 0xff00 /* Pattern Match Data Byte 1 */
1758#define MATCH_DATA_2 0xff0000 /* Pattern Match Data Byte 2 */
1759#define MATCH_DATA_3 0xff000000 /* Pattern Match Data Byte 3 */
1760
1761/* Bit masks for MXVR_PAT_EN_0 */
1762
1763#define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */
1764#define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */
1765#define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */
1766#define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */
1767#define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */
1768#define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */
1769#define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */
1770#define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */
1771#define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */
1772#define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */
1773#define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */
1774#define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */
1775#define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */
1776#define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */
1777#define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */
1778#define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */
1779#define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */
1780#define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */
1781#define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */
1782#define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */
1783#define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */
1784#define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */
1785#define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */
1786#define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */
1787#define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */
1788#define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */
1789#define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */
1790#define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */
1791#define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */
1792#define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */
1793#define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */
1794#define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */
1795
1796/* Bit masks for MXVR_PAT_EN_1 */
1797
1798#define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */
1799#define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */
1800#define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */
1801#define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */
1802#define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */
1803#define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */
1804#define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */
1805#define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */
1806#define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */
1807#define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */
1808#define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */
1809#define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */
1810#define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */
1811#define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */
1812#define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */
1813#define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */
1814#define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */
1815#define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */
1816#define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */
1817#define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */
1818#define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */
1819#define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */
1820#define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */
1821#define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */
1822#define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */
1823#define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */
1824#define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */
1825#define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */
1826#define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */
1827#define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */
1828#define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */
1829#define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */
1830
1831/* Bit masks for MXVR_FRAME_CNT_0 */
1832
1833#define FCNT 0xffff /* Frame Count */
1834
1835/* Bit masks for MXVR_FRAME_CNT_1 */
1836
1837#define FCNT 0xffff /* Frame Count */
1838
1839/* Bit masks for MXVR_ROUTING_0 */
1840
1841#define TX_CH0 0x3f /* Transmit Channel 0 */
1842#define MUTE_CH0 0x80 /* Mute Channel 0 */
1843#define TX_CH1 0x3f00 /* Transmit Channel 0 */
1844#define MUTE_CH1 0x8000 /* Mute Channel 0 */
1845#define TX_CH2 0x3f0000 /* Transmit Channel 0 */
1846#define MUTE_CH2 0x800000 /* Mute Channel 0 */
1847#define TX_CH3 0x3f000000 /* Transmit Channel 0 */
1848#define MUTE_CH3 0x80000000 /* Mute Channel 0 */
1849
1850/* Bit masks for MXVR_ROUTING_1 */
1851
1852#define TX_CH4 0x3f /* Transmit Channel 4 */
1853#define MUTE_CH4 0x80 /* Mute Channel 4 */
1854#define TX_CH5 0x3f00 /* Transmit Channel 5 */
1855#define MUTE_CH5 0x8000 /* Mute Channel 5 */
1856#define TX_CH6 0x3f0000 /* Transmit Channel 6 */
1857#define MUTE_CH6 0x800000 /* Mute Channel 6 */
1858#define TX_CH7 0x3f000000 /* Transmit Channel 7 */
1859#define MUTE_CH7 0x80000000 /* Mute Channel 7 */
1860
1861/* Bit masks for MXVR_ROUTING_2 */
1862
1863#define TX_CH8 0x3f /* Transmit Channel 8 */
1864#define MUTE_CH8 0x80 /* Mute Channel 8 */
1865#define TX_CH9 0x3f00 /* Transmit Channel 9 */
1866#define MUTE_CH9 0x8000 /* Mute Channel 9 */
1867#define TX_CH10 0x3f0000 /* Transmit Channel 10 */
1868#define MUTE_CH10 0x800000 /* Mute Channel 10 */
1869#define TX_CH11 0x3f000000 /* Transmit Channel 11 */
1870#define MUTE_CH11 0x80000000 /* Mute Channel 11 */
1871
1872/* Bit masks for MXVR_ROUTING_3 */
1873
1874#define TX_CH12 0x3f /* Transmit Channel 12 */
1875#define MUTE_CH12 0x80 /* Mute Channel 12 */
1876#define TX_CH13 0x3f00 /* Transmit Channel 13 */
1877#define MUTE_CH13 0x8000 /* Mute Channel 13 */
1878#define TX_CH14 0x3f0000 /* Transmit Channel 14 */
1879#define MUTE_CH14 0x800000 /* Mute Channel 14 */
1880#define TX_CH15 0x3f000000 /* Transmit Channel 15 */
1881#define MUTE_CH15 0x80000000 /* Mute Channel 15 */
1882
1883/* Bit masks for MXVR_ROUTING_4 */
1884
1885#define TX_CH16 0x3f /* Transmit Channel 16 */
1886#define MUTE_CH16 0x80 /* Mute Channel 16 */
1887#define TX_CH17 0x3f00 /* Transmit Channel 17 */
1888#define MUTE_CH17 0x8000 /* Mute Channel 17 */
1889#define TX_CH18 0x3f0000 /* Transmit Channel 18 */
1890#define MUTE_CH18 0x800000 /* Mute Channel 18 */
1891#define TX_CH19 0x3f000000 /* Transmit Channel 19 */
1892#define MUTE_CH19 0x80000000 /* Mute Channel 19 */
1893
1894/* Bit masks for MXVR_ROUTING_5 */
1895
1896#define TX_CH20 0x3f /* Transmit Channel 20 */
1897#define MUTE_CH20 0x80 /* Mute Channel 20 */
1898#define TX_CH21 0x3f00 /* Transmit Channel 21 */
1899#define MUTE_CH21 0x8000 /* Mute Channel 21 */
1900#define TX_CH22 0x3f0000 /* Transmit Channel 22 */
1901#define MUTE_CH22 0x800000 /* Mute Channel 22 */
1902#define TX_CH23 0x3f000000 /* Transmit Channel 23 */
1903#define MUTE_CH23 0x80000000 /* Mute Channel 23 */
1904
1905/* Bit masks for MXVR_ROUTING_6 */
1906
1907#define TX_CH24 0x3f /* Transmit Channel 24 */
1908#define MUTE_CH24 0x80 /* Mute Channel 24 */
1909#define TX_CH25 0x3f00 /* Transmit Channel 25 */
1910#define MUTE_CH25 0x8000 /* Mute Channel 25 */
1911#define TX_CH26 0x3f0000 /* Transmit Channel 26 */
1912#define MUTE_CH26 0x800000 /* Mute Channel 26 */
1913#define TX_CH27 0x3f000000 /* Transmit Channel 27 */
1914#define MUTE_CH27 0x80000000 /* Mute Channel 27 */
1915
1916/* Bit masks for MXVR_ROUTING_7 */
1917
1918#define TX_CH28 0x3f /* Transmit Channel 28 */
1919#define MUTE_CH28 0x80 /* Mute Channel 28 */
1920#define TX_CH29 0x3f00 /* Transmit Channel 29 */
1921#define MUTE_CH29 0x8000 /* Mute Channel 29 */
1922#define TX_CH30 0x3f0000 /* Transmit Channel 30 */
1923#define MUTE_CH30 0x800000 /* Mute Channel 30 */
1924#define TX_CH31 0x3f000000 /* Transmit Channel 31 */
1925#define MUTE_CH31 0x80000000 /* Mute Channel 31 */
1926
1927/* Bit masks for MXVR_ROUTING_8 */
1928
1929#define TX_CH32 0x3f /* Transmit Channel 32 */
1930#define MUTE_CH32 0x80 /* Mute Channel 32 */
1931#define TX_CH33 0x3f00 /* Transmit Channel 33 */
1932#define MUTE_CH33 0x8000 /* Mute Channel 33 */
1933#define TX_CH34 0x3f0000 /* Transmit Channel 34 */
1934#define MUTE_CH34 0x800000 /* Mute Channel 34 */
1935#define TX_CH35 0x3f000000 /* Transmit Channel 35 */
1936#define MUTE_CH35 0x80000000 /* Mute Channel 35 */
1937
1938/* Bit masks for MXVR_ROUTING_9 */
1939
1940#define TX_CH36 0x3f /* Transmit Channel 36 */
1941#define MUTE_CH36 0x80 /* Mute Channel 36 */
1942#define TX_CH37 0x3f00 /* Transmit Channel 37 */
1943#define MUTE_CH37 0x8000 /* Mute Channel 37 */
1944#define TX_CH38 0x3f0000 /* Transmit Channel 38 */
1945#define MUTE_CH38 0x800000 /* Mute Channel 38 */
1946#define TX_CH39 0x3f000000 /* Transmit Channel 39 */
1947#define MUTE_CH39 0x80000000 /* Mute Channel 39 */
1948
1949/* Bit masks for MXVR_ROUTING_10 */
1950
1951#define TX_CH40 0x3f /* Transmit Channel 40 */
1952#define MUTE_CH40 0x80 /* Mute Channel 40 */
1953#define TX_CH41 0x3f00 /* Transmit Channel 41 */
1954#define MUTE_CH41 0x8000 /* Mute Channel 41 */
1955#define TX_CH42 0x3f0000 /* Transmit Channel 42 */
1956#define MUTE_CH42 0x800000 /* Mute Channel 42 */
1957#define TX_CH43 0x3f000000 /* Transmit Channel 43 */
1958#define MUTE_CH43 0x80000000 /* Mute Channel 43 */
1959
1960/* Bit masks for MXVR_ROUTING_11 */
1961
1962#define TX_CH44 0x3f /* Transmit Channel 44 */
1963#define MUTE_CH44 0x80 /* Mute Channel 44 */
1964#define TX_CH45 0x3f00 /* Transmit Channel 45 */
1965#define MUTE_CH45 0x8000 /* Mute Channel 45 */
1966#define TX_CH46 0x3f0000 /* Transmit Channel 46 */
1967#define MUTE_CH46 0x800000 /* Mute Channel 46 */
1968#define TX_CH47 0x3f000000 /* Transmit Channel 47 */
1969#define MUTE_CH47 0x80000000 /* Mute Channel 47 */
1970
1971/* Bit masks for MXVR_ROUTING_12 */
1972
1973#define TX_CH48 0x3f /* Transmit Channel 48 */
1974#define MUTE_CH48 0x80 /* Mute Channel 48 */
1975#define TX_CH49 0x3f00 /* Transmit Channel 49 */
1976#define MUTE_CH49 0x8000 /* Mute Channel 49 */
1977#define TX_CH50 0x3f0000 /* Transmit Channel 50 */
1978#define MUTE_CH50 0x800000 /* Mute Channel 50 */
1979#define TX_CH51 0x3f000000 /* Transmit Channel 51 */
1980#define MUTE_CH51 0x80000000 /* Mute Channel 51 */
1981
1982/* Bit masks for MXVR_ROUTING_13 */
1983
1984#define TX_CH52 0x3f /* Transmit Channel 52 */
1985#define MUTE_CH52 0x80 /* Mute Channel 52 */
1986#define TX_CH53 0x3f00 /* Transmit Channel 53 */
1987#define MUTE_CH53 0x8000 /* Mute Channel 53 */
1988#define TX_CH54 0x3f0000 /* Transmit Channel 54 */
1989#define MUTE_CH54 0x800000 /* Mute Channel 54 */
1990#define TX_CH55 0x3f000000 /* Transmit Channel 55 */
1991#define MUTE_CH55 0x80000000 /* Mute Channel 55 */
1992
1993/* Bit masks for MXVR_ROUTING_14 */
1994
1995#define TX_CH56 0x3f /* Transmit Channel 56 */
1996#define MUTE_CH56 0x80 /* Mute Channel 56 */
1997#define TX_CH57 0x3f00 /* Transmit Channel 57 */
1998#define MUTE_CH57 0x8000 /* Mute Channel 57 */
1999#define TX_CH58 0x3f0000 /* Transmit Channel 58 */
2000#define MUTE_CH58 0x800000 /* Mute Channel 58 */
2001#define TX_CH59 0x3f000000 /* Transmit Channel 59 */
2002#define MUTE_CH59 0x80000000 /* Mute Channel 59 */
2003
2004/* Bit masks for MXVR_BLOCK_CNT */
2005
2006#define BCNT 0xffff /* Block Count */
2007
2008/* Bit masks for MXVR_CLK_CTL */
2009
2010#define MXTALCEN 0x1 /* MXVR Crystal Oscillator Clock Enable */
2011#define MXTALFEN 0x2 /* MXVR Crystal Oscillator Feedback Enable */
2012#define MXTALMUL 0x30 /* MXVR Crystal Multiplier */
2013#define CLKX3SEL 0x80 /* Clock Generation Source Select */
2014#define MMCLKEN 0x100 /* Master Clock Enable */
2015#define MMCLKMUL 0x1e00 /* Master Clock Multiplication Factor */
2016#define PLLSMPS 0xe000 /* MXVR PLL State Machine Prescaler */
2017#define MBCLKEN 0x10000 /* Bit Clock Enable */
2018#define MBCLKDIV 0x1e0000 /* Bit Clock Divide Factor */
2019#define INVRX 0x800000 /* Invert Receive Data */
2020#define MFSEN 0x1000000 /* Frame Sync Enable */
2021#define MFSDIV 0x1e000000 /* Frame Sync Divide Factor */
2022#define MFSSEL 0x60000000 /* Frame Sync Select */
2023#define MFSSYNC 0x80000000 /* Frame Sync Synchronization Select */
2024
2025/* Bit masks for MXVR_CDRPLL_CTL */
2026
2027#define CDRSMEN 0x1 /* MXVR CDRPLL State Machine Enable */
2028#define CDRRSTB 0x2 /* MXVR CDRPLL Reset */
2029#define CDRSVCO 0x4 /* MXVR CDRPLL Start VCO */
2030#define CDRMODE 0x8 /* MXVR CDRPLL CDR Mode Select */
2031#define CDRSCNT 0x3f0 /* MXVR CDRPLL Start Counter */
2032#define CDRLCNT 0xfc00 /* MXVR CDRPLL Lock Counter */
2033#define CDRSHPSEL 0x3f0000 /* MXVR CDRPLL Shaper Select */
2034#define CDRSHPEN 0x800000 /* MXVR CDRPLL Shaper Enable */
2035#define CDRCPSEL 0xff000000 /* MXVR CDRPLL Charge Pump Current Select */
2036
2037/* Bit masks for MXVR_FMPLL_CTL */
2038
2039#define FMSMEN 0x1 /* MXVR FMPLL State Machine Enable */
2040#define FMRSTB 0x2 /* MXVR FMPLL Reset */
2041#define FMSVCO 0x4 /* MXVR FMPLL Start VCO */
2042#define FMSCNT 0x3f0 /* MXVR FMPLL Start Counter */
2043#define FMLCNT 0xfc00 /* MXVR FMPLL Lock Counter */
2044#define FMCPSEL 0xff000000 /* MXVR FMPLL Charge Pump Current Select */
2045
2046/* Bit masks for MXVR_PIN_CTL */
2047
2048#define MTXONBOD 0x1 /* MTXONB Open Drain Select */
2049#define MTXONBG 0x2 /* MTXONB Gates MTX Select */
2050#define MFSOE 0x10 /* MFS Output Enable */
2051#define MFSGPSEL 0x20 /* MFS General Purpose Output Select */
2052#define MFSGPDAT 0x40 /* MFS General Purpose Output Data */
2053
2054/* Bit masks for MXVR_SCLK_CNT */
2055
2056#define SCNT 0xffff /* System Clock Count */
2057
2058/* Bit masks for KPAD_CTL */
2059
2060#define KPAD_EN 0x1 /* Keypad Enable */
2061#define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */
2062#define KPAD_ROWEN 0x1c00 /* Row Enable Width */
2063#define KPAD_COLEN 0xe000 /* Column Enable Width */
2064
2065/* Bit masks for KPAD_PRESCALE */
2066
2067#define KPAD_PRESCALE_VAL 0x3f /* Key Prescale Value */
2068
2069/* Bit masks for KPAD_MSEL */
2070
2071#define DBON_SCALE 0xff /* Debounce Scale Value */
2072#define COLDRV_SCALE 0xff00 /* Column Driver Scale Value */
2073
2074/* Bit masks for KPAD_ROWCOL */
2075
2076#define KPAD_ROW 0xff /* Rows Pressed */
2077#define KPAD_COL 0xff00 /* Columns Pressed */
2078
2079/* Bit masks for KPAD_STAT */
2080
2081#define KPAD_IRQ 0x1 /* Keypad Interrupt Status */
2082#define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */
2083#define KPAD_PRESSED 0x8 /* Key press current status */
2084
2085/* Bit masks for KPAD_SOFTEVAL */
2086
2087#define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */
2088
2089/* Bit masks for SDH_COMMAND */
2090
2091#define CMD_IDX 0x3f /* Command Index */
2092#define CMD_RSP 0x40 /* Response */
2093#define CMD_L_RSP 0x80 /* Long Response */
2094#define CMD_INT_E 0x100 /* Command Interrupt */
2095#define CMD_PEND_E 0x200 /* Command Pending */
2096#define CMD_E 0x400 /* Command Enable */
2097
2098/* Bit masks for SDH_PWR_CTL */
2099
2100#define PWR_ON 0x3 /* Power On */
2101#if 0
2102#define TBD 0x3c /* TBD */
2103#endif
2104#define SD_CMD_OD 0x40 /* Open Drain Output */
2105#define ROD_CTL 0x80 /* Rod Control */
2106
2107/* Bit masks for SDH_CLK_CTL */
2108
2109#define CLKDIV 0xff /* MC_CLK Divisor */
2110#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
2111#define PWR_SV_E 0x200 /* Power Save Enable */
2112#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
2113#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
2114
2115/* Bit masks for SDH_RESP_CMD */
2116
2117#define RESP_CMD 0x3f /* Response Command */
2118
2119/* Bit masks for SDH_DATA_CTL */
2120
2121#define DTX_E 0x1 /* Data Transfer Enable */
2122#define DTX_DIR 0x2 /* Data Transfer Direction */
2123#define DTX_MODE 0x4 /* Data Transfer Mode */
2124#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
2125#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
2126
2127/* Bit masks for SDH_STATUS */
2128
2129#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
2130#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
2131#define CMD_TIME_OUT 0x4 /* CMD Time Out */
2132#define DAT_TIME_OUT 0x8 /* Data Time Out */
2133#define TX_UNDERRUN 0x10 /* Transmit Underrun */
2134#define RX_OVERRUN 0x20 /* Receive Overrun */
2135#define CMD_RESP_END 0x40 /* CMD Response End */
2136#define CMD_SENT 0x80 /* CMD Sent */
2137#define DAT_END 0x100 /* Data End */
2138#define START_BIT_ERR 0x200 /* Start Bit Error */
2139#define DAT_BLK_END 0x400 /* Data Block End */
2140#define CMD_ACT 0x800 /* CMD Active */
2141#define TX_ACT 0x1000 /* Transmit Active */
2142#define RX_ACT 0x2000 /* Receive Active */
2143#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
2144#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
2145#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
2146#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
2147#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
2148#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
2149#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
2150#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
2151
2152/* Bit masks for SDH_STATUS_CLR */
2153
2154#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
2155#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
2156#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
2157#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
2158#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
2159#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
2160#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
2161#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
2162#define DAT_END_STAT 0x100 /* Data End Status */
2163#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
2164#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
2165
2166/* Bit masks for SDH_MASK0 */
2167
2168#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
2169#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
2170#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
2171#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
2172#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
2173#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
2174#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
2175#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
2176#define DAT_END_MASK 0x100 /* Data End Mask */
2177#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
2178#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
2179#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
2180#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
2181#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
2182#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
2183#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
2184#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
2185#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
2186#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
2187#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
2188#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
2189#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
2190
2191/* Bit masks for SDH_FIFO_CNT */
2192
2193#define FIFO_COUNT 0x7fff /* FIFO Count */
2194
2195/* Bit masks for SDH_E_STATUS */
2196
2197#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
2198#define SD_CARD_DET 0x10 /* SD Card Detect */
2199
2200/* Bit masks for SDH_E_MASK */
2201
2202#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
2203#define SCD_MSK 0x40 /* Mask Card Detect */
2204
2205/* Bit masks for SDH_CFG */
2206
2207#define CLKS_EN 0x1 /* Clocks Enable */
2208#define SD4E 0x4 /* SDIO 4-Bit Enable */
2209#define MWE 0x8 /* Moving Window Enable */
2210#define SD_RST 0x10 /* SDMMC Reset */
2211#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
2212#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
2213#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
2214
2215/* Bit masks for SDH_RD_WAIT_EN */
2216
2217#define RWR 0x1 /* Read Wait Request */
2218
2219/* Bit masks for ATAPI_CONTROL */
2220
2221#define PIO_START 0x1 /* Start PIO/Reg Op */
2222#define MULTI_START 0x2 /* Start Multi-DMA Op */
2223#define ULTRA_START 0x4 /* Start Ultra-DMA Op */
2224#define XFER_DIR 0x8 /* Transfer Direction */
2225#define IORDY_EN 0x10 /* IORDY Enable */
2226#define FIFO_FLUSH 0x20 /* Flush FIFOs */
2227#define SOFT_RST 0x40 /* Soft Reset */
2228#define DEV_RST 0x80 /* Device Reset */
2229#define TFRCNT_RST 0x100 /* Trans Count Reset */
2230#define END_ON_TERM 0x200 /* End/Terminate Select */
2231#define PIO_USE_DMA 0x400 /* PIO-DMA Enable */
2232#define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */
2233
2234/* Bit masks for ATAPI_STATUS */
2235
2236#define PIO_XFER_ON 0x1 /* PIO transfer in progress */
2237#define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */
2238#define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */
2239#define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */
2240
2241/* Bit masks for ATAPI_DEV_ADDR */
2242
2243#define DEV_ADDR 0x1f /* Device Address */
2244
2245/* Bit masks for ATAPI_INT_MASK */
2246
2247#define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */
2248#define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */
2249#define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */
2250#define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */
2251#define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */
2252#define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */
2253#define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */
2254#define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */
2255#define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */
2256
2257/* Bit masks for ATAPI_INT_STATUS */
2258
2259#define ATAPI_DEV_INT 0x1 /* Device interrupt status */
2260#define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */
2261#define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */
2262#define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */
2263#define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */
2264#define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */
2265#define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */
2266#define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */
2267#define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */
2268
2269/* Bit masks for ATAPI_LINE_STATUS */
2270
2271#define ATAPI_INTR 0x1 /* Device interrupt to host line status */
2272#define ATAPI_DASP 0x2 /* Device dasp to host line status */
2273#define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */
2274#define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */
2275#define ATAPI_ADDR 0x70 /* ATAPI address line status */
2276#define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */
2277#define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */
2278#define ATAPI_DIOWN 0x200 /* ATAPI write line status */
2279#define ATAPI_DIORN 0x400 /* ATAPI read line status */
2280#define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */
2281
2282/* Bit masks for ATAPI_SM_STATE */
2283
2284#define PIO_CSTATE 0xf /* PIO mode state machine current state */
2285#define DMA_CSTATE 0xf0 /* DMA mode state machine current state */
2286#define UDMAIN_CSTATE 0xf00 /* Ultra DMA-In mode state machine current state */
2287#define UDMAOUT_CSTATE 0xf000 /* ATAPI IORDY line status */
2288
2289/* Bit masks for ATAPI_TERMINATE */
2290
2291#define ATAPI_HOST_TERM 0x1 /* Host terminationation */
2292
2293/* Bit masks for ATAPI_REG_TIM_0 */
2294
2295#define T2_REG 0xff /* End of cycle time for register access transfers */
2296#define TEOC_REG 0xff00 /* Selects DIOR/DIOW pulsewidth */
2297
2298/* Bit masks for ATAPI_PIO_TIM_0 */
2299
2300#define T1_REG 0xf /* Time from address valid to DIOR/DIOW */
2301#define T2_REG_PIO 0xff0 /* DIOR/DIOW pulsewidth */
2302#define T4_REG 0xf000 /* DIOW data hold */
2303
2304/* Bit masks for ATAPI_PIO_TIM_1 */
2305
2306#define TEOC_REG_PIO 0xff /* End of cycle time for PIO access transfers. */
2307
2308/* Bit masks for ATAPI_MULTI_TIM_0 */
2309
2310#define TD 0xff /* DIOR/DIOW asserted pulsewidth */
2311#define TM 0xff00 /* Time from address valid to DIOR/DIOW */
2312
2313/* Bit masks for ATAPI_MULTI_TIM_1 */
2314
2315#define TKW 0xff /* Selects DIOW negated pulsewidth */
2316#define TKR 0xff00 /* Selects DIOR negated pulsewidth */
2317
2318/* Bit masks for ATAPI_MULTI_TIM_2 */
2319
2320#define TH 0xff /* Selects DIOW data hold */
2321#define TEOC 0xff00 /* Selects end of cycle for DMA */
2322
2323/* Bit masks for ATAPI_ULTRA_TIM_0 */
2324
2325#define TACK 0xff /* Selects setup and hold times for TACK */
2326#define TENV 0xff00 /* Selects envelope time */
2327
2328/* Bit masks for ATAPI_ULTRA_TIM_1 */
2329
2330#define TDVS 0xff /* Selects data valid setup time */
2331#define TCYC_TDVS 0xff00 /* Selects cycle time - TDVS time */
2332
2333/* Bit masks for ATAPI_ULTRA_TIM_2 */
2334
2335#define TSS 0xff /* Selects time from STROBE edge to negation of DMARQ or assertion of STOP */
2336#define TMLI 0xff00 /* Selects interlock time */
2337
2338/* Bit masks for ATAPI_ULTRA_TIM_3 */
2339
2340#define TZAH 0xff /* Selects minimum delay required for output */
2341#define READY_PAUSE 0xff00 /* Selects ready to pause */
2342
2343/* Bit masks for TIMER_ENABLE1 */
2344
2345#define TIMEN8 0x1 /* Timer 8 Enable */
2346#define TIMEN9 0x2 /* Timer 9 Enable */
2347#define TIMEN10 0x4 /* Timer 10 Enable */
2348
2349/* Bit masks for TIMER_DISABLE1 */
2350
2351#define TIMDIS8 0x1 /* Timer 8 Disable */
2352#define TIMDIS9 0x2 /* Timer 9 Disable */
2353#define TIMDIS10 0x4 /* Timer 10 Disable */
2354
2355/* Bit masks for TIMER_STATUS1 */
2356
2357#define TIMIL8 0x1 /* Timer 8 Interrupt */
2358#define TIMIL9 0x2 /* Timer 9 Interrupt */
2359#define TIMIL10 0x4 /* Timer 10 Interrupt */
2360#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
2361#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
2362#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
2363#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
2364#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
2365#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
2366
2367/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
2368
2369/* Bit masks for USB_FADDR */
2370
2371#define FUNCTION_ADDRESS 0x7f /* Function address */
2372
2373/* Bit masks for USB_POWER */
2374
2375#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
2376#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
2377#define RESUME_MODE 0x4 /* DMA Mode */
2378#define RESET 0x8 /* Reset indicator */
2379#define HS_MODE 0x10 /* High Speed mode indicator */
2380#define HS_ENABLE 0x20 /* high Speed Enable */
2381#define SOFT_CONN 0x40 /* Soft connect */
2382#define ISO_UPDATE 0x80 /* Isochronous update */
2383
2384/* Bit masks for USB_INTRTX */
2385
2386#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
2387#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
2388#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
2389#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
2390#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
2391#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
2392#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
2393#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
2394
2395/* Bit masks for USB_INTRRX */
2396
2397#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
2398#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
2399#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
2400#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
2401#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
2402#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
2403#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
2404
2405/* Bit masks for USB_INTRTXE */
2406
2407#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
2408#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
2409#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
2410#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
2411#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
2412#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
2413#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
2414#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
2415
2416/* Bit masks for USB_INTRRXE */
2417
2418#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
2419#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
2420#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
2421#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
2422#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
2423#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
2424#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
2425
2426/* Bit masks for USB_INTRUSB */
2427
2428#define SUSPEND_B 0x1 /* Suspend indicator */
2429#define RESUME_B 0x2 /* Resume indicator */
2430#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
2431#define SOF_B 0x8 /* Start of frame */
2432#define CONN_B 0x10 /* Connection indicator */
2433#define DISCON_B 0x20 /* Disconnect indicator */
2434#define SESSION_REQ_B 0x40 /* Session Request */
2435#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
2436
2437/* Bit masks for USB_INTRUSBE */
2438
2439#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
2440#define RESUME_BE 0x2 /* Resume indicator int enable */
2441#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
2442#define SOF_BE 0x8 /* Start of frame int enable */
2443#define CONN_BE 0x10 /* Connection indicator int enable */
2444#define DISCON_BE 0x20 /* Disconnect indicator int enable */
2445#define SESSION_REQ_BE 0x40 /* Session Request int enable */
2446#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
2447
2448/* Bit masks for USB_FRAME */
2449
2450#define FRAME_NUMBER 0x7ff /* Frame number */
2451
2452/* Bit masks for USB_INDEX */
2453
2454#define SELECTED_ENDPOINT 0xf /* selected endpoint */
2455
2456/* Bit masks for USB_GLOBAL_CTL */
2457
2458#define GLOBAL_ENA 0x1 /* enables USB module */
2459#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
2460#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
2461#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
2462#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
2463#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
2464#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
2465#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
2466#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
2467#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
2468#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
2469#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
2470#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
2471#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
2472#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
2473
2474/* Bit masks for USB_OTG_DEV_CTL */
2475
2476#define SESSION 0x1 /* session indicator */
2477#define HOST_REQ 0x2 /* Host negotiation request */
2478#define HOST_MODE 0x4 /* indicates USBDRC is a host */
2479#define VBUS0 0x8 /* Vbus level indicator[0] */
2480#define VBUS1 0x10 /* Vbus level indicator[1] */
2481#define LSDEV 0x20 /* Low-speed indicator */
2482#define FSDEV 0x40 /* Full or High-speed indicator */
2483#define B_DEVICE 0x80 /* A' or 'B' device indicator */
2484
2485/* Bit masks for USB_OTG_VBUS_IRQ */
2486
2487#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
2488#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
2489#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
2490#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
2491#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
2492#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
2493
2494/* Bit masks for USB_OTG_VBUS_MASK */
2495
2496#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
2497#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
2498#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
2499#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
2500#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
2501#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
2502
2503/* Bit masks for USB_CSR0 */
2504
2505#define RXPKTRDY 0x1 /* data packet receive indicator */
2506#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
2507#define STALL_SENT 0x4 /* STALL handshake sent */
2508#define DATAEND 0x8 /* Data end indicator */
2509#define SETUPEND 0x10 /* Setup end */
2510#define SENDSTALL 0x20 /* Send STALL handshake */
2511#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
2512#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
2513#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
2514#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
2515#define SETUPPKT_H 0x8 /* send Setup token host mode */
2516#define ERROR_H 0x10 /* timeout error indicator host mode */
2517#define REQPKT_H 0x20 /* Request an IN transaction host mode */
2518#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
2519#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
2520
2521/* Bit masks for USB_COUNT0 */
2522
2523#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
2524
2525/* Bit masks for USB_NAKLIMIT0 */
2526
2527#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
2528
2529/* Bit masks for USB_TX_MAX_PACKET */
2530
2531#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
2532
2533/* Bit masks for USB_RX_MAX_PACKET */
2534
2535#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
2536
2537/* Bit masks for USB_TXCSR */
2538
2539#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
2540#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
2541#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
2542#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
2543#define STALL_SEND_T 0x10 /* issue a Stall handshake */
2544#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
2545#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
2546#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
2547#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
2548#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
2549#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
2550#define ISO_T 0x4000 /* enable Isochronous transfers */
2551#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
2552#define ERROR_TH 0x4 /* error condition host mode */
2553#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
2554#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
2555
2556/* Bit masks for USB_TXCOUNT */
2557
2558#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
2559
2560/* Bit masks for USB_RXCSR */
2561
2562#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
2563#define FIFO_FULL_R 0x2 /* FIFO not empty */
2564#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
2565#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
2566#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
2567#define STALL_SEND_R 0x20 /* issue a Stall handshake */
2568#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
2569#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
2570#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
2571#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
2572#define DISNYET_R 0x1000 /* disable Nyet handshakes */
2573#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
2574#define ISO_R 0x4000 /* enable Isochronous transfers */
2575#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
2576#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
2577#define REQPKT_RH 0x20 /* request an IN transaction host mode */
2578#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
2579#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
2580#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
2581#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
2582
2583/* Bit masks for USB_RXCOUNT */
2584
2585#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
2586
2587/* Bit masks for USB_TXTYPE */
2588
2589#define TARGET_EP_NO_T 0xf /* EP number */
2590#define PROTOCOL_T 0xc /* transfer type */
2591
2592/* Bit masks for USB_TXINTERVAL */
2593
2594#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
2595
2596/* Bit masks for USB_RXTYPE */
2597
2598#define TARGET_EP_NO_R 0xf /* EP number */
2599#define PROTOCOL_R 0xc /* transfer type */
2600
2601/* Bit masks for USB_RXINTERVAL */
2602
2603#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
2604
2605/* Bit masks for USB_DMA_INTERRUPT */
2606
2607#define DMA0_INT 0x1 /* DMA0 pending interrupt */
2608#define DMA1_INT 0x2 /* DMA1 pending interrupt */
2609#define DMA2_INT 0x4 /* DMA2 pending interrupt */
2610#define DMA3_INT 0x8 /* DMA3 pending interrupt */
2611#define DMA4_INT 0x10 /* DMA4 pending interrupt */
2612#define DMA5_INT 0x20 /* DMA5 pending interrupt */
2613#define DMA6_INT 0x40 /* DMA6 pending interrupt */
2614#define DMA7_INT 0x80 /* DMA7 pending interrupt */
2615
2616/* Bit masks for USB_DMAxCONTROL */
2617
2618#define DMA_ENA 0x1 /* DMA enable */
2619#define DIRECTION 0x2 /* direction of DMA transfer */
2620#define MODE 0x4 /* DMA Bus error */
2621#define INT_ENA 0x8 /* Interrupt enable */
2622#define EPNUM 0xf0 /* EP number */
2623#define BUSERROR 0x100 /* DMA Bus error */
2624
2625/* Bit masks for USB_DMAxADDRHIGH */
2626
2627#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
2628
2629/* Bit masks for USB_DMAxADDRLOW */
2630
2631#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
2632
2633/* Bit masks for USB_DMAxCOUNTHIGH */
2634
2635#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
2636
2637/* Bit masks for USB_DMAxCOUNTLOW */
2638
2639#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
2640
2641/* Bit masks for HMDMAx_CONTROL */
2642
2643#define HMDMAEN 0x1 /* Handshake MDMA Enable */
2644#define REP 0x2 /* Handshake MDMA Request Polarity */
2645#define UTE 0x8 /* Urgency Threshold Enable */
2646#define OIE 0x10 /* Overflow Interrupt Enable */
2647#define BDIE 0x20 /* Block Done Interrupt Enable */
2648#define MBDI 0x40 /* Mask Block Done Interrupt */
2649#define DRQ 0x300 /* Handshake MDMA Request Type */
2650#define RBC 0x1000 /* Force Reload of BCOUNT */
2651#define PS 0x2000 /* Pin Status */
2652#define OI 0x4000 /* Overflow Interrupt Generated */
2653#define BDI 0x8000 /* Block Done Interrupt Generated */
2654
2655/* ******************************************* */
2656/* MULTI BIT MACRO ENUMERATIONS */
2657/* ******************************************* */
2658
2659/* ************************ */
2660/* MXVR Address Offsets */
2661/* ************************ */
2662
2663/* Control Message Receive Buffer (CMRB) Address Offsets */
2664
2665#define CMRB_STRIDE 0x00000016lu
2666
2667#define CMRB_DST_OFFSET 0x00000000lu
2668#define CMRB_SRC_OFFSET 0x00000002lu
2669#define CMRB_DATA_OFFSET 0x00000005lu
2670
2671/* Control Message Transmit Buffer (CMTB) Address Offsets */
2672
2673#define CMTB_PRIO_OFFSET 0x00000000lu
2674#define CMTB_DST_OFFSET 0x00000002lu
2675#define CMTB_SRC_OFFSET 0x00000004lu
2676#define CMTB_TYPE_OFFSET 0x00000006lu
2677#define CMTB_DATA_OFFSET 0x00000007lu
2678
2679#define CMTB_ANSWER_OFFSET 0x0000000Alu
2680
2681#define CMTB_STAT_N_OFFSET 0x00000018lu
2682#define CMTB_STAT_A_OFFSET 0x00000016lu
2683#define CMTB_STAT_D_OFFSET 0x0000000Elu
2684#define CMTB_STAT_R_OFFSET 0x00000014lu
2685#define CMTB_STAT_W_OFFSET 0x00000014lu
2686#define CMTB_STAT_G_OFFSET 0x00000014lu
2687
2688/* Asynchronous Packet Receive Buffer (APRB) Address Offsets */
2689
2690#define APRB_STRIDE 0x00000400lu
2691
2692#define APRB_DST_OFFSET 0x00000000lu
2693#define APRB_LEN_OFFSET 0x00000002lu
2694#define APRB_SRC_OFFSET 0x00000004lu
2695#define APRB_DATA_OFFSET 0x00000006lu
2696
2697/* Asynchronous Packet Transmit Buffer (APTB) Address Offsets */
2698
2699#define APTB_PRIO_OFFSET 0x00000000lu
2700#define APTB_DST_OFFSET 0x00000002lu
2701#define APTB_LEN_OFFSET 0x00000004lu
2702#define APTB_SRC_OFFSET 0x00000006lu
2703#define APTB_DATA_OFFSET 0x00000008lu
2704
2705/* Remote Read Buffer (RRDB) Address Offsets */
2706
2707#define RRDB_WADDR_OFFSET 0x00000100lu
2708#define RRDB_WLEN_OFFSET 0x00000101lu
2709
2710/* **************** */
2711/* MXVR Macros */
2712/* **************** */
2713
2714/* MXVR_CONFIG Macros */
2715
2716#define SET_MSB(x) ( ( (x) & 0xF ) << 9)
2717
2718/* MXVR_INT_STAT_1 Macros */
2719
2720#define DONEX(x) (0x00000002 << (4 * (x)))
2721#define HDONEX(x) (0x00000001 << (4 * (x)))
2722
2723/* MXVR_INT_EN_1 Macros */
2724
2725#define DONEENX(x) (0x00000002 << (4 * (x)))
2726#define HDONEENX(x) (0x00000001 << (4 * (x)))
2727
2728/* MXVR_CDRPLL_CTL Macros */
2729
2730#define SET_CDRSHPSEL(x) ( ( (x) & 0x3F ) << 16)
2731
2732/* MXVR_FMPLL_CTL Macros */
2733
2734#define SET_CDRCPSEL(x) ( ( (x) & 0xFF ) << 24)
2735#define SET_FMCPSEL(x) ( ( (x) & 0xFF ) << 24)
2736
2737#endif /* _DEF_BF549_H */
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h
deleted file mode 100644
index e022e896cb18..000000000000
--- a/include/asm-blackfin/mach-bf548/defBF54x_base.h
+++ /dev/null
@@ -1,3956 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/defBF54x_base.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _DEF_BF54X_H
32#define _DEF_BF54X_H
33
34
35/* ************************************************************** */
36/* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */
37/* ************************************************************** */
38
39/* PLL Registers */
40
41#define PLL_CTL 0xffc00000 /* PLL Control Register */
42#define PLL_DIV 0xffc00004 /* PLL Divisor Register */
43#define VR_CTL 0xffc00008 /* Voltage Regulator Control Register */
44#define PLL_STAT 0xffc0000c /* PLL Status Register */
45#define PLL_LOCKCNT 0xffc00010 /* PLL Lock Count Register */
46
47/* Debug/MP/Emulation Registers (0xFFC00014 - 0xFFC00014) */
48
49#define CHIPID 0xffc00014
50/* CHIPID Masks */
51#define CHIPID_VERSION 0xF0000000
52#define CHIPID_FAMILY 0x0FFFF000
53#define CHIPID_MANUFACTURE 0x00000FFE
54
55/* System Reset and Interrupt Controller (0xFFC00100 - 0xFFC00104) */
56
57#define SWRST 0xffc00100 /* Software Reset Register */
58#define SYSCR 0xffc00104 /* System Configuration register */
59
60/* SIC Registers */
61
62#define SIC_IMASK0 0xffc0010c /* System Interrupt Mask Register 0 */
63#define SIC_IMASK1 0xffc00110 /* System Interrupt Mask Register 1 */
64#define SIC_IMASK2 0xffc00114 /* System Interrupt Mask Register 2 */
65#define SIC_ISR0 0xffc00118 /* System Interrupt Status Register 0 */
66#define SIC_ISR1 0xffc0011c /* System Interrupt Status Register 1 */
67#define SIC_ISR2 0xffc00120 /* System Interrupt Status Register 2 */
68#define SIC_IWR0 0xffc00124 /* System Interrupt Wakeup Register 0 */
69#define SIC_IWR1 0xffc00128 /* System Interrupt Wakeup Register 1 */
70#define SIC_IWR2 0xffc0012c /* System Interrupt Wakeup Register 2 */
71#define SIC_IAR0 0xffc00130 /* System Interrupt Assignment Register 0 */
72#define SIC_IAR1 0xffc00134 /* System Interrupt Assignment Register 1 */
73#define SIC_IAR2 0xffc00138 /* System Interrupt Assignment Register 2 */
74#define SIC_IAR3 0xffc0013c /* System Interrupt Assignment Register 3 */
75#define SIC_IAR4 0xffc00140 /* System Interrupt Assignment Register 4 */
76#define SIC_IAR5 0xffc00144 /* System Interrupt Assignment Register 5 */
77#define SIC_IAR6 0xffc00148 /* System Interrupt Assignment Register 6 */
78#define SIC_IAR7 0xffc0014c /* System Interrupt Assignment Register 7 */
79#define SIC_IAR8 0xffc00150 /* System Interrupt Assignment Register 8 */
80#define SIC_IAR9 0xffc00154 /* System Interrupt Assignment Register 9 */
81#define SIC_IAR10 0xffc00158 /* System Interrupt Assignment Register 10 */
82#define SIC_IAR11 0xffc0015c /* System Interrupt Assignment Register 11 */
83
84/* Watchdog Timer Registers */
85
86#define WDOG_CTL 0xffc00200 /* Watchdog Control Register */
87#define WDOG_CNT 0xffc00204 /* Watchdog Count Register */
88#define WDOG_STAT 0xffc00208 /* Watchdog Status Register */
89
90/* RTC Registers */
91
92#define RTC_STAT 0xffc00300 /* RTC Status Register */
93#define RTC_ICTL 0xffc00304 /* RTC Interrupt Control Register */
94#define RTC_ISTAT 0xffc00308 /* RTC Interrupt Status Register */
95#define RTC_SWCNT 0xffc0030c /* RTC Stopwatch Count Register */
96#define RTC_ALARM 0xffc00310 /* RTC Alarm Register */
97#define RTC_PREN 0xffc00314 /* RTC Prescaler Enable Register */
98
99/* UART0 Registers */
100
101#define UART0_DLL 0xffc00400 /* Divisor Latch Low Byte */
102#define UART0_DLH 0xffc00404 /* Divisor Latch High Byte */
103#define UART0_GCTL 0xffc00408 /* Global Control Register */
104#define UART0_LCR 0xffc0040c /* Line Control Register */
105#define UART0_MCR 0xffc00410 /* Modem Control Register */
106#define UART0_LSR 0xffc00414 /* Line Status Register */
107#define UART0_MSR 0xffc00418 /* Modem Status Register */
108#define UART0_SCR 0xffc0041c /* Scratch Register */
109#define UART0_IER_SET 0xffc00420 /* Interrupt Enable Register Set */
110#define UART0_IER_CLEAR 0xffc00424 /* Interrupt Enable Register Clear */
111#define UART0_THR 0xffc00428 /* Transmit Hold Register */
112#define UART0_RBR 0xffc0042c /* Receive Buffer Register */
113
114/* SPI0 Registers */
115
116#define SPI0_REGBASE 0xffc00500
117#define SPI0_CTL 0xffc00500 /* SPI0 Control Register */
118#define SPI0_FLG 0xffc00504 /* SPI0 Flag Register */
119#define SPI0_STAT 0xffc00508 /* SPI0 Status Register */
120#define SPI0_TDBR 0xffc0050c /* SPI0 Transmit Data Buffer Register */
121#define SPI0_RDBR 0xffc00510 /* SPI0 Receive Data Buffer Register */
122#define SPI0_BAUD 0xffc00514 /* SPI0 Baud Rate Register */
123#define SPI0_SHADOW 0xffc00518 /* SPI0 Receive Data Buffer Shadow Register */
124
125/* Timer Group of 3 registers are not defined in the shared file because they are not available on the ADSP-BF542 processor */
126
127/* Two Wire Interface Registers (TWI0) */
128
129#define TWI0_REGBASE 0xffc00700
130#define TWI0_CLKDIV 0xffc00700 /* Clock Divider Register */
131#define TWI0_CONTROL 0xffc00704 /* TWI Control Register */
132#define TWI0_SLAVE_CTRL 0xffc00708 /* TWI Slave Mode Control Register */
133#define TWI0_SLAVE_STAT 0xffc0070c /* TWI Slave Mode Status Register */
134#define TWI0_SLAVE_ADDR 0xffc00710 /* TWI Slave Mode Address Register */
135#define TWI0_MASTER_CTRL 0xffc00714 /* TWI Master Mode Control Register */
136#define TWI0_MASTER_STAT 0xffc00718 /* TWI Master Mode Status Register */
137#define TWI0_MASTER_ADDR 0xffc0071c /* TWI Master Mode Address Register */
138#define TWI0_INT_STAT 0xffc00720 /* TWI Interrupt Status Register */
139#define TWI0_INT_MASK 0xffc00724 /* TWI Interrupt Mask Register */
140#define TWI0_FIFO_CTRL 0xffc00728 /* TWI FIFO Control Register */
141#define TWI0_FIFO_STAT 0xffc0072c /* TWI FIFO Status Register */
142#define TWI0_XMT_DATA8 0xffc00780 /* TWI FIFO Transmit Data Single Byte Register */
143#define TWI0_XMT_DATA16 0xffc00784 /* TWI FIFO Transmit Data Double Byte Register */
144#define TWI0_RCV_DATA8 0xffc00788 /* TWI FIFO Receive Data Single Byte Register */
145#define TWI0_RCV_DATA16 0xffc0078c /* TWI FIFO Receive Data Double Byte Register */
146
147/* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 processors */
148
149/* SPORT1 Registers */
150
151#define SPORT1_TCR1 0xffc00900 /* SPORT1 Transmit Configuration 1 Register */
152#define SPORT1_TCR2 0xffc00904 /* SPORT1 Transmit Configuration 2 Register */
153#define SPORT1_TCLKDIV 0xffc00908 /* SPORT1 Transmit Serial Clock Divider Register */
154#define SPORT1_TFSDIV 0xffc0090c /* SPORT1 Transmit Frame Sync Divider Register */
155#define SPORT1_TX 0xffc00910 /* SPORT1 Transmit Data Register */
156#define SPORT1_RX 0xffc00918 /* SPORT1 Receive Data Register */
157#define SPORT1_RCR1 0xffc00920 /* SPORT1 Receive Configuration 1 Register */
158#define SPORT1_RCR2 0xffc00924 /* SPORT1 Receive Configuration 2 Register */
159#define SPORT1_RCLKDIV 0xffc00928 /* SPORT1 Receive Serial Clock Divider Register */
160#define SPORT1_RFSDIV 0xffc0092c /* SPORT1 Receive Frame Sync Divider Register */
161#define SPORT1_STAT 0xffc00930 /* SPORT1 Status Register */
162#define SPORT1_CHNL 0xffc00934 /* SPORT1 Current Channel Register */
163#define SPORT1_MCMC1 0xffc00938 /* SPORT1 Multi channel Configuration Register 1 */
164#define SPORT1_MCMC2 0xffc0093c /* SPORT1 Multi channel Configuration Register 2 */
165#define SPORT1_MTCS0 0xffc00940 /* SPORT1 Multi channel Transmit Select Register 0 */
166#define SPORT1_MTCS1 0xffc00944 /* SPORT1 Multi channel Transmit Select Register 1 */
167#define SPORT1_MTCS2 0xffc00948 /* SPORT1 Multi channel Transmit Select Register 2 */
168#define SPORT1_MTCS3 0xffc0094c /* SPORT1 Multi channel Transmit Select Register 3 */
169#define SPORT1_MRCS0 0xffc00950 /* SPORT1 Multi channel Receive Select Register 0 */
170#define SPORT1_MRCS1 0xffc00954 /* SPORT1 Multi channel Receive Select Register 1 */
171#define SPORT1_MRCS2 0xffc00958 /* SPORT1 Multi channel Receive Select Register 2 */
172#define SPORT1_MRCS3 0xffc0095c /* SPORT1 Multi channel Receive Select Register 3 */
173
174/* Asynchronous Memory Control Registers */
175
176#define EBIU_AMGCTL 0xffc00a00 /* Asynchronous Memory Global Control Register */
177#define EBIU_AMBCTL0 0xffc00a04 /* Asynchronous Memory Bank Control Register */
178#define EBIU_AMBCTL1 0xffc00a08 /* Asynchronous Memory Bank Control Register */
179#define EBIU_MBSCTL 0xffc00a0c /* Asynchronous Memory Bank Select Control Register */
180#define EBIU_ARBSTAT 0xffc00a10 /* Asynchronous Memory Arbiter Status Register */
181#define EBIU_MODE 0xffc00a14 /* Asynchronous Mode Control Register */
182#define EBIU_FCTL 0xffc00a18 /* Asynchronous Memory Flash Control Register */
183
184/* DDR Memory Control Registers */
185
186#define EBIU_DDRCTL0 0xffc00a20 /* DDR Memory Control 0 Register */
187#define EBIU_DDRCTL1 0xffc00a24 /* DDR Memory Control 1 Register */
188#define EBIU_DDRCTL2 0xffc00a28 /* DDR Memory Control 2 Register */
189#define EBIU_DDRCTL3 0xffc00a2c /* DDR Memory Control 3 Register */
190#define EBIU_DDRQUE 0xffc00a30 /* DDR Queue Configuration Register */
191#define EBIU_ERRADD 0xffc00a34 /* DDR Error Address Register */
192#define EBIU_ERRMST 0xffc00a38 /* DDR Error Master Register */
193#define EBIU_RSTCTL 0xffc00a3c /* DDR Reset Control Register */
194
195/* DDR BankRead and Write Count Registers */
196
197#define EBIU_DDRBRC0 0xffc00a60 /* DDR Bank0 Read Count Register */
198#define EBIU_DDRBRC1 0xffc00a64 /* DDR Bank1 Read Count Register */
199#define EBIU_DDRBRC2 0xffc00a68 /* DDR Bank2 Read Count Register */
200#define EBIU_DDRBRC3 0xffc00a6c /* DDR Bank3 Read Count Register */
201#define EBIU_DDRBRC4 0xffc00a70 /* DDR Bank4 Read Count Register */
202#define EBIU_DDRBRC5 0xffc00a74 /* DDR Bank5 Read Count Register */
203#define EBIU_DDRBRC6 0xffc00a78 /* DDR Bank6 Read Count Register */
204#define EBIU_DDRBRC7 0xffc00a7c /* DDR Bank7 Read Count Register */
205#define EBIU_DDRBWC0 0xffc00a80 /* DDR Bank0 Write Count Register */
206#define EBIU_DDRBWC1 0xffc00a84 /* DDR Bank1 Write Count Register */
207#define EBIU_DDRBWC2 0xffc00a88 /* DDR Bank2 Write Count Register */
208#define EBIU_DDRBWC3 0xffc00a8c /* DDR Bank3 Write Count Register */
209#define EBIU_DDRBWC4 0xffc00a90 /* DDR Bank4 Write Count Register */
210#define EBIU_DDRBWC5 0xffc00a94 /* DDR Bank5 Write Count Register */
211#define EBIU_DDRBWC6 0xffc00a98 /* DDR Bank6 Write Count Register */
212#define EBIU_DDRBWC7 0xffc00a9c /* DDR Bank7 Write Count Register */
213#define EBIU_DDRACCT 0xffc00aa0 /* DDR Activation Count Register */
214#define EBIU_DDRTACT 0xffc00aa8 /* DDR Turn Around Count Register */
215#define EBIU_DDRARCT 0xffc00aac /* DDR Auto-refresh Count Register */
216#define EBIU_DDRGC0 0xffc00ab0 /* DDR Grant Count 0 Register */
217#define EBIU_DDRGC1 0xffc00ab4 /* DDR Grant Count 1 Register */
218#define EBIU_DDRGC2 0xffc00ab8 /* DDR Grant Count 2 Register */
219#define EBIU_DDRGC3 0xffc00abc /* DDR Grant Count 3 Register */
220#define EBIU_DDRMCEN 0xffc00ac0 /* DDR Metrics Counter Enable Register */
221#define EBIU_DDRMCCL 0xffc00ac4 /* DDR Metrics Counter Clear Register */
222
223/* DMAC0 Registers */
224
225#define DMAC0_TCPER 0xffc00b0c /* DMA Controller 0 Traffic Control Periods Register */
226#define DMAC0_TCCNT 0xffc00b10 /* DMA Controller 0 Current Counts Register */
227
228/* DMA Channel 0 Registers */
229
230#define DMA0_NEXT_DESC_PTR 0xffc00c00 /* DMA Channel 0 Next Descriptor Pointer Register */
231#define DMA0_START_ADDR 0xffc00c04 /* DMA Channel 0 Start Address Register */
232#define DMA0_CONFIG 0xffc00c08 /* DMA Channel 0 Configuration Register */
233#define DMA0_X_COUNT 0xffc00c10 /* DMA Channel 0 X Count Register */
234#define DMA0_X_MODIFY 0xffc00c14 /* DMA Channel 0 X Modify Register */
235#define DMA0_Y_COUNT 0xffc00c18 /* DMA Channel 0 Y Count Register */
236#define DMA0_Y_MODIFY 0xffc00c1c /* DMA Channel 0 Y Modify Register */
237#define DMA0_CURR_DESC_PTR 0xffc00c20 /* DMA Channel 0 Current Descriptor Pointer Register */
238#define DMA0_CURR_ADDR 0xffc00c24 /* DMA Channel 0 Current Address Register */
239#define DMA0_IRQ_STATUS 0xffc00c28 /* DMA Channel 0 Interrupt/Status Register */
240#define DMA0_PERIPHERAL_MAP 0xffc00c2c /* DMA Channel 0 Peripheral Map Register */
241#define DMA0_CURR_X_COUNT 0xffc00c30 /* DMA Channel 0 Current X Count Register */
242#define DMA0_CURR_Y_COUNT 0xffc00c38 /* DMA Channel 0 Current Y Count Register */
243
244/* DMA Channel 1 Registers */
245
246#define DMA1_NEXT_DESC_PTR 0xffc00c40 /* DMA Channel 1 Next Descriptor Pointer Register */
247#define DMA1_START_ADDR 0xffc00c44 /* DMA Channel 1 Start Address Register */
248#define DMA1_CONFIG 0xffc00c48 /* DMA Channel 1 Configuration Register */
249#define DMA1_X_COUNT 0xffc00c50 /* DMA Channel 1 X Count Register */
250#define DMA1_X_MODIFY 0xffc00c54 /* DMA Channel 1 X Modify Register */
251#define DMA1_Y_COUNT 0xffc00c58 /* DMA Channel 1 Y Count Register */
252#define DMA1_Y_MODIFY 0xffc00c5c /* DMA Channel 1 Y Modify Register */
253#define DMA1_CURR_DESC_PTR 0xffc00c60 /* DMA Channel 1 Current Descriptor Pointer Register */
254#define DMA1_CURR_ADDR 0xffc00c64 /* DMA Channel 1 Current Address Register */
255#define DMA1_IRQ_STATUS 0xffc00c68 /* DMA Channel 1 Interrupt/Status Register */
256#define DMA1_PERIPHERAL_MAP 0xffc00c6c /* DMA Channel 1 Peripheral Map Register */
257#define DMA1_CURR_X_COUNT 0xffc00c70 /* DMA Channel 1 Current X Count Register */
258#define DMA1_CURR_Y_COUNT 0xffc00c78 /* DMA Channel 1 Current Y Count Register */
259
260/* DMA Channel 2 Registers */
261
262#define DMA2_NEXT_DESC_PTR 0xffc00c80 /* DMA Channel 2 Next Descriptor Pointer Register */
263#define DMA2_START_ADDR 0xffc00c84 /* DMA Channel 2 Start Address Register */
264#define DMA2_CONFIG 0xffc00c88 /* DMA Channel 2 Configuration Register */
265#define DMA2_X_COUNT 0xffc00c90 /* DMA Channel 2 X Count Register */
266#define DMA2_X_MODIFY 0xffc00c94 /* DMA Channel 2 X Modify Register */
267#define DMA2_Y_COUNT 0xffc00c98 /* DMA Channel 2 Y Count Register */
268#define DMA2_Y_MODIFY 0xffc00c9c /* DMA Channel 2 Y Modify Register */
269#define DMA2_CURR_DESC_PTR 0xffc00ca0 /* DMA Channel 2 Current Descriptor Pointer Register */
270#define DMA2_CURR_ADDR 0xffc00ca4 /* DMA Channel 2 Current Address Register */
271#define DMA2_IRQ_STATUS 0xffc00ca8 /* DMA Channel 2 Interrupt/Status Register */
272#define DMA2_PERIPHERAL_MAP 0xffc00cac /* DMA Channel 2 Peripheral Map Register */
273#define DMA2_CURR_X_COUNT 0xffc00cb0 /* DMA Channel 2 Current X Count Register */
274#define DMA2_CURR_Y_COUNT 0xffc00cb8 /* DMA Channel 2 Current Y Count Register */
275
276/* DMA Channel 3 Registers */
277
278#define DMA3_NEXT_DESC_PTR 0xffc00cc0 /* DMA Channel 3 Next Descriptor Pointer Register */
279#define DMA3_START_ADDR 0xffc00cc4 /* DMA Channel 3 Start Address Register */
280#define DMA3_CONFIG 0xffc00cc8 /* DMA Channel 3 Configuration Register */
281#define DMA3_X_COUNT 0xffc00cd0 /* DMA Channel 3 X Count Register */
282#define DMA3_X_MODIFY 0xffc00cd4 /* DMA Channel 3 X Modify Register */
283#define DMA3_Y_COUNT 0xffc00cd8 /* DMA Channel 3 Y Count Register */
284#define DMA3_Y_MODIFY 0xffc00cdc /* DMA Channel 3 Y Modify Register */
285#define DMA3_CURR_DESC_PTR 0xffc00ce0 /* DMA Channel 3 Current Descriptor Pointer Register */
286#define DMA3_CURR_ADDR 0xffc00ce4 /* DMA Channel 3 Current Address Register */
287#define DMA3_IRQ_STATUS 0xffc00ce8 /* DMA Channel 3 Interrupt/Status Register */
288#define DMA3_PERIPHERAL_MAP 0xffc00cec /* DMA Channel 3 Peripheral Map Register */
289#define DMA3_CURR_X_COUNT 0xffc00cf0 /* DMA Channel 3 Current X Count Register */
290#define DMA3_CURR_Y_COUNT 0xffc00cf8 /* DMA Channel 3 Current Y Count Register */
291
292/* DMA Channel 4 Registers */
293
294#define DMA4_NEXT_DESC_PTR 0xffc00d00 /* DMA Channel 4 Next Descriptor Pointer Register */
295#define DMA4_START_ADDR 0xffc00d04 /* DMA Channel 4 Start Address Register */
296#define DMA4_CONFIG 0xffc00d08 /* DMA Channel 4 Configuration Register */
297#define DMA4_X_COUNT 0xffc00d10 /* DMA Channel 4 X Count Register */
298#define DMA4_X_MODIFY 0xffc00d14 /* DMA Channel 4 X Modify Register */
299#define DMA4_Y_COUNT 0xffc00d18 /* DMA Channel 4 Y Count Register */
300#define DMA4_Y_MODIFY 0xffc00d1c /* DMA Channel 4 Y Modify Register */
301#define DMA4_CURR_DESC_PTR 0xffc00d20 /* DMA Channel 4 Current Descriptor Pointer Register */
302#define DMA4_CURR_ADDR 0xffc00d24 /* DMA Channel 4 Current Address Register */
303#define DMA4_IRQ_STATUS 0xffc00d28 /* DMA Channel 4 Interrupt/Status Register */
304#define DMA4_PERIPHERAL_MAP 0xffc00d2c /* DMA Channel 4 Peripheral Map Register */
305#define DMA4_CURR_X_COUNT 0xffc00d30 /* DMA Channel 4 Current X Count Register */
306#define DMA4_CURR_Y_COUNT 0xffc00d38 /* DMA Channel 4 Current Y Count Register */
307
308/* DMA Channel 5 Registers */
309
310#define DMA5_NEXT_DESC_PTR 0xffc00d40 /* DMA Channel 5 Next Descriptor Pointer Register */
311#define DMA5_START_ADDR 0xffc00d44 /* DMA Channel 5 Start Address Register */
312#define DMA5_CONFIG 0xffc00d48 /* DMA Channel 5 Configuration Register */
313#define DMA5_X_COUNT 0xffc00d50 /* DMA Channel 5 X Count Register */
314#define DMA5_X_MODIFY 0xffc00d54 /* DMA Channel 5 X Modify Register */
315#define DMA5_Y_COUNT 0xffc00d58 /* DMA Channel 5 Y Count Register */
316#define DMA5_Y_MODIFY 0xffc00d5c /* DMA Channel 5 Y Modify Register */
317#define DMA5_CURR_DESC_PTR 0xffc00d60 /* DMA Channel 5 Current Descriptor Pointer Register */
318#define DMA5_CURR_ADDR 0xffc00d64 /* DMA Channel 5 Current Address Register */
319#define DMA5_IRQ_STATUS 0xffc00d68 /* DMA Channel 5 Interrupt/Status Register */
320#define DMA5_PERIPHERAL_MAP 0xffc00d6c /* DMA Channel 5 Peripheral Map Register */
321#define DMA5_CURR_X_COUNT 0xffc00d70 /* DMA Channel 5 Current X Count Register */
322#define DMA5_CURR_Y_COUNT 0xffc00d78 /* DMA Channel 5 Current Y Count Register */
323
324/* DMA Channel 6 Registers */
325
326#define DMA6_NEXT_DESC_PTR 0xffc00d80 /* DMA Channel 6 Next Descriptor Pointer Register */
327#define DMA6_START_ADDR 0xffc00d84 /* DMA Channel 6 Start Address Register */
328#define DMA6_CONFIG 0xffc00d88 /* DMA Channel 6 Configuration Register */
329#define DMA6_X_COUNT 0xffc00d90 /* DMA Channel 6 X Count Register */
330#define DMA6_X_MODIFY 0xffc00d94 /* DMA Channel 6 X Modify Register */
331#define DMA6_Y_COUNT 0xffc00d98 /* DMA Channel 6 Y Count Register */
332#define DMA6_Y_MODIFY 0xffc00d9c /* DMA Channel 6 Y Modify Register */
333#define DMA6_CURR_DESC_PTR 0xffc00da0 /* DMA Channel 6 Current Descriptor Pointer Register */
334#define DMA6_CURR_ADDR 0xffc00da4 /* DMA Channel 6 Current Address Register */
335#define DMA6_IRQ_STATUS 0xffc00da8 /* DMA Channel 6 Interrupt/Status Register */
336#define DMA6_PERIPHERAL_MAP 0xffc00dac /* DMA Channel 6 Peripheral Map Register */
337#define DMA6_CURR_X_COUNT 0xffc00db0 /* DMA Channel 6 Current X Count Register */
338#define DMA6_CURR_Y_COUNT 0xffc00db8 /* DMA Channel 6 Current Y Count Register */
339
340/* DMA Channel 7 Registers */
341
342#define DMA7_NEXT_DESC_PTR 0xffc00dc0 /* DMA Channel 7 Next Descriptor Pointer Register */
343#define DMA7_START_ADDR 0xffc00dc4 /* DMA Channel 7 Start Address Register */
344#define DMA7_CONFIG 0xffc00dc8 /* DMA Channel 7 Configuration Register */
345#define DMA7_X_COUNT 0xffc00dd0 /* DMA Channel 7 X Count Register */
346#define DMA7_X_MODIFY 0xffc00dd4 /* DMA Channel 7 X Modify Register */
347#define DMA7_Y_COUNT 0xffc00dd8 /* DMA Channel 7 Y Count Register */
348#define DMA7_Y_MODIFY 0xffc00ddc /* DMA Channel 7 Y Modify Register */
349#define DMA7_CURR_DESC_PTR 0xffc00de0 /* DMA Channel 7 Current Descriptor Pointer Register */
350#define DMA7_CURR_ADDR 0xffc00de4 /* DMA Channel 7 Current Address Register */
351#define DMA7_IRQ_STATUS 0xffc00de8 /* DMA Channel 7 Interrupt/Status Register */
352#define DMA7_PERIPHERAL_MAP 0xffc00dec /* DMA Channel 7 Peripheral Map Register */
353#define DMA7_CURR_X_COUNT 0xffc00df0 /* DMA Channel 7 Current X Count Register */
354#define DMA7_CURR_Y_COUNT 0xffc00df8 /* DMA Channel 7 Current Y Count Register */
355
356/* DMA Channel 8 Registers */
357
358#define DMA8_NEXT_DESC_PTR 0xffc00e00 /* DMA Channel 8 Next Descriptor Pointer Register */
359#define DMA8_START_ADDR 0xffc00e04 /* DMA Channel 8 Start Address Register */
360#define DMA8_CONFIG 0xffc00e08 /* DMA Channel 8 Configuration Register */
361#define DMA8_X_COUNT 0xffc00e10 /* DMA Channel 8 X Count Register */
362#define DMA8_X_MODIFY 0xffc00e14 /* DMA Channel 8 X Modify Register */
363#define DMA8_Y_COUNT 0xffc00e18 /* DMA Channel 8 Y Count Register */
364#define DMA8_Y_MODIFY 0xffc00e1c /* DMA Channel 8 Y Modify Register */
365#define DMA8_CURR_DESC_PTR 0xffc00e20 /* DMA Channel 8 Current Descriptor Pointer Register */
366#define DMA8_CURR_ADDR 0xffc00e24 /* DMA Channel 8 Current Address Register */
367#define DMA8_IRQ_STATUS 0xffc00e28 /* DMA Channel 8 Interrupt/Status Register */
368#define DMA8_PERIPHERAL_MAP 0xffc00e2c /* DMA Channel 8 Peripheral Map Register */
369#define DMA8_CURR_X_COUNT 0xffc00e30 /* DMA Channel 8 Current X Count Register */
370#define DMA8_CURR_Y_COUNT 0xffc00e38 /* DMA Channel 8 Current Y Count Register */
371
372/* DMA Channel 9 Registers */
373
374#define DMA9_NEXT_DESC_PTR 0xffc00e40 /* DMA Channel 9 Next Descriptor Pointer Register */
375#define DMA9_START_ADDR 0xffc00e44 /* DMA Channel 9 Start Address Register */
376#define DMA9_CONFIG 0xffc00e48 /* DMA Channel 9 Configuration Register */
377#define DMA9_X_COUNT 0xffc00e50 /* DMA Channel 9 X Count Register */
378#define DMA9_X_MODIFY 0xffc00e54 /* DMA Channel 9 X Modify Register */
379#define DMA9_Y_COUNT 0xffc00e58 /* DMA Channel 9 Y Count Register */
380#define DMA9_Y_MODIFY 0xffc00e5c /* DMA Channel 9 Y Modify Register */
381#define DMA9_CURR_DESC_PTR 0xffc00e60 /* DMA Channel 9 Current Descriptor Pointer Register */
382#define DMA9_CURR_ADDR 0xffc00e64 /* DMA Channel 9 Current Address Register */
383#define DMA9_IRQ_STATUS 0xffc00e68 /* DMA Channel 9 Interrupt/Status Register */
384#define DMA9_PERIPHERAL_MAP 0xffc00e6c /* DMA Channel 9 Peripheral Map Register */
385#define DMA9_CURR_X_COUNT 0xffc00e70 /* DMA Channel 9 Current X Count Register */
386#define DMA9_CURR_Y_COUNT 0xffc00e78 /* DMA Channel 9 Current Y Count Register */
387
388/* DMA Channel 10 Registers */
389
390#define DMA10_NEXT_DESC_PTR 0xffc00e80 /* DMA Channel 10 Next Descriptor Pointer Register */
391#define DMA10_START_ADDR 0xffc00e84 /* DMA Channel 10 Start Address Register */
392#define DMA10_CONFIG 0xffc00e88 /* DMA Channel 10 Configuration Register */
393#define DMA10_X_COUNT 0xffc00e90 /* DMA Channel 10 X Count Register */
394#define DMA10_X_MODIFY 0xffc00e94 /* DMA Channel 10 X Modify Register */
395#define DMA10_Y_COUNT 0xffc00e98 /* DMA Channel 10 Y Count Register */
396#define DMA10_Y_MODIFY 0xffc00e9c /* DMA Channel 10 Y Modify Register */
397#define DMA10_CURR_DESC_PTR 0xffc00ea0 /* DMA Channel 10 Current Descriptor Pointer Register */
398#define DMA10_CURR_ADDR 0xffc00ea4 /* DMA Channel 10 Current Address Register */
399#define DMA10_IRQ_STATUS 0xffc00ea8 /* DMA Channel 10 Interrupt/Status Register */
400#define DMA10_PERIPHERAL_MAP 0xffc00eac /* DMA Channel 10 Peripheral Map Register */
401#define DMA10_CURR_X_COUNT 0xffc00eb0 /* DMA Channel 10 Current X Count Register */
402#define DMA10_CURR_Y_COUNT 0xffc00eb8 /* DMA Channel 10 Current Y Count Register */
403
404/* DMA Channel 11 Registers */
405
406#define DMA11_NEXT_DESC_PTR 0xffc00ec0 /* DMA Channel 11 Next Descriptor Pointer Register */
407#define DMA11_START_ADDR 0xffc00ec4 /* DMA Channel 11 Start Address Register */
408#define DMA11_CONFIG 0xffc00ec8 /* DMA Channel 11 Configuration Register */
409#define DMA11_X_COUNT 0xffc00ed0 /* DMA Channel 11 X Count Register */
410#define DMA11_X_MODIFY 0xffc00ed4 /* DMA Channel 11 X Modify Register */
411#define DMA11_Y_COUNT 0xffc00ed8 /* DMA Channel 11 Y Count Register */
412#define DMA11_Y_MODIFY 0xffc00edc /* DMA Channel 11 Y Modify Register */
413#define DMA11_CURR_DESC_PTR 0xffc00ee0 /* DMA Channel 11 Current Descriptor Pointer Register */
414#define DMA11_CURR_ADDR 0xffc00ee4 /* DMA Channel 11 Current Address Register */
415#define DMA11_IRQ_STATUS 0xffc00ee8 /* DMA Channel 11 Interrupt/Status Register */
416#define DMA11_PERIPHERAL_MAP 0xffc00eec /* DMA Channel 11 Peripheral Map Register */
417#define DMA11_CURR_X_COUNT 0xffc00ef0 /* DMA Channel 11 Current X Count Register */
418#define DMA11_CURR_Y_COUNT 0xffc00ef8 /* DMA Channel 11 Current Y Count Register */
419
420/* MDMA Stream 0 Registers */
421
422#define MDMA_D0_NEXT_DESC_PTR 0xffc00f00 /* Memory DMA Stream 0 Destination Next Descriptor Pointer Register */
423#define MDMA_D0_START_ADDR 0xffc00f04 /* Memory DMA Stream 0 Destination Start Address Register */
424#define MDMA_D0_CONFIG 0xffc00f08 /* Memory DMA Stream 0 Destination Configuration Register */
425#define MDMA_D0_X_COUNT 0xffc00f10 /* Memory DMA Stream 0 Destination X Count Register */
426#define MDMA_D0_X_MODIFY 0xffc00f14 /* Memory DMA Stream 0 Destination X Modify Register */
427#define MDMA_D0_Y_COUNT 0xffc00f18 /* Memory DMA Stream 0 Destination Y Count Register */
428#define MDMA_D0_Y_MODIFY 0xffc00f1c /* Memory DMA Stream 0 Destination Y Modify Register */
429#define MDMA_D0_CURR_DESC_PTR 0xffc00f20 /* Memory DMA Stream 0 Destination Current Descriptor Pointer Register */
430#define MDMA_D0_CURR_ADDR 0xffc00f24 /* Memory DMA Stream 0 Destination Current Address Register */
431#define MDMA_D0_IRQ_STATUS 0xffc00f28 /* Memory DMA Stream 0 Destination Interrupt/Status Register */
432#define MDMA_D0_PERIPHERAL_MAP 0xffc00f2c /* Memory DMA Stream 0 Destination Peripheral Map Register */
433#define MDMA_D0_CURR_X_COUNT 0xffc00f30 /* Memory DMA Stream 0 Destination Current X Count Register */
434#define MDMA_D0_CURR_Y_COUNT 0xffc00f38 /* Memory DMA Stream 0 Destination Current Y Count Register */
435#define MDMA_S0_NEXT_DESC_PTR 0xffc00f40 /* Memory DMA Stream 0 Source Next Descriptor Pointer Register */
436#define MDMA_S0_START_ADDR 0xffc00f44 /* Memory DMA Stream 0 Source Start Address Register */
437#define MDMA_S0_CONFIG 0xffc00f48 /* Memory DMA Stream 0 Source Configuration Register */
438#define MDMA_S0_X_COUNT 0xffc00f50 /* Memory DMA Stream 0 Source X Count Register */
439#define MDMA_S0_X_MODIFY 0xffc00f54 /* Memory DMA Stream 0 Source X Modify Register */
440#define MDMA_S0_Y_COUNT 0xffc00f58 /* Memory DMA Stream 0 Source Y Count Register */
441#define MDMA_S0_Y_MODIFY 0xffc00f5c /* Memory DMA Stream 0 Source Y Modify Register */
442#define MDMA_S0_CURR_DESC_PTR 0xffc00f60 /* Memory DMA Stream 0 Source Current Descriptor Pointer Register */
443#define MDMA_S0_CURR_ADDR 0xffc00f64 /* Memory DMA Stream 0 Source Current Address Register */
444#define MDMA_S0_IRQ_STATUS 0xffc00f68 /* Memory DMA Stream 0 Source Interrupt/Status Register */
445#define MDMA_S0_PERIPHERAL_MAP 0xffc00f6c /* Memory DMA Stream 0 Source Peripheral Map Register */
446#define MDMA_S0_CURR_X_COUNT 0xffc00f70 /* Memory DMA Stream 0 Source Current X Count Register */
447#define MDMA_S0_CURR_Y_COUNT 0xffc00f78 /* Memory DMA Stream 0 Source Current Y Count Register */
448
449/* MDMA Stream 1 Registers */
450
451#define MDMA_D1_NEXT_DESC_PTR 0xffc00f80 /* Memory DMA Stream 1 Destination Next Descriptor Pointer Register */
452#define MDMA_D1_START_ADDR 0xffc00f84 /* Memory DMA Stream 1 Destination Start Address Register */
453#define MDMA_D1_CONFIG 0xffc00f88 /* Memory DMA Stream 1 Destination Configuration Register */
454#define MDMA_D1_X_COUNT 0xffc00f90 /* Memory DMA Stream 1 Destination X Count Register */
455#define MDMA_D1_X_MODIFY 0xffc00f94 /* Memory DMA Stream 1 Destination X Modify Register */
456#define MDMA_D1_Y_COUNT 0xffc00f98 /* Memory DMA Stream 1 Destination Y Count Register */
457#define MDMA_D1_Y_MODIFY 0xffc00f9c /* Memory DMA Stream 1 Destination Y Modify Register */
458#define MDMA_D1_CURR_DESC_PTR 0xffc00fa0 /* Memory DMA Stream 1 Destination Current Descriptor Pointer Register */
459#define MDMA_D1_CURR_ADDR 0xffc00fa4 /* Memory DMA Stream 1 Destination Current Address Register */
460#define MDMA_D1_IRQ_STATUS 0xffc00fa8 /* Memory DMA Stream 1 Destination Interrupt/Status Register */
461#define MDMA_D1_PERIPHERAL_MAP 0xffc00fac /* Memory DMA Stream 1 Destination Peripheral Map Register */
462#define MDMA_D1_CURR_X_COUNT 0xffc00fb0 /* Memory DMA Stream 1 Destination Current X Count Register */
463#define MDMA_D1_CURR_Y_COUNT 0xffc00fb8 /* Memory DMA Stream 1 Destination Current Y Count Register */
464#define MDMA_S1_NEXT_DESC_PTR 0xffc00fc0 /* Memory DMA Stream 1 Source Next Descriptor Pointer Register */
465#define MDMA_S1_START_ADDR 0xffc00fc4 /* Memory DMA Stream 1 Source Start Address Register */
466#define MDMA_S1_CONFIG 0xffc00fc8 /* Memory DMA Stream 1 Source Configuration Register */
467#define MDMA_S1_X_COUNT 0xffc00fd0 /* Memory DMA Stream 1 Source X Count Register */
468#define MDMA_S1_X_MODIFY 0xffc00fd4 /* Memory DMA Stream 1 Source X Modify Register */
469#define MDMA_S1_Y_COUNT 0xffc00fd8 /* Memory DMA Stream 1 Source Y Count Register */
470#define MDMA_S1_Y_MODIFY 0xffc00fdc /* Memory DMA Stream 1 Source Y Modify Register */
471#define MDMA_S1_CURR_DESC_PTR 0xffc00fe0 /* Memory DMA Stream 1 Source Current Descriptor Pointer Register */
472#define MDMA_S1_CURR_ADDR 0xffc00fe4 /* Memory DMA Stream 1 Source Current Address Register */
473#define MDMA_S1_IRQ_STATUS 0xffc00fe8 /* Memory DMA Stream 1 Source Interrupt/Status Register */
474#define MDMA_S1_PERIPHERAL_MAP 0xffc00fec /* Memory DMA Stream 1 Source Peripheral Map Register */
475#define MDMA_S1_CURR_X_COUNT 0xffc00ff0 /* Memory DMA Stream 1 Source Current X Count Register */
476#define MDMA_S1_CURR_Y_COUNT 0xffc00ff8 /* Memory DMA Stream 1 Source Current Y Count Register */
477
478/* UART3 Registers */
479
480#define UART3_DLL 0xffc03100 /* Divisor Latch Low Byte */
481#define UART3_DLH 0xffc03104 /* Divisor Latch High Byte */
482#define UART3_GCTL 0xffc03108 /* Global Control Register */
483#define UART3_LCR 0xffc0310c /* Line Control Register */
484#define UART3_MCR 0xffc03110 /* Modem Control Register */
485#define UART3_LSR 0xffc03114 /* Line Status Register */
486#define UART3_MSR 0xffc03118 /* Modem Status Register */
487#define UART3_SCR 0xffc0311c /* Scratch Register */
488#define UART3_IER_SET 0xffc03120 /* Interrupt Enable Register Set */
489#define UART3_IER_CLEAR 0xffc03124 /* Interrupt Enable Register Clear */
490#define UART3_THR 0xffc03128 /* Transmit Hold Register */
491#define UART3_RBR 0xffc0312c /* Receive Buffer Register */
492
493/* EPPI1 Registers */
494
495#define EPPI1_STATUS 0xffc01300 /* EPPI1 Status Register */
496#define EPPI1_HCOUNT 0xffc01304 /* EPPI1 Horizontal Transfer Count Register */
497#define EPPI1_HDELAY 0xffc01308 /* EPPI1 Horizontal Delay Count Register */
498#define EPPI1_VCOUNT 0xffc0130c /* EPPI1 Vertical Transfer Count Register */
499#define EPPI1_VDELAY 0xffc01310 /* EPPI1 Vertical Delay Count Register */
500#define EPPI1_FRAME 0xffc01314 /* EPPI1 Lines per Frame Register */
501#define EPPI1_LINE 0xffc01318 /* EPPI1 Samples per Line Register */
502#define EPPI1_CLKDIV 0xffc0131c /* EPPI1 Clock Divide Register */
503#define EPPI1_CONTROL 0xffc01320 /* EPPI1 Control Register */
504#define EPPI1_FS1W_HBL 0xffc01324 /* EPPI1 FS1 Width Register / EPPI1 Horizontal Blanking Samples Per Line Register */
505#define EPPI1_FS1P_AVPL 0xffc01328 /* EPPI1 FS1 Period Register / EPPI1 Active Video Samples Per Line Register */
506#define EPPI1_FS2W_LVB 0xffc0132c /* EPPI1 FS2 Width Register / EPPI1 Lines of Vertical Blanking Register */
507#define EPPI1_FS2P_LAVF 0xffc01330 /* EPPI1 FS2 Period Register/ EPPI1 Lines of Active Video Per Field Register */
508#define EPPI1_CLIP 0xffc01334 /* EPPI1 Clipping Register */
509
510/* Port Interrupt 0 Registers (32-bit) */
511
512#define PINT0_MASK_SET 0xffc01400 /* Pin Interrupt 0 Mask Set Register */
513#define PINT0_MASK_CLEAR 0xffc01404 /* Pin Interrupt 0 Mask Clear Register */
514#define PINT0_REQUEST 0xffc01408 /* Pin Interrupt 0 Interrupt Request Register */
515#define PINT0_ASSIGN 0xffc0140c /* Pin Interrupt 0 Port Assign Register */
516#define PINT0_EDGE_SET 0xffc01410 /* Pin Interrupt 0 Edge-sensitivity Set Register */
517#define PINT0_EDGE_CLEAR 0xffc01414 /* Pin Interrupt 0 Edge-sensitivity Clear Register */
518#define PINT0_INVERT_SET 0xffc01418 /* Pin Interrupt 0 Inversion Set Register */
519#define PINT0_INVERT_CLEAR 0xffc0141c /* Pin Interrupt 0 Inversion Clear Register */
520#define PINT0_PINSTATE 0xffc01420 /* Pin Interrupt 0 Pin Status Register */
521#define PINT0_LATCH 0xffc01424 /* Pin Interrupt 0 Latch Register */
522
523/* Port Interrupt 1 Registers (32-bit) */
524
525#define PINT1_MASK_SET 0xffc01430 /* Pin Interrupt 1 Mask Set Register */
526#define PINT1_MASK_CLEAR 0xffc01434 /* Pin Interrupt 1 Mask Clear Register */
527#define PINT1_REQUEST 0xffc01438 /* Pin Interrupt 1 Interrupt Request Register */
528#define PINT1_ASSIGN 0xffc0143c /* Pin Interrupt 1 Port Assign Register */
529#define PINT1_EDGE_SET 0xffc01440 /* Pin Interrupt 1 Edge-sensitivity Set Register */
530#define PINT1_EDGE_CLEAR 0xffc01444 /* Pin Interrupt 1 Edge-sensitivity Clear Register */
531#define PINT1_INVERT_SET 0xffc01448 /* Pin Interrupt 1 Inversion Set Register */
532#define PINT1_INVERT_CLEAR 0xffc0144c /* Pin Interrupt 1 Inversion Clear Register */
533#define PINT1_PINSTATE 0xffc01450 /* Pin Interrupt 1 Pin Status Register */
534#define PINT1_LATCH 0xffc01454 /* Pin Interrupt 1 Latch Register */
535
536/* Port Interrupt 2 Registers (32-bit) */
537
538#define PINT2_MASK_SET 0xffc01460 /* Pin Interrupt 2 Mask Set Register */
539#define PINT2_MASK_CLEAR 0xffc01464 /* Pin Interrupt 2 Mask Clear Register */
540#define PINT2_REQUEST 0xffc01468 /* Pin Interrupt 2 Interrupt Request Register */
541#define PINT2_ASSIGN 0xffc0146c /* Pin Interrupt 2 Port Assign Register */
542#define PINT2_EDGE_SET 0xffc01470 /* Pin Interrupt 2 Edge-sensitivity Set Register */
543#define PINT2_EDGE_CLEAR 0xffc01474 /* Pin Interrupt 2 Edge-sensitivity Clear Register */
544#define PINT2_INVERT_SET 0xffc01478 /* Pin Interrupt 2 Inversion Set Register */
545#define PINT2_INVERT_CLEAR 0xffc0147c /* Pin Interrupt 2 Inversion Clear Register */
546#define PINT2_PINSTATE 0xffc01480 /* Pin Interrupt 2 Pin Status Register */
547#define PINT2_LATCH 0xffc01484 /* Pin Interrupt 2 Latch Register */
548
549/* Port Interrupt 3 Registers (32-bit) */
550
551#define PINT3_MASK_SET 0xffc01490 /* Pin Interrupt 3 Mask Set Register */
552#define PINT3_MASK_CLEAR 0xffc01494 /* Pin Interrupt 3 Mask Clear Register */
553#define PINT3_REQUEST 0xffc01498 /* Pin Interrupt 3 Interrupt Request Register */
554#define PINT3_ASSIGN 0xffc0149c /* Pin Interrupt 3 Port Assign Register */
555#define PINT3_EDGE_SET 0xffc014a0 /* Pin Interrupt 3 Edge-sensitivity Set Register */
556#define PINT3_EDGE_CLEAR 0xffc014a4 /* Pin Interrupt 3 Edge-sensitivity Clear Register */
557#define PINT3_INVERT_SET 0xffc014a8 /* Pin Interrupt 3 Inversion Set Register */
558#define PINT3_INVERT_CLEAR 0xffc014ac /* Pin Interrupt 3 Inversion Clear Register */
559#define PINT3_PINSTATE 0xffc014b0 /* Pin Interrupt 3 Pin Status Register */
560#define PINT3_LATCH 0xffc014b4 /* Pin Interrupt 3 Latch Register */
561
562/* Port A Registers */
563
564#define PORTA_FER 0xffc014c0 /* Function Enable Register */
565#define PORTA 0xffc014c4 /* GPIO Data Register */
566#define PORTA_SET 0xffc014c8 /* GPIO Data Set Register */
567#define PORTA_CLEAR 0xffc014cc /* GPIO Data Clear Register */
568#define PORTA_DIR_SET 0xffc014d0 /* GPIO Direction Set Register */
569#define PORTA_DIR_CLEAR 0xffc014d4 /* GPIO Direction Clear Register */
570#define PORTA_INEN 0xffc014d8 /* GPIO Input Enable Register */
571#define PORTA_MUX 0xffc014dc /* Multiplexer Control Register */
572
573/* Port B Registers */
574
575#define PORTB_FER 0xffc014e0 /* Function Enable Register */
576#define PORTB 0xffc014e4 /* GPIO Data Register */
577#define PORTB_SET 0xffc014e8 /* GPIO Data Set Register */
578#define PORTB_CLEAR 0xffc014ec /* GPIO Data Clear Register */
579#define PORTB_DIR_SET 0xffc014f0 /* GPIO Direction Set Register */
580#define PORTB_DIR_CLEAR 0xffc014f4 /* GPIO Direction Clear Register */
581#define PORTB_INEN 0xffc014f8 /* GPIO Input Enable Register */
582#define PORTB_MUX 0xffc014fc /* Multiplexer Control Register */
583
584/* Port C Registers */
585
586#define PORTC_FER 0xffc01500 /* Function Enable Register */
587#define PORTC 0xffc01504 /* GPIO Data Register */
588#define PORTC_SET 0xffc01508 /* GPIO Data Set Register */
589#define PORTC_CLEAR 0xffc0150c /* GPIO Data Clear Register */
590#define PORTC_DIR_SET 0xffc01510 /* GPIO Direction Set Register */
591#define PORTC_DIR_CLEAR 0xffc01514 /* GPIO Direction Clear Register */
592#define PORTC_INEN 0xffc01518 /* GPIO Input Enable Register */
593#define PORTC_MUX 0xffc0151c /* Multiplexer Control Register */
594
595/* Port D Registers */
596
597#define PORTD_FER 0xffc01520 /* Function Enable Register */
598#define PORTD 0xffc01524 /* GPIO Data Register */
599#define PORTD_SET 0xffc01528 /* GPIO Data Set Register */
600#define PORTD_CLEAR 0xffc0152c /* GPIO Data Clear Register */
601#define PORTD_DIR_SET 0xffc01530 /* GPIO Direction Set Register */
602#define PORTD_DIR_CLEAR 0xffc01534 /* GPIO Direction Clear Register */
603#define PORTD_INEN 0xffc01538 /* GPIO Input Enable Register */
604#define PORTD_MUX 0xffc0153c /* Multiplexer Control Register */
605
606/* Port E Registers */
607
608#define PORTE_FER 0xffc01540 /* Function Enable Register */
609#define PORTE 0xffc01544 /* GPIO Data Register */
610#define PORTE_SET 0xffc01548 /* GPIO Data Set Register */
611#define PORTE_CLEAR 0xffc0154c /* GPIO Data Clear Register */
612#define PORTE_DIR_SET 0xffc01550 /* GPIO Direction Set Register */
613#define PORTE_DIR_CLEAR 0xffc01554 /* GPIO Direction Clear Register */
614#define PORTE_INEN 0xffc01558 /* GPIO Input Enable Register */
615#define PORTE_MUX 0xffc0155c /* Multiplexer Control Register */
616
617/* Port F Registers */
618
619#define PORTF_FER 0xffc01560 /* Function Enable Register */
620#define PORTF 0xffc01564 /* GPIO Data Register */
621#define PORTF_SET 0xffc01568 /* GPIO Data Set Register */
622#define PORTF_CLEAR 0xffc0156c /* GPIO Data Clear Register */
623#define PORTF_DIR_SET 0xffc01570 /* GPIO Direction Set Register */
624#define PORTF_DIR_CLEAR 0xffc01574 /* GPIO Direction Clear Register */
625#define PORTF_INEN 0xffc01578 /* GPIO Input Enable Register */
626#define PORTF_MUX 0xffc0157c /* Multiplexer Control Register */
627
628/* Port G Registers */
629
630#define PORTG_FER 0xffc01580 /* Function Enable Register */
631#define PORTG 0xffc01584 /* GPIO Data Register */
632#define PORTG_SET 0xffc01588 /* GPIO Data Set Register */
633#define PORTG_CLEAR 0xffc0158c /* GPIO Data Clear Register */
634#define PORTG_DIR_SET 0xffc01590 /* GPIO Direction Set Register */
635#define PORTG_DIR_CLEAR 0xffc01594 /* GPIO Direction Clear Register */
636#define PORTG_INEN 0xffc01598 /* GPIO Input Enable Register */
637#define PORTG_MUX 0xffc0159c /* Multiplexer Control Register */
638
639/* Port H Registers */
640
641#define PORTH_FER 0xffc015a0 /* Function Enable Register */
642#define PORTH 0xffc015a4 /* GPIO Data Register */
643#define PORTH_SET 0xffc015a8 /* GPIO Data Set Register */
644#define PORTH_CLEAR 0xffc015ac /* GPIO Data Clear Register */
645#define PORTH_DIR_SET 0xffc015b0 /* GPIO Direction Set Register */
646#define PORTH_DIR_CLEAR 0xffc015b4 /* GPIO Direction Clear Register */
647#define PORTH_INEN 0xffc015b8 /* GPIO Input Enable Register */
648#define PORTH_MUX 0xffc015bc /* Multiplexer Control Register */
649
650/* Port I Registers */
651
652#define PORTI_FER 0xffc015c0 /* Function Enable Register */
653#define PORTI 0xffc015c4 /* GPIO Data Register */
654#define PORTI_SET 0xffc015c8 /* GPIO Data Set Register */
655#define PORTI_CLEAR 0xffc015cc /* GPIO Data Clear Register */
656#define PORTI_DIR_SET 0xffc015d0 /* GPIO Direction Set Register */
657#define PORTI_DIR_CLEAR 0xffc015d4 /* GPIO Direction Clear Register */
658#define PORTI_INEN 0xffc015d8 /* GPIO Input Enable Register */
659#define PORTI_MUX 0xffc015dc /* Multiplexer Control Register */
660
661/* Port J Registers */
662
663#define PORTJ_FER 0xffc015e0 /* Function Enable Register */
664#define PORTJ 0xffc015e4 /* GPIO Data Register */
665#define PORTJ_SET 0xffc015e8 /* GPIO Data Set Register */
666#define PORTJ_CLEAR 0xffc015ec /* GPIO Data Clear Register */
667#define PORTJ_DIR_SET 0xffc015f0 /* GPIO Direction Set Register */
668#define PORTJ_DIR_CLEAR 0xffc015f4 /* GPIO Direction Clear Register */
669#define PORTJ_INEN 0xffc015f8 /* GPIO Input Enable Register */
670#define PORTJ_MUX 0xffc015fc /* Multiplexer Control Register */
671
672/* PWM Timer Registers */
673
674#define TIMER0_CONFIG 0xffc01600 /* Timer 0 Configuration Register */
675#define TIMER0_COUNTER 0xffc01604 /* Timer 0 Counter Register */
676#define TIMER0_PERIOD 0xffc01608 /* Timer 0 Period Register */
677#define TIMER0_WIDTH 0xffc0160c /* Timer 0 Width Register */
678#define TIMER1_CONFIG 0xffc01610 /* Timer 1 Configuration Register */
679#define TIMER1_COUNTER 0xffc01614 /* Timer 1 Counter Register */
680#define TIMER1_PERIOD 0xffc01618 /* Timer 1 Period Register */
681#define TIMER1_WIDTH 0xffc0161c /* Timer 1 Width Register */
682#define TIMER2_CONFIG 0xffc01620 /* Timer 2 Configuration Register */
683#define TIMER2_COUNTER 0xffc01624 /* Timer 2 Counter Register */
684#define TIMER2_PERIOD 0xffc01628 /* Timer 2 Period Register */
685#define TIMER2_WIDTH 0xffc0162c /* Timer 2 Width Register */
686#define TIMER3_CONFIG 0xffc01630 /* Timer 3 Configuration Register */
687#define TIMER3_COUNTER 0xffc01634 /* Timer 3 Counter Register */
688#define TIMER3_PERIOD 0xffc01638 /* Timer 3 Period Register */
689#define TIMER3_WIDTH 0xffc0163c /* Timer 3 Width Register */
690#define TIMER4_CONFIG 0xffc01640 /* Timer 4 Configuration Register */
691#define TIMER4_COUNTER 0xffc01644 /* Timer 4 Counter Register */
692#define TIMER4_PERIOD 0xffc01648 /* Timer 4 Period Register */
693#define TIMER4_WIDTH 0xffc0164c /* Timer 4 Width Register */
694#define TIMER5_CONFIG 0xffc01650 /* Timer 5 Configuration Register */
695#define TIMER5_COUNTER 0xffc01654 /* Timer 5 Counter Register */
696#define TIMER5_PERIOD 0xffc01658 /* Timer 5 Period Register */
697#define TIMER5_WIDTH 0xffc0165c /* Timer 5 Width Register */
698#define TIMER6_CONFIG 0xffc01660 /* Timer 6 Configuration Register */
699#define TIMER6_COUNTER 0xffc01664 /* Timer 6 Counter Register */
700#define TIMER6_PERIOD 0xffc01668 /* Timer 6 Period Register */
701#define TIMER6_WIDTH 0xffc0166c /* Timer 6 Width Register */
702#define TIMER7_CONFIG 0xffc01670 /* Timer 7 Configuration Register */
703#define TIMER7_COUNTER 0xffc01674 /* Timer 7 Counter Register */
704#define TIMER7_PERIOD 0xffc01678 /* Timer 7 Period Register */
705#define TIMER7_WIDTH 0xffc0167c /* Timer 7 Width Register */
706
707/* Timer Group of 8 */
708
709#define TIMER_ENABLE0 0xffc01680 /* Timer Group of 8 Enable Register */
710#define TIMER_DISABLE0 0xffc01684 /* Timer Group of 8 Disable Register */
711#define TIMER_STATUS0 0xffc01688 /* Timer Group of 8 Status Register */
712
713/* DMAC1 Registers */
714
715#define DMAC1_TCPER 0xffc01b0c /* DMA Controller 1 Traffic Control Periods Register */
716#define DMAC1_TCCNT 0xffc01b10 /* DMA Controller 1 Current Counts Register */
717
718/* DMA Channel 12 Registers */
719
720#define DMA12_NEXT_DESC_PTR 0xffc01c00 /* DMA Channel 12 Next Descriptor Pointer Register */
721#define DMA12_START_ADDR 0xffc01c04 /* DMA Channel 12 Start Address Register */
722#define DMA12_CONFIG 0xffc01c08 /* DMA Channel 12 Configuration Register */
723#define DMA12_X_COUNT 0xffc01c10 /* DMA Channel 12 X Count Register */
724#define DMA12_X_MODIFY 0xffc01c14 /* DMA Channel 12 X Modify Register */
725#define DMA12_Y_COUNT 0xffc01c18 /* DMA Channel 12 Y Count Register */
726#define DMA12_Y_MODIFY 0xffc01c1c /* DMA Channel 12 Y Modify Register */
727#define DMA12_CURR_DESC_PTR 0xffc01c20 /* DMA Channel 12 Current Descriptor Pointer Register */
728#define DMA12_CURR_ADDR 0xffc01c24 /* DMA Channel 12 Current Address Register */
729#define DMA12_IRQ_STATUS 0xffc01c28 /* DMA Channel 12 Interrupt/Status Register */
730#define DMA12_PERIPHERAL_MAP 0xffc01c2c /* DMA Channel 12 Peripheral Map Register */
731#define DMA12_CURR_X_COUNT 0xffc01c30 /* DMA Channel 12 Current X Count Register */
732#define DMA12_CURR_Y_COUNT 0xffc01c38 /* DMA Channel 12 Current Y Count Register */
733
734/* DMA Channel 13 Registers */
735
736#define DMA13_NEXT_DESC_PTR 0xffc01c40 /* DMA Channel 13 Next Descriptor Pointer Register */
737#define DMA13_START_ADDR 0xffc01c44 /* DMA Channel 13 Start Address Register */
738#define DMA13_CONFIG 0xffc01c48 /* DMA Channel 13 Configuration Register */
739#define DMA13_X_COUNT 0xffc01c50 /* DMA Channel 13 X Count Register */
740#define DMA13_X_MODIFY 0xffc01c54 /* DMA Channel 13 X Modify Register */
741#define DMA13_Y_COUNT 0xffc01c58 /* DMA Channel 13 Y Count Register */
742#define DMA13_Y_MODIFY 0xffc01c5c /* DMA Channel 13 Y Modify Register */
743#define DMA13_CURR_DESC_PTR 0xffc01c60 /* DMA Channel 13 Current Descriptor Pointer Register */
744#define DMA13_CURR_ADDR 0xffc01c64 /* DMA Channel 13 Current Address Register */
745#define DMA13_IRQ_STATUS 0xffc01c68 /* DMA Channel 13 Interrupt/Status Register */
746#define DMA13_PERIPHERAL_MAP 0xffc01c6c /* DMA Channel 13 Peripheral Map Register */
747#define DMA13_CURR_X_COUNT 0xffc01c70 /* DMA Channel 13 Current X Count Register */
748#define DMA13_CURR_Y_COUNT 0xffc01c78 /* DMA Channel 13 Current Y Count Register */
749
750/* DMA Channel 14 Registers */
751
752#define DMA14_NEXT_DESC_PTR 0xffc01c80 /* DMA Channel 14 Next Descriptor Pointer Register */
753#define DMA14_START_ADDR 0xffc01c84 /* DMA Channel 14 Start Address Register */
754#define DMA14_CONFIG 0xffc01c88 /* DMA Channel 14 Configuration Register */
755#define DMA14_X_COUNT 0xffc01c90 /* DMA Channel 14 X Count Register */
756#define DMA14_X_MODIFY 0xffc01c94 /* DMA Channel 14 X Modify Register */
757#define DMA14_Y_COUNT 0xffc01c98 /* DMA Channel 14 Y Count Register */
758#define DMA14_Y_MODIFY 0xffc01c9c /* DMA Channel 14 Y Modify Register */
759#define DMA14_CURR_DESC_PTR 0xffc01ca0 /* DMA Channel 14 Current Descriptor Pointer Register */
760#define DMA14_CURR_ADDR 0xffc01ca4 /* DMA Channel 14 Current Address Register */
761#define DMA14_IRQ_STATUS 0xffc01ca8 /* DMA Channel 14 Interrupt/Status Register */
762#define DMA14_PERIPHERAL_MAP 0xffc01cac /* DMA Channel 14 Peripheral Map Register */
763#define DMA14_CURR_X_COUNT 0xffc01cb0 /* DMA Channel 14 Current X Count Register */
764#define DMA14_CURR_Y_COUNT 0xffc01cb8 /* DMA Channel 14 Current Y Count Register */
765
766/* DMA Channel 15 Registers */
767
768#define DMA15_NEXT_DESC_PTR 0xffc01cc0 /* DMA Channel 15 Next Descriptor Pointer Register */
769#define DMA15_START_ADDR 0xffc01cc4 /* DMA Channel 15 Start Address Register */
770#define DMA15_CONFIG 0xffc01cc8 /* DMA Channel 15 Configuration Register */
771#define DMA15_X_COUNT 0xffc01cd0 /* DMA Channel 15 X Count Register */
772#define DMA15_X_MODIFY 0xffc01cd4 /* DMA Channel 15 X Modify Register */
773#define DMA15_Y_COUNT 0xffc01cd8 /* DMA Channel 15 Y Count Register */
774#define DMA15_Y_MODIFY 0xffc01cdc /* DMA Channel 15 Y Modify Register */
775#define DMA15_CURR_DESC_PTR 0xffc01ce0 /* DMA Channel 15 Current Descriptor Pointer Register */
776#define DMA15_CURR_ADDR 0xffc01ce4 /* DMA Channel 15 Current Address Register */
777#define DMA15_IRQ_STATUS 0xffc01ce8 /* DMA Channel 15 Interrupt/Status Register */
778#define DMA15_PERIPHERAL_MAP 0xffc01cec /* DMA Channel 15 Peripheral Map Register */
779#define DMA15_CURR_X_COUNT 0xffc01cf0 /* DMA Channel 15 Current X Count Register */
780#define DMA15_CURR_Y_COUNT 0xffc01cf8 /* DMA Channel 15 Current Y Count Register */
781
782/* DMA Channel 16 Registers */
783
784#define DMA16_NEXT_DESC_PTR 0xffc01d00 /* DMA Channel 16 Next Descriptor Pointer Register */
785#define DMA16_START_ADDR 0xffc01d04 /* DMA Channel 16 Start Address Register */
786#define DMA16_CONFIG 0xffc01d08 /* DMA Channel 16 Configuration Register */
787#define DMA16_X_COUNT 0xffc01d10 /* DMA Channel 16 X Count Register */
788#define DMA16_X_MODIFY 0xffc01d14 /* DMA Channel 16 X Modify Register */
789#define DMA16_Y_COUNT 0xffc01d18 /* DMA Channel 16 Y Count Register */
790#define DMA16_Y_MODIFY 0xffc01d1c /* DMA Channel 16 Y Modify Register */
791#define DMA16_CURR_DESC_PTR 0xffc01d20 /* DMA Channel 16 Current Descriptor Pointer Register */
792#define DMA16_CURR_ADDR 0xffc01d24 /* DMA Channel 16 Current Address Register */
793#define DMA16_IRQ_STATUS 0xffc01d28 /* DMA Channel 16 Interrupt/Status Register */
794#define DMA16_PERIPHERAL_MAP 0xffc01d2c /* DMA Channel 16 Peripheral Map Register */
795#define DMA16_CURR_X_COUNT 0xffc01d30 /* DMA Channel 16 Current X Count Register */
796#define DMA16_CURR_Y_COUNT 0xffc01d38 /* DMA Channel 16 Current Y Count Register */
797
798/* DMA Channel 17 Registers */
799
800#define DMA17_NEXT_DESC_PTR 0xffc01d40 /* DMA Channel 17 Next Descriptor Pointer Register */
801#define DMA17_START_ADDR 0xffc01d44 /* DMA Channel 17 Start Address Register */
802#define DMA17_CONFIG 0xffc01d48 /* DMA Channel 17 Configuration Register */
803#define DMA17_X_COUNT 0xffc01d50 /* DMA Channel 17 X Count Register */
804#define DMA17_X_MODIFY 0xffc01d54 /* DMA Channel 17 X Modify Register */
805#define DMA17_Y_COUNT 0xffc01d58 /* DMA Channel 17 Y Count Register */
806#define DMA17_Y_MODIFY 0xffc01d5c /* DMA Channel 17 Y Modify Register */
807#define DMA17_CURR_DESC_PTR 0xffc01d60 /* DMA Channel 17 Current Descriptor Pointer Register */
808#define DMA17_CURR_ADDR 0xffc01d64 /* DMA Channel 17 Current Address Register */
809#define DMA17_IRQ_STATUS 0xffc01d68 /* DMA Channel 17 Interrupt/Status Register */
810#define DMA17_PERIPHERAL_MAP 0xffc01d6c /* DMA Channel 17 Peripheral Map Register */
811#define DMA17_CURR_X_COUNT 0xffc01d70 /* DMA Channel 17 Current X Count Register */
812#define DMA17_CURR_Y_COUNT 0xffc01d78 /* DMA Channel 17 Current Y Count Register */
813
814/* DMA Channel 18 Registers */
815
816#define DMA18_NEXT_DESC_PTR 0xffc01d80 /* DMA Channel 18 Next Descriptor Pointer Register */
817#define DMA18_START_ADDR 0xffc01d84 /* DMA Channel 18 Start Address Register */
818#define DMA18_CONFIG 0xffc01d88 /* DMA Channel 18 Configuration Register */
819#define DMA18_X_COUNT 0xffc01d90 /* DMA Channel 18 X Count Register */
820#define DMA18_X_MODIFY 0xffc01d94 /* DMA Channel 18 X Modify Register */
821#define DMA18_Y_COUNT 0xffc01d98 /* DMA Channel 18 Y Count Register */
822#define DMA18_Y_MODIFY 0xffc01d9c /* DMA Channel 18 Y Modify Register */
823#define DMA18_CURR_DESC_PTR 0xffc01da0 /* DMA Channel 18 Current Descriptor Pointer Register */
824#define DMA18_CURR_ADDR 0xffc01da4 /* DMA Channel 18 Current Address Register */
825#define DMA18_IRQ_STATUS 0xffc01da8 /* DMA Channel 18 Interrupt/Status Register */
826#define DMA18_PERIPHERAL_MAP 0xffc01dac /* DMA Channel 18 Peripheral Map Register */
827#define DMA18_CURR_X_COUNT 0xffc01db0 /* DMA Channel 18 Current X Count Register */
828#define DMA18_CURR_Y_COUNT 0xffc01db8 /* DMA Channel 18 Current Y Count Register */
829
830/* DMA Channel 19 Registers */
831
832#define DMA19_NEXT_DESC_PTR 0xffc01dc0 /* DMA Channel 19 Next Descriptor Pointer Register */
833#define DMA19_START_ADDR 0xffc01dc4 /* DMA Channel 19 Start Address Register */
834#define DMA19_CONFIG 0xffc01dc8 /* DMA Channel 19 Configuration Register */
835#define DMA19_X_COUNT 0xffc01dd0 /* DMA Channel 19 X Count Register */
836#define DMA19_X_MODIFY 0xffc01dd4 /* DMA Channel 19 X Modify Register */
837#define DMA19_Y_COUNT 0xffc01dd8 /* DMA Channel 19 Y Count Register */
838#define DMA19_Y_MODIFY 0xffc01ddc /* DMA Channel 19 Y Modify Register */
839#define DMA19_CURR_DESC_PTR 0xffc01de0 /* DMA Channel 19 Current Descriptor Pointer Register */
840#define DMA19_CURR_ADDR 0xffc01de4 /* DMA Channel 19 Current Address Register */
841#define DMA19_IRQ_STATUS 0xffc01de8 /* DMA Channel 19 Interrupt/Status Register */
842#define DMA19_PERIPHERAL_MAP 0xffc01dec /* DMA Channel 19 Peripheral Map Register */
843#define DMA19_CURR_X_COUNT 0xffc01df0 /* DMA Channel 19 Current X Count Register */
844#define DMA19_CURR_Y_COUNT 0xffc01df8 /* DMA Channel 19 Current Y Count Register */
845
846/* DMA Channel 20 Registers */
847
848#define DMA20_NEXT_DESC_PTR 0xffc01e00 /* DMA Channel 20 Next Descriptor Pointer Register */
849#define DMA20_START_ADDR 0xffc01e04 /* DMA Channel 20 Start Address Register */
850#define DMA20_CONFIG 0xffc01e08 /* DMA Channel 20 Configuration Register */
851#define DMA20_X_COUNT 0xffc01e10 /* DMA Channel 20 X Count Register */
852#define DMA20_X_MODIFY 0xffc01e14 /* DMA Channel 20 X Modify Register */
853#define DMA20_Y_COUNT 0xffc01e18 /* DMA Channel 20 Y Count Register */
854#define DMA20_Y_MODIFY 0xffc01e1c /* DMA Channel 20 Y Modify Register */
855#define DMA20_CURR_DESC_PTR 0xffc01e20 /* DMA Channel 20 Current Descriptor Pointer Register */
856#define DMA20_CURR_ADDR 0xffc01e24 /* DMA Channel 20 Current Address Register */
857#define DMA20_IRQ_STATUS 0xffc01e28 /* DMA Channel 20 Interrupt/Status Register */
858#define DMA20_PERIPHERAL_MAP 0xffc01e2c /* DMA Channel 20 Peripheral Map Register */
859#define DMA20_CURR_X_COUNT 0xffc01e30 /* DMA Channel 20 Current X Count Register */
860#define DMA20_CURR_Y_COUNT 0xffc01e38 /* DMA Channel 20 Current Y Count Register */
861
862/* DMA Channel 21 Registers */
863
864#define DMA21_NEXT_DESC_PTR 0xffc01e40 /* DMA Channel 21 Next Descriptor Pointer Register */
865#define DMA21_START_ADDR 0xffc01e44 /* DMA Channel 21 Start Address Register */
866#define DMA21_CONFIG 0xffc01e48 /* DMA Channel 21 Configuration Register */
867#define DMA21_X_COUNT 0xffc01e50 /* DMA Channel 21 X Count Register */
868#define DMA21_X_MODIFY 0xffc01e54 /* DMA Channel 21 X Modify Register */
869#define DMA21_Y_COUNT 0xffc01e58 /* DMA Channel 21 Y Count Register */
870#define DMA21_Y_MODIFY 0xffc01e5c /* DMA Channel 21 Y Modify Register */
871#define DMA21_CURR_DESC_PTR 0xffc01e60 /* DMA Channel 21 Current Descriptor Pointer Register */
872#define DMA21_CURR_ADDR 0xffc01e64 /* DMA Channel 21 Current Address Register */
873#define DMA21_IRQ_STATUS 0xffc01e68 /* DMA Channel 21 Interrupt/Status Register */
874#define DMA21_PERIPHERAL_MAP 0xffc01e6c /* DMA Channel 21 Peripheral Map Register */
875#define DMA21_CURR_X_COUNT 0xffc01e70 /* DMA Channel 21 Current X Count Register */
876#define DMA21_CURR_Y_COUNT 0xffc01e78 /* DMA Channel 21 Current Y Count Register */
877
878/* DMA Channel 22 Registers */
879
880#define DMA22_NEXT_DESC_PTR 0xffc01e80 /* DMA Channel 22 Next Descriptor Pointer Register */
881#define DMA22_START_ADDR 0xffc01e84 /* DMA Channel 22 Start Address Register */
882#define DMA22_CONFIG 0xffc01e88 /* DMA Channel 22 Configuration Register */
883#define DMA22_X_COUNT 0xffc01e90 /* DMA Channel 22 X Count Register */
884#define DMA22_X_MODIFY 0xffc01e94 /* DMA Channel 22 X Modify Register */
885#define DMA22_Y_COUNT 0xffc01e98 /* DMA Channel 22 Y Count Register */
886#define DMA22_Y_MODIFY 0xffc01e9c /* DMA Channel 22 Y Modify Register */
887#define DMA22_CURR_DESC_PTR 0xffc01ea0 /* DMA Channel 22 Current Descriptor Pointer Register */
888#define DMA22_CURR_ADDR 0xffc01ea4 /* DMA Channel 22 Current Address Register */
889#define DMA22_IRQ_STATUS 0xffc01ea8 /* DMA Channel 22 Interrupt/Status Register */
890#define DMA22_PERIPHERAL_MAP 0xffc01eac /* DMA Channel 22 Peripheral Map Register */
891#define DMA22_CURR_X_COUNT 0xffc01eb0 /* DMA Channel 22 Current X Count Register */
892#define DMA22_CURR_Y_COUNT 0xffc01eb8 /* DMA Channel 22 Current Y Count Register */
893
894/* DMA Channel 23 Registers */
895
896#define DMA23_NEXT_DESC_PTR 0xffc01ec0 /* DMA Channel 23 Next Descriptor Pointer Register */
897#define DMA23_START_ADDR 0xffc01ec4 /* DMA Channel 23 Start Address Register */
898#define DMA23_CONFIG 0xffc01ec8 /* DMA Channel 23 Configuration Register */
899#define DMA23_X_COUNT 0xffc01ed0 /* DMA Channel 23 X Count Register */
900#define DMA23_X_MODIFY 0xffc01ed4 /* DMA Channel 23 X Modify Register */
901#define DMA23_Y_COUNT 0xffc01ed8 /* DMA Channel 23 Y Count Register */
902#define DMA23_Y_MODIFY 0xffc01edc /* DMA Channel 23 Y Modify Register */
903#define DMA23_CURR_DESC_PTR 0xffc01ee0 /* DMA Channel 23 Current Descriptor Pointer Register */
904#define DMA23_CURR_ADDR 0xffc01ee4 /* DMA Channel 23 Current Address Register */
905#define DMA23_IRQ_STATUS 0xffc01ee8 /* DMA Channel 23 Interrupt/Status Register */
906#define DMA23_PERIPHERAL_MAP 0xffc01eec /* DMA Channel 23 Peripheral Map Register */
907#define DMA23_CURR_X_COUNT 0xffc01ef0 /* DMA Channel 23 Current X Count Register */
908#define DMA23_CURR_Y_COUNT 0xffc01ef8 /* DMA Channel 23 Current Y Count Register */
909
910/* MDMA Stream 2 Registers */
911
912#define MDMA_D2_NEXT_DESC_PTR 0xffc01f00 /* Memory DMA Stream 2 Destination Next Descriptor Pointer Register */
913#define MDMA_D2_START_ADDR 0xffc01f04 /* Memory DMA Stream 2 Destination Start Address Register */
914#define MDMA_D2_CONFIG 0xffc01f08 /* Memory DMA Stream 2 Destination Configuration Register */
915#define MDMA_D2_X_COUNT 0xffc01f10 /* Memory DMA Stream 2 Destination X Count Register */
916#define MDMA_D2_X_MODIFY 0xffc01f14 /* Memory DMA Stream 2 Destination X Modify Register */
917#define MDMA_D2_Y_COUNT 0xffc01f18 /* Memory DMA Stream 2 Destination Y Count Register */
918#define MDMA_D2_Y_MODIFY 0xffc01f1c /* Memory DMA Stream 2 Destination Y Modify Register */
919#define MDMA_D2_CURR_DESC_PTR 0xffc01f20 /* Memory DMA Stream 2 Destination Current Descriptor Pointer Register */
920#define MDMA_D2_CURR_ADDR 0xffc01f24 /* Memory DMA Stream 2 Destination Current Address Register */
921#define MDMA_D2_IRQ_STATUS 0xffc01f28 /* Memory DMA Stream 2 Destination Interrupt/Status Register */
922#define MDMA_D2_PERIPHERAL_MAP 0xffc01f2c /* Memory DMA Stream 2 Destination Peripheral Map Register */
923#define MDMA_D2_CURR_X_COUNT 0xffc01f30 /* Memory DMA Stream 2 Destination Current X Count Register */
924#define MDMA_D2_CURR_Y_COUNT 0xffc01f38 /* Memory DMA Stream 2 Destination Current Y Count Register */
925#define MDMA_S2_NEXT_DESC_PTR 0xffc01f40 /* Memory DMA Stream 2 Source Next Descriptor Pointer Register */
926#define MDMA_S2_START_ADDR 0xffc01f44 /* Memory DMA Stream 2 Source Start Address Register */
927#define MDMA_S2_CONFIG 0xffc01f48 /* Memory DMA Stream 2 Source Configuration Register */
928#define MDMA_S2_X_COUNT 0xffc01f50 /* Memory DMA Stream 2 Source X Count Register */
929#define MDMA_S2_X_MODIFY 0xffc01f54 /* Memory DMA Stream 2 Source X Modify Register */
930#define MDMA_S2_Y_COUNT 0xffc01f58 /* Memory DMA Stream 2 Source Y Count Register */
931#define MDMA_S2_Y_MODIFY 0xffc01f5c /* Memory DMA Stream 2 Source Y Modify Register */
932#define MDMA_S2_CURR_DESC_PTR 0xffc01f60 /* Memory DMA Stream 2 Source Current Descriptor Pointer Register */
933#define MDMA_S2_CURR_ADDR 0xffc01f64 /* Memory DMA Stream 2 Source Current Address Register */
934#define MDMA_S2_IRQ_STATUS 0xffc01f68 /* Memory DMA Stream 2 Source Interrupt/Status Register */
935#define MDMA_S2_PERIPHERAL_MAP 0xffc01f6c /* Memory DMA Stream 2 Source Peripheral Map Register */
936#define MDMA_S2_CURR_X_COUNT 0xffc01f70 /* Memory DMA Stream 2 Source Current X Count Register */
937#define MDMA_S2_CURR_Y_COUNT 0xffc01f78 /* Memory DMA Stream 2 Source Current Y Count Register */
938
939/* MDMA Stream 3 Registers */
940
941#define MDMA_D3_NEXT_DESC_PTR 0xffc01f80 /* Memory DMA Stream 3 Destination Next Descriptor Pointer Register */
942#define MDMA_D3_START_ADDR 0xffc01f84 /* Memory DMA Stream 3 Destination Start Address Register */
943#define MDMA_D3_CONFIG 0xffc01f88 /* Memory DMA Stream 3 Destination Configuration Register */
944#define MDMA_D3_X_COUNT 0xffc01f90 /* Memory DMA Stream 3 Destination X Count Register */
945#define MDMA_D3_X_MODIFY 0xffc01f94 /* Memory DMA Stream 3 Destination X Modify Register */
946#define MDMA_D3_Y_COUNT 0xffc01f98 /* Memory DMA Stream 3 Destination Y Count Register */
947#define MDMA_D3_Y_MODIFY 0xffc01f9c /* Memory DMA Stream 3 Destination Y Modify Register */
948#define MDMA_D3_CURR_DESC_PTR 0xffc01fa0 /* Memory DMA Stream 3 Destination Current Descriptor Pointer Register */
949#define MDMA_D3_CURR_ADDR 0xffc01fa4 /* Memory DMA Stream 3 Destination Current Address Register */
950#define MDMA_D3_IRQ_STATUS 0xffc01fa8 /* Memory DMA Stream 3 Destination Interrupt/Status Register */
951#define MDMA_D3_PERIPHERAL_MAP 0xffc01fac /* Memory DMA Stream 3 Destination Peripheral Map Register */
952#define MDMA_D3_CURR_X_COUNT 0xffc01fb0 /* Memory DMA Stream 3 Destination Current X Count Register */
953#define MDMA_D3_CURR_Y_COUNT 0xffc01fb8 /* Memory DMA Stream 3 Destination Current Y Count Register */
954#define MDMA_S3_NEXT_DESC_PTR 0xffc01fc0 /* Memory DMA Stream 3 Source Next Descriptor Pointer Register */
955#define MDMA_S3_START_ADDR 0xffc01fc4 /* Memory DMA Stream 3 Source Start Address Register */
956#define MDMA_S3_CONFIG 0xffc01fc8 /* Memory DMA Stream 3 Source Configuration Register */
957#define MDMA_S3_X_COUNT 0xffc01fd0 /* Memory DMA Stream 3 Source X Count Register */
958#define MDMA_S3_X_MODIFY 0xffc01fd4 /* Memory DMA Stream 3 Source X Modify Register */
959#define MDMA_S3_Y_COUNT 0xffc01fd8 /* Memory DMA Stream 3 Source Y Count Register */
960#define MDMA_S3_Y_MODIFY 0xffc01fdc /* Memory DMA Stream 3 Source Y Modify Register */
961#define MDMA_S3_CURR_DESC_PTR 0xffc01fe0 /* Memory DMA Stream 3 Source Current Descriptor Pointer Register */
962#define MDMA_S3_CURR_ADDR 0xffc01fe4 /* Memory DMA Stream 3 Source Current Address Register */
963#define MDMA_S3_IRQ_STATUS 0xffc01fe8 /* Memory DMA Stream 3 Source Interrupt/Status Register */
964#define MDMA_S3_PERIPHERAL_MAP 0xffc01fec /* Memory DMA Stream 3 Source Peripheral Map Register */
965#define MDMA_S3_CURR_X_COUNT 0xffc01ff0 /* Memory DMA Stream 3 Source Current X Count Register */
966#define MDMA_S3_CURR_Y_COUNT 0xffc01ff8 /* Memory DMA Stream 3 Source Current Y Count Register */
967
968/* UART1 Registers */
969
970#define UART1_DLL 0xffc02000 /* Divisor Latch Low Byte */
971#define UART1_DLH 0xffc02004 /* Divisor Latch High Byte */
972#define UART1_GCTL 0xffc02008 /* Global Control Register */
973#define UART1_LCR 0xffc0200c /* Line Control Register */
974#define UART1_MCR 0xffc02010 /* Modem Control Register */
975#define UART1_LSR 0xffc02014 /* Line Status Register */
976#define UART1_MSR 0xffc02018 /* Modem Status Register */
977#define UART1_SCR 0xffc0201c /* Scratch Register */
978#define UART1_IER_SET 0xffc02020 /* Interrupt Enable Register Set */
979#define UART1_IER_CLEAR 0xffc02024 /* Interrupt Enable Register Clear */
980#define UART1_THR 0xffc02028 /* Transmit Hold Register */
981#define UART1_RBR 0xffc0202c /* Receive Buffer Register */
982
983/* UART2 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 processors */
984
985/* SPI1 Registers */
986
987#define SPI1_REGBASE 0xffc02300
988#define SPI1_CTL 0xffc02300 /* SPI1 Control Register */
989#define SPI1_FLG 0xffc02304 /* SPI1 Flag Register */
990#define SPI1_STAT 0xffc02308 /* SPI1 Status Register */
991#define SPI1_TDBR 0xffc0230c /* SPI1 Transmit Data Buffer Register */
992#define SPI1_RDBR 0xffc02310 /* SPI1 Receive Data Buffer Register */
993#define SPI1_BAUD 0xffc02314 /* SPI1 Baud Rate Register */
994#define SPI1_SHADOW 0xffc02318 /* SPI1 Receive Data Buffer Shadow Register */
995
996/* SPORT2 Registers */
997
998#define SPORT2_TCR1 0xffc02500 /* SPORT2 Transmit Configuration 1 Register */
999#define SPORT2_TCR2 0xffc02504 /* SPORT2 Transmit Configuration 2 Register */
1000#define SPORT2_TCLKDIV 0xffc02508 /* SPORT2 Transmit Serial Clock Divider Register */
1001#define SPORT2_TFSDIV 0xffc0250c /* SPORT2 Transmit Frame Sync Divider Register */
1002#define SPORT2_TX 0xffc02510 /* SPORT2 Transmit Data Register */
1003#define SPORT2_RX 0xffc02518 /* SPORT2 Receive Data Register */
1004#define SPORT2_RCR1 0xffc02520 /* SPORT2 Receive Configuration 1 Register */
1005#define SPORT2_RCR2 0xffc02524 /* SPORT2 Receive Configuration 2 Register */
1006#define SPORT2_RCLKDIV 0xffc02528 /* SPORT2 Receive Serial Clock Divider Register */
1007#define SPORT2_RFSDIV 0xffc0252c /* SPORT2 Receive Frame Sync Divider Register */
1008#define SPORT2_STAT 0xffc02530 /* SPORT2 Status Register */
1009#define SPORT2_CHNL 0xffc02534 /* SPORT2 Current Channel Register */
1010#define SPORT2_MCMC1 0xffc02538 /* SPORT2 Multi channel Configuration Register 1 */
1011#define SPORT2_MCMC2 0xffc0253c /* SPORT2 Multi channel Configuration Register 2 */
1012#define SPORT2_MTCS0 0xffc02540 /* SPORT2 Multi channel Transmit Select Register 0 */
1013#define SPORT2_MTCS1 0xffc02544 /* SPORT2 Multi channel Transmit Select Register 1 */
1014#define SPORT2_MTCS2 0xffc02548 /* SPORT2 Multi channel Transmit Select Register 2 */
1015#define SPORT2_MTCS3 0xffc0254c /* SPORT2 Multi channel Transmit Select Register 3 */
1016#define SPORT2_MRCS0 0xffc02550 /* SPORT2 Multi channel Receive Select Register 0 */
1017#define SPORT2_MRCS1 0xffc02554 /* SPORT2 Multi channel Receive Select Register 1 */
1018#define SPORT2_MRCS2 0xffc02558 /* SPORT2 Multi channel Receive Select Register 2 */
1019#define SPORT2_MRCS3 0xffc0255c /* SPORT2 Multi channel Receive Select Register 3 */
1020
1021/* SPORT3 Registers */
1022
1023#define SPORT3_TCR1 0xffc02600 /* SPORT3 Transmit Configuration 1 Register */
1024#define SPORT3_TCR2 0xffc02604 /* SPORT3 Transmit Configuration 2 Register */
1025#define SPORT3_TCLKDIV 0xffc02608 /* SPORT3 Transmit Serial Clock Divider Register */
1026#define SPORT3_TFSDIV 0xffc0260c /* SPORT3 Transmit Frame Sync Divider Register */
1027#define SPORT3_TX 0xffc02610 /* SPORT3 Transmit Data Register */
1028#define SPORT3_RX 0xffc02618 /* SPORT3 Receive Data Register */
1029#define SPORT3_RCR1 0xffc02620 /* SPORT3 Receive Configuration 1 Register */
1030#define SPORT3_RCR2 0xffc02624 /* SPORT3 Receive Configuration 2 Register */
1031#define SPORT3_RCLKDIV 0xffc02628 /* SPORT3 Receive Serial Clock Divider Register */
1032#define SPORT3_RFSDIV 0xffc0262c /* SPORT3 Receive Frame Sync Divider Register */
1033#define SPORT3_STAT 0xffc02630 /* SPORT3 Status Register */
1034#define SPORT3_CHNL 0xffc02634 /* SPORT3 Current Channel Register */
1035#define SPORT3_MCMC1 0xffc02638 /* SPORT3 Multi channel Configuration Register 1 */
1036#define SPORT3_MCMC2 0xffc0263c /* SPORT3 Multi channel Configuration Register 2 */
1037#define SPORT3_MTCS0 0xffc02640 /* SPORT3 Multi channel Transmit Select Register 0 */
1038#define SPORT3_MTCS1 0xffc02644 /* SPORT3 Multi channel Transmit Select Register 1 */
1039#define SPORT3_MTCS2 0xffc02648 /* SPORT3 Multi channel Transmit Select Register 2 */
1040#define SPORT3_MTCS3 0xffc0264c /* SPORT3 Multi channel Transmit Select Register 3 */
1041#define SPORT3_MRCS0 0xffc02650 /* SPORT3 Multi channel Receive Select Register 0 */
1042#define SPORT3_MRCS1 0xffc02654 /* SPORT3 Multi channel Receive Select Register 1 */
1043#define SPORT3_MRCS2 0xffc02658 /* SPORT3 Multi channel Receive Select Register 2 */
1044#define SPORT3_MRCS3 0xffc0265c /* SPORT3 Multi channel Receive Select Register 3 */
1045
1046/* EPPI2 Registers */
1047
1048#define EPPI2_STATUS 0xffc02900 /* EPPI2 Status Register */
1049#define EPPI2_HCOUNT 0xffc02904 /* EPPI2 Horizontal Transfer Count Register */
1050#define EPPI2_HDELAY 0xffc02908 /* EPPI2 Horizontal Delay Count Register */
1051#define EPPI2_VCOUNT 0xffc0290c /* EPPI2 Vertical Transfer Count Register */
1052#define EPPI2_VDELAY 0xffc02910 /* EPPI2 Vertical Delay Count Register */
1053#define EPPI2_FRAME 0xffc02914 /* EPPI2 Lines per Frame Register */
1054#define EPPI2_LINE 0xffc02918 /* EPPI2 Samples per Line Register */
1055#define EPPI2_CLKDIV 0xffc0291c /* EPPI2 Clock Divide Register */
1056#define EPPI2_CONTROL 0xffc02920 /* EPPI2 Control Register */
1057#define EPPI2_FS1W_HBL 0xffc02924 /* EPPI2 FS1 Width Register / EPPI2 Horizontal Blanking Samples Per Line Register */
1058#define EPPI2_FS1P_AVPL 0xffc02928 /* EPPI2 FS1 Period Register / EPPI2 Active Video Samples Per Line Register */
1059#define EPPI2_FS2W_LVB 0xffc0292c /* EPPI2 FS2 Width Register / EPPI2 Lines of Vertical Blanking Register */
1060#define EPPI2_FS2P_LAVF 0xffc02930 /* EPPI2 FS2 Period Register/ EPPI2 Lines of Active Video Per Field Register */
1061#define EPPI2_CLIP 0xffc02934 /* EPPI2 Clipping Register */
1062
1063/* CAN Controller 0 Config 1 Registers */
1064
1065#define CAN0_MC1 0xffc02a00 /* CAN Controller 0 Mailbox Configuration Register 1 */
1066#define CAN0_MD1 0xffc02a04 /* CAN Controller 0 Mailbox Direction Register 1 */
1067#define CAN0_TRS1 0xffc02a08 /* CAN Controller 0 Transmit Request Set Register 1 */
1068#define CAN0_TRR1 0xffc02a0c /* CAN Controller 0 Transmit Request Reset Register 1 */
1069#define CAN0_TA1 0xffc02a10 /* CAN Controller 0 Transmit Acknowledge Register 1 */
1070#define CAN0_AA1 0xffc02a14 /* CAN Controller 0 Abort Acknowledge Register 1 */
1071#define CAN0_RMP1 0xffc02a18 /* CAN Controller 0 Receive Message Pending Register 1 */
1072#define CAN0_RML1 0xffc02a1c /* CAN Controller 0 Receive Message Lost Register 1 */
1073#define CAN0_MBTIF1 0xffc02a20 /* CAN Controller 0 Mailbox Transmit Interrupt Flag Register 1 */
1074#define CAN0_MBRIF1 0xffc02a24 /* CAN Controller 0 Mailbox Receive Interrupt Flag Register 1 */
1075#define CAN0_MBIM1 0xffc02a28 /* CAN Controller 0 Mailbox Interrupt Mask Register 1 */
1076#define CAN0_RFH1 0xffc02a2c /* CAN Controller 0 Remote Frame Handling Enable Register 1 */
1077#define CAN0_OPSS1 0xffc02a30 /* CAN Controller 0 Overwrite Protection Single Shot Transmit Register 1 */
1078
1079/* CAN Controller 0 Config 2 Registers */
1080
1081#define CAN0_MC2 0xffc02a40 /* CAN Controller 0 Mailbox Configuration Register 2 */
1082#define CAN0_MD2 0xffc02a44 /* CAN Controller 0 Mailbox Direction Register 2 */
1083#define CAN0_TRS2 0xffc02a48 /* CAN Controller 0 Transmit Request Set Register 2 */
1084#define CAN0_TRR2 0xffc02a4c /* CAN Controller 0 Transmit Request Reset Register 2 */
1085#define CAN0_TA2 0xffc02a50 /* CAN Controller 0 Transmit Acknowledge Register 2 */
1086#define CAN0_AA2 0xffc02a54 /* CAN Controller 0 Abort Acknowledge Register 2 */
1087#define CAN0_RMP2 0xffc02a58 /* CAN Controller 0 Receive Message Pending Register 2 */
1088#define CAN0_RML2 0xffc02a5c /* CAN Controller 0 Receive Message Lost Register 2 */
1089#define CAN0_MBTIF2 0xffc02a60 /* CAN Controller 0 Mailbox Transmit Interrupt Flag Register 2 */
1090#define CAN0_MBRIF2 0xffc02a64 /* CAN Controller 0 Mailbox Receive Interrupt Flag Register 2 */
1091#define CAN0_MBIM2 0xffc02a68 /* CAN Controller 0 Mailbox Interrupt Mask Register 2 */
1092#define CAN0_RFH2 0xffc02a6c /* CAN Controller 0 Remote Frame Handling Enable Register 2 */
1093#define CAN0_OPSS2 0xffc02a70 /* CAN Controller 0 Overwrite Protection Single Shot Transmit Register 2 */
1094
1095/* CAN Controller 0 Clock/Interrupt/Counter Registers */
1096
1097#define CAN0_CLOCK 0xffc02a80 /* CAN Controller 0 Clock Register */
1098#define CAN0_TIMING 0xffc02a84 /* CAN Controller 0 Timing Register */
1099#define CAN0_DEBUG 0xffc02a88 /* CAN Controller 0 Debug Register */
1100#define CAN0_STATUS 0xffc02a8c /* CAN Controller 0 Global Status Register */
1101#define CAN0_CEC 0xffc02a90 /* CAN Controller 0 Error Counter Register */
1102#define CAN0_GIS 0xffc02a94 /* CAN Controller 0 Global Interrupt Status Register */
1103#define CAN0_GIM 0xffc02a98 /* CAN Controller 0 Global Interrupt Mask Register */
1104#define CAN0_GIF 0xffc02a9c /* CAN Controller 0 Global Interrupt Flag Register */
1105#define CAN0_CONTROL 0xffc02aa0 /* CAN Controller 0 Master Control Register */
1106#define CAN0_INTR 0xffc02aa4 /* CAN Controller 0 Interrupt Pending Register */
1107#define CAN0_MBTD 0xffc02aac /* CAN Controller 0 Mailbox Temporary Disable Register */
1108#define CAN0_EWR 0xffc02ab0 /* CAN Controller 0 Programmable Warning Level Register */
1109#define CAN0_ESR 0xffc02ab4 /* CAN Controller 0 Error Status Register */
1110#define CAN0_UCCNT 0xffc02ac4 /* CAN Controller 0 Universal Counter Register */
1111#define CAN0_UCRC 0xffc02ac8 /* CAN Controller 0 Universal Counter Force Reload Register */
1112#define CAN0_UCCNF 0xffc02acc /* CAN Controller 0 Universal Counter Configuration Register */
1113
1114/* CAN Controller 0 Acceptance Registers */
1115
1116#define CAN0_AM00L 0xffc02b00 /* CAN Controller 0 Mailbox 0 Acceptance Mask High Register */
1117#define CAN0_AM00H 0xffc02b04 /* CAN Controller 0 Mailbox 0 Acceptance Mask Low Register */
1118#define CAN0_AM01L 0xffc02b08 /* CAN Controller 0 Mailbox 1 Acceptance Mask High Register */
1119#define CAN0_AM01H 0xffc02b0c /* CAN Controller 0 Mailbox 1 Acceptance Mask Low Register */
1120#define CAN0_AM02L 0xffc02b10 /* CAN Controller 0 Mailbox 2 Acceptance Mask High Register */
1121#define CAN0_AM02H 0xffc02b14 /* CAN Controller 0 Mailbox 2 Acceptance Mask Low Register */
1122#define CAN0_AM03L 0xffc02b18 /* CAN Controller 0 Mailbox 3 Acceptance Mask High Register */
1123#define CAN0_AM03H 0xffc02b1c /* CAN Controller 0 Mailbox 3 Acceptance Mask Low Register */
1124#define CAN0_AM04L 0xffc02b20 /* CAN Controller 0 Mailbox 4 Acceptance Mask High Register */
1125#define CAN0_AM04H 0xffc02b24 /* CAN Controller 0 Mailbox 4 Acceptance Mask Low Register */
1126#define CAN0_AM05L 0xffc02b28 /* CAN Controller 0 Mailbox 5 Acceptance Mask High Register */
1127#define CAN0_AM05H 0xffc02b2c /* CAN Controller 0 Mailbox 5 Acceptance Mask Low Register */
1128#define CAN0_AM06L 0xffc02b30 /* CAN Controller 0 Mailbox 6 Acceptance Mask High Register */
1129#define CAN0_AM06H 0xffc02b34 /* CAN Controller 0 Mailbox 6 Acceptance Mask Low Register */
1130#define CAN0_AM07L 0xffc02b38 /* CAN Controller 0 Mailbox 7 Acceptance Mask High Register */
1131#define CAN0_AM07H 0xffc02b3c /* CAN Controller 0 Mailbox 7 Acceptance Mask Low Register */
1132#define CAN0_AM08L 0xffc02b40 /* CAN Controller 0 Mailbox 8 Acceptance Mask High Register */
1133#define CAN0_AM08H 0xffc02b44 /* CAN Controller 0 Mailbox 8 Acceptance Mask Low Register */
1134#define CAN0_AM09L 0xffc02b48 /* CAN Controller 0 Mailbox 9 Acceptance Mask High Register */
1135#define CAN0_AM09H 0xffc02b4c /* CAN Controller 0 Mailbox 9 Acceptance Mask Low Register */
1136#define CAN0_AM10L 0xffc02b50 /* CAN Controller 0 Mailbox 10 Acceptance Mask High Register */
1137#define CAN0_AM10H 0xffc02b54 /* CAN Controller 0 Mailbox 10 Acceptance Mask Low Register */
1138#define CAN0_AM11L 0xffc02b58 /* CAN Controller 0 Mailbox 11 Acceptance Mask High Register */
1139#define CAN0_AM11H 0xffc02b5c /* CAN Controller 0 Mailbox 11 Acceptance Mask Low Register */
1140#define CAN0_AM12L 0xffc02b60 /* CAN Controller 0 Mailbox 12 Acceptance Mask High Register */
1141#define CAN0_AM12H 0xffc02b64 /* CAN Controller 0 Mailbox 12 Acceptance Mask Low Register */
1142#define CAN0_AM13L 0xffc02b68 /* CAN Controller 0 Mailbox 13 Acceptance Mask High Register */
1143#define CAN0_AM13H 0xffc02b6c /* CAN Controller 0 Mailbox 13 Acceptance Mask Low Register */
1144#define CAN0_AM14L 0xffc02b70 /* CAN Controller 0 Mailbox 14 Acceptance Mask High Register */
1145#define CAN0_AM14H 0xffc02b74 /* CAN Controller 0 Mailbox 14 Acceptance Mask Low Register */
1146#define CAN0_AM15L 0xffc02b78 /* CAN Controller 0 Mailbox 15 Acceptance Mask High Register */
1147#define CAN0_AM15H 0xffc02b7c /* CAN Controller 0 Mailbox 15 Acceptance Mask Low Register */
1148
1149/* CAN Controller 0 Acceptance Registers */
1150
1151#define CAN0_AM16L 0xffc02b80 /* CAN Controller 0 Mailbox 16 Acceptance Mask High Register */
1152#define CAN0_AM16H 0xffc02b84 /* CAN Controller 0 Mailbox 16 Acceptance Mask Low Register */
1153#define CAN0_AM17L 0xffc02b88 /* CAN Controller 0 Mailbox 17 Acceptance Mask High Register */
1154#define CAN0_AM17H 0xffc02b8c /* CAN Controller 0 Mailbox 17 Acceptance Mask Low Register */
1155#define CAN0_AM18L 0xffc02b90 /* CAN Controller 0 Mailbox 18 Acceptance Mask High Register */
1156#define CAN0_AM18H 0xffc02b94 /* CAN Controller 0 Mailbox 18 Acceptance Mask Low Register */
1157#define CAN0_AM19L 0xffc02b98 /* CAN Controller 0 Mailbox 19 Acceptance Mask High Register */
1158#define CAN0_AM19H 0xffc02b9c /* CAN Controller 0 Mailbox 19 Acceptance Mask Low Register */
1159#define CAN0_AM20L 0xffc02ba0 /* CAN Controller 0 Mailbox 20 Acceptance Mask High Register */
1160#define CAN0_AM20H 0xffc02ba4 /* CAN Controller 0 Mailbox 20 Acceptance Mask Low Register */
1161#define CAN0_AM21L 0xffc02ba8 /* CAN Controller 0 Mailbox 21 Acceptance Mask High Register */
1162#define CAN0_AM21H 0xffc02bac /* CAN Controller 0 Mailbox 21 Acceptance Mask Low Register */
1163#define CAN0_AM22L 0xffc02bb0 /* CAN Controller 0 Mailbox 22 Acceptance Mask High Register */
1164#define CAN0_AM22H 0xffc02bb4 /* CAN Controller 0 Mailbox 22 Acceptance Mask Low Register */
1165#define CAN0_AM23L 0xffc02bb8 /* CAN Controller 0 Mailbox 23 Acceptance Mask High Register */
1166#define CAN0_AM23H 0xffc02bbc /* CAN Controller 0 Mailbox 23 Acceptance Mask Low Register */
1167#define CAN0_AM24L 0xffc02bc0 /* CAN Controller 0 Mailbox 24 Acceptance Mask High Register */
1168#define CAN0_AM24H 0xffc02bc4 /* CAN Controller 0 Mailbox 24 Acceptance Mask Low Register */
1169#define CAN0_AM25L 0xffc02bc8 /* CAN Controller 0 Mailbox 25 Acceptance Mask High Register */
1170#define CAN0_AM25H 0xffc02bcc /* CAN Controller 0 Mailbox 25 Acceptance Mask Low Register */
1171#define CAN0_AM26L 0xffc02bd0 /* CAN Controller 0 Mailbox 26 Acceptance Mask High Register */
1172#define CAN0_AM26H 0xffc02bd4 /* CAN Controller 0 Mailbox 26 Acceptance Mask Low Register */
1173#define CAN0_AM27L 0xffc02bd8 /* CAN Controller 0 Mailbox 27 Acceptance Mask High Register */
1174#define CAN0_AM27H 0xffc02bdc /* CAN Controller 0 Mailbox 27 Acceptance Mask Low Register */
1175#define CAN0_AM28L 0xffc02be0 /* CAN Controller 0 Mailbox 28 Acceptance Mask High Register */
1176#define CAN0_AM28H 0xffc02be4 /* CAN Controller 0 Mailbox 28 Acceptance Mask Low Register */
1177#define CAN0_AM29L 0xffc02be8 /* CAN Controller 0 Mailbox 29 Acceptance Mask High Register */
1178#define CAN0_AM29H 0xffc02bec /* CAN Controller 0 Mailbox 29 Acceptance Mask Low Register */
1179#define CAN0_AM30L 0xffc02bf0 /* CAN Controller 0 Mailbox 30 Acceptance Mask High Register */
1180#define CAN0_AM30H 0xffc02bf4 /* CAN Controller 0 Mailbox 30 Acceptance Mask Low Register */
1181#define CAN0_AM31L 0xffc02bf8 /* CAN Controller 0 Mailbox 31 Acceptance Mask High Register */
1182#define CAN0_AM31H 0xffc02bfc /* CAN Controller 0 Mailbox 31 Acceptance Mask Low Register */
1183
1184/* CAN Controller 0 Mailbox Data Registers */
1185
1186#define CAN0_MB00_DATA0 0xffc02c00 /* CAN Controller 0 Mailbox 0 Data 0 Register */
1187#define CAN0_MB00_DATA1 0xffc02c04 /* CAN Controller 0 Mailbox 0 Data 1 Register */
1188#define CAN0_MB00_DATA2 0xffc02c08 /* CAN Controller 0 Mailbox 0 Data 2 Register */
1189#define CAN0_MB00_DATA3 0xffc02c0c /* CAN Controller 0 Mailbox 0 Data 3 Register */
1190#define CAN0_MB00_LENGTH 0xffc02c10 /* CAN Controller 0 Mailbox 0 Length Register */
1191#define CAN0_MB00_TIMESTAMP 0xffc02c14 /* CAN Controller 0 Mailbox 0 Timestamp Register */
1192#define CAN0_MB00_ID0 0xffc02c18 /* CAN Controller 0 Mailbox 0 ID0 Register */
1193#define CAN0_MB00_ID1 0xffc02c1c /* CAN Controller 0 Mailbox 0 ID1 Register */
1194#define CAN0_MB01_DATA0 0xffc02c20 /* CAN Controller 0 Mailbox 1 Data 0 Register */
1195#define CAN0_MB01_DATA1 0xffc02c24 /* CAN Controller 0 Mailbox 1 Data 1 Register */
1196#define CAN0_MB01_DATA2 0xffc02c28 /* CAN Controller 0 Mailbox 1 Data 2 Register */
1197#define CAN0_MB01_DATA3 0xffc02c2c /* CAN Controller 0 Mailbox 1 Data 3 Register */
1198#define CAN0_MB01_LENGTH 0xffc02c30 /* CAN Controller 0 Mailbox 1 Length Register */
1199#define CAN0_MB01_TIMESTAMP 0xffc02c34 /* CAN Controller 0 Mailbox 1 Timestamp Register */
1200#define CAN0_MB01_ID0 0xffc02c38 /* CAN Controller 0 Mailbox 1 ID0 Register */
1201#define CAN0_MB01_ID1 0xffc02c3c /* CAN Controller 0 Mailbox 1 ID1 Register */
1202#define CAN0_MB02_DATA0 0xffc02c40 /* CAN Controller 0 Mailbox 2 Data 0 Register */
1203#define CAN0_MB02_DATA1 0xffc02c44 /* CAN Controller 0 Mailbox 2 Data 1 Register */
1204#define CAN0_MB02_DATA2 0xffc02c48 /* CAN Controller 0 Mailbox 2 Data 2 Register */
1205#define CAN0_MB02_DATA3 0xffc02c4c /* CAN Controller 0 Mailbox 2 Data 3 Register */
1206#define CAN0_MB02_LENGTH 0xffc02c50 /* CAN Controller 0 Mailbox 2 Length Register */
1207#define CAN0_MB02_TIMESTAMP 0xffc02c54 /* CAN Controller 0 Mailbox 2 Timestamp Register */
1208#define CAN0_MB02_ID0 0xffc02c58 /* CAN Controller 0 Mailbox 2 ID0 Register */
1209#define CAN0_MB02_ID1 0xffc02c5c /* CAN Controller 0 Mailbox 2 ID1 Register */
1210#define CAN0_MB03_DATA0 0xffc02c60 /* CAN Controller 0 Mailbox 3 Data 0 Register */
1211#define CAN0_MB03_DATA1 0xffc02c64 /* CAN Controller 0 Mailbox 3 Data 1 Register */
1212#define CAN0_MB03_DATA2 0xffc02c68 /* CAN Controller 0 Mailbox 3 Data 2 Register */
1213#define CAN0_MB03_DATA3 0xffc02c6c /* CAN Controller 0 Mailbox 3 Data 3 Register */
1214#define CAN0_MB03_LENGTH 0xffc02c70 /* CAN Controller 0 Mailbox 3 Length Register */
1215#define CAN0_MB03_TIMESTAMP 0xffc02c74 /* CAN Controller 0 Mailbox 3 Timestamp Register */
1216#define CAN0_MB03_ID0 0xffc02c78 /* CAN Controller 0 Mailbox 3 ID0 Register */
1217#define CAN0_MB03_ID1 0xffc02c7c /* CAN Controller 0 Mailbox 3 ID1 Register */
1218#define CAN0_MB04_DATA0 0xffc02c80 /* CAN Controller 0 Mailbox 4 Data 0 Register */
1219#define CAN0_MB04_DATA1 0xffc02c84 /* CAN Controller 0 Mailbox 4 Data 1 Register */
1220#define CAN0_MB04_DATA2 0xffc02c88 /* CAN Controller 0 Mailbox 4 Data 2 Register */
1221#define CAN0_MB04_DATA3 0xffc02c8c /* CAN Controller 0 Mailbox 4 Data 3 Register */
1222#define CAN0_MB04_LENGTH 0xffc02c90 /* CAN Controller 0 Mailbox 4 Length Register */
1223#define CAN0_MB04_TIMESTAMP 0xffc02c94 /* CAN Controller 0 Mailbox 4 Timestamp Register */
1224#define CAN0_MB04_ID0 0xffc02c98 /* CAN Controller 0 Mailbox 4 ID0 Register */
1225#define CAN0_MB04_ID1 0xffc02c9c /* CAN Controller 0 Mailbox 4 ID1 Register */
1226#define CAN0_MB05_DATA0 0xffc02ca0 /* CAN Controller 0 Mailbox 5 Data 0 Register */
1227#define CAN0_MB05_DATA1 0xffc02ca4 /* CAN Controller 0 Mailbox 5 Data 1 Register */
1228#define CAN0_MB05_DATA2 0xffc02ca8 /* CAN Controller 0 Mailbox 5 Data 2 Register */
1229#define CAN0_MB05_DATA3 0xffc02cac /* CAN Controller 0 Mailbox 5 Data 3 Register */
1230#define CAN0_MB05_LENGTH 0xffc02cb0 /* CAN Controller 0 Mailbox 5 Length Register */
1231#define CAN0_MB05_TIMESTAMP 0xffc02cb4 /* CAN Controller 0 Mailbox 5 Timestamp Register */
1232#define CAN0_MB05_ID0 0xffc02cb8 /* CAN Controller 0 Mailbox 5 ID0 Register */
1233#define CAN0_MB05_ID1 0xffc02cbc /* CAN Controller 0 Mailbox 5 ID1 Register */
1234#define CAN0_MB06_DATA0 0xffc02cc0 /* CAN Controller 0 Mailbox 6 Data 0 Register */
1235#define CAN0_MB06_DATA1 0xffc02cc4 /* CAN Controller 0 Mailbox 6 Data 1 Register */
1236#define CAN0_MB06_DATA2 0xffc02cc8 /* CAN Controller 0 Mailbox 6 Data 2 Register */
1237#define CAN0_MB06_DATA3 0xffc02ccc /* CAN Controller 0 Mailbox 6 Data 3 Register */
1238#define CAN0_MB06_LENGTH 0xffc02cd0 /* CAN Controller 0 Mailbox 6 Length Register */
1239#define CAN0_MB06_TIMESTAMP 0xffc02cd4 /* CAN Controller 0 Mailbox 6 Timestamp Register */
1240#define CAN0_MB06_ID0 0xffc02cd8 /* CAN Controller 0 Mailbox 6 ID0 Register */
1241#define CAN0_MB06_ID1 0xffc02cdc /* CAN Controller 0 Mailbox 6 ID1 Register */
1242#define CAN0_MB07_DATA0 0xffc02ce0 /* CAN Controller 0 Mailbox 7 Data 0 Register */
1243#define CAN0_MB07_DATA1 0xffc02ce4 /* CAN Controller 0 Mailbox 7 Data 1 Register */
1244#define CAN0_MB07_DATA2 0xffc02ce8 /* CAN Controller 0 Mailbox 7 Data 2 Register */
1245#define CAN0_MB07_DATA3 0xffc02cec /* CAN Controller 0 Mailbox 7 Data 3 Register */
1246#define CAN0_MB07_LENGTH 0xffc02cf0 /* CAN Controller 0 Mailbox 7 Length Register */
1247#define CAN0_MB07_TIMESTAMP 0xffc02cf4 /* CAN Controller 0 Mailbox 7 Timestamp Register */
1248#define CAN0_MB07_ID0 0xffc02cf8 /* CAN Controller 0 Mailbox 7 ID0 Register */
1249#define CAN0_MB07_ID1 0xffc02cfc /* CAN Controller 0 Mailbox 7 ID1 Register */
1250#define CAN0_MB08_DATA0 0xffc02d00 /* CAN Controller 0 Mailbox 8 Data 0 Register */
1251#define CAN0_MB08_DATA1 0xffc02d04 /* CAN Controller 0 Mailbox 8 Data 1 Register */
1252#define CAN0_MB08_DATA2 0xffc02d08 /* CAN Controller 0 Mailbox 8 Data 2 Register */
1253#define CAN0_MB08_DATA3 0xffc02d0c /* CAN Controller 0 Mailbox 8 Data 3 Register */
1254#define CAN0_MB08_LENGTH 0xffc02d10 /* CAN Controller 0 Mailbox 8 Length Register */
1255#define CAN0_MB08_TIMESTAMP 0xffc02d14 /* CAN Controller 0 Mailbox 8 Timestamp Register */
1256#define CAN0_MB08_ID0 0xffc02d18 /* CAN Controller 0 Mailbox 8 ID0 Register */
1257#define CAN0_MB08_ID1 0xffc02d1c /* CAN Controller 0 Mailbox 8 ID1 Register */
1258#define CAN0_MB09_DATA0 0xffc02d20 /* CAN Controller 0 Mailbox 9 Data 0 Register */
1259#define CAN0_MB09_DATA1 0xffc02d24 /* CAN Controller 0 Mailbox 9 Data 1 Register */
1260#define CAN0_MB09_DATA2 0xffc02d28 /* CAN Controller 0 Mailbox 9 Data 2 Register */
1261#define CAN0_MB09_DATA3 0xffc02d2c /* CAN Controller 0 Mailbox 9 Data 3 Register */
1262#define CAN0_MB09_LENGTH 0xffc02d30 /* CAN Controller 0 Mailbox 9 Length Register */
1263#define CAN0_MB09_TIMESTAMP 0xffc02d34 /* CAN Controller 0 Mailbox 9 Timestamp Register */
1264#define CAN0_MB09_ID0 0xffc02d38 /* CAN Controller 0 Mailbox 9 ID0 Register */
1265#define CAN0_MB09_ID1 0xffc02d3c /* CAN Controller 0 Mailbox 9 ID1 Register */
1266#define CAN0_MB10_DATA0 0xffc02d40 /* CAN Controller 0 Mailbox 10 Data 0 Register */
1267#define CAN0_MB10_DATA1 0xffc02d44 /* CAN Controller 0 Mailbox 10 Data 1 Register */
1268#define CAN0_MB10_DATA2 0xffc02d48 /* CAN Controller 0 Mailbox 10 Data 2 Register */
1269#define CAN0_MB10_DATA3 0xffc02d4c /* CAN Controller 0 Mailbox 10 Data 3 Register */
1270#define CAN0_MB10_LENGTH 0xffc02d50 /* CAN Controller 0 Mailbox 10 Length Register */
1271#define CAN0_MB10_TIMESTAMP 0xffc02d54 /* CAN Controller 0 Mailbox 10 Timestamp Register */
1272#define CAN0_MB10_ID0 0xffc02d58 /* CAN Controller 0 Mailbox 10 ID0 Register */
1273#define CAN0_MB10_ID1 0xffc02d5c /* CAN Controller 0 Mailbox 10 ID1 Register */
1274#define CAN0_MB11_DATA0 0xffc02d60 /* CAN Controller 0 Mailbox 11 Data 0 Register */
1275#define CAN0_MB11_DATA1 0xffc02d64 /* CAN Controller 0 Mailbox 11 Data 1 Register */
1276#define CAN0_MB11_DATA2 0xffc02d68 /* CAN Controller 0 Mailbox 11 Data 2 Register */
1277#define CAN0_MB11_DATA3 0xffc02d6c /* CAN Controller 0 Mailbox 11 Data 3 Register */
1278#define CAN0_MB11_LENGTH 0xffc02d70 /* CAN Controller 0 Mailbox 11 Length Register */
1279#define CAN0_MB11_TIMESTAMP 0xffc02d74 /* CAN Controller 0 Mailbox 11 Timestamp Register */
1280#define CAN0_MB11_ID0 0xffc02d78 /* CAN Controller 0 Mailbox 11 ID0 Register */
1281#define CAN0_MB11_ID1 0xffc02d7c /* CAN Controller 0 Mailbox 11 ID1 Register */
1282#define CAN0_MB12_DATA0 0xffc02d80 /* CAN Controller 0 Mailbox 12 Data 0 Register */
1283#define CAN0_MB12_DATA1 0xffc02d84 /* CAN Controller 0 Mailbox 12 Data 1 Register */
1284#define CAN0_MB12_DATA2 0xffc02d88 /* CAN Controller 0 Mailbox 12 Data 2 Register */
1285#define CAN0_MB12_DATA3 0xffc02d8c /* CAN Controller 0 Mailbox 12 Data 3 Register */
1286#define CAN0_MB12_LENGTH 0xffc02d90 /* CAN Controller 0 Mailbox 12 Length Register */
1287#define CAN0_MB12_TIMESTAMP 0xffc02d94 /* CAN Controller 0 Mailbox 12 Timestamp Register */
1288#define CAN0_MB12_ID0 0xffc02d98 /* CAN Controller 0 Mailbox 12 ID0 Register */
1289#define CAN0_MB12_ID1 0xffc02d9c /* CAN Controller 0 Mailbox 12 ID1 Register */
1290#define CAN0_MB13_DATA0 0xffc02da0 /* CAN Controller 0 Mailbox 13 Data 0 Register */
1291#define CAN0_MB13_DATA1 0xffc02da4 /* CAN Controller 0 Mailbox 13 Data 1 Register */
1292#define CAN0_MB13_DATA2 0xffc02da8 /* CAN Controller 0 Mailbox 13 Data 2 Register */
1293#define CAN0_MB13_DATA3 0xffc02dac /* CAN Controller 0 Mailbox 13 Data 3 Register */
1294#define CAN0_MB13_LENGTH 0xffc02db0 /* CAN Controller 0 Mailbox 13 Length Register */
1295#define CAN0_MB13_TIMESTAMP 0xffc02db4 /* CAN Controller 0 Mailbox 13 Timestamp Register */
1296#define CAN0_MB13_ID0 0xffc02db8 /* CAN Controller 0 Mailbox 13 ID0 Register */
1297#define CAN0_MB13_ID1 0xffc02dbc /* CAN Controller 0 Mailbox 13 ID1 Register */
1298#define CAN0_MB14_DATA0 0xffc02dc0 /* CAN Controller 0 Mailbox 14 Data 0 Register */
1299#define CAN0_MB14_DATA1 0xffc02dc4 /* CAN Controller 0 Mailbox 14 Data 1 Register */
1300#define CAN0_MB14_DATA2 0xffc02dc8 /* CAN Controller 0 Mailbox 14 Data 2 Register */
1301#define CAN0_MB14_DATA3 0xffc02dcc /* CAN Controller 0 Mailbox 14 Data 3 Register */
1302#define CAN0_MB14_LENGTH 0xffc02dd0 /* CAN Controller 0 Mailbox 14 Length Register */
1303#define CAN0_MB14_TIMESTAMP 0xffc02dd4 /* CAN Controller 0 Mailbox 14 Timestamp Register */
1304#define CAN0_MB14_ID0 0xffc02dd8 /* CAN Controller 0 Mailbox 14 ID0 Register */
1305#define CAN0_MB14_ID1 0xffc02ddc /* CAN Controller 0 Mailbox 14 ID1 Register */
1306#define CAN0_MB15_DATA0 0xffc02de0 /* CAN Controller 0 Mailbox 15 Data 0 Register */
1307#define CAN0_MB15_DATA1 0xffc02de4 /* CAN Controller 0 Mailbox 15 Data 1 Register */
1308#define CAN0_MB15_DATA2 0xffc02de8 /* CAN Controller 0 Mailbox 15 Data 2 Register */
1309#define CAN0_MB15_DATA3 0xffc02dec /* CAN Controller 0 Mailbox 15 Data 3 Register */
1310#define CAN0_MB15_LENGTH 0xffc02df0 /* CAN Controller 0 Mailbox 15 Length Register */
1311#define CAN0_MB15_TIMESTAMP 0xffc02df4 /* CAN Controller 0 Mailbox 15 Timestamp Register */
1312#define CAN0_MB15_ID0 0xffc02df8 /* CAN Controller 0 Mailbox 15 ID0 Register */
1313#define CAN0_MB15_ID1 0xffc02dfc /* CAN Controller 0 Mailbox 15 ID1 Register */
1314
1315/* CAN Controller 0 Mailbox Data Registers */
1316
1317#define CAN0_MB16_DATA0 0xffc02e00 /* CAN Controller 0 Mailbox 16 Data 0 Register */
1318#define CAN0_MB16_DATA1 0xffc02e04 /* CAN Controller 0 Mailbox 16 Data 1 Register */
1319#define CAN0_MB16_DATA2 0xffc02e08 /* CAN Controller 0 Mailbox 16 Data 2 Register */
1320#define CAN0_MB16_DATA3 0xffc02e0c /* CAN Controller 0 Mailbox 16 Data 3 Register */
1321#define CAN0_MB16_LENGTH 0xffc02e10 /* CAN Controller 0 Mailbox 16 Length Register */
1322#define CAN0_MB16_TIMESTAMP 0xffc02e14 /* CAN Controller 0 Mailbox 16 Timestamp Register */
1323#define CAN0_MB16_ID0 0xffc02e18 /* CAN Controller 0 Mailbox 16 ID0 Register */
1324#define CAN0_MB16_ID1 0xffc02e1c /* CAN Controller 0 Mailbox 16 ID1 Register */
1325#define CAN0_MB17_DATA0 0xffc02e20 /* CAN Controller 0 Mailbox 17 Data 0 Register */
1326#define CAN0_MB17_DATA1 0xffc02e24 /* CAN Controller 0 Mailbox 17 Data 1 Register */
1327#define CAN0_MB17_DATA2 0xffc02e28 /* CAN Controller 0 Mailbox 17 Data 2 Register */
1328#define CAN0_MB17_DATA3 0xffc02e2c /* CAN Controller 0 Mailbox 17 Data 3 Register */
1329#define CAN0_MB17_LENGTH 0xffc02e30 /* CAN Controller 0 Mailbox 17 Length Register */
1330#define CAN0_MB17_TIMESTAMP 0xffc02e34 /* CAN Controller 0 Mailbox 17 Timestamp Register */
1331#define CAN0_MB17_ID0 0xffc02e38 /* CAN Controller 0 Mailbox 17 ID0 Register */
1332#define CAN0_MB17_ID1 0xffc02e3c /* CAN Controller 0 Mailbox 17 ID1 Register */
1333#define CAN0_MB18_DATA0 0xffc02e40 /* CAN Controller 0 Mailbox 18 Data 0 Register */
1334#define CAN0_MB18_DATA1 0xffc02e44 /* CAN Controller 0 Mailbox 18 Data 1 Register */
1335#define CAN0_MB18_DATA2 0xffc02e48 /* CAN Controller 0 Mailbox 18 Data 2 Register */
1336#define CAN0_MB18_DATA3 0xffc02e4c /* CAN Controller 0 Mailbox 18 Data 3 Register */
1337#define CAN0_MB18_LENGTH 0xffc02e50 /* CAN Controller 0 Mailbox 18 Length Register */
1338#define CAN0_MB18_TIMESTAMP 0xffc02e54 /* CAN Controller 0 Mailbox 18 Timestamp Register */
1339#define CAN0_MB18_ID0 0xffc02e58 /* CAN Controller 0 Mailbox 18 ID0 Register */
1340#define CAN0_MB18_ID1 0xffc02e5c /* CAN Controller 0 Mailbox 18 ID1 Register */
1341#define CAN0_MB19_DATA0 0xffc02e60 /* CAN Controller 0 Mailbox 19 Data 0 Register */
1342#define CAN0_MB19_DATA1 0xffc02e64 /* CAN Controller 0 Mailbox 19 Data 1 Register */
1343#define CAN0_MB19_DATA2 0xffc02e68 /* CAN Controller 0 Mailbox 19 Data 2 Register */
1344#define CAN0_MB19_DATA3 0xffc02e6c /* CAN Controller 0 Mailbox 19 Data 3 Register */
1345#define CAN0_MB19_LENGTH 0xffc02e70 /* CAN Controller 0 Mailbox 19 Length Register */
1346#define CAN0_MB19_TIMESTAMP 0xffc02e74 /* CAN Controller 0 Mailbox 19 Timestamp Register */
1347#define CAN0_MB19_ID0 0xffc02e78 /* CAN Controller 0 Mailbox 19 ID0 Register */
1348#define CAN0_MB19_ID1 0xffc02e7c /* CAN Controller 0 Mailbox 19 ID1 Register */
1349#define CAN0_MB20_DATA0 0xffc02e80 /* CAN Controller 0 Mailbox 20 Data 0 Register */
1350#define CAN0_MB20_DATA1 0xffc02e84 /* CAN Controller 0 Mailbox 20 Data 1 Register */
1351#define CAN0_MB20_DATA2 0xffc02e88 /* CAN Controller 0 Mailbox 20 Data 2 Register */
1352#define CAN0_MB20_DATA3 0xffc02e8c /* CAN Controller 0 Mailbox 20 Data 3 Register */
1353#define CAN0_MB20_LENGTH 0xffc02e90 /* CAN Controller 0 Mailbox 20 Length Register */
1354#define CAN0_MB20_TIMESTAMP 0xffc02e94 /* CAN Controller 0 Mailbox 20 Timestamp Register */
1355#define CAN0_MB20_ID0 0xffc02e98 /* CAN Controller 0 Mailbox 20 ID0 Register */
1356#define CAN0_MB20_ID1 0xffc02e9c /* CAN Controller 0 Mailbox 20 ID1 Register */
1357#define CAN0_MB21_DATA0 0xffc02ea0 /* CAN Controller 0 Mailbox 21 Data 0 Register */
1358#define CAN0_MB21_DATA1 0xffc02ea4 /* CAN Controller 0 Mailbox 21 Data 1 Register */
1359#define CAN0_MB21_DATA2 0xffc02ea8 /* CAN Controller 0 Mailbox 21 Data 2 Register */
1360#define CAN0_MB21_DATA3 0xffc02eac /* CAN Controller 0 Mailbox 21 Data 3 Register */
1361#define CAN0_MB21_LENGTH 0xffc02eb0 /* CAN Controller 0 Mailbox 21 Length Register */
1362#define CAN0_MB21_TIMESTAMP 0xffc02eb4 /* CAN Controller 0 Mailbox 21 Timestamp Register */
1363#define CAN0_MB21_ID0 0xffc02eb8 /* CAN Controller 0 Mailbox 21 ID0 Register */
1364#define CAN0_MB21_ID1 0xffc02ebc /* CAN Controller 0 Mailbox 21 ID1 Register */
1365#define CAN0_MB22_DATA0 0xffc02ec0 /* CAN Controller 0 Mailbox 22 Data 0 Register */
1366#define CAN0_MB22_DATA1 0xffc02ec4 /* CAN Controller 0 Mailbox 22 Data 1 Register */
1367#define CAN0_MB22_DATA2 0xffc02ec8 /* CAN Controller 0 Mailbox 22 Data 2 Register */
1368#define CAN0_MB22_DATA3 0xffc02ecc /* CAN Controller 0 Mailbox 22 Data 3 Register */
1369#define CAN0_MB22_LENGTH 0xffc02ed0 /* CAN Controller 0 Mailbox 22 Length Register */
1370#define CAN0_MB22_TIMESTAMP 0xffc02ed4 /* CAN Controller 0 Mailbox 22 Timestamp Register */
1371#define CAN0_MB22_ID0 0xffc02ed8 /* CAN Controller 0 Mailbox 22 ID0 Register */
1372#define CAN0_MB22_ID1 0xffc02edc /* CAN Controller 0 Mailbox 22 ID1 Register */
1373#define CAN0_MB23_DATA0 0xffc02ee0 /* CAN Controller 0 Mailbox 23 Data 0 Register */
1374#define CAN0_MB23_DATA1 0xffc02ee4 /* CAN Controller 0 Mailbox 23 Data 1 Register */
1375#define CAN0_MB23_DATA2 0xffc02ee8 /* CAN Controller 0 Mailbox 23 Data 2 Register */
1376#define CAN0_MB23_DATA3 0xffc02eec /* CAN Controller 0 Mailbox 23 Data 3 Register */
1377#define CAN0_MB23_LENGTH 0xffc02ef0 /* CAN Controller 0 Mailbox 23 Length Register */
1378#define CAN0_MB23_TIMESTAMP 0xffc02ef4 /* CAN Controller 0 Mailbox 23 Timestamp Register */
1379#define CAN0_MB23_ID0 0xffc02ef8 /* CAN Controller 0 Mailbox 23 ID0 Register */
1380#define CAN0_MB23_ID1 0xffc02efc /* CAN Controller 0 Mailbox 23 ID1 Register */
1381#define CAN0_MB24_DATA0 0xffc02f00 /* CAN Controller 0 Mailbox 24 Data 0 Register */
1382#define CAN0_MB24_DATA1 0xffc02f04 /* CAN Controller 0 Mailbox 24 Data 1 Register */
1383#define CAN0_MB24_DATA2 0xffc02f08 /* CAN Controller 0 Mailbox 24 Data 2 Register */
1384#define CAN0_MB24_DATA3 0xffc02f0c /* CAN Controller 0 Mailbox 24 Data 3 Register */
1385#define CAN0_MB24_LENGTH 0xffc02f10 /* CAN Controller 0 Mailbox 24 Length Register */
1386#define CAN0_MB24_TIMESTAMP 0xffc02f14 /* CAN Controller 0 Mailbox 24 Timestamp Register */
1387#define CAN0_MB24_ID0 0xffc02f18 /* CAN Controller 0 Mailbox 24 ID0 Register */
1388#define CAN0_MB24_ID1 0xffc02f1c /* CAN Controller 0 Mailbox 24 ID1 Register */
1389#define CAN0_MB25_DATA0 0xffc02f20 /* CAN Controller 0 Mailbox 25 Data 0 Register */
1390#define CAN0_MB25_DATA1 0xffc02f24 /* CAN Controller 0 Mailbox 25 Data 1 Register */
1391#define CAN0_MB25_DATA2 0xffc02f28 /* CAN Controller 0 Mailbox 25 Data 2 Register */
1392#define CAN0_MB25_DATA3 0xffc02f2c /* CAN Controller 0 Mailbox 25 Data 3 Register */
1393#define CAN0_MB25_LENGTH 0xffc02f30 /* CAN Controller 0 Mailbox 25 Length Register */
1394#define CAN0_MB25_TIMESTAMP 0xffc02f34 /* CAN Controller 0 Mailbox 25 Timestamp Register */
1395#define CAN0_MB25_ID0 0xffc02f38 /* CAN Controller 0 Mailbox 25 ID0 Register */
1396#define CAN0_MB25_ID1 0xffc02f3c /* CAN Controller 0 Mailbox 25 ID1 Register */
1397#define CAN0_MB26_DATA0 0xffc02f40 /* CAN Controller 0 Mailbox 26 Data 0 Register */
1398#define CAN0_MB26_DATA1 0xffc02f44 /* CAN Controller 0 Mailbox 26 Data 1 Register */
1399#define CAN0_MB26_DATA2 0xffc02f48 /* CAN Controller 0 Mailbox 26 Data 2 Register */
1400#define CAN0_MB26_DATA3 0xffc02f4c /* CAN Controller 0 Mailbox 26 Data 3 Register */
1401#define CAN0_MB26_LENGTH 0xffc02f50 /* CAN Controller 0 Mailbox 26 Length Register */
1402#define CAN0_MB26_TIMESTAMP 0xffc02f54 /* CAN Controller 0 Mailbox 26 Timestamp Register */
1403#define CAN0_MB26_ID0 0xffc02f58 /* CAN Controller 0 Mailbox 26 ID0 Register */
1404#define CAN0_MB26_ID1 0xffc02f5c /* CAN Controller 0 Mailbox 26 ID1 Register */
1405#define CAN0_MB27_DATA0 0xffc02f60 /* CAN Controller 0 Mailbox 27 Data 0 Register */
1406#define CAN0_MB27_DATA1 0xffc02f64 /* CAN Controller 0 Mailbox 27 Data 1 Register */
1407#define CAN0_MB27_DATA2 0xffc02f68 /* CAN Controller 0 Mailbox 27 Data 2 Register */
1408#define CAN0_MB27_DATA3 0xffc02f6c /* CAN Controller 0 Mailbox 27 Data 3 Register */
1409#define CAN0_MB27_LENGTH 0xffc02f70 /* CAN Controller 0 Mailbox 27 Length Register */
1410#define CAN0_MB27_TIMESTAMP 0xffc02f74 /* CAN Controller 0 Mailbox 27 Timestamp Register */
1411#define CAN0_MB27_ID0 0xffc02f78 /* CAN Controller 0 Mailbox 27 ID0 Register */
1412#define CAN0_MB27_ID1 0xffc02f7c /* CAN Controller 0 Mailbox 27 ID1 Register */
1413#define CAN0_MB28_DATA0 0xffc02f80 /* CAN Controller 0 Mailbox 28 Data 0 Register */
1414#define CAN0_MB28_DATA1 0xffc02f84 /* CAN Controller 0 Mailbox 28 Data 1 Register */
1415#define CAN0_MB28_DATA2 0xffc02f88 /* CAN Controller 0 Mailbox 28 Data 2 Register */
1416#define CAN0_MB28_DATA3 0xffc02f8c /* CAN Controller 0 Mailbox 28 Data 3 Register */
1417#define CAN0_MB28_LENGTH 0xffc02f90 /* CAN Controller 0 Mailbox 28 Length Register */
1418#define CAN0_MB28_TIMESTAMP 0xffc02f94 /* CAN Controller 0 Mailbox 28 Timestamp Register */
1419#define CAN0_MB28_ID0 0xffc02f98 /* CAN Controller 0 Mailbox 28 ID0 Register */
1420#define CAN0_MB28_ID1 0xffc02f9c /* CAN Controller 0 Mailbox 28 ID1 Register */
1421#define CAN0_MB29_DATA0 0xffc02fa0 /* CAN Controller 0 Mailbox 29 Data 0 Register */
1422#define CAN0_MB29_DATA1 0xffc02fa4 /* CAN Controller 0 Mailbox 29 Data 1 Register */
1423#define CAN0_MB29_DATA2 0xffc02fa8 /* CAN Controller 0 Mailbox 29 Data 2 Register */
1424#define CAN0_MB29_DATA3 0xffc02fac /* CAN Controller 0 Mailbox 29 Data 3 Register */
1425#define CAN0_MB29_LENGTH 0xffc02fb0 /* CAN Controller 0 Mailbox 29 Length Register */
1426#define CAN0_MB29_TIMESTAMP 0xffc02fb4 /* CAN Controller 0 Mailbox 29 Timestamp Register */
1427#define CAN0_MB29_ID0 0xffc02fb8 /* CAN Controller 0 Mailbox 29 ID0 Register */
1428#define CAN0_MB29_ID1 0xffc02fbc /* CAN Controller 0 Mailbox 29 ID1 Register */
1429#define CAN0_MB30_DATA0 0xffc02fc0 /* CAN Controller 0 Mailbox 30 Data 0 Register */
1430#define CAN0_MB30_DATA1 0xffc02fc4 /* CAN Controller 0 Mailbox 30 Data 1 Register */
1431#define CAN0_MB30_DATA2 0xffc02fc8 /* CAN Controller 0 Mailbox 30 Data 2 Register */
1432#define CAN0_MB30_DATA3 0xffc02fcc /* CAN Controller 0 Mailbox 30 Data 3 Register */
1433#define CAN0_MB30_LENGTH 0xffc02fd0 /* CAN Controller 0 Mailbox 30 Length Register */
1434#define CAN0_MB30_TIMESTAMP 0xffc02fd4 /* CAN Controller 0 Mailbox 30 Timestamp Register */
1435#define CAN0_MB30_ID0 0xffc02fd8 /* CAN Controller 0 Mailbox 30 ID0 Register */
1436#define CAN0_MB30_ID1 0xffc02fdc /* CAN Controller 0 Mailbox 30 ID1 Register */
1437#define CAN0_MB31_DATA0 0xffc02fe0 /* CAN Controller 0 Mailbox 31 Data 0 Register */
1438#define CAN0_MB31_DATA1 0xffc02fe4 /* CAN Controller 0 Mailbox 31 Data 1 Register */
1439#define CAN0_MB31_DATA2 0xffc02fe8 /* CAN Controller 0 Mailbox 31 Data 2 Register */
1440#define CAN0_MB31_DATA3 0xffc02fec /* CAN Controller 0 Mailbox 31 Data 3 Register */
1441#define CAN0_MB31_LENGTH 0xffc02ff0 /* CAN Controller 0 Mailbox 31 Length Register */
1442#define CAN0_MB31_TIMESTAMP 0xffc02ff4 /* CAN Controller 0 Mailbox 31 Timestamp Register */
1443#define CAN0_MB31_ID0 0xffc02ff8 /* CAN Controller 0 Mailbox 31 ID0 Register */
1444#define CAN0_MB31_ID1 0xffc02ffc /* CAN Controller 0 Mailbox 31 ID1 Register */
1445
1446/* UART3 Registers */
1447
1448#define UART3_DLL 0xffc03100 /* Divisor Latch Low Byte */
1449#define UART3_DLH 0xffc03104 /* Divisor Latch High Byte */
1450#define UART3_GCTL 0xffc03108 /* Global Control Register */
1451#define UART3_LCR 0xffc0310c /* Line Control Register */
1452#define UART3_MCR 0xffc03110 /* Modem Control Register */
1453#define UART3_LSR 0xffc03114 /* Line Status Register */
1454#define UART3_MSR 0xffc03118 /* Modem Status Register */
1455#define UART3_SCR 0xffc0311c /* Scratch Register */
1456#define UART3_IER_SET 0xffc03120 /* Interrupt Enable Register Set */
1457#define UART3_IER_CLEAR 0xffc03124 /* Interrupt Enable Register Clear */
1458#define UART3_THR 0xffc03128 /* Transmit Hold Register */
1459#define UART3_RBR 0xffc0312c /* Receive Buffer Register */
1460
1461/* NFC Registers */
1462
1463#define NFC_CTL 0xffc03b00 /* NAND Control Register */
1464#define NFC_STAT 0xffc03b04 /* NAND Status Register */
1465#define NFC_IRQSTAT 0xffc03b08 /* NAND Interrupt Status Register */
1466#define NFC_IRQMASK 0xffc03b0c /* NAND Interrupt Mask Register */
1467#define NFC_ECC0 0xffc03b10 /* NAND ECC Register 0 */
1468#define NFC_ECC1 0xffc03b14 /* NAND ECC Register 1 */
1469#define NFC_ECC2 0xffc03b18 /* NAND ECC Register 2 */
1470#define NFC_ECC3 0xffc03b1c /* NAND ECC Register 3 */
1471#define NFC_COUNT 0xffc03b20 /* NAND ECC Count Register */
1472#define NFC_RST 0xffc03b24 /* NAND ECC Reset Register */
1473#define NFC_PGCTL 0xffc03b28 /* NAND Page Control Register */
1474#define NFC_READ 0xffc03b2c /* NAND Read Data Register */
1475#define NFC_ADDR 0xffc03b40 /* NAND Address Register */
1476#define NFC_CMD 0xffc03b44 /* NAND Command Register */
1477#define NFC_DATA_WR 0xffc03b48 /* NAND Data Write Register */
1478#define NFC_DATA_RD 0xffc03b4c /* NAND Data Read Register */
1479
1480/* Counter Registers */
1481
1482#define CNT_CONFIG 0xffc04200 /* Configuration Register */
1483#define CNT_IMASK 0xffc04204 /* Interrupt Mask Register */
1484#define CNT_STATUS 0xffc04208 /* Status Register */
1485#define CNT_COMMAND 0xffc0420c /* Command Register */
1486#define CNT_DEBOUNCE 0xffc04210 /* Debounce Register */
1487#define CNT_COUNTER 0xffc04214 /* Counter Register */
1488#define CNT_MAX 0xffc04218 /* Maximal Count Register */
1489#define CNT_MIN 0xffc0421c /* Minimal Count Register */
1490
1491/* OTP/FUSE Registers */
1492
1493#define OTP_CONTROL 0xffc04300 /* OTP/Fuse Control Register */
1494#define OTP_BEN 0xffc04304 /* OTP/Fuse Byte Enable */
1495#define OTP_STATUS 0xffc04308 /* OTP/Fuse Status */
1496#define OTP_TIMING 0xffc0430c /* OTP/Fuse Access Timing */
1497
1498/* Security Registers */
1499
1500#define SECURE_SYSSWT 0xffc04320 /* Secure System Switches */
1501#define SECURE_CONTROL 0xffc04324 /* Secure Control */
1502#define SECURE_STATUS 0xffc04328 /* Secure Status */
1503
1504/* DMA Peripheral Mux Register */
1505
1506#define DMAC1_PERIMUX 0xffc04340 /* DMA Controller 1 Peripheral Multiplexer Register */
1507
1508/* OTP Read/Write Data Buffer Registers */
1509
1510#define OTP_DATA0 0xffc04380 /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1511#define OTP_DATA1 0xffc04384 /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1512#define OTP_DATA2 0xffc04388 /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1513#define OTP_DATA3 0xffc0438c /* OTP/Fuse Data (OTP_DATA0-3) accesses the fuse read write buffer */
1514
1515/* Handshake MDMA is not defined in the shared file because it is not available on the ADSP-BF542 processor */
1516
1517/* ********************************************************** */
1518/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
1519/* and MULTI BIT READ MACROS */
1520/* ********************************************************** */
1521
1522/* SIC_IMASK Masks */
1523#define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
1524#define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
1525#define SIC_MASK(x) (1 << (x)) /* Mask Peripheral #x interrupt */
1526#define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << (x))) /* Unmask Peripheral #x interrupt */
1527
1528/* SIC_IWR Masks */
1529#define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
1530#define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
1531#define IWR_ENABLE(x) (1 << (x)) /* Wakeup Enable Peripheral #x */
1532#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << (x))) /* Wakeup Disable Peripheral #x */
1533
1534/* Bit masks for SIC_IAR0 */
1535
1536#define PLL_WAKEUP 0x1 /* PLL Wakeup */
1537
1538/* Bit masks for SIC_IWR0, SIC_IMASK0, SIC_ISR0 */
1539
1540#define DMA0_ERR 0x2 /* DMA Controller 0 Error */
1541#define EPPI0_ERR 0x4 /* EPPI0 Error */
1542#define SPORT0_ERR 0x8 /* SPORT0 Error */
1543#define SPORT1_ERR 0x10 /* SPORT1 Error */
1544#define SPI0_ERR 0x20 /* SPI0 Error */
1545#define UART0_ERR 0x40 /* UART0 Error */
1546#define RTC 0x80 /* Real-Time Clock */
1547#define DMA12 0x100 /* DMA Channel 12 */
1548#define DMA0 0x200 /* DMA Channel 0 */
1549#define DMA1 0x400 /* DMA Channel 1 */
1550#define DMA2 0x800 /* DMA Channel 2 */
1551#define DMA3 0x1000 /* DMA Channel 3 */
1552#define DMA4 0x2000 /* DMA Channel 4 */
1553#define DMA6 0x4000 /* DMA Channel 6 */
1554#define DMA7 0x8000 /* DMA Channel 7 */
1555#define PINT0 0x80000 /* Pin Interrupt 0 */
1556#define PINT1 0x100000 /* Pin Interrupt 1 */
1557#define MDMA0 0x200000 /* Memory DMA Stream 0 */
1558#define MDMA1 0x400000 /* Memory DMA Stream 1 */
1559#define WDOG 0x800000 /* Watchdog Timer */
1560#define DMA1_ERR 0x1000000 /* DMA Controller 1 Error */
1561#define SPORT2_ERR 0x2000000 /* SPORT2 Error */
1562#define SPORT3_ERR 0x4000000 /* SPORT3 Error */
1563#define MXVR_SD 0x8000000 /* MXVR Synchronous Data */
1564#define SPI1_ERR 0x10000000 /* SPI1 Error */
1565#define SPI2_ERR 0x20000000 /* SPI2 Error */
1566#define UART1_ERR 0x40000000 /* UART1 Error */
1567#define UART2_ERR 0x80000000 /* UART2 Error */
1568
1569/* Bit masks for SIC_IWR1, SIC_IMASK1, SIC_ISR1 */
1570
1571#define CAN0_ERR 0x1 /* CAN0 Error */
1572#define DMA18 0x2 /* DMA Channel 18 */
1573#define DMA19 0x4 /* DMA Channel 19 */
1574#define DMA20 0x8 /* DMA Channel 20 */
1575#define DMA21 0x10 /* DMA Channel 21 */
1576#define DMA13 0x20 /* DMA Channel 13 */
1577#define DMA14 0x40 /* DMA Channel 14 */
1578#define DMA5 0x80 /* DMA Channel 5 */
1579#define DMA23 0x100 /* DMA Channel 23 */
1580#define DMA8 0x200 /* DMA Channel 8 */
1581#define DMA9 0x400 /* DMA Channel 9 */
1582#define DMA10 0x800 /* DMA Channel 10 */
1583#define DMA11 0x1000 /* DMA Channel 11 */
1584#define TWI0 0x2000 /* TWI0 */
1585#define TWI1 0x4000 /* TWI1 */
1586#define CAN0_RX 0x8000 /* CAN0 Receive */
1587#define CAN0_TX 0x10000 /* CAN0 Transmit */
1588#define MDMA2 0x20000 /* Memory DMA Stream 0 */
1589#define MDMA3 0x40000 /* Memory DMA Stream 1 */
1590#define MXVR_STAT 0x80000 /* MXVR Status */
1591#define MXVR_CM 0x100000 /* MXVR Control Message */
1592#define MXVR_AP 0x200000 /* MXVR Asynchronous Packet */
1593#define EPPI1_ERR 0x400000 /* EPPI1 Error */
1594#define EPPI2_ERR 0x800000 /* EPPI2 Error */
1595#define UART3_ERR 0x1000000 /* UART3 Error */
1596#define HOST_ERR 0x2000000 /* Host DMA Port Error */
1597#define USB_ERR 0x4000000 /* USB Error */
1598#define PIXC_ERR 0x8000000 /* Pixel Compositor Error */
1599#define NFC_ERR 0x10000000 /* Nand Flash Controller Error */
1600#define ATAPI_ERR 0x20000000 /* ATAPI Error */
1601#define CAN1_ERR 0x40000000 /* CAN1 Error */
1602#define DMAR0_ERR 0x80000000 /* DMAR0 Overflow Error */
1603#define DMAR1_ERR 0x80000000 /* DMAR1 Overflow Error */
1604#define DMAR0 0x80000000 /* DMAR0 Block */
1605#define DMAR1 0x80000000 /* DMAR1 Block */
1606
1607/* Bit masks for SIC_IWR2, SIC_IMASK2, SIC_ISR2 */
1608
1609#define DMA15 0x1 /* DMA Channel 15 */
1610#define DMA16 0x2 /* DMA Channel 16 */
1611#define DMA17 0x4 /* DMA Channel 17 */
1612#define DMA22 0x8 /* DMA Channel 22 */
1613#define CNT 0x10 /* Counter */
1614#define KEY 0x20 /* Keypad */
1615#define CAN1_RX 0x40 /* CAN1 Receive */
1616#define CAN1_TX 0x80 /* CAN1 Transmit */
1617#define SDH_INT_MASK0 0x100 /* SDH Mask 0 */
1618#define SDH_INT_MASK1 0x200 /* SDH Mask 1 */
1619#define USB_EINT 0x400 /* USB Exception */
1620#define USB_INT0 0x800 /* USB Interrupt 0 */
1621#define USB_INT1 0x1000 /* USB Interrupt 1 */
1622#define USB_INT2 0x2000 /* USB Interrupt 2 */
1623#define USB_DMAINT 0x4000 /* USB DMA */
1624#define OTPSEC 0x8000 /* OTP Access Complete */
1625#define TIMER0 0x400000 /* Timer 0 */
1626#define TIMER1 0x800000 /* Timer 1 */
1627#define TIMER2 0x1000000 /* Timer 2 */
1628#define TIMER3 0x2000000 /* Timer 3 */
1629#define TIMER4 0x4000000 /* Timer 4 */
1630#define TIMER5 0x8000000 /* Timer 5 */
1631#define TIMER6 0x10000000 /* Timer 6 */
1632#define TIMER7 0x20000000 /* Timer 7 */
1633#define PINT2 0x40000000 /* Pin Interrupt 2 */
1634#define PINT3 0x80000000 /* Pin Interrupt 3 */
1635
1636/* Bit masks for DMAx_CONFIG, MDMA_Sx_CONFIG, MDMA_Dx_CONFIG */
1637
1638#define DMAEN 0x1 /* DMA Channel Enable */
1639#define WNR 0x2 /* DMA Direction */
1640#define WDSIZE_8 0x0 /* Transfer Word Size = 8 */
1641#define WDSIZE_16 0x4 /* Transfer Word Size = 16 */
1642#define WDSIZE_32 0x8 /* Transfer Word Size = 32 */
1643#define DMA2D 0x10 /* DMA Mode */
1644#define RESTART 0x20 /* Work Unit Transitions */
1645#define DI_SEL 0x40 /* Data Interrupt Timing Select */
1646#define DI_EN 0x80 /* Data Interrupt Enable */
1647
1648#define NDSIZE 0xf00 /* Flex Descriptor Size */
1649#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1650#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1651#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1652#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1653#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1654#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1655#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1656#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1657#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1658#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1659
1660#define DMAFLOW 0xf000 /* Next Operation */
1661#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1662#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1663#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1664#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1665#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1666
1667/* Bit masks for DMAx_IRQ_STATUS, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */
1668
1669#define DMA_DONE 0x1 /* DMA Completion Interrupt Status */
1670#define DMA_ERR 0x2 /* DMA Error Interrupt Status */
1671#define DFETCH 0x4 /* DMA Descriptor Fetch */
1672#define DMA_RUN 0x8 /* DMA Channel Running */
1673
1674/* Bit masks for DMAx_PERIPHERAL_MAP, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */
1675
1676#define CTYPE 0x40 /* DMA Channel Type */
1677#define PMAP 0xf000 /* Peripheral Mapped To This Channel */
1678
1679/* Bit masks for DMACx_TCPER */
1680
1681#define DCB_TRAFFIC_PERIOD 0xf /* DCB Traffic Control Period */
1682#define DEB_TRAFFIC_PERIOD 0xf0 /* DEB Traffic Control Period */
1683#define DAB_TRAFFIC_PERIOD 0x700 /* DAB Traffic Control Period */
1684#define MDMA_ROUND_ROBIN_PERIOD 0xf800 /* MDMA Round Robin Period */
1685
1686/* Bit masks for DMACx_TCCNT */
1687
1688#define DCB_TRAFFIC_COUNT 0xf /* DCB Traffic Control Count */
1689#define DEB_TRAFFIC_COUNT 0xf0 /* DEB Traffic Control Count */
1690#define DAB_TRAFFIC_COUNT 0x700 /* DAB Traffic Control Count */
1691#define MDMA_ROUND_ROBIN_COUNT 0xf800 /* MDMA Round Robin Count */
1692
1693/* Bit masks for DMAC1_PERIMUX */
1694
1695#define PMUXSDH 0x1 /* Peripheral Select for DMA22 channel */
1696
1697/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS *************************/
1698/* EBIU_AMGCTL Masks */
1699#define AMCKEN 0x0001 /* Enable CLKOUT */
1700#define AMBEN_NONE 0x0000 /* All Banks Disabled */
1701#define AMBEN_B0 0x0002 /* Enable Async Memory Bank 0 only */
1702#define AMBEN_B0_B1 0x0004 /* Enable Async Memory Banks 0 & 1 only */
1703#define AMBEN_B0_B1_B2 0x0006 /* Enable Async Memory Banks 0, 1, and 2 */
1704#define AMBEN_ALL 0x0008 /* Enable Async Memory Banks (all) 0, 1, 2, and 3 */
1705
1706
1707/* Bit masks for EBIU_AMBCTL0 */
1708
1709#define B0RDYEN 0x1 /* Bank 0 ARDY Enable */
1710#define B0RDYPOL 0x2 /* Bank 0 ARDY Polarity */
1711#define B0TT 0xc /* Bank 0 transition time */
1712#define B0ST 0x30 /* Bank 0 Setup time */
1713#define B0HT 0xc0 /* Bank 0 Hold time */
1714#define B0RAT 0xf00 /* Bank 0 Read access time */
1715#define B0WAT 0xf000 /* Bank 0 write access time */
1716#define B1RDYEN 0x10000 /* Bank 1 ARDY Enable */
1717#define B1RDYPOL 0x20000 /* Bank 1 ARDY Polarity */
1718#define B1TT 0xc0000 /* Bank 1 transition time */
1719#define B1ST 0x300000 /* Bank 1 Setup time */
1720#define B1HT 0xc00000 /* Bank 1 Hold time */
1721#define B1RAT 0xf000000 /* Bank 1 Read access time */
1722#define B1WAT 0xf0000000 /* Bank 1 write access time */
1723
1724/* Bit masks for EBIU_AMBCTL1 */
1725
1726#define B2RDYEN 0x1 /* Bank 2 ARDY Enable */
1727#define B2RDYPOL 0x2 /* Bank 2 ARDY Polarity */
1728#define B2TT 0xc /* Bank 2 transition time */
1729#define B2ST 0x30 /* Bank 2 Setup time */
1730#define B2HT 0xc0 /* Bank 2 Hold time */
1731#define B2RAT 0xf00 /* Bank 2 Read access time */
1732#define B2WAT 0xf000 /* Bank 2 write access time */
1733#define B3RDYEN 0x10000 /* Bank 3 ARDY Enable */
1734#define B3RDYPOL 0x20000 /* Bank 3 ARDY Polarity */
1735#define B3TT 0xc0000 /* Bank 3 transition time */
1736#define B3ST 0x300000 /* Bank 3 Setup time */
1737#define B3HT 0xc00000 /* Bank 3 Hold time */
1738#define B3RAT 0xf000000 /* Bank 3 Read access time */
1739#define B3WAT 0xf0000000 /* Bank 3 write access time */
1740
1741/* Bit masks for EBIU_MBSCTL */
1742
1743#define AMSB0CTL 0x3 /* Async Memory Bank 0 select */
1744#define AMSB1CTL 0xc /* Async Memory Bank 1 select */
1745#define AMSB2CTL 0x30 /* Async Memory Bank 2 select */
1746#define AMSB3CTL 0xc0 /* Async Memory Bank 3 select */
1747
1748/* Bit masks for EBIU_MODE */
1749
1750#define B0MODE 0x3 /* Async Memory Bank 0 Access Mode */
1751#define B1MODE 0xc /* Async Memory Bank 1 Access Mode */
1752#define B2MODE 0x30 /* Async Memory Bank 2 Access Mode */
1753#define B3MODE 0xc0 /* Async Memory Bank 3 Access Mode */
1754
1755/* Bit masks for EBIU_FCTL */
1756
1757#define TESTSETLOCK 0x1 /* Test set lock */
1758#define BCLK 0x6 /* Burst clock frequency */
1759#define PGWS 0x38 /* Page wait states */
1760#define PGSZ 0x40 /* Page size */
1761#define RDDL 0x380 /* Read data delay */
1762
1763/* Bit masks for EBIU_ARBSTAT */
1764
1765#define ARBSTAT 0x1 /* Arbitration status */
1766#define BGSTAT 0x2 /* Bus grant status */
1767
1768/* Bit masks for EBIU_DDRCTL0 */
1769
1770#define TREFI 0x3fff /* Refresh Interval */
1771#define TRFC 0x3c000 /* Auto-refresh command period */
1772#define TRP 0x3c0000 /* Pre charge-to-active command period */
1773#define TRAS 0x3c00000 /* Min Active-to-pre charge time */
1774#define TRC 0x3c000000 /* Active-to-active time */
1775#define DDR_TRAS(x) ((x<<22)&TRAS) /* DDR tRAS = (1~15) cycles */
1776#define DDR_TRP(x) ((x<<18)&TRP) /* DDR tRP = (1~15) cycles */
1777#define DDR_TRC(x) ((x<<26)&TRC) /* DDR tRC = (1~15) cycles */
1778#define DDR_TRFC(x) ((x<<14)&TRFC) /* DDR tRFC = (1~15) cycles */
1779#define DDR_TREFI(x) (x&TREFI) /* DDR tRFC = (1~15) cycles */
1780
1781/* Bit masks for EBIU_DDRCTL1 */
1782
1783#define TRCD 0xf /* Active-to-Read/write delay */
1784#define TMRD 0xf0 /* Mode register set to active */
1785#define TWR 0x300 /* Write Recovery time */
1786#define DDRDATWIDTH 0x3000 /* DDR data width */
1787#define EXTBANKS 0xc000 /* External banks */
1788#define DDRDEVWIDTH 0x30000 /* DDR device width */
1789#define DDRDEVSIZE 0xc0000 /* DDR device size */
1790#define TWTR 0xf0000000 /* Write-to-read delay */
1791#define DDR_TWTR(x) ((x<<28)&TWTR) /* DDR tWTR = (1~15) cycles */
1792#define DDR_TMRD(x) ((x<<4)&TMRD) /* DDR tMRD = (1~15) cycles */
1793#define DDR_TWR(x) ((x<<8)&TWR) /* DDR tWR = (1~15) cycles */
1794#define DDR_TRCD(x) (x&TRCD) /* DDR tRCD = (1~15) cycles */
1795#define DDR_DATWIDTH 0x2000 /* DDR data width */
1796#define EXTBANK_1 0 /* 1 external bank */
1797#define EXTBANK_2 0x4000 /* 2 external banks */
1798#define DEVSZ_64 0x40000 /* DDR External Bank Size = 64MB */
1799#define DEVSZ_128 0x80000 /* DDR External Bank Size = 128MB */
1800#define DEVSZ_256 0xc0000 /* DDR External Bank Size = 256MB */
1801#define DEVSZ_512 0 /* DDR External Bank Size = 512MB */
1802#define DEVWD_4 0 /* DDR Device Width = 4 Bits */
1803#define DEVWD_8 0x10000 /* DDR Device Width = 8 Bits */
1804#define DEVWD_16 0x20000 /* DDR Device Width = 16 Bits */
1805
1806/* Bit masks for EBIU_DDRCTL2 */
1807
1808#define BURSTLENGTH 0x7 /* Burst length */
1809#define CASLATENCY 0x70 /* CAS latency */
1810#define DLLRESET 0x100 /* DLL Reset */
1811#define REGE 0x1000 /* Register mode enable */
1812#define CL_1_5 0x50 /* DDR CAS Latency = 1.5 cycles */
1813#define CL_2 0x20 /* DDR CAS Latency = 2 cycles */
1814#define CL_2_5 0x60 /* DDR CAS Latency = 2.5 cycles */
1815#define CL_3 0x30 /* DDR CAS Latency = 3 cycles */
1816
1817/* Bit masks for EBIU_DDRCTL3 */
1818
1819#define PASR 0x7 /* Partial array self-refresh */
1820
1821/* Bit masks for EBIU_DDRQUE */
1822
1823#define DEB1_PFLEN 0x3 /* Pre fetch length for DEB1 accesses */
1824#define DEB2_PFLEN 0xc /* Pre fetch length for DEB2 accesses */
1825#define DEB3_PFLEN 0x30 /* Pre fetch length for DEB3 accesses */
1826#define DEB_ARB_PRIORITY 0x700 /* Arbitration between DEB busses */
1827#define DEB1_URGENT 0x1000 /* DEB1 Urgent */
1828#define DEB2_URGENT 0x2000 /* DEB2 Urgent */
1829#define DEB3_URGENT 0x4000 /* DEB3 Urgent */
1830
1831/* Bit masks for EBIU_ERRMST */
1832
1833#define DEB1_ERROR 0x1 /* DEB1 Error */
1834#define DEB2_ERROR 0x2 /* DEB2 Error */
1835#define DEB3_ERROR 0x4 /* DEB3 Error */
1836#define CORE_ERROR 0x8 /* Core error */
1837#define DEB_MERROR 0x10 /* DEB1 Error (2nd) */
1838#define DEB2_MERROR 0x20 /* DEB2 Error (2nd) */
1839#define DEB3_MERROR 0x40 /* DEB3 Error (2nd) */
1840#define CORE_MERROR 0x80 /* Core Error (2nd) */
1841
1842/* Bit masks for EBIU_ERRADD */
1843
1844#define ERROR_ADDRESS 0xffffffff /* Error Address */
1845
1846/* Bit masks for EBIU_RSTCTL */
1847
1848#define DDRSRESET 0x1 /* DDR soft reset */
1849#define PFTCHSRESET 0x4 /* DDR prefetch reset */
1850#define SRREQ 0x8 /* Self-refresh request */
1851#define SRACK 0x10 /* Self-refresh acknowledge */
1852#define MDDRENABLE 0x20 /* Mobile DDR enable */
1853
1854/* Bit masks for EBIU_DDRBRC0 */
1855
1856#define BRC0 0xffffffff /* Count */
1857
1858/* Bit masks for EBIU_DDRBRC1 */
1859
1860#define BRC1 0xffffffff /* Count */
1861
1862/* Bit masks for EBIU_DDRBRC2 */
1863
1864#define BRC2 0xffffffff /* Count */
1865
1866/* Bit masks for EBIU_DDRBRC3 */
1867
1868#define BRC3 0xffffffff /* Count */
1869
1870/* Bit masks for EBIU_DDRBRC4 */
1871
1872#define BRC4 0xffffffff /* Count */
1873
1874/* Bit masks for EBIU_DDRBRC5 */
1875
1876#define BRC5 0xffffffff /* Count */
1877
1878/* Bit masks for EBIU_DDRBRC6 */
1879
1880#define BRC6 0xffffffff /* Count */
1881
1882/* Bit masks for EBIU_DDRBRC7 */
1883
1884#define BRC7 0xffffffff /* Count */
1885
1886/* Bit masks for EBIU_DDRBWC0 */
1887
1888#define BWC0 0xffffffff /* Count */
1889
1890/* Bit masks for EBIU_DDRBWC1 */
1891
1892#define BWC1 0xffffffff /* Count */
1893
1894/* Bit masks for EBIU_DDRBWC2 */
1895
1896#define BWC2 0xffffffff /* Count */
1897
1898/* Bit masks for EBIU_DDRBWC3 */
1899
1900#define BWC3 0xffffffff /* Count */
1901
1902/* Bit masks for EBIU_DDRBWC4 */
1903
1904#define BWC4 0xffffffff /* Count */
1905
1906/* Bit masks for EBIU_DDRBWC5 */
1907
1908#define BWC5 0xffffffff /* Count */
1909
1910/* Bit masks for EBIU_DDRBWC6 */
1911
1912#define BWC6 0xffffffff /* Count */
1913
1914/* Bit masks for EBIU_DDRBWC7 */
1915
1916#define BWC7 0xffffffff /* Count */
1917
1918/* Bit masks for EBIU_DDRACCT */
1919
1920#define ACCT 0xffffffff /* Count */
1921
1922/* Bit masks for EBIU_DDRTACT */
1923
1924#define TECT 0xffffffff /* Count */
1925
1926/* Bit masks for EBIU_DDRARCT */
1927
1928#define ARCT 0xffffffff /* Count */
1929
1930/* Bit masks for EBIU_DDRGC0 */
1931
1932#define GC0 0xffffffff /* Count */
1933
1934/* Bit masks for EBIU_DDRGC1 */
1935
1936#define GC1 0xffffffff /* Count */
1937
1938/* Bit masks for EBIU_DDRGC2 */
1939
1940#define GC2 0xffffffff /* Count */
1941
1942/* Bit masks for EBIU_DDRGC3 */
1943
1944#define GC3 0xffffffff /* Count */
1945
1946/* Bit masks for EBIU_DDRMCEN */
1947
1948#define B0WCENABLE 0x1 /* Bank 0 write count enable */
1949#define B1WCENABLE 0x2 /* Bank 1 write count enable */
1950#define B2WCENABLE 0x4 /* Bank 2 write count enable */
1951#define B3WCENABLE 0x8 /* Bank 3 write count enable */
1952#define B4WCENABLE 0x10 /* Bank 4 write count enable */
1953#define B5WCENABLE 0x20 /* Bank 5 write count enable */
1954#define B6WCENABLE 0x40 /* Bank 6 write count enable */
1955#define B7WCENABLE 0x80 /* Bank 7 write count enable */
1956#define B0RCENABLE 0x100 /* Bank 0 read count enable */
1957#define B1RCENABLE 0x200 /* Bank 1 read count enable */
1958#define B2RCENABLE 0x400 /* Bank 2 read count enable */
1959#define B3RCENABLE 0x800 /* Bank 3 read count enable */
1960#define B4RCENABLE 0x1000 /* Bank 4 read count enable */
1961#define B5RCENABLE 0x2000 /* Bank 5 read count enable */
1962#define B6RCENABLE 0x4000 /* Bank 6 read count enable */
1963#define B7RCENABLE 0x8000 /* Bank 7 read count enable */
1964#define ROWACTCENABLE 0x10000 /* DDR Row activate count enable */
1965#define RWTCENABLE 0x20000 /* DDR R/W Turn around count enable */
1966#define ARCENABLE 0x40000 /* DDR Auto-refresh count enable */
1967#define GC0ENABLE 0x100000 /* DDR Grant count 0 enable */
1968#define GC1ENABLE 0x200000 /* DDR Grant count 1 enable */
1969#define GC2ENABLE 0x400000 /* DDR Grant count 2 enable */
1970#define GC3ENABLE 0x800000 /* DDR Grant count 3 enable */
1971#define GCCONTROL 0x3000000 /* DDR Grant Count Control */
1972
1973/* Bit masks for EBIU_DDRMCCL */
1974
1975#define CB0WCOUNT 0x1 /* Clear write count 0 */
1976#define CB1WCOUNT 0x2 /* Clear write count 1 */
1977#define CB2WCOUNT 0x4 /* Clear write count 2 */
1978#define CB3WCOUNT 0x8 /* Clear write count 3 */
1979#define CB4WCOUNT 0x10 /* Clear write count 4 */
1980#define CB5WCOUNT 0x20 /* Clear write count 5 */
1981#define CB6WCOUNT 0x40 /* Clear write count 6 */
1982#define CB7WCOUNT 0x80 /* Clear write count 7 */
1983#define CBRCOUNT 0x100 /* Clear read count 0 */
1984#define CB1RCOUNT 0x200 /* Clear read count 1 */
1985#define CB2RCOUNT 0x400 /* Clear read count 2 */
1986#define CB3RCOUNT 0x800 /* Clear read count 3 */
1987#define CB4RCOUNT 0x1000 /* Clear read count 4 */
1988#define CB5RCOUNT 0x2000 /* Clear read count 5 */
1989#define CB6RCOUNT 0x4000 /* Clear read count 6 */
1990#define CB7RCOUNT 0x8000 /* Clear read count 7 */
1991#define CRACOUNT 0x10000 /* Clear row activation count */
1992#define CRWTACOUNT 0x20000 /* Clear R/W turn-around count */
1993#define CARCOUNT 0x40000 /* Clear auto-refresh count */
1994#define CG0COUNT 0x100000 /* Clear grant count 0 */
1995#define CG1COUNT 0x200000 /* Clear grant count 1 */
1996#define CG2COUNT 0x400000 /* Clear grant count 2 */
1997#define CG3COUNT 0x800000 /* Clear grant count 3 */
1998
1999/* Bit masks for (PORTx is PORTA - PORTJ) includes PORTx_FER, PORTx_SET, PORTx_CLEAR, PORTx_DIR_SET, PORTx_DIR_CLEAR, PORTx_INEN */
2000
2001#define Px0 0x1 /* GPIO 0 */
2002#define Px1 0x2 /* GPIO 1 */
2003#define Px2 0x4 /* GPIO 2 */
2004#define Px3 0x8 /* GPIO 3 */
2005#define Px4 0x10 /* GPIO 4 */
2006#define Px5 0x20 /* GPIO 5 */
2007#define Px6 0x40 /* GPIO 6 */
2008#define Px7 0x80 /* GPIO 7 */
2009#define Px8 0x100 /* GPIO 8 */
2010#define Px9 0x200 /* GPIO 9 */
2011#define Px10 0x400 /* GPIO 10 */
2012#define Px11 0x800 /* GPIO 11 */
2013#define Px12 0x1000 /* GPIO 12 */
2014#define Px13 0x2000 /* GPIO 13 */
2015#define Px14 0x4000 /* GPIO 14 */
2016#define Px15 0x8000 /* GPIO 15 */
2017
2018/* Bit masks for PORTA_MUX - PORTJ_MUX */
2019
2020#define PxM0 0x3 /* GPIO Mux 0 */
2021#define PxM1 0xc /* GPIO Mux 1 */
2022#define PxM2 0x30 /* GPIO Mux 2 */
2023#define PxM3 0xc0 /* GPIO Mux 3 */
2024#define PxM4 0x300 /* GPIO Mux 4 */
2025#define PxM5 0xc00 /* GPIO Mux 5 */
2026#define PxM6 0x3000 /* GPIO Mux 6 */
2027#define PxM7 0xc000 /* GPIO Mux 7 */
2028#define PxM8 0x30000 /* GPIO Mux 8 */
2029#define PxM9 0xc0000 /* GPIO Mux 9 */
2030#define PxM10 0x300000 /* GPIO Mux 10 */
2031#define PxM11 0xc00000 /* GPIO Mux 11 */
2032#define PxM12 0x3000000 /* GPIO Mux 12 */
2033#define PxM13 0xc000000 /* GPIO Mux 13 */
2034#define PxM14 0x30000000 /* GPIO Mux 14 */
2035#define PxM15 0xc0000000 /* GPIO Mux 15 */
2036
2037
2038/* Bit masks for PINTx_MASK_SET/CLEAR, PINTx_REQUEST, PINTx_LATCH, PINTx_EDGE_SET/CLEAR, PINTx_INVERT_SET/CLEAR, PINTx_PINTSTATE */
2039
2040#define IB0 0x1 /* Interrupt Bit 0 */
2041#define IB1 0x2 /* Interrupt Bit 1 */
2042#define IB2 0x4 /* Interrupt Bit 2 */
2043#define IB3 0x8 /* Interrupt Bit 3 */
2044#define IB4 0x10 /* Interrupt Bit 4 */
2045#define IB5 0x20 /* Interrupt Bit 5 */
2046#define IB6 0x40 /* Interrupt Bit 6 */
2047#define IB7 0x80 /* Interrupt Bit 7 */
2048#define IB8 0x100 /* Interrupt Bit 8 */
2049#define IB9 0x200 /* Interrupt Bit 9 */
2050#define IB10 0x400 /* Interrupt Bit 10 */
2051#define IB11 0x800 /* Interrupt Bit 11 */
2052#define IB12 0x1000 /* Interrupt Bit 12 */
2053#define IB13 0x2000 /* Interrupt Bit 13 */
2054#define IB14 0x4000 /* Interrupt Bit 14 */
2055#define IB15 0x8000 /* Interrupt Bit 15 */
2056
2057/* Bit masks for TIMERx_CONFIG */
2058
2059#define TMODE 0x3 /* Timer Mode */
2060#define PULSE_HI 0x4 /* Pulse Polarity */
2061#define PERIOD_CNT 0x8 /* Period Count */
2062#define IRQ_ENA 0x10 /* Interrupt Request Enable */
2063#define TIN_SEL 0x20 /* Timer Input Select */
2064#define OUT_DIS 0x40 /* Output Pad Disable */
2065#define CLK_SEL 0x80 /* Timer Clock Select */
2066#define TOGGLE_HI 0x100 /* Toggle Mode */
2067#define EMU_RUN 0x200 /* Emulation Behavior Select */
2068#define ERR_TYP 0xc000 /* Error Type */
2069
2070/* Bit masks for TIMER_ENABLE0 */
2071
2072#define TIMEN0 0x1 /* Timer 0 Enable */
2073#define TIMEN1 0x2 /* Timer 1 Enable */
2074#define TIMEN2 0x4 /* Timer 2 Enable */
2075#define TIMEN3 0x8 /* Timer 3 Enable */
2076#define TIMEN4 0x10 /* Timer 4 Enable */
2077#define TIMEN5 0x20 /* Timer 5 Enable */
2078#define TIMEN6 0x40 /* Timer 6 Enable */
2079#define TIMEN7 0x80 /* Timer 7 Enable */
2080
2081/* Bit masks for TIMER_DISABLE0 */
2082
2083#define TIMDIS0 0x1 /* Timer 0 Disable */
2084#define TIMDIS1 0x2 /* Timer 1 Disable */
2085#define TIMDIS2 0x4 /* Timer 2 Disable */
2086#define TIMDIS3 0x8 /* Timer 3 Disable */
2087#define TIMDIS4 0x10 /* Timer 4 Disable */
2088#define TIMDIS5 0x20 /* Timer 5 Disable */
2089#define TIMDIS6 0x40 /* Timer 6 Disable */
2090#define TIMDIS7 0x80 /* Timer 7 Disable */
2091
2092/* Bit masks for TIMER_STATUS0 */
2093
2094#define TIMIL0 0x1 /* Timer 0 Interrupt */
2095#define TIMIL1 0x2 /* Timer 1 Interrupt */
2096#define TIMIL2 0x4 /* Timer 2 Interrupt */
2097#define TIMIL3 0x8 /* Timer 3 Interrupt */
2098#define TOVF_ERR0 0x10 /* Timer 0 Counter Overflow */
2099#define TOVF_ERR1 0x20 /* Timer 1 Counter Overflow */
2100#define TOVF_ERR2 0x40 /* Timer 2 Counter Overflow */
2101#define TOVF_ERR3 0x80 /* Timer 3 Counter Overflow */
2102#define TRUN0 0x1000 /* Timer 0 Slave Enable Status */
2103#define TRUN1 0x2000 /* Timer 1 Slave Enable Status */
2104#define TRUN2 0x4000 /* Timer 2 Slave Enable Status */
2105#define TRUN3 0x8000 /* Timer 3 Slave Enable Status */
2106#define TIMIL4 0x10000 /* Timer 4 Interrupt */
2107#define TIMIL5 0x20000 /* Timer 5 Interrupt */
2108#define TIMIL6 0x40000 /* Timer 6 Interrupt */
2109#define TIMIL7 0x80000 /* Timer 7 Interrupt */
2110#define TOVF_ERR4 0x100000 /* Timer 4 Counter Overflow */
2111#define TOVF_ERR5 0x200000 /* Timer 5 Counter Overflow */
2112#define TOVF_ERR6 0x400000 /* Timer 6 Counter Overflow */
2113#define TOVF_ERR7 0x800000 /* Timer 7 Counter Overflow */
2114#define TRUN4 0x10000000 /* Timer 4 Slave Enable Status */
2115#define TRUN5 0x20000000 /* Timer 5 Slave Enable Status */
2116#define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */
2117#define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */
2118
2119/* Bit masks for WDOG_CTL */
2120
2121#define WDEV 0x6 /* Watchdog Event */
2122#define WDEN 0xff0 /* Watchdog Enable */
2123#define WDRO 0x8000 /* Watchdog Rolled Over */
2124
2125/* Bit masks for CNT_CONFIG */
2126
2127#define CNTE 0x1 /* Counter Enable */
2128#define DEBE 0x2 /* Debounce Enable */
2129#define CDGINV 0x10 /* CDG Pin Polarity Invert */
2130#define CUDINV 0x20 /* CUD Pin Polarity Invert */
2131#define CZMINV 0x40 /* CZM Pin Polarity Invert */
2132#define CNTMODE 0x700 /* Counter Operating Mode */
2133#define ZMZC 0x800 /* CZM Zeroes Counter Enable */
2134#define BNDMODE 0x3000 /* Boundary register Mode */
2135#define INPDIS 0x8000 /* CUG and CDG Input Disable */
2136
2137/* Bit masks for CNT_IMASK */
2138
2139#define ICIE 0x1 /* Illegal Gray/Binary Code Interrupt Enable */
2140#define UCIE 0x2 /* Up count Interrupt Enable */
2141#define DCIE 0x4 /* Down count Interrupt Enable */
2142#define MINCIE 0x8 /* Min Count Interrupt Enable */
2143#define MAXCIE 0x10 /* Max Count Interrupt Enable */
2144#define COV31IE 0x20 /* Bit 31 Overflow Interrupt Enable */
2145#define COV15IE 0x40 /* Bit 15 Overflow Interrupt Enable */
2146#define CZEROIE 0x80 /* Count to Zero Interrupt Enable */
2147#define CZMIE 0x100 /* CZM Pin Interrupt Enable */
2148#define CZMEIE 0x200 /* CZM Error Interrupt Enable */
2149#define CZMZIE 0x400 /* CZM Zeroes Counter Interrupt Enable */
2150
2151/* Bit masks for CNT_STATUS */
2152
2153#define ICII 0x1 /* Illegal Gray/Binary Code Interrupt Identifier */
2154#define UCII 0x2 /* Up count Interrupt Identifier */
2155#define DCII 0x4 /* Down count Interrupt Identifier */
2156#define MINCII 0x8 /* Min Count Interrupt Identifier */
2157#define MAXCII 0x10 /* Max Count Interrupt Identifier */
2158#define COV31II 0x20 /* Bit 31 Overflow Interrupt Identifier */
2159#define COV15II 0x40 /* Bit 15 Overflow Interrupt Identifier */
2160#define CZEROII 0x80 /* Count to Zero Interrupt Identifier */
2161#define CZMII 0x100 /* CZM Pin Interrupt Identifier */
2162#define CZMEII 0x200 /* CZM Error Interrupt Identifier */
2163#define CZMZII 0x400 /* CZM Zeroes Counter Interrupt Identifier */
2164
2165/* Bit masks for CNT_COMMAND */
2166
2167#define W1LCNT 0xf /* Load Counter Register */
2168#define W1LMIN 0xf0 /* Load Min Register */
2169#define W1LMAX 0xf00 /* Load Max Register */
2170#define W1ZMONCE 0x1000 /* Enable CZM Clear Counter Once */
2171
2172/* Bit masks for CNT_DEBOUNCE */
2173
2174#define DPRESCALE 0xf /* Load Counter Register */
2175
2176/* Bit masks for RTC_STAT */
2177
2178#define SECONDS 0x3f /* Seconds */
2179#define MINUTES 0xfc0 /* Minutes */
2180#define HOURS 0x1f000 /* Hours */
2181#define DAY_COUNTER 0xfffe0000 /* Day Counter */
2182
2183/* Bit masks for RTC_ICTL */
2184
2185#define STOPWATCH_INTERRUPT_ENABLE 0x1 /* Stopwatch Interrupt Enable */
2186#define ALARM_INTERRUPT_ENABLE 0x2 /* Alarm Interrupt Enable */
2187#define SECONDS_INTERRUPT_ENABLE 0x4 /* Seconds Interrupt Enable */
2188#define MINUTES_INTERRUPT_ENABLE 0x8 /* Minutes Interrupt Enable */
2189#define HOURS_INTERRUPT_ENABLE 0x10 /* Hours Interrupt Enable */
2190#define TWENTY_FOUR_HOURS_INTERRUPT_ENABLE 0x20 /* 24 Hours Interrupt Enable */
2191#define DAY_ALARM_INTERRUPT_ENABLE 0x40 /* Day Alarm Interrupt Enable */
2192#define WRITE_COMPLETE_INTERRUPT_ENABLE 0x8000 /* Write Complete Interrupt Enable */
2193
2194/* Bit masks for RTC_ISTAT */
2195
2196#define STOPWATCH_EVENT_FLAG 0x1 /* Stopwatch Event Flag */
2197#define ALARM_EVENT_FLAG 0x2 /* Alarm Event Flag */
2198#define SECONDS_EVENT_FLAG 0x4 /* Seconds Event Flag */
2199#define MINUTES_EVENT_FLAG 0x8 /* Minutes Event Flag */
2200#define HOURS_EVENT_FLAG 0x10 /* Hours Event Flag */
2201#define TWENTY_FOUR_HOURS_EVENT_FLAG 0x20 /* 24 Hours Event Flag */
2202#define DAY_ALARM_EVENT_FLAG 0x40 /* Day Alarm Event Flag */
2203#define WRITE_PENDING__STATUS 0x4000 /* Write Pending Status */
2204#define WRITE_COMPLETE 0x8000 /* Write Complete */
2205
2206/* Bit masks for RTC_SWCNT */
2207
2208#define STOPWATCH_COUNT 0xffff /* Stopwatch Count */
2209
2210/* Bit masks for RTC_ALARM */
2211
2212#define SECONDS 0x3f /* Seconds */
2213#define MINUTES 0xfc0 /* Minutes */
2214#define HOURS 0x1f000 /* Hours */
2215#define DAY 0xfffe0000 /* Day */
2216
2217/* Bit masks for RTC_PREN */
2218
2219#define PREN 0x1 /* Prescaler Enable */
2220
2221/* Bit masks for OTP_CONTROL */
2222
2223#define FUSE_FADDR 0x1ff /* OTP/Fuse Address */
2224#define FIEN 0x800 /* OTP/Fuse Interrupt Enable */
2225#define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */
2226#define FWRTEST 0x2000 /* OTP/Fuse Write Test */
2227#define FRDEN 0x4000 /* OTP/Fuse Read Enable */
2228#define FWREN 0x8000 /* OTP/Fuse Write Enable */
2229
2230/* Bit masks for OTP_BEN */
2231
2232#define FBEN 0xffff /* OTP/Fuse Byte Enable */
2233
2234/* Bit masks for OTP_STATUS */
2235
2236#define FCOMP 0x1 /* OTP/Fuse Access Complete */
2237#define FERROR 0x2 /* OTP/Fuse Access Error */
2238#define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */
2239#define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */
2240#define FPGMEN 0x40 /* OTP/Fuse Program Enable */
2241
2242/* Bit masks for OTP_TIMING */
2243
2244#define USECDIV 0xff /* Micro Second Divider */
2245#define READACC 0x7f00 /* Read Access Time */
2246#define CPUMPRL 0x38000 /* Charge Pump Release Time */
2247#define CPUMPSU 0xc0000 /* Charge Pump Setup Time */
2248#define CPUMPHD 0xf00000 /* Charge Pump Hold Time */
2249#define PGMTIME 0xff000000 /* Program Time */
2250
2251/* Bit masks for SECURE_SYSSWT */
2252
2253#define EMUDABL 0x1 /* Emulation Disable. */
2254#define RSTDABL 0x2 /* Reset Disable */
2255#define L1IDABL 0x1c /* L1 Instruction Memory Disable. */
2256#define L1DADABL 0xe0 /* L1 Data Bank A Memory Disable. */
2257#define L1DBDABL 0x700 /* L1 Data Bank B Memory Disable. */
2258#define DMA0OVR 0x800 /* DMA0 Memory Access Override */
2259#define DMA1OVR 0x1000 /* DMA1 Memory Access Override */
2260#define EMUOVR 0x4000 /* Emulation Override */
2261#define OTPSEN 0x8000 /* OTP Secrets Enable. */
2262#define L2DABL 0x70000 /* L2 Memory Disable. */
2263
2264/* Bit masks for SECURE_CONTROL */
2265
2266#define SECURE0 0x1 /* SECURE 0 */
2267#define SECURE1 0x2 /* SECURE 1 */
2268#define SECURE2 0x4 /* SECURE 2 */
2269#define SECURE3 0x8 /* SECURE 3 */
2270
2271/* Bit masks for SECURE_STATUS */
2272
2273#define SECMODE 0x3 /* Secured Mode Control State */
2274#define NMI 0x4 /* Non Maskable Interrupt */
2275#define AFVALID 0x8 /* Authentication Firmware Valid */
2276#define AFEXIT 0x10 /* Authentication Firmware Exit */
2277#define SECSTAT 0xe0 /* Secure Status */
2278
2279/* Bit masks for PLL_DIV */
2280
2281#define CSEL 0x30 /* Core Select */
2282#define SSEL 0xf /* System Select */
2283#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
2284#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
2285#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
2286#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
2287
2288/* Bit masks for PLL_CTL */
2289
2290#define MSEL 0x7e00 /* Multiplier Select */
2291#define BYPASS 0x100 /* PLL Bypass Enable */
2292#define OUTPUT_DELAY 0x80 /* External Memory Output Delay Enable */
2293#define INPUT_DELAY 0x40 /* External Memory Input Delay Enable */
2294#define PDWN 0x20 /* Power Down */
2295#define STOPCK 0x8 /* Stop Clock */
2296#define PLL_OFF 0x2 /* Disable PLL */
2297#define DF 0x1 /* Divide Frequency */
2298
2299/* SWRST Masks */
2300#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
2301#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
2302#define RESET_DOUBLE 0x2000 /* SW Reset Generated By Core Double-Fault */
2303#define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */
2304#define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */
2305
2306/* Bit masks for PLL_STAT */
2307
2308#define PLL_LOCKED 0x20 /* PLL Locked Status */
2309#define ACTIVE_PLLDISABLED 0x4 /* Active Mode With PLL Disabled */
2310#define FULL_ON 0x2 /* Full-On Mode */
2311#define ACTIVE_PLLENABLED 0x1 /* Active Mode With PLL Enabled */
2312#define RTCWS 0x400 /* RTC/Reset Wake-Up Status */
2313#define CANWS 0x800 /* CAN Wake-Up Status */
2314#define USBWS 0x2000 /* USB Wake-Up Status */
2315#define KPADWS 0x4000 /* Keypad Wake-Up Status */
2316#define ROTWS 0x8000 /* Rotary Wake-Up Status */
2317#define GPWS 0x1000 /* General-Purpose Wake-Up Status */
2318
2319/* Bit masks for VR_CTL */
2320
2321#define FREQ 0x3 /* Regulator Switching Frequency */
2322#define GAIN 0xc /* Voltage Output Level Gain */
2323#define VLEV 0xf0 /* Internal Voltage Level */
2324#define SCKELOW 0x8000 /* Drive SCKE Low During Reset Enable */
2325#define WAKE 0x100 /* RTC/Reset Wake-Up Enable */
2326#define CANWE 0x200 /* CAN0/1 Wake-Up Enable */
2327#define GPWE 0x400 /* General-Purpose Wake-Up Enable */
2328#define USBWE 0x800 /* USB Wake-Up Enable */
2329#define KPADWE 0x1000 /* Keypad Wake-Up Enable */
2330#define ROTWE 0x2000 /* Rotary Wake-Up Enable */
2331
2332#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
2333#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
2334#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
2335
2336#define GAIN_5 0x0000 /* GAIN = 5*/
2337#define GAIN_10 0x0004 /* GAIN = 1*/
2338#define GAIN_20 0x0008 /* GAIN = 2*/
2339#define GAIN_50 0x000C /* GAIN = 5*/
2340
2341#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
2342#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
2343#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
2344#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
2345#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
2346#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
2347#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
2348#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
2349#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
2350#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
2351
2352/* Bit masks for NFC_CTL */
2353
2354#define WR_DLY 0xf /* Write Strobe Delay */
2355#define RD_DLY 0xf0 /* Read Strobe Delay */
2356#define NWIDTH 0x100 /* NAND Data Width */
2357#define PG_SIZE 0x200 /* Page Size */
2358
2359/* Bit masks for NFC_STAT */
2360
2361#define NBUSY 0x1 /* Not Busy */
2362#define WB_FULL 0x2 /* Write Buffer Full */
2363#define PG_WR_STAT 0x4 /* Page Write Pending */
2364#define PG_RD_STAT 0x8 /* Page Read Pending */
2365#define WB_EMPTY 0x10 /* Write Buffer Empty */
2366
2367/* Bit masks for NFC_IRQSTAT */
2368
2369#define NBUSYIRQ 0x1 /* Not Busy IRQ */
2370#define WB_OVF 0x2 /* Write Buffer Overflow */
2371#define WB_EDGE 0x4 /* Write Buffer Edge Detect */
2372#define RD_RDY 0x8 /* Read Data Ready */
2373#define WR_DONE 0x10 /* Page Write Done */
2374
2375/* Bit masks for NFC_IRQMASK */
2376
2377#define MASK_BUSYIRQ 0x1 /* Mask Not Busy IRQ */
2378#define MASK_WBOVF 0x2 /* Mask Write Buffer Overflow */
2379#define MASK_WBEMPTY 0x4 /* Mask Write Buffer Empty */
2380#define MASK_RDRDY 0x8 /* Mask Read Data Ready */
2381#define MASK_WRDONE 0x10 /* Mask Write Done */
2382
2383/* Bit masks for NFC_RST */
2384
2385#define ECC_RST 0x1 /* ECC (and NFC counters) Reset */
2386
2387/* Bit masks for NFC_PGCTL */
2388
2389#define PG_RD_START 0x1 /* Page Read Start */
2390#define PG_WR_START 0x2 /* Page Write Start */
2391
2392/* Bit masks for NFC_ECC0 */
2393
2394#define ECC0 0x7ff /* Parity Calculation Result0 */
2395
2396/* Bit masks for NFC_ECC1 */
2397
2398#define ECC1 0x7ff /* Parity Calculation Result1 */
2399
2400/* Bit masks for NFC_ECC2 */
2401
2402#define ECC2 0x7ff /* Parity Calculation Result2 */
2403
2404/* Bit masks for NFC_ECC3 */
2405
2406#define ECC3 0x7ff /* Parity Calculation Result3 */
2407
2408/* Bit masks for NFC_COUNT */
2409
2410#define ECCCNT 0x3ff /* Transfer Count */
2411
2412/* Bit masks for CAN0_CONTROL */
2413
2414#define SRS 0x1 /* Software Reset */
2415#define DNM 0x2 /* DeviceNet Mode */
2416#define ABO 0x4 /* Auto Bus On */
2417#define WBA 0x10 /* Wakeup On CAN Bus Activity */
2418#define SMR 0x20 /* Sleep Mode Request */
2419#define CSR 0x40 /* CAN Suspend Mode Request */
2420#define CCR 0x80 /* CAN Configuration Mode Request */
2421
2422/* Bit masks for CAN0_STATUS */
2423
2424#define WT 0x1 /* CAN Transmit Warning Flag */
2425#define WR 0x2 /* CAN Receive Warning Flag */
2426#define EP 0x4 /* CAN Error Passive Mode */
2427#define EBO 0x8 /* CAN Error Bus Off Mode */
2428#define CSA 0x40 /* CAN Suspend Mode Acknowledge */
2429#define CCA 0x80 /* CAN Configuration Mode Acknowledge */
2430#define MBPTR 0x1f00 /* Mailbox Pointer */
2431#define TRM 0x4000 /* Transmit Mode Status */
2432#define REC 0x8000 /* Receive Mode Status */
2433
2434/* Bit masks for CAN0_DEBUG */
2435
2436#define DEC 0x1 /* Disable Transmit/Receive Error Counters */
2437#define DRI 0x2 /* Disable CANRX Input Pin */
2438#define DTO 0x4 /* Disable CANTX Output Pin */
2439#define DIL 0x8 /* Disable Internal Loop */
2440#define MAA 0x10 /* Mode Auto-Acknowledge */
2441#define MRB 0x20 /* Mode Read Back */
2442#define CDE 0x8000 /* CAN Debug Mode Enable */
2443
2444/* Bit masks for CAN0_CLOCK */
2445
2446#define BRP 0x3ff /* CAN Bit Rate Prescaler */
2447
2448/* Bit masks for CAN0_TIMING */
2449
2450#define SJW 0x300 /* Synchronization Jump Width */
2451#define SAM 0x80 /* Sampling */
2452#define TSEG2 0x70 /* Time Segment 2 */
2453#define TSEG1 0xf /* Time Segment 1 */
2454
2455/* Bit masks for CAN0_INTR */
2456
2457#define CANRX 0x80 /* Serial Input From Transceiver */
2458#define CANTX 0x40 /* Serial Output To Transceiver */
2459#define SMACK 0x8 /* Sleep Mode Acknowledge */
2460#define GIRQ 0x4 /* Global Interrupt Request Status */
2461#define MBTIRQ 0x2 /* Mailbox Transmit Interrupt Request */
2462#define MBRIRQ 0x1 /* Mailbox Receive Interrupt Request */
2463
2464/* Bit masks for CAN0_GIM */
2465
2466#define EWTIM 0x1 /* Error Warning Transmit Interrupt Mask */
2467#define EWRIM 0x2 /* Error Warning Receive Interrupt Mask */
2468#define EPIM 0x4 /* Error Passive Interrupt Mask */
2469#define BOIM 0x8 /* Bus Off Interrupt Mask */
2470#define WUIM 0x10 /* Wakeup Interrupt Mask */
2471#define UIAIM 0x20 /* Unimplemented Address Interrupt Mask */
2472#define AAIM 0x40 /* Abort Acknowledge Interrupt Mask */
2473#define RMLIM 0x80 /* Receive Message Lost Interrupt Mask */
2474#define UCEIM 0x100 /* Universal Counter Exceeded Interrupt Mask */
2475#define ADIM 0x400 /* Access Denied Interrupt Mask */
2476
2477/* Bit masks for CAN0_GIS */
2478
2479#define EWTIS 0x1 /* Error Warning Transmit Interrupt Status */
2480#define EWRIS 0x2 /* Error Warning Receive Interrupt Status */
2481#define EPIS 0x4 /* Error Passive Interrupt Status */
2482#define BOIS 0x8 /* Bus Off Interrupt Status */
2483#define WUIS 0x10 /* Wakeup Interrupt Status */
2484#define UIAIS 0x20 /* Unimplemented Address Interrupt Status */
2485#define AAIS 0x40 /* Abort Acknowledge Interrupt Status */
2486#define RMLIS 0x80 /* Receive Message Lost Interrupt Status */
2487#define UCEIS 0x100 /* Universal Counter Exceeded Interrupt Status */
2488#define ADIS 0x400 /* Access Denied Interrupt Status */
2489
2490/* Bit masks for CAN0_GIF */
2491
2492#define EWTIF 0x1 /* Error Warning Transmit Interrupt Flag */
2493#define EWRIF 0x2 /* Error Warning Receive Interrupt Flag */
2494#define EPIF 0x4 /* Error Passive Interrupt Flag */
2495#define BOIF 0x8 /* Bus Off Interrupt Flag */
2496#define WUIF 0x10 /* Wakeup Interrupt Flag */
2497#define UIAIF 0x20 /* Unimplemented Address Interrupt Flag */
2498#define AAIF 0x40 /* Abort Acknowledge Interrupt Flag */
2499#define RMLIF 0x80 /* Receive Message Lost Interrupt Flag */
2500#define UCEIF 0x100 /* Universal Counter Exceeded Interrupt Flag */
2501#define ADIF 0x400 /* Access Denied Interrupt Flag */
2502
2503/* Bit masks for CAN0_MBTD */
2504
2505#define TDR 0x80 /* Temporary Disable Request */
2506#define TDA 0x40 /* Temporary Disable Acknowledge */
2507#define TDPTR 0x1f /* Temporary Disable Pointer */
2508
2509/* Bit masks for CAN0_UCCNF */
2510
2511#define UCCNF 0xf /* Universal Counter Configuration */
2512#define UCRC 0x20 /* Universal Counter Reload/Clear */
2513#define UCCT 0x40 /* Universal Counter CAN Trigger */
2514#define UCE 0x80 /* Universal Counter Enable */
2515
2516/* Bit masks for CAN0_UCCNT */
2517
2518#define UCCNT 0xffff /* Universal Counter Count Value */
2519
2520/* Bit masks for CAN0_UCRC */
2521
2522#define UCVAL 0xffff /* Universal Counter Reload/Capture Value */
2523
2524/* Bit masks for CAN0_CEC */
2525
2526#define RXECNT 0xff /* Receive Error Counter */
2527#define TXECNT 0xff00 /* Transmit Error Counter */
2528
2529/* Bit masks for CAN0_ESR */
2530
2531#define FER 0x80 /* Form Error */
2532#define BEF 0x40 /* Bit Error Flag */
2533#define SA0 0x20 /* Stuck At Dominant */
2534#define CRCE 0x10 /* CRC Error */
2535#define SER 0x8 /* Stuff Bit Error */
2536#define ACKE 0x4 /* Acknowledge Error */
2537
2538/* Bit masks for CAN0_EWR */
2539
2540#define EWLTEC 0xff00 /* Transmit Error Warning Limit */
2541#define EWLREC 0xff /* Receive Error Warning Limit */
2542
2543/* Bit masks for CAN0_AMxx_H */
2544
2545#define FDF 0x8000 /* Filter On Data Field */
2546#define FMD 0x4000 /* Full Mask Data */
2547#define AMIDE 0x2000 /* Acceptance Mask Identifier Extension */
2548#define BASEID 0x1ffc /* Base Identifier */
2549#define EXTID_HI 0x3 /* Extended Identifier High Bits */
2550
2551/* Bit masks for CAN0_AMxx_L */
2552
2553#define EXTID_LO 0xffff /* Extended Identifier Low Bits */
2554#define DFM 0xffff /* Data Field Mask */
2555
2556/* Bit masks for CAN0_MBxx_ID1 */
2557
2558#define AME 0x8000 /* Acceptance Mask Enable */
2559#define RTR 0x4000 /* Remote Transmission Request */
2560#define IDE 0x2000 /* Identifier Extension */
2561#define BASEID 0x1ffc /* Base Identifier */
2562#define EXTID_HI 0x3 /* Extended Identifier High Bits */
2563
2564/* Bit masks for CAN0_MBxx_ID0 */
2565
2566#define EXTID_LO 0xffff /* Extended Identifier Low Bits */
2567#define DFM 0xffff /* Data Field Mask */
2568
2569/* Bit masks for CAN0_MBxx_TIMESTAMP */
2570
2571#define TSV 0xffff /* Time Stamp Value */
2572
2573/* Bit masks for CAN0_MBxx_LENGTH */
2574
2575#define DLC 0xf /* Data Length Code */
2576
2577/* Bit masks for CAN0_MBxx_DATA3 */
2578
2579#define CAN_BYTE0 0xff00 /* Data Field Byte 0 */
2580#define CAN_BYTE1 0xff /* Data Field Byte 1 */
2581
2582/* Bit masks for CAN0_MBxx_DATA2 */
2583
2584#define CAN_BYTE2 0xff00 /* Data Field Byte 2 */
2585#define CAN_BYTE3 0xff /* Data Field Byte 3 */
2586
2587/* Bit masks for CAN0_MBxx_DATA1 */
2588
2589#define CAN_BYTE4 0xff00 /* Data Field Byte 4 */
2590#define CAN_BYTE5 0xff /* Data Field Byte 5 */
2591
2592/* Bit masks for CAN0_MBxx_DATA0 */
2593
2594#define CAN_BYTE6 0xff00 /* Data Field Byte 6 */
2595#define CAN_BYTE7 0xff /* Data Field Byte 7 */
2596
2597/* Bit masks for CAN0_MC1 */
2598
2599#define MC0 0x1 /* Mailbox 0 Enable */
2600#define MC1 0x2 /* Mailbox 1 Enable */
2601#define MC2 0x4 /* Mailbox 2 Enable */
2602#define MC3 0x8 /* Mailbox 3 Enable */
2603#define MC4 0x10 /* Mailbox 4 Enable */
2604#define MC5 0x20 /* Mailbox 5 Enable */
2605#define MC6 0x40 /* Mailbox 6 Enable */
2606#define MC7 0x80 /* Mailbox 7 Enable */
2607#define MC8 0x100 /* Mailbox 8 Enable */
2608#define MC9 0x200 /* Mailbox 9 Enable */
2609#define MC10 0x400 /* Mailbox 10 Enable */
2610#define MC11 0x800 /* Mailbox 11 Enable */
2611#define MC12 0x1000 /* Mailbox 12 Enable */
2612#define MC13 0x2000 /* Mailbox 13 Enable */
2613#define MC14 0x4000 /* Mailbox 14 Enable */
2614#define MC15 0x8000 /* Mailbox 15 Enable */
2615
2616/* Bit masks for CAN0_MC2 */
2617
2618#define MC16 0x1 /* Mailbox 16 Enable */
2619#define MC17 0x2 /* Mailbox 17 Enable */
2620#define MC18 0x4 /* Mailbox 18 Enable */
2621#define MC19 0x8 /* Mailbox 19 Enable */
2622#define MC20 0x10 /* Mailbox 20 Enable */
2623#define MC21 0x20 /* Mailbox 21 Enable */
2624#define MC22 0x40 /* Mailbox 22 Enable */
2625#define MC23 0x80 /* Mailbox 23 Enable */
2626#define MC24 0x100 /* Mailbox 24 Enable */
2627#define MC25 0x200 /* Mailbox 25 Enable */
2628#define MC26 0x400 /* Mailbox 26 Enable */
2629#define MC27 0x800 /* Mailbox 27 Enable */
2630#define MC28 0x1000 /* Mailbox 28 Enable */
2631#define MC29 0x2000 /* Mailbox 29 Enable */
2632#define MC30 0x4000 /* Mailbox 30 Enable */
2633#define MC31 0x8000 /* Mailbox 31 Enable */
2634
2635/* Bit masks for CAN0_MD1 */
2636
2637#define MD0 0x1 /* Mailbox 0 Receive Enable */
2638#define MD1 0x2 /* Mailbox 1 Receive Enable */
2639#define MD2 0x4 /* Mailbox 2 Receive Enable */
2640#define MD3 0x8 /* Mailbox 3 Receive Enable */
2641#define MD4 0x10 /* Mailbox 4 Receive Enable */
2642#define MD5 0x20 /* Mailbox 5 Receive Enable */
2643#define MD6 0x40 /* Mailbox 6 Receive Enable */
2644#define MD7 0x80 /* Mailbox 7 Receive Enable */
2645#define MD8 0x100 /* Mailbox 8 Receive Enable */
2646#define MD9 0x200 /* Mailbox 9 Receive Enable */
2647#define MD10 0x400 /* Mailbox 10 Receive Enable */
2648#define MD11 0x800 /* Mailbox 11 Receive Enable */
2649#define MD12 0x1000 /* Mailbox 12 Receive Enable */
2650#define MD13 0x2000 /* Mailbox 13 Receive Enable */
2651#define MD14 0x4000 /* Mailbox 14 Receive Enable */
2652#define MD15 0x8000 /* Mailbox 15 Receive Enable */
2653
2654/* Bit masks for CAN0_MD2 */
2655
2656#define MD16 0x1 /* Mailbox 16 Receive Enable */
2657#define MD17 0x2 /* Mailbox 17 Receive Enable */
2658#define MD18 0x4 /* Mailbox 18 Receive Enable */
2659#define MD19 0x8 /* Mailbox 19 Receive Enable */
2660#define MD20 0x10 /* Mailbox 20 Receive Enable */
2661#define MD21 0x20 /* Mailbox 21 Receive Enable */
2662#define MD22 0x40 /* Mailbox 22 Receive Enable */
2663#define MD23 0x80 /* Mailbox 23 Receive Enable */
2664#define MD24 0x100 /* Mailbox 24 Receive Enable */
2665#define MD25 0x200 /* Mailbox 25 Receive Enable */
2666#define MD26 0x400 /* Mailbox 26 Receive Enable */
2667#define MD27 0x800 /* Mailbox 27 Receive Enable */
2668#define MD28 0x1000 /* Mailbox 28 Receive Enable */
2669#define MD29 0x2000 /* Mailbox 29 Receive Enable */
2670#define MD30 0x4000 /* Mailbox 30 Receive Enable */
2671#define MD31 0x8000 /* Mailbox 31 Receive Enable */
2672
2673/* Bit masks for CAN0_RMP1 */
2674
2675#define RMP0 0x1 /* Mailbox 0 Receive Message Pending */
2676#define RMP1 0x2 /* Mailbox 1 Receive Message Pending */
2677#define RMP2 0x4 /* Mailbox 2 Receive Message Pending */
2678#define RMP3 0x8 /* Mailbox 3 Receive Message Pending */
2679#define RMP4 0x10 /* Mailbox 4 Receive Message Pending */
2680#define RMP5 0x20 /* Mailbox 5 Receive Message Pending */
2681#define RMP6 0x40 /* Mailbox 6 Receive Message Pending */
2682#define RMP7 0x80 /* Mailbox 7 Receive Message Pending */
2683#define RMP8 0x100 /* Mailbox 8 Receive Message Pending */
2684#define RMP9 0x200 /* Mailbox 9 Receive Message Pending */
2685#define RMP10 0x400 /* Mailbox 10 Receive Message Pending */
2686#define RMP11 0x800 /* Mailbox 11 Receive Message Pending */
2687#define RMP12 0x1000 /* Mailbox 12 Receive Message Pending */
2688#define RMP13 0x2000 /* Mailbox 13 Receive Message Pending */
2689#define RMP14 0x4000 /* Mailbox 14 Receive Message Pending */
2690#define RMP15 0x8000 /* Mailbox 15 Receive Message Pending */
2691
2692/* Bit masks for CAN0_RMP2 */
2693
2694#define RMP16 0x1 /* Mailbox 16 Receive Message Pending */
2695#define RMP17 0x2 /* Mailbox 17 Receive Message Pending */
2696#define RMP18 0x4 /* Mailbox 18 Receive Message Pending */
2697#define RMP19 0x8 /* Mailbox 19 Receive Message Pending */
2698#define RMP20 0x10 /* Mailbox 20 Receive Message Pending */
2699#define RMP21 0x20 /* Mailbox 21 Receive Message Pending */
2700#define RMP22 0x40 /* Mailbox 22 Receive Message Pending */
2701#define RMP23 0x80 /* Mailbox 23 Receive Message Pending */
2702#define RMP24 0x100 /* Mailbox 24 Receive Message Pending */
2703#define RMP25 0x200 /* Mailbox 25 Receive Message Pending */
2704#define RMP26 0x400 /* Mailbox 26 Receive Message Pending */
2705#define RMP27 0x800 /* Mailbox 27 Receive Message Pending */
2706#define RMP28 0x1000 /* Mailbox 28 Receive Message Pending */
2707#define RMP29 0x2000 /* Mailbox 29 Receive Message Pending */
2708#define RMP30 0x4000 /* Mailbox 30 Receive Message Pending */
2709#define RMP31 0x8000 /* Mailbox 31 Receive Message Pending */
2710
2711/* Bit masks for CAN0_RML1 */
2712
2713#define RML0 0x1 /* Mailbox 0 Receive Message Lost */
2714#define RML1 0x2 /* Mailbox 1 Receive Message Lost */
2715#define RML2 0x4 /* Mailbox 2 Receive Message Lost */
2716#define RML3 0x8 /* Mailbox 3 Receive Message Lost */
2717#define RML4 0x10 /* Mailbox 4 Receive Message Lost */
2718#define RML5 0x20 /* Mailbox 5 Receive Message Lost */
2719#define RML6 0x40 /* Mailbox 6 Receive Message Lost */
2720#define RML7 0x80 /* Mailbox 7 Receive Message Lost */
2721#define RML8 0x100 /* Mailbox 8 Receive Message Lost */
2722#define RML9 0x200 /* Mailbox 9 Receive Message Lost */
2723#define RML10 0x400 /* Mailbox 10 Receive Message Lost */
2724#define RML11 0x800 /* Mailbox 11 Receive Message Lost */
2725#define RML12 0x1000 /* Mailbox 12 Receive Message Lost */
2726#define RML13 0x2000 /* Mailbox 13 Receive Message Lost */
2727#define RML14 0x4000 /* Mailbox 14 Receive Message Lost */
2728#define RML15 0x8000 /* Mailbox 15 Receive Message Lost */
2729
2730/* Bit masks for CAN0_RML2 */
2731
2732#define RML16 0x1 /* Mailbox 16 Receive Message Lost */
2733#define RML17 0x2 /* Mailbox 17 Receive Message Lost */
2734#define RML18 0x4 /* Mailbox 18 Receive Message Lost */
2735#define RML19 0x8 /* Mailbox 19 Receive Message Lost */
2736#define RML20 0x10 /* Mailbox 20 Receive Message Lost */
2737#define RML21 0x20 /* Mailbox 21 Receive Message Lost */
2738#define RML22 0x40 /* Mailbox 22 Receive Message Lost */
2739#define RML23 0x80 /* Mailbox 23 Receive Message Lost */
2740#define RML24 0x100 /* Mailbox 24 Receive Message Lost */
2741#define RML25 0x200 /* Mailbox 25 Receive Message Lost */
2742#define RML26 0x400 /* Mailbox 26 Receive Message Lost */
2743#define RML27 0x800 /* Mailbox 27 Receive Message Lost */
2744#define RML28 0x1000 /* Mailbox 28 Receive Message Lost */
2745#define RML29 0x2000 /* Mailbox 29 Receive Message Lost */
2746#define RML30 0x4000 /* Mailbox 30 Receive Message Lost */
2747#define RML31 0x8000 /* Mailbox 31 Receive Message Lost */
2748
2749/* Bit masks for CAN0_OPSS1 */
2750
2751#define OPSS0 0x1 /* Mailbox 0 Overwrite Protection/Single-Shot Transmission Enable */
2752#define OPSS1 0x2 /* Mailbox 1 Overwrite Protection/Single-Shot Transmission Enable */
2753#define OPSS2 0x4 /* Mailbox 2 Overwrite Protection/Single-Shot Transmission Enable */
2754#define OPSS3 0x8 /* Mailbox 3 Overwrite Protection/Single-Shot Transmission Enable */
2755#define OPSS4 0x10 /* Mailbox 4 Overwrite Protection/Single-Shot Transmission Enable */
2756#define OPSS5 0x20 /* Mailbox 5 Overwrite Protection/Single-Shot Transmission Enable */
2757#define OPSS6 0x40 /* Mailbox 6 Overwrite Protection/Single-Shot Transmission Enable */
2758#define OPSS7 0x80 /* Mailbox 7 Overwrite Protection/Single-Shot Transmission Enable */
2759#define OPSS8 0x100 /* Mailbox 8 Overwrite Protection/Single-Shot Transmission Enable */
2760#define OPSS9 0x200 /* Mailbox 9 Overwrite Protection/Single-Shot Transmission Enable */
2761#define OPSS10 0x400 /* Mailbox 10 Overwrite Protection/Single-Shot Transmission Enable */
2762#define OPSS11 0x800 /* Mailbox 11 Overwrite Protection/Single-Shot Transmission Enable */
2763#define OPSS12 0x1000 /* Mailbox 12 Overwrite Protection/Single-Shot Transmission Enable */
2764#define OPSS13 0x2000 /* Mailbox 13 Overwrite Protection/Single-Shot Transmission Enable */
2765#define OPSS14 0x4000 /* Mailbox 14 Overwrite Protection/Single-Shot Transmission Enable */
2766#define OPSS15 0x8000 /* Mailbox 15 Overwrite Protection/Single-Shot Transmission Enable */
2767
2768/* Bit masks for CAN0_OPSS2 */
2769
2770#define OPSS16 0x1 /* Mailbox 16 Overwrite Protection/Single-Shot Transmission Enable */
2771#define OPSS17 0x2 /* Mailbox 17 Overwrite Protection/Single-Shot Transmission Enable */
2772#define OPSS18 0x4 /* Mailbox 18 Overwrite Protection/Single-Shot Transmission Enable */
2773#define OPSS19 0x8 /* Mailbox 19 Overwrite Protection/Single-Shot Transmission Enable */
2774#define OPSS20 0x10 /* Mailbox 20 Overwrite Protection/Single-Shot Transmission Enable */
2775#define OPSS21 0x20 /* Mailbox 21 Overwrite Protection/Single-Shot Transmission Enable */
2776#define OPSS22 0x40 /* Mailbox 22 Overwrite Protection/Single-Shot Transmission Enable */
2777#define OPSS23 0x80 /* Mailbox 23 Overwrite Protection/Single-Shot Transmission Enable */
2778#define OPSS24 0x100 /* Mailbox 24 Overwrite Protection/Single-Shot Transmission Enable */
2779#define OPSS25 0x200 /* Mailbox 25 Overwrite Protection/Single-Shot Transmission Enable */
2780#define OPSS26 0x400 /* Mailbox 26 Overwrite Protection/Single-Shot Transmission Enable */
2781#define OPSS27 0x800 /* Mailbox 27 Overwrite Protection/Single-Shot Transmission Enable */
2782#define OPSS28 0x1000 /* Mailbox 28 Overwrite Protection/Single-Shot Transmission Enable */
2783#define OPSS29 0x2000 /* Mailbox 29 Overwrite Protection/Single-Shot Transmission Enable */
2784#define OPSS30 0x4000 /* Mailbox 30 Overwrite Protection/Single-Shot Transmission Enable */
2785#define OPSS31 0x8000 /* Mailbox 31 Overwrite Protection/Single-Shot Transmission Enable */
2786
2787/* Bit masks for CAN0_TRS1 */
2788
2789#define TRS0 0x1 /* Mailbox 0 Transmit Request Set */
2790#define TRS1 0x2 /* Mailbox 1 Transmit Request Set */
2791#define TRS2 0x4 /* Mailbox 2 Transmit Request Set */
2792#define TRS3 0x8 /* Mailbox 3 Transmit Request Set */
2793#define TRS4 0x10 /* Mailbox 4 Transmit Request Set */
2794#define TRS5 0x20 /* Mailbox 5 Transmit Request Set */
2795#define TRS6 0x40 /* Mailbox 6 Transmit Request Set */
2796#define TRS7 0x80 /* Mailbox 7 Transmit Request Set */
2797#define TRS8 0x100 /* Mailbox 8 Transmit Request Set */
2798#define TRS9 0x200 /* Mailbox 9 Transmit Request Set */
2799#define TRS10 0x400 /* Mailbox 10 Transmit Request Set */
2800#define TRS11 0x800 /* Mailbox 11 Transmit Request Set */
2801#define TRS12 0x1000 /* Mailbox 12 Transmit Request Set */
2802#define TRS13 0x2000 /* Mailbox 13 Transmit Request Set */
2803#define TRS14 0x4000 /* Mailbox 14 Transmit Request Set */
2804#define TRS15 0x8000 /* Mailbox 15 Transmit Request Set */
2805
2806/* Bit masks for CAN0_TRS2 */
2807
2808#define TRS16 0x1 /* Mailbox 16 Transmit Request Set */
2809#define TRS17 0x2 /* Mailbox 17 Transmit Request Set */
2810#define TRS18 0x4 /* Mailbox 18 Transmit Request Set */
2811#define TRS19 0x8 /* Mailbox 19 Transmit Request Set */
2812#define TRS20 0x10 /* Mailbox 20 Transmit Request Set */
2813#define TRS21 0x20 /* Mailbox 21 Transmit Request Set */
2814#define TRS22 0x40 /* Mailbox 22 Transmit Request Set */
2815#define TRS23 0x80 /* Mailbox 23 Transmit Request Set */
2816#define TRS24 0x100 /* Mailbox 24 Transmit Request Set */
2817#define TRS25 0x200 /* Mailbox 25 Transmit Request Set */
2818#define TRS26 0x400 /* Mailbox 26 Transmit Request Set */
2819#define TRS27 0x800 /* Mailbox 27 Transmit Request Set */
2820#define TRS28 0x1000 /* Mailbox 28 Transmit Request Set */
2821#define TRS29 0x2000 /* Mailbox 29 Transmit Request Set */
2822#define TRS30 0x4000 /* Mailbox 30 Transmit Request Set */
2823#define TRS31 0x8000 /* Mailbox 31 Transmit Request Set */
2824
2825/* Bit masks for CAN0_TRR1 */
2826
2827#define TRR0 0x1 /* Mailbox 0 Transmit Request Reset */
2828#define TRR1 0x2 /* Mailbox 1 Transmit Request Reset */
2829#define TRR2 0x4 /* Mailbox 2 Transmit Request Reset */
2830#define TRR3 0x8 /* Mailbox 3 Transmit Request Reset */
2831#define TRR4 0x10 /* Mailbox 4 Transmit Request Reset */
2832#define TRR5 0x20 /* Mailbox 5 Transmit Request Reset */
2833#define TRR6 0x40 /* Mailbox 6 Transmit Request Reset */
2834#define TRR7 0x80 /* Mailbox 7 Transmit Request Reset */
2835#define TRR8 0x100 /* Mailbox 8 Transmit Request Reset */
2836#define TRR9 0x200 /* Mailbox 9 Transmit Request Reset */
2837#define TRR10 0x400 /* Mailbox 10 Transmit Request Reset */
2838#define TRR11 0x800 /* Mailbox 11 Transmit Request Reset */
2839#define TRR12 0x1000 /* Mailbox 12 Transmit Request Reset */
2840#define TRR13 0x2000 /* Mailbox 13 Transmit Request Reset */
2841#define TRR14 0x4000 /* Mailbox 14 Transmit Request Reset */
2842#define TRR15 0x8000 /* Mailbox 15 Transmit Request Reset */
2843
2844/* Bit masks for CAN0_TRR2 */
2845
2846#define TRR16 0x1 /* Mailbox 16 Transmit Request Reset */
2847#define TRR17 0x2 /* Mailbox 17 Transmit Request Reset */
2848#define TRR18 0x4 /* Mailbox 18 Transmit Request Reset */
2849#define TRR19 0x8 /* Mailbox 19 Transmit Request Reset */
2850#define TRR20 0x10 /* Mailbox 20 Transmit Request Reset */
2851#define TRR21 0x20 /* Mailbox 21 Transmit Request Reset */
2852#define TRR22 0x40 /* Mailbox 22 Transmit Request Reset */
2853#define TRR23 0x80 /* Mailbox 23 Transmit Request Reset */
2854#define TRR24 0x100 /* Mailbox 24 Transmit Request Reset */
2855#define TRR25 0x200 /* Mailbox 25 Transmit Request Reset */
2856#define TRR26 0x400 /* Mailbox 26 Transmit Request Reset */
2857#define TRR27 0x800 /* Mailbox 27 Transmit Request Reset */
2858#define TRR28 0x1000 /* Mailbox 28 Transmit Request Reset */
2859#define TRR29 0x2000 /* Mailbox 29 Transmit Request Reset */
2860#define TRR30 0x4000 /* Mailbox 30 Transmit Request Reset */
2861#define TRR31 0x8000 /* Mailbox 31 Transmit Request Reset */
2862
2863/* Bit masks for CAN0_AA1 */
2864
2865#define AA0 0x1 /* Mailbox 0 Abort Acknowledge */
2866#define AA1 0x2 /* Mailbox 1 Abort Acknowledge */
2867#define AA2 0x4 /* Mailbox 2 Abort Acknowledge */
2868#define AA3 0x8 /* Mailbox 3 Abort Acknowledge */
2869#define AA4 0x10 /* Mailbox 4 Abort Acknowledge */
2870#define AA5 0x20 /* Mailbox 5 Abort Acknowledge */
2871#define AA6 0x40 /* Mailbox 6 Abort Acknowledge */
2872#define AA7 0x80 /* Mailbox 7 Abort Acknowledge */
2873#define AA8 0x100 /* Mailbox 8 Abort Acknowledge */
2874#define AA9 0x200 /* Mailbox 9 Abort Acknowledge */
2875#define AA10 0x400 /* Mailbox 10 Abort Acknowledge */
2876#define AA11 0x800 /* Mailbox 11 Abort Acknowledge */
2877#define AA12 0x1000 /* Mailbox 12 Abort Acknowledge */
2878#define AA13 0x2000 /* Mailbox 13 Abort Acknowledge */
2879#define AA14 0x4000 /* Mailbox 14 Abort Acknowledge */
2880#define AA15 0x8000 /* Mailbox 15 Abort Acknowledge */
2881
2882/* Bit masks for CAN0_AA2 */
2883
2884#define AA16 0x1 /* Mailbox 16 Abort Acknowledge */
2885#define AA17 0x2 /* Mailbox 17 Abort Acknowledge */
2886#define AA18 0x4 /* Mailbox 18 Abort Acknowledge */
2887#define AA19 0x8 /* Mailbox 19 Abort Acknowledge */
2888#define AA20 0x10 /* Mailbox 20 Abort Acknowledge */
2889#define AA21 0x20 /* Mailbox 21 Abort Acknowledge */
2890#define AA22 0x40 /* Mailbox 22 Abort Acknowledge */
2891#define AA23 0x80 /* Mailbox 23 Abort Acknowledge */
2892#define AA24 0x100 /* Mailbox 24 Abort Acknowledge */
2893#define AA25 0x200 /* Mailbox 25 Abort Acknowledge */
2894#define AA26 0x400 /* Mailbox 26 Abort Acknowledge */
2895#define AA27 0x800 /* Mailbox 27 Abort Acknowledge */
2896#define AA28 0x1000 /* Mailbox 28 Abort Acknowledge */
2897#define AA29 0x2000 /* Mailbox 29 Abort Acknowledge */
2898#define AA30 0x4000 /* Mailbox 30 Abort Acknowledge */
2899#define AA31 0x8000 /* Mailbox 31 Abort Acknowledge */
2900
2901/* Bit masks for CAN0_TA1 */
2902
2903#define TA0 0x1 /* Mailbox 0 Transmit Acknowledge */
2904#define TA1 0x2 /* Mailbox 1 Transmit Acknowledge */
2905#define TA2 0x4 /* Mailbox 2 Transmit Acknowledge */
2906#define TA3 0x8 /* Mailbox 3 Transmit Acknowledge */
2907#define TA4 0x10 /* Mailbox 4 Transmit Acknowledge */
2908#define TA5 0x20 /* Mailbox 5 Transmit Acknowledge */
2909#define TA6 0x40 /* Mailbox 6 Transmit Acknowledge */
2910#define TA7 0x80 /* Mailbox 7 Transmit Acknowledge */
2911#define TA8 0x100 /* Mailbox 8 Transmit Acknowledge */
2912#define TA9 0x200 /* Mailbox 9 Transmit Acknowledge */
2913#define TA10 0x400 /* Mailbox 10 Transmit Acknowledge */
2914#define TA11 0x800 /* Mailbox 11 Transmit Acknowledge */
2915#define TA12 0x1000 /* Mailbox 12 Transmit Acknowledge */
2916#define TA13 0x2000 /* Mailbox 13 Transmit Acknowledge */
2917#define TA14 0x4000 /* Mailbox 14 Transmit Acknowledge */
2918#define TA15 0x8000 /* Mailbox 15 Transmit Acknowledge */
2919
2920/* Bit masks for CAN0_TA2 */
2921
2922#define TA16 0x1 /* Mailbox 16 Transmit Acknowledge */
2923#define TA17 0x2 /* Mailbox 17 Transmit Acknowledge */
2924#define TA18 0x4 /* Mailbox 18 Transmit Acknowledge */
2925#define TA19 0x8 /* Mailbox 19 Transmit Acknowledge */
2926#define TA20 0x10 /* Mailbox 20 Transmit Acknowledge */
2927#define TA21 0x20 /* Mailbox 21 Transmit Acknowledge */
2928#define TA22 0x40 /* Mailbox 22 Transmit Acknowledge */
2929#define TA23 0x80 /* Mailbox 23 Transmit Acknowledge */
2930#define TA24 0x100 /* Mailbox 24 Transmit Acknowledge */
2931#define TA25 0x200 /* Mailbox 25 Transmit Acknowledge */
2932#define TA26 0x400 /* Mailbox 26 Transmit Acknowledge */
2933#define TA27 0x800 /* Mailbox 27 Transmit Acknowledge */
2934#define TA28 0x1000 /* Mailbox 28 Transmit Acknowledge */
2935#define TA29 0x2000 /* Mailbox 29 Transmit Acknowledge */
2936#define TA30 0x4000 /* Mailbox 30 Transmit Acknowledge */
2937#define TA31 0x8000 /* Mailbox 31 Transmit Acknowledge */
2938
2939/* Bit masks for CAN0_RFH1 */
2940
2941#define RFH0 0x1 /* Mailbox 0 Remote Frame Handling Enable */
2942#define RFH1 0x2 /* Mailbox 1 Remote Frame Handling Enable */
2943#define RFH2 0x4 /* Mailbox 2 Remote Frame Handling Enable */
2944#define RFH3 0x8 /* Mailbox 3 Remote Frame Handling Enable */
2945#define RFH4 0x10 /* Mailbox 4 Remote Frame Handling Enable */
2946#define RFH5 0x20 /* Mailbox 5 Remote Frame Handling Enable */
2947#define RFH6 0x40 /* Mailbox 6 Remote Frame Handling Enable */
2948#define RFH7 0x80 /* Mailbox 7 Remote Frame Handling Enable */
2949#define RFH8 0x100 /* Mailbox 8 Remote Frame Handling Enable */
2950#define RFH9 0x200 /* Mailbox 9 Remote Frame Handling Enable */
2951#define RFH10 0x400 /* Mailbox 10 Remote Frame Handling Enable */
2952#define RFH11 0x800 /* Mailbox 11 Remote Frame Handling Enable */
2953#define RFH12 0x1000 /* Mailbox 12 Remote Frame Handling Enable */
2954#define RFH13 0x2000 /* Mailbox 13 Remote Frame Handling Enable */
2955#define RFH14 0x4000 /* Mailbox 14 Remote Frame Handling Enable */
2956#define RFH15 0x8000 /* Mailbox 15 Remote Frame Handling Enable */
2957
2958/* Bit masks for CAN0_RFH2 */
2959
2960#define RFH16 0x1 /* Mailbox 16 Remote Frame Handling Enable */
2961#define RFH17 0x2 /* Mailbox 17 Remote Frame Handling Enable */
2962#define RFH18 0x4 /* Mailbox 18 Remote Frame Handling Enable */
2963#define RFH19 0x8 /* Mailbox 19 Remote Frame Handling Enable */
2964#define RFH20 0x10 /* Mailbox 20 Remote Frame Handling Enable */
2965#define RFH21 0x20 /* Mailbox 21 Remote Frame Handling Enable */
2966#define RFH22 0x40 /* Mailbox 22 Remote Frame Handling Enable */
2967#define RFH23 0x80 /* Mailbox 23 Remote Frame Handling Enable */
2968#define RFH24 0x100 /* Mailbox 24 Remote Frame Handling Enable */
2969#define RFH25 0x200 /* Mailbox 25 Remote Frame Handling Enable */
2970#define RFH26 0x400 /* Mailbox 26 Remote Frame Handling Enable */
2971#define RFH27 0x800 /* Mailbox 27 Remote Frame Handling Enable */
2972#define RFH28 0x1000 /* Mailbox 28 Remote Frame Handling Enable */
2973#define RFH29 0x2000 /* Mailbox 29 Remote Frame Handling Enable */
2974#define RFH30 0x4000 /* Mailbox 30 Remote Frame Handling Enable */
2975#define RFH31 0x8000 /* Mailbox 31 Remote Frame Handling Enable */
2976
2977/* Bit masks for CAN0_MBIM1 */
2978
2979#define MBIM0 0x1 /* Mailbox 0 Mailbox Interrupt Mask */
2980#define MBIM1 0x2 /* Mailbox 1 Mailbox Interrupt Mask */
2981#define MBIM2 0x4 /* Mailbox 2 Mailbox Interrupt Mask */
2982#define MBIM3 0x8 /* Mailbox 3 Mailbox Interrupt Mask */
2983#define MBIM4 0x10 /* Mailbox 4 Mailbox Interrupt Mask */
2984#define MBIM5 0x20 /* Mailbox 5 Mailbox Interrupt Mask */
2985#define MBIM6 0x40 /* Mailbox 6 Mailbox Interrupt Mask */
2986#define MBIM7 0x80 /* Mailbox 7 Mailbox Interrupt Mask */
2987#define MBIM8 0x100 /* Mailbox 8 Mailbox Interrupt Mask */
2988#define MBIM9 0x200 /* Mailbox 9 Mailbox Interrupt Mask */
2989#define MBIM10 0x400 /* Mailbox 10 Mailbox Interrupt Mask */
2990#define MBIM11 0x800 /* Mailbox 11 Mailbox Interrupt Mask */
2991#define MBIM12 0x1000 /* Mailbox 12 Mailbox Interrupt Mask */
2992#define MBIM13 0x2000 /* Mailbox 13 Mailbox Interrupt Mask */
2993#define MBIM14 0x4000 /* Mailbox 14 Mailbox Interrupt Mask */
2994#define MBIM15 0x8000 /* Mailbox 15 Mailbox Interrupt Mask */
2995
2996/* Bit masks for CAN0_MBIM2 */
2997
2998#define MBIM16 0x1 /* Mailbox 16 Mailbox Interrupt Mask */
2999#define MBIM17 0x2 /* Mailbox 17 Mailbox Interrupt Mask */
3000#define MBIM18 0x4 /* Mailbox 18 Mailbox Interrupt Mask */
3001#define MBIM19 0x8 /* Mailbox 19 Mailbox Interrupt Mask */
3002#define MBIM20 0x10 /* Mailbox 20 Mailbox Interrupt Mask */
3003#define MBIM21 0x20 /* Mailbox 21 Mailbox Interrupt Mask */
3004#define MBIM22 0x40 /* Mailbox 22 Mailbox Interrupt Mask */
3005#define MBIM23 0x80 /* Mailbox 23 Mailbox Interrupt Mask */
3006#define MBIM24 0x100 /* Mailbox 24 Mailbox Interrupt Mask */
3007#define MBIM25 0x200 /* Mailbox 25 Mailbox Interrupt Mask */
3008#define MBIM26 0x400 /* Mailbox 26 Mailbox Interrupt Mask */
3009#define MBIM27 0x800 /* Mailbox 27 Mailbox Interrupt Mask */
3010#define MBIM28 0x1000 /* Mailbox 28 Mailbox Interrupt Mask */
3011#define MBIM29 0x2000 /* Mailbox 29 Mailbox Interrupt Mask */
3012#define MBIM30 0x4000 /* Mailbox 30 Mailbox Interrupt Mask */
3013#define MBIM31 0x8000 /* Mailbox 31 Mailbox Interrupt Mask */
3014
3015/* Bit masks for CAN0_MBTIF1 */
3016
3017#define MBTIF0 0x1 /* Mailbox 0 Mailbox Transmit Interrupt Flag */
3018#define MBTIF1 0x2 /* Mailbox 1 Mailbox Transmit Interrupt Flag */
3019#define MBTIF2 0x4 /* Mailbox 2 Mailbox Transmit Interrupt Flag */
3020#define MBTIF3 0x8 /* Mailbox 3 Mailbox Transmit Interrupt Flag */
3021#define MBTIF4 0x10 /* Mailbox 4 Mailbox Transmit Interrupt Flag */
3022#define MBTIF5 0x20 /* Mailbox 5 Mailbox Transmit Interrupt Flag */
3023#define MBTIF6 0x40 /* Mailbox 6 Mailbox Transmit Interrupt Flag */
3024#define MBTIF7 0x80 /* Mailbox 7 Mailbox Transmit Interrupt Flag */
3025#define MBTIF8 0x100 /* Mailbox 8 Mailbox Transmit Interrupt Flag */
3026#define MBTIF9 0x200 /* Mailbox 9 Mailbox Transmit Interrupt Flag */
3027#define MBTIF10 0x400 /* Mailbox 10 Mailbox Transmit Interrupt Flag */
3028#define MBTIF11 0x800 /* Mailbox 11 Mailbox Transmit Interrupt Flag */
3029#define MBTIF12 0x1000 /* Mailbox 12 Mailbox Transmit Interrupt Flag */
3030#define MBTIF13 0x2000 /* Mailbox 13 Mailbox Transmit Interrupt Flag */
3031#define MBTIF14 0x4000 /* Mailbox 14 Mailbox Transmit Interrupt Flag */
3032#define MBTIF15 0x8000 /* Mailbox 15 Mailbox Transmit Interrupt Flag */
3033
3034/* Bit masks for CAN0_MBTIF2 */
3035
3036#define MBTIF16 0x1 /* Mailbox 16 Mailbox Transmit Interrupt Flag */
3037#define MBTIF17 0x2 /* Mailbox 17 Mailbox Transmit Interrupt Flag */
3038#define MBTIF18 0x4 /* Mailbox 18 Mailbox Transmit Interrupt Flag */
3039#define MBTIF19 0x8 /* Mailbox 19 Mailbox Transmit Interrupt Flag */
3040#define MBTIF20 0x10 /* Mailbox 20 Mailbox Transmit Interrupt Flag */
3041#define MBTIF21 0x20 /* Mailbox 21 Mailbox Transmit Interrupt Flag */
3042#define MBTIF22 0x40 /* Mailbox 22 Mailbox Transmit Interrupt Flag */
3043#define MBTIF23 0x80 /* Mailbox 23 Mailbox Transmit Interrupt Flag */
3044#define MBTIF24 0x100 /* Mailbox 24 Mailbox Transmit Interrupt Flag */
3045#define MBTIF25 0x200 /* Mailbox 25 Mailbox Transmit Interrupt Flag */
3046#define MBTIF26 0x400 /* Mailbox 26 Mailbox Transmit Interrupt Flag */
3047#define MBTIF27 0x800 /* Mailbox 27 Mailbox Transmit Interrupt Flag */
3048#define MBTIF28 0x1000 /* Mailbox 28 Mailbox Transmit Interrupt Flag */
3049#define MBTIF29 0x2000 /* Mailbox 29 Mailbox Transmit Interrupt Flag */
3050#define MBTIF30 0x4000 /* Mailbox 30 Mailbox Transmit Interrupt Flag */
3051#define MBTIF31 0x8000 /* Mailbox 31 Mailbox Transmit Interrupt Flag */
3052
3053/* Bit masks for CAN0_MBRIF1 */
3054
3055#define MBRIF0 0x1 /* Mailbox 0 Mailbox Receive Interrupt Flag */
3056#define MBRIF1 0x2 /* Mailbox 1 Mailbox Receive Interrupt Flag */
3057#define MBRIF2 0x4 /* Mailbox 2 Mailbox Receive Interrupt Flag */
3058#define MBRIF3 0x8 /* Mailbox 3 Mailbox Receive Interrupt Flag */
3059#define MBRIF4 0x10 /* Mailbox 4 Mailbox Receive Interrupt Flag */
3060#define MBRIF5 0x20 /* Mailbox 5 Mailbox Receive Interrupt Flag */
3061#define MBRIF6 0x40 /* Mailbox 6 Mailbox Receive Interrupt Flag */
3062#define MBRIF7 0x80 /* Mailbox 7 Mailbox Receive Interrupt Flag */
3063#define MBRIF8 0x100 /* Mailbox 8 Mailbox Receive Interrupt Flag */
3064#define MBRIF9 0x200 /* Mailbox 9 Mailbox Receive Interrupt Flag */
3065#define MBRIF10 0x400 /* Mailbox 10 Mailbox Receive Interrupt Flag */
3066#define MBRIF11 0x800 /* Mailbox 11 Mailbox Receive Interrupt Flag */
3067#define MBRIF12 0x1000 /* Mailbox 12 Mailbox Receive Interrupt Flag */
3068#define MBRIF13 0x2000 /* Mailbox 13 Mailbox Receive Interrupt Flag */
3069#define MBRIF14 0x4000 /* Mailbox 14 Mailbox Receive Interrupt Flag */
3070#define MBRIF15 0x8000 /* Mailbox 15 Mailbox Receive Interrupt Flag */
3071
3072/* Bit masks for CAN0_MBRIF2 */
3073
3074#define MBRIF16 0x1 /* Mailbox 16 Mailbox Receive Interrupt Flag */
3075#define MBRIF17 0x2 /* Mailbox 17 Mailbox Receive Interrupt Flag */
3076#define MBRIF18 0x4 /* Mailbox 18 Mailbox Receive Interrupt Flag */
3077#define MBRIF19 0x8 /* Mailbox 19 Mailbox Receive Interrupt Flag */
3078#define MBRIF20 0x10 /* Mailbox 20 Mailbox Receive Interrupt Flag */
3079#define MBRIF21 0x20 /* Mailbox 21 Mailbox Receive Interrupt Flag */
3080#define MBRIF22 0x40 /* Mailbox 22 Mailbox Receive Interrupt Flag */
3081#define MBRIF23 0x80 /* Mailbox 23 Mailbox Receive Interrupt Flag */
3082#define MBRIF24 0x100 /* Mailbox 24 Mailbox Receive Interrupt Flag */
3083#define MBRIF25 0x200 /* Mailbox 25 Mailbox Receive Interrupt Flag */
3084#define MBRIF26 0x400 /* Mailbox 26 Mailbox Receive Interrupt Flag */
3085#define MBRIF27 0x800 /* Mailbox 27 Mailbox Receive Interrupt Flag */
3086#define MBRIF28 0x1000 /* Mailbox 28 Mailbox Receive Interrupt Flag */
3087#define MBRIF29 0x2000 /* Mailbox 29 Mailbox Receive Interrupt Flag */
3088#define MBRIF30 0x4000 /* Mailbox 30 Mailbox Receive Interrupt Flag */
3089#define MBRIF31 0x8000 /* Mailbox 31 Mailbox Receive Interrupt Flag */
3090
3091/* Bit masks for EPPIx_STATUS */
3092
3093#define CFIFO_ERR 0x1 /* Chroma FIFO Error */
3094#define YFIFO_ERR 0x2 /* Luma FIFO Error */
3095#define LTERR_OVR 0x4 /* Line Track Overflow */
3096#define LTERR_UNDR 0x8 /* Line Track Underflow */
3097#define FTERR_OVR 0x10 /* Frame Track Overflow */
3098#define FTERR_UNDR 0x20 /* Frame Track Underflow */
3099#define ERR_NCOR 0x40 /* Preamble Error Not Corrected */
3100#define DMA1URQ 0x80 /* DMA1 Urgent Request */
3101#define DMA0URQ 0x100 /* DMA0 Urgent Request */
3102#define ERR_DET 0x4000 /* Preamble Error Detected */
3103#define FLD 0x8000 /* Field */
3104
3105/* Bit masks for EPPIx_CONTROL */
3106
3107#define EPPI_EN 0x1 /* Enable */
3108#define EPPI_DIR 0x2 /* Direction */
3109#define XFR_TYPE 0xc /* Operating Mode */
3110#define FS_CFG 0x30 /* Frame Sync Configuration */
3111#define FLD_SEL 0x40 /* Field Select/Trigger */
3112#define ITU_TYPE 0x80 /* ITU Interlaced or Progressive */
3113#define BLANKGEN 0x100 /* ITU Output Mode with Internal Blanking Generation */
3114#define ICLKGEN 0x200 /* Internal Clock Generation */
3115#define IFSGEN 0x400 /* Internal Frame Sync Generation */
3116#define POLC 0x1800 /* Frame Sync and Data Driving/Sampling Edges */
3117#define POLS 0x6000 /* Frame Sync Polarity */
3118#define DLENGTH 0x38000 /* Data Length */
3119#define SKIP_EN 0x40000 /* Skip Enable */
3120#define SKIP_EO 0x80000 /* Skip Even or Odd */
3121#define PACKEN 0x100000 /* Packing/Unpacking Enable */
3122#define SWAPEN 0x200000 /* Swap Enable */
3123#define SIGN_EXT 0x400000 /* Sign Extension or Zero-filled / Data Split Format */
3124#define SPLT_EVEN_ODD 0x800000 /* Split Even and Odd Data Samples */
3125#define SUBSPLT_ODD 0x1000000 /* Sub-split Odd Samples */
3126#define DMACFG 0x2000000 /* One or Two DMA Channels Mode */
3127#define RGB_FMT_EN 0x4000000 /* RGB Formatting Enable */
3128#define FIFO_RWM 0x18000000 /* FIFO Regular Watermarks */
3129#define FIFO_UWM 0x60000000 /* FIFO Urgent Watermarks */
3130
3131#define DLEN_8 (0 << 15) /* 000 - 8 bits */
3132#define DLEN_10 (1 << 15) /* 001 - 10 bits */
3133#define DLEN_12 (2 << 15) /* 010 - 12 bits */
3134#define DLEN_14 (3 << 15) /* 011 - 14 bits */
3135#define DLEN_16 (4 << 15) /* 100 - 16 bits */
3136#define DLEN_18 (5 << 15) /* 101 - 18 bits */
3137#define DLEN_24 (6 << 15) /* 110 - 24 bits */
3138
3139
3140/* Bit masks for EPPIx_FS2W_LVB */
3141
3142#define F1VB_BD 0xff /* Vertical Blanking before Field 1 Active Data */
3143#define F1VB_AD 0xff00 /* Vertical Blanking after Field 1 Active Data */
3144#define F2VB_BD 0xff0000 /* Vertical Blanking before Field 2 Active Data */
3145#define F2VB_AD 0xff000000 /* Vertical Blanking after Field 2 Active Data */
3146
3147/* Bit masks for EPPIx_FS2W_LAVF */
3148
3149#define F1_ACT 0xffff /* Number of Lines of Active Data in Field 1 */
3150#define F2_ACT 0xffff0000 /* Number of Lines of Active Data in Field 2 */
3151
3152/* Bit masks for EPPIx_CLIP */
3153
3154#define LOW_ODD 0xff /* Lower Limit for Odd Bytes (Chroma) */
3155#define HIGH_ODD 0xff00 /* Upper Limit for Odd Bytes (Chroma) */
3156#define LOW_EVEN 0xff0000 /* Lower Limit for Even Bytes (Luma) */
3157#define HIGH_EVEN 0xff000000 /* Upper Limit for Even Bytes (Luma) */
3158
3159/* Bit masks for SPIx_BAUD */
3160
3161#define SPI_BAUD 0xffff /* Baud Rate */
3162
3163/* Bit masks for SPIx_CTL */
3164
3165#define SPE 0x4000 /* SPI Enable */
3166#define WOM 0x2000 /* Write Open Drain Master */
3167#define MSTR 0x1000 /* Master Mode */
3168#define CPOL 0x800 /* Clock Polarity */
3169#define CPHA 0x400 /* Clock Phase */
3170#define LSBF 0x200 /* LSB First */
3171#define SIZE 0x100 /* Size of Words */
3172#define EMISO 0x20 /* Enable MISO Output */
3173#define PSSE 0x10 /* Slave-Select Enable */
3174#define GM 0x8 /* Get More Data */
3175#define SZ 0x4 /* Send Zero */
3176#define TIMOD 0x3 /* Transfer Initiation Mode */
3177
3178/* Bit masks for SPIx_FLG */
3179
3180#define FLS1 0x2 /* Slave Select Enable 1 */
3181#define FLS2 0x4 /* Slave Select Enable 2 */
3182#define FLS3 0x8 /* Slave Select Enable 3 */
3183#define FLG1 0x200 /* Slave Select Value 1 */
3184#define FLG2 0x400 /* Slave Select Value 2 */
3185#define FLG3 0x800 /* Slave Select Value 3 */
3186
3187/* Bit masks for SPIx_STAT */
3188
3189#define TXCOL 0x40 /* Transmit Collision Error */
3190#define RXS 0x20 /* RDBR Data Buffer Status */
3191#define RBSY 0x10 /* Receive Error */
3192#define TXS 0x8 /* TDBR Data Buffer Status */
3193#define TXE 0x4 /* Transmission Error */
3194#define MODF 0x2 /* Mode Fault Error */
3195#define SPIF 0x1 /* SPI Finished */
3196
3197/* Bit masks for SPIx_TDBR */
3198
3199#define TDBR 0xffff /* Transmit Data Buffer */
3200
3201/* Bit masks for SPIx_RDBR */
3202
3203#define RDBR 0xffff /* Receive Data Buffer */
3204
3205/* Bit masks for SPIx_SHADOW */
3206
3207#define SHADOW 0xffff /* RDBR Shadow */
3208
3209/* ************************************************ */
3210/* The TWI bit masks fields are from the ADSP-BF538 */
3211/* and they have not been verified as the final */
3212/* ones for the Moab processors ... bz 1/19/2007 */
3213/* ************************************************ */
3214
3215/* Bit masks for TWIx_CONTROL */
3216
3217#define PRESCALE 0x7f /* Prescale Value */
3218#define TWI_ENA 0x80 /* TWI Enable */
3219#define SCCB 0x200 /* Serial Camera Control Bus */
3220
3221/* Bit maskes for TWIx_CLKDIV */
3222
3223#define CLKLOW 0xff /* Clock Low */
3224#define CLKHI 0xff00 /* Clock High */
3225
3226/* Bit maskes for TWIx_SLAVE_CTL */
3227
3228#define SEN 0x1 /* Slave Enable */
3229#define STDVAL 0x4 /* Slave Transmit Data Valid */
3230#define NAK 0x8 /* Not Acknowledge */
3231#define GEN 0x10 /* General Call Enable */
3232
3233/* Bit maskes for TWIx_SLAVE_ADDR */
3234
3235#define SADDR 0x7f /* Slave Mode Address */
3236
3237/* Bit maskes for TWIx_SLAVE_STAT */
3238
3239#define SDIR 0x1 /* Slave Transfer Direction */
3240#define GCALL 0x2 /* General Call */
3241
3242/* Bit maskes for TWIx_MASTER_CTL */
3243
3244#define MEN 0x1 /* Master Mode Enable */
3245#define MDIR 0x4 /* Master Transfer Direction */
3246#define FAST 0x8 /* Fast Mode */
3247#define STOP 0x10 /* Issue Stop Condition */
3248#define RSTART 0x20 /* Repeat Start */
3249#define DCNT 0x3fc0 /* Data Transfer Count */
3250#define SDAOVR 0x4000 /* Serial Data Override */
3251#define SCLOVR 0x8000 /* Serial Clock Override */
3252
3253/* Bit maskes for TWIx_MASTER_ADDR */
3254
3255#define MADDR 0x7f /* Master Mode Address */
3256
3257/* Bit maskes for TWIx_MASTER_STAT */
3258
3259#define MPROG 0x1 /* Master Transfer in Progress */
3260#define LOSTARB 0x2 /* Lost Arbitration */
3261#define ANAK 0x4 /* Address Not Acknowledged */
3262#define DNAK 0x8 /* Data Not Acknowledged */
3263#define BUFRDERR 0x10 /* Buffer Read Error */
3264#define BUFWRERR 0x20 /* Buffer Write Error */
3265#define SDASEN 0x40 /* Serial Data Sense */
3266#define SCLSEN 0x80 /* Serial Clock Sense */
3267#define BUSBUSY 0x100 /* Bus Busy */
3268
3269/* Bit maskes for TWIx_FIFO_CTL */
3270
3271#define XMTFLUSH 0x1 /* Transmit Buffer Flush */
3272#define RCVFLUSH 0x2 /* Receive Buffer Flush */
3273#define XMTINTLEN 0x4 /* Transmit Buffer Interrupt Length */
3274#define RCVINTLEN 0x8 /* Receive Buffer Interrupt Length */
3275
3276/* Bit maskes for TWIx_FIFO_STAT */
3277
3278#define XMTSTAT 0x3 /* Transmit FIFO Status */
3279#define RCVSTAT 0xc /* Receive FIFO Status */
3280
3281/* Bit maskes for TWIx_INT_MASK */
3282
3283#define SINITM 0x1 /* Slave Transfer Initiated Interrupt Mask */
3284#define SCOMPM 0x2 /* Slave Transfer Complete Interrupt Mask */
3285#define SERRM 0x4 /* Slave Transfer Error Interrupt Mask */
3286#define SOVFM 0x8 /* Slave Overflow Interrupt Mask */
3287#define MCOMPM 0x10 /* Master Transfer Complete Interrupt Mask */
3288#define MERRM 0x20 /* Master Transfer Error Interrupt Mask */
3289#define XMTSERVM 0x40 /* Transmit FIFO Service Interrupt Mask */
3290#define RCVSERVM 0x80 /* Receive FIFO Service Interrupt Mask */
3291
3292/* Bit maskes for TWIx_INT_STAT */
3293
3294#define SINIT 0x1 /* Slave Transfer Initiated */
3295#define SCOMP 0x2 /* Slave Transfer Complete */
3296#define SERR 0x4 /* Slave Transfer Error */
3297#define SOVF 0x8 /* Slave Overflow */
3298#define MCOMP 0x10 /* Master Transfer Complete */
3299#define MERR 0x20 /* Master Transfer Error */
3300#define XMTSERV 0x40 /* Transmit FIFO Service */
3301#define RCVSERV 0x80 /* Receive FIFO Service */
3302
3303/* Bit maskes for TWIx_XMT_DATA8 */
3304
3305#define XMTDATA8 0xff /* Transmit FIFO 8-Bit Data */
3306
3307/* Bit maskes for TWIx_XMT_DATA16 */
3308
3309#define XMTDATA16 0xffff /* Transmit FIFO 16-Bit Data */
3310
3311/* Bit maskes for TWIx_RCV_DATA8 */
3312
3313#define RCVDATA8 0xff /* Receive FIFO 8-Bit Data */
3314
3315/* Bit maskes for TWIx_RCV_DATA16 */
3316
3317#define RCVDATA16 0xffff /* Receive FIFO 16-Bit Data */
3318
3319/* Bit masks for SPORTx_TCR1 */
3320
3321#define TCKFE 0x4000 /* Clock Falling Edge Select */
3322#define LATFS 0x2000 /* Late Transmit Frame Sync */
3323#define LTFS 0x1000 /* Low Transmit Frame Sync Select */
3324#define DITFS 0x800 /* Data-Independent Transmit Frame Sync Select */
3325#define TFSR 0x400 /* Transmit Frame Sync Required Select */
3326#define ITFS 0x200 /* Internal Transmit Frame Sync Select */
3327#define TLSBIT 0x10 /* Transmit Bit Order */
3328#define TDTYPE 0xc /* Data Formatting Type Select */
3329#define ITCLK 0x2 /* Internal Transmit Clock Select */
3330#define TSPEN 0x1 /* Transmit Enable */
3331
3332/* Bit masks for SPORTx_TCR2 */
3333
3334#define TRFST 0x400 /* Left/Right Order */
3335#define TSFSE 0x200 /* Transmit Stereo Frame Sync Enable */
3336#define TXSE 0x100 /* TxSEC Enable */
3337#define SLEN_T 0x1f /* SPORT Word Length */
3338
3339/* Bit masks for SPORTx_RCR1 */
3340
3341#define RCKFE 0x4000 /* Clock Falling Edge Select */
3342#define LARFS 0x2000 /* Late Receive Frame Sync */
3343#define LRFS 0x1000 /* Low Receive Frame Sync Select */
3344#define RFSR 0x400 /* Receive Frame Sync Required Select */
3345#define IRFS 0x200 /* Internal Receive Frame Sync Select */
3346#define RLSBIT 0x10 /* Receive Bit Order */
3347#define RDTYPE 0xc /* Data Formatting Type Select */
3348#define IRCLK 0x2 /* Internal Receive Clock Select */
3349#define RSPEN 0x1 /* Receive Enable */
3350
3351/* Bit masks for SPORTx_RCR2 */
3352
3353#define RRFST 0x400 /* Left/Right Order */
3354#define RSFSE 0x200 /* Receive Stereo Frame Sync Enable */
3355#define RXSE 0x100 /* RxSEC Enable */
3356#define SLEN_R 0x1f /* SPORT Word Length */
3357
3358/* Bit masks for SPORTx_STAT */
3359
3360#define TXHRE 0x40 /* Transmit Hold Register Empty */
3361#define TOVF 0x20 /* Sticky Transmit Overflow Status */
3362#define TUVF 0x10 /* Sticky Transmit Underflow Status */
3363#define TXF 0x8 /* Transmit FIFO Full Status */
3364#define ROVF 0x4 /* Sticky Receive Overflow Status */
3365#define RUVF 0x2 /* Sticky Receive Underflow Status */
3366#define RXNE 0x1 /* Receive FIFO Not Empty Status */
3367
3368/* Bit masks for SPORTx_MCMC1 */
3369
3370#define SP_WSIZE 0xf000 /* Window Size */
3371#define SP_WOFF 0x3ff /* Windows Offset */
3372
3373/* Bit masks for SPORTx_MCMC2 */
3374
3375#define MFD 0xf000 /* Multi channel Frame Delay */
3376#define FSDR 0x80 /* Frame Sync to Data Relationship */
3377#define MCMEN 0x10 /* Multi channel Frame Mode Enable */
3378#define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */
3379#define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */
3380#define MCCRM 0x3 /* 2X Clock Recovery Mode */
3381
3382/* Bit masks for SPORTx_CHNL */
3383
3384#define CUR_CHNL 0x3ff /* Current Channel Indicator */
3385
3386/* Bit masks for UARTx_LCR */
3387
3388#if 0
3389/* conflicts with legacy one in last section */
3390#define WLS 0x3 /* Word Length Select */
3391#endif
3392#define STB 0x4 /* Stop Bits */
3393#define PEN 0x8 /* Parity Enable */
3394#define EPS 0x10 /* Even Parity Select */
3395#define STP 0x20 /* Sticky Parity */
3396#define SB 0x40 /* Set Break */
3397
3398/* Bit masks for UARTx_MCR */
3399
3400#define XOFF 0x1 /* Transmitter Off */
3401#define MRTS 0x2 /* Manual Request To Send */
3402#define RFIT 0x4 /* Receive FIFO IRQ Threshold */
3403#define RFRT 0x8 /* Receive FIFO RTS Threshold */
3404#define LOOP_ENA 0x10 /* Loopback Mode Enable */
3405#define FCPOL 0x20 /* Flow Control Pin Polarity */
3406#define ARTS 0x40 /* Automatic Request To Send */
3407#define ACTS 0x80 /* Automatic Clear To Send */
3408
3409/* Bit masks for UARTx_LSR */
3410
3411#define DR 0x1 /* Data Ready */
3412#define OE 0x2 /* Overrun Error */
3413#define PE 0x4 /* Parity Error */
3414#define FE 0x8 /* Framing Error */
3415#define BI 0x10 /* Break Interrupt */
3416#define THRE 0x20 /* THR Empty */
3417#define TEMT 0x40 /* Transmitter Empty */
3418#define TFI 0x80 /* Transmission Finished Indicator */
3419
3420/* Bit masks for UARTx_MSR */
3421
3422#define SCTS 0x1 /* Sticky CTS */
3423#define CTS 0x10 /* Clear To Send */
3424#define RFCS 0x20 /* Receive FIFO Count Status */
3425
3426/* Bit masks for UARTx_IER_SET & UARTx_IER_CLEAR */
3427
3428#define ERBFI 0x1 /* Enable Receive Buffer Full Interrupt */
3429#define ETBEI 0x2 /* Enable Transmit Buffer Empty Interrupt */
3430#define ELSI 0x4 /* Enable Receive Status Interrupt */
3431#define EDSSI 0x8 /* Enable Modem Status Interrupt */
3432#define EDTPTI 0x10 /* Enable DMA Transmit PIRQ Interrupt */
3433#define ETFI 0x20 /* Enable Transmission Finished Interrupt */
3434#define ERFCI 0x40 /* Enable Receive FIFO Count Interrupt */
3435
3436/* Bit masks for UARTx_GCTL */
3437
3438#define UCEN 0x1 /* UART Enable */
3439#define IREN 0x2 /* IrDA Mode Enable */
3440#define TPOLC 0x4 /* IrDA TX Polarity Change */
3441#define RPOLC 0x8 /* IrDA RX Polarity Change */
3442#define FPE 0x10 /* Force Parity Error */
3443#define FFE 0x20 /* Force Framing Error */
3444#define EDBO 0x40 /* Enable Divide-by-One */
3445#define EGLSI 0x80 /* Enable Global LS Interrupt */
3446
3447
3448/* ******************************************* */
3449/* MULTI BIT MACRO ENUMERATIONS */
3450/* ******************************************* */
3451
3452/* BCODE bit field options (SYSCFG register) */
3453
3454#define BCODE_WAKEUP 0x0000 /* boot according to wake-up condition */
3455#define BCODE_FULLBOOT 0x0010 /* always perform full boot */
3456#define BCODE_QUICKBOOT 0x0020 /* always perform quick boot */
3457#define BCODE_NOBOOT 0x0030 /* always perform full boot */
3458
3459/* CNT_COMMAND bit field options */
3460
3461#define W1LCNT_ZERO 0x0001 /* write 1 to load CNT_COUNTER with zero */
3462#define W1LCNT_MIN 0x0004 /* write 1 to load CNT_COUNTER from CNT_MIN */
3463#define W1LCNT_MAX 0x0008 /* write 1 to load CNT_COUNTER from CNT_MAX */
3464
3465#define W1LMIN_ZERO 0x0010 /* write 1 to load CNT_MIN with zero */
3466#define W1LMIN_CNT 0x0020 /* write 1 to load CNT_MIN from CNT_COUNTER */
3467#define W1LMIN_MAX 0x0080 /* write 1 to load CNT_MIN from CNT_MAX */
3468
3469#define W1LMAX_ZERO 0x0100 /* write 1 to load CNT_MAX with zero */
3470#define W1LMAX_CNT 0x0200 /* write 1 to load CNT_MAX from CNT_COUNTER */
3471#define W1LMAX_MIN 0x0400 /* write 1 to load CNT_MAX from CNT_MIN */
3472
3473/* CNT_CONFIG bit field options */
3474
3475#define CNTMODE_QUADENC 0x0000 /* quadrature encoder mode */
3476#define CNTMODE_BINENC 0x0100 /* binary encoder mode */
3477#define CNTMODE_UDCNT 0x0200 /* up/down counter mode */
3478#define CNTMODE_DIRCNT 0x0400 /* direction counter mode */
3479#define CNTMODE_DIRTMR 0x0500 /* direction timer mode */
3480
3481#define BNDMODE_COMP 0x0000 /* boundary compare mode */
3482#define BNDMODE_ZERO 0x1000 /* boundary compare and zero mode */
3483#define BNDMODE_CAPT 0x2000 /* boundary capture mode */
3484#define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */
3485
3486/* TMODE in TIMERx_CONFIG bit field options */
3487
3488#define PWM_OUT 0x0001
3489#define WDTH_CAP 0x0002
3490#define EXT_CLK 0x0003
3491
3492/* UARTx_LCR bit field options */
3493
3494#define WLS_5 0x0000 /* 5 data bits */
3495#define WLS_6 0x0001 /* 6 data bits */
3496#define WLS_7 0x0002 /* 7 data bits */
3497#define WLS_8 0x0003 /* 8 data bits */
3498
3499/* PINTx Register Bit Definitions */
3500
3501#define PIQ0 0x00000001
3502#define PIQ1 0x00000002
3503#define PIQ2 0x00000004
3504#define PIQ3 0x00000008
3505
3506#define PIQ4 0x00000010
3507#define PIQ5 0x00000020
3508#define PIQ6 0x00000040
3509#define PIQ7 0x00000080
3510
3511#define PIQ8 0x00000100
3512#define PIQ9 0x00000200
3513#define PIQ10 0x00000400
3514#define PIQ11 0x00000800
3515
3516#define PIQ12 0x00001000
3517#define PIQ13 0x00002000
3518#define PIQ14 0x00004000
3519#define PIQ15 0x00008000
3520
3521#define PIQ16 0x00010000
3522#define PIQ17 0x00020000
3523#define PIQ18 0x00040000
3524#define PIQ19 0x00080000
3525
3526#define PIQ20 0x00100000
3527#define PIQ21 0x00200000
3528#define PIQ22 0x00400000
3529#define PIQ23 0x00800000
3530
3531#define PIQ24 0x01000000
3532#define PIQ25 0x02000000
3533#define PIQ26 0x04000000
3534#define PIQ27 0x08000000
3535
3536#define PIQ28 0x10000000
3537#define PIQ29 0x20000000
3538#define PIQ30 0x40000000
3539#define PIQ31 0x80000000
3540
3541/* PORT A Bit Definitions for the registers
3542PORTA, PORTA_SET, PORTA_CLEAR,
3543PORTA_DIR_SET, PORTA_DIR_CLEAR, PORTA_INEN,
3544PORTA_FER registers
3545*/
3546
3547#define PA0 0x0001
3548#define PA1 0x0002
3549#define PA2 0x0004
3550#define PA3 0x0008
3551#define PA4 0x0010
3552#define PA5 0x0020
3553#define PA6 0x0040
3554#define PA7 0x0080
3555#define PA8 0x0100
3556#define PA9 0x0200
3557#define PA10 0x0400
3558#define PA11 0x0800
3559#define PA12 0x1000
3560#define PA13 0x2000
3561#define PA14 0x4000
3562#define PA15 0x8000
3563
3564/* PORT B Bit Definitions for the registers
3565PORTB, PORTB_SET, PORTB_CLEAR,
3566PORTB_DIR_SET, PORTB_DIR_CLEAR, PORTB_INEN,
3567PORTB_FER registers
3568*/
3569
3570#define PB0 0x0001
3571#define PB1 0x0002
3572#define PB2 0x0004
3573#define PB3 0x0008
3574#define PB4 0x0010
3575#define PB5 0x0020
3576#define PB6 0x0040
3577#define PB7 0x0080
3578#define PB8 0x0100
3579#define PB9 0x0200
3580#define PB10 0x0400
3581#define PB11 0x0800
3582#define PB12 0x1000
3583#define PB13 0x2000
3584#define PB14 0x4000
3585
3586
3587/* PORT C Bit Definitions for the registers
3588PORTC, PORTC_SET, PORTC_CLEAR,
3589PORTC_DIR_SET, PORTC_DIR_CLEAR, PORTC_INEN,
3590PORTC_FER registers
3591*/
3592
3593
3594#define PC0 0x0001
3595#define PC1 0x0002
3596#define PC2 0x0004
3597#define PC3 0x0008
3598#define PC4 0x0010
3599#define PC5 0x0020
3600#define PC6 0x0040
3601#define PC7 0x0080
3602#define PC8 0x0100
3603#define PC9 0x0200
3604#define PC10 0x0400
3605#define PC11 0x0800
3606#define PC12 0x1000
3607#define PC13 0x2000
3608
3609
3610/* PORT D Bit Definitions for the registers
3611PORTD, PORTD_SET, PORTD_CLEAR,
3612PORTD_DIR_SET, PORTD_DIR_CLEAR, PORTD_INEN,
3613PORTD_FER registers
3614*/
3615
3616#define PD0 0x0001
3617#define PD1 0x0002
3618#define PD2 0x0004
3619#define PD3 0x0008
3620#define PD4 0x0010
3621#define PD5 0x0020
3622#define PD6 0x0040
3623#define PD7 0x0080
3624#define PD8 0x0100
3625#define PD9 0x0200
3626#define PD10 0x0400
3627#define PD11 0x0800
3628#define PD12 0x1000
3629#define PD13 0x2000
3630#define PD14 0x4000
3631#define PD15 0x8000
3632
3633/* PORT E Bit Definitions for the registers
3634PORTE, PORTE_SET, PORTE_CLEAR,
3635PORTE_DIR_SET, PORTE_DIR_CLEAR, PORTE_INEN,
3636PORTE_FER registers
3637*/
3638
3639
3640#define PE0 0x0001
3641#define PE1 0x0002
3642#define PE2 0x0004
3643#define PE3 0x0008
3644#define PE4 0x0010
3645#define PE5 0x0020
3646#define PE6 0x0040
3647#define PE7 0x0080
3648#define PE8 0x0100
3649#define PE9 0x0200
3650#define PE10 0x0400
3651#define PE11 0x0800
3652#define PE12 0x1000
3653#define PE13 0x2000
3654#define PE14 0x4000
3655#define PE15 0x8000
3656
3657/* PORT F Bit Definitions for the registers
3658PORTF, PORTF_SET, PORTF_CLEAR,
3659PORTF_DIR_SET, PORTF_DIR_CLEAR, PORTF_INEN,
3660PORTF_FER registers
3661*/
3662
3663
3664#define PF0 0x0001
3665#define PF1 0x0002
3666#define PF2 0x0004
3667#define PF3 0x0008
3668#define PF4 0x0010
3669#define PF5 0x0020
3670#define PF6 0x0040
3671#define PF7 0x0080
3672#define PF8 0x0100
3673#define PF9 0x0200
3674#define PF10 0x0400
3675#define PF11 0x0800
3676#define PF12 0x1000
3677#define PF13 0x2000
3678#define PF14 0x4000
3679#define PF15 0x8000
3680
3681/* PORT G Bit Definitions for the registers
3682PORTG, PORTG_SET, PORTG_CLEAR,
3683PORTG_DIR_SET, PORTG_DIR_CLEAR, PORTG_INEN,
3684PORTG_FER registers
3685*/
3686
3687
3688#define PG0 0x0001
3689#define PG1 0x0002
3690#define PG2 0x0004
3691#define PG3 0x0008
3692#define PG4 0x0010
3693#define PG5 0x0020
3694#define PG6 0x0040
3695#define PG7 0x0080
3696#define PG8 0x0100
3697#define PG9 0x0200
3698#define PG10 0x0400
3699#define PG11 0x0800
3700#define PG12 0x1000
3701#define PG13 0x2000
3702#define PG14 0x4000
3703#define PG15 0x8000
3704
3705/* PORT H Bit Definitions for the registers
3706PORTH, PORTH_SET, PORTH_CLEAR,
3707PORTH_DIR_SET, PORTH_DIR_CLEAR, PORTH_INEN,
3708PORTH_FER registers
3709*/
3710
3711
3712#define PH0 0x0001
3713#define PH1 0x0002
3714#define PH2 0x0004
3715#define PH3 0x0008
3716#define PH4 0x0010
3717#define PH5 0x0020
3718#define PH6 0x0040
3719#define PH7 0x0080
3720#define PH8 0x0100
3721#define PH9 0x0200
3722#define PH10 0x0400
3723#define PH11 0x0800
3724#define PH12 0x1000
3725#define PH13 0x2000
3726
3727
3728/* PORT I Bit Definitions for the registers
3729PORTI, PORTI_SET, PORTI_CLEAR,
3730PORTI_DIR_SET, PORTI_DIR_CLEAR, PORTI_INEN,
3731PORTI_FER registers
3732*/
3733
3734
3735#define PI0 0x0001
3736#define PI1 0x0002
3737#define PI2 0x0004
3738#define PI3 0x0008
3739#define PI4 0x0010
3740#define PI5 0x0020
3741#define PI6 0x0040
3742#define PI7 0x0080
3743#define PI8 0x0100
3744#define PI9 0x0200
3745#define PI10 0x0400
3746#define PI11 0x0800
3747#define PI12 0x1000
3748#define PI13 0x2000
3749#define PI14 0x4000
3750#define PI15 0x8000
3751
3752/* PORT J Bit Definitions for the registers
3753PORTJ, PORTJ_SET, PORTJ_CLEAR,
3754PORTJ_DIR_SET, PORTJ_DIR_CLEAR, PORTJ_INEN,
3755PORTJ_FER registers
3756*/
3757
3758
3759#define PJ0 0x0001
3760#define PJ1 0x0002
3761#define PJ2 0x0004
3762#define PJ3 0x0008
3763#define PJ4 0x0010
3764#define PJ5 0x0020
3765#define PJ6 0x0040
3766#define PJ7 0x0080
3767#define PJ8 0x0100
3768#define PJ9 0x0200
3769#define PJ10 0x0400
3770#define PJ11 0x0800
3771#define PJ12 0x1000
3772#define PJ13 0x2000
3773
3774
3775/* Port Muxing Bit Fields for PORTx_MUX Registers */
3776
3777#define MUX0 0x00000003
3778#define MUX0_0 0x00000000
3779#define MUX0_1 0x00000001
3780#define MUX0_2 0x00000002
3781#define MUX0_3 0x00000003
3782
3783#define MUX1 0x0000000C
3784#define MUX1_0 0x00000000
3785#define MUX1_1 0x00000004
3786#define MUX1_2 0x00000008
3787#define MUX1_3 0x0000000C
3788
3789#define MUX2 0x00000030
3790#define MUX2_0 0x00000000
3791#define MUX2_1 0x00000010
3792#define MUX2_2 0x00000020
3793#define MUX2_3 0x00000030
3794
3795#define MUX3 0x000000C0
3796#define MUX3_0 0x00000000
3797#define MUX3_1 0x00000040
3798#define MUX3_2 0x00000080
3799#define MUX3_3 0x000000C0
3800
3801#define MUX4 0x00000300
3802#define MUX4_0 0x00000000
3803#define MUX4_1 0x00000100
3804#define MUX4_2 0x00000200
3805#define MUX4_3 0x00000300
3806
3807#define MUX5 0x00000C00
3808#define MUX5_0 0x00000000
3809#define MUX5_1 0x00000400
3810#define MUX5_2 0x00000800
3811#define MUX5_3 0x00000C00
3812
3813#define MUX6 0x00003000
3814#define MUX6_0 0x00000000
3815#define MUX6_1 0x00001000
3816#define MUX6_2 0x00002000
3817#define MUX6_3 0x00003000
3818
3819#define MUX7 0x0000C000
3820#define MUX7_0 0x00000000
3821#define MUX7_1 0x00004000
3822#define MUX7_2 0x00008000
3823#define MUX7_3 0x0000C000
3824
3825#define MUX8 0x00030000
3826#define MUX8_0 0x00000000
3827#define MUX8_1 0x00010000
3828#define MUX8_2 0x00020000
3829#define MUX8_3 0x00030000
3830
3831#define MUX9 0x000C0000
3832#define MUX9_0 0x00000000
3833#define MUX9_1 0x00040000
3834#define MUX9_2 0x00080000
3835#define MUX9_3 0x000C0000
3836
3837#define MUX10 0x00300000
3838#define MUX10_0 0x00000000
3839#define MUX10_1 0x00100000
3840#define MUX10_2 0x00200000
3841#define MUX10_3 0x00300000
3842
3843#define MUX11 0x00C00000
3844#define MUX11_0 0x00000000
3845#define MUX11_1 0x00400000
3846#define MUX11_2 0x00800000
3847#define MUX11_3 0x00C00000
3848
3849#define MUX12 0x03000000
3850#define MUX12_0 0x00000000
3851#define MUX12_1 0x01000000
3852#define MUX12_2 0x02000000
3853#define MUX12_3 0x03000000
3854
3855#define MUX13 0x0C000000
3856#define MUX13_0 0x00000000
3857#define MUX13_1 0x04000000
3858#define MUX13_2 0x08000000
3859#define MUX13_3 0x0C000000
3860
3861#define MUX14 0x30000000
3862#define MUX14_0 0x00000000
3863#define MUX14_1 0x10000000
3864#define MUX14_2 0x20000000
3865#define MUX14_3 0x30000000
3866
3867#define MUX15 0xC0000000
3868#define MUX15_0 0x00000000
3869#define MUX15_1 0x40000000
3870#define MUX15_2 0x80000000
3871#define MUX15_3 0xC0000000
3872
3873#define MUX(b15,b14,b13,b12,b11,b10,b9,b8,b7,b6,b5,b4,b3,b2,b1,b0) \
3874 ((((b15)&3) << 30) | \
3875 (((b14)&3) << 28) | \
3876 (((b13)&3) << 26) | \
3877 (((b12)&3) << 24) | \
3878 (((b11)&3) << 22) | \
3879 (((b10)&3) << 20) | \
3880 (((b9) &3) << 18) | \
3881 (((b8) &3) << 16) | \
3882 (((b7) &3) << 14) | \
3883 (((b6) &3) << 12) | \
3884 (((b5) &3) << 10) | \
3885 (((b4) &3) << 8) | \
3886 (((b3) &3) << 6) | \
3887 (((b2) &3) << 4) | \
3888 (((b1) &3) << 2) | \
3889 (((b0) &3)))
3890
3891/* Bit fields for PINT0_ASSIGN and PINT1_ASSIGN registers */
3892
3893#define B0MAP 0x000000FF /* Byte 0 Lower Half Port Mapping */
3894#define B0MAP_PAL 0x00000000 /* Map Port A Low to Byte 0 */
3895#define B0MAP_PBL 0x00000001 /* Map Port B Low to Byte 0 */
3896#define B1MAP 0x0000FF00 /* Byte 1 Upper Half Port Mapping */
3897#define B1MAP_PAH 0x00000000 /* Map Port A High to Byte 1 */
3898#define B1MAP_PBH 0x00000100 /* Map Port B High to Byte 1 */
3899#define B2MAP 0x00FF0000 /* Byte 2 Lower Half Port Mapping */
3900#define B2MAP_PAL 0x00000000 /* Map Port A Low to Byte 2 */
3901#define B2MAP_PBL 0x00010000 /* Map Port B Low to Byte 2 */
3902#define B3MAP 0xFF000000 /* Byte 3 Upper Half Port Mapping */
3903#define B3MAP_PAH 0x00000000 /* Map Port A High to Byte 3 */
3904#define B3MAP_PBH 0x01000000 /* Map Port B High to Byte 3 */
3905
3906/* Bit fields for PINT2_ASSIGN and PINT3_ASSIGN registers */
3907
3908#define B0MAP_PCL 0x00000000 /* Map Port C Low to Byte 0 */
3909#define B0MAP_PDL 0x00000001 /* Map Port D Low to Byte 0 */
3910#define B0MAP_PEL 0x00000002 /* Map Port E Low to Byte 0 */
3911#define B0MAP_PFL 0x00000003 /* Map Port F Low to Byte 0 */
3912#define B0MAP_PGL 0x00000004 /* Map Port G Low to Byte 0 */
3913#define B0MAP_PHL 0x00000005 /* Map Port H Low to Byte 0 */
3914#define B0MAP_PIL 0x00000006 /* Map Port I Low to Byte 0 */
3915#define B0MAP_PJL 0x00000007 /* Map Port J Low to Byte 0 */
3916
3917#define B1MAP_PCH 0x00000000 /* Map Port C High to Byte 1 */
3918#define B1MAP_PDH 0x00000100 /* Map Port D High to Byte 1 */
3919#define B1MAP_PEH 0x00000200 /* Map Port E High to Byte 1 */
3920#define B1MAP_PFH 0x00000300 /* Map Port F High to Byte 1 */
3921#define B1MAP_PGH 0x00000400 /* Map Port G High to Byte 1 */
3922#define B1MAP_PHH 0x00000500 /* Map Port H High to Byte 1 */
3923#define B1MAP_PIH 0x00000600 /* Map Port I High to Byte 1 */
3924#define B1MAP_PJH 0x00000700 /* Map Port J High to Byte 1 */
3925
3926#define B2MAP_PCL 0x00000000 /* Map Port C Low to Byte 2 */
3927#define B2MAP_PDL 0x00010000 /* Map Port D Low to Byte 2 */
3928#define B2MAP_PEL 0x00020000 /* Map Port E Low to Byte 2 */
3929#define B2MAP_PFL 0x00030000 /* Map Port F Low to Byte 2 */
3930#define B2MAP_PGL 0x00040000 /* Map Port G Low to Byte 2 */
3931#define B2MAP_PHL 0x00050000 /* Map Port H Low to Byte 2 */
3932#define B2MAP_PIL 0x00060000 /* Map Port I Low to Byte 2 */
3933#define B2MAP_PJL 0x00070000 /* Map Port J Low to Byte 2 */
3934
3935#define B3MAP_PCH 0x00000000 /* Map Port C High to Byte 3 */
3936#define B3MAP_PDH 0x01000000 /* Map Port D High to Byte 3 */
3937#define B3MAP_PEH 0x02000000 /* Map Port E High to Byte 3 */
3938#define B3MAP_PFH 0x03000000 /* Map Port F High to Byte 3 */
3939#define B3MAP_PGH 0x04000000 /* Map Port G High to Byte 3 */
3940#define B3MAP_PHH 0x05000000 /* Map Port H High to Byte 3 */
3941#define B3MAP_PIH 0x06000000 /* Map Port I High to Byte 3 */
3942#define B3MAP_PJH 0x07000000 /* Map Port J High to Byte 3 */
3943
3944
3945/* for legacy compatibility */
3946
3947#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */
3948#define W1LMAX_MAX W1LMAX_MIN
3949#define EBIU_AMCBCTL0 EBIU_AMBCTL0
3950#define EBIU_AMCBCTL1 EBIU_AMBCTL1
3951#define PINT0_IRQ PINT0_REQUEST
3952#define PINT1_IRQ PINT1_REQUEST
3953#define PINT2_IRQ PINT2_REQUEST
3954#define PINT3_IRQ PINT3_REQUEST
3955
3956#endif /* _DEF_BF54X_H */
diff --git a/include/asm-blackfin/mach-bf548/dma.h b/include/asm-blackfin/mach-bf548/dma.h
deleted file mode 100644
index 36a2ef7e7849..000000000000
--- a/include/asm-blackfin/mach-bf548/dma.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf548/dma.h
3 * based on:
4 * author:
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 _MACH_DMA_H_
33#define _MACH_DMA_H_
34
35#define CH_SPORT0_RX 0
36#define CH_SPORT0_TX 1
37#define CH_SPORT1_RX 2
38#define CH_SPORT1_TX 3
39#define CH_SPI0 4
40#define CH_SPI1 5
41#define CH_UART0_RX 6
42#define CH_UART0_TX 7
43#define CH_UART1_RX 8
44#define CH_UART1_TX 9
45#define CH_ATAPI_RX 10
46#define CH_ATAPI_TX 11
47#define CH_EPPI0 12
48#define CH_EPPI1 13
49#define CH_EPPI2 14
50#define CH_PIXC_IMAGE 15
51#define CH_PIXC_OVERLAY 16
52#define CH_PIXC_OUTPUT 17
53#define CH_SPORT2_RX 18
54#define CH_UART2_RX 18
55#define CH_SPORT2_TX 19
56#define CH_UART2_TX 19
57#define CH_SPORT3_RX 20
58#define CH_UART3_RX 20
59#define CH_SPORT3_TX 21
60#define CH_UART3_TX 21
61#define CH_SDH 22
62#define CH_NFC 22
63#define CH_SPI2 23
64
65#define CH_MEM_STREAM0_DEST 24
66#define CH_MEM_STREAM0_SRC 25
67#define CH_MEM_STREAM1_DEST 26
68#define CH_MEM_STREAM1_SRC 27
69#define CH_MEM_STREAM2_DEST 28
70#define CH_MEM_STREAM2_SRC 29
71#define CH_MEM_STREAM3_DEST 30
72#define CH_MEM_STREAM3_SRC 31
73
74#define MAX_BLACKFIN_DMA_CHANNEL 32
75
76#endif
diff --git a/include/asm-blackfin/mach-bf548/gpio.h b/include/asm-blackfin/mach-bf548/gpio.h
deleted file mode 100644
index bba82dc75f16..000000000000
--- a/include/asm-blackfin/mach-bf548/gpio.h
+++ /dev/null
@@ -1,219 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/gpio.h
3 * Based on:
4 * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
5 *
6 * Created:
7 * Description:
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
31
32#define GPIO_PA0 0
33#define GPIO_PA1 1
34#define GPIO_PA2 2
35#define GPIO_PA3 3
36#define GPIO_PA4 4
37#define GPIO_PA5 5
38#define GPIO_PA6 6
39#define GPIO_PA7 7
40#define GPIO_PA8 8
41#define GPIO_PA9 9
42#define GPIO_PA10 10
43#define GPIO_PA11 11
44#define GPIO_PA12 12
45#define GPIO_PA13 13
46#define GPIO_PA14 14
47#define GPIO_PA15 15
48#define GPIO_PB0 16
49#define GPIO_PB1 17
50#define GPIO_PB2 18
51#define GPIO_PB3 19
52#define GPIO_PB4 20
53#define GPIO_PB5 21
54#define GPIO_PB6 22
55#define GPIO_PB7 23
56#define GPIO_PB8 24
57#define GPIO_PB9 25
58#define GPIO_PB10 26
59#define GPIO_PB11 27
60#define GPIO_PB12 28
61#define GPIO_PB13 29
62#define GPIO_PB14 30
63#define GPIO_PB15 31 /* N/A */
64#define GPIO_PC0 32
65#define GPIO_PC1 33
66#define GPIO_PC2 34
67#define GPIO_PC3 35
68#define GPIO_PC4 36
69#define GPIO_PC5 37
70#define GPIO_PC6 38
71#define GPIO_PC7 39
72#define GPIO_PC8 40
73#define GPIO_PC9 41
74#define GPIO_PC10 42
75#define GPIO_PC11 43
76#define GPIO_PC12 44
77#define GPIO_PC13 45
78#define GPIO_PC14 46 /* N/A */
79#define GPIO_PC15 47 /* N/A */
80#define GPIO_PD0 48
81#define GPIO_PD1 49
82#define GPIO_PD2 50
83#define GPIO_PD3 51
84#define GPIO_PD4 52
85#define GPIO_PD5 53
86#define GPIO_PD6 54
87#define GPIO_PD7 55
88#define GPIO_PD8 56
89#define GPIO_PD9 57
90#define GPIO_PD10 58
91#define GPIO_PD11 59
92#define GPIO_PD12 60
93#define GPIO_PD13 61
94#define GPIO_PD14 62
95#define GPIO_PD15 63
96#define GPIO_PE0 64
97#define GPIO_PE1 65
98#define GPIO_PE2 66
99#define GPIO_PE3 67
100#define GPIO_PE4 68
101#define GPIO_PE5 69
102#define GPIO_PE6 70
103#define GPIO_PE7 71
104#define GPIO_PE8 72
105#define GPIO_PE9 73
106#define GPIO_PE10 74
107#define GPIO_PE11 75
108#define GPIO_PE12 76
109#define GPIO_PE13 77
110#define GPIO_PE14 78
111#define GPIO_PE15 79
112#define GPIO_PF0 80
113#define GPIO_PF1 81
114#define GPIO_PF2 82
115#define GPIO_PF3 83
116#define GPIO_PF4 84
117#define GPIO_PF5 85
118#define GPIO_PF6 86
119#define GPIO_PF7 87
120#define GPIO_PF8 88
121#define GPIO_PF9 89
122#define GPIO_PF10 90
123#define GPIO_PF11 91
124#define GPIO_PF12 92
125#define GPIO_PF13 93
126#define GPIO_PF14 94
127#define GPIO_PF15 95
128#define GPIO_PG0 96
129#define GPIO_PG1 97
130#define GPIO_PG2 98
131#define GPIO_PG3 99
132#define GPIO_PG4 100
133#define GPIO_PG5 101
134#define GPIO_PG6 102
135#define GPIO_PG7 103
136#define GPIO_PG8 104
137#define GPIO_PG9 105
138#define GPIO_PG10 106
139#define GPIO_PG11 107
140#define GPIO_PG12 108
141#define GPIO_PG13 109
142#define GPIO_PG14 110
143#define GPIO_PG15 111
144#define GPIO_PH0 112
145#define GPIO_PH1 113
146#define GPIO_PH2 114
147#define GPIO_PH3 115
148#define GPIO_PH4 116
149#define GPIO_PH5 117
150#define GPIO_PH6 118
151#define GPIO_PH7 119
152#define GPIO_PH8 120
153#define GPIO_PH9 121
154#define GPIO_PH10 122
155#define GPIO_PH11 123
156#define GPIO_PH12 124
157#define GPIO_PH13 125
158#define GPIO_PH14 126 /* N/A */
159#define GPIO_PH15 127 /* N/A */
160#define GPIO_PI0 128
161#define GPIO_PI1 129
162#define GPIO_PI2 130
163#define GPIO_PI3 131
164#define GPIO_PI4 132
165#define GPIO_PI5 133
166#define GPIO_PI6 134
167#define GPIO_PI7 135
168#define GPIO_PI8 136
169#define GPIO_PI9 137
170#define GPIO_PI10 138
171#define GPIO_PI11 139
172#define GPIO_PI12 140
173#define GPIO_PI13 141
174#define GPIO_PI14 142
175#define GPIO_PI15 143
176#define GPIO_PJ0 144
177#define GPIO_PJ1 145
178#define GPIO_PJ2 146
179#define GPIO_PJ3 147
180#define GPIO_PJ4 148
181#define GPIO_PJ5 149
182#define GPIO_PJ6 150
183#define GPIO_PJ7 151
184#define GPIO_PJ8 152
185#define GPIO_PJ9 153
186#define GPIO_PJ10 154
187#define GPIO_PJ11 155
188#define GPIO_PJ12 156
189#define GPIO_PJ13 157
190#define GPIO_PJ14 158 /* N/A */
191#define GPIO_PJ15 159 /* N/A */
192
193#define MAX_BLACKFIN_GPIOS 160
194
195struct gpio_port_t {
196 unsigned short port_fer;
197 unsigned short dummy1;
198 unsigned short port_data;
199 unsigned short dummy2;
200 unsigned short port_set;
201 unsigned short dummy3;
202 unsigned short port_clear;
203 unsigned short dummy4;
204 unsigned short port_dir_set;
205 unsigned short dummy5;
206 unsigned short port_dir_clear;
207 unsigned short dummy6;
208 unsigned short port_inen;
209 unsigned short dummy7;
210 unsigned int port_mux;
211};
212
213struct gpio_port_s {
214 unsigned short fer;
215 unsigned short data;
216 unsigned short dir;
217 unsigned short inen;
218 unsigned int mux;
219};
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h
deleted file mode 100644
index ad380d1f5872..000000000000
--- a/include/asm-blackfin/mach-bf548/irq.h
+++ /dev/null
@@ -1,501 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf548/irq.h
3 * based on: include/asm-blackfin/mach-bf537/irq.h
4 * author: Roy Huang (roy.huang@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 _BF548_IRQ_H_
33#define _BF548_IRQ_H_
34
35/*
36 * Interrupt source definitions
37 Event Source Core Event Name
38Core Emulation **
39Events (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 (32 * 3)
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_DMAC0_ERROR BFIN_IRQ(1) /* DMAC0 Status Interrupt */
70#define IRQ_EPPI0_ERROR BFIN_IRQ(2) /* EPPI0 Error Interrupt */
71#define IRQ_SPORT0_ERROR BFIN_IRQ(3) /* SPORT0 Error Interrupt */
72#define IRQ_SPORT1_ERROR BFIN_IRQ(4) /* SPORT1 Error Interrupt */
73#define IRQ_SPI0_ERROR BFIN_IRQ(5) /* SPI0 Status(Error) Interrupt */
74#define IRQ_UART0_ERROR BFIN_IRQ(6) /* UART0 Status(Error) Interrupt */
75#define IRQ_RTC BFIN_IRQ(7) /* RTC Interrupt */
76#define IRQ_EPPI0 BFIN_IRQ(8) /* EPPI0 Interrupt (DMA12) */
77#define IRQ_SPORT0_RX BFIN_IRQ(9) /* SPORT0 RX Interrupt (DMA0) */
78#define IRQ_SPORT0_TX BFIN_IRQ(10) /* SPORT0 TX Interrupt (DMA1) */
79#define IRQ_SPORT1_RX BFIN_IRQ(11) /* SPORT1 RX Interrupt (DMA2) */
80#define IRQ_SPORT1_TX BFIN_IRQ(12) /* SPORT1 TX Interrupt (DMA3) */
81#define IRQ_SPI0 BFIN_IRQ(13) /* SPI0 Interrupt (DMA4) */
82#define IRQ_UART0_RX BFIN_IRQ(14) /* UART0 RX Interrupt (DMA6) */
83#define IRQ_UART0_TX BFIN_IRQ(15) /* UART0 TX Interrupt (DMA7) */
84#define IRQ_TIMER8 BFIN_IRQ(16) /* TIMER 8 Interrupt */
85#define IRQ_TIMER9 BFIN_IRQ(17) /* TIMER 9 Interrupt */
86#define IRQ_TIMER10 BFIN_IRQ(18) /* TIMER 10 Interrupt */
87#define IRQ_PINT0 BFIN_IRQ(19) /* PINT0 Interrupt */
88#define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */
89#define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */
90#define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */
91#define IRQ_WATCH BFIN_IRQ(23) /* Watchdog Interrupt */
92#define IRQ_DMAC1_ERROR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */
93#define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Error Interrupt */
94#define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Error Interrupt */
95#define IRQ_MXVR_DATA BFIN_IRQ(27) /* MXVR Data Interrupt */
96#define IRQ_SPI1_ERROR BFIN_IRQ(28) /* SPI1 Status (Error) Interrupt */
97#define IRQ_SPI2_ERROR BFIN_IRQ(29) /* SPI2 Status (Error) Interrupt */
98#define IRQ_UART1_ERROR BFIN_IRQ(30) /* UART1 Status (Error) Interrupt */
99#define IRQ_UART2_ERROR BFIN_IRQ(31) /* UART2 Status (Error) Interrupt */
100#define IRQ_CAN0_ERROR BFIN_IRQ(32) /* CAN0 Status (Error) Interrupt */
101#define IRQ_SPORT2_RX BFIN_IRQ(33) /* SPORT2 RX (DMA18) Interrupt */
102#define IRQ_UART2_RX BFIN_IRQ(33) /* UART2 RX (DMA18) Interrupt */
103#define IRQ_SPORT2_TX BFIN_IRQ(34) /* SPORT2 TX (DMA19) Interrupt */
104#define IRQ_UART2_TX BFIN_IRQ(34) /* UART2 TX (DMA19) Interrupt */
105#define IRQ_SPORT3_RX BFIN_IRQ(35) /* SPORT3 RX (DMA20) Interrupt */
106#define IRQ_UART3_RX BFIN_IRQ(35) /* UART3 RX (DMA20) Interrupt */
107#define IRQ_SPORT3_TX BFIN_IRQ(36) /* SPORT3 TX (DMA21) Interrupt */
108#define IRQ_UART3_TX BFIN_IRQ(36) /* UART3 TX (DMA21) Interrupt */
109#define IRQ_EPPI1 BFIN_IRQ(37) /* EPP1 (DMA13) Interrupt */
110#define IRQ_EPPI2 BFIN_IRQ(38) /* EPP2 (DMA14) Interrupt */
111#define IRQ_SPI1 BFIN_IRQ(39) /* SPI1 (DMA5) Interrupt */
112#define IRQ_SPI2 BFIN_IRQ(40) /* SPI2 (DMA23) Interrupt */
113#define IRQ_UART1_RX BFIN_IRQ(41) /* UART1 RX (DMA8) Interrupt */
114#define IRQ_UART1_TX BFIN_IRQ(42) /* UART1 TX (DMA9) Interrupt */
115#define IRQ_ATAPI_RX BFIN_IRQ(43) /* ATAPI RX (DMA10) Interrupt */
116#define IRQ_ATAPI_TX BFIN_IRQ(44) /* ATAPI TX (DMA11) Interrupt */
117#define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 Interrupt */
118#define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 Interrupt */
119#define IRQ_CAN0_RX BFIN_IRQ(47) /* CAN0 Receive Interrupt */
120#define IRQ_CAN0_TX BFIN_IRQ(48) /* CAN0 Transmit Interrupt */
121#define IRQ_MDMAS2 BFIN_IRQ(49) /* MDMA Stream 2 Interrupt */
122#define IRQ_MDMAS3 BFIN_IRQ(50) /* MDMA Stream 3 Interrupt */
123#define IRQ_MXVR_ERROR BFIN_IRQ(51) /* MXVR Status (Error) Interrupt */
124#define IRQ_MXVR_MSG BFIN_IRQ(52) /* MXVR Message Interrupt */
125#define IRQ_MXVR_PKT BFIN_IRQ(53) /* MXVR Packet Interrupt */
126#define IRQ_EPP1_ERROR BFIN_IRQ(54) /* EPPI1 Error Interrupt */
127#define IRQ_EPP2_ERROR BFIN_IRQ(55) /* EPPI2 Error Interrupt */
128#define IRQ_UART3_ERROR BFIN_IRQ(56) /* UART3 Status (Error) Interrupt */
129#define IRQ_HOST_ERROR BFIN_IRQ(57) /* HOST Status (Error) Interrupt */
130#define IRQ_PIXC_ERROR BFIN_IRQ(59) /* PIXC Status (Error) Interrupt */
131#define IRQ_NFC_ERROR BFIN_IRQ(60) /* NFC Error Interrupt */
132#define IRQ_ATAPI_ERROR BFIN_IRQ(61) /* ATAPI Error Interrupt */
133#define IRQ_CAN1_ERROR BFIN_IRQ(62) /* CAN1 Status (Error) Interrupt */
134#define IRQ_HS_DMA_ERROR BFIN_IRQ(63) /* Handshake DMA Status Interrupt */
135#define IRQ_PIXC_IN0 BFIN_IRQ(64) /* PIXC IN0 (DMA15) Interrupt */
136#define IRQ_PIXC_IN1 BFIN_IRQ(65) /* PIXC IN1 (DMA16) Interrupt */
137#define IRQ_PIXC_OUT BFIN_IRQ(66) /* PIXC OUT (DMA17) Interrupt */
138#define IRQ_SDH BFIN_IRQ(67) /* SDH/NFC (DMA22) Interrupt */
139#define IRQ_CNT BFIN_IRQ(68) /* CNT Interrupt */
140#define IRQ_KEY BFIN_IRQ(69) /* KEY Interrupt */
141#define IRQ_CAN1_RX BFIN_IRQ(70) /* CAN1 RX Interrupt */
142#define IRQ_CAN1_TX BFIN_IRQ(71) /* CAN1 TX Interrupt */
143#define IRQ_SDH_MASK0 BFIN_IRQ(72) /* SDH Mask 0 Interrupt */
144#define IRQ_SDH_MASK1 BFIN_IRQ(73) /* SDH Mask 1 Interrupt */
145#define IRQ_USB_INT0 BFIN_IRQ(75) /* USB INT0 Interrupt */
146#define IRQ_USB_INT1 BFIN_IRQ(76) /* USB INT1 Interrupt */
147#define IRQ_USB_INT2 BFIN_IRQ(77) /* USB INT2 Interrupt */
148#define IRQ_USB_DMA BFIN_IRQ(78) /* USB DMA Interrupt */
149#define IRQ_OPTSEC BFIN_IRQ(79) /* OTPSEC Interrupt */
150#define IRQ_TIMER0 BFIN_IRQ(86) /* Timer 0 Interrupt */
151#define IRQ_TIMER1 BFIN_IRQ(87) /* Timer 1 Interrupt */
152#define IRQ_TIMER2 BFIN_IRQ(88) /* Timer 2 Interrupt */
153#define IRQ_TIMER3 BFIN_IRQ(89) /* Timer 3 Interrupt */
154#define IRQ_TIMER4 BFIN_IRQ(90) /* Timer 4 Interrupt */
155#define IRQ_TIMER5 BFIN_IRQ(91) /* Timer 5 Interrupt */
156#define IRQ_TIMER6 BFIN_IRQ(92) /* Timer 6 Interrupt */
157#define IRQ_TIMER7 BFIN_IRQ(93) /* Timer 7 Interrupt */
158#define IRQ_PINT2 BFIN_IRQ(94) /* PINT2 Interrupt */
159#define IRQ_PINT3 BFIN_IRQ(95) /* PINT3 Interrupt */
160
161#define SYS_IRQS IRQ_PINT3
162
163#define BFIN_PA_IRQ(x) ((x) + SYS_IRQS + 1)
164#define IRQ_PA0 BFIN_PA_IRQ(0)
165#define IRQ_PA1 BFIN_PA_IRQ(1)
166#define IRQ_PA2 BFIN_PA_IRQ(2)
167#define IRQ_PA3 BFIN_PA_IRQ(3)
168#define IRQ_PA4 BFIN_PA_IRQ(4)
169#define IRQ_PA5 BFIN_PA_IRQ(5)
170#define IRQ_PA6 BFIN_PA_IRQ(6)
171#define IRQ_PA7 BFIN_PA_IRQ(7)
172#define IRQ_PA8 BFIN_PA_IRQ(8)
173#define IRQ_PA9 BFIN_PA_IRQ(9)
174#define IRQ_PA10 BFIN_PA_IRQ(10)
175#define IRQ_PA11 BFIN_PA_IRQ(11)
176#define IRQ_PA12 BFIN_PA_IRQ(12)
177#define IRQ_PA13 BFIN_PA_IRQ(13)
178#define IRQ_PA14 BFIN_PA_IRQ(14)
179#define IRQ_PA15 BFIN_PA_IRQ(15)
180
181#define BFIN_PB_IRQ(x) ((x) + IRQ_PA15 + 1)
182#define IRQ_PB0 BFIN_PB_IRQ(0)
183#define IRQ_PB1 BFIN_PB_IRQ(1)
184#define IRQ_PB2 BFIN_PB_IRQ(2)
185#define IRQ_PB3 BFIN_PB_IRQ(3)
186#define IRQ_PB4 BFIN_PB_IRQ(4)
187#define IRQ_PB5 BFIN_PB_IRQ(5)
188#define IRQ_PB6 BFIN_PB_IRQ(6)
189#define IRQ_PB7 BFIN_PB_IRQ(7)
190#define IRQ_PB8 BFIN_PB_IRQ(8)
191#define IRQ_PB9 BFIN_PB_IRQ(9)
192#define IRQ_PB10 BFIN_PB_IRQ(10)
193#define IRQ_PB11 BFIN_PB_IRQ(11)
194#define IRQ_PB12 BFIN_PB_IRQ(12)
195#define IRQ_PB13 BFIN_PB_IRQ(13)
196#define IRQ_PB14 BFIN_PB_IRQ(14)
197#define IRQ_PB15 BFIN_PB_IRQ(15) /* N/A */
198
199#define BFIN_PC_IRQ(x) ((x) + IRQ_PB15 + 1)
200#define IRQ_PC0 BFIN_PC_IRQ(0)
201#define IRQ_PC1 BFIN_PC_IRQ(1)
202#define IRQ_PC2 BFIN_PC_IRQ(2)
203#define IRQ_PC3 BFIN_PC_IRQ(3)
204#define IRQ_PC4 BFIN_PC_IRQ(4)
205#define IRQ_PC5 BFIN_PC_IRQ(5)
206#define IRQ_PC6 BFIN_PC_IRQ(6)
207#define IRQ_PC7 BFIN_PC_IRQ(7)
208#define IRQ_PC8 BFIN_PC_IRQ(8)
209#define IRQ_PC9 BFIN_PC_IRQ(9)
210#define IRQ_PC10 BFIN_PC_IRQ(10)
211#define IRQ_PC11 BFIN_PC_IRQ(11)
212#define IRQ_PC12 BFIN_PC_IRQ(12)
213#define IRQ_PC13 BFIN_PC_IRQ(13)
214#define IRQ_PC14 BFIN_PC_IRQ(14) /* N/A */
215#define IRQ_PC15 BFIN_PC_IRQ(15) /* N/A */
216
217#define BFIN_PD_IRQ(x) ((x) + IRQ_PC15 + 1)
218#define IRQ_PD0 BFIN_PD_IRQ(0)
219#define IRQ_PD1 BFIN_PD_IRQ(1)
220#define IRQ_PD2 BFIN_PD_IRQ(2)
221#define IRQ_PD3 BFIN_PD_IRQ(3)
222#define IRQ_PD4 BFIN_PD_IRQ(4)
223#define IRQ_PD5 BFIN_PD_IRQ(5)
224#define IRQ_PD6 BFIN_PD_IRQ(6)
225#define IRQ_PD7 BFIN_PD_IRQ(7)
226#define IRQ_PD8 BFIN_PD_IRQ(8)
227#define IRQ_PD9 BFIN_PD_IRQ(9)
228#define IRQ_PD10 BFIN_PD_IRQ(10)
229#define IRQ_PD11 BFIN_PD_IRQ(11)
230#define IRQ_PD12 BFIN_PD_IRQ(12)
231#define IRQ_PD13 BFIN_PD_IRQ(13)
232#define IRQ_PD14 BFIN_PD_IRQ(14)
233#define IRQ_PD15 BFIN_PD_IRQ(15)
234
235#define BFIN_PE_IRQ(x) ((x) + IRQ_PD15 + 1)
236#define IRQ_PE0 BFIN_PE_IRQ(0)
237#define IRQ_PE1 BFIN_PE_IRQ(1)
238#define IRQ_PE2 BFIN_PE_IRQ(2)
239#define IRQ_PE3 BFIN_PE_IRQ(3)
240#define IRQ_PE4 BFIN_PE_IRQ(4)
241#define IRQ_PE5 BFIN_PE_IRQ(5)
242#define IRQ_PE6 BFIN_PE_IRQ(6)
243#define IRQ_PE7 BFIN_PE_IRQ(7)
244#define IRQ_PE8 BFIN_PE_IRQ(8)
245#define IRQ_PE9 BFIN_PE_IRQ(9)
246#define IRQ_PE10 BFIN_PE_IRQ(10)
247#define IRQ_PE11 BFIN_PE_IRQ(11)
248#define IRQ_PE12 BFIN_PE_IRQ(12)
249#define IRQ_PE13 BFIN_PE_IRQ(13)
250#define IRQ_PE14 BFIN_PE_IRQ(14)
251#define IRQ_PE15 BFIN_PE_IRQ(15)
252
253#define BFIN_PF_IRQ(x) ((x) + IRQ_PE15 + 1)
254#define IRQ_PF0 BFIN_PF_IRQ(0)
255#define IRQ_PF1 BFIN_PF_IRQ(1)
256#define IRQ_PF2 BFIN_PF_IRQ(2)
257#define IRQ_PF3 BFIN_PF_IRQ(3)
258#define IRQ_PF4 BFIN_PF_IRQ(4)
259#define IRQ_PF5 BFIN_PF_IRQ(5)
260#define IRQ_PF6 BFIN_PF_IRQ(6)
261#define IRQ_PF7 BFIN_PF_IRQ(7)
262#define IRQ_PF8 BFIN_PF_IRQ(8)
263#define IRQ_PF9 BFIN_PF_IRQ(9)
264#define IRQ_PF10 BFIN_PF_IRQ(10)
265#define IRQ_PF11 BFIN_PF_IRQ(11)
266#define IRQ_PF12 BFIN_PF_IRQ(12)
267#define IRQ_PF13 BFIN_PF_IRQ(13)
268#define IRQ_PF14 BFIN_PF_IRQ(14)
269#define IRQ_PF15 BFIN_PF_IRQ(15)
270
271#define BFIN_PG_IRQ(x) ((x) + IRQ_PF15 + 1)
272#define IRQ_PG0 BFIN_PG_IRQ(0)
273#define IRQ_PG1 BFIN_PG_IRQ(1)
274#define IRQ_PG2 BFIN_PG_IRQ(2)
275#define IRQ_PG3 BFIN_PG_IRQ(3)
276#define IRQ_PG4 BFIN_PG_IRQ(4)
277#define IRQ_PG5 BFIN_PG_IRQ(5)
278#define IRQ_PG6 BFIN_PG_IRQ(6)
279#define IRQ_PG7 BFIN_PG_IRQ(7)
280#define IRQ_PG8 BFIN_PG_IRQ(8)
281#define IRQ_PG9 BFIN_PG_IRQ(9)
282#define IRQ_PG10 BFIN_PG_IRQ(10)
283#define IRQ_PG11 BFIN_PG_IRQ(11)
284#define IRQ_PG12 BFIN_PG_IRQ(12)
285#define IRQ_PG13 BFIN_PG_IRQ(13)
286#define IRQ_PG14 BFIN_PG_IRQ(14)
287#define IRQ_PG15 BFIN_PG_IRQ(15)
288
289#define BFIN_PH_IRQ(x) ((x) + IRQ_PG15 + 1)
290#define IRQ_PH0 BFIN_PH_IRQ(0)
291#define IRQ_PH1 BFIN_PH_IRQ(1)
292#define IRQ_PH2 BFIN_PH_IRQ(2)
293#define IRQ_PH3 BFIN_PH_IRQ(3)
294#define IRQ_PH4 BFIN_PH_IRQ(4)
295#define IRQ_PH5 BFIN_PH_IRQ(5)
296#define IRQ_PH6 BFIN_PH_IRQ(6)
297#define IRQ_PH7 BFIN_PH_IRQ(7)
298#define IRQ_PH8 BFIN_PH_IRQ(8)
299#define IRQ_PH9 BFIN_PH_IRQ(9)
300#define IRQ_PH10 BFIN_PH_IRQ(10)
301#define IRQ_PH11 BFIN_PH_IRQ(11)
302#define IRQ_PH12 BFIN_PH_IRQ(12)
303#define IRQ_PH13 BFIN_PH_IRQ(13)
304#define IRQ_PH14 BFIN_PH_IRQ(14) /* N/A */
305#define IRQ_PH15 BFIN_PH_IRQ(15) /* N/A */
306
307#define BFIN_PI_IRQ(x) ((x) + IRQ_PH15 + 1)
308#define IRQ_PI0 BFIN_PI_IRQ(0)
309#define IRQ_PI1 BFIN_PI_IRQ(1)
310#define IRQ_PI2 BFIN_PI_IRQ(2)
311#define IRQ_PI3 BFIN_PI_IRQ(3)
312#define IRQ_PI4 BFIN_PI_IRQ(4)
313#define IRQ_PI5 BFIN_PI_IRQ(5)
314#define IRQ_PI6 BFIN_PI_IRQ(6)
315#define IRQ_PI7 BFIN_PI_IRQ(7)
316#define IRQ_PI8 BFIN_PI_IRQ(8)
317#define IRQ_PI9 BFIN_PI_IRQ(9)
318#define IRQ_PI10 BFIN_PI_IRQ(10)
319#define IRQ_PI11 BFIN_PI_IRQ(11)
320#define IRQ_PI12 BFIN_PI_IRQ(12)
321#define IRQ_PI13 BFIN_PI_IRQ(13)
322#define IRQ_PI14 BFIN_PI_IRQ(14)
323#define IRQ_PI15 BFIN_PI_IRQ(15)
324
325#define BFIN_PJ_IRQ(x) ((x) + IRQ_PI15 + 1)
326#define IRQ_PJ0 BFIN_PJ_IRQ(0)
327#define IRQ_PJ1 BFIN_PJ_IRQ(1)
328#define IRQ_PJ2 BFIN_PJ_IRQ(2)
329#define IRQ_PJ3 BFIN_PJ_IRQ(3)
330#define IRQ_PJ4 BFIN_PJ_IRQ(4)
331#define IRQ_PJ5 BFIN_PJ_IRQ(5)
332#define IRQ_PJ6 BFIN_PJ_IRQ(6)
333#define IRQ_PJ7 BFIN_PJ_IRQ(7)
334#define IRQ_PJ8 BFIN_PJ_IRQ(8)
335#define IRQ_PJ9 BFIN_PJ_IRQ(9)
336#define IRQ_PJ10 BFIN_PJ_IRQ(10)
337#define IRQ_PJ11 BFIN_PJ_IRQ(11)
338#define IRQ_PJ12 BFIN_PJ_IRQ(12)
339#define IRQ_PJ13 BFIN_PJ_IRQ(13)
340#define IRQ_PJ14 BFIN_PJ_IRQ(14) /* N/A */
341#define IRQ_PJ15 BFIN_PJ_IRQ(15) /* N/A */
342
343#define GPIO_IRQ_BASE IRQ_PA0
344
345#define NR_IRQS (IRQ_PJ15+1)
346
347/* For compatibility reasons with existing code */
348
349#define IRQ_DMAC0_ERR IRQ_DMAC0_ERROR
350#define IRQ_EPPI0_ERR IRQ_EPPI0_ERROR
351#define IRQ_SPORT0_ERR IRQ_SPORT0_ERROR
352#define IRQ_SPORT1_ERR IRQ_SPORT1_ERROR
353#define IRQ_SPI0_ERR IRQ_SPI0_ERROR
354#define IRQ_UART0_ERR IRQ_UART0_ERROR
355#define IRQ_DMAC1_ERR IRQ_DMAC1_ERROR
356#define IRQ_SPORT2_ERR IRQ_SPORT2_ERROR
357#define IRQ_SPORT3_ERR IRQ_SPORT3_ERROR
358#define IRQ_SPI1_ERR IRQ_SPI1_ERROR
359#define IRQ_SPI2_ERR IRQ_SPI2_ERROR
360#define IRQ_UART1_ERR IRQ_UART1_ERROR
361#define IRQ_UART2_ERR IRQ_UART2_ERROR
362#define IRQ_CAN0_ERR IRQ_CAN0_ERROR
363#define IRQ_MXVR_ERR IRQ_MXVR_ERROR
364#define IRQ_EPP1_ERR IRQ_EPP1_ERROR
365#define IRQ_EPP2_ERR IRQ_EPP2_ERROR
366#define IRQ_UART3_ERR IRQ_UART3_ERROR
367#define IRQ_HOST_ERR IRQ_HOST_ERROR
368#define IRQ_PIXC_ERR IRQ_PIXC_ERROR
369#define IRQ_NFC_ERR IRQ_NFC_ERROR
370#define IRQ_ATAPI_ERR IRQ_ATAPI_ERROR
371#define IRQ_CAN1_ERR IRQ_CAN1_ERROR
372#define IRQ_HS_DMA_ERR IRQ_HS_DMA_ERROR
373
374
375#define IVG7 7
376#define IVG8 8
377#define IVG9 9
378#define IVG10 10
379#define IVG11 11
380#define IVG12 12
381#define IVG13 13
382#define IVG14 14
383#define IVG15 15
384
385/* IAR0 BIT FIELDS */
386#define IRQ_PLL_WAKEUP_POS 0
387#define IRQ_DMAC0_ERR_POS 4
388#define IRQ_EPPI0_ERR_POS 8
389#define IRQ_SPORT0_ERR_POS 12
390#define IRQ_SPORT1_ERR_POS 16
391#define IRQ_SPI0_ERR_POS 20
392#define IRQ_UART0_ERR_POS 24
393#define IRQ_RTC_POS 28
394
395/* IAR1 BIT FIELDS */
396#define IRQ_EPPI0_POS 0
397#define IRQ_SPORT0_RX_POS 4
398#define IRQ_SPORT0_TX_POS 8
399#define IRQ_SPORT1_RX_POS 12
400#define IRQ_SPORT1_TX_POS 16
401#define IRQ_SPI0_POS 20
402#define IRQ_UART0_RX_POS 24
403#define IRQ_UART0_TX_POS 28
404
405/* IAR2 BIT FIELDS */
406#define IRQ_TIMER8_POS 0
407#define IRQ_TIMER9_POS 4
408#define IRQ_TIMER10_POS 8
409#define IRQ_PINT0_POS 12
410#define IRQ_PINT1_POS 16
411#define IRQ_MDMAS0_POS 20
412#define IRQ_MDMAS1_POS 24
413#define IRQ_WATCH_POS 28
414
415/* IAR3 BIT FIELDS */
416#define IRQ_DMAC1_ERR_POS 0
417#define IRQ_SPORT2_ERR_POS 4
418#define IRQ_SPORT3_ERR_POS 8
419#define IRQ_MXVR_DATA_POS 12
420#define IRQ_SPI1_ERR_POS 16
421#define IRQ_SPI2_ERR_POS 20
422#define IRQ_UART1_ERR_POS 24
423#define IRQ_UART2_ERR_POS 28
424
425/* IAR4 BIT FILEDS */
426#define IRQ_CAN0_ERR_POS 0
427#define IRQ_SPORT2_RX_POS 4
428#define IRQ_UART2_RX_POS 4
429#define IRQ_SPORT2_TX_POS 8
430#define IRQ_UART2_TX_POS 8
431#define IRQ_SPORT3_RX_POS 12
432#define IRQ_UART3_RX_POS 12
433#define IRQ_SPORT3_TX_POS 16
434#define IRQ_UART3_TX_POS 16
435#define IRQ_EPPI1_POS 20
436#define IRQ_EPPI2_POS 24
437#define IRQ_SPI1_POS 28
438
439/* IAR5 BIT FIELDS */
440#define IRQ_SPI2_POS 0
441#define IRQ_UART1_RX_POS 4
442#define IRQ_UART1_TX_POS 8
443#define IRQ_ATAPI_RX_POS 12
444#define IRQ_ATAPI_TX_POS 16
445#define IRQ_TWI0_POS 20
446#define IRQ_TWI1_POS 24
447#define IRQ_CAN0_RX_POS 28
448
449/* IAR6 BIT FIELDS */
450#define IRQ_CAN0_TX_POS 0
451#define IRQ_MDMAS2_POS 4
452#define IRQ_MDMAS3_POS 8
453#define IRQ_MXVR_ERR_POS 12
454#define IRQ_MXVR_MSG_POS 16
455#define IRQ_MXVR_PKT_POS 20
456#define IRQ_EPPI1_ERR_POS 24
457#define IRQ_EPPI2_ERR_POS 28
458
459/* IAR7 BIT FIELDS */
460#define IRQ_UART3_ERR_POS 0
461#define IRQ_HOST_ERR_POS 4
462#define IRQ_PIXC_ERR_POS 12
463#define IRQ_NFC_ERR_POS 16
464#define IRQ_ATAPI_ERR_POS 20
465#define IRQ_CAN1_ERR_POS 24
466#define IRQ_HS_DMA_ERR_POS 28
467
468/* IAR8 BIT FIELDS */
469#define IRQ_PIXC_IN0_POS 0
470#define IRQ_PIXC_IN1_POS 4
471#define IRQ_PIXC_OUT_POS 8
472#define IRQ_SDH_POS 12
473#define IRQ_CNT_POS 16
474#define IRQ_KEY_POS 20
475#define IRQ_CAN1_RX_POS 24
476#define IRQ_CAN1_TX_POS 28
477
478/* IAR9 BIT FIELDS */
479#define IRQ_SDH_MASK0_POS 0
480#define IRQ_SDH_MASK1_POS 4
481#define IRQ_USB_INT0_POS 12
482#define IRQ_USB_INT1_POS 16
483#define IRQ_USB_INT2_POS 20
484#define IRQ_USB_DMA_POS 24
485#define IRQ_OTPSEC_POS 28
486
487/* IAR10 BIT FIELDS */
488#define IRQ_TIMER0_POS 24
489#define IRQ_TIMER1_POS 28
490
491/* IAR11 BIT FIELDS */
492#define IRQ_TIMER2_POS 0
493#define IRQ_TIMER3_POS 4
494#define IRQ_TIMER4_POS 8
495#define IRQ_TIMER5_POS 12
496#define IRQ_TIMER6_POS 16
497#define IRQ_TIMER7_POS 20
498#define IRQ_PINT2_POS 24
499#define IRQ_PINT3_POS 28
500
501#endif /* _BF548_IRQ_H_ */
diff --git a/include/asm-blackfin/mach-bf548/mem_init.h b/include/asm-blackfin/mach-bf548/mem_init.h
deleted file mode 100644
index ab0b863eee66..000000000000
--- a/include/asm-blackfin/mach-bf548/mem_init.h
+++ /dev/null
@@ -1,255 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf548/mem_init.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 * Copyright 2004-2006 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#define MIN_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000 + 1)
32#define MAX_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000)
33#define DDR_CLK_HZ(x) (1000*1000*1000/x)
34
35#if (CONFIG_MEM_MT46V32M16_6T)
36#define DDR_SIZE DEVSZ_512
37#define DDR_WIDTH DEVWD_16
38#define DDR_MAX_tCK 13
39
40#define DDR_tRC DDR_TRC(MIN_DDR_SCLK(60))
41#define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(42))
42#define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15))
43#define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(72))
44#define DDR_tREFI DDR_TREFI(MAX_DDR_SCLK(7800))
45
46#define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15))
47#define DDR_tWTR DDR_TWTR(1)
48#define DDR_tMRD DDR_TMRD(MIN_DDR_SCLK(12))
49#define DDR_tWR DDR_TWR(MIN_DDR_SCLK(15))
50#endif
51
52#if (CONFIG_MEM_MT46V32M16_5B)
53#define DDR_SIZE DEVSZ_512
54#define DDR_WIDTH DEVWD_16
55#define DDR_MAX_tCK 13
56
57#define DDR_tRC DDR_TRC(MIN_DDR_SCLK(55))
58#define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(40))
59#define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15))
60#define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(70))
61#define DDR_tREFI DDR_TREFI(MAX_DDR_SCLK(7800))
62
63#define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15))
64#define DDR_tWTR DDR_TWTR(2)
65#define DDR_tMRD DDR_TMRD(MIN_DDR_SCLK(10))
66#define DDR_tWR DDR_TWR(MIN_DDR_SCLK(15))
67#endif
68
69#if (CONFIG_MEM_GENERIC_BOARD)
70#define DDR_SIZE DEVSZ_512
71#define DDR_WIDTH DEVWD_16
72#define DDR_MAX_tCK 13
73
74#define DDR_tRCD DDR_TRCD(3)
75#define DDR_tWTR DDR_TWTR(2)
76#define DDR_tWR DDR_TWR(2)
77#define DDR_tMRD DDR_TMRD(2)
78#define DDR_tRP DDR_TRP(3)
79#define DDR_tRAS DDR_TRAS(7)
80#define DDR_tRC DDR_TRC(10)
81#define DDR_tRFC DDR_TRFC(12)
82#define DDR_tREFI DDR_TREFI(1288)
83#endif
84
85#if (CONFIG_SCLK_HZ < DDR_CLK_HZ(DDR_MAX_tCK))
86# error "CONFIG_SCLK_HZ is too small (<DDR_CLK_HZ(DDR_MAX_tCK) Hz)."
87#elif(CONFIG_SCLK_HZ <= 133333333)
88# define DDR_CL CL_2
89#else
90# error "CONFIG_SCLK_HZ is too large (>133333333 Hz)."
91#endif
92
93
94#define mem_DDRCTL0 (DDR_tRP | DDR_tRAS | DDR_tRC | DDR_tRFC | DDR_tREFI)
95#define mem_DDRCTL1 (DDR_DATWIDTH | EXTBANK_1 | DDR_SIZE | DDR_WIDTH | DDR_tWTR \
96 | DDR_tMRD | DDR_tWR | DDR_tRCD)
97#define mem_DDRCTL2 DDR_CL
98
99
100#if defined CONFIG_CLKIN_HALF
101#define CLKIN_HALF 1
102#else
103#define CLKIN_HALF 0
104#endif
105
106#if defined CONFIG_PLL_BYPASS
107#define PLL_BYPASS 1
108#else
109#define PLL_BYPASS 0
110#endif
111
112/***************************************Currently Not Being Used *********************************/
113#define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
114#define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
115#define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ))
116#define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
117#define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
118
119#if (flash_EBIU_AMBCTL_TT > 3)
120#define flash_EBIU_AMBCTL0_TT B0TT_4
121#endif
122#if (flash_EBIU_AMBCTL_TT == 3)
123#define flash_EBIU_AMBCTL0_TT B0TT_3
124#endif
125#if (flash_EBIU_AMBCTL_TT == 2)
126#define flash_EBIU_AMBCTL0_TT B0TT_2
127#endif
128#if (flash_EBIU_AMBCTL_TT < 2)
129#define flash_EBIU_AMBCTL0_TT B0TT_1
130#endif
131
132#if (flash_EBIU_AMBCTL_ST > 3)
133#define flash_EBIU_AMBCTL0_ST B0ST_4
134#endif
135#if (flash_EBIU_AMBCTL_ST == 3)
136#define flash_EBIU_AMBCTL0_ST B0ST_3
137#endif
138#if (flash_EBIU_AMBCTL_ST == 2)
139#define flash_EBIU_AMBCTL0_ST B0ST_2
140#endif
141#if (flash_EBIU_AMBCTL_ST < 2)
142#define flash_EBIU_AMBCTL0_ST B0ST_1
143#endif
144
145#if (flash_EBIU_AMBCTL_HT > 2)
146#define flash_EBIU_AMBCTL0_HT B0HT_3
147#endif
148#if (flash_EBIU_AMBCTL_HT == 2)
149#define flash_EBIU_AMBCTL0_HT B0HT_2
150#endif
151#if (flash_EBIU_AMBCTL_HT == 1)
152#define flash_EBIU_AMBCTL0_HT B0HT_1
153#endif
154#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0)
155#define flash_EBIU_AMBCTL0_HT B0HT_0
156#endif
157#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0)
158#define flash_EBIU_AMBCTL0_HT B0HT_1
159#endif
160
161#if (flash_EBIU_AMBCTL_WAT > 14)
162#define flash_EBIU_AMBCTL0_WAT B0WAT_15
163#endif
164#if (flash_EBIU_AMBCTL_WAT == 14)
165#define flash_EBIU_AMBCTL0_WAT B0WAT_14
166#endif
167#if (flash_EBIU_AMBCTL_WAT == 13)
168#define flash_EBIU_AMBCTL0_WAT B0WAT_13
169#endif
170#if (flash_EBIU_AMBCTL_WAT == 12)
171#define flash_EBIU_AMBCTL0_WAT B0WAT_12
172#endif
173#if (flash_EBIU_AMBCTL_WAT == 11)
174#define flash_EBIU_AMBCTL0_WAT B0WAT_11
175#endif
176#if (flash_EBIU_AMBCTL_WAT == 10)
177#define flash_EBIU_AMBCTL0_WAT B0WAT_10
178#endif
179#if (flash_EBIU_AMBCTL_WAT == 9)
180#define flash_EBIU_AMBCTL0_WAT B0WAT_9
181#endif
182#if (flash_EBIU_AMBCTL_WAT == 8)
183#define flash_EBIU_AMBCTL0_WAT B0WAT_8
184#endif
185#if (flash_EBIU_AMBCTL_WAT == 7)
186#define flash_EBIU_AMBCTL0_WAT B0WAT_7
187#endif
188#if (flash_EBIU_AMBCTL_WAT == 6)
189#define flash_EBIU_AMBCTL0_WAT B0WAT_6
190#endif
191#if (flash_EBIU_AMBCTL_WAT == 5)
192#define flash_EBIU_AMBCTL0_WAT B0WAT_5
193#endif
194#if (flash_EBIU_AMBCTL_WAT == 4)
195#define flash_EBIU_AMBCTL0_WAT B0WAT_4
196#endif
197#if (flash_EBIU_AMBCTL_WAT == 3)
198#define flash_EBIU_AMBCTL0_WAT B0WAT_3
199#endif
200#if (flash_EBIU_AMBCTL_WAT == 2)
201#define flash_EBIU_AMBCTL0_WAT B0WAT_2
202#endif
203#if (flash_EBIU_AMBCTL_WAT == 1)
204#define flash_EBIU_AMBCTL0_WAT B0WAT_1
205#endif
206
207#if (flash_EBIU_AMBCTL_RAT > 14)
208#define flash_EBIU_AMBCTL0_RAT B0RAT_15
209#endif
210#if (flash_EBIU_AMBCTL_RAT == 14)
211#define flash_EBIU_AMBCTL0_RAT B0RAT_14
212#endif
213#if (flash_EBIU_AMBCTL_RAT == 13)
214#define flash_EBIU_AMBCTL0_RAT B0RAT_13
215#endif
216#if (flash_EBIU_AMBCTL_RAT == 12)
217#define flash_EBIU_AMBCTL0_RAT B0RAT_12
218#endif
219#if (flash_EBIU_AMBCTL_RAT == 11)
220#define flash_EBIU_AMBCTL0_RAT B0RAT_11
221#endif
222#if (flash_EBIU_AMBCTL_RAT == 10)
223#define flash_EBIU_AMBCTL0_RAT B0RAT_10
224#endif
225#if (flash_EBIU_AMBCTL_RAT == 9)
226#define flash_EBIU_AMBCTL0_RAT B0RAT_9
227#endif
228#if (flash_EBIU_AMBCTL_RAT == 8)
229#define flash_EBIU_AMBCTL0_RAT B0RAT_8
230#endif
231#if (flash_EBIU_AMBCTL_RAT == 7)
232#define flash_EBIU_AMBCTL0_RAT B0RAT_7
233#endif
234#if (flash_EBIU_AMBCTL_RAT == 6)
235#define flash_EBIU_AMBCTL0_RAT B0RAT_6
236#endif
237#if (flash_EBIU_AMBCTL_RAT == 5)
238#define flash_EBIU_AMBCTL0_RAT B0RAT_5
239#endif
240#if (flash_EBIU_AMBCTL_RAT == 4)
241#define flash_EBIU_AMBCTL0_RAT B0RAT_4
242#endif
243#if (flash_EBIU_AMBCTL_RAT == 3)
244#define flash_EBIU_AMBCTL0_RAT B0RAT_3
245#endif
246#if (flash_EBIU_AMBCTL_RAT == 2)
247#define flash_EBIU_AMBCTL0_RAT B0RAT_2
248#endif
249#if (flash_EBIU_AMBCTL_RAT == 1)
250#define flash_EBIU_AMBCTL0_RAT B0RAT_1
251#endif
252
253#define flash_EBIU_AMBCTL0 \
254 (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \
255 flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN)
diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h
deleted file mode 100644
index f99f47bc3a07..000000000000
--- a/include/asm-blackfin/mach-bf548/mem_map.h
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf548/mem_map.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * Memory MAP Common header file for blackfin BF537/6/4 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_548_H_
32#define _MEM_MAP_548_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 0x2C000000 /* Async Bank 3 */
39#define ASYNC_BANK3_SIZE 0x04000000 /* 64M */
40#define ASYNC_BANK2_BASE 0x28000000 /* Async Bank 2 */
41#define ASYNC_BANK2_SIZE 0x04000000 /* 64M */
42#define ASYNC_BANK1_BASE 0x24000000 /* Async Bank 1 */
43#define ASYNC_BANK1_SIZE 0x04000000 /* 64M */
44#define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */
45#define ASYNC_BANK0_SIZE 0x04000000 /* 64M */
46
47/* Boot ROM Memory */
48
49#define BOOT_ROM_START 0xEF000000
50#define BOOT_ROM_LENGTH 0x1000
51
52/* L1 Instruction ROM */
53
54#define L1_ROM_START 0xFFA14000
55#define L1_ROM_LENGTH 0x10000
56
57/* Level 1 Memory */
58
59/* Memory Map for ADSP-BF548 processors */
60#ifdef CONFIG_BFIN_ICACHE
61#define BFIN_ICACHESIZE (16*1024)
62#else
63#define BFIN_ICACHESIZE (0*1024)
64#endif
65
66#define L1_CODE_START 0xFFA00000
67#define L1_DATA_A_START 0xFF800000
68#define L1_DATA_B_START 0xFF900000
69
70#define L1_CODE_LENGTH 0xC000
71
72#ifdef CONFIG_BFIN_DCACHE
73
74#ifdef CONFIG_BFIN_DCACHE_BANKA
75#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
76#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
77#define L1_DATA_B_LENGTH 0x8000
78#define BFIN_DCACHESIZE (16*1024)
79#define BFIN_DSUPBANKS 1
80#else
81#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
82#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
83#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
84#define BFIN_DCACHESIZE (32*1024)
85#define BFIN_DSUPBANKS 2
86#endif
87
88#else
89#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
90#define L1_DATA_A_LENGTH 0x8000
91#define L1_DATA_B_LENGTH 0x8000
92#define BFIN_DCACHESIZE (0*1024)
93#define BFIN_DSUPBANKS 0
94#endif /*CONFIG_BFIN_DCACHE*/
95
96/* Level 2 Memory */
97#if !defined(CONFIG_BF542)
98# define L2_START 0xFEB00000
99# if defined(CONFIG_BF544)
100# define L2_LENGTH 0x10000
101# else
102# define L2_LENGTH 0x20000
103# endif
104#endif
105
106/* Scratch Pad Memory */
107
108#define L1_SCRATCH_START 0xFFB00000
109#define L1_SCRATCH_LENGTH 0x1000
110
111#endif/* _MEM_MAP_548_H_ */
diff --git a/include/asm-blackfin/mach-bf548/portmux.h b/include/asm-blackfin/mach-bf548/portmux.h
deleted file mode 100644
index 8177a567dcdb..000000000000
--- a/include/asm-blackfin/mach-bf548/portmux.h
+++ /dev/null
@@ -1,286 +0,0 @@
1#ifndef _MACH_PORTMUX_H_
2#define _MACH_PORTMUX_H_
3
4#define MAX_RESOURCES MAX_BLACKFIN_GPIOS
5
6#define P_SPORT2_TFS (P_DEFINED | P_IDENT(GPIO_PA0) | P_FUNCT(0))
7#define P_SPORT2_DTSEC (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(0))
8#define P_SPORT2_DTPRI (P_DEFINED | P_IDENT(GPIO_PA2) | P_FUNCT(0))
9#define P_SPORT2_TSCLK (P_DEFINED | P_IDENT(GPIO_PA3) | P_FUNCT(0))
10#define P_SPORT2_RFS (P_DEFINED | P_IDENT(GPIO_PA4) | P_FUNCT(0))
11#define P_SPORT2_DRSEC (P_DEFINED | P_IDENT(GPIO_PA5) | P_FUNCT(0))
12#define P_SPORT2_DRPRI (P_DEFINED | P_IDENT(GPIO_PA6) | P_FUNCT(0))
13#define P_SPORT2_RSCLK (P_DEFINED | P_IDENT(GPIO_PA7) | P_FUNCT(0))
14#define P_SPORT3_TFS (P_DEFINED | P_IDENT(GPIO_PA8) | P_FUNCT(0))
15#define P_SPORT3_DTSEC (P_DEFINED | P_IDENT(GPIO_PA9) | P_FUNCT(0))
16#define P_SPORT3_DTPRI (P_DEFINED | P_IDENT(GPIO_PA10) | P_FUNCT(0))
17#define P_SPORT3_TSCLK (P_DEFINED | P_IDENT(GPIO_PA11) | P_FUNCT(0))
18#define P_SPORT3_RFS (P_DEFINED | P_IDENT(GPIO_PA12) | P_FUNCT(0))
19#define P_SPORT3_DRSEC (P_DEFINED | P_IDENT(GPIO_PA13) | P_FUNCT(0))
20#define P_SPORT3_DRPRI (P_DEFINED | P_IDENT(GPIO_PA14) | P_FUNCT(0))
21#define P_SPORT3_RSCLK (P_DEFINED | P_IDENT(GPIO_PA15) | P_FUNCT(0))
22#define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(1))
23#define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PA5) | P_FUNCT(1))
24#define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PA9) | P_FUNCT(1))
25#define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PA13) | P_FUNCT(1))
26
27#define P_TWI1_SCL (P_DEFINED | P_IDENT(GPIO_PB0) | P_FUNCT(0))
28#define P_TWI1_SDA (P_DEFINED | P_IDENT(GPIO_PB1) | P_FUNCT(0))
29#define P_UART3_RTS (P_DEFINED | P_IDENT(GPIO_PB2) | P_FUNCT(0))
30#define P_UART3_CTS (P_DEFINED | P_IDENT(GPIO_PB3) | P_FUNCT(0))
31#define P_UART2_TX (P_DEFINED | P_IDENT(GPIO_PB4) | P_FUNCT(0))
32#define P_UART2_RX (P_DEFINED | P_IDENT(GPIO_PB5) | P_FUNCT(0))
33#define P_UART3_TX (P_DEFINED | P_IDENT(GPIO_PB6) | P_FUNCT(0))
34#define P_UART3_RX (P_DEFINED | P_IDENT(GPIO_PB7) | P_FUNCT(0))
35#define P_SPI2_SS (P_DEFINED | P_IDENT(GPIO_PB8) | P_FUNCT(0))
36#define P_SPI2_SSEL1 (P_DEFINED | P_IDENT(GPIO_PB9) | P_FUNCT(0))
37#define P_SPI2_SSEL2 (P_DEFINED | P_IDENT(GPIO_PB10) | P_FUNCT(0))
38#define P_SPI2_SSEL3 (P_DEFINED | P_IDENT(GPIO_PB11) | P_FUNCT(0))
39#define P_SPI2_SCK (P_DEFINED | P_IDENT(GPIO_PB12) | P_FUNCT(0))
40#define P_SPI2_MOSI (P_DEFINED | P_IDENT(GPIO_PB13) | P_FUNCT(0))
41#define P_SPI2_MISO (P_DEFINED | P_IDENT(GPIO_PB14) | P_FUNCT(0))
42#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PB8) | P_FUNCT(1))
43#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PB9) | P_FUNCT(1))
44#define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PB10) | P_FUNCT(1))
45#define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PB11) | P_FUNCT(1))
46
47#define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PC0) | P_FUNCT(0))
48#define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PC1) | P_FUNCT(0))
49#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PC2) | P_FUNCT(0))
50#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PC3) | P_FUNCT(0))
51#define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PC4) | P_FUNCT(0))
52#define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PC5) | P_FUNCT(0))
53#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PC6) | P_FUNCT(0))
54#define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PC7) | P_FUNCT(0))
55#define P_SD_D0 (P_DEFINED | P_IDENT(GPIO_PC8) | P_FUNCT(0))
56#define P_SD_D1 (P_DEFINED | P_IDENT(GPIO_PC9) | P_FUNCT(0))
57#define P_SD_D2 (P_DEFINED | P_IDENT(GPIO_PC10) | P_FUNCT(0))
58#define P_SD_D3 (P_DEFINED | P_IDENT(GPIO_PC11) | P_FUNCT(0))
59#define P_SD_CLK (P_DEFINED | P_IDENT(GPIO_PC12) | P_FUNCT(0))
60#define P_SD_CMD (P_DEFINED | P_IDENT(GPIO_PC13) | P_FUNCT(0))
61#define P_MMCLK (P_DEFINED | P_IDENT(GPIO_PC1) | P_FUNCT(1))
62#define P_MBCLK (P_DEFINED | P_IDENT(GPIO_PC5) | P_FUNCT(1))
63
64#define P_PPI1_D0 (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(0))
65#define P_PPI1_D1 (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(0))
66#define P_PPI1_D2 (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(0))
67#define P_PPI1_D3 (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(0))
68#define P_PPI1_D4 (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(0))
69#define P_PPI1_D5 (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(0))
70#define P_PPI1_D6 (P_DEFINED | P_IDENT(GPIO_PD6) | P_FUNCT(0))
71#define P_PPI1_D7 (P_DEFINED | P_IDENT(GPIO_PD7) | P_FUNCT(0))
72#define P_PPI1_D8 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(0))
73#define P_PPI1_D9 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(0))
74#define P_PPI1_D10 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(0))
75#define P_PPI1_D11 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(0))
76#define P_PPI1_D12 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(0))
77#define P_PPI1_D13 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(0))
78#define P_PPI1_D14 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(0))
79#define P_PPI1_D15 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(0))
80
81#define P_HOST_D8 (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(1))
82#define P_HOST_D9 (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(1))
83#define P_HOST_D10 (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(1))
84#define P_HOST_D11 (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(1))
85#define P_HOST_D12 (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(1))
86#define P_HOST_D13 (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(1))
87#define P_HOST_D14 (P_DEFINED | P_IDENT(GPIO_PD6) | P_FUNCT(1))
88#define P_HOST_D15 (P_DEFINED | P_IDENT(GPIO_PD7) | P_FUNCT(1))
89#define P_HOST_D0 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(1))
90#define P_HOST_D1 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(1))
91#define P_HOST_D2 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(1))
92#define P_HOST_D3 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(1))
93#define P_HOST_D4 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(1))
94#define P_HOST_D5 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(1))
95#define P_HOST_D6 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(1))
96#define P_HOST_D7 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(1))
97#define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(2))
98#define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(2))
99#define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(2))
100#define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(2))
101#define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(2))
102#define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(2))
103#define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PD6) | P_FUNCT(2))
104#define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PD7) | P_FUNCT(2))
105#define P_PPI2_D0 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(2))
106#define P_PPI2_D1 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(2))
107#define P_PPI2_D2 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(2))
108#define P_PPI2_D3 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(2))
109#define P_PPI2_D4 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(2))
110#define P_PPI2_D5 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(2))
111#define P_PPI2_D6 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(2))
112#define P_PPI2_D7 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(2))
113#define P_PPI0_D18 (P_DEFINED | P_IDENT(GPIO_PD0) | P_FUNCT(3))
114#define P_PPI0_D19 (P_DEFINED | P_IDENT(GPIO_PD1) | P_FUNCT(3))
115#define P_PPI0_D20 (P_DEFINED | P_IDENT(GPIO_PD2) | P_FUNCT(3))
116#define P_PPI0_D21 (P_DEFINED | P_IDENT(GPIO_PD3) | P_FUNCT(3))
117#define P_PPI0_D22 (P_DEFINED | P_IDENT(GPIO_PD4) | P_FUNCT(3))
118#define P_PPI0_D23 (P_DEFINED | P_IDENT(GPIO_PD5) | P_FUNCT(3))
119#define P_KEY_ROW0 (P_DEFINED | P_IDENT(GPIO_PD8) | P_FUNCT(3))
120#define P_KEY_ROW1 (P_DEFINED | P_IDENT(GPIO_PD9) | P_FUNCT(3))
121#define P_KEY_ROW2 (P_DEFINED | P_IDENT(GPIO_PD10) | P_FUNCT(3))
122#define P_KEY_ROW3 (P_DEFINED | P_IDENT(GPIO_PD11) | P_FUNCT(3))
123#define P_KEY_COL0 (P_DEFINED | P_IDENT(GPIO_PD12) | P_FUNCT(3))
124#define P_KEY_COL1 (P_DEFINED | P_IDENT(GPIO_PD13) | P_FUNCT(3))
125#define P_KEY_COL2 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(3))
126#define P_KEY_COL3 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(3))
127
128#define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(0))
129#define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(0))
130#define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(0))
131#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PE3) | P_FUNCT(0))
132#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PE4) | P_FUNCT(0))
133#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PE5) | P_FUNCT(0))
134#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PE6) | P_FUNCT(0))
135#define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PE7) | P_FUNCT(0))
136#define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PE8) | P_FUNCT(0))
137#define P_UART1_RTS (P_DEFINED | P_IDENT(GPIO_PE9) | P_FUNCT(0))
138#define P_UART1_CTS (P_DEFINED | P_IDENT(GPIO_PE10) | P_FUNCT(0))
139#define P_PPI1_CLK (P_DEFINED | P_IDENT(GPIO_PE11) | P_FUNCT(0))
140#define P_PPI1_FS1 (P_DEFINED | P_IDENT(GPIO_PE12) | P_FUNCT(0))
141#define P_PPI1_FS2 (P_DEFINED | P_IDENT(GPIO_PE13) | P_FUNCT(0))
142#define P_TWI0_SCL (P_DEFINED | P_IDENT(GPIO_PE14) | P_FUNCT(0))
143#define P_TWI0_SDA (P_DEFINED | P_IDENT(GPIO_PE15) | P_FUNCT(0))
144#define P_KEY_COL7 (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(1))
145#define P_KEY_ROW6 (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(1))
146#define P_KEY_COL6 (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(1))
147#define P_KEY_ROW5 (P_DEFINED | P_IDENT(GPIO_PE3) | P_FUNCT(1))
148#define P_KEY_COL5 (P_DEFINED | P_IDENT(GPIO_PE4) | P_FUNCT(1))
149#define P_KEY_ROW4 (P_DEFINED | P_IDENT(GPIO_PE5) | P_FUNCT(1))
150#define P_KEY_COL4 (P_DEFINED | P_IDENT(GPIO_PE6) | P_FUNCT(1))
151#define P_KEY_ROW7 (P_DEFINED | P_IDENT(GPIO_PE7) | P_FUNCT(1))
152
153#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0))
154#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0))
155#define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0))
156#define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0))
157#define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0))
158#define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0))
159#define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0))
160#define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0))
161#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0))
162#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0))
163#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0))
164#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0))
165#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0))
166#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0))
167#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0))
168#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0))
169#define P_ATAPI_D0A (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1))
170#define P_ATAPI_D1A (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1))
171#define P_ATAPI_D2A (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1))
172#define P_ATAPI_D3A (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1))
173#define P_ATAPI_D4A (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1))
174#define P_ATAPI_D5A (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1))
175#define P_ATAPI_D6A (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1))
176#define P_ATAPI_D7A (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1))
177#define P_ATAPI_D8A (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1))
178#define P_ATAPI_D9A (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1))
179#define P_ATAPI_D10A (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(1))
180#define P_ATAPI_D11A (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(1))
181#define P_ATAPI_D12A (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(1))
182#define P_ATAPI_D13A (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(1))
183#define P_ATAPI_D14A (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1))
184#define P_ATAPI_D15A (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1))
185
186#define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0))
187#define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))
188#define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(0))
189#define P_PPI0_D16 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0))
190#define P_PPI0_D17 (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0))
191#define P_SPI1_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0))
192#define P_SPI1_SSEL2 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0))
193#define P_SPI1_SSEL3 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0))
194#define P_SPI1_SCK (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0))
195#define P_SPI1_MISO (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0))
196#define P_SPI1_MOSI (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0))
197#define P_SPI1_SS (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0))
198#define P_CAN0_TX (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0))
199#define P_CAN0_RX (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0))
200#define P_CAN1_TX (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0))
201#define P_CAN1_RX (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0))
202#define P_ATAPI_A0A (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(1))
203#define P_ATAPI_A1A (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1))
204#define P_ATAPI_A2A (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(1))
205#define P_HOST_CE (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(1))
206#define P_HOST_RD (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1))
207#define P_HOST_WR (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1))
208#define P_MTXONB (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1))
209#define P_PPI2_FS2 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2))
210#define P_PPI2_FS1 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2))
211#define P_PPI2_CLK (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2))
212#define P_CNT_CZM (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(3))
213
214#define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0))
215#define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0))
216#define P_ATAPI_RESET (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0))
217#define P_HOST_ADDR (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0))
218#define P_HOST_ACK (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0))
219#define P_MTX (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0))
220#define P_MRX (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0))
221#define P_MRXONB (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0))
222#define P_A4 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0))
223#define P_A5 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0))
224#define P_A6 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0))
225#define P_A7 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0))
226#define P_A8 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0))
227#define P_A9 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0))
228#define P_PPI1_FS3 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(1))
229#define P_PPI2_FS3 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(1))
230#define P_TMR8 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(1))
231#define P_TMR9 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(1))
232#define P_TMR10 (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(1))
233#define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1))
234#define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1))
235#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(2))
236#define P_CNT_CDG (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(2))
237#define P_CNT_CUD (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(2))
238
239#define P_A10 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI0) | P_FUNCT(0))
240#define P_A11 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI1) | P_FUNCT(0))
241#define P_A12 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI2) | P_FUNCT(0))
242#define P_A13 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI3) | P_FUNCT(0))
243#define P_A14 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI4) | P_FUNCT(0))
244#define P_A15 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI5) | P_FUNCT(0))
245#define P_A16 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI6) | P_FUNCT(0))
246#define P_A17 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI7) | P_FUNCT(0))
247#define P_A18 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI8) | P_FUNCT(0))
248#define P_A19 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI9) | P_FUNCT(0))
249#define P_A20 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI10) | P_FUNCT(0))
250#define P_A21 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI11) | P_FUNCT(0))
251#define P_A22 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI12) | P_FUNCT(0))
252#define P_A23 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI13) | P_FUNCT(0))
253#define P_A24 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI14) | P_FUNCT(0))
254#define P_A25 (P_MAYSHARE | P_DEFINED | P_IDENT(GPIO_PI15) | P_FUNCT(0))
255#define P_NOR_CLK (P_DEFINED | P_IDENT(GPIO_PI15) | P_FUNCT(1))
256
257#define P_AMC_ARDY_NOR_WAIT (P_DEFINED | P_IDENT(GPIO_PJ0) | P_FUNCT(0))
258#define P_NAND_CE (P_DEFINED | P_IDENT(GPIO_PJ1) | P_FUNCT(0))
259#define P_NAND_RB (P_DEFINED | P_IDENT(GPIO_PJ2) | P_FUNCT(0))
260#define P_ATAPI_DIOR (P_DEFINED | P_IDENT(GPIO_PJ3) | P_FUNCT(0))
261#define P_ATAPI_DIOW (P_DEFINED | P_IDENT(GPIO_PJ4) | P_FUNCT(0))
262#define P_ATAPI_CS0 (P_DEFINED | P_IDENT(GPIO_PJ5) | P_FUNCT(0))
263#define P_ATAPI_CS1 (P_DEFINED | P_IDENT(GPIO_PJ6) | P_FUNCT(0))
264#define P_ATAPI_DMACK (P_DEFINED | P_IDENT(GPIO_PJ7) | P_FUNCT(0))
265#define P_ATAPI_DMARQ (P_DEFINED | P_IDENT(GPIO_PJ8) | P_FUNCT(0))
266#define P_ATAPI_INTRQ (P_DEFINED | P_IDENT(GPIO_PJ9) | P_FUNCT(0))
267#define P_ATAPI_IORDY (P_DEFINED | P_IDENT(GPIO_PJ10) | P_FUNCT(0))
268#define P_AMC_BR (P_DEFINED | P_IDENT(GPIO_PJ11) | P_FUNCT(0))
269#define P_AMC_BG (P_DEFINED | P_IDENT(GPIO_PJ12) | P_FUNCT(0))
270#define P_AMC_BGH (P_DEFINED | P_IDENT(GPIO_PJ13) | P_FUNCT(0))
271
272
273#define P_NAND_D0 (P_DONTCARE)
274#define P_NAND_D1 (P_DONTCARE)
275#define P_NAND_D2 (P_DONTCARE)
276#define P_NAND_D3 (P_DONTCARE)
277#define P_NAND_D4 (P_DONTCARE)
278#define P_NAND_D5 (P_DONTCARE)
279#define P_NAND_D6 (P_DONTCARE)
280#define P_NAND_D7 (P_DONTCARE)
281#define P_NAND_WE (P_DONTCARE)
282#define P_NAND_RE (P_DONTCARE)
283#define P_NAND_CLE (P_DONTCARE)
284#define P_NAND_ALE (P_DONTCARE)
285
286#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h
deleted file mode 100644
index 5c5d7d7d695f..000000000000
--- a/include/asm-blackfin/mach-bf561/anomaly.h
+++ /dev/null
@@ -1,274 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf561/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 *
5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8
9/* This file shoule be up to date with:
10 * - Revision P, 02/08/2008; ADSP-BF561 Blackfin Processor Anomaly List
11 */
12
13#ifndef _MACH_ANOMALY_H_
14#define _MACH_ANOMALY_H_
15
16/* We do not support 0.1, 0.2, or 0.4 silicon - sorry */
17#if __SILICON_REVISION__ < 3 || __SILICON_REVISION__ == 4
18# error will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4
19#endif
20
21/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */
22#define ANOMALY_05000074 (1)
23/* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */
24#define ANOMALY_05000099 (__SILICON_REVISION__ < 5)
25/* Trace Buffers may contain errors in emulation mode and/or exception, NMI, reset handlers */
26#define ANOMALY_05000116 (__SILICON_REVISION__ < 3)
27/* Testset instructions restricted to 32-bit aligned memory locations */
28#define ANOMALY_05000120 (1)
29/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
30#define ANOMALY_05000122 (1)
31/* Erroneous exception when enabling cache */
32#define ANOMALY_05000125 (__SILICON_REVISION__ < 3)
33/* Signbits instruction not functional under certain conditions */
34#define ANOMALY_05000127 (1)
35/* Two bits in the Watchpoint Status Register (WPSTAT) are swapped */
36#define ANOMALY_05000134 (__SILICON_REVISION__ < 3)
37/* Enable wires from the Data Watchpoint Address Control Register (WPDACTL) are swapped */
38#define ANOMALY_05000135 (__SILICON_REVISION__ < 3)
39/* Stall in multi-unit DMA operations */
40#define ANOMALY_05000136 (__SILICON_REVISION__ < 3)
41/* Allowing the SPORT RX FIFO to fill will cause an overflow */
42#define ANOMALY_05000140 (__SILICON_REVISION__ < 3)
43/* Infinite Stall may occur with a particular sequence of consecutive dual dag events */
44#define ANOMALY_05000141 (__SILICON_REVISION__ < 3)
45/* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */
46#define ANOMALY_05000142 (__SILICON_REVISION__ < 3)
47/* DMA and TESTSET conflict when both are accessing external memory */
48#define ANOMALY_05000144 (__SILICON_REVISION__ < 3)
49/* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */
50#define ANOMALY_05000145 (__SILICON_REVISION__ < 3)
51/* MDMA may lose the first few words of a descriptor chain */
52#define ANOMALY_05000146 (__SILICON_REVISION__ < 3)
53/* Source MDMA descriptor may stop with a DMA Error near beginning of descriptor fetch */
54#define ANOMALY_05000147 (__SILICON_REVISION__ < 3)
55/* IMDMA S1/D1 channel may stall */
56#define ANOMALY_05000149 (1)
57/* DMA engine may lose data due to incorrect handshaking */
58#define ANOMALY_05000150 (__SILICON_REVISION__ < 3)
59/* DMA stalls when all three controllers read data from the same source */
60#define ANOMALY_05000151 (__SILICON_REVISION__ < 3)
61/* Execution stall when executing in L2 and doing external accesses */
62#define ANOMALY_05000152 (__SILICON_REVISION__ < 3)
63/* Frame Delay in SPORT Multichannel Mode */
64#define ANOMALY_05000153 (__SILICON_REVISION__ < 3)
65/* SPORT TFS signal stays active in multichannel mode outside of valid channels */
66#define ANOMALY_05000154 (__SILICON_REVISION__ < 3)
67/* Timers in PWM-Out Mode with PPI GP Receive (Input) Mode with 0 Frame Syncs */
68#define ANOMALY_05000156 (__SILICON_REVISION__ < 4)
69/* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */
70#define ANOMALY_05000157 (__SILICON_REVISION__ < 3)
71/* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */
72#define ANOMALY_05000159 (__SILICON_REVISION__ < 3)
73/* A read from external memory may return a wrong value with data cache enabled */
74#define ANOMALY_05000160 (__SILICON_REVISION__ < 3)
75/* Data Cache Fill data can be corrupted after/during Instruction DMA if certain core stalls exist */
76#define ANOMALY_05000161 (__SILICON_REVISION__ < 3)
77/* DMEM_CONTROL<12> is not set on Reset */
78#define ANOMALY_05000162 (__SILICON_REVISION__ < 3)
79/* SPORT transmit data is not gated by external frame sync in certain conditions */
80#define ANOMALY_05000163 (__SILICON_REVISION__ < 3)
81/* PPI Data Lengths Between 8 and 16 Do Not Zero Out Upper Bits */
82#define ANOMALY_05000166 (1)
83/* Turning Serial Ports on with External Frame Syncs */
84#define ANOMALY_05000167 (1)
85/* SDRAM auto-refresh and subsequent Power Ups */
86#define ANOMALY_05000168 (__SILICON_REVISION__ < 5)
87/* DATA CPLB page miss can result in lost write-through cache data writes */
88#define ANOMALY_05000169 (__SILICON_REVISION__ < 5)
89/* Boot-ROM code modifies SICA_IWRx wakeup registers */
90#define ANOMALY_05000171 (__SILICON_REVISION__ < 5)
91/* DSPID register values incorrect */
92#define ANOMALY_05000172 (__SILICON_REVISION__ < 3)
93/* DMA vs Core accesses to external memory */
94#define ANOMALY_05000173 (__SILICON_REVISION__ < 3)
95/* Cache Fill Buffer Data lost */
96#define ANOMALY_05000174 (__SILICON_REVISION__ < 5)
97/* Overlapping Sequencer and Memory Stalls */
98#define ANOMALY_05000175 (__SILICON_REVISION__ < 5)
99/* Multiplication of (-1) by (-1) followed by an accumulator saturation */
100#define ANOMALY_05000176 (__SILICON_REVISION__ < 5)
101/* PPI_COUNT Cannot Be Programmed to 0 in General Purpose TX or RX Modes */
102#define ANOMALY_05000179 (__SILICON_REVISION__ < 5)
103/* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */
104#define ANOMALY_05000180 (1)
105/* Disabling the PPI resets the PPI configuration registers */
106#define ANOMALY_05000181 (__SILICON_REVISION__ < 5)
107/* IMDMA does not operate to full speed for 600MHz and higher devices */
108#define ANOMALY_05000182 (1)
109/* Timer Pin limitations for PPI TX Modes with External Frame Syncs */
110#define ANOMALY_05000184 (__SILICON_REVISION__ < 5)
111/* PPI TX Mode with 2 External Frame Syncs */
112#define ANOMALY_05000185 (__SILICON_REVISION__ < 5)
113/* PPI packing with Data Length greater than 8 bits (not a meaningful mode) */
114#define ANOMALY_05000186 (__SILICON_REVISION__ < 5)
115/* IMDMA Corrupted Data after a Halt */
116#define ANOMALY_05000187 (1)
117/* IMDMA Restrictions on Descriptor and Buffer Placement in Memory */
118#define ANOMALY_05000188 (__SILICON_REVISION__ < 5)
119/* False Protection Exceptions */
120#define ANOMALY_05000189 (__SILICON_REVISION__ < 5)
121/* PPI not functional at core voltage < 1Volt */
122#define ANOMALY_05000190 (1)
123/* PPI does not invert the Driving PPICLK edge in Transmit Modes */
124#define ANOMALY_05000191 (__SILICON_REVISION__ < 3)
125/* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */
126#define ANOMALY_05000193 (__SILICON_REVISION__ < 5)
127/* Restarting SPORT in Specific Modes May Cause Data Corruption */
128#define ANOMALY_05000194 (__SILICON_REVISION__ < 5)
129/* Failing MMR Accesses When Stalled by Preceding Memory Read */
130#define ANOMALY_05000198 (__SILICON_REVISION__ < 5)
131/* Current DMA Address Shows Wrong Value During Carry Fix */
132#define ANOMALY_05000199 (__SILICON_REVISION__ < 5)
133/* SPORT TFS and DT Are Incorrectly Driven During Inactive Channels in Certain Conditions */
134#define ANOMALY_05000200 (__SILICON_REVISION__ < 5)
135/* Possible Infinite Stall with Specific Dual-DAG Situation */
136#define ANOMALY_05000202 (__SILICON_REVISION__ < 5)
137/* Incorrect data read with write-through cache and allocate cache lines on reads only mode */
138#define ANOMALY_05000204 (__SILICON_REVISION__ < 5)
139/* Specific sequence that can cause DMA error or DMA stopping */
140#define ANOMALY_05000205 (__SILICON_REVISION__ < 5)
141/* Recovery from "Brown-Out" Condition */
142#define ANOMALY_05000207 (__SILICON_REVISION__ < 5)
143/* VSTAT Status Bit in PLL_STAT Register Is Not Functional */
144#define ANOMALY_05000208 (1)
145/* Speed Path in Computational Unit Affects Certain Instructions */
146#define ANOMALY_05000209 (__SILICON_REVISION__ < 5)
147/* UART TX Interrupt Masked Erroneously */
148#define ANOMALY_05000215 (__SILICON_REVISION__ < 5)
149/* NMI Event at Boot Time Results in Unpredictable State */
150#define ANOMALY_05000219 (__SILICON_REVISION__ < 5)
151/* Data Corruption with Cached External Memory and Non-Cached On-Chip L2 Memory */
152#define ANOMALY_05000220 (__SILICON_REVISION__ < 5)
153/* Incorrect Pulse-Width of UART Start Bit */
154#define ANOMALY_05000225 (__SILICON_REVISION__ < 5)
155/* Scratchpad Memory Bank Reads May Return Incorrect Data */
156#define ANOMALY_05000227 (__SILICON_REVISION__ < 5)
157/* UART Receiver is Less Robust Against Baudrate Differences in Certain Conditions */
158#define ANOMALY_05000230 (__SILICON_REVISION__ < 5)
159/* UART STB Bit Incorrectly Affects Receiver Setting */
160#define ANOMALY_05000231 (__SILICON_REVISION__ < 5)
161/* SPORT data transmit lines are incorrectly driven in multichannel mode */
162#define ANOMALY_05000232 (__SILICON_REVISION__ < 5)
163/* DF Bit in PLL_CTL Register Does Not Respond to Hardware Reset */
164#define ANOMALY_05000242 (__SILICON_REVISION__ < 5)
165/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
166#define ANOMALY_05000244 (__SILICON_REVISION__ < 5)
167/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
168#define ANOMALY_05000245 (__SILICON_REVISION__ < 5)
169/* TESTSET operation forces stall on the other core */
170#define ANOMALY_05000248 (__SILICON_REVISION__ < 5)
171/* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */
172#define ANOMALY_05000250 (__SILICON_REVISION__ > 2 && __SILICON_REVISION__ < 5)
173/* Exception Not Generated for MMR Accesses in Reserved Region */
174#define ANOMALY_05000251 (__SILICON_REVISION__ < 5)
175/* Maximum External Clock Speed for Timers */
176#define ANOMALY_05000253 (__SILICON_REVISION__ < 5)
177/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */
178#define ANOMALY_05000254 (__SILICON_REVISION__ > 3)
179/* Interrupt/Exception During Short Hardware Loop May Cause Bad Instruction Fetches */
180#define ANOMALY_05000257 (__SILICON_REVISION__ < 5)
181/* Instruction Cache Is Corrupted When Bits 9 and 12 of the ICPLB Data Registers Differ */
182#define ANOMALY_05000258 (__SILICON_REVISION__ < 5)
183/* ICPLB_STATUS MMR Register May Be Corrupted */
184#define ANOMALY_05000260 (__SILICON_REVISION__ < 5)
185/* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */
186#define ANOMALY_05000261 (__SILICON_REVISION__ < 5)
187/* Stores To Data Cache May Be Lost */
188#define ANOMALY_05000262 (__SILICON_REVISION__ < 5)
189/* Hardware Loop Corrupted When Taking an ICPLB Exception */
190#define ANOMALY_05000263 (__SILICON_REVISION__ < 5)
191/* CSYNC/SSYNC/IDLE Causes Infinite Stall in Penultimate Instruction in Hardware Loop */
192#define ANOMALY_05000264 (__SILICON_REVISION__ < 5)
193/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
194#define ANOMALY_05000265 (__SILICON_REVISION__ < 5)
195/* IMDMA destination IRQ status must be read prior to using IMDMA */
196#define ANOMALY_05000266 (__SILICON_REVISION__ > 3)
197/* IMDMA may corrupt data under certain conditions */
198#define ANOMALY_05000267 (1)
199/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Increase */
200#define ANOMALY_05000269 (1)
201/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */
202#define ANOMALY_05000270 (1)
203/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
204#define ANOMALY_05000272 (1)
205/* Data cache write back to external synchronous memory may be lost */
206#define ANOMALY_05000274 (1)
207/* PPI Timing and Sampling Information Updates */
208#define ANOMALY_05000275 (__SILICON_REVISION__ > 2)
209/* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */
210#define ANOMALY_05000276 (__SILICON_REVISION__ < 5)
211/* Writes to an I/O data register one SCLK cycle after an edge is detected may clear interrupt */
212#define ANOMALY_05000277 (__SILICON_REVISION__ < 3)
213/* Disabling Peripherals with DMA Running May Cause DMA System Instability */
214#define ANOMALY_05000278 (__SILICON_REVISION__ < 5)
215/* False Hardware Error Exception When ISR Context Is Not Restored */
216#define ANOMALY_05000281 (__SILICON_REVISION__ < 5)
217/* System MMR Write Is Stalled Indefinitely When Killed in a Particular Stage */
218#define ANOMALY_05000283 (1)
219/* A read will receive incorrect data under certain conditions */
220#define ANOMALY_05000287 (__SILICON_REVISION__ < 5)
221/* SPORTs May Receive Bad Data If FIFOs Fill Up */
222#define ANOMALY_05000288 (__SILICON_REVISION__ < 5)
223/* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */
224#define ANOMALY_05000301 (1)
225/* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */
226#define ANOMALY_05000302 (1)
227/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
228#define ANOMALY_05000305 (__SILICON_REVISION__ < 5)
229/* SCKELOW Bit Does Not Maintain State Through Hibernate */
230#define ANOMALY_05000307 (__SILICON_REVISION__ < 5)
231/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
232#define ANOMALY_05000310 (1)
233/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
234#define ANOMALY_05000312 (1)
235/* PPI Is Level-Sensitive on First Transfer */
236#define ANOMALY_05000313 (1)
237/* Killed System MMR Write Completes Erroneously On Next System MMR Access */
238#define ANOMALY_05000315 (1)
239/* PF2 Output Remains Asserted After SPI Master Boot */
240#define ANOMALY_05000320 (__SILICON_REVISION__ > 3)
241/* Erroneous GPIO Flag Pin Operations Under Specific Sequences */
242#define ANOMALY_05000323 (1)
243/* SPORT Secondary Receive Channel Not Functional When Word Length Exceeds 16 Bits */
244#define ANOMALY_05000326 (__SILICON_REVISION__ > 3)
245/* New Feature: 24-Bit SPI Boot Mode Support (Not Available On Older Silicon) */
246#define ANOMALY_05000331 (__SILICON_REVISION__ < 5)
247/* New Feature: Slave SPI Boot Mode Supported (Not Available On Older Silicon) */
248#define ANOMALY_05000332 (__SILICON_REVISION__ < 5)
249/* Flag Data Register Writes One SCLK Cycle After Edge Is Detected May Clear Interrupt Status */
250#define ANOMALY_05000333 (__SILICON_REVISION__ < 5)
251/* New Feature: Additional PPI Frame Sync Sampling Options (Not Available on Older Silicon) */
252#define ANOMALY_05000339 (__SILICON_REVISION__ < 5)
253/* Memory DMA FIFO Causes Throughput Degradation on Writes to External Memory */
254#define ANOMALY_05000343 (__SILICON_REVISION__ < 5)
255/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
256#define ANOMALY_05000357 (1)
257/* Conflicting Column Address Widths Causes SDRAM Errors */
258#define ANOMALY_05000362 (1)
259/* UART Break Signal Issues */
260#define ANOMALY_05000363 (__SILICON_REVISION__ < 5)
261/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
262#define ANOMALY_05000366 (1)
263/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
264#define ANOMALY_05000371 (1)
265/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
266#define ANOMALY_05000403 (1)
267
268/* Anomalies that don't exist on this proc */
269#define ANOMALY_05000158 (0)
270#define ANOMALY_05000183 (0)
271#define ANOMALY_05000273 (0)
272#define ANOMALY_05000311 (0)
273
274#endif
diff --git a/include/asm-blackfin/mach-bf561/bf561.h b/include/asm-blackfin/mach-bf561/bf561.h
deleted file mode 100644
index 3ef9e5f36136..000000000000
--- a/include/asm-blackfin/mach-bf561/bf561.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf561/bf561.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF561
8 *
9 * Modified:
10 * Copyright 2004-2006 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_BF561_H__
31#define __MACH_BF561_H__
32
33#define SUPPORTED_REVID 0x3
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 * Blackfin Cache setup
54 */
55
56
57#define BFIN_ISUBBANKS 4
58#define BFIN_IWAYS 4
59#define BFIN_ILINES 32
60
61#define BFIN_DSUBBANKS 4
62#define BFIN_DWAYS 2
63#define BFIN_DLINES 64
64
65#define WAY0_L 0x1
66#define WAY1_L 0x2
67#define WAY01_L 0x3
68#define WAY2_L 0x4
69#define WAY02_L 0x5
70#define WAY12_L 0x6
71#define WAY012_L 0x7
72
73#define WAY3_L 0x8
74#define WAY03_L 0x9
75#define WAY13_L 0xA
76#define WAY013_L 0xB
77
78#define WAY32_L 0xC
79#define WAY320_L 0xD
80#define WAY321_L 0xE
81#define WAYALL_L 0xF
82
83#define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
84
85/* IAR0 BIT FIELDS */
86#define PLL_WAKEUP_BIT 0xFFFFFFFF
87#define DMA1_ERROR_BIT 0xFFFFFF0F
88#define DMA2_ERROR_BIT 0xFFFFF0FF
89#define IMDMA_ERROR_BIT 0xFFFF0FFF
90#define PPI1_ERROR_BIT 0xFFF0FFFF
91#define PPI2_ERROR_BIT 0xFF0FFFFF
92#define SPORT0_ERROR_BIT 0xF0FFFFFF
93#define SPORT1_ERROR_BIT 0x0FFFFFFF
94/* IAR1 BIT FIELDS */
95#define SPI_ERROR_BIT 0xFFFFFFFF
96#define UART_ERROR_BIT 0xFFFFFF0F
97#define RESERVED_ERROR_BIT 0xFFFFF0FF
98#define DMA1_0_BIT 0xFFFF0FFF
99#define DMA1_1_BIT 0xFFF0FFFF
100#define DMA1_2_BIT 0xFF0FFFFF
101#define DMA1_3_BIT 0xF0FFFFFF
102#define DMA1_4_BIT 0x0FFFFFFF
103/* IAR2 BIT FIELDS */
104#define DMA1_5_BIT 0xFFFFFFFF
105#define DMA1_6_BIT 0xFFFFFF0F
106#define DMA1_7_BIT 0xFFFFF0FF
107#define DMA1_8_BIT 0xFFFF0FFF
108#define DMA1_9_BIT 0xFFF0FFFF
109#define DMA1_10_BIT 0xFF0FFFFF
110#define DMA1_11_BIT 0xF0FFFFFF
111#define DMA2_0_BIT 0x0FFFFFFF
112/* IAR3 BIT FIELDS */
113#define DMA2_1_BIT 0xFFFFFFFF
114#define DMA2_2_BIT 0xFFFFFF0F
115#define DMA2_3_BIT 0xFFFFF0FF
116#define DMA2_4_BIT 0xFFFF0FFF
117#define DMA2_5_BIT 0xFFF0FFFF
118#define DMA2_6_BIT 0xFF0FFFFF
119#define DMA2_7_BIT 0xF0FFFFFF
120#define DMA2_8_BIT 0x0FFFFFFF
121/* IAR4 BIT FIELDS */
122#define DMA2_9_BIT 0xFFFFFFFF
123#define DMA2_10_BIT 0xFFFFFF0F
124#define DMA2_11_BIT 0xFFFFF0FF
125#define TIMER0_BIT 0xFFFF0FFF
126#define TIMER1_BIT 0xFFF0FFFF
127#define TIMER2_BIT 0xFF0FFFFF
128#define TIMER3_BIT 0xF0FFFFFF
129#define TIMER4_BIT 0x0FFFFFFF
130/* IAR5 BIT FIELDS */
131#define TIMER5_BIT 0xFFFFFFFF
132#define TIMER6_BIT 0xFFFFFF0F
133#define TIMER7_BIT 0xFFFFF0FF
134#define TIMER8_BIT 0xFFFF0FFF
135#define TIMER9_BIT 0xFFF0FFFF
136#define TIMER10_BIT 0xFF0FFFFF
137#define TIMER11_BIT 0xF0FFFFFF
138#define PROG0_INTA_BIT 0x0FFFFFFF
139/* IAR6 BIT FIELDS */
140#define PROG0_INTB_BIT 0xFFFFFFFF
141#define PROG1_INTA_BIT 0xFFFFFF0F
142#define PROG1_INTB_BIT 0xFFFFF0FF
143#define PROG2_INTA_BIT 0xFFFF0FFF
144#define PROG2_INTB_BIT 0xFFF0FFFF
145#define DMA1_WRRD0_BIT 0xFF0FFFFF
146#define DMA1_WRRD1_BIT 0xF0FFFFFF
147#define DMA2_WRRD0_BIT 0x0FFFFFFF
148/* IAR7 BIT FIELDS */
149#define DMA2_WRRD1_BIT 0xFFFFFFFF
150#define IMDMA_WRRD0_BIT 0xFFFFFF0F
151#define IMDMA_WRRD1_BIT 0xFFFFF0FF
152#define WATCH_BIT 0xFFFF0FFF
153#define RESERVED_1_BIT 0xFFF0FFFF
154#define RESERVED_2_BIT 0xFF0FFFFF
155#define SUPPLE_0_BIT 0xF0FFFFFF
156#define SUPPLE_1_BIT 0x0FFFFFFF
157
158/* Miscellaneous Values */
159
160/****************************** EBIU Settings ********************************/
161#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
162#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
163
164#if defined(CONFIG_C_AMBEN_ALL)
165#define V_AMBEN AMBEN_ALL
166#elif defined(CONFIG_C_AMBEN)
167#define V_AMBEN 0x0
168#elif defined(CONFIG_C_AMBEN_B0)
169#define V_AMBEN AMBEN_B0
170#elif defined(CONFIG_C_AMBEN_B0_B1)
171#define V_AMBEN AMBEN_B0_B1
172#elif defined(CONFIG_C_AMBEN_B0_B1_B2)
173#define V_AMBEN AMBEN_B0_B1_B2
174#endif
175
176#ifdef CONFIG_C_AMCKEN
177#define V_AMCKEN AMCKEN
178#else
179#define V_AMCKEN 0x0
180#endif
181
182#ifdef CONFIG_C_B0PEN
183#define V_B0PEN 0x10
184#else
185#define V_B0PEN 0x00
186#endif
187
188#ifdef CONFIG_C_B1PEN
189#define V_B1PEN 0x20
190#else
191#define V_B1PEN 0x00
192#endif
193
194#ifdef CONFIG_C_B2PEN
195#define V_B2PEN 0x40
196#else
197#define V_B2PEN 0x00
198#endif
199
200#ifdef CONFIG_C_B3PEN
201#define V_B3PEN 0x80
202#else
203#define V_B3PEN 0x00
204#endif
205
206#ifdef CONFIG_C_CDPRIO
207#define V_CDPRIO 0x100
208#else
209#define V_CDPRIO 0x0
210#endif
211
212#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO | V_B0PEN | V_B1PEN | V_B2PEN | V_B3PEN | 0x0002)
213
214#ifdef CONFIG_BF561
215#define CPU "BF561"
216#define CPUID 0x027bb000
217#endif
218#ifndef CPU
219#define CPU "UNKNOWN"
220#define CPUID 0x0
221#endif
222
223#endif /* __MACH_BF561_H__ */
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
deleted file mode 100644
index 8aa02780e642..000000000000
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ /dev/null
@@ -1,164 +0,0 @@
1/*
2 * file: include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * blackfin serial driver head file
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#include <linux/serial.h>
33#include <asm/dma.h>
34#include <asm/portmux.h>
35
36#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
37#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
38#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER))
39#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
40#define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR))
41#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
42#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
43
44#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
45#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
46#define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v)
47#define UART_SET_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v))
48#define UART_CLEAR_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v))
49#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
50#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
51#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
52
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
62#ifdef CONFIG_BFIN_UART0_CTSRTS
63# define CONFIG_SERIAL_BFIN_CTSRTS
64# ifndef CONFIG_UART0_CTS_PIN
65# define CONFIG_UART0_CTS_PIN -1
66# endif
67# ifndef CONFIG_UART0_RTS_PIN
68# define CONFIG_UART0_RTS_PIN -1
69# endif
70#endif
71
72struct bfin_serial_port {
73 struct uart_port port;
74 unsigned int old_status;
75 unsigned int lsr;
76#ifdef CONFIG_SERIAL_BFIN_DMA
77 int tx_done;
78 int tx_count;
79 struct circ_buf rx_dma_buf;
80 struct timer_list rx_dma_timer;
81 int rx_dma_nrows;
82 unsigned int tx_dma_channel;
83 unsigned int rx_dma_channel;
84 struct work_struct tx_dma_workqueue;
85#else
86# if ANOMALY_05000230
87 unsigned int anomaly_threshold;
88# endif
89#endif
90#ifdef CONFIG_SERIAL_BFIN_CTSRTS
91 struct timer_list cts_timer;
92 int cts_pin;
93 int rts_pin;
94#endif
95};
96
97/* The hardware clears the LSR bits upon read, so we need to cache
98 * some of the more fun bits in software so they don't get lost
99 * when checking the LSR in other code paths (TX).
100 */
101static inline unsigned int UART_GET_LSR(struct bfin_serial_port *uart)
102{
103 unsigned int lsr = bfin_read16(uart->port.membase + OFFSET_LSR);
104 uart->lsr |= (lsr & (BI|FE|PE|OE));
105 return lsr | uart->lsr;
106}
107
108static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
109{
110 uart->lsr = 0;
111 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
112}
113
114struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS];
115struct bfin_serial_res {
116 unsigned long uart_base_addr;
117 int uart_irq;
118#ifdef CONFIG_SERIAL_BFIN_DMA
119 unsigned int uart_tx_dma_channel;
120 unsigned int uart_rx_dma_channel;
121#endif
122#ifdef CONFIG_SERIAL_BFIN_CTSRTS
123 int uart_cts_pin;
124 int uart_rts_pin;
125#endif
126};
127
128struct bfin_serial_res bfin_serial_resource[] = {
129 {
130 0xFFC00400,
131 IRQ_UART_RX,
132#ifdef CONFIG_SERIAL_BFIN_DMA
133 CH_UART_TX,
134 CH_UART_RX,
135#endif
136#ifdef CONFIG_BFIN_UART0_CTSRTS
137 CONFIG_UART0_CTS_PIN,
138 CONFIG_UART0_RTS_PIN,
139#endif
140 }
141};
142
143#define DRIVER_NAME "bfin-uart"
144
145int nr_ports = BFIN_UART_NR_PORTS;
146static void bfin_serial_hw_init(struct bfin_serial_port *uart)
147{
148
149#ifdef CONFIG_SERIAL_BFIN_UART0
150 peripheral_request(P_UART0_TX, DRIVER_NAME);
151 peripheral_request(P_UART0_RX, DRIVER_NAME);
152#endif
153
154#ifdef CONFIG_SERIAL_BFIN_CTSRTS
155 if (uart->cts_pin >= 0) {
156 gpio_request(uart->cts_pin, DRIVER_NAME);
157 gpio_direction_input(uart->cts_pin);
158 }
159 if (uart->rts_pin >= 0) {
160 gpio_request(uart->rts_pin, DRIVER_NAME);
161 gpio_direction_input(uart->rts_pin, 0);
162 }
163#endif
164}
diff --git a/include/asm-blackfin/mach-bf561/bfin_sir.h b/include/asm-blackfin/mach-bf561/bfin_sir.h
deleted file mode 100644
index 9bb87e9e2e9b..000000000000
--- a/include/asm-blackfin/mach-bf561/bfin_sir.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 * Blackfin Infra-red Driver
3 *
4 * Copyright 2006-2008 Analog Devices Inc.
5 *
6 * Enter bugs at http://blackfin.uclinux.org/
7 *
8 * Licensed under the GPL-2 or later.
9 *
10 */
11
12#include <linux/serial.h>
13#include <asm/dma.h>
14#include <asm/portmux.h>
15
16#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR)
17#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL)
18#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER)
19#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH)
20#define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR)
21#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR)
22#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
23
24#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
25#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
26#define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v)
27#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
28#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
29#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
30
31#ifdef CONFIG_SIR_BFIN_DMA
32struct dma_rx_buf {
33 char *buf;
34 int head;
35 int tail;
36 };
37#endif /* CONFIG_SIR_BFIN_DMA */
38
39struct bfin_sir_port {
40 unsigned char __iomem *membase;
41 unsigned int irq;
42 unsigned int lsr;
43 unsigned long clk;
44 struct net_device *dev;
45#ifdef CONFIG_SIR_BFIN_DMA
46 int tx_done;
47 struct dma_rx_buf rx_dma_buf;
48 struct timer_list rx_dma_timer;
49 int rx_dma_nrows;
50#endif /* CONFIG_SIR_BFIN_DMA */
51 unsigned int tx_dma_channel;
52 unsigned int rx_dma_channel;
53};
54
55struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS];
56
57struct bfin_sir_port_res {
58 unsigned long base_addr;
59 int irq;
60 unsigned int rx_dma_channel;
61 unsigned int tx_dma_channel;
62};
63
64struct bfin_sir_port_res bfin_sir_port_resource[] = {
65#ifdef CONFIG_BFIN_SIR0
66 {
67 0xFFC00400,
68 IRQ_UART_RX,
69 CH_UART_RX,
70 CH_UART_TX,
71 },
72#endif
73};
74
75int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource);
76
77struct bfin_sir_self {
78 struct bfin_sir_port *sir_port;
79 spinlock_t lock;
80 unsigned int open;
81 int speed;
82 int newspeed;
83
84 struct sk_buff *txskb;
85 struct sk_buff *rxskb;
86 struct net_device_stats stats;
87 struct device *dev;
88 struct irlap_cb *irlap;
89 struct qos_info qos;
90
91 iobuff_t tx_buff;
92 iobuff_t rx_buff;
93
94 struct work_struct work;
95 int mtt;
96};
97
98static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port)
99{
100 unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR);
101 port->lsr |= (lsr & (BI|FE|PE|OE));
102 return lsr | port->lsr;
103}
104
105static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
106{
107 port->lsr = 0;
108 bfin_read16(port->membase + OFFSET_LSR);
109}
110
111#define DRIVER_NAME "bfin_sir"
112
113static int bfin_sir_hw_init(void)
114{
115 int ret = -ENODEV;
116#ifdef CONFIG_BFIN_SIR0
117 ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
118 if (ret)
119 return ret;
120 ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
121 if (ret)
122 return ret;
123#endif
124 return ret;
125}
diff --git a/include/asm-blackfin/mach-bf561/blackfin.h b/include/asm-blackfin/mach-bf561/blackfin.h
deleted file mode 100644
index 0ea8666e6764..000000000000
--- a/include/asm-blackfin/mach-bf561/blackfin.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf561/blackfin.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _MACH_BLACKFIN_H_
32#define _MACH_BLACKFIN_H_
33
34#define BF561_FAMILY
35
36#include "bf561.h"
37#include "mem_map.h"
38#include "defBF561.h"
39#include "anomaly.h"
40
41#if !defined(__ASSEMBLY__)
42#include "cdefBF561.h"
43#endif
44
45#define bfin_read_FIO_FLAG_D() bfin_read_FIO0_FLAG_D()
46#define bfin_write_FIO_FLAG_D(val) bfin_write_FIO0_FLAG_D(val)
47#define bfin_read_FIO_DIR() bfin_read_FIO0_DIR()
48#define bfin_write_FIO_DIR(val) bfin_write_FIO0_DIR(val)
49#define bfin_read_FIO_INEN() bfin_read_FIO0_INEN()
50#define bfin_write_FIO_INEN(val) bfin_write_FIO0_INEN(val)
51
52#define SIC_IWR0 SICA_IWR0
53#define SIC_IWR1 SICA_IWR1
54#define SIC_IAR0 SICA_IAR0
55#define bfin_write_SIC_IMASK0 bfin_write_SICA_IMASK0
56#define bfin_write_SIC_IMASK1 bfin_write_SICA_IMASK1
57#define bfin_write_SIC_IWR0 bfin_write_SICA_IWR0
58#define bfin_write_SIC_IWR1 bfin_write_SICA_IWR1
59
60#define bfin_read_SIC_IMASK0 bfin_read_SICA_IMASK0
61#define bfin_read_SIC_IMASK1 bfin_read_SICA_IMASK1
62#define bfin_read_SIC_IWR0 bfin_read_SICA_IWR0
63#define bfin_read_SIC_IWR1 bfin_read_SICA_IWR1
64#define bfin_read_SIC_ISR0 bfin_read_SICA_ISR0
65#define bfin_read_SIC_ISR1 bfin_read_SICA_ISR1
66
67#define bfin_read_SIC_IMASK(x) bfin_read32(SICA_IMASK0 + (x << 2))
68#define bfin_write_SIC_IMASK(x, val) bfin_write32((SICA_IMASK0 + (x << 2)), val)
69#define bfin_read_SIC_ISR(x) bfin_read32(SICA_ISR0 + (x << 2))
70#define bfin_write_SIC_ISR(x, val) bfin_write32((SICA_ISR0 + (x << 2)), val)
71
72#define BFIN_UART_NR_PORTS 1
73
74#define OFFSET_THR 0x00 /* Transmit Holding register */
75#define OFFSET_RBR 0x00 /* Receive Buffer register */
76#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
77#define OFFSET_IER 0x04 /* Interrupt Enable Register */
78#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
79#define OFFSET_IIR 0x08 /* Interrupt Identification Register */
80#define OFFSET_LCR 0x0C /* Line Control Register */
81#define OFFSET_MCR 0x10 /* Modem Control Register */
82#define OFFSET_LSR 0x14 /* Line Status Register */
83#define OFFSET_MSR 0x18 /* Modem Status Register */
84#define OFFSET_SCR 0x1C /* SCR Scratch Register */
85#define OFFSET_GCTL 0x24 /* Global Control Register */
86
87#endif /* _MACH_BLACKFIN_H_ */
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h
deleted file mode 100644
index b07ffccd66dd..000000000000
--- a/include/asm-blackfin/mach-bf561/cdefBF561.h
+++ /dev/null
@@ -1,1579 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf561/cdefBF561.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: C POINTERS TO SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF561
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#ifndef _CDEF_BF561_H
32#define _CDEF_BF561_H
33
34#include <asm/blackfin.h>
35
36/* include all Core registers and bit definitions */
37#include "defBF561.h"
38
39/*include core specific register pointer definitions*/
40#include <asm/mach-common/cdef_LPBlackfin.h>
41
42#include <asm/system.h>
43
44/*********************************************************************************** */
45/* System MMR Register Map */
46/*********************************************************************************** */
47
48/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
49#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
50/* Writing to PLL_CTL initiates a PLL relock sequence. */
51static __inline__ void bfin_write_PLL_CTL(unsigned int val)
52{
53 unsigned long flags, iwr0, iwr1;
54
55 if (val == bfin_read_PLL_CTL())
56 return;
57
58 local_irq_save(flags);
59 /* Enable the PLL Wakeup bit in SIC IWR */
60 iwr0 = bfin_read32(SICA_IWR0);
61 iwr1 = bfin_read32(SICA_IWR1);
62 /* Only allow PPL Wakeup) */
63 bfin_write32(SICA_IWR0, IWR_ENABLE(0));
64 bfin_write32(SICA_IWR1, 0);
65
66 bfin_write16(PLL_CTL, val);
67 SSYNC();
68 asm("IDLE;");
69
70 bfin_write32(SICA_IWR0, iwr0);
71 bfin_write32(SICA_IWR1, iwr1);
72 local_irq_restore(flags);
73}
74#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
75#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val)
76#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
77/* Writing to VR_CTL initiates a PLL relock sequence. */
78static __inline__ void bfin_write_VR_CTL(unsigned int val)
79{
80 unsigned long flags, iwr0, iwr1;
81
82 if (val == bfin_read_VR_CTL())
83 return;
84
85 local_irq_save(flags);
86 /* Enable the PLL Wakeup bit in SIC IWR */
87 iwr0 = bfin_read32(SICA_IWR0);
88 iwr1 = bfin_read32(SICA_IWR1);
89 /* Only allow PPL Wakeup) */
90 bfin_write32(SICA_IWR0, IWR_ENABLE(0));
91 bfin_write32(SICA_IWR1, 0);
92
93 bfin_write16(VR_CTL, val);
94 SSYNC();
95 asm("IDLE;");
96
97 bfin_write32(SICA_IWR0, iwr0);
98 bfin_write32(SICA_IWR1, iwr1);
99 local_irq_restore(flags);
100}
101#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
102#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val)
103#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
104#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val)
105#define bfin_read_CHIPID() bfin_read32(CHIPID)
106
107/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */
108#define bfin_read_SWRST() bfin_read_SICA_SWRST()
109#define bfin_write_SWRST(val) bfin_write_SICA_SWRST(val)
110#define bfin_read_SYSCR() bfin_read_SICA_SYSCR()
111#define bfin_write_SYSCR(val) bfin_write_SICA_SYSCR(val)
112
113/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */
114#define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST)
115#define bfin_write_SICA_SWRST(val) bfin_write16(SICA_SWRST,val)
116#define bfin_read_SICA_SYSCR() bfin_read16(SICA_SYSCR)
117#define bfin_write_SICA_SYSCR(val) bfin_write16(SICA_SYSCR,val)
118#define bfin_read_SICA_RVECT() bfin_read16(SICA_RVECT)
119#define bfin_write_SICA_RVECT(val) bfin_write16(SICA_RVECT,val)
120#define bfin_read_SICA_IMASK() bfin_read32(SICA_IMASK)
121#define bfin_write_SICA_IMASK(val) bfin_write32(SICA_IMASK,val)
122#define bfin_read_SICA_IMASK0() bfin_read32(SICA_IMASK0)
123#define bfin_write_SICA_IMASK0(val) bfin_write32(SICA_IMASK0,val)
124#define bfin_read_SICA_IMASK1() bfin_read32(SICA_IMASK1)
125#define bfin_write_SICA_IMASK1(val) bfin_write32(SICA_IMASK1,val)
126#define bfin_read_SICA_IAR0() bfin_read32(SICA_IAR0)
127#define bfin_write_SICA_IAR0(val) bfin_write32(SICA_IAR0,val)
128#define bfin_read_SICA_IAR1() bfin_read32(SICA_IAR1)
129#define bfin_write_SICA_IAR1(val) bfin_write32(SICA_IAR1,val)
130#define bfin_read_SICA_IAR2() bfin_read32(SICA_IAR2)
131#define bfin_write_SICA_IAR2(val) bfin_write32(SICA_IAR2,val)
132#define bfin_read_SICA_IAR3() bfin_read32(SICA_IAR3)
133#define bfin_write_SICA_IAR3(val) bfin_write32(SICA_IAR3,val)
134#define bfin_read_SICA_IAR4() bfin_read32(SICA_IAR4)
135#define bfin_write_SICA_IAR4(val) bfin_write32(SICA_IAR4,val)
136#define bfin_read_SICA_IAR5() bfin_read32(SICA_IAR5)
137#define bfin_write_SICA_IAR5(val) bfin_write32(SICA_IAR5,val)
138#define bfin_read_SICA_IAR6() bfin_read32(SICA_IAR6)
139#define bfin_write_SICA_IAR6(val) bfin_write32(SICA_IAR6,val)
140#define bfin_read_SICA_IAR7() bfin_read32(SICA_IAR7)
141#define bfin_write_SICA_IAR7(val) bfin_write32(SICA_IAR7,val)
142#define bfin_read_SICA_ISR0() bfin_read32(SICA_ISR0)
143#define bfin_write_SICA_ISR0(val) bfin_write32(SICA_ISR0,val)
144#define bfin_read_SICA_ISR1() bfin_read32(SICA_ISR1)
145#define bfin_write_SICA_ISR1(val) bfin_write32(SICA_ISR1,val)
146#define bfin_read_SICA_IWR0() bfin_read32(SICA_IWR0)
147#define bfin_write_SICA_IWR0(val) bfin_write32(SICA_IWR0,val)
148#define bfin_read_SICA_IWR1() bfin_read32(SICA_IWR1)
149#define bfin_write_SICA_IWR1(val) bfin_write32(SICA_IWR1,val)
150
151/* System Reset and Interrupt Controller registers for Core B (0xFFC0 1100-0xFFC0 11FF) */
152#define bfin_read_SICB_SWRST() bfin_read16(SICB_SWRST)
153#define bfin_write_SICB_SWRST(val) bfin_write16(SICB_SWRST,val)
154#define bfin_read_SICB_SYSCR() bfin_read16(SICB_SYSCR)
155#define bfin_write_SICB_SYSCR(val) bfin_write16(SICB_SYSCR,val)
156#define bfin_read_SICB_RVECT() bfin_read16(SICB_RVECT)
157#define bfin_write_SICB_RVECT(val) bfin_write16(SICB_RVECT,val)
158#define bfin_read_SICB_IMASK0() bfin_read32(SICB_IMASK0)
159#define bfin_write_SICB_IMASK0(val) bfin_write32(SICB_IMASK0,val)
160#define bfin_read_SICB_IMASK1() bfin_read32(SICB_IMASK1)
161#define bfin_write_SICB_IMASK1(val) bfin_write32(SICB_IMASK1,val)
162#define bfin_read_SICB_IAR0() bfin_read32(SICB_IAR0)
163#define bfin_write_SICB_IAR0(val) bfin_write32(SICB_IAR0,val)
164#define bfin_read_SICB_IAR1() bfin_read32(SICB_IAR1)
165#define bfin_write_SICB_IAR1(val) bfin_write32(SICB_IAR1,val)
166#define bfin_read_SICB_IAR2() bfin_read32(SICB_IAR2)
167#define bfin_write_SICB_IAR2(val) bfin_write32(SICB_IAR2,val)
168#define bfin_read_SICB_IAR3() bfin_read32(SICB_IAR3)
169#define bfin_write_SICB_IAR3(val) bfin_write32(SICB_IAR3,val)
170#define bfin_read_SICB_IAR4() bfin_read32(SICB_IAR4)
171#define bfin_write_SICB_IAR4(val) bfin_write32(SICB_IAR4,val)
172#define bfin_read_SICB_IAR5() bfin_read32(SICB_IAR5)
173#define bfin_write_SICB_IAR5(val) bfin_write32(SICB_IAR5,val)
174#define bfin_read_SICB_IAR6() bfin_read32(SICB_IAR6)
175#define bfin_write_SICB_IAR6(val) bfin_write32(SICB_IAR6,val)
176#define bfin_read_SICB_IAR7() bfin_read32(SICB_IAR7)
177#define bfin_write_SICB_IAR7(val) bfin_write32(SICB_IAR7,val)
178#define bfin_read_SICB_ISR0() bfin_read32(SICB_ISR0)
179#define bfin_write_SICB_ISR0(val) bfin_write32(SICB_ISR0,val)
180#define bfin_read_SICB_ISR1() bfin_read32(SICB_ISR1)
181#define bfin_write_SICB_ISR1(val) bfin_write32(SICB_ISR1,val)
182#define bfin_read_SICB_IWR0() bfin_read32(SICB_IWR0)
183#define bfin_write_SICB_IWR0(val) bfin_write32(SICB_IWR0,val)
184#define bfin_read_SICB_IWR1() bfin_read32(SICB_IWR1)
185#define bfin_write_SICB_IWR1(val) bfin_write32(SICB_IWR1,val)
186/* Watchdog Timer registers for Core A (0xFFC0 0200-0xFFC0 02FF) */
187#define bfin_read_WDOGA_CTL() bfin_read16(WDOGA_CTL)
188#define bfin_write_WDOGA_CTL(val) bfin_write16(WDOGA_CTL,val)
189#define bfin_read_WDOGA_CNT() bfin_read32(WDOGA_CNT)
190#define bfin_write_WDOGA_CNT(val) bfin_write32(WDOGA_CNT,val)
191#define bfin_read_WDOGA_STAT() bfin_read32(WDOGA_STAT)
192#define bfin_write_WDOGA_STAT(val) bfin_write32(WDOGA_STAT,val)
193
194/* Watchdog Timer registers for Core B (0xFFC0 1200-0xFFC0 12FF) */
195#define bfin_read_WDOGB_CTL() bfin_read16(WDOGB_CTL)
196#define bfin_write_WDOGB_CTL(val) bfin_write16(WDOGB_CTL,val)
197#define bfin_read_WDOGB_CNT() bfin_read32(WDOGB_CNT)
198#define bfin_write_WDOGB_CNT(val) bfin_write32(WDOGB_CNT,val)
199#define bfin_read_WDOGB_STAT() bfin_read32(WDOGB_STAT)
200#define bfin_write_WDOGB_STAT(val) bfin_write32(WDOGB_STAT,val)
201
202/* UART Controller (0xFFC00400 - 0xFFC004FF) */
203#define bfin_read_UART_THR() bfin_read16(UART_THR)
204#define bfin_write_UART_THR(val) bfin_write16(UART_THR,val)
205#define bfin_read_UART_RBR() bfin_read16(UART_RBR)
206#define bfin_write_UART_RBR(val) bfin_write16(UART_RBR,val)
207#define bfin_read_UART_DLL() bfin_read16(UART_DLL)
208#define bfin_write_UART_DLL(val) bfin_write16(UART_DLL,val)
209#define bfin_read_UART_IER() bfin_read16(UART_IER)
210#define bfin_write_UART_IER(val) bfin_write16(UART_IER,val)
211#define bfin_read_UART_DLH() bfin_read16(UART_DLH)
212#define bfin_write_UART_DLH(val) bfin_write16(UART_DLH,val)
213#define bfin_read_UART_IIR() bfin_read16(UART_IIR)
214#define bfin_write_UART_IIR(val) bfin_write16(UART_IIR,val)
215#define bfin_read_UART_LCR() bfin_read16(UART_LCR)
216#define bfin_write_UART_LCR(val) bfin_write16(UART_LCR,val)
217#define bfin_read_UART_MCR() bfin_read16(UART_MCR)
218#define bfin_write_UART_MCR(val) bfin_write16(UART_MCR,val)
219#define bfin_read_UART_LSR() bfin_read16(UART_LSR)
220#define bfin_write_UART_LSR(val) bfin_write16(UART_LSR,val)
221#define bfin_read_UART_MSR() bfin_read16(UART_MSR)
222#define bfin_write_UART_MSR(val) bfin_write16(UART_MSR,val)
223#define bfin_read_UART_SCR() bfin_read16(UART_SCR)
224#define bfin_write_UART_SCR(val) bfin_write16(UART_SCR,val)
225#define bfin_read_UART_GCTL() bfin_read16(UART_GCTL)
226#define bfin_write_UART_GCTL(val) bfin_write16(UART_GCTL,val)
227
228/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
229#define bfin_read_SPI_CTL() bfin_read16(SPI_CTL)
230#define bfin_write_SPI_CTL(val) bfin_write16(SPI_CTL,val)
231#define bfin_read_SPI_FLG() bfin_read16(SPI_FLG)
232#define bfin_write_SPI_FLG(val) bfin_write16(SPI_FLG,val)
233#define bfin_read_SPI_STAT() bfin_read16(SPI_STAT)
234#define bfin_write_SPI_STAT(val) bfin_write16(SPI_STAT,val)
235#define bfin_read_SPI_TDBR() bfin_read16(SPI_TDBR)
236#define bfin_write_SPI_TDBR(val) bfin_write16(SPI_TDBR,val)
237#define bfin_read_SPI_RDBR() bfin_read16(SPI_RDBR)
238#define bfin_write_SPI_RDBR(val) bfin_write16(SPI_RDBR,val)
239#define bfin_read_SPI_BAUD() bfin_read16(SPI_BAUD)
240#define bfin_write_SPI_BAUD(val) bfin_write16(SPI_BAUD,val)
241#define bfin_read_SPI_SHADOW() bfin_read16(SPI_SHADOW)
242#define bfin_write_SPI_SHADOW(val) bfin_write16(SPI_SHADOW,val)
243
244/* Timer 0-7 registers (0xFFC0 0600-0xFFC0 06FF) */
245#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
246#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG,val)
247#define bfin_read_TIMER0_COUNTER() bfin_read32(TIMER0_COUNTER)
248#define bfin_write_TIMER0_COUNTER(val) bfin_write32(TIMER0_COUNTER,val)
249#define bfin_read_TIMER0_PERIOD() bfin_read32(TIMER0_PERIOD)
250#define bfin_write_TIMER0_PERIOD(val) bfin_write32(TIMER0_PERIOD,val)
251#define bfin_read_TIMER0_WIDTH() bfin_read32(TIMER0_WIDTH)
252#define bfin_write_TIMER0_WIDTH(val) bfin_write32(TIMER0_WIDTH,val)
253#define bfin_read_TIMER1_CONFIG() bfin_read16(TIMER1_CONFIG)
254#define bfin_write_TIMER1_CONFIG(val) bfin_write16(TIMER1_CONFIG,val)
255#define bfin_read_TIMER1_COUNTER() bfin_read32(TIMER1_COUNTER)
256#define bfin_write_TIMER1_COUNTER(val) bfin_write32(TIMER1_COUNTER,val)
257#define bfin_read_TIMER1_PERIOD() bfin_read32(TIMER1_PERIOD)
258#define bfin_write_TIMER1_PERIOD(val) bfin_write32(TIMER1_PERIOD,val)
259#define bfin_read_TIMER1_WIDTH() bfin_read32(TIMER1_WIDTH)
260#define bfin_write_TIMER1_WIDTH(val) bfin_write32(TIMER1_WIDTH,val)
261#define bfin_read_TIMER2_CONFIG() bfin_read16(TIMER2_CONFIG)
262#define bfin_write_TIMER2_CONFIG(val) bfin_write16(TIMER2_CONFIG,val)
263#define bfin_read_TIMER2_COUNTER() bfin_read32(TIMER2_COUNTER)
264#define bfin_write_TIMER2_COUNTER(val) bfin_write32(TIMER2_COUNTER,val)
265#define bfin_read_TIMER2_PERIOD() bfin_read32(TIMER2_PERIOD)
266#define bfin_write_TIMER2_PERIOD(val) bfin_write32(TIMER2_PERIOD,val)
267#define bfin_read_TIMER2_WIDTH() bfin_read32(TIMER2_WIDTH)
268#define bfin_write_TIMER2_WIDTH(val) bfin_write32(TIMER2_WIDTH,val)
269#define bfin_read_TIMER3_CONFIG() bfin_read16(TIMER3_CONFIG)
270#define bfin_write_TIMER3_CONFIG(val) bfin_write16(TIMER3_CONFIG,val)
271#define bfin_read_TIMER3_COUNTER() bfin_read32(TIMER3_COUNTER)
272#define bfin_write_TIMER3_COUNTER(val) bfin_write32(TIMER3_COUNTER,val)
273#define bfin_read_TIMER3_PERIOD() bfin_read32(TIMER3_PERIOD)
274#define bfin_write_TIMER3_PERIOD(val) bfin_write32(TIMER3_PERIOD,val)
275#define bfin_read_TIMER3_WIDTH() bfin_read32(TIMER3_WIDTH)
276#define bfin_write_TIMER3_WIDTH(val) bfin_write32(TIMER3_WIDTH,val)
277#define bfin_read_TIMER4_CONFIG() bfin_read16(TIMER4_CONFIG)
278#define bfin_write_TIMER4_CONFIG(val) bfin_write16(TIMER4_CONFIG,val)
279#define bfin_read_TIMER4_COUNTER() bfin_read32(TIMER4_COUNTER)
280#define bfin_write_TIMER4_COUNTER(val) bfin_write32(TIMER4_COUNTER,val)
281#define bfin_read_TIMER4_PERIOD() bfin_read32(TIMER4_PERIOD)
282#define bfin_write_TIMER4_PERIOD(val) bfin_write32(TIMER4_PERIOD,val)
283#define bfin_read_TIMER4_WIDTH() bfin_read32(TIMER4_WIDTH)
284#define bfin_write_TIMER4_WIDTH(val) bfin_write32(TIMER4_WIDTH,val)
285#define bfin_read_TIMER5_CONFIG() bfin_read16(TIMER5_CONFIG)
286#define bfin_write_TIMER5_CONFIG(val) bfin_write16(TIMER5_CONFIG,val)
287#define bfin_read_TIMER5_COUNTER() bfin_read32(TIMER5_COUNTER)
288#define bfin_write_TIMER5_COUNTER(val) bfin_write32(TIMER5_COUNTER,val)
289#define bfin_read_TIMER5_PERIOD() bfin_read32(TIMER5_PERIOD)
290#define bfin_write_TIMER5_PERIOD(val) bfin_write32(TIMER5_PERIOD,val)
291#define bfin_read_TIMER5_WIDTH() bfin_read32(TIMER5_WIDTH)
292#define bfin_write_TIMER5_WIDTH(val) bfin_write32(TIMER5_WIDTH,val)
293#define bfin_read_TIMER6_CONFIG() bfin_read16(TIMER6_CONFIG)
294#define bfin_write_TIMER6_CONFIG(val) bfin_write16(TIMER6_CONFIG,val)
295#define bfin_read_TIMER6_COUNTER() bfin_read32(TIMER6_COUNTER)
296#define bfin_write_TIMER6_COUNTER(val) bfin_write32(TIMER6_COUNTER,val)
297#define bfin_read_TIMER6_PERIOD() bfin_read32(TIMER6_PERIOD)
298#define bfin_write_TIMER6_PERIOD(val) bfin_write32(TIMER6_PERIOD,val)
299#define bfin_read_TIMER6_WIDTH() bfin_read32(TIMER6_WIDTH)
300#define bfin_write_TIMER6_WIDTH(val) bfin_write32(TIMER6_WIDTH,val)
301#define bfin_read_TIMER7_CONFIG() bfin_read16(TIMER7_CONFIG)
302#define bfin_write_TIMER7_CONFIG(val) bfin_write16(TIMER7_CONFIG,val)
303#define bfin_read_TIMER7_COUNTER() bfin_read32(TIMER7_COUNTER)
304#define bfin_write_TIMER7_COUNTER(val) bfin_write32(TIMER7_COUNTER,val)
305#define bfin_read_TIMER7_PERIOD() bfin_read32(TIMER7_PERIOD)
306#define bfin_write_TIMER7_PERIOD(val) bfin_write32(TIMER7_PERIOD,val)
307#define bfin_read_TIMER7_WIDTH() bfin_read32(TIMER7_WIDTH)
308#define bfin_write_TIMER7_WIDTH(val) bfin_write32(TIMER7_WIDTH,val)
309
310/* Timer registers 8-11 (0xFFC0 1600-0xFFC0 16FF) */
311#define bfin_read_TMRS8_ENABLE() bfin_read16(TMRS8_ENABLE)
312#define bfin_write_TMRS8_ENABLE(val) bfin_write16(TMRS8_ENABLE,val)
313#define bfin_read_TMRS8_DISABLE() bfin_read16(TMRS8_DISABLE)
314#define bfin_write_TMRS8_DISABLE(val) bfin_write16(TMRS8_DISABLE,val)
315#define bfin_read_TMRS8_STATUS() bfin_read32(TMRS8_STATUS)
316#define bfin_write_TMRS8_STATUS(val) bfin_write32(TMRS8_STATUS,val)
317#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
318#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG,val)
319#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
320#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER,val)
321#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
322#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD,val)
323#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
324#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH,val)
325#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
326#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG,val)
327#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
328#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER,val)
329#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
330#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD,val)
331#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
332#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH,val)
333#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
334#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG,val)
335#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
336#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER,val)
337#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
338#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD,val)
339#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
340#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH,val)
341#define bfin_read_TIMER11_CONFIG() bfin_read16(TIMER11_CONFIG)
342#define bfin_write_TIMER11_CONFIG(val) bfin_write16(TIMER11_CONFIG,val)
343#define bfin_read_TIMER11_COUNTER() bfin_read32(TIMER11_COUNTER)
344#define bfin_write_TIMER11_COUNTER(val) bfin_write32(TIMER11_COUNTER,val)
345#define bfin_read_TIMER11_PERIOD() bfin_read32(TIMER11_PERIOD)
346#define bfin_write_TIMER11_PERIOD(val) bfin_write32(TIMER11_PERIOD,val)
347#define bfin_read_TIMER11_WIDTH() bfin_read32(TIMER11_WIDTH)
348#define bfin_write_TIMER11_WIDTH(val) bfin_write32(TIMER11_WIDTH,val)
349#define bfin_read_TMRS4_ENABLE() bfin_read16(TMRS4_ENABLE)
350#define bfin_write_TMRS4_ENABLE(val) bfin_write16(TMRS4_ENABLE,val)
351#define bfin_read_TMRS4_DISABLE() bfin_read16(TMRS4_DISABLE)
352#define bfin_write_TMRS4_DISABLE(val) bfin_write16(TMRS4_DISABLE,val)
353#define bfin_read_TMRS4_STATUS() bfin_read32(TMRS4_STATUS)
354#define bfin_write_TMRS4_STATUS(val) bfin_write32(TMRS4_STATUS,val)
355
356/* Programmable Flag 0 registers (0xFFC0 0700-0xFFC0 07FF) */
357#define bfin_read_FIO0_FLAG_D() bfin_read16(FIO0_FLAG_D)
358#define bfin_write_FIO0_FLAG_D(val) bfin_write16(FIO0_FLAG_D,val)
359#define bfin_read_FIO0_FLAG_C() bfin_read16(FIO0_FLAG_C)
360#define bfin_write_FIO0_FLAG_C(val) bfin_write16(FIO0_FLAG_C,val)
361#define bfin_read_FIO0_FLAG_S() bfin_read16(FIO0_FLAG_S)
362#define bfin_write_FIO0_FLAG_S(val) bfin_write16(FIO0_FLAG_S,val)
363#define bfin_read_FIO0_FLAG_T() bfin_read16(FIO0_FLAG_T)
364#define bfin_write_FIO0_FLAG_T(val) bfin_write16(FIO0_FLAG_T,val)
365#define bfin_read_FIO0_MASKA_D() bfin_read16(FIO0_MASKA_D)
366#define bfin_write_FIO0_MASKA_D(val) bfin_write16(FIO0_MASKA_D,val)
367#define bfin_read_FIO0_MASKA_C() bfin_read16(FIO0_MASKA_C)
368#define bfin_write_FIO0_MASKA_C(val) bfin_write16(FIO0_MASKA_C,val)
369#define bfin_read_FIO0_MASKA_S() bfin_read16(FIO0_MASKA_S)
370#define bfin_write_FIO0_MASKA_S(val) bfin_write16(FIO0_MASKA_S,val)
371#define bfin_read_FIO0_MASKA_T() bfin_read16(FIO0_MASKA_T)
372#define bfin_write_FIO0_MASKA_T(val) bfin_write16(FIO0_MASKA_T,val)
373#define bfin_read_FIO0_MASKB_D() bfin_read16(FIO0_MASKB_D)
374#define bfin_write_FIO0_MASKB_D(val) bfin_write16(FIO0_MASKB_D,val)
375#define bfin_read_FIO0_MASKB_C() bfin_read16(FIO0_MASKB_C)
376#define bfin_write_FIO0_MASKB_C(val) bfin_write16(FIO0_MASKB_C,val)
377#define bfin_read_FIO0_MASKB_S() bfin_read16(FIO0_MASKB_S)
378#define bfin_write_FIO0_MASKB_S(val) bfin_write16(FIO0_MASKB_S,val)
379#define bfin_read_FIO0_MASKB_T() bfin_read16(FIO0_MASKB_T)
380#define bfin_write_FIO0_MASKB_T(val) bfin_write16(FIO0_MASKB_T,val)
381#define bfin_read_FIO0_DIR() bfin_read16(FIO0_DIR)
382#define bfin_write_FIO0_DIR(val) bfin_write16(FIO0_DIR,val)
383#define bfin_read_FIO0_POLAR() bfin_read16(FIO0_POLAR)
384#define bfin_write_FIO0_POLAR(val) bfin_write16(FIO0_POLAR,val)
385#define bfin_read_FIO0_EDGE() bfin_read16(FIO0_EDGE)
386#define bfin_write_FIO0_EDGE(val) bfin_write16(FIO0_EDGE,val)
387#define bfin_read_FIO0_BOTH() bfin_read16(FIO0_BOTH)
388#define bfin_write_FIO0_BOTH(val) bfin_write16(FIO0_BOTH,val)
389#define bfin_read_FIO0_INEN() bfin_read16(FIO0_INEN)
390#define bfin_write_FIO0_INEN(val) bfin_write16(FIO0_INEN,val)
391/* Programmable Flag 1 registers (0xFFC0 1500-0xFFC0 15FF) */
392#define bfin_read_FIO1_FLAG_D() bfin_read16(FIO1_FLAG_D)
393#define bfin_write_FIO1_FLAG_D(val) bfin_write16(FIO1_FLAG_D,val)
394#define bfin_read_FIO1_FLAG_C() bfin_read16(FIO1_FLAG_C)
395#define bfin_write_FIO1_FLAG_C(val) bfin_write16(FIO1_FLAG_C,val)
396#define bfin_read_FIO1_FLAG_S() bfin_read16(FIO1_FLAG_S)
397#define bfin_write_FIO1_FLAG_S(val) bfin_write16(FIO1_FLAG_S,val)
398#define bfin_read_FIO1_FLAG_T() bfin_read16(FIO1_FLAG_T)
399#define bfin_write_FIO1_FLAG_T(val) bfin_write16(FIO1_FLAG_T,val)
400#define bfin_read_FIO1_MASKA_D() bfin_read16(FIO1_MASKA_D)
401#define bfin_write_FIO1_MASKA_D(val) bfin_write16(FIO1_MASKA_D,val)
402#define bfin_read_FIO1_MASKA_C() bfin_read16(FIO1_MASKA_C)
403#define bfin_write_FIO1_MASKA_C(val) bfin_write16(FIO1_MASKA_C,val)
404#define bfin_read_FIO1_MASKA_S() bfin_read16(FIO1_MASKA_S)
405#define bfin_write_FIO1_MASKA_S(val) bfin_write16(FIO1_MASKA_S,val)
406#define bfin_read_FIO1_MASKA_T() bfin_read16(FIO1_MASKA_T)
407#define bfin_write_FIO1_MASKA_T(val) bfin_write16(FIO1_MASKA_T,val)
408#define bfin_read_FIO1_MASKB_D() bfin_read16(FIO1_MASKB_D)
409#define bfin_write_FIO1_MASKB_D(val) bfin_write16(FIO1_MASKB_D,val)
410#define bfin_read_FIO1_MASKB_C() bfin_read16(FIO1_MASKB_C)
411#define bfin_write_FIO1_MASKB_C(val) bfin_write16(FIO1_MASKB_C,val)
412#define bfin_read_FIO1_MASKB_S() bfin_read16(FIO1_MASKB_S)
413#define bfin_write_FIO1_MASKB_S(val) bfin_write16(FIO1_MASKB_S,val)
414#define bfin_read_FIO1_MASKB_T() bfin_read16(FIO1_MASKB_T)
415#define bfin_write_FIO1_MASKB_T(val) bfin_write16(FIO1_MASKB_T,val)
416#define bfin_read_FIO1_DIR() bfin_read16(FIO1_DIR)
417#define bfin_write_FIO1_DIR(val) bfin_write16(FIO1_DIR,val)
418#define bfin_read_FIO1_POLAR() bfin_read16(FIO1_POLAR)
419#define bfin_write_FIO1_POLAR(val) bfin_write16(FIO1_POLAR,val)
420#define bfin_read_FIO1_EDGE() bfin_read16(FIO1_EDGE)
421#define bfin_write_FIO1_EDGE(val) bfin_write16(FIO1_EDGE,val)
422#define bfin_read_FIO1_BOTH() bfin_read16(FIO1_BOTH)
423#define bfin_write_FIO1_BOTH(val) bfin_write16(FIO1_BOTH,val)
424#define bfin_read_FIO1_INEN() bfin_read16(FIO1_INEN)
425#define bfin_write_FIO1_INEN(val) bfin_write16(FIO1_INEN,val)
426/* Programmable Flag registers (0xFFC0 1700-0xFFC0 17FF) */
427#define bfin_read_FIO2_FLAG_D() bfin_read16(FIO2_FLAG_D)
428#define bfin_write_FIO2_FLAG_D(val) bfin_write16(FIO2_FLAG_D,val)
429#define bfin_read_FIO2_FLAG_C() bfin_read16(FIO2_FLAG_C)
430#define bfin_write_FIO2_FLAG_C(val) bfin_write16(FIO2_FLAG_C,val)
431#define bfin_read_FIO2_FLAG_S() bfin_read16(FIO2_FLAG_S)
432#define bfin_write_FIO2_FLAG_S(val) bfin_write16(FIO2_FLAG_S,val)
433#define bfin_read_FIO2_FLAG_T() bfin_read16(FIO2_FLAG_T)
434#define bfin_write_FIO2_FLAG_T(val) bfin_write16(FIO2_FLAG_T,val)
435#define bfin_read_FIO2_MASKA_D() bfin_read16(FIO2_MASKA_D)
436#define bfin_write_FIO2_MASKA_D(val) bfin_write16(FIO2_MASKA_D,val)
437#define bfin_read_FIO2_MASKA_C() bfin_read16(FIO2_MASKA_C)
438#define bfin_write_FIO2_MASKA_C(val) bfin_write16(FIO2_MASKA_C,val)
439#define bfin_read_FIO2_MASKA_S() bfin_read16(FIO2_MASKA_S)
440#define bfin_write_FIO2_MASKA_S(val) bfin_write16(FIO2_MASKA_S,val)
441#define bfin_read_FIO2_MASKA_T() bfin_read16(FIO2_MASKA_T)
442#define bfin_write_FIO2_MASKA_T(val) bfin_write16(FIO2_MASKA_T,val)
443#define bfin_read_FIO2_MASKB_D() bfin_read16(FIO2_MASKB_D)
444#define bfin_write_FIO2_MASKB_D(val) bfin_write16(FIO2_MASKB_D,val)
445#define bfin_read_FIO2_MASKB_C() bfin_read16(FIO2_MASKB_C)
446#define bfin_write_FIO2_MASKB_C(val) bfin_write16(FIO2_MASKB_C,val)
447#define bfin_read_FIO2_MASKB_S() bfin_read16(FIO2_MASKB_S)
448#define bfin_write_FIO2_MASKB_S(val) bfin_write16(FIO2_MASKB_S,val)
449#define bfin_read_FIO2_MASKB_T() bfin_read16(FIO2_MASKB_T)
450#define bfin_write_FIO2_MASKB_T(val) bfin_write16(FIO2_MASKB_T,val)
451#define bfin_read_FIO2_DIR() bfin_read16(FIO2_DIR)
452#define bfin_write_FIO2_DIR(val) bfin_write16(FIO2_DIR,val)
453#define bfin_read_FIO2_POLAR() bfin_read16(FIO2_POLAR)
454#define bfin_write_FIO2_POLAR(val) bfin_write16(FIO2_POLAR,val)
455#define bfin_read_FIO2_EDGE() bfin_read16(FIO2_EDGE)
456#define bfin_write_FIO2_EDGE(val) bfin_write16(FIO2_EDGE,val)
457#define bfin_read_FIO2_BOTH() bfin_read16(FIO2_BOTH)
458#define bfin_write_FIO2_BOTH(val) bfin_write16(FIO2_BOTH,val)
459#define bfin_read_FIO2_INEN() bfin_read16(FIO2_INEN)
460#define bfin_write_FIO2_INEN(val) bfin_write16(FIO2_INEN,val)
461/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
462#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
463#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1,val)
464#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
465#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2,val)
466#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
467#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV,val)
468#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
469#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV,val)
470#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
471#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX,val)
472#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
473#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX,val)
474#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX)
475#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX,val)
476#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX)
477#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX,val)
478#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX)
479#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX,val)
480#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX)
481#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX,val)
482#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
483#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1,val)
484#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
485#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2,val)
486#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
487#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV,val)
488#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
489#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV,val)
490#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
491#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT,val)
492#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
493#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL,val)
494#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
495#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1,val)
496#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
497#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2,val)
498#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
499#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0,val)
500#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
501#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1,val)
502#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
503#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2,val)
504#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
505#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3,val)
506#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
507#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0,val)
508#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
509#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1,val)
510#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
511#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2,val)
512#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
513#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3,val)
514/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
515#define bfin_read_SPORT1_TCR1() bfin_read16(SPORT1_TCR1)
516#define bfin_write_SPORT1_TCR1(val) bfin_write16(SPORT1_TCR1,val)
517#define bfin_read_SPORT1_TCR2() bfin_read16(SPORT1_TCR2)
518#define bfin_write_SPORT1_TCR2(val) bfin_write16(SPORT1_TCR2,val)
519#define bfin_read_SPORT1_TCLKDIV() bfin_read16(SPORT1_TCLKDIV)
520#define bfin_write_SPORT1_TCLKDIV(val) bfin_write16(SPORT1_TCLKDIV,val)
521#define bfin_read_SPORT1_TFSDIV() bfin_read16(SPORT1_TFSDIV)
522#define bfin_write_SPORT1_TFSDIV(val) bfin_write16(SPORT1_TFSDIV,val)
523#define bfin_read_SPORT1_TX() bfin_read32(SPORT1_TX)
524#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX,val)
525#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
526#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX,val)
527#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX)
528#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX,val)
529#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX)
530#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX,val)
531#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX)
532#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX,val)
533#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX)
534#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX,val)
535#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
536#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1,val)
537#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
538#define bfin_write_SPORT1_RCR2(val) bfin_write16(SPORT1_RCR2,val)
539#define bfin_read_SPORT1_RCLKDIV() bfin_read16(SPORT1_RCLKDIV)
540#define bfin_write_SPORT1_RCLKDIV(val) bfin_write16(SPORT1_RCLKDIV,val)
541#define bfin_read_SPORT1_RFSDIV() bfin_read16(SPORT1_RFSDIV)
542#define bfin_write_SPORT1_RFSDIV(val) bfin_write16(SPORT1_RFSDIV,val)
543#define bfin_read_SPORT1_STAT() bfin_read16(SPORT1_STAT)
544#define bfin_write_SPORT1_STAT(val) bfin_write16(SPORT1_STAT,val)
545#define bfin_read_SPORT1_CHNL() bfin_read16(SPORT1_CHNL)
546#define bfin_write_SPORT1_CHNL(val) bfin_write16(SPORT1_CHNL,val)
547#define bfin_read_SPORT1_MCMC1() bfin_read16(SPORT1_MCMC1)
548#define bfin_write_SPORT1_MCMC1(val) bfin_write16(SPORT1_MCMC1,val)
549#define bfin_read_SPORT1_MCMC2() bfin_read16(SPORT1_MCMC2)
550#define bfin_write_SPORT1_MCMC2(val) bfin_write16(SPORT1_MCMC2,val)
551#define bfin_read_SPORT1_MTCS0() bfin_read32(SPORT1_MTCS0)
552#define bfin_write_SPORT1_MTCS0(val) bfin_write32(SPORT1_MTCS0,val)
553#define bfin_read_SPORT1_MTCS1() bfin_read32(SPORT1_MTCS1)
554#define bfin_write_SPORT1_MTCS1(val) bfin_write32(SPORT1_MTCS1,val)
555#define bfin_read_SPORT1_MTCS2() bfin_read32(SPORT1_MTCS2)
556#define bfin_write_SPORT1_MTCS2(val) bfin_write32(SPORT1_MTCS2,val)
557#define bfin_read_SPORT1_MTCS3() bfin_read32(SPORT1_MTCS3)
558#define bfin_write_SPORT1_MTCS3(val) bfin_write32(SPORT1_MTCS3,val)
559#define bfin_read_SPORT1_MRCS0() bfin_read32(SPORT1_MRCS0)
560#define bfin_write_SPORT1_MRCS0(val) bfin_write32(SPORT1_MRCS0,val)
561#define bfin_read_SPORT1_MRCS1() bfin_read32(SPORT1_MRCS1)
562#define bfin_write_SPORT1_MRCS1(val) bfin_write32(SPORT1_MRCS1,val)
563#define bfin_read_SPORT1_MRCS2() bfin_read32(SPORT1_MRCS2)
564#define bfin_write_SPORT1_MRCS2(val) bfin_write32(SPORT1_MRCS2,val)
565#define bfin_read_SPORT1_MRCS3() bfin_read32(SPORT1_MRCS3)
566#define bfin_write_SPORT1_MRCS3(val) bfin_write32(SPORT1_MRCS3,val)
567/* Asynchronous Memory Controller - External Bus Interface Unit */
568#define bfin_read_EBIU_AMGCTL() bfin_read16(EBIU_AMGCTL)
569#define bfin_write_EBIU_AMGCTL(val) bfin_write16(EBIU_AMGCTL,val)
570#define bfin_read_EBIU_AMBCTL0() bfin_read32(EBIU_AMBCTL0)
571#define bfin_write_EBIU_AMBCTL0(val) bfin_write32(EBIU_AMBCTL0,val)
572#define bfin_read_EBIU_AMBCTL1() bfin_read32(EBIU_AMBCTL1)
573#define bfin_write_EBIU_AMBCTL1(val) bfin_write32(EBIU_AMBCTL1,val)
574/* SDRAM Controller External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
575#define bfin_read_EBIU_SDGCTL() bfin_read32(EBIU_SDGCTL)
576#define bfin_write_EBIU_SDGCTL(val) bfin_write32(EBIU_SDGCTL,val)
577#define bfin_read_EBIU_SDBCTL() bfin_read32(EBIU_SDBCTL)
578#define bfin_write_EBIU_SDBCTL(val) bfin_write32(EBIU_SDBCTL,val)
579#define bfin_read_EBIU_SDRRC() bfin_read16(EBIU_SDRRC)
580#define bfin_write_EBIU_SDRRC(val) bfin_write16(EBIU_SDRRC,val)
581#define bfin_read_EBIU_SDSTAT() bfin_read16(EBIU_SDSTAT)
582#define bfin_write_EBIU_SDSTAT(val) bfin_write16(EBIU_SDSTAT,val)
583/* Parallel Peripheral Interface (PPI) 0 registers (0xFFC0 1000-0xFFC0 10FF) */
584#define bfin_read_PPI0_CONTROL() bfin_read16(PPI0_CONTROL)
585#define bfin_write_PPI0_CONTROL(val) bfin_write16(PPI0_CONTROL,val)
586#define bfin_read_PPI0_STATUS() bfin_read16(PPI0_STATUS)
587#define bfin_write_PPI0_STATUS(val) bfin_write16(PPI0_STATUS,val)
588#define bfin_clear_PPI0_STATUS() bfin_read_PPI0_STATUS()
589#define bfin_read_PPI0_COUNT() bfin_read16(PPI0_COUNT)
590#define bfin_write_PPI0_COUNT(val) bfin_write16(PPI0_COUNT,val)
591#define bfin_read_PPI0_DELAY() bfin_read16(PPI0_DELAY)
592#define bfin_write_PPI0_DELAY(val) bfin_write16(PPI0_DELAY,val)
593#define bfin_read_PPI0_FRAME() bfin_read16(PPI0_FRAME)
594#define bfin_write_PPI0_FRAME(val) bfin_write16(PPI0_FRAME,val)
595/* Parallel Peripheral Interface (PPI) 1 registers (0xFFC0 1300-0xFFC0 13FF) */
596#define bfin_read_PPI1_CONTROL() bfin_read16(PPI1_CONTROL)
597#define bfin_write_PPI1_CONTROL(val) bfin_write16(PPI1_CONTROL,val)
598#define bfin_read_PPI1_STATUS() bfin_read16(PPI1_STATUS)
599#define bfin_write_PPI1_STATUS(val) bfin_write16(PPI1_STATUS,val)
600#define bfin_clear_PPI1_STATUS() bfin_read_PPI1_STATUS()
601#define bfin_read_PPI1_COUNT() bfin_read16(PPI1_COUNT)
602#define bfin_write_PPI1_COUNT(val) bfin_write16(PPI1_COUNT,val)
603#define bfin_read_PPI1_DELAY() bfin_read16(PPI1_DELAY)
604#define bfin_write_PPI1_DELAY(val) bfin_write16(PPI1_DELAY,val)
605#define bfin_read_PPI1_FRAME() bfin_read16(PPI1_FRAME)
606#define bfin_write_PPI1_FRAME(val) bfin_write16(PPI1_FRAME,val)
607/*DMA traffic control registers */
608#define bfin_read_DMA1_TC_PER() bfin_read16(DMA1_TC_PER)
609#define bfin_write_DMA1_TC_PER(val) bfin_write16(DMA1_TC_PER,val)
610#define bfin_read_DMA1_TC_CNT() bfin_read16(DMA1_TC_CNT)
611#define bfin_write_DMA1_TC_CNT(val) bfin_write16(DMA1_TC_CNT,val)
612#define bfin_read_DMA2_TC_PER() bfin_read16(DMA2_TC_PER)
613#define bfin_write_DMA2_TC_PER(val) bfin_write16(DMA2_TC_PER,val)
614#define bfin_read_DMA2_TC_CNT() bfin_read16(DMA2_TC_CNT)
615#define bfin_write_DMA2_TC_CNT(val) bfin_write16(DMA2_TC_CNT,val)
616/* DMA1 Controller registers (0xFFC0 1C00-0xFFC0 1FFF) */
617#define bfin_read_DMA1_0_CONFIG() bfin_read16(DMA1_0_CONFIG)
618#define bfin_write_DMA1_0_CONFIG(val) bfin_write16(DMA1_0_CONFIG,val)
619#define bfin_read_DMA1_0_NEXT_DESC_PTR() bfin_read32(DMA1_0_NEXT_DESC_PTR)
620#define bfin_write_DMA1_0_NEXT_DESC_PTR(val) bfin_write32(DMA1_0_NEXT_DESC_PTR,val)
621#define bfin_read_DMA1_0_START_ADDR() bfin_read32(DMA1_0_START_ADDR)
622#define bfin_write_DMA1_0_START_ADDR(val) bfin_write32(DMA1_0_START_ADDR,val)
623#define bfin_read_DMA1_0_X_COUNT() bfin_read16(DMA1_0_X_COUNT)
624#define bfin_write_DMA1_0_X_COUNT(val) bfin_write16(DMA1_0_X_COUNT,val)
625#define bfin_read_DMA1_0_Y_COUNT() bfin_read16(DMA1_0_Y_COUNT)
626#define bfin_write_DMA1_0_Y_COUNT(val) bfin_write16(DMA1_0_Y_COUNT,val)
627#define bfin_read_DMA1_0_X_MODIFY() bfin_read16(DMA1_0_X_MODIFY)
628#define bfin_write_DMA1_0_X_MODIFY(val) bfin_write16(DMA1_0_X_MODIFY,val)
629#define bfin_read_DMA1_0_Y_MODIFY() bfin_read16(DMA1_0_Y_MODIFY)
630#define bfin_write_DMA1_0_Y_MODIFY(val) bfin_write16(DMA1_0_Y_MODIFY,val)
631#define bfin_read_DMA1_0_CURR_DESC_PTR() bfin_read32(DMA1_0_CURR_DESC_PTR)
632#define bfin_write_DMA1_0_CURR_DESC_PTR(val) bfin_write32(DMA1_0_CURR_DESC_PTR,val)
633#define bfin_read_DMA1_0_CURR_ADDR() bfin_read32(DMA1_0_CURR_ADDR)
634#define bfin_write_DMA1_0_CURR_ADDR(val) bfin_write32(DMA1_0_CURR_ADDR,val)
635#define bfin_read_DMA1_0_CURR_X_COUNT() bfin_read16(DMA1_0_CURR_X_COUNT)
636#define bfin_write_DMA1_0_CURR_X_COUNT(val) bfin_write16(DMA1_0_CURR_X_COUNT,val)
637#define bfin_read_DMA1_0_CURR_Y_COUNT() bfin_read16(DMA1_0_CURR_Y_COUNT)
638#define bfin_write_DMA1_0_CURR_Y_COUNT(val) bfin_write16(DMA1_0_CURR_Y_COUNT,val)
639#define bfin_read_DMA1_0_IRQ_STATUS() bfin_read16(DMA1_0_IRQ_STATUS)
640#define bfin_write_DMA1_0_IRQ_STATUS(val) bfin_write16(DMA1_0_IRQ_STATUS,val)
641#define bfin_read_DMA1_0_PERIPHERAL_MAP() bfin_read16(DMA1_0_PERIPHERAL_MAP)
642#define bfin_write_DMA1_0_PERIPHERAL_MAP(val) bfin_write16(DMA1_0_PERIPHERAL_MAP,val)
643#define bfin_read_DMA1_1_CONFIG() bfin_read16(DMA1_1_CONFIG)
644#define bfin_write_DMA1_1_CONFIG(val) bfin_write16(DMA1_1_CONFIG,val)
645#define bfin_read_DMA1_1_NEXT_DESC_PTR() bfin_read32(DMA1_1_NEXT_DESC_PTR)
646#define bfin_write_DMA1_1_NEXT_DESC_PTR(val) bfin_write32(DMA1_1_NEXT_DESC_PTR,val)
647#define bfin_read_DMA1_1_START_ADDR() bfin_read32(DMA1_1_START_ADDR)
648#define bfin_write_DMA1_1_START_ADDR(val) bfin_write32(DMA1_1_START_ADDR,val)
649#define bfin_read_DMA1_1_X_COUNT() bfin_read16(DMA1_1_X_COUNT)
650#define bfin_write_DMA1_1_X_COUNT(val) bfin_write16(DMA1_1_X_COUNT,val)
651#define bfin_read_DMA1_1_Y_COUNT() bfin_read16(DMA1_1_Y_COUNT)
652#define bfin_write_DMA1_1_Y_COUNT(val) bfin_write16(DMA1_1_Y_COUNT,val)
653#define bfin_read_DMA1_1_X_MODIFY() bfin_read16(DMA1_1_X_MODIFY)
654#define bfin_write_DMA1_1_X_MODIFY(val) bfin_write16(DMA1_1_X_MODIFY,val)
655#define bfin_read_DMA1_1_Y_MODIFY() bfin_read16(DMA1_1_Y_MODIFY)
656#define bfin_write_DMA1_1_Y_MODIFY(val) bfin_write16(DMA1_1_Y_MODIFY,val)
657#define bfin_read_DMA1_1_CURR_DESC_PTR() bfin_read32(DMA1_1_CURR_DESC_PTR)
658#define bfin_write_DMA1_1_CURR_DESC_PTR(val) bfin_write32(DMA1_1_CURR_DESC_PTR,val)
659#define bfin_read_DMA1_1_CURR_ADDR() bfin_read32(DMA1_1_CURR_ADDR)
660#define bfin_write_DMA1_1_CURR_ADDR(val) bfin_write32(DMA1_1_CURR_ADDR,val)
661#define bfin_read_DMA1_1_CURR_X_COUNT() bfin_read16(DMA1_1_CURR_X_COUNT)
662#define bfin_write_DMA1_1_CURR_X_COUNT(val) bfin_write16(DMA1_1_CURR_X_COUNT,val)
663#define bfin_read_DMA1_1_CURR_Y_COUNT() bfin_read16(DMA1_1_CURR_Y_COUNT)
664#define bfin_write_DMA1_1_CURR_Y_COUNT(val) bfin_write16(DMA1_1_CURR_Y_COUNT,val)
665#define bfin_read_DMA1_1_IRQ_STATUS() bfin_read16(DMA1_1_IRQ_STATUS)
666#define bfin_write_DMA1_1_IRQ_STATUS(val) bfin_write16(DMA1_1_IRQ_STATUS,val)
667#define bfin_read_DMA1_1_PERIPHERAL_MAP() bfin_read16(DMA1_1_PERIPHERAL_MAP)
668#define bfin_write_DMA1_1_PERIPHERAL_MAP(val) bfin_write16(DMA1_1_PERIPHERAL_MAP,val)
669#define bfin_read_DMA1_2_CONFIG() bfin_read16(DMA1_2_CONFIG)
670#define bfin_write_DMA1_2_CONFIG(val) bfin_write16(DMA1_2_CONFIG,val)
671#define bfin_read_DMA1_2_NEXT_DESC_PTR() bfin_read32(DMA1_2_NEXT_DESC_PTR)
672#define bfin_write_DMA1_2_NEXT_DESC_PTR(val) bfin_write32(DMA1_2_NEXT_DESC_PTR,val)
673#define bfin_read_DMA1_2_START_ADDR() bfin_read32(DMA1_2_START_ADDR)
674#define bfin_write_DMA1_2_START_ADDR(val) bfin_write32(DMA1_2_START_ADDR,val)
675#define bfin_read_DMA1_2_X_COUNT() bfin_read16(DMA1_2_X_COUNT)
676#define bfin_write_DMA1_2_X_COUNT(val) bfin_write16(DMA1_2_X_COUNT,val)
677#define bfin_read_DMA1_2_Y_COUNT() bfin_read16(DMA1_2_Y_COUNT)
678#define bfin_write_DMA1_2_Y_COUNT(val) bfin_write16(DMA1_2_Y_COUNT,val)
679#define bfin_read_DMA1_2_X_MODIFY() bfin_read16(DMA1_2_X_MODIFY)
680#define bfin_write_DMA1_2_X_MODIFY(val) bfin_write16(DMA1_2_X_MODIFY,val)
681#define bfin_read_DMA1_2_Y_MODIFY() bfin_read16(DMA1_2_Y_MODIFY)
682#define bfin_write_DMA1_2_Y_MODIFY(val) bfin_write16(DMA1_2_Y_MODIFY,val)
683#define bfin_read_DMA1_2_CURR_DESC_PTR() bfin_read32(DMA1_2_CURR_DESC_PTR)
684#define bfin_write_DMA1_2_CURR_DESC_PTR(val) bfin_write32(DMA1_2_CURR_DESC_PTR,val)
685#define bfin_read_DMA1_2_CURR_ADDR() bfin_read32(DMA1_2_CURR_ADDR)
686#define bfin_write_DMA1_2_CURR_ADDR(val) bfin_write32(DMA1_2_CURR_ADDR,val)
687#define bfin_read_DMA1_2_CURR_X_COUNT() bfin_read16(DMA1_2_CURR_X_COUNT)
688#define bfin_write_DMA1_2_CURR_X_COUNT(val) bfin_write16(DMA1_2_CURR_X_COUNT,val)
689#define bfin_read_DMA1_2_CURR_Y_COUNT() bfin_read16(DMA1_2_CURR_Y_COUNT)
690#define bfin_write_DMA1_2_CURR_Y_COUNT(val) bfin_write16(DMA1_2_CURR_Y_COUNT,val)
691#define bfin_read_DMA1_2_IRQ_STATUS() bfin_read16(DMA1_2_IRQ_STATUS)
692#define bfin_write_DMA1_2_IRQ_STATUS(val) bfin_write16(DMA1_2_IRQ_STATUS,val)
693#define bfin_read_DMA1_2_PERIPHERAL_MAP() bfin_read16(DMA1_2_PERIPHERAL_MAP)
694#define bfin_write_DMA1_2_PERIPHERAL_MAP(val) bfin_write16(DMA1_2_PERIPHERAL_MAP,val)
695#define bfin_read_DMA1_3_CONFIG() bfin_read16(DMA1_3_CONFIG)
696#define bfin_write_DMA1_3_CONFIG(val) bfin_write16(DMA1_3_CONFIG,val)
697#define bfin_read_DMA1_3_NEXT_DESC_PTR() bfin_read32(DMA1_3_NEXT_DESC_PTR)
698#define bfin_write_DMA1_3_NEXT_DESC_PTR(val) bfin_write32(DMA1_3_NEXT_DESC_PTR,val)
699#define bfin_read_DMA1_3_START_ADDR() bfin_read32(DMA1_3_START_ADDR)
700#define bfin_write_DMA1_3_START_ADDR(val) bfin_write32(DMA1_3_START_ADDR,val)
701#define bfin_read_DMA1_3_X_COUNT() bfin_read16(DMA1_3_X_COUNT)
702#define bfin_write_DMA1_3_X_COUNT(val) bfin_write16(DMA1_3_X_COUNT,val)
703#define bfin_read_DMA1_3_Y_COUNT() bfin_read16(DMA1_3_Y_COUNT)
704#define bfin_write_DMA1_3_Y_COUNT(val) bfin_write16(DMA1_3_Y_COUNT,val)
705#define bfin_read_DMA1_3_X_MODIFY() bfin_read16(DMA1_3_X_MODIFY)
706#define bfin_write_DMA1_3_X_MODIFY(val) bfin_write16(DMA1_3_X_MODIFY,val)
707#define bfin_read_DMA1_3_Y_MODIFY() bfin_read16(DMA1_3_Y_MODIFY)
708#define bfin_write_DMA1_3_Y_MODIFY(val) bfin_write16(DMA1_3_Y_MODIFY,val)
709#define bfin_read_DMA1_3_CURR_DESC_PTR() bfin_read32(DMA1_3_CURR_DESC_PTR)
710#define bfin_write_DMA1_3_CURR_DESC_PTR(val) bfin_write32(DMA1_3_CURR_DESC_PTR,val)
711#define bfin_read_DMA1_3_CURR_ADDR() bfin_read32(DMA1_3_CURR_ADDR)
712#define bfin_write_DMA1_3_CURR_ADDR(val) bfin_write32(DMA1_3_CURR_ADDR,val)
713#define bfin_read_DMA1_3_CURR_X_COUNT() bfin_read16(DMA1_3_CURR_X_COUNT)
714#define bfin_write_DMA1_3_CURR_X_COUNT(val) bfin_write16(DMA1_3_CURR_X_COUNT,val)
715#define bfin_read_DMA1_3_CURR_Y_COUNT() bfin_read16(DMA1_3_CURR_Y_COUNT)
716#define bfin_write_DMA1_3_CURR_Y_COUNT(val) bfin_write16(DMA1_3_CURR_Y_COUNT,val)
717#define bfin_read_DMA1_3_IRQ_STATUS() bfin_read16(DMA1_3_IRQ_STATUS)
718#define bfin_write_DMA1_3_IRQ_STATUS(val) bfin_write16(DMA1_3_IRQ_STATUS,val)
719#define bfin_read_DMA1_3_PERIPHERAL_MAP() bfin_read16(DMA1_3_PERIPHERAL_MAP)
720#define bfin_write_DMA1_3_PERIPHERAL_MAP(val) bfin_write16(DMA1_3_PERIPHERAL_MAP,val)
721#define bfin_read_DMA1_4_CONFIG() bfin_read16(DMA1_4_CONFIG)
722#define bfin_write_DMA1_4_CONFIG(val) bfin_write16(DMA1_4_CONFIG,val)
723#define bfin_read_DMA1_4_NEXT_DESC_PTR() bfin_read32(DMA1_4_NEXT_DESC_PTR)
724#define bfin_write_DMA1_4_NEXT_DESC_PTR(val) bfin_write32(DMA1_4_NEXT_DESC_PTR,val)
725#define bfin_read_DMA1_4_START_ADDR() bfin_read32(DMA1_4_START_ADDR)
726#define bfin_write_DMA1_4_START_ADDR(val) bfin_write32(DMA1_4_START_ADDR,val)
727#define bfin_read_DMA1_4_X_COUNT() bfin_read16(DMA1_4_X_COUNT)
728#define bfin_write_DMA1_4_X_COUNT(val) bfin_write16(DMA1_4_X_COUNT,val)
729#define bfin_read_DMA1_4_Y_COUNT() bfin_read16(DMA1_4_Y_COUNT)
730#define bfin_write_DMA1_4_Y_COUNT(val) bfin_write16(DMA1_4_Y_COUNT,val)
731#define bfin_read_DMA1_4_X_MODIFY() bfin_read16(DMA1_4_X_MODIFY)
732#define bfin_write_DMA1_4_X_MODIFY(val) bfin_write16(DMA1_4_X_MODIFY,val)
733#define bfin_read_DMA1_4_Y_MODIFY() bfin_read16(DMA1_4_Y_MODIFY)
734#define bfin_write_DMA1_4_Y_MODIFY(val) bfin_write16(DMA1_4_Y_MODIFY,val)
735#define bfin_read_DMA1_4_CURR_DESC_PTR() bfin_read32(DMA1_4_CURR_DESC_PTR)
736#define bfin_write_DMA1_4_CURR_DESC_PTR(val) bfin_write32(DMA1_4_CURR_DESC_PTR,val)
737#define bfin_read_DMA1_4_CURR_ADDR() bfin_read32(DMA1_4_CURR_ADDR)
738#define bfin_write_DMA1_4_CURR_ADDR(val) bfin_write32(DMA1_4_CURR_ADDR,val)
739#define bfin_read_DMA1_4_CURR_X_COUNT() bfin_read16(DMA1_4_CURR_X_COUNT)
740#define bfin_write_DMA1_4_CURR_X_COUNT(val) bfin_write16(DMA1_4_CURR_X_COUNT,val)
741#define bfin_read_DMA1_4_CURR_Y_COUNT() bfin_read16(DMA1_4_CURR_Y_COUNT)
742#define bfin_write_DMA1_4_CURR_Y_COUNT(val) bfin_write16(DMA1_4_CURR_Y_COUNT,val)
743#define bfin_read_DMA1_4_IRQ_STATUS() bfin_read16(DMA1_4_IRQ_STATUS)
744#define bfin_write_DMA1_4_IRQ_STATUS(val) bfin_write16(DMA1_4_IRQ_STATUS,val)
745#define bfin_read_DMA1_4_PERIPHERAL_MAP() bfin_read16(DMA1_4_PERIPHERAL_MAP)
746#define bfin_write_DMA1_4_PERIPHERAL_MAP(val) bfin_write16(DMA1_4_PERIPHERAL_MAP,val)
747#define bfin_read_DMA1_5_CONFIG() bfin_read16(DMA1_5_CONFIG)
748#define bfin_write_DMA1_5_CONFIG(val) bfin_write16(DMA1_5_CONFIG,val)
749#define bfin_read_DMA1_5_NEXT_DESC_PTR() bfin_read32(DMA1_5_NEXT_DESC_PTR)
750#define bfin_write_DMA1_5_NEXT_DESC_PTR(val) bfin_write32(DMA1_5_NEXT_DESC_PTR,val)
751#define bfin_read_DMA1_5_START_ADDR() bfin_read32(DMA1_5_START_ADDR)
752#define bfin_write_DMA1_5_START_ADDR(val) bfin_write32(DMA1_5_START_ADDR,val)
753#define bfin_read_DMA1_5_X_COUNT() bfin_read16(DMA1_5_X_COUNT)
754#define bfin_write_DMA1_5_X_COUNT(val) bfin_write16(DMA1_5_X_COUNT,val)
755#define bfin_read_DMA1_5_Y_COUNT() bfin_read16(DMA1_5_Y_COUNT)
756#define bfin_write_DMA1_5_Y_COUNT(val) bfin_write16(DMA1_5_Y_COUNT,val)
757#define bfin_read_DMA1_5_X_MODIFY() bfin_read16(DMA1_5_X_MODIFY)
758#define bfin_write_DMA1_5_X_MODIFY(val) bfin_write16(DMA1_5_X_MODIFY,val)
759#define bfin_read_DMA1_5_Y_MODIFY() bfin_read16(DMA1_5_Y_MODIFY)
760#define bfin_write_DMA1_5_Y_MODIFY(val) bfin_write16(DMA1_5_Y_MODIFY,val)
761#define bfin_read_DMA1_5_CURR_DESC_PTR() bfin_read32(DMA1_5_CURR_DESC_PTR)
762#define bfin_write_DMA1_5_CURR_DESC_PTR(val) bfin_write32(DMA1_5_CURR_DESC_PTR,val)
763#define bfin_read_DMA1_5_CURR_ADDR() bfin_read32(DMA1_5_CURR_ADDR)
764#define bfin_write_DMA1_5_CURR_ADDR(val) bfin_write32(DMA1_5_CURR_ADDR,val)
765#define bfin_read_DMA1_5_CURR_X_COUNT() bfin_read16(DMA1_5_CURR_X_COUNT)
766#define bfin_write_DMA1_5_CURR_X_COUNT(val) bfin_write16(DMA1_5_CURR_X_COUNT,val)
767#define bfin_read_DMA1_5_CURR_Y_COUNT() bfin_read16(DMA1_5_CURR_Y_COUNT)
768#define bfin_write_DMA1_5_CURR_Y_COUNT(val) bfin_write16(DMA1_5_CURR_Y_COUNT,val)
769#define bfin_read_DMA1_5_IRQ_STATUS() bfin_read16(DMA1_5_IRQ_STATUS)
770#define bfin_write_DMA1_5_IRQ_STATUS(val) bfin_write16(DMA1_5_IRQ_STATUS,val)
771#define bfin_read_DMA1_5_PERIPHERAL_MAP() bfin_read16(DMA1_5_PERIPHERAL_MAP)
772#define bfin_write_DMA1_5_PERIPHERAL_MAP(val) bfin_write16(DMA1_5_PERIPHERAL_MAP,val)
773#define bfin_read_DMA1_6_CONFIG() bfin_read16(DMA1_6_CONFIG)
774#define bfin_write_DMA1_6_CONFIG(val) bfin_write16(DMA1_6_CONFIG,val)
775#define bfin_read_DMA1_6_NEXT_DESC_PTR() bfin_read32(DMA1_6_NEXT_DESC_PTR)
776#define bfin_write_DMA1_6_NEXT_DESC_PTR(val) bfin_write32(DMA1_6_NEXT_DESC_PTR,val)
777#define bfin_read_DMA1_6_START_ADDR() bfin_read32(DMA1_6_START_ADDR)
778#define bfin_write_DMA1_6_START_ADDR(val) bfin_write32(DMA1_6_START_ADDR,val)
779#define bfin_read_DMA1_6_X_COUNT() bfin_read16(DMA1_6_X_COUNT)
780#define bfin_write_DMA1_6_X_COUNT(val) bfin_write16(DMA1_6_X_COUNT,val)
781#define bfin_read_DMA1_6_Y_COUNT() bfin_read16(DMA1_6_Y_COUNT)
782#define bfin_write_DMA1_6_Y_COUNT(val) bfin_write16(DMA1_6_Y_COUNT,val)
783#define bfin_read_DMA1_6_X_MODIFY() bfin_read16(DMA1_6_X_MODIFY)
784#define bfin_write_DMA1_6_X_MODIFY(val) bfin_write16(DMA1_6_X_MODIFY,val)
785#define bfin_read_DMA1_6_Y_MODIFY() bfin_read16(DMA1_6_Y_MODIFY)
786#define bfin_write_DMA1_6_Y_MODIFY(val) bfin_write16(DMA1_6_Y_MODIFY,val)
787#define bfin_read_DMA1_6_CURR_DESC_PTR() bfin_read32(DMA1_6_CURR_DESC_PTR)
788#define bfin_write_DMA1_6_CURR_DESC_PTR(val) bfin_write32(DMA1_6_CURR_DESC_PTR,val)
789#define bfin_read_DMA1_6_CURR_ADDR() bfin_read32(DMA1_6_CURR_ADDR)
790#define bfin_write_DMA1_6_CURR_ADDR(val) bfin_write32(DMA1_6_CURR_ADDR,val)
791#define bfin_read_DMA1_6_CURR_X_COUNT() bfin_read16(DMA1_6_CURR_X_COUNT)
792#define bfin_write_DMA1_6_CURR_X_COUNT(val) bfin_write16(DMA1_6_CURR_X_COUNT,val)
793#define bfin_read_DMA1_6_CURR_Y_COUNT() bfin_read16(DMA1_6_CURR_Y_COUNT)
794#define bfin_write_DMA1_6_CURR_Y_COUNT(val) bfin_write16(DMA1_6_CURR_Y_COUNT,val)
795#define bfin_read_DMA1_6_IRQ_STATUS() bfin_read16(DMA1_6_IRQ_STATUS)
796#define bfin_write_DMA1_6_IRQ_STATUS(val) bfin_write16(DMA1_6_IRQ_STATUS,val)
797#define bfin_read_DMA1_6_PERIPHERAL_MAP() bfin_read16(DMA1_6_PERIPHERAL_MAP)
798#define bfin_write_DMA1_6_PERIPHERAL_MAP(val) bfin_write16(DMA1_6_PERIPHERAL_MAP,val)
799#define bfin_read_DMA1_7_CONFIG() bfin_read16(DMA1_7_CONFIG)
800#define bfin_write_DMA1_7_CONFIG(val) bfin_write16(DMA1_7_CONFIG,val)
801#define bfin_read_DMA1_7_NEXT_DESC_PTR() bfin_read32(DMA1_7_NEXT_DESC_PTR)
802#define bfin_write_DMA1_7_NEXT_DESC_PTR(val) bfin_write32(DMA1_7_NEXT_DESC_PTR,val)
803#define bfin_read_DMA1_7_START_ADDR() bfin_read32(DMA1_7_START_ADDR)
804#define bfin_write_DMA1_7_START_ADDR(val) bfin_write32(DMA1_7_START_ADDR,val)
805#define bfin_read_DMA1_7_X_COUNT() bfin_read16(DMA1_7_X_COUNT)
806#define bfin_write_DMA1_7_X_COUNT(val) bfin_write16(DMA1_7_X_COUNT,val)
807#define bfin_read_DMA1_7_Y_COUNT() bfin_read16(DMA1_7_Y_COUNT)
808#define bfin_write_DMA1_7_Y_COUNT(val) bfin_write16(DMA1_7_Y_COUNT,val)
809#define bfin_read_DMA1_7_X_MODIFY() bfin_read16(DMA1_7_X_MODIFY)
810#define bfin_write_DMA1_7_X_MODIFY(val) bfin_write16(DMA1_7_X_MODIFY,val)
811#define bfin_read_DMA1_7_Y_MODIFY() bfin_read16(DMA1_7_Y_MODIFY)
812#define bfin_write_DMA1_7_Y_MODIFY(val) bfin_write16(DMA1_7_Y_MODIFY,val)
813#define bfin_read_DMA1_7_CURR_DESC_PTR() bfin_read32(DMA1_7_CURR_DESC_PTR)
814#define bfin_write_DMA1_7_CURR_DESC_PTR(val) bfin_write32(DMA1_7_CURR_DESC_PTR,val)
815#define bfin_read_DMA1_7_CURR_ADDR() bfin_read32(DMA1_7_CURR_ADDR)
816#define bfin_write_DMA1_7_CURR_ADDR(val) bfin_write32(DMA1_7_CURR_ADDR,val)
817#define bfin_read_DMA1_7_CURR_X_COUNT() bfin_read16(DMA1_7_CURR_X_COUNT)
818#define bfin_write_DMA1_7_CURR_X_COUNT(val) bfin_write16(DMA1_7_CURR_X_COUNT,val)
819#define bfin_read_DMA1_7_CURR_Y_COUNT() bfin_read16(DMA1_7_CURR_Y_COUNT)
820#define bfin_write_DMA1_7_CURR_Y_COUNT(val) bfin_write16(DMA1_7_CURR_Y_COUNT,val)
821#define bfin_read_DMA1_7_IRQ_STATUS() bfin_read16(DMA1_7_IRQ_STATUS)
822#define bfin_write_DMA1_7_IRQ_STATUS(val) bfin_write16(DMA1_7_IRQ_STATUS,val)
823#define bfin_read_DMA1_7_PERIPHERAL_MAP() bfin_read16(DMA1_7_PERIPHERAL_MAP)
824#define bfin_write_DMA1_7_PERIPHERAL_MAP(val) bfin_write16(DMA1_7_PERIPHERAL_MAP,val)
825#define bfin_read_DMA1_8_CONFIG() bfin_read16(DMA1_8_CONFIG)
826#define bfin_write_DMA1_8_CONFIG(val) bfin_write16(DMA1_8_CONFIG,val)
827#define bfin_read_DMA1_8_NEXT_DESC_PTR() bfin_read32(DMA1_8_NEXT_DESC_PTR)
828#define bfin_write_DMA1_8_NEXT_DESC_PTR(val) bfin_write32(DMA1_8_NEXT_DESC_PTR,val)
829#define bfin_read_DMA1_8_START_ADDR() bfin_read32(DMA1_8_START_ADDR)
830#define bfin_write_DMA1_8_START_ADDR(val) bfin_write32(DMA1_8_START_ADDR,val)
831#define bfin_read_DMA1_8_X_COUNT() bfin_read16(DMA1_8_X_COUNT)
832#define bfin_write_DMA1_8_X_COUNT(val) bfin_write16(DMA1_8_X_COUNT,val)
833#define bfin_read_DMA1_8_Y_COUNT() bfin_read16(DMA1_8_Y_COUNT)
834#define bfin_write_DMA1_8_Y_COUNT(val) bfin_write16(DMA1_8_Y_COUNT,val)
835#define bfin_read_DMA1_8_X_MODIFY() bfin_read16(DMA1_8_X_MODIFY)
836#define bfin_write_DMA1_8_X_MODIFY(val) bfin_write16(DMA1_8_X_MODIFY,val)
837#define bfin_read_DMA1_8_Y_MODIFY() bfin_read16(DMA1_8_Y_MODIFY)
838#define bfin_write_DMA1_8_Y_MODIFY(val) bfin_write16(DMA1_8_Y_MODIFY,val)
839#define bfin_read_DMA1_8_CURR_DESC_PTR() bfin_read32(DMA1_8_CURR_DESC_PTR)
840#define bfin_write_DMA1_8_CURR_DESC_PTR(val) bfin_write32(DMA1_8_CURR_DESC_PTR,val)
841#define bfin_read_DMA1_8_CURR_ADDR() bfin_read32(DMA1_8_CURR_ADDR)
842#define bfin_write_DMA1_8_CURR_ADDR(val) bfin_write32(DMA1_8_CURR_ADDR,val)
843#define bfin_read_DMA1_8_CURR_X_COUNT() bfin_read16(DMA1_8_CURR_X_COUNT)
844#define bfin_write_DMA1_8_CURR_X_COUNT(val) bfin_write16(DMA1_8_CURR_X_COUNT,val)
845#define bfin_read_DMA1_8_CURR_Y_COUNT() bfin_read16(DMA1_8_CURR_Y_COUNT)
846#define bfin_write_DMA1_8_CURR_Y_COUNT(val) bfin_write16(DMA1_8_CURR_Y_COUNT,val)
847#define bfin_read_DMA1_8_IRQ_STATUS() bfin_read16(DMA1_8_IRQ_STATUS)
848#define bfin_write_DMA1_8_IRQ_STATUS(val) bfin_write16(DMA1_8_IRQ_STATUS,val)
849#define bfin_read_DMA1_8_PERIPHERAL_MAP() bfin_read16(DMA1_8_PERIPHERAL_MAP)
850#define bfin_write_DMA1_8_PERIPHERAL_MAP(val) bfin_write16(DMA1_8_PERIPHERAL_MAP,val)
851#define bfin_read_DMA1_9_CONFIG() bfin_read16(DMA1_9_CONFIG)
852#define bfin_write_DMA1_9_CONFIG(val) bfin_write16(DMA1_9_CONFIG,val)
853#define bfin_read_DMA1_9_NEXT_DESC_PTR() bfin_read32(DMA1_9_NEXT_DESC_PTR)
854#define bfin_write_DMA1_9_NEXT_DESC_PTR(val) bfin_write32(DMA1_9_NEXT_DESC_PTR,val)
855#define bfin_read_DMA1_9_START_ADDR() bfin_read32(DMA1_9_START_ADDR)
856#define bfin_write_DMA1_9_START_ADDR(val) bfin_write32(DMA1_9_START_ADDR,val)
857#define bfin_read_DMA1_9_X_COUNT() bfin_read16(DMA1_9_X_COUNT)
858#define bfin_write_DMA1_9_X_COUNT(val) bfin_write16(DMA1_9_X_COUNT,val)
859#define bfin_read_DMA1_9_Y_COUNT() bfin_read16(DMA1_9_Y_COUNT)
860#define bfin_write_DMA1_9_Y_COUNT(val) bfin_write16(DMA1_9_Y_COUNT,val)
861#define bfin_read_DMA1_9_X_MODIFY() bfin_read16(DMA1_9_X_MODIFY)
862#define bfin_write_DMA1_9_X_MODIFY(val) bfin_write16(DMA1_9_X_MODIFY,val)
863#define bfin_read_DMA1_9_Y_MODIFY() bfin_read16(DMA1_9_Y_MODIFY)
864#define bfin_write_DMA1_9_Y_MODIFY(val) bfin_write16(DMA1_9_Y_MODIFY,val)
865#define bfin_read_DMA1_9_CURR_DESC_PTR() bfin_read32(DMA1_9_CURR_DESC_PTR)
866#define bfin_write_DMA1_9_CURR_DESC_PTR(val) bfin_write32(DMA1_9_CURR_DESC_PTR,val)
867#define bfin_read_DMA1_9_CURR_ADDR() bfin_read32(DMA1_9_CURR_ADDR)
868#define bfin_write_DMA1_9_CURR_ADDR(val) bfin_write32(DMA1_9_CURR_ADDR,val)
869#define bfin_read_DMA1_9_CURR_X_COUNT() bfin_read16(DMA1_9_CURR_X_COUNT)
870#define bfin_write_DMA1_9_CURR_X_COUNT(val) bfin_write16(DMA1_9_CURR_X_COUNT,val)
871#define bfin_read_DMA1_9_CURR_Y_COUNT() bfin_read16(DMA1_9_CURR_Y_COUNT)
872#define bfin_write_DMA1_9_CURR_Y_COUNT(val) bfin_write16(DMA1_9_CURR_Y_COUNT,val)
873#define bfin_read_DMA1_9_IRQ_STATUS() bfin_read16(DMA1_9_IRQ_STATUS)
874#define bfin_write_DMA1_9_IRQ_STATUS(val) bfin_write16(DMA1_9_IRQ_STATUS,val)
875#define bfin_read_DMA1_9_PERIPHERAL_MAP() bfin_read16(DMA1_9_PERIPHERAL_MAP)
876#define bfin_write_DMA1_9_PERIPHERAL_MAP(val) bfin_write16(DMA1_9_PERIPHERAL_MAP,val)
877#define bfin_read_DMA1_10_CONFIG() bfin_read16(DMA1_10_CONFIG)
878#define bfin_write_DMA1_10_CONFIG(val) bfin_write16(DMA1_10_CONFIG,val)
879#define bfin_read_DMA1_10_NEXT_DESC_PTR() bfin_read32(DMA1_10_NEXT_DESC_PTR)
880#define bfin_write_DMA1_10_NEXT_DESC_PTR(val) bfin_write32(DMA1_10_NEXT_DESC_PTR,val)
881#define bfin_read_DMA1_10_START_ADDR() bfin_read32(DMA1_10_START_ADDR)
882#define bfin_write_DMA1_10_START_ADDR(val) bfin_write32(DMA1_10_START_ADDR,val)
883#define bfin_read_DMA1_10_X_COUNT() bfin_read16(DMA1_10_X_COUNT)
884#define bfin_write_DMA1_10_X_COUNT(val) bfin_write16(DMA1_10_X_COUNT,val)
885#define bfin_read_DMA1_10_Y_COUNT() bfin_read16(DMA1_10_Y_COUNT)
886#define bfin_write_DMA1_10_Y_COUNT(val) bfin_write16(DMA1_10_Y_COUNT,val)
887#define bfin_read_DMA1_10_X_MODIFY() bfin_read16(DMA1_10_X_MODIFY)
888#define bfin_write_DMA1_10_X_MODIFY(val) bfin_write16(DMA1_10_X_MODIFY,val)
889#define bfin_read_DMA1_10_Y_MODIFY() bfin_read16(DMA1_10_Y_MODIFY)
890#define bfin_write_DMA1_10_Y_MODIFY(val) bfin_write16(DMA1_10_Y_MODIFY,val)
891#define bfin_read_DMA1_10_CURR_DESC_PTR() bfin_read32(DMA1_10_CURR_DESC_PTR)
892#define bfin_write_DMA1_10_CURR_DESC_PTR(val) bfin_write32(DMA1_10_CURR_DESC_PTR,val)
893#define bfin_read_DMA1_10_CURR_ADDR() bfin_read32(DMA1_10_CURR_ADDR)
894#define bfin_write_DMA1_10_CURR_ADDR(val) bfin_write32(DMA1_10_CURR_ADDR,val)
895#define bfin_read_DMA1_10_CURR_X_COUNT() bfin_read16(DMA1_10_CURR_X_COUNT)
896#define bfin_write_DMA1_10_CURR_X_COUNT(val) bfin_write16(DMA1_10_CURR_X_COUNT,val)
897#define bfin_read_DMA1_10_CURR_Y_COUNT() bfin_read16(DMA1_10_CURR_Y_COUNT)
898#define bfin_write_DMA1_10_CURR_Y_COUNT(val) bfin_write16(DMA1_10_CURR_Y_COUNT,val)
899#define bfin_read_DMA1_10_IRQ_STATUS() bfin_read16(DMA1_10_IRQ_STATUS)
900#define bfin_write_DMA1_10_IRQ_STATUS(val) bfin_write16(DMA1_10_IRQ_STATUS,val)
901#define bfin_read_DMA1_10_PERIPHERAL_MAP() bfin_read16(DMA1_10_PERIPHERAL_MAP)
902#define bfin_write_DMA1_10_PERIPHERAL_MAP(val) bfin_write16(DMA1_10_PERIPHERAL_MAP,val)
903#define bfin_read_DMA1_11_CONFIG() bfin_read16(DMA1_11_CONFIG)
904#define bfin_write_DMA1_11_CONFIG(val) bfin_write16(DMA1_11_CONFIG,val)
905#define bfin_read_DMA1_11_NEXT_DESC_PTR() bfin_read32(DMA1_11_NEXT_DESC_PTR)
906#define bfin_write_DMA1_11_NEXT_DESC_PTR(val) bfin_write32(DMA1_11_NEXT_DESC_PTR,val)
907#define bfin_read_DMA1_11_START_ADDR() bfin_read32(DMA1_11_START_ADDR)
908#define bfin_write_DMA1_11_START_ADDR(val) bfin_write32(DMA1_11_START_ADDR,val)
909#define bfin_read_DMA1_11_X_COUNT() bfin_read16(DMA1_11_X_COUNT)
910#define bfin_write_DMA1_11_X_COUNT(val) bfin_write16(DMA1_11_X_COUNT,val)
911#define bfin_read_DMA1_11_Y_COUNT() bfin_read16(DMA1_11_Y_COUNT)
912#define bfin_write_DMA1_11_Y_COUNT(val) bfin_write16(DMA1_11_Y_COUNT,val)
913#define bfin_read_DMA1_11_X_MODIFY() bfin_read16(DMA1_11_X_MODIFY)
914#define bfin_write_DMA1_11_X_MODIFY(val) bfin_write16(DMA1_11_X_MODIFY,val)
915#define bfin_read_DMA1_11_Y_MODIFY() bfin_read16(DMA1_11_Y_MODIFY)
916#define bfin_write_DMA1_11_Y_MODIFY(val) bfin_write16(DMA1_11_Y_MODIFY,val)
917#define bfin_read_DMA1_11_CURR_DESC_PTR() bfin_read32(DMA1_11_CURR_DESC_PTR)
918#define bfin_write_DMA1_11_CURR_DESC_PTR(val) bfin_write32(DMA1_11_CURR_DESC_PTR,val)
919#define bfin_read_DMA1_11_CURR_ADDR() bfin_read32(DMA1_11_CURR_ADDR)
920#define bfin_write_DMA1_11_CURR_ADDR(val) bfin_write32(DMA1_11_CURR_ADDR,val)
921#define bfin_read_DMA1_11_CURR_X_COUNT() bfin_read16(DMA1_11_CURR_X_COUNT)
922#define bfin_write_DMA1_11_CURR_X_COUNT(val) bfin_write16(DMA1_11_CURR_X_COUNT,val)
923#define bfin_read_DMA1_11_CURR_Y_COUNT() bfin_read16(DMA1_11_CURR_Y_COUNT)
924#define bfin_write_DMA1_11_CURR_Y_COUNT(val) bfin_write16(DMA1_11_CURR_Y_COUNT,val)
925#define bfin_read_DMA1_11_IRQ_STATUS() bfin_read16(DMA1_11_IRQ_STATUS)
926#define bfin_write_DMA1_11_IRQ_STATUS(val) bfin_write16(DMA1_11_IRQ_STATUS,val)
927#define bfin_read_DMA1_11_PERIPHERAL_MAP() bfin_read16(DMA1_11_PERIPHERAL_MAP)
928#define bfin_write_DMA1_11_PERIPHERAL_MAP(val) bfin_write16(DMA1_11_PERIPHERAL_MAP,val)
929/* Memory DMA1 Controller registers (0xFFC0 1E80-0xFFC0 1FFF) */
930#define bfin_read_MDMA1_D0_CONFIG() bfin_read16(MDMA1_D0_CONFIG)
931#define bfin_write_MDMA1_D0_CONFIG(val) bfin_write16(MDMA1_D0_CONFIG,val)
932#define bfin_read_MDMA1_D0_NEXT_DESC_PTR() bfin_read32(MDMA1_D0_NEXT_DESC_PTR)
933#define bfin_write_MDMA1_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA1_D0_NEXT_DESC_PTR,val)
934#define bfin_read_MDMA1_D0_START_ADDR() bfin_read32(MDMA1_D0_START_ADDR)
935#define bfin_write_MDMA1_D0_START_ADDR(val) bfin_write32(MDMA1_D0_START_ADDR,val)
936#define bfin_read_MDMA1_D0_X_COUNT() bfin_read16(MDMA1_D0_X_COUNT)
937#define bfin_write_MDMA1_D0_X_COUNT(val) bfin_write16(MDMA1_D0_X_COUNT,val)
938#define bfin_read_MDMA1_D0_Y_COUNT() bfin_read16(MDMA1_D0_Y_COUNT)
939#define bfin_write_MDMA1_D0_Y_COUNT(val) bfin_write16(MDMA1_D0_Y_COUNT,val)
940#define bfin_read_MDMA1_D0_X_MODIFY() bfin_read16(MDMA1_D0_X_MODIFY)
941#define bfin_write_MDMA1_D0_X_MODIFY(val) bfin_write16(MDMA1_D0_X_MODIFY,val)
942#define bfin_read_MDMA1_D0_Y_MODIFY() bfin_read16(MDMA1_D0_Y_MODIFY)
943#define bfin_write_MDMA1_D0_Y_MODIFY(val) bfin_write16(MDMA1_D0_Y_MODIFY,val)
944#define bfin_read_MDMA1_D0_CURR_DESC_PTR() bfin_read32(MDMA1_D0_CURR_DESC_PTR)
945#define bfin_write_MDMA1_D0_CURR_DESC_PTR(val) bfin_write32(MDMA1_D0_CURR_DESC_PTR,val)
946#define bfin_read_MDMA1_D0_CURR_ADDR() bfin_read32(MDMA1_D0_CURR_ADDR)
947#define bfin_write_MDMA1_D0_CURR_ADDR(val) bfin_write32(MDMA1_D0_CURR_ADDR,val)
948#define bfin_read_MDMA1_D0_CURR_X_COUNT() bfin_read16(MDMA1_D0_CURR_X_COUNT)
949#define bfin_write_MDMA1_D0_CURR_X_COUNT(val) bfin_write16(MDMA1_D0_CURR_X_COUNT,val)
950#define bfin_read_MDMA1_D0_CURR_Y_COUNT() bfin_read16(MDMA1_D0_CURR_Y_COUNT)
951#define bfin_write_MDMA1_D0_CURR_Y_COUNT(val) bfin_write16(MDMA1_D0_CURR_Y_COUNT,val)
952#define bfin_read_MDMA1_D0_IRQ_STATUS() bfin_read16(MDMA1_D0_IRQ_STATUS)
953#define bfin_write_MDMA1_D0_IRQ_STATUS(val) bfin_write16(MDMA1_D0_IRQ_STATUS,val)
954#define bfin_read_MDMA1_D0_PERIPHERAL_MAP() bfin_read16(MDMA1_D0_PERIPHERAL_MAP)
955#define bfin_write_MDMA1_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA1_D0_PERIPHERAL_MAP,val)
956#define bfin_read_MDMA1_S0_CONFIG() bfin_read16(MDMA1_S0_CONFIG)
957#define bfin_write_MDMA1_S0_CONFIG(val) bfin_write16(MDMA1_S0_CONFIG,val)
958#define bfin_read_MDMA1_S0_NEXT_DESC_PTR() bfin_read32(MDMA1_S0_NEXT_DESC_PTR)
959#define bfin_write_MDMA1_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA1_S0_NEXT_DESC_PTR,val)
960#define bfin_read_MDMA1_S0_START_ADDR() bfin_read32(MDMA1_S0_START_ADDR)
961#define bfin_write_MDMA1_S0_START_ADDR(val) bfin_write32(MDMA1_S0_START_ADDR,val)
962#define bfin_read_MDMA1_S0_X_COUNT() bfin_read16(MDMA1_S0_X_COUNT)
963#define bfin_write_MDMA1_S0_X_COUNT(val) bfin_write16(MDMA1_S0_X_COUNT,val)
964#define bfin_read_MDMA1_S0_Y_COUNT() bfin_read16(MDMA1_S0_Y_COUNT)
965#define bfin_write_MDMA1_S0_Y_COUNT(val) bfin_write16(MDMA1_S0_Y_COUNT,val)
966#define bfin_read_MDMA1_S0_X_MODIFY() bfin_read16(MDMA1_S0_X_MODIFY)
967#define bfin_write_MDMA1_S0_X_MODIFY(val) bfin_write16(MDMA1_S0_X_MODIFY,val)
968#define bfin_read_MDMA1_S0_Y_MODIFY() bfin_read16(MDMA1_S0_Y_MODIFY)
969#define bfin_write_MDMA1_S0_Y_MODIFY(val) bfin_write16(MDMA1_S0_Y_MODIFY,val)
970#define bfin_read_MDMA1_S0_CURR_DESC_PTR() bfin_read32(MDMA1_S0_CURR_DESC_PTR)
971#define bfin_write_MDMA1_S0_CURR_DESC_PTR(val) bfin_write32(MDMA1_S0_CURR_DESC_PTR,val)
972#define bfin_read_MDMA1_S0_CURR_ADDR() bfin_read32(MDMA1_S0_CURR_ADDR)
973#define bfin_write_MDMA1_S0_CURR_ADDR(val) bfin_write32(MDMA1_S0_CURR_ADDR,val)
974#define bfin_read_MDMA1_S0_CURR_X_COUNT() bfin_read16(MDMA1_S0_CURR_X_COUNT)
975#define bfin_write_MDMA1_S0_CURR_X_COUNT(val) bfin_write16(MDMA1_S0_CURR_X_COUNT,val)
976#define bfin_read_MDMA1_S0_CURR_Y_COUNT() bfin_read16(MDMA1_S0_CURR_Y_COUNT)
977#define bfin_write_MDMA1_S0_CURR_Y_COUNT(val) bfin_write16(MDMA1_S0_CURR_Y_COUNT,val)
978#define bfin_read_MDMA1_S0_IRQ_STATUS() bfin_read16(MDMA1_S0_IRQ_STATUS)
979#define bfin_write_MDMA1_S0_IRQ_STATUS(val) bfin_write16(MDMA1_S0_IRQ_STATUS,val)
980#define bfin_read_MDMA1_S0_PERIPHERAL_MAP() bfin_read16(MDMA1_S0_PERIPHERAL_MAP)
981#define bfin_write_MDMA1_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA1_S0_PERIPHERAL_MAP,val)
982#define bfin_read_MDMA1_D1_CONFIG() bfin_read16(MDMA1_D1_CONFIG)
983#define bfin_write_MDMA1_D1_CONFIG(val) bfin_write16(MDMA1_D1_CONFIG,val)
984#define bfin_read_MDMA1_D1_NEXT_DESC_PTR() bfin_read32(MDMA1_D1_NEXT_DESC_PTR)
985#define bfin_write_MDMA1_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA1_D1_NEXT_DESC_PTR,val)
986#define bfin_read_MDMA1_D1_START_ADDR() bfin_read32(MDMA1_D1_START_ADDR)
987#define bfin_write_MDMA1_D1_START_ADDR(val) bfin_write32(MDMA1_D1_START_ADDR,val)
988#define bfin_read_MDMA1_D1_X_COUNT() bfin_read16(MDMA1_D1_X_COUNT)
989#define bfin_write_MDMA1_D1_X_COUNT(val) bfin_write16(MDMA1_D1_X_COUNT,val)
990#define bfin_read_MDMA1_D1_Y_COUNT() bfin_read16(MDMA1_D1_Y_COUNT)
991#define bfin_write_MDMA1_D1_Y_COUNT(val) bfin_write16(MDMA1_D1_Y_COUNT,val)
992#define bfin_read_MDMA1_D1_X_MODIFY() bfin_read16(MDMA1_D1_X_MODIFY)
993#define bfin_write_MDMA1_D1_X_MODIFY(val) bfin_write16(MDMA1_D1_X_MODIFY,val)
994#define bfin_read_MDMA1_D1_Y_MODIFY() bfin_read16(MDMA1_D1_Y_MODIFY)
995#define bfin_write_MDMA1_D1_Y_MODIFY(val) bfin_write16(MDMA1_D1_Y_MODIFY,val)
996#define bfin_read_MDMA1_D1_CURR_DESC_PTR() bfin_read32(MDMA1_D1_CURR_DESC_PTR)
997#define bfin_write_MDMA1_D1_CURR_DESC_PTR(val) bfin_write32(MDMA1_D1_CURR_DESC_PTR,val)
998#define bfin_read_MDMA1_D1_CURR_ADDR() bfin_read32(MDMA1_D1_CURR_ADDR)
999#define bfin_write_MDMA1_D1_CURR_ADDR(val) bfin_write32(MDMA1_D1_CURR_ADDR,val)
1000#define bfin_read_MDMA1_D1_CURR_X_COUNT() bfin_read16(MDMA1_D1_CURR_X_COUNT)
1001#define bfin_write_MDMA1_D1_CURR_X_COUNT(val) bfin_write16(MDMA1_D1_CURR_X_COUNT,val)
1002#define bfin_read_MDMA1_D1_CURR_Y_COUNT() bfin_read16(MDMA1_D1_CURR_Y_COUNT)
1003#define bfin_write_MDMA1_D1_CURR_Y_COUNT(val) bfin_write16(MDMA1_D1_CURR_Y_COUNT,val)
1004#define bfin_read_MDMA1_D1_IRQ_STATUS() bfin_read16(MDMA1_D1_IRQ_STATUS)
1005#define bfin_write_MDMA1_D1_IRQ_STATUS(val) bfin_write16(MDMA1_D1_IRQ_STATUS,val)
1006#define bfin_read_MDMA1_D1_PERIPHERAL_MAP() bfin_read16(MDMA1_D1_PERIPHERAL_MAP)
1007#define bfin_write_MDMA1_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA1_D1_PERIPHERAL_MAP,val)
1008#define bfin_read_MDMA1_S1_CONFIG() bfin_read16(MDMA1_S1_CONFIG)
1009#define bfin_write_MDMA1_S1_CONFIG(val) bfin_write16(MDMA1_S1_CONFIG,val)
1010#define bfin_read_MDMA1_S1_NEXT_DESC_PTR() bfin_read32(MDMA1_S1_NEXT_DESC_PTR)
1011#define bfin_write_MDMA1_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA1_S1_NEXT_DESC_PTR,val)
1012#define bfin_read_MDMA1_S1_START_ADDR() bfin_read32(MDMA1_S1_START_ADDR)
1013#define bfin_write_MDMA1_S1_START_ADDR(val) bfin_write32(MDMA1_S1_START_ADDR,val)
1014#define bfin_read_MDMA1_S1_X_COUNT() bfin_read16(MDMA1_S1_X_COUNT)
1015#define bfin_write_MDMA1_S1_X_COUNT(val) bfin_write16(MDMA1_S1_X_COUNT,val)
1016#define bfin_read_MDMA1_S1_Y_COUNT() bfin_read16(MDMA1_S1_Y_COUNT)
1017#define bfin_write_MDMA1_S1_Y_COUNT(val) bfin_write16(MDMA1_S1_Y_COUNT,val)
1018#define bfin_read_MDMA1_S1_X_MODIFY() bfin_read16(MDMA1_S1_X_MODIFY)
1019#define bfin_write_MDMA1_S1_X_MODIFY(val) bfin_write16(MDMA1_S1_X_MODIFY,val)
1020#define bfin_read_MDMA1_S1_Y_MODIFY() bfin_read16(MDMA1_S1_Y_MODIFY)
1021#define bfin_write_MDMA1_S1_Y_MODIFY(val) bfin_write16(MDMA1_S1_Y_MODIFY,val)
1022#define bfin_read_MDMA1_S1_CURR_DESC_PTR() bfin_read32(MDMA1_S1_CURR_DESC_PTR)
1023#define bfin_write_MDMA1_S1_CURR_DESC_PTR(val) bfin_write32(MDMA1_S1_CURR_DESC_PTR,val)
1024#define bfin_read_MDMA1_S1_CURR_ADDR() bfin_read32(MDMA1_S1_CURR_ADDR)
1025#define bfin_write_MDMA1_S1_CURR_ADDR(val) bfin_write32(MDMA1_S1_CURR_ADDR,val)
1026#define bfin_read_MDMA1_S1_CURR_X_COUNT() bfin_read16(MDMA1_S1_CURR_X_COUNT)
1027#define bfin_write_MDMA1_S1_CURR_X_COUNT(val) bfin_write16(MDMA1_S1_CURR_X_COUNT,val)
1028#define bfin_read_MDMA1_S1_CURR_Y_COUNT() bfin_read16(MDMA1_S1_CURR_Y_COUNT)
1029#define bfin_write_MDMA1_S1_CURR_Y_COUNT(val) bfin_write16(MDMA1_S1_CURR_Y_COUNT,val)
1030#define bfin_read_MDMA1_S1_IRQ_STATUS() bfin_read16(MDMA1_S1_IRQ_STATUS)
1031#define bfin_write_MDMA1_S1_IRQ_STATUS(val) bfin_write16(MDMA1_S1_IRQ_STATUS,val)
1032#define bfin_read_MDMA1_S1_PERIPHERAL_MAP() bfin_read16(MDMA1_S1_PERIPHERAL_MAP)
1033#define bfin_write_MDMA1_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA1_S1_PERIPHERAL_MAP,val)
1034/* DMA2 Controller registers (0xFFC0 0C00-0xFFC0 0DFF) */
1035#define bfin_read_DMA2_0_CONFIG() bfin_read16(DMA2_0_CONFIG)
1036#define bfin_write_DMA2_0_CONFIG(val) bfin_write16(DMA2_0_CONFIG,val)
1037#define bfin_read_DMA2_0_NEXT_DESC_PTR() bfin_read32(DMA2_0_NEXT_DESC_PTR)
1038#define bfin_write_DMA2_0_NEXT_DESC_PTR(val) bfin_write32(DMA2_0_NEXT_DESC_PTR,val)
1039#define bfin_read_DMA2_0_START_ADDR() bfin_read32(DMA2_0_START_ADDR)
1040#define bfin_write_DMA2_0_START_ADDR(val) bfin_write32(DMA2_0_START_ADDR,val)
1041#define bfin_read_DMA2_0_X_COUNT() bfin_read16(DMA2_0_X_COUNT)
1042#define bfin_write_DMA2_0_X_COUNT(val) bfin_write16(DMA2_0_X_COUNT,val)
1043#define bfin_read_DMA2_0_Y_COUNT() bfin_read16(DMA2_0_Y_COUNT)
1044#define bfin_write_DMA2_0_Y_COUNT(val) bfin_write16(DMA2_0_Y_COUNT,val)
1045#define bfin_read_DMA2_0_X_MODIFY() bfin_read16(DMA2_0_X_MODIFY)
1046#define bfin_write_DMA2_0_X_MODIFY(val) bfin_write16(DMA2_0_X_MODIFY,val)
1047#define bfin_read_DMA2_0_Y_MODIFY() bfin_read16(DMA2_0_Y_MODIFY)
1048#define bfin_write_DMA2_0_Y_MODIFY(val) bfin_write16(DMA2_0_Y_MODIFY,val)
1049#define bfin_read_DMA2_0_CURR_DESC_PTR() bfin_read32(DMA2_0_CURR_DESC_PTR)
1050#define bfin_write_DMA2_0_CURR_DESC_PTR(val) bfin_write32(DMA2_0_CURR_DESC_PTR,val)
1051#define bfin_read_DMA2_0_CURR_ADDR() bfin_read32(DMA2_0_CURR_ADDR)
1052#define bfin_write_DMA2_0_CURR_ADDR(val) bfin_write32(DMA2_0_CURR_ADDR,val)
1053#define bfin_read_DMA2_0_CURR_X_COUNT() bfin_read16(DMA2_0_CURR_X_COUNT)
1054#define bfin_write_DMA2_0_CURR_X_COUNT(val) bfin_write16(DMA2_0_CURR_X_COUNT,val)
1055#define bfin_read_DMA2_0_CURR_Y_COUNT() bfin_read16(DMA2_0_CURR_Y_COUNT)
1056#define bfin_write_DMA2_0_CURR_Y_COUNT(val) bfin_write16(DMA2_0_CURR_Y_COUNT,val)
1057#define bfin_read_DMA2_0_IRQ_STATUS() bfin_read16(DMA2_0_IRQ_STATUS)
1058#define bfin_write_DMA2_0_IRQ_STATUS(val) bfin_write16(DMA2_0_IRQ_STATUS,val)
1059#define bfin_read_DMA2_0_PERIPHERAL_MAP() bfin_read16(DMA2_0_PERIPHERAL_MAP)
1060#define bfin_write_DMA2_0_PERIPHERAL_MAP(val) bfin_write16(DMA2_0_PERIPHERAL_MAP,val)
1061#define bfin_read_DMA2_1_CONFIG() bfin_read16(DMA2_1_CONFIG)
1062#define bfin_write_DMA2_1_CONFIG(val) bfin_write16(DMA2_1_CONFIG,val)
1063#define bfin_read_DMA2_1_NEXT_DESC_PTR() bfin_read32(DMA2_1_NEXT_DESC_PTR)
1064#define bfin_write_DMA2_1_NEXT_DESC_PTR(val) bfin_write32(DMA2_1_NEXT_DESC_PTR,val)
1065#define bfin_read_DMA2_1_START_ADDR() bfin_read32(DMA2_1_START_ADDR)
1066#define bfin_write_DMA2_1_START_ADDR(val) bfin_write32(DMA2_1_START_ADDR,val)
1067#define bfin_read_DMA2_1_X_COUNT() bfin_read16(DMA2_1_X_COUNT)
1068#define bfin_write_DMA2_1_X_COUNT(val) bfin_write16(DMA2_1_X_COUNT,val)
1069#define bfin_read_DMA2_1_Y_COUNT() bfin_read16(DMA2_1_Y_COUNT)
1070#define bfin_write_DMA2_1_Y_COUNT(val) bfin_write16(DMA2_1_Y_COUNT,val)
1071#define bfin_read_DMA2_1_X_MODIFY() bfin_read16(DMA2_1_X_MODIFY)
1072#define bfin_write_DMA2_1_X_MODIFY(val) bfin_write16(DMA2_1_X_MODIFY,val)
1073#define bfin_read_DMA2_1_Y_MODIFY() bfin_read16(DMA2_1_Y_MODIFY)
1074#define bfin_write_DMA2_1_Y_MODIFY(val) bfin_write16(DMA2_1_Y_MODIFY,val)
1075#define bfin_read_DMA2_1_CURR_DESC_PTR() bfin_read32(DMA2_1_CURR_DESC_PTR)
1076#define bfin_write_DMA2_1_CURR_DESC_PTR(val) bfin_write32(DMA2_1_CURR_DESC_PTR,val)
1077#define bfin_read_DMA2_1_CURR_ADDR() bfin_read32(DMA2_1_CURR_ADDR)
1078#define bfin_write_DMA2_1_CURR_ADDR(val) bfin_write32(DMA2_1_CURR_ADDR,val)
1079#define bfin_read_DMA2_1_CURR_X_COUNT() bfin_read16(DMA2_1_CURR_X_COUNT)
1080#define bfin_write_DMA2_1_CURR_X_COUNT(val) bfin_write16(DMA2_1_CURR_X_COUNT,val)
1081#define bfin_read_DMA2_1_CURR_Y_COUNT() bfin_read16(DMA2_1_CURR_Y_COUNT)
1082#define bfin_write_DMA2_1_CURR_Y_COUNT(val) bfin_write16(DMA2_1_CURR_Y_COUNT,val)
1083#define bfin_read_DMA2_1_IRQ_STATUS() bfin_read16(DMA2_1_IRQ_STATUS)
1084#define bfin_write_DMA2_1_IRQ_STATUS(val) bfin_write16(DMA2_1_IRQ_STATUS,val)
1085#define bfin_read_DMA2_1_PERIPHERAL_MAP() bfin_read16(DMA2_1_PERIPHERAL_MAP)
1086#define bfin_write_DMA2_1_PERIPHERAL_MAP(val) bfin_write16(DMA2_1_PERIPHERAL_MAP,val)
1087#define bfin_read_DMA2_2_CONFIG() bfin_read16(DMA2_2_CONFIG)
1088#define bfin_write_DMA2_2_CONFIG(val) bfin_write16(DMA2_2_CONFIG,val)
1089#define bfin_read_DMA2_2_NEXT_DESC_PTR() bfin_read32(DMA2_2_NEXT_DESC_PTR)
1090#define bfin_write_DMA2_2_NEXT_DESC_PTR(val) bfin_write32(DMA2_2_NEXT_DESC_PTR,val)
1091#define bfin_read_DMA2_2_START_ADDR() bfin_read32(DMA2_2_START_ADDR)
1092#define bfin_write_DMA2_2_START_ADDR(val) bfin_write32(DMA2_2_START_ADDR,val)
1093#define bfin_read_DMA2_2_X_COUNT() bfin_read16(DMA2_2_X_COUNT)
1094#define bfin_write_DMA2_2_X_COUNT(val) bfin_write16(DMA2_2_X_COUNT,val)
1095#define bfin_read_DMA2_2_Y_COUNT() bfin_read16(DMA2_2_Y_COUNT)
1096#define bfin_write_DMA2_2_Y_COUNT(val) bfin_write16(DMA2_2_Y_COUNT,val)
1097#define bfin_read_DMA2_2_X_MODIFY() bfin_read16(DMA2_2_X_MODIFY)
1098#define bfin_write_DMA2_2_X_MODIFY(val) bfin_write16(DMA2_2_X_MODIFY,val)
1099#define bfin_read_DMA2_2_Y_MODIFY() bfin_read16(DMA2_2_Y_MODIFY)
1100#define bfin_write_DMA2_2_Y_MODIFY(val) bfin_write16(DMA2_2_Y_MODIFY,val)
1101#define bfin_read_DMA2_2_CURR_DESC_PTR() bfin_read32(DMA2_2_CURR_DESC_PTR)
1102#define bfin_write_DMA2_2_CURR_DESC_PTR(val) bfin_write32(DMA2_2_CURR_DESC_PTR,val)
1103#define bfin_read_DMA2_2_CURR_ADDR() bfin_read32(DMA2_2_CURR_ADDR)
1104#define bfin_write_DMA2_2_CURR_ADDR(val) bfin_write32(DMA2_2_CURR_ADDR,val)
1105#define bfin_read_DMA2_2_CURR_X_COUNT() bfin_read16(DMA2_2_CURR_X_COUNT)
1106#define bfin_write_DMA2_2_CURR_X_COUNT(val) bfin_write16(DMA2_2_CURR_X_COUNT,val)
1107#define bfin_read_DMA2_2_CURR_Y_COUNT() bfin_read16(DMA2_2_CURR_Y_COUNT)
1108#define bfin_write_DMA2_2_CURR_Y_COUNT(val) bfin_write16(DMA2_2_CURR_Y_COUNT,val)
1109#define bfin_read_DMA2_2_IRQ_STATUS() bfin_read16(DMA2_2_IRQ_STATUS)
1110#define bfin_write_DMA2_2_IRQ_STATUS(val) bfin_write16(DMA2_2_IRQ_STATUS,val)
1111#define bfin_read_DMA2_2_PERIPHERAL_MAP() bfin_read16(DMA2_2_PERIPHERAL_MAP)
1112#define bfin_write_DMA2_2_PERIPHERAL_MAP(val) bfin_write16(DMA2_2_PERIPHERAL_MAP,val)
1113#define bfin_read_DMA2_3_CONFIG() bfin_read16(DMA2_3_CONFIG)
1114#define bfin_write_DMA2_3_CONFIG(val) bfin_write16(DMA2_3_CONFIG,val)
1115#define bfin_read_DMA2_3_NEXT_DESC_PTR() bfin_read32(DMA2_3_NEXT_DESC_PTR)
1116#define bfin_write_DMA2_3_NEXT_DESC_PTR(val) bfin_write32(DMA2_3_NEXT_DESC_PTR,val)
1117#define bfin_read_DMA2_3_START_ADDR() bfin_read32(DMA2_3_START_ADDR)
1118#define bfin_write_DMA2_3_START_ADDR(val) bfin_write32(DMA2_3_START_ADDR,val)
1119#define bfin_read_DMA2_3_X_COUNT() bfin_read16(DMA2_3_X_COUNT)
1120#define bfin_write_DMA2_3_X_COUNT(val) bfin_write16(DMA2_3_X_COUNT,val)
1121#define bfin_read_DMA2_3_Y_COUNT() bfin_read16(DMA2_3_Y_COUNT)
1122#define bfin_write_DMA2_3_Y_COUNT(val) bfin_write16(DMA2_3_Y_COUNT,val)
1123#define bfin_read_DMA2_3_X_MODIFY() bfin_read16(DMA2_3_X_MODIFY)
1124#define bfin_write_DMA2_3_X_MODIFY(val) bfin_write16(DMA2_3_X_MODIFY,val)
1125#define bfin_read_DMA2_3_Y_MODIFY() bfin_read16(DMA2_3_Y_MODIFY)
1126#define bfin_write_DMA2_3_Y_MODIFY(val) bfin_write16(DMA2_3_Y_MODIFY,val)
1127#define bfin_read_DMA2_3_CURR_DESC_PTR() bfin_read32(DMA2_3_CURR_DESC_PTR)
1128#define bfin_write_DMA2_3_CURR_DESC_PTR(val) bfin_write32(DMA2_3_CURR_DESC_PTR,val)
1129#define bfin_read_DMA2_3_CURR_ADDR() bfin_read32(DMA2_3_CURR_ADDR)
1130#define bfin_write_DMA2_3_CURR_ADDR(val) bfin_write32(DMA2_3_CURR_ADDR,val)
1131#define bfin_read_DMA2_3_CURR_X_COUNT() bfin_read16(DMA2_3_CURR_X_COUNT)
1132#define bfin_write_DMA2_3_CURR_X_COUNT(val) bfin_write16(DMA2_3_CURR_X_COUNT,val)
1133#define bfin_read_DMA2_3_CURR_Y_COUNT() bfin_read16(DMA2_3_CURR_Y_COUNT)
1134#define bfin_write_DMA2_3_CURR_Y_COUNT(val) bfin_write16(DMA2_3_CURR_Y_COUNT,val)
1135#define bfin_read_DMA2_3_IRQ_STATUS() bfin_read16(DMA2_3_IRQ_STATUS)
1136#define bfin_write_DMA2_3_IRQ_STATUS(val) bfin_write16(DMA2_3_IRQ_STATUS,val)
1137#define bfin_read_DMA2_3_PERIPHERAL_MAP() bfin_read16(DMA2_3_PERIPHERAL_MAP)
1138#define bfin_write_DMA2_3_PERIPHERAL_MAP(val) bfin_write16(DMA2_3_PERIPHERAL_MAP,val)
1139#define bfin_read_DMA2_4_CONFIG() bfin_read16(DMA2_4_CONFIG)
1140#define bfin_write_DMA2_4_CONFIG(val) bfin_write16(DMA2_4_CONFIG,val)
1141#define bfin_read_DMA2_4_NEXT_DESC_PTR() bfin_read32(DMA2_4_NEXT_DESC_PTR)
1142#define bfin_write_DMA2_4_NEXT_DESC_PTR(val) bfin_write32(DMA2_4_NEXT_DESC_PTR,val)
1143#define bfin_read_DMA2_4_START_ADDR() bfin_read32(DMA2_4_START_ADDR)
1144#define bfin_write_DMA2_4_START_ADDR(val) bfin_write32(DMA2_4_START_ADDR,val)
1145#define bfin_read_DMA2_4_X_COUNT() bfin_read16(DMA2_4_X_COUNT)
1146#define bfin_write_DMA2_4_X_COUNT(val) bfin_write16(DMA2_4_X_COUNT,val)
1147#define bfin_read_DMA2_4_Y_COUNT() bfin_read16(DMA2_4_Y_COUNT)
1148#define bfin_write_DMA2_4_Y_COUNT(val) bfin_write16(DMA2_4_Y_COUNT,val)
1149#define bfin_read_DMA2_4_X_MODIFY() bfin_read16(DMA2_4_X_MODIFY)
1150#define bfin_write_DMA2_4_X_MODIFY(val) bfin_write16(DMA2_4_X_MODIFY,val)
1151#define bfin_read_DMA2_4_Y_MODIFY() bfin_read16(DMA2_4_Y_MODIFY)
1152#define bfin_write_DMA2_4_Y_MODIFY(val) bfin_write16(DMA2_4_Y_MODIFY,val)
1153#define bfin_read_DMA2_4_CURR_DESC_PTR() bfin_read32(DMA2_4_CURR_DESC_PTR)
1154#define bfin_write_DMA2_4_CURR_DESC_PTR(val) bfin_write32(DMA2_4_CURR_DESC_PTR,val)
1155#define bfin_read_DMA2_4_CURR_ADDR() bfin_read32(DMA2_4_CURR_ADDR)
1156#define bfin_write_DMA2_4_CURR_ADDR(val) bfin_write32(DMA2_4_CURR_ADDR,val)
1157#define bfin_read_DMA2_4_CURR_X_COUNT() bfin_read16(DMA2_4_CURR_X_COUNT)
1158#define bfin_write_DMA2_4_CURR_X_COUNT(val) bfin_write16(DMA2_4_CURR_X_COUNT,val)
1159#define bfin_read_DMA2_4_CURR_Y_COUNT() bfin_read16(DMA2_4_CURR_Y_COUNT)
1160#define bfin_write_DMA2_4_CURR_Y_COUNT(val) bfin_write16(DMA2_4_CURR_Y_COUNT,val)
1161#define bfin_read_DMA2_4_IRQ_STATUS() bfin_read16(DMA2_4_IRQ_STATUS)
1162#define bfin_write_DMA2_4_IRQ_STATUS(val) bfin_write16(DMA2_4_IRQ_STATUS,val)
1163#define bfin_read_DMA2_4_PERIPHERAL_MAP() bfin_read16(DMA2_4_PERIPHERAL_MAP)
1164#define bfin_write_DMA2_4_PERIPHERAL_MAP(val) bfin_write16(DMA2_4_PERIPHERAL_MAP,val)
1165#define bfin_read_DMA2_5_CONFIG() bfin_read16(DMA2_5_CONFIG)
1166#define bfin_write_DMA2_5_CONFIG(val) bfin_write16(DMA2_5_CONFIG,val)
1167#define bfin_read_DMA2_5_NEXT_DESC_PTR() bfin_read32(DMA2_5_NEXT_DESC_PTR)
1168#define bfin_write_DMA2_5_NEXT_DESC_PTR(val) bfin_write32(DMA2_5_NEXT_DESC_PTR,val)
1169#define bfin_read_DMA2_5_START_ADDR() bfin_read32(DMA2_5_START_ADDR)
1170#define bfin_write_DMA2_5_START_ADDR(val) bfin_write32(DMA2_5_START_ADDR,val)
1171#define bfin_read_DMA2_5_X_COUNT() bfin_read16(DMA2_5_X_COUNT)
1172#define bfin_write_DMA2_5_X_COUNT(val) bfin_write16(DMA2_5_X_COUNT,val)
1173#define bfin_read_DMA2_5_Y_COUNT() bfin_read16(DMA2_5_Y_COUNT)
1174#define bfin_write_DMA2_5_Y_COUNT(val) bfin_write16(DMA2_5_Y_COUNT,val)
1175#define bfin_read_DMA2_5_X_MODIFY() bfin_read16(DMA2_5_X_MODIFY)
1176#define bfin_write_DMA2_5_X_MODIFY(val) bfin_write16(DMA2_5_X_MODIFY,val)
1177#define bfin_read_DMA2_5_Y_MODIFY() bfin_read16(DMA2_5_Y_MODIFY)
1178#define bfin_write_DMA2_5_Y_MODIFY(val) bfin_write16(DMA2_5_Y_MODIFY,val)
1179#define bfin_read_DMA2_5_CURR_DESC_PTR() bfin_read32(DMA2_5_CURR_DESC_PTR)
1180#define bfin_write_DMA2_5_CURR_DESC_PTR(val) bfin_write32(DMA2_5_CURR_DESC_PTR,val)
1181#define bfin_read_DMA2_5_CURR_ADDR() bfin_read32(DMA2_5_CURR_ADDR)
1182#define bfin_write_DMA2_5_CURR_ADDR(val) bfin_write32(DMA2_5_CURR_ADDR,val)
1183#define bfin_read_DMA2_5_CURR_X_COUNT() bfin_read16(DMA2_5_CURR_X_COUNT)
1184#define bfin_write_DMA2_5_CURR_X_COUNT(val) bfin_write16(DMA2_5_CURR_X_COUNT,val)
1185#define bfin_read_DMA2_5_CURR_Y_COUNT() bfin_read16(DMA2_5_CURR_Y_COUNT)
1186#define bfin_write_DMA2_5_CURR_Y_COUNT(val) bfin_write16(DMA2_5_CURR_Y_COUNT,val)
1187#define bfin_read_DMA2_5_IRQ_STATUS() bfin_read16(DMA2_5_IRQ_STATUS)
1188#define bfin_write_DMA2_5_IRQ_STATUS(val) bfin_write16(DMA2_5_IRQ_STATUS,val)
1189#define bfin_read_DMA2_5_PERIPHERAL_MAP() bfin_read16(DMA2_5_PERIPHERAL_MAP)
1190#define bfin_write_DMA2_5_PERIPHERAL_MAP(val) bfin_write16(DMA2_5_PERIPHERAL_MAP,val)
1191#define bfin_read_DMA2_6_CONFIG() bfin_read16(DMA2_6_CONFIG)
1192#define bfin_write_DMA2_6_CONFIG(val) bfin_write16(DMA2_6_CONFIG,val)
1193#define bfin_read_DMA2_6_NEXT_DESC_PTR() bfin_read32(DMA2_6_NEXT_DESC_PTR)
1194#define bfin_write_DMA2_6_NEXT_DESC_PTR(val) bfin_write32(DMA2_6_NEXT_DESC_PTR,val)
1195#define bfin_read_DMA2_6_START_ADDR() bfin_read32(DMA2_6_START_ADDR)
1196#define bfin_write_DMA2_6_START_ADDR(val) bfin_write32(DMA2_6_START_ADDR,val)
1197#define bfin_read_DMA2_6_X_COUNT() bfin_read16(DMA2_6_X_COUNT)
1198#define bfin_write_DMA2_6_X_COUNT(val) bfin_write16(DMA2_6_X_COUNT,val)
1199#define bfin_read_DMA2_6_Y_COUNT() bfin_read16(DMA2_6_Y_COUNT)
1200#define bfin_write_DMA2_6_Y_COUNT(val) bfin_write16(DMA2_6_Y_COUNT,val)
1201#define bfin_read_DMA2_6_X_MODIFY() bfin_read16(DMA2_6_X_MODIFY)
1202#define bfin_write_DMA2_6_X_MODIFY(val) bfin_write16(DMA2_6_X_MODIFY,val)
1203#define bfin_read_DMA2_6_Y_MODIFY() bfin_read16(DMA2_6_Y_MODIFY)
1204#define bfin_write_DMA2_6_Y_MODIFY(val) bfin_write16(DMA2_6_Y_MODIFY,val)
1205#define bfin_read_DMA2_6_CURR_DESC_PTR() bfin_read32(DMA2_6_CURR_DESC_PTR)
1206#define bfin_write_DMA2_6_CURR_DESC_PTR(val) bfin_write32(DMA2_6_CURR_DESC_PTR,val)
1207#define bfin_read_DMA2_6_CURR_ADDR() bfin_read32(DMA2_6_CURR_ADDR)
1208#define bfin_write_DMA2_6_CURR_ADDR(val) bfin_write32(DMA2_6_CURR_ADDR,val)
1209#define bfin_read_DMA2_6_CURR_X_COUNT() bfin_read16(DMA2_6_CURR_X_COUNT)
1210#define bfin_write_DMA2_6_CURR_X_COUNT(val) bfin_write16(DMA2_6_CURR_X_COUNT,val)
1211#define bfin_read_DMA2_6_CURR_Y_COUNT() bfin_read16(DMA2_6_CURR_Y_COUNT)
1212#define bfin_write_DMA2_6_CURR_Y_COUNT(val) bfin_write16(DMA2_6_CURR_Y_COUNT,val)
1213#define bfin_read_DMA2_6_IRQ_STATUS() bfin_read16(DMA2_6_IRQ_STATUS)
1214#define bfin_write_DMA2_6_IRQ_STATUS(val) bfin_write16(DMA2_6_IRQ_STATUS,val)
1215#define bfin_read_DMA2_6_PERIPHERAL_MAP() bfin_read16(DMA2_6_PERIPHERAL_MAP)
1216#define bfin_write_DMA2_6_PERIPHERAL_MAP(val) bfin_write16(DMA2_6_PERIPHERAL_MAP,val)
1217#define bfin_read_DMA2_7_CONFIG() bfin_read16(DMA2_7_CONFIG)
1218#define bfin_write_DMA2_7_CONFIG(val) bfin_write16(DMA2_7_CONFIG,val)
1219#define bfin_read_DMA2_7_NEXT_DESC_PTR() bfin_read32(DMA2_7_NEXT_DESC_PTR)
1220#define bfin_write_DMA2_7_NEXT_DESC_PTR(val) bfin_write32(DMA2_7_NEXT_DESC_PTR,val)
1221#define bfin_read_DMA2_7_START_ADDR() bfin_read32(DMA2_7_START_ADDR)
1222#define bfin_write_DMA2_7_START_ADDR(val) bfin_write32(DMA2_7_START_ADDR,val)
1223#define bfin_read_DMA2_7_X_COUNT() bfin_read16(DMA2_7_X_COUNT)
1224#define bfin_write_DMA2_7_X_COUNT(val) bfin_write16(DMA2_7_X_COUNT,val)
1225#define bfin_read_DMA2_7_Y_COUNT() bfin_read16(DMA2_7_Y_COUNT)
1226#define bfin_write_DMA2_7_Y_COUNT(val) bfin_write16(DMA2_7_Y_COUNT,val)
1227#define bfin_read_DMA2_7_X_MODIFY() bfin_read16(DMA2_7_X_MODIFY)
1228#define bfin_write_DMA2_7_X_MODIFY(val) bfin_write16(DMA2_7_X_MODIFY,val)
1229#define bfin_read_DMA2_7_Y_MODIFY() bfin_read16(DMA2_7_Y_MODIFY)
1230#define bfin_write_DMA2_7_Y_MODIFY(val) bfin_write16(DMA2_7_Y_MODIFY,val)
1231#define bfin_read_DMA2_7_CURR_DESC_PTR() bfin_read32(DMA2_7_CURR_DESC_PTR)
1232#define bfin_write_DMA2_7_CURR_DESC_PTR(val) bfin_write32(DMA2_7_CURR_DESC_PTR,val)
1233#define bfin_read_DMA2_7_CURR_ADDR() bfin_read32(DMA2_7_CURR_ADDR)
1234#define bfin_write_DMA2_7_CURR_ADDR(val) bfin_write32(DMA2_7_CURR_ADDR,val)
1235#define bfin_read_DMA2_7_CURR_X_COUNT() bfin_read16(DMA2_7_CURR_X_COUNT)
1236#define bfin_write_DMA2_7_CURR_X_COUNT(val) bfin_write16(DMA2_7_CURR_X_COUNT,val)
1237#define bfin_read_DMA2_7_CURR_Y_COUNT() bfin_read16(DMA2_7_CURR_Y_COUNT)
1238#define bfin_write_DMA2_7_CURR_Y_COUNT(val) bfin_write16(DMA2_7_CURR_Y_COUNT,val)
1239#define bfin_read_DMA2_7_IRQ_STATUS() bfin_read16(DMA2_7_IRQ_STATUS)
1240#define bfin_write_DMA2_7_IRQ_STATUS(val) bfin_write16(DMA2_7_IRQ_STATUS,val)
1241#define bfin_read_DMA2_7_PERIPHERAL_MAP() bfin_read16(DMA2_7_PERIPHERAL_MAP)
1242#define bfin_write_DMA2_7_PERIPHERAL_MAP(val) bfin_write16(DMA2_7_PERIPHERAL_MAP,val)
1243#define bfin_read_DMA2_8_CONFIG() bfin_read16(DMA2_8_CONFIG)
1244#define bfin_write_DMA2_8_CONFIG(val) bfin_write16(DMA2_8_CONFIG,val)
1245#define bfin_read_DMA2_8_NEXT_DESC_PTR() bfin_read32(DMA2_8_NEXT_DESC_PTR)
1246#define bfin_write_DMA2_8_NEXT_DESC_PTR(val) bfin_write32(DMA2_8_NEXT_DESC_PTR,val)
1247#define bfin_read_DMA2_8_START_ADDR() bfin_read32(DMA2_8_START_ADDR)
1248#define bfin_write_DMA2_8_START_ADDR(val) bfin_write32(DMA2_8_START_ADDR,val)
1249#define bfin_read_DMA2_8_X_COUNT() bfin_read16(DMA2_8_X_COUNT)
1250#define bfin_write_DMA2_8_X_COUNT(val) bfin_write16(DMA2_8_X_COUNT,val)
1251#define bfin_read_DMA2_8_Y_COUNT() bfin_read16(DMA2_8_Y_COUNT)
1252#define bfin_write_DMA2_8_Y_COUNT(val) bfin_write16(DMA2_8_Y_COUNT,val)
1253#define bfin_read_DMA2_8_X_MODIFY() bfin_read16(DMA2_8_X_MODIFY)
1254#define bfin_write_DMA2_8_X_MODIFY(val) bfin_write16(DMA2_8_X_MODIFY,val)
1255#define bfin_read_DMA2_8_Y_MODIFY() bfin_read16(DMA2_8_Y_MODIFY)
1256#define bfin_write_DMA2_8_Y_MODIFY(val) bfin_write16(DMA2_8_Y_MODIFY,val)
1257#define bfin_read_DMA2_8_CURR_DESC_PTR() bfin_read32(DMA2_8_CURR_DESC_PTR)
1258#define bfin_write_DMA2_8_CURR_DESC_PTR(val) bfin_write32(DMA2_8_CURR_DESC_PTR,val)
1259#define bfin_read_DMA2_8_CURR_ADDR() bfin_read32(DMA2_8_CURR_ADDR)
1260#define bfin_write_DMA2_8_CURR_ADDR(val) bfin_write32(DMA2_8_CURR_ADDR,val)
1261#define bfin_read_DMA2_8_CURR_X_COUNT() bfin_read16(DMA2_8_CURR_X_COUNT)
1262#define bfin_write_DMA2_8_CURR_X_COUNT(val) bfin_write16(DMA2_8_CURR_X_COUNT,val)
1263#define bfin_read_DMA2_8_CURR_Y_COUNT() bfin_read16(DMA2_8_CURR_Y_COUNT)
1264#define bfin_write_DMA2_8_CURR_Y_COUNT(val) bfin_write16(DMA2_8_CURR_Y_COUNT,val)
1265#define bfin_read_DMA2_8_IRQ_STATUS() bfin_read16(DMA2_8_IRQ_STATUS)
1266#define bfin_write_DMA2_8_IRQ_STATUS(val) bfin_write16(DMA2_8_IRQ_STATUS,val)
1267#define bfin_read_DMA2_8_PERIPHERAL_MAP() bfin_read16(DMA2_8_PERIPHERAL_MAP)
1268#define bfin_write_DMA2_8_PERIPHERAL_MAP(val) bfin_write16(DMA2_8_PERIPHERAL_MAP,val)
1269#define bfin_read_DMA2_9_CONFIG() bfin_read16(DMA2_9_CONFIG)
1270#define bfin_write_DMA2_9_CONFIG(val) bfin_write16(DMA2_9_CONFIG,val)
1271#define bfin_read_DMA2_9_NEXT_DESC_PTR() bfin_read32(DMA2_9_NEXT_DESC_PTR)
1272#define bfin_write_DMA2_9_NEXT_DESC_PTR(val) bfin_write32(DMA2_9_NEXT_DESC_PTR,val)
1273#define bfin_read_DMA2_9_START_ADDR() bfin_read32(DMA2_9_START_ADDR)
1274#define bfin_write_DMA2_9_START_ADDR(val) bfin_write32(DMA2_9_START_ADDR,val)
1275#define bfin_read_DMA2_9_X_COUNT() bfin_read16(DMA2_9_X_COUNT)
1276#define bfin_write_DMA2_9_X_COUNT(val) bfin_write16(DMA2_9_X_COUNT,val)
1277#define bfin_read_DMA2_9_Y_COUNT() bfin_read16(DMA2_9_Y_COUNT)
1278#define bfin_write_DMA2_9_Y_COUNT(val) bfin_write16(DMA2_9_Y_COUNT,val)
1279#define bfin_read_DMA2_9_X_MODIFY() bfin_read16(DMA2_9_X_MODIFY)
1280#define bfin_write_DMA2_9_X_MODIFY(val) bfin_write16(DMA2_9_X_MODIFY,val)
1281#define bfin_read_DMA2_9_Y_MODIFY() bfin_read16(DMA2_9_Y_MODIFY)
1282#define bfin_write_DMA2_9_Y_MODIFY(val) bfin_write16(DMA2_9_Y_MODIFY,val)
1283#define bfin_read_DMA2_9_CURR_DESC_PTR() bfin_read32(DMA2_9_CURR_DESC_PTR)
1284#define bfin_write_DMA2_9_CURR_DESC_PTR(val) bfin_write32(DMA2_9_CURR_DESC_PTR,val)
1285#define bfin_read_DMA2_9_CURR_ADDR() bfin_read32(DMA2_9_CURR_ADDR)
1286#define bfin_write_DMA2_9_CURR_ADDR(val) bfin_write32(DMA2_9_CURR_ADDR,val)
1287#define bfin_read_DMA2_9_CURR_X_COUNT() bfin_read16(DMA2_9_CURR_X_COUNT)
1288#define bfin_write_DMA2_9_CURR_X_COUNT(val) bfin_write16(DMA2_9_CURR_X_COUNT,val)
1289#define bfin_read_DMA2_9_CURR_Y_COUNT() bfin_read16(DMA2_9_CURR_Y_COUNT)
1290#define bfin_write_DMA2_9_CURR_Y_COUNT(val) bfin_write16(DMA2_9_CURR_Y_COUNT,val)
1291#define bfin_read_DMA2_9_IRQ_STATUS() bfin_read16(DMA2_9_IRQ_STATUS)
1292#define bfin_write_DMA2_9_IRQ_STATUS(val) bfin_write16(DMA2_9_IRQ_STATUS,val)
1293#define bfin_read_DMA2_9_PERIPHERAL_MAP() bfin_read16(DMA2_9_PERIPHERAL_MAP)
1294#define bfin_write_DMA2_9_PERIPHERAL_MAP(val) bfin_write16(DMA2_9_PERIPHERAL_MAP,val)
1295#define bfin_read_DMA2_10_CONFIG() bfin_read16(DMA2_10_CONFIG)
1296#define bfin_write_DMA2_10_CONFIG(val) bfin_write16(DMA2_10_CONFIG,val)
1297#define bfin_read_DMA2_10_NEXT_DESC_PTR() bfin_read32(DMA2_10_NEXT_DESC_PTR)
1298#define bfin_write_DMA2_10_NEXT_DESC_PTR(val) bfin_write32(DMA2_10_NEXT_DESC_PTR,val)
1299#define bfin_read_DMA2_10_START_ADDR() bfin_read32(DMA2_10_START_ADDR)
1300#define bfin_write_DMA2_10_START_ADDR(val) bfin_write32(DMA2_10_START_ADDR,val)
1301#define bfin_read_DMA2_10_X_COUNT() bfin_read16(DMA2_10_X_COUNT)
1302#define bfin_write_DMA2_10_X_COUNT(val) bfin_write16(DMA2_10_X_COUNT,val)
1303#define bfin_read_DMA2_10_Y_COUNT() bfin_read16(DMA2_10_Y_COUNT)
1304#define bfin_write_DMA2_10_Y_COUNT(val) bfin_write16(DMA2_10_Y_COUNT,val)
1305#define bfin_read_DMA2_10_X_MODIFY() bfin_read16(DMA2_10_X_MODIFY)
1306#define bfin_write_DMA2_10_X_MODIFY(val) bfin_write16(DMA2_10_X_MODIFY,val)
1307#define bfin_read_DMA2_10_Y_MODIFY() bfin_read16(DMA2_10_Y_MODIFY)
1308#define bfin_write_DMA2_10_Y_MODIFY(val) bfin_write16(DMA2_10_Y_MODIFY,val)
1309#define bfin_read_DMA2_10_CURR_DESC_PTR() bfin_read32(DMA2_10_CURR_DESC_PTR)
1310#define bfin_write_DMA2_10_CURR_DESC_PTR(val) bfin_write32(DMA2_10_CURR_DESC_PTR,val)
1311#define bfin_read_DMA2_10_CURR_ADDR() bfin_read32(DMA2_10_CURR_ADDR)
1312#define bfin_write_DMA2_10_CURR_ADDR(val) bfin_write32(DMA2_10_CURR_ADDR,val)
1313#define bfin_read_DMA2_10_CURR_X_COUNT() bfin_read16(DMA2_10_CURR_X_COUNT)
1314#define bfin_write_DMA2_10_CURR_X_COUNT(val) bfin_write16(DMA2_10_CURR_X_COUNT,val)
1315#define bfin_read_DMA2_10_CURR_Y_COUNT() bfin_read16(DMA2_10_CURR_Y_COUNT)
1316#define bfin_write_DMA2_10_CURR_Y_COUNT(val) bfin_write16(DMA2_10_CURR_Y_COUNT,val)
1317#define bfin_read_DMA2_10_IRQ_STATUS() bfin_read16(DMA2_10_IRQ_STATUS)
1318#define bfin_write_DMA2_10_IRQ_STATUS(val) bfin_write16(DMA2_10_IRQ_STATUS,val)
1319#define bfin_read_DMA2_10_PERIPHERAL_MAP() bfin_read16(DMA2_10_PERIPHERAL_MAP)
1320#define bfin_write_DMA2_10_PERIPHERAL_MAP(val) bfin_write16(DMA2_10_PERIPHERAL_MAP,val)
1321#define bfin_read_DMA2_11_CONFIG() bfin_read16(DMA2_11_CONFIG)
1322#define bfin_write_DMA2_11_CONFIG(val) bfin_write16(DMA2_11_CONFIG,val)
1323#define bfin_read_DMA2_11_NEXT_DESC_PTR() bfin_read32(DMA2_11_NEXT_DESC_PTR)
1324#define bfin_write_DMA2_11_NEXT_DESC_PTR(val) bfin_write32(DMA2_11_NEXT_DESC_PTR,val)
1325#define bfin_read_DMA2_11_START_ADDR() bfin_read32(DMA2_11_START_ADDR)
1326#define bfin_write_DMA2_11_START_ADDR(val) bfin_write32(DMA2_11_START_ADDR,val)
1327#define bfin_read_DMA2_11_X_COUNT() bfin_read16(DMA2_11_X_COUNT)
1328#define bfin_write_DMA2_11_X_COUNT(val) bfin_write16(DMA2_11_X_COUNT,val)
1329#define bfin_read_DMA2_11_Y_COUNT() bfin_read16(DMA2_11_Y_COUNT)
1330#define bfin_write_DMA2_11_Y_COUNT(val) bfin_write16(DMA2_11_Y_COUNT,val)
1331#define bfin_read_DMA2_11_X_MODIFY() bfin_read16(DMA2_11_X_MODIFY)
1332#define bfin_write_DMA2_11_X_MODIFY(val) bfin_write16(DMA2_11_X_MODIFY,val)
1333#define bfin_read_DMA2_11_Y_MODIFY() bfin_read16(DMA2_11_Y_MODIFY)
1334#define bfin_write_DMA2_11_Y_MODIFY(val) bfin_write16(DMA2_11_Y_MODIFY,val)
1335#define bfin_read_DMA2_11_CURR_DESC_PTR() bfin_read32(DMA2_11_CURR_DESC_PTR)
1336#define bfin_write_DMA2_11_CURR_DESC_PTR(val) bfin_write32(DMA2_11_CURR_DESC_PTR,val)
1337#define bfin_read_DMA2_11_CURR_ADDR() bfin_read32(DMA2_11_CURR_ADDR)
1338#define bfin_write_DMA2_11_CURR_ADDR(val) bfin_write32(DMA2_11_CURR_ADDR,val)
1339#define bfin_read_DMA2_11_CURR_X_COUNT() bfin_read16(DMA2_11_CURR_X_COUNT)
1340#define bfin_write_DMA2_11_CURR_X_COUNT(val) bfin_write16(DMA2_11_CURR_X_COUNT,val)
1341#define bfin_read_DMA2_11_CURR_Y_COUNT() bfin_read16(DMA2_11_CURR_Y_COUNT)
1342#define bfin_write_DMA2_11_CURR_Y_COUNT(val) bfin_write16(DMA2_11_CURR_Y_COUNT,val)
1343#define bfin_read_DMA2_11_IRQ_STATUS() bfin_read16(DMA2_11_IRQ_STATUS)
1344#define bfin_write_DMA2_11_IRQ_STATUS(val) bfin_write16(DMA2_11_IRQ_STATUS,val)
1345#define bfin_read_DMA2_11_PERIPHERAL_MAP() bfin_read16(DMA2_11_PERIPHERAL_MAP)
1346#define bfin_write_DMA2_11_PERIPHERAL_MAP(val) bfin_write16(DMA2_11_PERIPHERAL_MAP,val)
1347/* Memory DMA2 Controller registers (0xFFC0 0E80-0xFFC0 0FFF) */
1348#define bfin_read_MDMA2_D0_CONFIG() bfin_read16(MDMA2_D0_CONFIG)
1349#define bfin_write_MDMA2_D0_CONFIG(val) bfin_write16(MDMA2_D0_CONFIG,val)
1350#define bfin_read_MDMA2_D0_NEXT_DESC_PTR() bfin_read32(MDMA2_D0_NEXT_DESC_PTR)
1351#define bfin_write_MDMA2_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA2_D0_NEXT_DESC_PTR,val)
1352#define bfin_read_MDMA2_D0_START_ADDR() bfin_read32(MDMA2_D0_START_ADDR)
1353#define bfin_write_MDMA2_D0_START_ADDR(val) bfin_write32(MDMA2_D0_START_ADDR,val)
1354#define bfin_read_MDMA2_D0_X_COUNT() bfin_read16(MDMA2_D0_X_COUNT)
1355#define bfin_write_MDMA2_D0_X_COUNT(val) bfin_write16(MDMA2_D0_X_COUNT,val)
1356#define bfin_read_MDMA2_D0_Y_COUNT() bfin_read16(MDMA2_D0_Y_COUNT)
1357#define bfin_write_MDMA2_D0_Y_COUNT(val) bfin_write16(MDMA2_D0_Y_COUNT,val)
1358#define bfin_read_MDMA2_D0_X_MODIFY() bfin_read16(MDMA2_D0_X_MODIFY)
1359#define bfin_write_MDMA2_D0_X_MODIFY(val) bfin_write16(MDMA2_D0_X_MODIFY,val)
1360#define bfin_read_MDMA2_D0_Y_MODIFY() bfin_read16(MDMA2_D0_Y_MODIFY)
1361#define bfin_write_MDMA2_D0_Y_MODIFY(val) bfin_write16(MDMA2_D0_Y_MODIFY,val)
1362#define bfin_read_MDMA2_D0_CURR_DESC_PTR() bfin_read32(MDMA2_D0_CURR_DESC_PTR)
1363#define bfin_write_MDMA2_D0_CURR_DESC_PTR(val) bfin_write32(MDMA2_D0_CURR_DESC_PTR,val)
1364#define bfin_read_MDMA2_D0_CURR_ADDR() bfin_read32(MDMA2_D0_CURR_ADDR)
1365#define bfin_write_MDMA2_D0_CURR_ADDR(val) bfin_write32(MDMA2_D0_CURR_ADDR,val)
1366#define bfin_read_MDMA2_D0_CURR_X_COUNT() bfin_read16(MDMA2_D0_CURR_X_COUNT)
1367#define bfin_write_MDMA2_D0_CURR_X_COUNT(val) bfin_write16(MDMA2_D0_CURR_X_COUNT,val)
1368#define bfin_read_MDMA2_D0_CURR_Y_COUNT() bfin_read16(MDMA2_D0_CURR_Y_COUNT)
1369#define bfin_write_MDMA2_D0_CURR_Y_COUNT(val) bfin_write16(MDMA2_D0_CURR_Y_COUNT,val)
1370#define bfin_read_MDMA2_D0_IRQ_STATUS() bfin_read16(MDMA2_D0_IRQ_STATUS)
1371#define bfin_write_MDMA2_D0_IRQ_STATUS(val) bfin_write16(MDMA2_D0_IRQ_STATUS,val)
1372#define bfin_read_MDMA2_D0_PERIPHERAL_MAP() bfin_read16(MDMA2_D0_PERIPHERAL_MAP)
1373#define bfin_write_MDMA2_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA2_D0_PERIPHERAL_MAP,val)
1374#define bfin_read_MDMA2_S0_CONFIG() bfin_read16(MDMA2_S0_CONFIG)
1375#define bfin_write_MDMA2_S0_CONFIG(val) bfin_write16(MDMA2_S0_CONFIG,val)
1376#define bfin_read_MDMA2_S0_NEXT_DESC_PTR() bfin_read32(MDMA2_S0_NEXT_DESC_PTR)
1377#define bfin_write_MDMA2_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA2_S0_NEXT_DESC_PTR,val)
1378#define bfin_read_MDMA2_S0_START_ADDR() bfin_read32(MDMA2_S0_START_ADDR)
1379#define bfin_write_MDMA2_S0_START_ADDR(val) bfin_write32(MDMA2_S0_START_ADDR,val)
1380#define bfin_read_MDMA2_S0_X_COUNT() bfin_read16(MDMA2_S0_X_COUNT)
1381#define bfin_write_MDMA2_S0_X_COUNT(val) bfin_write16(MDMA2_S0_X_COUNT,val)
1382#define bfin_read_MDMA2_S0_Y_COUNT() bfin_read16(MDMA2_S0_Y_COUNT)
1383#define bfin_write_MDMA2_S0_Y_COUNT(val) bfin_write16(MDMA2_S0_Y_COUNT,val)
1384#define bfin_read_MDMA2_S0_X_MODIFY() bfin_read16(MDMA2_S0_X_MODIFY)
1385#define bfin_write_MDMA2_S0_X_MODIFY(val) bfin_write16(MDMA2_S0_X_MODIFY,val)
1386#define bfin_read_MDMA2_S0_Y_MODIFY() bfin_read16(MDMA2_S0_Y_MODIFY)
1387#define bfin_write_MDMA2_S0_Y_MODIFY(val) bfin_write16(MDMA2_S0_Y_MODIFY,val)
1388#define bfin_read_MDMA2_S0_CURR_DESC_PTR() bfin_read32(MDMA2_S0_CURR_DESC_PTR)
1389#define bfin_write_MDMA2_S0_CURR_DESC_PTR(val) bfin_write32(MDMA2_S0_CURR_DESC_PTR,val)
1390#define bfin_read_MDMA2_S0_CURR_ADDR() bfin_read32(MDMA2_S0_CURR_ADDR)
1391#define bfin_write_MDMA2_S0_CURR_ADDR(val) bfin_write32(MDMA2_S0_CURR_ADDR,val)
1392#define bfin_read_MDMA2_S0_CURR_X_COUNT() bfin_read16(MDMA2_S0_CURR_X_COUNT)
1393#define bfin_write_MDMA2_S0_CURR_X_COUNT(val) bfin_write16(MDMA2_S0_CURR_X_COUNT,val)
1394#define bfin_read_MDMA2_S0_CURR_Y_COUNT() bfin_read16(MDMA2_S0_CURR_Y_COUNT)
1395#define bfin_write_MDMA2_S0_CURR_Y_COUNT(val) bfin_write16(MDMA2_S0_CURR_Y_COUNT,val)
1396#define bfin_read_MDMA2_S0_IRQ_STATUS() bfin_read16(MDMA2_S0_IRQ_STATUS)
1397#define bfin_write_MDMA2_S0_IRQ_STATUS(val) bfin_write16(MDMA2_S0_IRQ_STATUS,val)
1398#define bfin_read_MDMA2_S0_PERIPHERAL_MAP() bfin_read16(MDMA2_S0_PERIPHERAL_MAP)
1399#define bfin_write_MDMA2_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA2_S0_PERIPHERAL_MAP,val)
1400#define bfin_read_MDMA2_D1_CONFIG() bfin_read16(MDMA2_D1_CONFIG)
1401#define bfin_write_MDMA2_D1_CONFIG(val) bfin_write16(MDMA2_D1_CONFIG,val)
1402#define bfin_read_MDMA2_D1_NEXT_DESC_PTR() bfin_read32(MDMA2_D1_NEXT_DESC_PTR)
1403#define bfin_write_MDMA2_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA2_D1_NEXT_DESC_PTR,val)
1404#define bfin_read_MDMA2_D1_START_ADDR() bfin_read32(MDMA2_D1_START_ADDR)
1405#define bfin_write_MDMA2_D1_START_ADDR(val) bfin_write32(MDMA2_D1_START_ADDR,val)
1406#define bfin_read_MDMA2_D1_X_COUNT() bfin_read16(MDMA2_D1_X_COUNT)
1407#define bfin_write_MDMA2_D1_X_COUNT(val) bfin_write16(MDMA2_D1_X_COUNT,val)
1408#define bfin_read_MDMA2_D1_Y_COUNT() bfin_read16(MDMA2_D1_Y_COUNT)
1409#define bfin_write_MDMA2_D1_Y_COUNT(val) bfin_write16(MDMA2_D1_Y_COUNT,val)
1410#define bfin_read_MDMA2_D1_X_MODIFY() bfin_read16(MDMA2_D1_X_MODIFY)
1411#define bfin_write_MDMA2_D1_X_MODIFY(val) bfin_write16(MDMA2_D1_X_MODIFY,val)
1412#define bfin_read_MDMA2_D1_Y_MODIFY() bfin_read16(MDMA2_D1_Y_MODIFY)
1413#define bfin_write_MDMA2_D1_Y_MODIFY(val) bfin_write16(MDMA2_D1_Y_MODIFY,val)
1414#define bfin_read_MDMA2_D1_CURR_DESC_PTR() bfin_read32(MDMA2_D1_CURR_DESC_PTR)
1415#define bfin_write_MDMA2_D1_CURR_DESC_PTR(val) bfin_write32(MDMA2_D1_CURR_DESC_PTR,val)
1416#define bfin_read_MDMA2_D1_CURR_ADDR() bfin_read32(MDMA2_D1_CURR_ADDR)
1417#define bfin_write_MDMA2_D1_CURR_ADDR(val) bfin_write32(MDMA2_D1_CURR_ADDR,val)
1418#define bfin_read_MDMA2_D1_CURR_X_COUNT() bfin_read16(MDMA2_D1_CURR_X_COUNT)
1419#define bfin_write_MDMA2_D1_CURR_X_COUNT(val) bfin_write16(MDMA2_D1_CURR_X_COUNT,val)
1420#define bfin_read_MDMA2_D1_CURR_Y_COUNT() bfin_read16(MDMA2_D1_CURR_Y_COUNT)
1421#define bfin_write_MDMA2_D1_CURR_Y_COUNT(val) bfin_write16(MDMA2_D1_CURR_Y_COUNT,val)
1422#define bfin_read_MDMA2_D1_IRQ_STATUS() bfin_read16(MDMA2_D1_IRQ_STATUS)
1423#define bfin_write_MDMA2_D1_IRQ_STATUS(val) bfin_write16(MDMA2_D1_IRQ_STATUS,val)
1424#define bfin_read_MDMA2_D1_PERIPHERAL_MAP() bfin_read16(MDMA2_D1_PERIPHERAL_MAP)
1425#define bfin_write_MDMA2_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA2_D1_PERIPHERAL_MAP,val)
1426#define bfin_read_MDMA2_S1_CONFIG() bfin_read16(MDMA2_S1_CONFIG)
1427#define bfin_write_MDMA2_S1_CONFIG(val) bfin_write16(MDMA2_S1_CONFIG,val)
1428#define bfin_read_MDMA2_S1_NEXT_DESC_PTR() bfin_read32(MDMA2_S1_NEXT_DESC_PTR)
1429#define bfin_write_MDMA2_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA2_S1_NEXT_DESC_PTR,val)
1430#define bfin_read_MDMA2_S1_START_ADDR() bfin_read32(MDMA2_S1_START_ADDR)
1431#define bfin_write_MDMA2_S1_START_ADDR(val) bfin_write32(MDMA2_S1_START_ADDR,val)
1432#define bfin_read_MDMA2_S1_X_COUNT() bfin_read16(MDMA2_S1_X_COUNT)
1433#define bfin_write_MDMA2_S1_X_COUNT(val) bfin_write16(MDMA2_S1_X_COUNT,val)
1434#define bfin_read_MDMA2_S1_Y_COUNT() bfin_read16(MDMA2_S1_Y_COUNT)
1435#define bfin_write_MDMA2_S1_Y_COUNT(val) bfin_write16(MDMA2_S1_Y_COUNT,val)
1436#define bfin_read_MDMA2_S1_X_MODIFY() bfin_read16(MDMA2_S1_X_MODIFY)
1437#define bfin_write_MDMA2_S1_X_MODIFY(val) bfin_write16(MDMA2_S1_X_MODIFY,val)
1438#define bfin_read_MDMA2_S1_Y_MODIFY() bfin_read16(MDMA2_S1_Y_MODIFY)
1439#define bfin_write_MDMA2_S1_Y_MODIFY(val) bfin_write16(MDMA2_S1_Y_MODIFY,val)
1440#define bfin_read_MDMA2_S1_CURR_DESC_PTR() bfin_read32(MDMA2_S1_CURR_DESC_PTR)
1441#define bfin_write_MDMA2_S1_CURR_DESC_PTR(val) bfin_write32(MDMA2_S1_CURR_DESC_PTR,val)
1442#define bfin_read_MDMA2_S1_CURR_ADDR() bfin_read32(MDMA2_S1_CURR_ADDR)
1443#define bfin_write_MDMA2_S1_CURR_ADDR(val) bfin_write32(MDMA2_S1_CURR_ADDR,val)
1444#define bfin_read_MDMA2_S1_CURR_X_COUNT() bfin_read16(MDMA2_S1_CURR_X_COUNT)
1445#define bfin_write_MDMA2_S1_CURR_X_COUNT(val) bfin_write16(MDMA2_S1_CURR_X_COUNT,val)
1446#define bfin_read_MDMA2_S1_CURR_Y_COUNT() bfin_read16(MDMA2_S1_CURR_Y_COUNT)
1447#define bfin_write_MDMA2_S1_CURR_Y_COUNT(val) bfin_write16(MDMA2_S1_CURR_Y_COUNT,val)
1448#define bfin_read_MDMA2_S1_IRQ_STATUS() bfin_read16(MDMA2_S1_IRQ_STATUS)
1449#define bfin_write_MDMA2_S1_IRQ_STATUS(val) bfin_write16(MDMA2_S1_IRQ_STATUS,val)
1450#define bfin_read_MDMA2_S1_PERIPHERAL_MAP() bfin_read16(MDMA2_S1_PERIPHERAL_MAP)
1451#define bfin_write_MDMA2_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA2_S1_PERIPHERAL_MAP,val)
1452/* Internal Memory DMA Registers (0xFFC0_1800 - 0xFFC0_19FF) */
1453#define bfin_read_IMDMA_D0_CONFIG() bfin_read16(IMDMA_D0_CONFIG)
1454#define bfin_write_IMDMA_D0_CONFIG(val) bfin_write16(IMDMA_D0_CONFIG,val)
1455#define bfin_read_IMDMA_D0_NEXT_DESC_PTR() bfin_read32(IMDMA_D0_NEXT_DESC_PTR)
1456#define bfin_write_IMDMA_D0_NEXT_DESC_PTR(val) bfin_write32(IMDMA_D0_NEXT_DESC_PTR,val)
1457#define bfin_read_IMDMA_D0_START_ADDR() bfin_read32(IMDMA_D0_START_ADDR)
1458#define bfin_write_IMDMA_D0_START_ADDR(val) bfin_write32(IMDMA_D0_START_ADDR,val)
1459#define bfin_read_IMDMA_D0_X_COUNT() bfin_read16(IMDMA_D0_X_COUNT)
1460#define bfin_write_IMDMA_D0_X_COUNT(val) bfin_write16(IMDMA_D0_X_COUNT,val)
1461#define bfin_read_IMDMA_D0_Y_COUNT() bfin_read16(IMDMA_D0_Y_COUNT)
1462#define bfin_write_IMDMA_D0_Y_COUNT(val) bfin_write16(IMDMA_D0_Y_COUNT,val)
1463#define bfin_read_IMDMA_D0_X_MODIFY() bfin_read16(IMDMA_D0_X_MODIFY)
1464#define bfin_write_IMDMA_D0_X_MODIFY(val) bfin_write16(IMDMA_D0_X_MODIFY,val)
1465#define bfin_read_IMDMA_D0_Y_MODIFY() bfin_read16(IMDMA_D0_Y_MODIFY)
1466#define bfin_write_IMDMA_D0_Y_MODIFY(val) bfin_write16(IMDMA_D0_Y_MODIFY,val)
1467#define bfin_read_IMDMA_D0_CURR_DESC_PTR() bfin_read32(IMDMA_D0_CURR_DESC_PTR)
1468#define bfin_write_IMDMA_D0_CURR_DESC_PTR(val) bfin_write32(IMDMA_D0_CURR_DESC_PTR,val)
1469#define bfin_read_IMDMA_D0_CURR_ADDR() bfin_read32(IMDMA_D0_CURR_ADDR)
1470#define bfin_write_IMDMA_D0_CURR_ADDR(val) bfin_write32(IMDMA_D0_CURR_ADDR,val)
1471#define bfin_read_IMDMA_D0_CURR_X_COUNT() bfin_read16(IMDMA_D0_CURR_X_COUNT)
1472#define bfin_write_IMDMA_D0_CURR_X_COUNT(val) bfin_write16(IMDMA_D0_CURR_X_COUNT,val)
1473#define bfin_read_IMDMA_D0_CURR_Y_COUNT() bfin_read16(IMDMA_D0_CURR_Y_COUNT)
1474#define bfin_write_IMDMA_D0_CURR_Y_COUNT(val) bfin_write16(IMDMA_D0_CURR_Y_COUNT,val)
1475#define bfin_read_IMDMA_D0_IRQ_STATUS() bfin_read16(IMDMA_D0_IRQ_STATUS)
1476#define bfin_write_IMDMA_D0_IRQ_STATUS(val) bfin_write16(IMDMA_D0_IRQ_STATUS,val)
1477#define bfin_read_IMDMA_S0_CONFIG() bfin_read16(IMDMA_S0_CONFIG)
1478#define bfin_write_IMDMA_S0_CONFIG(val) bfin_write16(IMDMA_S0_CONFIG,val)
1479#define bfin_read_IMDMA_S0_NEXT_DESC_PTR() bfin_read32(IMDMA_S0_NEXT_DESC_PTR)
1480#define bfin_write_IMDMA_S0_NEXT_DESC_PTR(val) bfin_write32(IMDMA_S0_NEXT_DESC_PTR,val)
1481#define bfin_read_IMDMA_S0_START_ADDR() bfin_read32(IMDMA_S0_START_ADDR)
1482#define bfin_write_IMDMA_S0_START_ADDR(val) bfin_write32(IMDMA_S0_START_ADDR,val)
1483#define bfin_read_IMDMA_S0_X_COUNT() bfin_read16(IMDMA_S0_X_COUNT)
1484#define bfin_write_IMDMA_S0_X_COUNT(val) bfin_write16(IMDMA_S0_X_COUNT,val)
1485#define bfin_read_IMDMA_S0_Y_COUNT() bfin_read16(IMDMA_S0_Y_COUNT)
1486#define bfin_write_IMDMA_S0_Y_COUNT(val) bfin_write16(IMDMA_S0_Y_COUNT,val)
1487#define bfin_read_IMDMA_S0_X_MODIFY() bfin_read16(IMDMA_S0_X_MODIFY)
1488#define bfin_write_IMDMA_S0_X_MODIFY(val) bfin_write16(IMDMA_S0_X_MODIFY,val)
1489#define bfin_read_IMDMA_S0_Y_MODIFY() bfin_read16(IMDMA_S0_Y_MODIFY)
1490#define bfin_write_IMDMA_S0_Y_MODIFY(val) bfin_write16(IMDMA_S0_Y_MODIFY,val)
1491#define bfin_read_IMDMA_S0_CURR_DESC_PTR() bfin_read32(IMDMA_S0_CURR_DESC_PTR)
1492#define bfin_write_IMDMA_S0_CURR_DESC_PTR(val) bfin_write32(IMDMA_S0_CURR_DESC_PTR,val)
1493#define bfin_read_IMDMA_S0_CURR_ADDR() bfin_read32(IMDMA_S0_CURR_ADDR)
1494#define bfin_write_IMDMA_S0_CURR_ADDR(val) bfin_write32(IMDMA_S0_CURR_ADDR,val)
1495#define bfin_read_IMDMA_S0_CURR_X_COUNT() bfin_read16(IMDMA_S0_CURR_X_COUNT)
1496#define bfin_write_IMDMA_S0_CURR_X_COUNT(val) bfin_write16(IMDMA_S0_CURR_X_COUNT,val)
1497#define bfin_read_IMDMA_S0_CURR_Y_COUNT() bfin_read16(IMDMA_S0_CURR_Y_COUNT)
1498#define bfin_write_IMDMA_S0_CURR_Y_COUNT(val) bfin_write16(IMDMA_S0_CURR_Y_COUNT,val)
1499#define bfin_read_IMDMA_S0_IRQ_STATUS() bfin_read16(IMDMA_S0_IRQ_STATUS)
1500#define bfin_write_IMDMA_S0_IRQ_STATUS(val) bfin_write16(IMDMA_S0_IRQ_STATUS,val)
1501#define bfin_read_IMDMA_D1_CONFIG() bfin_read16(IMDMA_D1_CONFIG)
1502#define bfin_write_IMDMA_D1_CONFIG(val) bfin_write16(IMDMA_D1_CONFIG,val)
1503#define bfin_read_IMDMA_D1_NEXT_DESC_PTR() bfin_read32(IMDMA_D1_NEXT_DESC_PTR)
1504#define bfin_write_IMDMA_D1_NEXT_DESC_PTR(val) bfin_write32(IMDMA_D1_NEXT_DESC_PTR,val)
1505#define bfin_read_IMDMA_D1_START_ADDR() bfin_read32(IMDMA_D1_START_ADDR)
1506#define bfin_write_IMDMA_D1_START_ADDR(val) bfin_write32(IMDMA_D1_START_ADDR,val)
1507#define bfin_read_IMDMA_D1_X_COUNT() bfin_read16(IMDMA_D1_X_COUNT)
1508#define bfin_write_IMDMA_D1_X_COUNT(val) bfin_write16(IMDMA_D1_X_COUNT,val)
1509#define bfin_read_IMDMA_D1_Y_COUNT() bfin_read16(IMDMA_D1_Y_COUNT)
1510#define bfin_write_IMDMA_D1_Y_COUNT(val) bfin_write16(IMDMA_D1_Y_COUNT,val)
1511#define bfin_read_IMDMA_D1_X_MODIFY() bfin_read16(IMDMA_D1_X_MODIFY)
1512#define bfin_write_IMDMA_D1_X_MODIFY(val) bfin_write16(IMDMA_D1_X_MODIFY,val)
1513#define bfin_read_IMDMA_D1_Y_MODIFY() bfin_read16(IMDMA_D1_Y_MODIFY)
1514#define bfin_write_IMDMA_D1_Y_MODIFY(val) bfin_write16(IMDMA_D1_Y_MODIFY,val)
1515#define bfin_read_IMDMA_D1_CURR_DESC_PTR() bfin_read32(IMDMA_D1_CURR_DESC_PTR)
1516#define bfin_write_IMDMA_D1_CURR_DESC_PTR(val) bfin_write32(IMDMA_D1_CURR_DESC_PTR,val)
1517#define bfin_read_IMDMA_D1_CURR_ADDR() bfin_read32(IMDMA_D1_CURR_ADDR)
1518#define bfin_write_IMDMA_D1_CURR_ADDR(val) bfin_write32(IMDMA_D1_CURR_ADDR,val)
1519#define bfin_read_IMDMA_D1_CURR_X_COUNT() bfin_read16(IMDMA_D1_CURR_X_COUNT)
1520#define bfin_write_IMDMA_D1_CURR_X_COUNT(val) bfin_write16(IMDMA_D1_CURR_X_COUNT,val)
1521#define bfin_read_IMDMA_D1_CURR_Y_COUNT() bfin_read16(IMDMA_D1_CURR_Y_COUNT)
1522#define bfin_write_IMDMA_D1_CURR_Y_COUNT(val) bfin_write16(IMDMA_D1_CURR_Y_COUNT,val)
1523#define bfin_read_IMDMA_D1_IRQ_STATUS() bfin_read16(IMDMA_D1_IRQ_STATUS)
1524#define bfin_write_IMDMA_D1_IRQ_STATUS(val) bfin_write16(IMDMA_D1_IRQ_STATUS,val)
1525#define bfin_read_IMDMA_S1_CONFIG() bfin_read16(IMDMA_S1_CONFIG)
1526#define bfin_write_IMDMA_S1_CONFIG(val) bfin_write16(IMDMA_S1_CONFIG,val)
1527#define bfin_read_IMDMA_S1_NEXT_DESC_PTR() bfin_read32(IMDMA_S1_NEXT_DESC_PTR)
1528#define bfin_write_IMDMA_S1_NEXT_DESC_PTR(val) bfin_write32(IMDMA_S1_NEXT_DESC_PTR,val)
1529#define bfin_read_IMDMA_S1_START_ADDR() bfin_read32(IMDMA_S1_START_ADDR)
1530#define bfin_write_IMDMA_S1_START_ADDR(val) bfin_write32(IMDMA_S1_START_ADDR,val)
1531#define bfin_read_IMDMA_S1_X_COUNT() bfin_read16(IMDMA_S1_X_COUNT)
1532#define bfin_write_IMDMA_S1_X_COUNT(val) bfin_write16(IMDMA_S1_X_COUNT,val)
1533#define bfin_read_IMDMA_S1_Y_COUNT() bfin_read16(IMDMA_S1_Y_COUNT)
1534#define bfin_write_IMDMA_S1_Y_COUNT(val) bfin_write16(IMDMA_S1_Y_COUNT,val)
1535#define bfin_read_IMDMA_S1_X_MODIFY() bfin_read16(IMDMA_S1_X_MODIFY)
1536#define bfin_write_IMDMA_S1_X_MODIFY(val) bfin_write16(IMDMA_S1_X_MODIFY,val)
1537#define bfin_read_IMDMA_S1_Y_MODIFY() bfin_read16(IMDMA_S1_Y_MODIFY)
1538#define bfin_write_IMDMA_S1_Y_MODIFY(val) bfin_write16(IMDMA_S1_Y_MODIFY,val)
1539#define bfin_read_IMDMA_S1_CURR_DESC_PTR() bfin_read32(IMDMA_S1_CURR_DESC_PTR)
1540#define bfin_write_IMDMA_S1_CURR_DESC_PTR(val) bfin_write32(IMDMA_S1_CURR_DESC_PTR,val)
1541#define bfin_read_IMDMA_S1_CURR_ADDR() bfin_read32(IMDMA_S1_CURR_ADDR)
1542#define bfin_write_IMDMA_S1_CURR_ADDR(val) bfin_write32(IMDMA_S1_CURR_ADDR,val)
1543#define bfin_read_IMDMA_S1_CURR_X_COUNT() bfin_read16(IMDMA_S1_CURR_X_COUNT)
1544#define bfin_write_IMDMA_S1_CURR_X_COUNT(val) bfin_write16(IMDMA_S1_CURR_X_COUNT,val)
1545#define bfin_read_IMDMA_S1_CURR_Y_COUNT() bfin_read16(IMDMA_S1_CURR_Y_COUNT)
1546#define bfin_write_IMDMA_S1_CURR_Y_COUNT(val) bfin_write16(IMDMA_S1_CURR_Y_COUNT,val)
1547#define bfin_read_IMDMA_S1_IRQ_STATUS() bfin_read16(IMDMA_S1_IRQ_STATUS)
1548#define bfin_write_IMDMA_S1_IRQ_STATUS(val) bfin_write16(IMDMA_S1_IRQ_STATUS,val)
1549
1550#define bfin_read_MDMA_S0_CONFIG() bfin_read_MDMA1_S0_CONFIG()
1551#define bfin_write_MDMA_S0_CONFIG(val) bfin_write_MDMA1_S0_CONFIG(val)
1552#define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read_MDMA1_S0_IRQ_STATUS()
1553#define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write_MDMA1_S0_IRQ_STATUS(val)
1554#define bfin_read_MDMA_S0_X_MODIFY() bfin_read_MDMA1_S0_X_MODIFY()
1555#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write_MDMA1_S0_X_MODIFY(val)
1556#define bfin_read_MDMA_S0_Y_MODIFY() bfin_read_MDMA1_S0_Y_MODIFY()
1557#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write_MDMA1_S0_Y_MODIFY(val)
1558#define bfin_read_MDMA_S0_X_COUNT() bfin_read_MDMA1_S0_X_COUNT()
1559#define bfin_write_MDMA_S0_X_COUNT(val) bfin_write_MDMA1_S0_X_COUNT(val)
1560#define bfin_read_MDMA_S0_Y_COUNT() bfin_read_MDMA1_S0_Y_COUNT()
1561#define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write_MDMA1_S0_Y_COUNT(val)
1562#define bfin_read_MDMA_S0_START_ADDR() bfin_read_MDMA1_S0_START_ADDR()
1563#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write_MDMA1_S0_START_ADDR(val)
1564#define bfin_read_MDMA_D0_CONFIG() bfin_read_MDMA1_D0_CONFIG()
1565#define bfin_write_MDMA_D0_CONFIG(val) bfin_write_MDMA1_D0_CONFIG(val)
1566#define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read_MDMA1_D0_IRQ_STATUS()
1567#define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write_MDMA1_D0_IRQ_STATUS(val)
1568#define bfin_read_MDMA_D0_X_MODIFY() bfin_read_MDMA1_D0_X_MODIFY()
1569#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write_MDMA1_D0_X_MODIFY(val)
1570#define bfin_read_MDMA_D0_Y_MODIFY() bfin_read_MDMA1_D0_Y_MODIFY()
1571#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write_MDMA1_D0_Y_MODIFY(val)
1572#define bfin_read_MDMA_D0_X_COUNT() bfin_read_MDMA1_D0_X_COUNT()
1573#define bfin_write_MDMA_D0_X_COUNT(val) bfin_write_MDMA1_D0_X_COUNT(val)
1574#define bfin_read_MDMA_D0_Y_COUNT() bfin_read_MDMA1_D0_Y_COUNT()
1575#define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write_MDMA1_D0_Y_COUNT(val)
1576#define bfin_read_MDMA_D0_START_ADDR() bfin_read_MDMA1_D0_START_ADDR()
1577#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write_MDMA1_D0_START_ADDR(val)
1578
1579#endif /* _CDEF_BF561_H */
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h
deleted file mode 100644
index 1ab50e906fe7..000000000000
--- a/include/asm-blackfin/mach-bf561/defBF561.h
+++ /dev/null
@@ -1,1758 +0,0 @@
1
2/*
3 * File: include/asm-blackfin/mach-bf561/defBF561.h
4 * Based on:
5 * Author:
6 *
7 * Created:
8 * Description:
9 * SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF561
10 * Rev:
11 *
12 * Modified:
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 _DEF_BF561_H
33#define _DEF_BF561_H
34/*
35#if !defined(__ADSPBF561__)
36#warning defBF561.h should only be included for BF561 chip.
37#endif
38*/
39/* include all Core registers and bit definitions */
40#include <asm/mach-common/def_LPBlackfin.h>
41
42/*********************************************************************************** */
43/* System MMR Register Map */
44/*********************************************************************************** */
45
46/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
47
48#define PLL_CTL 0xFFC00000 /* PLL Control register (16-bit) */
49#define PLL_DIV 0xFFC00004 /* PLL Divide Register (16-bit) */
50#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register (16-bit) */
51#define PLL_STAT 0xFFC0000C /* PLL Status register (16-bit) */
52#define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */
53#define CHIPID 0xFFC00014 /* Chip ID Register */
54
55/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */
56#define SWRST SICA_SWRST
57#define SYSCR SICA_SYSCR
58#define DOUBLE_FAULT (DOUBLE_FAULT_B|DOUBLE_FAULT_A)
59#define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A)
60#define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A)
61#define RESET_SOFTWARE (SWRST_OCCURRED)
62
63/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */
64#define SICA_SWRST 0xFFC00100 /* Software Reset register */
65#define SICA_SYSCR 0xFFC00104 /* System Reset Configuration register */
66#define SICA_RVECT 0xFFC00108 /* SIC Reset Vector Address Register */
67#define SICA_IMASK 0xFFC0010C /* SIC Interrupt Mask register 0 - hack to fix old tests */
68#define SICA_IMASK0 0xFFC0010C /* SIC Interrupt Mask register 0 */
69#define SICA_IMASK1 0xFFC00110 /* SIC Interrupt Mask register 1 */
70#define SICA_IAR0 0xFFC00124 /* SIC Interrupt Assignment Register 0 */
71#define SICA_IAR1 0xFFC00128 /* SIC Interrupt Assignment Register 1 */
72#define SICA_IAR2 0xFFC0012C /* SIC Interrupt Assignment Register 2 */
73#define SICA_IAR3 0xFFC00130 /* SIC Interrupt Assignment Register 3 */
74#define SICA_IAR4 0xFFC00134 /* SIC Interrupt Assignment Register 4 */
75#define SICA_IAR5 0xFFC00138 /* SIC Interrupt Assignment Register 5 */
76#define SICA_IAR6 0xFFC0013C /* SIC Interrupt Assignment Register 6 */
77#define SICA_IAR7 0xFFC00140 /* SIC Interrupt Assignment Register 7 */
78#define SICA_ISR0 0xFFC00114 /* SIC Interrupt Status register 0 */
79#define SICA_ISR1 0xFFC00118 /* SIC Interrupt Status register 1 */
80#define SICA_IWR0 0xFFC0011C /* SIC Interrupt Wakeup-Enable register 0 */
81#define SICA_IWR1 0xFFC00120 /* SIC Interrupt Wakeup-Enable register 1 */
82
83/* System Reset and Interrupt Controller registers for Core B (0xFFC0 1100-0xFFC0 11FF) */
84#define SICB_SWRST 0xFFC01100 /* reserved */
85#define SICB_SYSCR 0xFFC01104 /* reserved */
86#define SICB_RVECT 0xFFC01108 /* SIC Reset Vector Address Register */
87#define SICB_IMASK0 0xFFC0110C /* SIC Interrupt Mask register 0 */
88#define SICB_IMASK1 0xFFC01110 /* SIC Interrupt Mask register 1 */
89#define SICB_IAR0 0xFFC01124 /* SIC Interrupt Assignment Register 0 */
90#define SICB_IAR1 0xFFC01128 /* SIC Interrupt Assignment Register 1 */
91#define SICB_IAR2 0xFFC0112C /* SIC Interrupt Assignment Register 2 */
92#define SICB_IAR3 0xFFC01130 /* SIC Interrupt Assignment Register 3 */
93#define SICB_IAR4 0xFFC01134 /* SIC Interrupt Assignment Register 4 */
94#define SICB_IAR5 0xFFC01138 /* SIC Interrupt Assignment Register 5 */
95#define SICB_IAR6 0xFFC0113C /* SIC Interrupt Assignment Register 6 */
96#define SICB_IAR7 0xFFC01140 /* SIC Interrupt Assignment Register 7 */
97#define SICB_ISR0 0xFFC01114 /* SIC Interrupt Status register 0 */
98#define SICB_ISR1 0xFFC01118 /* SIC Interrupt Status register 1 */
99#define SICB_IWR0 0xFFC0111C /* SIC Interrupt Wakeup-Enable register 0 */
100#define SICB_IWR1 0xFFC01120 /* SIC Interrupt Wakeup-Enable register 1 */
101
102/* Watchdog Timer registers for Core A (0xFFC0 0200-0xFFC0 02FF) */
103#define WDOGA_CTL 0xFFC00200 /* Watchdog Control register */
104#define WDOGA_CNT 0xFFC00204 /* Watchdog Count register */
105#define WDOGA_STAT 0xFFC00208 /* Watchdog Status register */
106
107/* Watchdog Timer registers for Core B (0xFFC0 1200-0xFFC0 12FF) */
108#define WDOGB_CTL 0xFFC01200 /* Watchdog Control register */
109#define WDOGB_CNT 0xFFC01204 /* Watchdog Count register */
110#define WDOGB_STAT 0xFFC01208 /* Watchdog Status register */
111
112/* UART Controller (0xFFC00400 - 0xFFC004FF) */
113
114/*
115 * Because include/linux/serial_reg.h have defined UART_*,
116 * So we define blackfin uart regs to BFIN_UART0_*.
117 */
118#define BFIN_UART_THR 0xFFC00400 /* Transmit Holding register */
119#define BFIN_UART_RBR 0xFFC00400 /* Receive Buffer register */
120#define BFIN_UART_DLL 0xFFC00400 /* Divisor Latch (Low-Byte) */
121#define BFIN_UART_IER 0xFFC00404 /* Interrupt Enable Register */
122#define BFIN_UART_DLH 0xFFC00404 /* Divisor Latch (High-Byte) */
123#define BFIN_UART_IIR 0xFFC00408 /* Interrupt Identification Register */
124#define BFIN_UART_LCR 0xFFC0040C /* Line Control Register */
125#define BFIN_UART_MCR 0xFFC00410 /* Modem Control Register */
126#define BFIN_UART_LSR 0xFFC00414 /* Line Status Register */
127#define BFIN_UART_MSR 0xFFC00418 /* Modem Status Register */
128#define BFIN_UART_SCR 0xFFC0041C /* SCR Scratch Register */
129#define BFIN_UART_GCTL 0xFFC00424 /* Global Control Register */
130
131/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
132#define SPI0_REGBASE 0xFFC00500
133#define SPI_CTL 0xFFC00500 /* SPI Control Register */
134#define SPI_FLG 0xFFC00504 /* SPI Flag register */
135#define SPI_STAT 0xFFC00508 /* SPI Status register */
136#define SPI_TDBR 0xFFC0050C /* SPI Transmit Data Buffer Register */
137#define SPI_RDBR 0xFFC00510 /* SPI Receive Data Buffer Register */
138#define SPI_BAUD 0xFFC00514 /* SPI Baud rate Register */
139#define SPI_SHADOW 0xFFC00518 /* SPI_RDBR Shadow Register */
140
141/* Timer 0-7 registers (0xFFC0 0600-0xFFC0 06FF) */
142#define TIMER0_CONFIG 0xFFC00600 /* Timer0 Configuration register */
143#define TIMER0_COUNTER 0xFFC00604 /* Timer0 Counter register */
144#define TIMER0_PERIOD 0xFFC00608 /* Timer0 Period register */
145#define TIMER0_WIDTH 0xFFC0060C /* Timer0 Width register */
146
147#define TIMER1_CONFIG 0xFFC00610 /* Timer1 Configuration register */
148#define TIMER1_COUNTER 0xFFC00614 /* Timer1 Counter register */
149#define TIMER1_PERIOD 0xFFC00618 /* Timer1 Period register */
150#define TIMER1_WIDTH 0xFFC0061C /* Timer1 Width register */
151
152#define TIMER2_CONFIG 0xFFC00620 /* Timer2 Configuration register */
153#define TIMER2_COUNTER 0xFFC00624 /* Timer2 Counter register */
154#define TIMER2_PERIOD 0xFFC00628 /* Timer2 Period register */
155#define TIMER2_WIDTH 0xFFC0062C /* Timer2 Width register */
156
157#define TIMER3_CONFIG 0xFFC00630 /* Timer3 Configuration register */
158#define TIMER3_COUNTER 0xFFC00634 /* Timer3 Counter register */
159#define TIMER3_PERIOD 0xFFC00638 /* Timer3 Period register */
160#define TIMER3_WIDTH 0xFFC0063C /* Timer3 Width register */
161
162#define TIMER4_CONFIG 0xFFC00640 /* Timer4 Configuration register */
163#define TIMER4_COUNTER 0xFFC00644 /* Timer4 Counter register */
164#define TIMER4_PERIOD 0xFFC00648 /* Timer4 Period register */
165#define TIMER4_WIDTH 0xFFC0064C /* Timer4 Width register */
166
167#define TIMER5_CONFIG 0xFFC00650 /* Timer5 Configuration register */
168#define TIMER5_COUNTER 0xFFC00654 /* Timer5 Counter register */
169#define TIMER5_PERIOD 0xFFC00658 /* Timer5 Period register */
170#define TIMER5_WIDTH 0xFFC0065C /* Timer5 Width register */
171
172#define TIMER6_CONFIG 0xFFC00660 /* Timer6 Configuration register */
173#define TIMER6_COUNTER 0xFFC00664 /* Timer6 Counter register */
174#define TIMER6_PERIOD 0xFFC00668 /* Timer6 Period register */
175#define TIMER6_WIDTH 0xFFC0066C /* Timer6 Width register */
176
177#define TIMER7_CONFIG 0xFFC00670 /* Timer7 Configuration register */
178#define TIMER7_COUNTER 0xFFC00674 /* Timer7 Counter register */
179#define TIMER7_PERIOD 0xFFC00678 /* Timer7 Period register */
180#define TIMER7_WIDTH 0xFFC0067C /* Timer7 Width register */
181
182#define TMRS8_ENABLE 0xFFC00680 /* Timer Enable Register */
183#define TMRS8_DISABLE 0xFFC00684 /* Timer Disable register */
184#define TMRS8_STATUS 0xFFC00688 /* Timer Status register */
185
186/* Timer registers 8-11 (0xFFC0 1600-0xFFC0 16FF) */
187#define TIMER8_CONFIG 0xFFC01600 /* Timer8 Configuration register */
188#define TIMER8_COUNTER 0xFFC01604 /* Timer8 Counter register */
189#define TIMER8_PERIOD 0xFFC01608 /* Timer8 Period register */
190#define TIMER8_WIDTH 0xFFC0160C /* Timer8 Width register */
191
192#define TIMER9_CONFIG 0xFFC01610 /* Timer9 Configuration register */
193#define TIMER9_COUNTER 0xFFC01614 /* Timer9 Counter register */
194#define TIMER9_PERIOD 0xFFC01618 /* Timer9 Period register */
195#define TIMER9_WIDTH 0xFFC0161C /* Timer9 Width register */
196
197#define TIMER10_CONFIG 0xFFC01620 /* Timer10 Configuration register */
198#define TIMER10_COUNTER 0xFFC01624 /* Timer10 Counter register */
199#define TIMER10_PERIOD 0xFFC01628 /* Timer10 Period register */
200#define TIMER10_WIDTH 0xFFC0162C /* Timer10 Width register */
201
202#define TIMER11_CONFIG 0xFFC01630 /* Timer11 Configuration register */
203#define TIMER11_COUNTER 0xFFC01634 /* Timer11 Counter register */
204#define TIMER11_PERIOD 0xFFC01638 /* Timer11 Period register */
205#define TIMER11_WIDTH 0xFFC0163C /* Timer11 Width register */
206
207#define TMRS4_ENABLE 0xFFC01640 /* Timer Enable Register */
208#define TMRS4_DISABLE 0xFFC01644 /* Timer Disable register */
209#define TMRS4_STATUS 0xFFC01648 /* Timer Status register */
210
211/* Programmable Flag 0 registers (0xFFC0 0700-0xFFC0 07FF) */
212#define FIO0_FLAG_D 0xFFC00700 /* Flag Data register */
213#define FIO0_FLAG_C 0xFFC00704 /* Flag Clear register */
214#define FIO0_FLAG_S 0xFFC00708 /* Flag Set register */
215#define FIO0_FLAG_T 0xFFC0070C /* Flag Toggle register */
216#define FIO0_MASKA_D 0xFFC00710 /* Flag Mask Interrupt A Data register */
217#define FIO0_MASKA_C 0xFFC00714 /* Flag Mask Interrupt A Clear register */
218#define FIO0_MASKA_S 0xFFC00718 /* Flag Mask Interrupt A Set register */
219#define FIO0_MASKA_T 0xFFC0071C /* Flag Mask Interrupt A Toggle register */
220#define FIO0_MASKB_D 0xFFC00720 /* Flag Mask Interrupt B Data register */
221#define FIO0_MASKB_C 0xFFC00724 /* Flag Mask Interrupt B Clear register */
222#define FIO0_MASKB_S 0xFFC00728 /* Flag Mask Interrupt B Set register */
223#define FIO0_MASKB_T 0xFFC0072C /* Flag Mask Interrupt B Toggle register */
224#define FIO0_DIR 0xFFC00730 /* Flag Direction register */
225#define FIO0_POLAR 0xFFC00734 /* Flag Polarity register */
226#define FIO0_EDGE 0xFFC00738 /* Flag Interrupt Sensitivity register */
227#define FIO0_BOTH 0xFFC0073C /* Flag Set on Both Edges register */
228#define FIO0_INEN 0xFFC00740 /* Flag Input Enable register */
229
230/* Programmable Flag 1 registers (0xFFC0 1500-0xFFC0 15FF) */
231#define FIO1_FLAG_D 0xFFC01500 /* Flag Data register (mask used to directly */
232#define FIO1_FLAG_C 0xFFC01504 /* Flag Clear register */
233#define FIO1_FLAG_S 0xFFC01508 /* Flag Set register */
234#define FIO1_FLAG_T 0xFFC0150C /* Flag Toggle register (mask used to */
235#define FIO1_MASKA_D 0xFFC01510 /* Flag Mask Interrupt A Data register */
236#define FIO1_MASKA_C 0xFFC01514 /* Flag Mask Interrupt A Clear register */
237#define FIO1_MASKA_S 0xFFC01518 /* Flag Mask Interrupt A Set register */
238#define FIO1_MASKA_T 0xFFC0151C /* Flag Mask Interrupt A Toggle register */
239#define FIO1_MASKB_D 0xFFC01520 /* Flag Mask Interrupt B Data register */
240#define FIO1_MASKB_C 0xFFC01524 /* Flag Mask Interrupt B Clear register */
241#define FIO1_MASKB_S 0xFFC01528 /* Flag Mask Interrupt B Set register */
242#define FIO1_MASKB_T 0xFFC0152C /* Flag Mask Interrupt B Toggle register */
243#define FIO1_DIR 0xFFC01530 /* Flag Direction register */
244#define FIO1_POLAR 0xFFC01534 /* Flag Polarity register */
245#define FIO1_EDGE 0xFFC01538 /* Flag Interrupt Sensitivity register */
246#define FIO1_BOTH 0xFFC0153C /* Flag Set on Both Edges register */
247#define FIO1_INEN 0xFFC01540 /* Flag Input Enable register */
248
249/* Programmable Flag registers (0xFFC0 1700-0xFFC0 17FF) */
250#define FIO2_FLAG_D 0xFFC01700 /* Flag Data register (mask used to directly */
251#define FIO2_FLAG_C 0xFFC01704 /* Flag Clear register */
252#define FIO2_FLAG_S 0xFFC01708 /* Flag Set register */
253#define FIO2_FLAG_T 0xFFC0170C /* Flag Toggle register (mask used to */
254#define FIO2_MASKA_D 0xFFC01710 /* Flag Mask Interrupt A Data register */
255#define FIO2_MASKA_C 0xFFC01714 /* Flag Mask Interrupt A Clear register */
256#define FIO2_MASKA_S 0xFFC01718 /* Flag Mask Interrupt A Set register */
257#define FIO2_MASKA_T 0xFFC0171C /* Flag Mask Interrupt A Toggle register */
258#define FIO2_MASKB_D 0xFFC01720 /* Flag Mask Interrupt B Data register */
259#define FIO2_MASKB_C 0xFFC01724 /* Flag Mask Interrupt B Clear register */
260#define FIO2_MASKB_S 0xFFC01728 /* Flag Mask Interrupt B Set register */
261#define FIO2_MASKB_T 0xFFC0172C /* Flag Mask Interrupt B Toggle register */
262#define FIO2_DIR 0xFFC01730 /* Flag Direction register */
263#define FIO2_POLAR 0xFFC01734 /* Flag Polarity register */
264#define FIO2_EDGE 0xFFC01738 /* Flag Interrupt Sensitivity register */
265#define FIO2_BOTH 0xFFC0173C /* Flag Set on Both Edges register */
266#define FIO2_INEN 0xFFC01740 /* Flag Input Enable register */
267
268/* SPORT0 Controller (0xFFC00800 - 0xFFC008FF) */
269#define SPORT0_TCR1 0xFFC00800 /* SPORT0 Transmit Configuration 1 Register */
270#define SPORT0_TCR2 0xFFC00804 /* SPORT0 Transmit Configuration 2 Register */
271#define SPORT0_TCLKDIV 0xFFC00808 /* SPORT0 Transmit Clock Divider */
272#define SPORT0_TFSDIV 0xFFC0080C /* SPORT0 Transmit Frame Sync Divider */
273#define SPORT0_TX 0xFFC00810 /* SPORT0 TX Data Register */
274#define SPORT0_RX 0xFFC00818 /* SPORT0 RX Data Register */
275#define SPORT0_RCR1 0xFFC00820 /* SPORT0 Transmit Configuration 1 Register */
276#define SPORT0_RCR2 0xFFC00824 /* SPORT0 Transmit Configuration 2 Register */
277#define SPORT0_RCLKDIV 0xFFC00828 /* SPORT0 Receive Clock Divider */
278#define SPORT0_RFSDIV 0xFFC0082C /* SPORT0 Receive Frame Sync Divider */
279#define SPORT0_STAT 0xFFC00830 /* SPORT0 Status Register */
280#define SPORT0_CHNL 0xFFC00834 /* SPORT0 Current Channel Register */
281#define SPORT0_MCMC1 0xFFC00838 /* SPORT0 Multi-Channel Configuration Register 1 */
282#define SPORT0_MCMC2 0xFFC0083C /* SPORT0 Multi-Channel Configuration Register 2 */
283#define SPORT0_MTCS0 0xFFC00840 /* SPORT0 Multi-Channel Transmit Select Register 0 */
284#define SPORT0_MTCS1 0xFFC00844 /* SPORT0 Multi-Channel Transmit Select Register 1 */
285#define SPORT0_MTCS2 0xFFC00848 /* SPORT0 Multi-Channel Transmit Select Register 2 */
286#define SPORT0_MTCS3 0xFFC0084C /* SPORT0 Multi-Channel Transmit Select Register 3 */
287#define SPORT0_MRCS0 0xFFC00850 /* SPORT0 Multi-Channel Receive Select Register 0 */
288#define SPORT0_MRCS1 0xFFC00854 /* SPORT0 Multi-Channel Receive Select Register 1 */
289#define SPORT0_MRCS2 0xFFC00858 /* SPORT0 Multi-Channel Receive Select Register 2 */
290#define SPORT0_MRCS3 0xFFC0085C /* SPORT0 Multi-Channel Receive Select Register 3 */
291
292/* SPORT1 Controller (0xFFC00900 - 0xFFC009FF) */
293#define SPORT1_TCR1 0xFFC00900 /* SPORT1 Transmit Configuration 1 Register */
294#define SPORT1_TCR2 0xFFC00904 /* SPORT1 Transmit Configuration 2 Register */
295#define SPORT1_TCLKDIV 0xFFC00908 /* SPORT1 Transmit Clock Divider */
296#define SPORT1_TFSDIV 0xFFC0090C /* SPORT1 Transmit Frame Sync Divider */
297#define SPORT1_TX 0xFFC00910 /* SPORT1 TX Data Register */
298#define SPORT1_RX 0xFFC00918 /* SPORT1 RX Data Register */
299#define SPORT1_RCR1 0xFFC00920 /* SPORT1 Transmit Configuration 1 Register */
300#define SPORT1_RCR2 0xFFC00924 /* SPORT1 Transmit Configuration 2 Register */
301#define SPORT1_RCLKDIV 0xFFC00928 /* SPORT1 Receive Clock Divider */
302#define SPORT1_RFSDIV 0xFFC0092C /* SPORT1 Receive Frame Sync Divider */
303#define SPORT1_STAT 0xFFC00930 /* SPORT1 Status Register */
304#define SPORT1_CHNL 0xFFC00934 /* SPORT1 Current Channel Register */
305#define SPORT1_MCMC1 0xFFC00938 /* SPORT1 Multi-Channel Configuration Register 1 */
306#define SPORT1_MCMC2 0xFFC0093C /* SPORT1 Multi-Channel Configuration Register 2 */
307#define SPORT1_MTCS0 0xFFC00940 /* SPORT1 Multi-Channel Transmit Select Register 0 */
308#define SPORT1_MTCS1 0xFFC00944 /* SPORT1 Multi-Channel Transmit Select Register 1 */
309#define SPORT1_MTCS2 0xFFC00948 /* SPORT1 Multi-Channel Transmit Select Register 2 */
310#define SPORT1_MTCS3 0xFFC0094C /* SPORT1 Multi-Channel Transmit Select Register 3 */
311#define SPORT1_MRCS0 0xFFC00950 /* SPORT1 Multi-Channel Receive Select Register 0 */
312#define SPORT1_MRCS1 0xFFC00954 /* SPORT1 Multi-Channel Receive Select Register 1 */
313#define SPORT1_MRCS2 0xFFC00958 /* SPORT1 Multi-Channel Receive Select Register 2 */
314#define SPORT1_MRCS3 0xFFC0095C /* SPORT1 Multi-Channel Receive Select Register 3 */
315
316/* Asynchronous Memory Controller - External Bus Interface Unit */
317#define EBIU_AMGCTL 0xFFC00A00 /* Asynchronous Memory Global Control Register */
318#define EBIU_AMBCTL0 0xFFC00A04 /* Asynchronous Memory Bank Control Register 0 */
319#define EBIU_AMBCTL1 0xFFC00A08 /* Asynchronous Memory Bank Control Register 1 */
320
321/* SDRAM Controller External Bus Interface Unit (0xFFC00A00 - 0xFFC00AFF) */
322#define EBIU_SDGCTL 0xFFC00A10 /* SDRAM Global Control Register */
323#define EBIU_SDBCTL 0xFFC00A14 /* SDRAM Bank Control Register */
324#define EBIU_SDRRC 0xFFC00A18 /* SDRAM Refresh Rate Control Register */
325#define EBIU_SDSTAT 0xFFC00A1C /* SDRAM Status Register */
326
327/* Parallel Peripheral Interface (PPI) 0 registers (0xFFC0 1000-0xFFC0 10FF) */
328#define PPI0_CONTROL 0xFFC01000 /* PPI0 Control register */
329#define PPI0_STATUS 0xFFC01004 /* PPI0 Status register */
330#define PPI0_COUNT 0xFFC01008 /* PPI0 Transfer Count register */
331#define PPI0_DELAY 0xFFC0100C /* PPI0 Delay Count register */
332#define PPI0_FRAME 0xFFC01010 /* PPI0 Frame Length register */
333
334/*Parallel Peripheral Interface (PPI) 1 registers (0xFFC0 1300-0xFFC0 13FF) */
335#define PPI1_CONTROL 0xFFC01300 /* PPI1 Control register */
336#define PPI1_STATUS 0xFFC01304 /* PPI1 Status register */
337#define PPI1_COUNT 0xFFC01308 /* PPI1 Transfer Count register */
338#define PPI1_DELAY 0xFFC0130C /* PPI1 Delay Count register */
339#define PPI1_FRAME 0xFFC01310 /* PPI1 Frame Length register */
340
341/*DMA traffic control registers */
342#define DMA1_TC_PER 0xFFC01B0C /* Traffic control periods */
343#define DMA1_TC_CNT 0xFFC01B10 /* Traffic control current counts */
344#define DMA2_TC_PER 0xFFC00B0C /* Traffic control periods */
345#define DMA2_TC_CNT 0xFFC00B10 /* Traffic control current counts */
346
347/* DMA1 Controller registers (0xFFC0 1C00-0xFFC0 1FFF) */
348#define DMA1_0_CONFIG 0xFFC01C08 /* DMA1 Channel 0 Configuration register */
349#define DMA1_0_NEXT_DESC_PTR 0xFFC01C00 /* DMA1 Channel 0 Next Descripter Ptr Reg */
350#define DMA1_0_START_ADDR 0xFFC01C04 /* DMA1 Channel 0 Start Address */
351#define DMA1_0_X_COUNT 0xFFC01C10 /* DMA1 Channel 0 Inner Loop Count */
352#define DMA1_0_Y_COUNT 0xFFC01C18 /* DMA1 Channel 0 Outer Loop Count */
353#define DMA1_0_X_MODIFY 0xFFC01C14 /* DMA1 Channel 0 Inner Loop Addr Increment */
354#define DMA1_0_Y_MODIFY 0xFFC01C1C /* DMA1 Channel 0 Outer Loop Addr Increment */
355#define DMA1_0_CURR_DESC_PTR 0xFFC01C20 /* DMA1 Channel 0 Current Descriptor Pointer */
356#define DMA1_0_CURR_ADDR 0xFFC01C24 /* DMA1 Channel 0 Current Address Pointer */
357#define DMA1_0_CURR_X_COUNT 0xFFC01C30 /* DMA1 Channel 0 Current Inner Loop Count */
358#define DMA1_0_CURR_Y_COUNT 0xFFC01C38 /* DMA1 Channel 0 Current Outer Loop Count */
359#define DMA1_0_IRQ_STATUS 0xFFC01C28 /* DMA1 Channel 0 Interrupt/Status Register */
360#define DMA1_0_PERIPHERAL_MAP 0xFFC01C2C /* DMA1 Channel 0 Peripheral Map Register */
361
362#define DMA1_1_CONFIG 0xFFC01C48 /* DMA1 Channel 1 Configuration register */
363#define DMA1_1_NEXT_DESC_PTR 0xFFC01C40 /* DMA1 Channel 1 Next Descripter Ptr Reg */
364#define DMA1_1_START_ADDR 0xFFC01C44 /* DMA1 Channel 1 Start Address */
365#define DMA1_1_X_COUNT 0xFFC01C50 /* DMA1 Channel 1 Inner Loop Count */
366#define DMA1_1_Y_COUNT 0xFFC01C58 /* DMA1 Channel 1 Outer Loop Count */
367#define DMA1_1_X_MODIFY 0xFFC01C54 /* DMA1 Channel 1 Inner Loop Addr Increment */
368#define DMA1_1_Y_MODIFY 0xFFC01C5C /* DMA1 Channel 1 Outer Loop Addr Increment */
369#define DMA1_1_CURR_DESC_PTR 0xFFC01C60 /* DMA1 Channel 1 Current Descriptor Pointer */
370#define DMA1_1_CURR_ADDR 0xFFC01C64 /* DMA1 Channel 1 Current Address Pointer */
371#define DMA1_1_CURR_X_COUNT 0xFFC01C70 /* DMA1 Channel 1 Current Inner Loop Count */
372#define DMA1_1_CURR_Y_COUNT 0xFFC01C78 /* DMA1 Channel 1 Current Outer Loop Count */
373#define DMA1_1_IRQ_STATUS 0xFFC01C68 /* DMA1 Channel 1 Interrupt/Status Register */
374#define DMA1_1_PERIPHERAL_MAP 0xFFC01C6C /* DMA1 Channel 1 Peripheral Map Register */
375
376#define DMA1_2_CONFIG 0xFFC01C88 /* DMA1 Channel 2 Configuration register */
377#define DMA1_2_NEXT_DESC_PTR 0xFFC01C80 /* DMA1 Channel 2 Next Descripter Ptr Reg */
378#define DMA1_2_START_ADDR 0xFFC01C84 /* DMA1 Channel 2 Start Address */
379#define DMA1_2_X_COUNT 0xFFC01C90 /* DMA1 Channel 2 Inner Loop Count */
380#define DMA1_2_Y_COUNT 0xFFC01C98 /* DMA1 Channel 2 Outer Loop Count */
381#define DMA1_2_X_MODIFY 0xFFC01C94 /* DMA1 Channel 2 Inner Loop Addr Increment */
382#define DMA1_2_Y_MODIFY 0xFFC01C9C /* DMA1 Channel 2 Outer Loop Addr Increment */
383#define DMA1_2_CURR_DESC_PTR 0xFFC01CA0 /* DMA1 Channel 2 Current Descriptor Pointer */
384#define DMA1_2_CURR_ADDR 0xFFC01CA4 /* DMA1 Channel 2 Current Address Pointer */
385#define DMA1_2_CURR_X_COUNT 0xFFC01CB0 /* DMA1 Channel 2 Current Inner Loop Count */
386#define DMA1_2_CURR_Y_COUNT 0xFFC01CB8 /* DMA1 Channel 2 Current Outer Loop Count */
387#define DMA1_2_IRQ_STATUS 0xFFC01CA8 /* DMA1 Channel 2 Interrupt/Status Register */
388#define DMA1_2_PERIPHERAL_MAP 0xFFC01CAC /* DMA1 Channel 2 Peripheral Map Register */
389
390#define DMA1_3_CONFIG 0xFFC01CC8 /* DMA1 Channel 3 Configuration register */
391#define DMA1_3_NEXT_DESC_PTR 0xFFC01CC0 /* DMA1 Channel 3 Next Descripter Ptr Reg */
392#define DMA1_3_START_ADDR 0xFFC01CC4 /* DMA1 Channel 3 Start Address */
393#define DMA1_3_X_COUNT 0xFFC01CD0 /* DMA1 Channel 3 Inner Loop Count */
394#define DMA1_3_Y_COUNT 0xFFC01CD8 /* DMA1 Channel 3 Outer Loop Count */
395#define DMA1_3_X_MODIFY 0xFFC01CD4 /* DMA1 Channel 3 Inner Loop Addr Increment */
396#define DMA1_3_Y_MODIFY 0xFFC01CDC /* DMA1 Channel 3 Outer Loop Addr Increment */
397#define DMA1_3_CURR_DESC_PTR 0xFFC01CE0 /* DMA1 Channel 3 Current Descriptor Pointer */
398#define DMA1_3_CURR_ADDR 0xFFC01CE4 /* DMA1 Channel 3 Current Address Pointer */
399#define DMA1_3_CURR_X_COUNT 0xFFC01CF0 /* DMA1 Channel 3 Current Inner Loop Count */
400#define DMA1_3_CURR_Y_COUNT 0xFFC01CF8 /* DMA1 Channel 3 Current Outer Loop Count */
401#define DMA1_3_IRQ_STATUS 0xFFC01CE8 /* DMA1 Channel 3 Interrupt/Status Register */
402#define DMA1_3_PERIPHERAL_MAP 0xFFC01CEC /* DMA1 Channel 3 Peripheral Map Register */
403
404#define DMA1_4_CONFIG 0xFFC01D08 /* DMA1 Channel 4 Configuration register */
405#define DMA1_4_NEXT_DESC_PTR 0xFFC01D00 /* DMA1 Channel 4 Next Descripter Ptr Reg */
406#define DMA1_4_START_ADDR 0xFFC01D04 /* DMA1 Channel 4 Start Address */
407#define DMA1_4_X_COUNT 0xFFC01D10 /* DMA1 Channel 4 Inner Loop Count */
408#define DMA1_4_Y_COUNT 0xFFC01D18 /* DMA1 Channel 4 Outer Loop Count */
409#define DMA1_4_X_MODIFY 0xFFC01D14 /* DMA1 Channel 4 Inner Loop Addr Increment */
410#define DMA1_4_Y_MODIFY 0xFFC01D1C /* DMA1 Channel 4 Outer Loop Addr Increment */
411#define DMA1_4_CURR_DESC_PTR 0xFFC01D20 /* DMA1 Channel 4 Current Descriptor Pointer */
412#define DMA1_4_CURR_ADDR 0xFFC01D24 /* DMA1 Channel 4 Current Address Pointer */
413#define DMA1_4_CURR_X_COUNT 0xFFC01D30 /* DMA1 Channel 4 Current Inner Loop Count */
414#define DMA1_4_CURR_Y_COUNT 0xFFC01D38 /* DMA1 Channel 4 Current Outer Loop Count */
415#define DMA1_4_IRQ_STATUS 0xFFC01D28 /* DMA1 Channel 4 Interrupt/Status Register */
416#define DMA1_4_PERIPHERAL_MAP 0xFFC01D2C /* DMA1 Channel 4 Peripheral Map Register */
417
418#define DMA1_5_CONFIG 0xFFC01D48 /* DMA1 Channel 5 Configuration register */
419#define DMA1_5_NEXT_DESC_PTR 0xFFC01D40 /* DMA1 Channel 5 Next Descripter Ptr Reg */
420#define DMA1_5_START_ADDR 0xFFC01D44 /* DMA1 Channel 5 Start Address */
421#define DMA1_5_X_COUNT 0xFFC01D50 /* DMA1 Channel 5 Inner Loop Count */
422#define DMA1_5_Y_COUNT 0xFFC01D58 /* DMA1 Channel 5 Outer Loop Count */
423#define DMA1_5_X_MODIFY 0xFFC01D54 /* DMA1 Channel 5 Inner Loop Addr Increment */
424#define DMA1_5_Y_MODIFY 0xFFC01D5C /* DMA1 Channel 5 Outer Loop Addr Increment */
425#define DMA1_5_CURR_DESC_PTR 0xFFC01D60 /* DMA1 Channel 5 Current Descriptor Pointer */
426#define DMA1_5_CURR_ADDR 0xFFC01D64 /* DMA1 Channel 5 Current Address Pointer */
427#define DMA1_5_CURR_X_COUNT 0xFFC01D70 /* DMA1 Channel 5 Current Inner Loop Count */
428#define DMA1_5_CURR_Y_COUNT 0xFFC01D78 /* DMA1 Channel 5 Current Outer Loop Count */
429#define DMA1_5_IRQ_STATUS 0xFFC01D68 /* DMA1 Channel 5 Interrupt/Status Register */
430#define DMA1_5_PERIPHERAL_MAP 0xFFC01D6C /* DMA1 Channel 5 Peripheral Map Register */
431
432#define DMA1_6_CONFIG 0xFFC01D88 /* DMA1 Channel 6 Configuration register */
433#define DMA1_6_NEXT_DESC_PTR 0xFFC01D80 /* DMA1 Channel 6 Next Descripter Ptr Reg */
434#define DMA1_6_START_ADDR 0xFFC01D84 /* DMA1 Channel 6 Start Address */
435#define DMA1_6_X_COUNT 0xFFC01D90 /* DMA1 Channel 6 Inner Loop Count */
436#define DMA1_6_Y_COUNT 0xFFC01D98 /* DMA1 Channel 6 Outer Loop Count */
437#define DMA1_6_X_MODIFY 0xFFC01D94 /* DMA1 Channel 6 Inner Loop Addr Increment */
438#define DMA1_6_Y_MODIFY 0xFFC01D9C /* DMA1 Channel 6 Outer Loop Addr Increment */
439#define DMA1_6_CURR_DESC_PTR 0xFFC01DA0 /* DMA1 Channel 6 Current Descriptor Pointer */
440#define DMA1_6_CURR_ADDR 0xFFC01DA4 /* DMA1 Channel 6 Current Address Pointer */
441#define DMA1_6_CURR_X_COUNT 0xFFC01DB0 /* DMA1 Channel 6 Current Inner Loop Count */
442#define DMA1_6_CURR_Y_COUNT 0xFFC01DB8 /* DMA1 Channel 6 Current Outer Loop Count */
443#define DMA1_6_IRQ_STATUS 0xFFC01DA8 /* DMA1 Channel 6 Interrupt/Status Register */
444#define DMA1_6_PERIPHERAL_MAP 0xFFC01DAC /* DMA1 Channel 6 Peripheral Map Register */
445
446#define DMA1_7_CONFIG 0xFFC01DC8 /* DMA1 Channel 7 Configuration register */
447#define DMA1_7_NEXT_DESC_PTR 0xFFC01DC0 /* DMA1 Channel 7 Next Descripter Ptr Reg */
448#define DMA1_7_START_ADDR 0xFFC01DC4 /* DMA1 Channel 7 Start Address */
449#define DMA1_7_X_COUNT 0xFFC01DD0 /* DMA1 Channel 7 Inner Loop Count */
450#define DMA1_7_Y_COUNT 0xFFC01DD8 /* DMA1 Channel 7 Outer Loop Count */
451#define DMA1_7_X_MODIFY 0xFFC01DD4 /* DMA1 Channel 7 Inner Loop Addr Increment */
452#define DMA1_7_Y_MODIFY 0xFFC01DDC /* DMA1 Channel 7 Outer Loop Addr Increment */
453#define DMA1_7_CURR_DESC_PTR 0xFFC01DE0 /* DMA1 Channel 7 Current Descriptor Pointer */
454#define DMA1_7_CURR_ADDR 0xFFC01DE4 /* DMA1 Channel 7 Current Address Pointer */
455#define DMA1_7_CURR_X_COUNT 0xFFC01DF0 /* DMA1 Channel 7 Current Inner Loop Count */
456#define DMA1_7_CURR_Y_COUNT 0xFFC01DF8 /* DMA1 Channel 7 Current Outer Loop Count */
457#define DMA1_7_IRQ_STATUS 0xFFC01DE8 /* DMA1 Channel 7 Interrupt/Status Register */
458#define DMA1_7_PERIPHERAL_MAP 0xFFC01DEC /* DMA1 Channel 7 Peripheral Map Register */
459
460#define DMA1_8_CONFIG 0xFFC01E08 /* DMA1 Channel 8 Configuration register */
461#define DMA1_8_NEXT_DESC_PTR 0xFFC01E00 /* DMA1 Channel 8 Next Descripter Ptr Reg */
462#define DMA1_8_START_ADDR 0xFFC01E04 /* DMA1 Channel 8 Start Address */
463#define DMA1_8_X_COUNT 0xFFC01E10 /* DMA1 Channel 8 Inner Loop Count */
464#define DMA1_8_Y_COUNT 0xFFC01E18 /* DMA1 Channel 8 Outer Loop Count */
465#define DMA1_8_X_MODIFY 0xFFC01E14 /* DMA1 Channel 8 Inner Loop Addr Increment */
466#define DMA1_8_Y_MODIFY 0xFFC01E1C /* DMA1 Channel 8 Outer Loop Addr Increment */
467#define DMA1_8_CURR_DESC_PTR 0xFFC01E20 /* DMA1 Channel 8 Current Descriptor Pointer */
468#define DMA1_8_CURR_ADDR 0xFFC01E24 /* DMA1 Channel 8 Current Address Pointer */
469#define DMA1_8_CURR_X_COUNT 0xFFC01E30 /* DMA1 Channel 8 Current Inner Loop Count */
470#define DMA1_8_CURR_Y_COUNT 0xFFC01E38 /* DMA1 Channel 8 Current Outer Loop Count */
471#define DMA1_8_IRQ_STATUS 0xFFC01E28 /* DMA1 Channel 8 Interrupt/Status Register */
472#define DMA1_8_PERIPHERAL_MAP 0xFFC01E2C /* DMA1 Channel 8 Peripheral Map Register */
473
474#define DMA1_9_CONFIG 0xFFC01E48 /* DMA1 Channel 9 Configuration register */
475#define DMA1_9_NEXT_DESC_PTR 0xFFC01E40 /* DMA1 Channel 9 Next Descripter Ptr Reg */
476#define DMA1_9_START_ADDR 0xFFC01E44 /* DMA1 Channel 9 Start Address */
477#define DMA1_9_X_COUNT 0xFFC01E50 /* DMA1 Channel 9 Inner Loop Count */
478#define DMA1_9_Y_COUNT 0xFFC01E58 /* DMA1 Channel 9 Outer Loop Count */
479#define DMA1_9_X_MODIFY 0xFFC01E54 /* DMA1 Channel 9 Inner Loop Addr Increment */
480#define DMA1_9_Y_MODIFY 0xFFC01E5C /* DMA1 Channel 9 Outer Loop Addr Increment */
481#define DMA1_9_CURR_DESC_PTR 0xFFC01E60 /* DMA1 Channel 9 Current Descriptor Pointer */
482#define DMA1_9_CURR_ADDR 0xFFC01E64 /* DMA1 Channel 9 Current Address Pointer */
483#define DMA1_9_CURR_X_COUNT 0xFFC01E70 /* DMA1 Channel 9 Current Inner Loop Count */
484#define DMA1_9_CURR_Y_COUNT 0xFFC01E78 /* DMA1 Channel 9 Current Outer Loop Count */
485#define DMA1_9_IRQ_STATUS 0xFFC01E68 /* DMA1 Channel 9 Interrupt/Status Register */
486#define DMA1_9_PERIPHERAL_MAP 0xFFC01E6C /* DMA1 Channel 9 Peripheral Map Register */
487
488#define DMA1_10_CONFIG 0xFFC01E88 /* DMA1 Channel 10 Configuration register */
489#define DMA1_10_NEXT_DESC_PTR 0xFFC01E80 /* DMA1 Channel 10 Next Descripter Ptr Reg */
490#define DMA1_10_START_ADDR 0xFFC01E84 /* DMA1 Channel 10 Start Address */
491#define DMA1_10_X_COUNT 0xFFC01E90 /* DMA1 Channel 10 Inner Loop Count */
492#define DMA1_10_Y_COUNT 0xFFC01E98 /* DMA1 Channel 10 Outer Loop Count */
493#define DMA1_10_X_MODIFY 0xFFC01E94 /* DMA1 Channel 10 Inner Loop Addr Increment */
494#define DMA1_10_Y_MODIFY 0xFFC01E9C /* DMA1 Channel 10 Outer Loop Addr Increment */
495#define DMA1_10_CURR_DESC_PTR 0xFFC01EA0 /* DMA1 Channel 10 Current Descriptor Pointer */
496#define DMA1_10_CURR_ADDR 0xFFC01EA4 /* DMA1 Channel 10 Current Address Pointer */
497#define DMA1_10_CURR_X_COUNT 0xFFC01EB0 /* DMA1 Channel 10 Current Inner Loop Count */
498#define DMA1_10_CURR_Y_COUNT 0xFFC01EB8 /* DMA1 Channel 10 Current Outer Loop Count */
499#define DMA1_10_IRQ_STATUS 0xFFC01EA8 /* DMA1 Channel 10 Interrupt/Status Register */
500#define DMA1_10_PERIPHERAL_MAP 0xFFC01EAC /* DMA1 Channel 10 Peripheral Map Register */
501
502#define DMA1_11_CONFIG 0xFFC01EC8 /* DMA1 Channel 11 Configuration register */
503#define DMA1_11_NEXT_DESC_PTR 0xFFC01EC0 /* DMA1 Channel 11 Next Descripter Ptr Reg */
504#define DMA1_11_START_ADDR 0xFFC01EC4 /* DMA1 Channel 11 Start Address */
505#define DMA1_11_X_COUNT 0xFFC01ED0 /* DMA1 Channel 11 Inner Loop Count */
506#define DMA1_11_Y_COUNT 0xFFC01ED8 /* DMA1 Channel 11 Outer Loop Count */
507#define DMA1_11_X_MODIFY 0xFFC01ED4 /* DMA1 Channel 11 Inner Loop Addr Increment */
508#define DMA1_11_Y_MODIFY 0xFFC01EDC /* DMA1 Channel 11 Outer Loop Addr Increment */
509#define DMA1_11_CURR_DESC_PTR 0xFFC01EE0 /* DMA1 Channel 11 Current Descriptor Pointer */
510#define DMA1_11_CURR_ADDR 0xFFC01EE4 /* DMA1 Channel 11 Current Address Pointer */
511#define DMA1_11_CURR_X_COUNT 0xFFC01EF0 /* DMA1 Channel 11 Current Inner Loop Count */
512#define DMA1_11_CURR_Y_COUNT 0xFFC01EF8 /* DMA1 Channel 11 Current Outer Loop Count */
513#define DMA1_11_IRQ_STATUS 0xFFC01EE8 /* DMA1 Channel 11 Interrupt/Status Register */
514#define DMA1_11_PERIPHERAL_MAP 0xFFC01EEC /* DMA1 Channel 11 Peripheral Map Register */
515
516/* Memory DMA1 Controller registers (0xFFC0 1E80-0xFFC0 1FFF) */
517#define MDMA1_D0_CONFIG 0xFFC01F08 /*MemDMA1 Stream 0 Destination Configuration */
518#define MDMA1_D0_NEXT_DESC_PTR 0xFFC01F00 /*MemDMA1 Stream 0 Destination Next Descriptor Ptr Reg */
519#define MDMA1_D0_START_ADDR 0xFFC01F04 /*MemDMA1 Stream 0 Destination Start Address */
520#define MDMA1_D0_X_COUNT 0xFFC01F10 /*MemDMA1 Stream 0 Destination Inner-Loop Count */
521#define MDMA1_D0_Y_COUNT 0xFFC01F18 /*MemDMA1 Stream 0 Destination Outer-Loop Count */
522#define MDMA1_D0_X_MODIFY 0xFFC01F14 /*MemDMA1 Stream 0 Dest Inner-Loop Address-Increment */
523#define MDMA1_D0_Y_MODIFY 0xFFC01F1C /*MemDMA1 Stream 0 Dest Outer-Loop Address-Increment */
524#define MDMA1_D0_CURR_DESC_PTR 0xFFC01F20 /*MemDMA1 Stream 0 Dest Current Descriptor Ptr reg */
525#define MDMA1_D0_CURR_ADDR 0xFFC01F24 /*MemDMA1 Stream 0 Destination Current Address */
526#define MDMA1_D0_CURR_X_COUNT 0xFFC01F30 /*MemDMA1 Stream 0 Dest Current Inner-Loop Count */
527#define MDMA1_D0_CURR_Y_COUNT 0xFFC01F38 /*MemDMA1 Stream 0 Dest Current Outer-Loop Count */
528#define MDMA1_D0_IRQ_STATUS 0xFFC01F28 /*MemDMA1 Stream 0 Destination Interrupt/Status */
529#define MDMA1_D0_PERIPHERAL_MAP 0xFFC01F2C /*MemDMA1 Stream 0 Destination Peripheral Map */
530
531#define MDMA1_S0_CONFIG 0xFFC01F48 /*MemDMA1 Stream 0 Source Configuration */
532#define MDMA1_S0_NEXT_DESC_PTR 0xFFC01F40 /*MemDMA1 Stream 0 Source Next Descriptor Ptr Reg */
533#define MDMA1_S0_START_ADDR 0xFFC01F44 /*MemDMA1 Stream 0 Source Start Address */
534#define MDMA1_S0_X_COUNT 0xFFC01F50 /*MemDMA1 Stream 0 Source Inner-Loop Count */
535#define MDMA1_S0_Y_COUNT 0xFFC01F58 /*MemDMA1 Stream 0 Source Outer-Loop Count */
536#define MDMA1_S0_X_MODIFY 0xFFC01F54 /*MemDMA1 Stream 0 Source Inner-Loop Address-Increment */
537#define MDMA1_S0_Y_MODIFY 0xFFC01F5C /*MemDMA1 Stream 0 Source Outer-Loop Address-Increment */
538#define MDMA1_S0_CURR_DESC_PTR 0xFFC01F60 /*MemDMA1 Stream 0 Source Current Descriptor Ptr reg */
539#define MDMA1_S0_CURR_ADDR 0xFFC01F64 /*MemDMA1 Stream 0 Source Current Address */
540#define MDMA1_S0_CURR_X_COUNT 0xFFC01F70 /*MemDMA1 Stream 0 Source Current Inner-Loop Count */
541#define MDMA1_S0_CURR_Y_COUNT 0xFFC01F78 /*MemDMA1 Stream 0 Source Current Outer-Loop Count */
542#define MDMA1_S0_IRQ_STATUS 0xFFC01F68 /*MemDMA1 Stream 0 Source Interrupt/Status */
543#define MDMA1_S0_PERIPHERAL_MAP 0xFFC01F6C /*MemDMA1 Stream 0 Source Peripheral Map */
544
545#define MDMA1_D1_CONFIG 0xFFC01F88 /*MemDMA1 Stream 1 Destination Configuration */
546#define MDMA1_D1_NEXT_DESC_PTR 0xFFC01F80 /*MemDMA1 Stream 1 Destination Next Descriptor Ptr Reg */
547#define MDMA1_D1_START_ADDR 0xFFC01F84 /*MemDMA1 Stream 1 Destination Start Address */
548#define MDMA1_D1_X_COUNT 0xFFC01F90 /*MemDMA1 Stream 1 Destination Inner-Loop Count */
549#define MDMA1_D1_Y_COUNT 0xFFC01F98 /*MemDMA1 Stream 1 Destination Outer-Loop Count */
550#define MDMA1_D1_X_MODIFY 0xFFC01F94 /*MemDMA1 Stream 1 Dest Inner-Loop Address-Increment */
551#define MDMA1_D1_Y_MODIFY 0xFFC01F9C /*MemDMA1 Stream 1 Dest Outer-Loop Address-Increment */
552#define MDMA1_D1_CURR_DESC_PTR 0xFFC01FA0 /*MemDMA1 Stream 1 Dest Current Descriptor Ptr reg */
553#define MDMA1_D1_CURR_ADDR 0xFFC01FA4 /*MemDMA1 Stream 1 Dest Current Address */
554#define MDMA1_D1_CURR_X_COUNT 0xFFC01FB0 /*MemDMA1 Stream 1 Dest Current Inner-Loop Count */
555#define MDMA1_D1_CURR_Y_COUNT 0xFFC01FB8 /*MemDMA1 Stream 1 Dest Current Outer-Loop Count */
556#define MDMA1_D1_IRQ_STATUS 0xFFC01FA8 /*MemDMA1 Stream 1 Dest Interrupt/Status */
557#define MDMA1_D1_PERIPHERAL_MAP 0xFFC01FAC /*MemDMA1 Stream 1 Dest Peripheral Map */
558
559#define MDMA1_S1_CONFIG 0xFFC01FC8 /*MemDMA1 Stream 1 Source Configuration */
560#define MDMA1_S1_NEXT_DESC_PTR 0xFFC01FC0 /*MemDMA1 Stream 1 Source Next Descriptor Ptr Reg */
561#define MDMA1_S1_START_ADDR 0xFFC01FC4 /*MemDMA1 Stream 1 Source Start Address */
562#define MDMA1_S1_X_COUNT 0xFFC01FD0 /*MemDMA1 Stream 1 Source Inner-Loop Count */
563#define MDMA1_S1_Y_COUNT 0xFFC01FD8 /*MemDMA1 Stream 1 Source Outer-Loop Count */
564#define MDMA1_S1_X_MODIFY 0xFFC01FD4 /*MemDMA1 Stream 1 Source Inner-Loop Address-Increment */
565#define MDMA1_S1_Y_MODIFY 0xFFC01FDC /*MemDMA1 Stream 1 Source Outer-Loop Address-Increment */
566#define MDMA1_S1_CURR_DESC_PTR 0xFFC01FE0 /*MemDMA1 Stream 1 Source Current Descriptor Ptr reg */
567#define MDMA1_S1_CURR_ADDR 0xFFC01FE4 /*MemDMA1 Stream 1 Source Current Address */
568#define MDMA1_S1_CURR_X_COUNT 0xFFC01FF0 /*MemDMA1 Stream 1 Source Current Inner-Loop Count */
569#define MDMA1_S1_CURR_Y_COUNT 0xFFC01FF8 /*MemDMA1 Stream 1 Source Current Outer-Loop Count */
570#define MDMA1_S1_IRQ_STATUS 0xFFC01FE8 /*MemDMA1 Stream 1 Source Interrupt/Status */
571#define MDMA1_S1_PERIPHERAL_MAP 0xFFC01FEC /*MemDMA1 Stream 1 Source Peripheral Map */
572
573/* DMA2 Controller registers (0xFFC0 0C00-0xFFC0 0DFF) */
574#define DMA2_0_CONFIG 0xFFC00C08 /* DMA2 Channel 0 Configuration register */
575#define DMA2_0_NEXT_DESC_PTR 0xFFC00C00 /* DMA2 Channel 0 Next Descripter Ptr Reg */
576#define DMA2_0_START_ADDR 0xFFC00C04 /* DMA2 Channel 0 Start Address */
577#define DMA2_0_X_COUNT 0xFFC00C10 /* DMA2 Channel 0 Inner Loop Count */
578#define DMA2_0_Y_COUNT 0xFFC00C18 /* DMA2 Channel 0 Outer Loop Count */
579#define DMA2_0_X_MODIFY 0xFFC00C14 /* DMA2 Channel 0 Inner Loop Addr Increment */
580#define DMA2_0_Y_MODIFY 0xFFC00C1C /* DMA2 Channel 0 Outer Loop Addr Increment */
581#define DMA2_0_CURR_DESC_PTR 0xFFC00C20 /* DMA2 Channel 0 Current Descriptor Pointer */
582#define DMA2_0_CURR_ADDR 0xFFC00C24 /* DMA2 Channel 0 Current Address Pointer */
583#define DMA2_0_CURR_X_COUNT 0xFFC00C30 /* DMA2 Channel 0 Current Inner Loop Count */
584#define DMA2_0_CURR_Y_COUNT 0xFFC00C38 /* DMA2 Channel 0 Current Outer Loop Count */
585#define DMA2_0_IRQ_STATUS 0xFFC00C28 /* DMA2 Channel 0 Interrupt/Status Register */
586#define DMA2_0_PERIPHERAL_MAP 0xFFC00C2C /* DMA2 Channel 0 Peripheral Map Register */
587
588#define DMA2_1_CONFIG 0xFFC00C48 /* DMA2 Channel 1 Configuration register */
589#define DMA2_1_NEXT_DESC_PTR 0xFFC00C40 /* DMA2 Channel 1 Next Descripter Ptr Reg */
590#define DMA2_1_START_ADDR 0xFFC00C44 /* DMA2 Channel 1 Start Address */
591#define DMA2_1_X_COUNT 0xFFC00C50 /* DMA2 Channel 1 Inner Loop Count */
592#define DMA2_1_Y_COUNT 0xFFC00C58 /* DMA2 Channel 1 Outer Loop Count */
593#define DMA2_1_X_MODIFY 0xFFC00C54 /* DMA2 Channel 1 Inner Loop Addr Increment */
594#define DMA2_1_Y_MODIFY 0xFFC00C5C /* DMA2 Channel 1 Outer Loop Addr Increment */
595#define DMA2_1_CURR_DESC_PTR 0xFFC00C60 /* DMA2 Channel 1 Current Descriptor Pointer */
596#define DMA2_1_CURR_ADDR 0xFFC00C64 /* DMA2 Channel 1 Current Address Pointer */
597#define DMA2_1_CURR_X_COUNT 0xFFC00C70 /* DMA2 Channel 1 Current Inner Loop Count */
598#define DMA2_1_CURR_Y_COUNT 0xFFC00C78 /* DMA2 Channel 1 Current Outer Loop Count */
599#define DMA2_1_IRQ_STATUS 0xFFC00C68 /* DMA2 Channel 1 Interrupt/Status Register */
600#define DMA2_1_PERIPHERAL_MAP 0xFFC00C6C /* DMA2 Channel 1 Peripheral Map Register */
601
602#define DMA2_2_CONFIG 0xFFC00C88 /* DMA2 Channel 2 Configuration register */
603#define DMA2_2_NEXT_DESC_PTR 0xFFC00C80 /* DMA2 Channel 2 Next Descripter Ptr Reg */
604#define DMA2_2_START_ADDR 0xFFC00C84 /* DMA2 Channel 2 Start Address */
605#define DMA2_2_X_COUNT 0xFFC00C90 /* DMA2 Channel 2 Inner Loop Count */
606#define DMA2_2_Y_COUNT 0xFFC00C98 /* DMA2 Channel 2 Outer Loop Count */
607#define DMA2_2_X_MODIFY 0xFFC00C94 /* DMA2 Channel 2 Inner Loop Addr Increment */
608#define DMA2_2_Y_MODIFY 0xFFC00C9C /* DMA2 Channel 2 Outer Loop Addr Increment */
609#define DMA2_2_CURR_DESC_PTR 0xFFC00CA0 /* DMA2 Channel 2 Current Descriptor Pointer */
610#define DMA2_2_CURR_ADDR 0xFFC00CA4 /* DMA2 Channel 2 Current Address Pointer */
611#define DMA2_2_CURR_X_COUNT 0xFFC00CB0 /* DMA2 Channel 2 Current Inner Loop Count */
612#define DMA2_2_CURR_Y_COUNT 0xFFC00CB8 /* DMA2 Channel 2 Current Outer Loop Count */
613#define DMA2_2_IRQ_STATUS 0xFFC00CA8 /* DMA2 Channel 2 Interrupt/Status Register */
614#define DMA2_2_PERIPHERAL_MAP 0xFFC00CAC /* DMA2 Channel 2 Peripheral Map Register */
615
616#define DMA2_3_CONFIG 0xFFC00CC8 /* DMA2 Channel 3 Configuration register */
617#define DMA2_3_NEXT_DESC_PTR 0xFFC00CC0 /* DMA2 Channel 3 Next Descripter Ptr Reg */
618#define DMA2_3_START_ADDR 0xFFC00CC4 /* DMA2 Channel 3 Start Address */
619#define DMA2_3_X_COUNT 0xFFC00CD0 /* DMA2 Channel 3 Inner Loop Count */
620#define DMA2_3_Y_COUNT 0xFFC00CD8 /* DMA2 Channel 3 Outer Loop Count */
621#define DMA2_3_X_MODIFY 0xFFC00CD4 /* DMA2 Channel 3 Inner Loop Addr Increment */
622#define DMA2_3_Y_MODIFY 0xFFC00CDC /* DMA2 Channel 3 Outer Loop Addr Increment */
623#define DMA2_3_CURR_DESC_PTR 0xFFC00CE0 /* DMA2 Channel 3 Current Descriptor Pointer */
624#define DMA2_3_CURR_ADDR 0xFFC00CE4 /* DMA2 Channel 3 Current Address Pointer */
625#define DMA2_3_CURR_X_COUNT 0xFFC00CF0 /* DMA2 Channel 3 Current Inner Loop Count */
626#define DMA2_3_CURR_Y_COUNT 0xFFC00CF8 /* DMA2 Channel 3 Current Outer Loop Count */
627#define DMA2_3_IRQ_STATUS 0xFFC00CE8 /* DMA2 Channel 3 Interrupt/Status Register */
628#define DMA2_3_PERIPHERAL_MAP 0xFFC00CEC /* DMA2 Channel 3 Peripheral Map Register */
629
630#define DMA2_4_CONFIG 0xFFC00D08 /* DMA2 Channel 4 Configuration register */
631#define DMA2_4_NEXT_DESC_PTR 0xFFC00D00 /* DMA2 Channel 4 Next Descripter Ptr Reg */
632#define DMA2_4_START_ADDR 0xFFC00D04 /* DMA2 Channel 4 Start Address */
633#define DMA2_4_X_COUNT 0xFFC00D10 /* DMA2 Channel 4 Inner Loop Count */
634#define DMA2_4_Y_COUNT 0xFFC00D18 /* DMA2 Channel 4 Outer Loop Count */
635#define DMA2_4_X_MODIFY 0xFFC00D14 /* DMA2 Channel 4 Inner Loop Addr Increment */
636#define DMA2_4_Y_MODIFY 0xFFC00D1C /* DMA2 Channel 4 Outer Loop Addr Increment */
637#define DMA2_4_CURR_DESC_PTR 0xFFC00D20 /* DMA2 Channel 4 Current Descriptor Pointer */
638#define DMA2_4_CURR_ADDR 0xFFC00D24 /* DMA2 Channel 4 Current Address Pointer */
639#define DMA2_4_CURR_X_COUNT 0xFFC00D30 /* DMA2 Channel 4 Current Inner Loop Count */
640#define DMA2_4_CURR_Y_COUNT 0xFFC00D38 /* DMA2 Channel 4 Current Outer Loop Count */
641#define DMA2_4_IRQ_STATUS 0xFFC00D28 /* DMA2 Channel 4 Interrupt/Status Register */
642#define DMA2_4_PERIPHERAL_MAP 0xFFC00D2C /* DMA2 Channel 4 Peripheral Map Register */
643
644#define DMA2_5_CONFIG 0xFFC00D48 /* DMA2 Channel 5 Configuration register */
645#define DMA2_5_NEXT_DESC_PTR 0xFFC00D40 /* DMA2 Channel 5 Next Descripter Ptr Reg */
646#define DMA2_5_START_ADDR 0xFFC00D44 /* DMA2 Channel 5 Start Address */
647#define DMA2_5_X_COUNT 0xFFC00D50 /* DMA2 Channel 5 Inner Loop Count */
648#define DMA2_5_Y_COUNT 0xFFC00D58 /* DMA2 Channel 5 Outer Loop Count */
649#define DMA2_5_X_MODIFY 0xFFC00D54 /* DMA2 Channel 5 Inner Loop Addr Increment */
650#define DMA2_5_Y_MODIFY 0xFFC00D5C /* DMA2 Channel 5 Outer Loop Addr Increment */
651#define DMA2_5_CURR_DESC_PTR 0xFFC00D60 /* DMA2 Channel 5 Current Descriptor Pointer */
652#define DMA2_5_CURR_ADDR 0xFFC00D64 /* DMA2 Channel 5 Current Address Pointer */
653#define DMA2_5_CURR_X_COUNT 0xFFC00D70 /* DMA2 Channel 5 Current Inner Loop Count */
654#define DMA2_5_CURR_Y_COUNT 0xFFC00D78 /* DMA2 Channel 5 Current Outer Loop Count */
655#define DMA2_5_IRQ_STATUS 0xFFC00D68 /* DMA2 Channel 5 Interrupt/Status Register */
656#define DMA2_5_PERIPHERAL_MAP 0xFFC00D6C /* DMA2 Channel 5 Peripheral Map Register */
657
658#define DMA2_6_CONFIG 0xFFC00D88 /* DMA2 Channel 6 Configuration register */
659#define DMA2_6_NEXT_DESC_PTR 0xFFC00D80 /* DMA2 Channel 6 Next Descripter Ptr Reg */
660#define DMA2_6_START_ADDR 0xFFC00D84 /* DMA2 Channel 6 Start Address */
661#define DMA2_6_X_COUNT 0xFFC00D90 /* DMA2 Channel 6 Inner Loop Count */
662#define DMA2_6_Y_COUNT 0xFFC00D98 /* DMA2 Channel 6 Outer Loop Count */
663#define DMA2_6_X_MODIFY 0xFFC00D94 /* DMA2 Channel 6 Inner Loop Addr Increment */
664#define DMA2_6_Y_MODIFY 0xFFC00D9C /* DMA2 Channel 6 Outer Loop Addr Increment */
665#define DMA2_6_CURR_DESC_PTR 0xFFC00DA0 /* DMA2 Channel 6 Current Descriptor Pointer */
666#define DMA2_6_CURR_ADDR 0xFFC00DA4 /* DMA2 Channel 6 Current Address Pointer */
667#define DMA2_6_CURR_X_COUNT 0xFFC00DB0 /* DMA2 Channel 6 Current Inner Loop Count */
668#define DMA2_6_CURR_Y_COUNT 0xFFC00DB8 /* DMA2 Channel 6 Current Outer Loop Count */
669#define DMA2_6_IRQ_STATUS 0xFFC00DA8 /* DMA2 Channel 6 Interrupt/Status Register */
670#define DMA2_6_PERIPHERAL_MAP 0xFFC00DAC /* DMA2 Channel 6 Peripheral Map Register */
671
672#define DMA2_7_CONFIG 0xFFC00DC8 /* DMA2 Channel 7 Configuration register */
673#define DMA2_7_NEXT_DESC_PTR 0xFFC00DC0 /* DMA2 Channel 7 Next Descripter Ptr Reg */
674#define DMA2_7_START_ADDR 0xFFC00DC4 /* DMA2 Channel 7 Start Address */
675#define DMA2_7_X_COUNT 0xFFC00DD0 /* DMA2 Channel 7 Inner Loop Count */
676#define DMA2_7_Y_COUNT 0xFFC00DD8 /* DMA2 Channel 7 Outer Loop Count */
677#define DMA2_7_X_MODIFY 0xFFC00DD4 /* DMA2 Channel 7 Inner Loop Addr Increment */
678#define DMA2_7_Y_MODIFY 0xFFC00DDC /* DMA2 Channel 7 Outer Loop Addr Increment */
679#define DMA2_7_CURR_DESC_PTR 0xFFC00DE0 /* DMA2 Channel 7 Current Descriptor Pointer */
680#define DMA2_7_CURR_ADDR 0xFFC00DE4 /* DMA2 Channel 7 Current Address Pointer */
681#define DMA2_7_CURR_X_COUNT 0xFFC00DF0 /* DMA2 Channel 7 Current Inner Loop Count */
682#define DMA2_7_CURR_Y_COUNT 0xFFC00DF8 /* DMA2 Channel 7 Current Outer Loop Count */
683#define DMA2_7_IRQ_STATUS 0xFFC00DE8 /* DMA2 Channel 7 Interrupt/Status Register */
684#define DMA2_7_PERIPHERAL_MAP 0xFFC00DEC /* DMA2 Channel 7 Peripheral Map Register */
685
686#define DMA2_8_CONFIG 0xFFC00E08 /* DMA2 Channel 8 Configuration register */
687#define DMA2_8_NEXT_DESC_PTR 0xFFC00E00 /* DMA2 Channel 8 Next Descripter Ptr Reg */
688#define DMA2_8_START_ADDR 0xFFC00E04 /* DMA2 Channel 8 Start Address */
689#define DMA2_8_X_COUNT 0xFFC00E10 /* DMA2 Channel 8 Inner Loop Count */
690#define DMA2_8_Y_COUNT 0xFFC00E18 /* DMA2 Channel 8 Outer Loop Count */
691#define DMA2_8_X_MODIFY 0xFFC00E14 /* DMA2 Channel 8 Inner Loop Addr Increment */
692#define DMA2_8_Y_MODIFY 0xFFC00E1C /* DMA2 Channel 8 Outer Loop Addr Increment */
693#define DMA2_8_CURR_DESC_PTR 0xFFC00E20 /* DMA2 Channel 8 Current Descriptor Pointer */
694#define DMA2_8_CURR_ADDR 0xFFC00E24 /* DMA2 Channel 8 Current Address Pointer */
695#define DMA2_8_CURR_X_COUNT 0xFFC00E30 /* DMA2 Channel 8 Current Inner Loop Count */
696#define DMA2_8_CURR_Y_COUNT 0xFFC00E38 /* DMA2 Channel 8 Current Outer Loop Count */
697#define DMA2_8_IRQ_STATUS 0xFFC00E28 /* DMA2 Channel 8 Interrupt/Status Register */
698#define DMA2_8_PERIPHERAL_MAP 0xFFC00E2C /* DMA2 Channel 8 Peripheral Map Register */
699
700#define DMA2_9_CONFIG 0xFFC00E48 /* DMA2 Channel 9 Configuration register */
701#define DMA2_9_NEXT_DESC_PTR 0xFFC00E40 /* DMA2 Channel 9 Next Descripter Ptr Reg */
702#define DMA2_9_START_ADDR 0xFFC00E44 /* DMA2 Channel 9 Start Address */
703#define DMA2_9_X_COUNT 0xFFC00E50 /* DMA2 Channel 9 Inner Loop Count */
704#define DMA2_9_Y_COUNT 0xFFC00E58 /* DMA2 Channel 9 Outer Loop Count */
705#define DMA2_9_X_MODIFY 0xFFC00E54 /* DMA2 Channel 9 Inner Loop Addr Increment */
706#define DMA2_9_Y_MODIFY 0xFFC00E5C /* DMA2 Channel 9 Outer Loop Addr Increment */
707#define DMA2_9_CURR_DESC_PTR 0xFFC00E60 /* DMA2 Channel 9 Current Descriptor Pointer */
708#define DMA2_9_CURR_ADDR 0xFFC00E64 /* DMA2 Channel 9 Current Address Pointer */
709#define DMA2_9_CURR_X_COUNT 0xFFC00E70 /* DMA2 Channel 9 Current Inner Loop Count */
710#define DMA2_9_CURR_Y_COUNT 0xFFC00E78 /* DMA2 Channel 9 Current Outer Loop Count */
711#define DMA2_9_IRQ_STATUS 0xFFC00E68 /* DMA2 Channel 9 Interrupt/Status Register */
712#define DMA2_9_PERIPHERAL_MAP 0xFFC00E6C /* DMA2 Channel 9 Peripheral Map Register */
713
714#define DMA2_10_CONFIG 0xFFC00E88 /* DMA2 Channel 10 Configuration register */
715#define DMA2_10_NEXT_DESC_PTR 0xFFC00E80 /* DMA2 Channel 10 Next Descripter Ptr Reg */
716#define DMA2_10_START_ADDR 0xFFC00E84 /* DMA2 Channel 10 Start Address */
717#define DMA2_10_X_COUNT 0xFFC00E90 /* DMA2 Channel 10 Inner Loop Count */
718#define DMA2_10_Y_COUNT 0xFFC00E98 /* DMA2 Channel 10 Outer Loop Count */
719#define DMA2_10_X_MODIFY 0xFFC00E94 /* DMA2 Channel 10 Inner Loop Addr Increment */
720#define DMA2_10_Y_MODIFY 0xFFC00E9C /* DMA2 Channel 10 Outer Loop Addr Increment */
721#define DMA2_10_CURR_DESC_PTR 0xFFC00EA0 /* DMA2 Channel 10 Current Descriptor Pointer */
722#define DMA2_10_CURR_ADDR 0xFFC00EA4 /* DMA2 Channel 10 Current Address Pointer */
723#define DMA2_10_CURR_X_COUNT 0xFFC00EB0 /* DMA2 Channel 10 Current Inner Loop Count */
724#define DMA2_10_CURR_Y_COUNT 0xFFC00EB8 /* DMA2 Channel 10 Current Outer Loop Count */
725#define DMA2_10_IRQ_STATUS 0xFFC00EA8 /* DMA2 Channel 10 Interrupt/Status Register */
726#define DMA2_10_PERIPHERAL_MAP 0xFFC00EAC /* DMA2 Channel 10 Peripheral Map Register */
727
728#define DMA2_11_CONFIG 0xFFC00EC8 /* DMA2 Channel 11 Configuration register */
729#define DMA2_11_NEXT_DESC_PTR 0xFFC00EC0 /* DMA2 Channel 11 Next Descripter Ptr Reg */
730#define DMA2_11_START_ADDR 0xFFC00EC4 /* DMA2 Channel 11 Start Address */
731#define DMA2_11_X_COUNT 0xFFC00ED0 /* DMA2 Channel 11 Inner Loop Count */
732#define DMA2_11_Y_COUNT 0xFFC00ED8 /* DMA2 Channel 11 Outer Loop Count */
733#define DMA2_11_X_MODIFY 0xFFC00ED4 /* DMA2 Channel 11 Inner Loop Addr Increment */
734#define DMA2_11_Y_MODIFY 0xFFC00EDC /* DMA2 Channel 11 Outer Loop Addr Increment */
735#define DMA2_11_CURR_DESC_PTR 0xFFC00EE0 /* DMA2 Channel 11 Current Descriptor Pointer */
736#define DMA2_11_CURR_ADDR 0xFFC00EE4 /* DMA2 Channel 11 Current Address Pointer */
737#define DMA2_11_CURR_X_COUNT 0xFFC00EF0 /* DMA2 Channel 11 Current Inner Loop Count */
738#define DMA2_11_CURR_Y_COUNT 0xFFC00EF8 /* DMA2 Channel 11 Current Outer Loop Count */
739#define DMA2_11_IRQ_STATUS 0xFFC00EE8 /* DMA2 Channel 11 Interrupt/Status Register */
740#define DMA2_11_PERIPHERAL_MAP 0xFFC00EEC /* DMA2 Channel 11 Peripheral Map Register */
741
742/* Memory DMA2 Controller registers (0xFFC0 0E80-0xFFC0 0FFF) */
743#define MDMA2_D0_CONFIG 0xFFC00F08 /*MemDMA2 Stream 0 Destination Configuration register */
744#define MDMA2_D0_NEXT_DESC_PTR 0xFFC00F00 /*MemDMA2 Stream 0 Destination Next Descriptor Ptr Reg */
745#define MDMA2_D0_START_ADDR 0xFFC00F04 /*MemDMA2 Stream 0 Destination Start Address */
746#define MDMA2_D0_X_COUNT 0xFFC00F10 /*MemDMA2 Stream 0 Dest Inner-Loop Count register */
747#define MDMA2_D0_Y_COUNT 0xFFC00F18 /*MemDMA2 Stream 0 Dest Outer-Loop Count register */
748#define MDMA2_D0_X_MODIFY 0xFFC00F14 /*MemDMA2 Stream 0 Dest Inner-Loop Address-Increment */
749#define MDMA2_D0_Y_MODIFY 0xFFC00F1C /*MemDMA2 Stream 0 Dest Outer-Loop Address-Increment */
750#define MDMA2_D0_CURR_DESC_PTR 0xFFC00F20 /*MemDMA2 Stream 0 Dest Current Descriptor Ptr reg */
751#define MDMA2_D0_CURR_ADDR 0xFFC00F24 /*MemDMA2 Stream 0 Destination Current Address */
752#define MDMA2_D0_CURR_X_COUNT 0xFFC00F30 /*MemDMA2 Stream 0 Dest Current Inner-Loop Count reg */
753#define MDMA2_D0_CURR_Y_COUNT 0xFFC00F38 /*MemDMA2 Stream 0 Dest Current Outer-Loop Count reg */
754#define MDMA2_D0_IRQ_STATUS 0xFFC00F28 /*MemDMA2 Stream 0 Dest Interrupt/Status Register */
755#define MDMA2_D0_PERIPHERAL_MAP 0xFFC00F2C /*MemDMA2 Stream 0 Destination Peripheral Map register */
756
757#define MDMA2_S0_CONFIG 0xFFC00F48 /*MemDMA2 Stream 0 Source Configuration register */
758#define MDMA2_S0_NEXT_DESC_PTR 0xFFC00F40 /*MemDMA2 Stream 0 Source Next Descriptor Ptr Reg */
759#define MDMA2_S0_START_ADDR 0xFFC00F44 /*MemDMA2 Stream 0 Source Start Address */
760#define MDMA2_S0_X_COUNT 0xFFC00F50 /*MemDMA2 Stream 0 Source Inner-Loop Count register */
761#define MDMA2_S0_Y_COUNT 0xFFC00F58 /*MemDMA2 Stream 0 Source Outer-Loop Count register */
762#define MDMA2_S0_X_MODIFY 0xFFC00F54 /*MemDMA2 Stream 0 Src Inner-Loop Addr-Increment reg */
763#define MDMA2_S0_Y_MODIFY 0xFFC00F5C /*MemDMA2 Stream 0 Src Outer-Loop Addr-Increment reg */
764#define MDMA2_S0_CURR_DESC_PTR 0xFFC00F60 /*MemDMA2 Stream 0 Source Current Descriptor Ptr reg */
765#define MDMA2_S0_CURR_ADDR 0xFFC00F64 /*MemDMA2 Stream 0 Source Current Address */
766#define MDMA2_S0_CURR_X_COUNT 0xFFC00F70 /*MemDMA2 Stream 0 Src Current Inner-Loop Count reg */
767#define MDMA2_S0_CURR_Y_COUNT 0xFFC00F78 /*MemDMA2 Stream 0 Src Current Outer-Loop Count reg */
768#define MDMA2_S0_IRQ_STATUS 0xFFC00F68 /*MemDMA2 Stream 0 Source Interrupt/Status Register */
769#define MDMA2_S0_PERIPHERAL_MAP 0xFFC00F6C /*MemDMA2 Stream 0 Source Peripheral Map register */
770
771#define MDMA2_D1_CONFIG 0xFFC00F88 /*MemDMA2 Stream 1 Destination Configuration register */
772#define MDMA2_D1_NEXT_DESC_PTR 0xFFC00F80 /*MemDMA2 Stream 1 Destination Next Descriptor Ptr Reg */
773#define MDMA2_D1_START_ADDR 0xFFC00F84 /*MemDMA2 Stream 1 Destination Start Address */
774#define MDMA2_D1_X_COUNT 0xFFC00F90 /*MemDMA2 Stream 1 Dest Inner-Loop Count register */
775#define MDMA2_D1_Y_COUNT 0xFFC00F98 /*MemDMA2 Stream 1 Dest Outer-Loop Count register */
776#define MDMA2_D1_X_MODIFY 0xFFC00F94 /*MemDMA2 Stream 1 Dest Inner-Loop Address-Increment */
777#define MDMA2_D1_Y_MODIFY 0xFFC00F9C /*MemDMA2 Stream 1 Dest Outer-Loop Address-Increment */
778#define MDMA2_D1_CURR_DESC_PTR 0xFFC00FA0 /*MemDMA2 Stream 1 Destination Current Descriptor Ptr */
779#define MDMA2_D1_CURR_ADDR 0xFFC00FA4 /*MemDMA2 Stream 1 Destination Current Address reg */
780#define MDMA2_D1_CURR_X_COUNT 0xFFC00FB0 /*MemDMA2 Stream 1 Dest Current Inner-Loop Count reg */
781#define MDMA2_D1_CURR_Y_COUNT 0xFFC00FB8 /*MemDMA2 Stream 1 Dest Current Outer-Loop Count reg */
782#define MDMA2_D1_IRQ_STATUS 0xFFC00FA8 /*MemDMA2 Stream 1 Destination Interrupt/Status Reg */
783#define MDMA2_D1_PERIPHERAL_MAP 0xFFC00FAC /*MemDMA2 Stream 1 Destination Peripheral Map register */
784
785#define MDMA2_S1_CONFIG 0xFFC00FC8 /*MemDMA2 Stream 1 Source Configuration register */
786#define MDMA2_S1_NEXT_DESC_PTR 0xFFC00FC0 /*MemDMA2 Stream 1 Source Next Descriptor Ptr Reg */
787#define MDMA2_S1_START_ADDR 0xFFC00FC4 /*MemDMA2 Stream 1 Source Start Address */
788#define MDMA2_S1_X_COUNT 0xFFC00FD0 /*MemDMA2 Stream 1 Source Inner-Loop Count register */
789#define MDMA2_S1_Y_COUNT 0xFFC00FD8 /*MemDMA2 Stream 1 Source Outer-Loop Count register */
790#define MDMA2_S1_X_MODIFY 0xFFC00FD4 /*MemDMA2 Stream 1 Src Inner-Loop Address-Increment */
791#define MDMA2_S1_Y_MODIFY 0xFFC00FDC /*MemDMA2 Stream 1 Source Outer-Loop Address-Increment */
792#define MDMA2_S1_CURR_DESC_PTR 0xFFC00FE0 /*MemDMA2 Stream 1 Source Current Descriptor Ptr reg */
793#define MDMA2_S1_CURR_ADDR 0xFFC00FE4 /*MemDMA2 Stream 1 Source Current Address */
794#define MDMA2_S1_CURR_X_COUNT 0xFFC00FF0 /*MemDMA2 Stream 1 Source Current Inner-Loop Count */
795#define MDMA2_S1_CURR_Y_COUNT 0xFFC00FF8 /*MemDMA2 Stream 1 Source Current Outer-Loop Count */
796#define MDMA2_S1_IRQ_STATUS 0xFFC00FE8 /*MemDMA2 Stream 1 Source Interrupt/Status Register */
797#define MDMA2_S1_PERIPHERAL_MAP 0xFFC00FEC /*MemDMA2 Stream 1 Source Peripheral Map register */
798
799/* Internal Memory DMA Registers (0xFFC0_1800 - 0xFFC0_19FF) */
800#define IMDMA_D0_CONFIG 0xFFC01808 /*IMDMA Stream 0 Destination Configuration */
801#define IMDMA_D0_NEXT_DESC_PTR 0xFFC01800 /*IMDMA Stream 0 Destination Next Descriptor Ptr Reg */
802#define IMDMA_D0_START_ADDR 0xFFC01804 /*IMDMA Stream 0 Destination Start Address */
803#define IMDMA_D0_X_COUNT 0xFFC01810 /*IMDMA Stream 0 Destination Inner-Loop Count */
804#define IMDMA_D0_Y_COUNT 0xFFC01818 /*IMDMA Stream 0 Destination Outer-Loop Count */
805#define IMDMA_D0_X_MODIFY 0xFFC01814 /*IMDMA Stream 0 Dest Inner-Loop Address-Increment */
806#define IMDMA_D0_Y_MODIFY 0xFFC0181C /*IMDMA Stream 0 Dest Outer-Loop Address-Increment */
807#define IMDMA_D0_CURR_DESC_PTR 0xFFC01820 /*IMDMA Stream 0 Destination Current Descriptor Ptr */
808#define IMDMA_D0_CURR_ADDR 0xFFC01824 /*IMDMA Stream 0 Destination Current Address */
809#define IMDMA_D0_CURR_X_COUNT 0xFFC01830 /*IMDMA Stream 0 Destination Current Inner-Loop Count */
810#define IMDMA_D0_CURR_Y_COUNT 0xFFC01838 /*IMDMA Stream 0 Destination Current Outer-Loop Count */
811#define IMDMA_D0_IRQ_STATUS 0xFFC01828 /*IMDMA Stream 0 Destination Interrupt/Status */
812
813#define IMDMA_S0_CONFIG 0xFFC01848 /*IMDMA Stream 0 Source Configuration */
814#define IMDMA_S0_NEXT_DESC_PTR 0xFFC01840 /*IMDMA Stream 0 Source Next Descriptor Ptr Reg */
815#define IMDMA_S0_START_ADDR 0xFFC01844 /*IMDMA Stream 0 Source Start Address */
816#define IMDMA_S0_X_COUNT 0xFFC01850 /*IMDMA Stream 0 Source Inner-Loop Count */
817#define IMDMA_S0_Y_COUNT 0xFFC01858 /*IMDMA Stream 0 Source Outer-Loop Count */
818#define IMDMA_S0_X_MODIFY 0xFFC01854 /*IMDMA Stream 0 Source Inner-Loop Address-Increment */
819#define IMDMA_S0_Y_MODIFY 0xFFC0185C /*IMDMA Stream 0 Source Outer-Loop Address-Increment */
820#define IMDMA_S0_CURR_DESC_PTR 0xFFC01860 /*IMDMA Stream 0 Source Current Descriptor Ptr reg */
821#define IMDMA_S0_CURR_ADDR 0xFFC01864 /*IMDMA Stream 0 Source Current Address */
822#define IMDMA_S0_CURR_X_COUNT 0xFFC01870 /*IMDMA Stream 0 Source Current Inner-Loop Count */
823#define IMDMA_S0_CURR_Y_COUNT 0xFFC01878 /*IMDMA Stream 0 Source Current Outer-Loop Count */
824#define IMDMA_S0_IRQ_STATUS 0xFFC01868 /*IMDMA Stream 0 Source Interrupt/Status */
825
826#define IMDMA_D1_CONFIG 0xFFC01888 /*IMDMA Stream 1 Destination Configuration */
827#define IMDMA_D1_NEXT_DESC_PTR 0xFFC01880 /*IMDMA Stream 1 Destination Next Descriptor Ptr Reg */
828#define IMDMA_D1_START_ADDR 0xFFC01884 /*IMDMA Stream 1 Destination Start Address */
829#define IMDMA_D1_X_COUNT 0xFFC01890 /*IMDMA Stream 1 Destination Inner-Loop Count */
830#define IMDMA_D1_Y_COUNT 0xFFC01898 /*IMDMA Stream 1 Destination Outer-Loop Count */
831#define IMDMA_D1_X_MODIFY 0xFFC01894 /*IMDMA Stream 1 Dest Inner-Loop Address-Increment */
832#define IMDMA_D1_Y_MODIFY 0xFFC0189C /*IMDMA Stream 1 Dest Outer-Loop Address-Increment */
833#define IMDMA_D1_CURR_DESC_PTR 0xFFC018A0 /*IMDMA Stream 1 Destination Current Descriptor Ptr */
834#define IMDMA_D1_CURR_ADDR 0xFFC018A4 /*IMDMA Stream 1 Destination Current Address */
835#define IMDMA_D1_CURR_X_COUNT 0xFFC018B0 /*IMDMA Stream 1 Destination Current Inner-Loop Count */
836#define IMDMA_D1_CURR_Y_COUNT 0xFFC018B8 /*IMDMA Stream 1 Destination Current Outer-Loop Count */
837#define IMDMA_D1_IRQ_STATUS 0xFFC018A8 /*IMDMA Stream 1 Destination Interrupt/Status */
838
839#define IMDMA_S1_CONFIG 0xFFC018C8 /*IMDMA Stream 1 Source Configuration */
840#define IMDMA_S1_NEXT_DESC_PTR 0xFFC018C0 /*IMDMA Stream 1 Source Next Descriptor Ptr Reg */
841#define IMDMA_S1_START_ADDR 0xFFC018C4 /*IMDMA Stream 1 Source Start Address */
842#define IMDMA_S1_X_COUNT 0xFFC018D0 /*IMDMA Stream 1 Source Inner-Loop Count */
843#define IMDMA_S1_Y_COUNT 0xFFC018D8 /*IMDMA Stream 1 Source Outer-Loop Count */
844#define IMDMA_S1_X_MODIFY 0xFFC018D4 /*IMDMA Stream 1 Source Inner-Loop Address-Increment */
845#define IMDMA_S1_Y_MODIFY 0xFFC018DC /*IMDMA Stream 1 Source Outer-Loop Address-Increment */
846#define IMDMA_S1_CURR_DESC_PTR 0xFFC018E0 /*IMDMA Stream 1 Source Current Descriptor Ptr reg */
847#define IMDMA_S1_CURR_ADDR 0xFFC018E4 /*IMDMA Stream 1 Source Current Address */
848#define IMDMA_S1_CURR_X_COUNT 0xFFC018F0 /*IMDMA Stream 1 Source Current Inner-Loop Count */
849#define IMDMA_S1_CURR_Y_COUNT 0xFFC018F8 /*IMDMA Stream 1 Source Current Outer-Loop Count */
850#define IMDMA_S1_IRQ_STATUS 0xFFC018E8 /*IMDMA Stream 1 Source Interrupt/Status */
851
852/*********************************************************************************** */
853/* System MMR Register Bits */
854/******************************************************************************* */
855
856/* ********************* PLL AND RESET MASKS ************************ */
857
858/* PLL_CTL Masks */
859#define PLL_CLKIN 0x00000000 /* Pass CLKIN to PLL */
860#define PLL_CLKIN_DIV2 0x00000001 /* Pass CLKIN/2 to PLL */
861#define PLL_OFF 0x00000002 /* Shut off PLL clocks */
862#define STOPCK_OFF 0x00000008 /* Core clock off */
863#define PDWN 0x00000020 /* Put the PLL in a Deep Sleep state */
864#define BYPASS 0x00000100 /* Bypass the PLL */
865
866/* CHIPID Masks */
867#define CHIPID_VERSION 0xF0000000
868#define CHIPID_FAMILY 0x0FFFF000
869#define CHIPID_MANUFACTURE 0x00000FFE
870
871/* VR_CTL Masks */
872#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
873#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
874#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
875#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
876#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
877
878#define GAIN 0x000C /* Voltage Level Gain */
879#define GAIN_5 0x0000 /* GAIN = 5*/
880#define GAIN_10 0x0004 /* GAIN = 1*/
881#define GAIN_20 0x0008 /* GAIN = 2*/
882#define GAIN_50 0x000C /* GAIN = 5*/
883
884#define VLEV 0x00F0 /* Internal Voltage Level */
885#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
886#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
887#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
888#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
889#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
890#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
891#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
892#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
893#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
894#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
895
896#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
897#define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */
898
899/* PLL_DIV Masks */
900#define SCLK_DIV(x) (x) /* SCLK = VCO / x */
901
902#define CSEL 0x30 /* Core Select */
903#define SSEL 0xf /* System Select */
904#define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */
905#define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */
906#define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */
907#define CCLK_DIV8 0x00000030 /* CCLK = VCO / 8 */
908
909/* PLL_STAT Masks */
910#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
911#define FULL_ON 0x0002 /* Processor In Full On Mode */
912#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
913#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
914
915/* SWRST Mask */
916#define SYSTEM_RESET 0x0007 /* Initiates a system software reset */
917#define DOUBLE_FAULT_A 0x0008 /* Core A Double Fault Causes Reset */
918#define DOUBLE_FAULT_B 0x0010 /* Core B Double Fault Causes Reset */
919#define SWRST_DBL_FAULT_A 0x0800 /* SWRST Core A Double Fault */
920#define SWRST_DBL_FAULT_B 0x1000 /* SWRST Core B Double Fault */
921#define SWRST_WDT_B 0x2000 /* SWRST Watchdog B */
922#define SWRST_WDT_A 0x4000 /* SWRST Watchdog A */
923#define SWRST_OCCURRED 0x8000 /* SWRST Status */
924
925/* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */
926
927/* SICu_IARv Masks */
928/* u = A or B */
929/* v = 0 to 7 */
930/* w = 0 or 1 */
931
932/* Per_number = 0 to 63 */
933/* IVG_number = 7 to 15 */
934#define Peripheral_IVG(Per_number, IVG_number) \
935 ((IVG_number) - 7) << (((Per_number) % 8) * 4) /* Peripheral #Per_number assigned IVG #IVG_number */
936 /* Usage: r0.l = lo(Peripheral_IVG(62, 10)); */
937 /* r0.h = hi(Peripheral_IVG(62, 10)); */
938
939/* SICx_IMASKw Masks */
940/* masks are 32 bit wide, so two writes reguired for "64 bit" wide registers */
941#define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
942#define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
943#define SIC_MASK(x) (1 << (x)) /* Mask Peripheral #x interrupt */
944#define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << (x))) /* Unmask Peripheral #x interrupt */
945
946/* SIC_IWR Masks */
947#define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
948#define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
949/* x = pos 0 to 31, for 32-63 use value-32 */
950#define IWR_ENABLE(x) (1 << (x)) /* Wakeup Enable Peripheral #x */
951#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << (x))) /* Wakeup Disable Peripheral #x */
952
953/* ***************************** UART CONTROLLER MASKS ********************** */
954
955/* UART_LCR Register */
956
957#define DLAB 0x80
958#define SB 0x40
959#define STP 0x20
960#define EPS 0x10
961#define PEN 0x08
962#define STB 0x04
963#define WLS(x) ((x-5) & 0x03)
964
965#define DLAB_P 0x07
966#define SB_P 0x06
967#define STP_P 0x05
968#define EPS_P 0x04
969#define PEN_P 0x03
970#define STB_P 0x02
971#define WLS_P1 0x01
972#define WLS_P0 0x00
973
974/* UART_MCR Register */
975#define LOOP_ENA 0x10
976#define LOOP_ENA_P 0x04
977
978/* UART_LSR Register */
979#define TEMT 0x40
980#define THRE 0x20
981#define BI 0x10
982#define FE 0x08
983#define PE 0x04
984#define OE 0x02
985#define DR 0x01
986
987#define TEMP_P 0x06
988#define THRE_P 0x05
989#define BI_P 0x04
990#define FE_P 0x03
991#define PE_P 0x02
992#define OE_P 0x01
993#define DR_P 0x00
994
995/* UART_IER Register */
996#define ELSI 0x04
997#define ETBEI 0x02
998#define ERBFI 0x01
999
1000#define ELSI_P 0x02
1001#define ETBEI_P 0x01
1002#define ERBFI_P 0x00
1003
1004/* UART_IIR Register */
1005#define STATUS(x) ((x << 1) & 0x06)
1006#define NINT 0x01
1007#define STATUS_P1 0x02
1008#define STATUS_P0 0x01
1009#define NINT_P 0x00
1010#define IIR_TX_READY 0x02 /* UART_THR empty */
1011#define IIR_RX_READY 0x04 /* Receive data ready */
1012#define IIR_LINE_CHANGE 0x06 /* Receive line status */
1013#define IIR_STATUS 0x06
1014
1015/* UART_GCTL Register */
1016#define FFE 0x20
1017#define FPE 0x10
1018#define RPOLC 0x08
1019#define TPOLC 0x04
1020#define IREN 0x02
1021#define UCEN 0x01
1022
1023#define FFE_P 0x05
1024#define FPE_P 0x04
1025#define RPOLC_P 0x03
1026#define TPOLC_P 0x02
1027#define IREN_P 0x01
1028#define UCEN_P 0x00
1029
1030/* ********** SERIAL PORT MASKS ********************** */
1031
1032/* SPORTx_TCR1 Masks */
1033#define TSPEN 0x0001 /* TX enable */
1034#define ITCLK 0x0002 /* Internal TX Clock Select */
1035#define TDTYPE 0x000C /* TX Data Formatting Select */
1036#define TLSBIT 0x0010 /* TX Bit Order */
1037#define ITFS 0x0200 /* Internal TX Frame Sync Select */
1038#define TFSR 0x0400 /* TX Frame Sync Required Select */
1039#define DITFS 0x0800 /* Data Independent TX Frame Sync Select */
1040#define LTFS 0x1000 /* Low TX Frame Sync Select */
1041#define LATFS 0x2000 /* Late TX Frame Sync Select */
1042#define TCKFE 0x4000 /* TX Clock Falling Edge Select */
1043
1044/* SPORTx_TCR2 Masks */
1045#define SLEN 0x001F /*TX Word Length */
1046#define TXSE 0x0100 /*TX Secondary Enable */
1047#define TSFSE 0x0200 /*TX Stereo Frame Sync Enable */
1048#define TRFST 0x0400 /*TX Right-First Data Order */
1049
1050/* SPORTx_RCR1 Masks */
1051#define RSPEN 0x0001 /* RX enable */
1052#define IRCLK 0x0002 /* Internal RX Clock Select */
1053#define RDTYPE 0x000C /* RX Data Formatting Select */
1054#define RULAW 0x0008 /* u-Law enable */
1055#define RALAW 0x000C /* A-Law enable */
1056#define RLSBIT 0x0010 /* RX Bit Order */
1057#define IRFS 0x0200 /* Internal RX Frame Sync Select */
1058#define RFSR 0x0400 /* RX Frame Sync Required Select */
1059#define LRFS 0x1000 /* Low RX Frame Sync Select */
1060#define LARFS 0x2000 /* Late RX Frame Sync Select */
1061#define RCKFE 0x4000 /* RX Clock Falling Edge Select */
1062
1063/* SPORTx_RCR2 Masks */
1064#define SLEN 0x001F /*RX Word Length */
1065#define RXSE 0x0100 /*RX Secondary Enable */
1066#define RSFSE 0x0200 /*RX Stereo Frame Sync Enable */
1067#define RRFST 0x0400 /*Right-First Data Order */
1068
1069/*SPORTx_STAT Masks */
1070#define RXNE 0x0001 /*RX FIFO Not Empty Status */
1071#define RUVF 0x0002 /*RX Underflow Status */
1072#define ROVF 0x0004 /*RX Overflow Status */
1073#define TXF 0x0008 /*TX FIFO Full Status */
1074#define TUVF 0x0010 /*TX Underflow Status */
1075#define TOVF 0x0020 /*TX Overflow Status */
1076#define TXHRE 0x0040 /*TX Hold Register Empty */
1077
1078/*SPORTx_MCMC1 Masks */
1079#define SP_WSIZE 0x0000F000 /*Multichannel Window Size Field */
1080#define SP_WOFF 0x000003FF /*Multichannel Window Offset Field */
1081
1082/*SPORTx_MCMC2 Masks */
1083#define MCCRM 0x00000003 /*Multichannel Clock Recovery Mode */
1084#define MCDTXPE 0x00000004 /*Multichannel DMA Transmit Packing */
1085#define MCDRXPE 0x00000008 /*Multichannel DMA Receive Packing */
1086#define MCMEN 0x00000010 /*Multichannel Frame Mode Enable */
1087#define FSDR 0x00000080 /*Multichannel Frame Sync to Data Relationship */
1088#define MFD 0x0000F000 /*Multichannel Frame Delay */
1089
1090/* ********* PARALLEL PERIPHERAL INTERFACE (PPI) MASKS **************** */
1091
1092/* PPI_CONTROL Masks */
1093#define PORT_EN 0x00000001 /* PPI Port Enable */
1094#define PORT_DIR 0x00000002 /* PPI Port Direction */
1095#define XFR_TYPE 0x0000000C /* PPI Transfer Type */
1096#define PORT_CFG 0x00000030 /* PPI Port Configuration */
1097#define FLD_SEL 0x00000040 /* PPI Active Field Select */
1098#define PACK_EN 0x00000080 /* PPI Packing Mode */
1099#define DMA32 0x00000100 /* PPI 32-bit DMA Enable */
1100#define SKIP_EN 0x00000200 /* PPI Skip Element Enable */
1101#define SKIP_EO 0x00000400 /* PPI Skip Even/Odd Elements */
1102#define DLENGTH 0x00003800 /* PPI Data Length */
1103#define DLEN_8 0x0 /* PPI Data Length mask for DLEN=8 */
1104#define DLEN(x) (((x-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */
1105#define POL 0x0000C000 /* PPI Signal Polarities */
1106
1107/* PPI_STATUS Masks */
1108#define FLD 0x00000400 /* Field Indicator */
1109#define FT_ERR 0x00000800 /* Frame Track Error */
1110#define OVR 0x00001000 /* FIFO Overflow Error */
1111#define UNDR 0x00002000 /* FIFO Underrun Error */
1112#define ERR_DET 0x00004000 /* Error Detected Indicator */
1113#define ERR_NCOR 0x00008000 /* Error Not Corrected Indicator */
1114
1115/* ********** DMA CONTROLLER MASKS *********************8 */
1116
1117/* DMAx_CONFIG, MDMA_yy_CONFIG, IMDMA_yy_CONFIG Masks */
1118#define DMAEN 0x00000001 /* Channel Enable */
1119#define WNR 0x00000002 /* Channel Direction (W/R*) */
1120#define WDSIZE_8 0x00000000 /* Word Size 8 bits */
1121#define WDSIZE_16 0x00000004 /* Word Size 16 bits */
1122#define WDSIZE_32 0x00000008 /* Word Size 32 bits */
1123#define DMA2D 0x00000010 /* 2D/1D* Mode */
1124#define RESTART 0x00000020 /* Restart */
1125#define DI_SEL 0x00000040 /* Data Interrupt Select */
1126#define DI_EN 0x00000080 /* Data Interrupt Enable */
1127#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1128#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1129#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1130#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1131#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1132#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1133#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1134#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1135#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1136#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1137#define NDSIZE 0x00000900 /* Next Descriptor Size */
1138#define DMAFLOW 0x00007000 /* Flow Control */
1139#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1140#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1141#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1142#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1143#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1144
1145#define DMAEN_P 0 /* Channel Enable */
1146#define WNR_P 1 /* Channel Direction (W/R*) */
1147#define DMA2D_P 4 /* 2D/1D* Mode */
1148#define RESTART_P 5 /* Restart */
1149#define DI_SEL_P 6 /* Data Interrupt Select */
1150#define DI_EN_P 7 /* Data Interrupt Enable */
1151
1152/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS, IMDMA_yy_IRQ_STATUS Masks */
1153
1154#define DMA_DONE 0x00000001 /* DMA Done Indicator */
1155#define DMA_ERR 0x00000002 /* DMA Error Indicator */
1156#define DFETCH 0x00000004 /* Descriptor Fetch Indicator */
1157#define DMA_RUN 0x00000008 /* DMA Running Indicator */
1158
1159#define DMA_DONE_P 0 /* DMA Done Indicator */
1160#define DMA_ERR_P 1 /* DMA Error Indicator */
1161#define DFETCH_P 2 /* Descriptor Fetch Indicator */
1162#define DMA_RUN_P 3 /* DMA Running Indicator */
1163
1164/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP, IMDMA_yy_PERIPHERAL_MAP Masks */
1165
1166#define CTYPE 0x00000040 /* DMA Channel Type Indicator */
1167#define CTYPE_P 6 /* DMA Channel Type Indicator BIT POSITION */
1168#define PCAP8 0x00000080 /* DMA 8-bit Operation Indicator */
1169#define PCAP16 0x00000100 /* DMA 16-bit Operation Indicator */
1170#define PCAP32 0x00000200 /* DMA 32-bit Operation Indicator */
1171#define PCAPWR 0x00000400 /* DMA Write Operation Indicator */
1172#define PCAPRD 0x00000800 /* DMA Read Operation Indicator */
1173#define PMAP 0x00007000 /* DMA Peripheral Map Field */
1174
1175/* ************* GENERAL PURPOSE TIMER MASKS ******************** */
1176
1177/* PWM Timer bit definitions */
1178
1179/* TIMER_ENABLE Register */
1180#define TIMEN0 0x0001
1181#define TIMEN1 0x0002
1182#define TIMEN2 0x0004
1183#define TIMEN3 0x0008
1184#define TIMEN4 0x0010
1185#define TIMEN5 0x0020
1186#define TIMEN6 0x0040
1187#define TIMEN7 0x0080
1188#define TIMEN8 0x0001
1189#define TIMEN9 0x0002
1190#define TIMEN10 0x0004
1191#define TIMEN11 0x0008
1192
1193#define TIMEN0_P 0x00
1194#define TIMEN1_P 0x01
1195#define TIMEN2_P 0x02
1196#define TIMEN3_P 0x03
1197#define TIMEN4_P 0x04
1198#define TIMEN5_P 0x05
1199#define TIMEN6_P 0x06
1200#define TIMEN7_P 0x07
1201#define TIMEN8_P 0x00
1202#define TIMEN9_P 0x01
1203#define TIMEN10_P 0x02
1204#define TIMEN11_P 0x03
1205
1206/* TIMER_DISABLE Register */
1207#define TIMDIS0 0x0001
1208#define TIMDIS1 0x0002
1209#define TIMDIS2 0x0004
1210#define TIMDIS3 0x0008
1211#define TIMDIS4 0x0010
1212#define TIMDIS5 0x0020
1213#define TIMDIS6 0x0040
1214#define TIMDIS7 0x0080
1215#define TIMDIS8 0x0001
1216#define TIMDIS9 0x0002
1217#define TIMDIS10 0x0004
1218#define TIMDIS11 0x0008
1219
1220#define TIMDIS0_P 0x00
1221#define TIMDIS1_P 0x01
1222#define TIMDIS2_P 0x02
1223#define TIMDIS3_P 0x03
1224#define TIMDIS4_P 0x04
1225#define TIMDIS5_P 0x05
1226#define TIMDIS6_P 0x06
1227#define TIMDIS7_P 0x07
1228#define TIMDIS8_P 0x00
1229#define TIMDIS9_P 0x01
1230#define TIMDIS10_P 0x02
1231#define TIMDIS11_P 0x03
1232
1233/* TIMER_STATUS Register */
1234#define TIMIL0 0x00000001
1235#define TIMIL1 0x00000002
1236#define TIMIL2 0x00000004
1237#define TIMIL3 0x00000008
1238#define TIMIL4 0x00010000
1239#define TIMIL5 0x00020000
1240#define TIMIL6 0x00040000
1241#define TIMIL7 0x00080000
1242#define TIMIL8 0x0001
1243#define TIMIL9 0x0002
1244#define TIMIL10 0x0004
1245#define TIMIL11 0x0008
1246#define TOVF_ERR0 0x00000010
1247#define TOVF_ERR1 0x00000020
1248#define TOVF_ERR2 0x00000040
1249#define TOVF_ERR3 0x00000080
1250#define TOVF_ERR4 0x00100000
1251#define TOVF_ERR5 0x00200000
1252#define TOVF_ERR6 0x00400000
1253#define TOVF_ERR7 0x00800000
1254#define TOVF_ERR8 0x0010
1255#define TOVF_ERR9 0x0020
1256#define TOVF_ERR10 0x0040
1257#define TOVF_ERR11 0x0080
1258#define TRUN0 0x00001000
1259#define TRUN1 0x00002000
1260#define TRUN2 0x00004000
1261#define TRUN3 0x00008000
1262#define TRUN4 0x10000000
1263#define TRUN5 0x20000000
1264#define TRUN6 0x40000000
1265#define TRUN7 0x80000000
1266#define TRUN8 0x1000
1267#define TRUN9 0x2000
1268#define TRUN10 0x4000
1269#define TRUN11 0x8000
1270
1271#define TIMIL0_P 0x00
1272#define TIMIL1_P 0x01
1273#define TIMIL2_P 0x02
1274#define TIMIL3_P 0x03
1275#define TIMIL4_P 0x10
1276#define TIMIL5_P 0x11
1277#define TIMIL6_P 0x12
1278#define TIMIL7_P 0x13
1279#define TIMIL8_P 0x00
1280#define TIMIL9_P 0x01
1281#define TIMIL10_P 0x02
1282#define TIMIL11_P 0x03
1283#define TOVF_ERR0_P 0x04
1284#define TOVF_ERR1_P 0x05
1285#define TOVF_ERR2_P 0x06
1286#define TOVF_ERR3_P 0x07
1287#define TOVF_ERR4_P 0x14
1288#define TOVF_ERR5_P 0x15
1289#define TOVF_ERR6_P 0x16
1290#define TOVF_ERR7_P 0x17
1291#define TOVF_ERR8_P 0x04
1292#define TOVF_ERR9_P 0x05
1293#define TOVF_ERR10_P 0x06
1294#define TOVF_ERR11_P 0x07
1295#define TRUN0_P 0x0C
1296#define TRUN1_P 0x0D
1297#define TRUN2_P 0x0E
1298#define TRUN3_P 0x0F
1299#define TRUN4_P 0x1C
1300#define TRUN5_P 0x1D
1301#define TRUN6_P 0x1E
1302#define TRUN7_P 0x1F
1303#define TRUN8_P 0x0C
1304#define TRUN9_P 0x0D
1305#define TRUN10_P 0x0E
1306#define TRUN11_P 0x0F
1307
1308/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
1309#define TOVL_ERR0 TOVF_ERR0
1310#define TOVL_ERR1 TOVF_ERR1
1311#define TOVL_ERR2 TOVF_ERR2
1312#define TOVL_ERR3 TOVF_ERR3
1313#define TOVL_ERR4 TOVF_ERR4
1314#define TOVL_ERR5 TOVF_ERR5
1315#define TOVL_ERR6 TOVF_ERR6
1316#define TOVL_ERR7 TOVF_ERR7
1317#define TOVL_ERR8 TOVF_ERR8
1318#define TOVL_ERR9 TOVF_ERR9
1319#define TOVL_ERR10 TOVF_ERR10
1320#define TOVL_ERR11 TOVF_ERR11
1321#define TOVL_ERR0_P TOVF_ERR0_P
1322#define TOVL_ERR1_P TOVF_ERR1_P
1323#define TOVL_ERR2_P TOVF_ERR2_P
1324#define TOVL_ERR3_P TOVF_ERR3_P
1325#define TOVL_ERR4_P TOVF_ERR4_P
1326#define TOVL_ERR5_P TOVF_ERR5_P
1327#define TOVL_ERR6_P TOVF_ERR6_P
1328#define TOVL_ERR7_P TOVF_ERR7_P
1329#define TOVL_ERR8_P TOVF_ERR8_P
1330#define TOVL_ERR9_P TOVF_ERR9_P
1331#define TOVL_ERR10_P TOVF_ERR10_P
1332#define TOVL_ERR11_P TOVF_ERR11_P
1333
1334/* TIMERx_CONFIG Registers */
1335#define PWM_OUT 0x0001
1336#define WDTH_CAP 0x0002
1337#define EXT_CLK 0x0003
1338#define PULSE_HI 0x0004
1339#define PERIOD_CNT 0x0008
1340#define IRQ_ENA 0x0010
1341#define TIN_SEL 0x0020
1342#define OUT_DIS 0x0040
1343#define CLK_SEL 0x0080
1344#define TOGGLE_HI 0x0100
1345#define EMU_RUN 0x0200
1346#define ERR_TYP(x) ((x & 0x03) << 14)
1347
1348#define TMODE_P0 0x00
1349#define TMODE_P1 0x01
1350#define PULSE_HI_P 0x02
1351#define PERIOD_CNT_P 0x03
1352#define IRQ_ENA_P 0x04
1353#define TIN_SEL_P 0x05
1354#define OUT_DIS_P 0x06
1355#define CLK_SEL_P 0x07
1356#define TOGGLE_HI_P 0x08
1357#define EMU_RUN_P 0x09
1358#define ERR_TYP_P0 0x0E
1359#define ERR_TYP_P1 0x0F
1360
1361/*/ ****************** PROGRAMMABLE FLAG MASKS ********************* */
1362
1363/* General Purpose IO (0xFFC00700 - 0xFFC007FF) Masks */
1364#define PF0 0x0001
1365#define PF1 0x0002
1366#define PF2 0x0004
1367#define PF3 0x0008
1368#define PF4 0x0010
1369#define PF5 0x0020
1370#define PF6 0x0040
1371#define PF7 0x0080
1372#define PF8 0x0100
1373#define PF9 0x0200
1374#define PF10 0x0400
1375#define PF11 0x0800
1376#define PF12 0x1000
1377#define PF13 0x2000
1378#define PF14 0x4000
1379#define PF15 0x8000
1380
1381/* General Purpose IO (0xFFC00700 - 0xFFC007FF) BIT POSITIONS */
1382#define PF0_P 0
1383#define PF1_P 1
1384#define PF2_P 2
1385#define PF3_P 3
1386#define PF4_P 4
1387#define PF5_P 5
1388#define PF6_P 6
1389#define PF7_P 7
1390#define PF8_P 8
1391#define PF9_P 9
1392#define PF10_P 10
1393#define PF11_P 11
1394#define PF12_P 12
1395#define PF13_P 13
1396#define PF14_P 14
1397#define PF15_P 15
1398
1399/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS **************** */
1400
1401/* SPI_CTL Masks */
1402#define TIMOD 0x00000003 /* Transfer initiation mode and interrupt generation */
1403#define SZ 0x00000004 /* Send Zero (=0) or last (=1) word when TDBR empty. */
1404#define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */
1405#define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */
1406#define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */
1407#define SIZE 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */
1408#define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */
1409#define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */
1410#define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */
1411#define MSTR 0x00001000 /* Configures SPI as master (=1) or slave (=0) */
1412#define WOM 0x00002000 /* Open drain (=1) data output enable (for MOSI and MISO) */
1413#define SPE 0x00004000 /* SPI module enable (=1), disable (=0) */
1414
1415/* SPI_FLG Masks */
1416#define FLS1 0x00000002 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
1417#define FLS2 0x00000004 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
1418#define FLS3 0x00000008 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
1419#define FLS4 0x00000010 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
1420#define FLS5 0x00000020 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
1421#define FLS6 0x00000040 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
1422#define FLS7 0x00000080 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
1423#define FLG1 0x00000200 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
1424#define FLG2 0x00000400 /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
1425#define FLG3 0x00000800 /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
1426#define FLG4 0x00001000 /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
1427#define FLG5 0x00002000 /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
1428#define FLG6 0x00004000 /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
1429#define FLG7 0x00008000 /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
1430
1431/* SPI_FLG Bit Positions */
1432#define FLS1_P 0x00000001 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
1433#define FLS2_P 0x00000002 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
1434#define FLS3_P 0x00000003 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
1435#define FLS4_P 0x00000004 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
1436#define FLS5_P 0x00000005 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
1437#define FLS6_P 0x00000006 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
1438#define FLS7_P 0x00000007 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
1439#define FLG1_P 0x00000009 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
1440#define FLG2_P 0x0000000A /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
1441#define FLG3_P 0x0000000B /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
1442#define FLG4_P 0x0000000C /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
1443#define FLG5_P 0x0000000D /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
1444#define FLG6_P 0x0000000E /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
1445#define FLG7_P 0x0000000F /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
1446
1447/* SPI_STAT Masks */
1448#define SPIF 0x00000001 /* Set (=1) when SPI single-word transfer complete */
1449#define MODF 0x00000002 /* Set (=1) in a master device when some other device tries to become master */
1450#define TXE 0x00000004 /* Set (=1) when transmission occurs with no new data in SPI_TDBR */
1451#define TXS 0x00000008 /* SPI_TDBR Data Buffer Status (0=Empty, 1=Full) */
1452#define RBSY 0x00000010 /* Set (=1) when data is received with RDBR full */
1453#define RXS 0x00000020 /* SPI_RDBR Data Buffer Status (0=Empty, 1=Full) */
1454#define TXCOL 0x00000040 /* When set (=1), corrupt data may have been transmitted */
1455
1456/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
1457
1458/* AMGCTL Masks */
1459#define AMCKEN 0x0001 /* Enable CLKOUT */
1460#define AMBEN_B0 0x0002 /* Enable Asynchronous Memory Bank 0 only */
1461#define AMBEN_B0_B1 0x0004 /* Enable Asynchronous Memory Banks 0 & 1 only */
1462#define AMBEN_B0_B1_B2 0x0006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */
1463#define AMBEN_ALL 0x0008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */
1464#define B0_PEN 0x0010 /* Enable 16-bit packing Bank 0 */
1465#define B1_PEN 0x0020 /* Enable 16-bit packing Bank 1 */
1466#define B2_PEN 0x0040 /* Enable 16-bit packing Bank 2 */
1467#define B3_PEN 0x0080 /* Enable 16-bit packing Bank 3 */
1468
1469/* AMGCTL Bit Positions */
1470#define AMCKEN_P 0x00000000 /* Enable CLKOUT */
1471#define AMBEN_P0 0x00000001 /* Asynchronous Memory Enable, 000 - banks 0-3 disabled, 001 - Bank 0 enabled */
1472#define AMBEN_P1 0x00000002 /* Asynchronous Memory Enable, 010 - banks 0&1 enabled, 011 - banks 0-3 enabled */
1473#define AMBEN_P2 0x00000003 /* Asynchronous Memory Enable, 1xx - All banks (bank 0, 1, 2, and 3) enabled */
1474#define B0_PEN_P 0x004 /* Enable 16-bit packing Bank 0 */
1475#define B1_PEN_P 0x005 /* Enable 16-bit packing Bank 1 */
1476#define B2_PEN_P 0x006 /* Enable 16-bit packing Bank 2 */
1477#define B3_PEN_P 0x007 /* Enable 16-bit packing Bank 3 */
1478
1479/* AMBCTL0 Masks */
1480#define B0RDYEN 0x00000001 /* Bank 0 RDY Enable, 0=disable, 1=enable */
1481#define B0RDYPOL 0x00000002 /* Bank 0 RDY Active high, 0=active low, 1=active high */
1482#define B0TT_1 0x00000004 /* Bank 0 Transition Time from Read to Write = 1 cycle */
1483#define B0TT_2 0x00000008 /* Bank 0 Transition Time from Read to Write = 2 cycles */
1484#define B0TT_3 0x0000000C /* Bank 0 Transition Time from Read to Write = 3 cycles */
1485#define B0TT_4 0x00000000 /* Bank 0 Transition Time from Read to Write = 4 cycles */
1486#define B0ST_1 0x00000010 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=1 cycle */
1487#define B0ST_2 0x00000020 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=2 cycles */
1488#define B0ST_3 0x00000030 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=3 cycles */
1489#define B0ST_4 0x00000000 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=4 cycles */
1490#define B0HT_1 0x00000040 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 1 cycle */
1491#define B0HT_2 0x00000080 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 2 cycles */
1492#define B0HT_3 0x000000C0 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 3 cycles */
1493#define B0HT_0 0x00000000 /* Bank 0 Hold Time from Read/Write deasserted to AOE deasserted = 0 cycles */
1494#define B0RAT_1 0x00000100 /* Bank 0 Read Access Time = 1 cycle */
1495#define B0RAT_2 0x00000200 /* Bank 0 Read Access Time = 2 cycles */
1496#define B0RAT_3 0x00000300 /* Bank 0 Read Access Time = 3 cycles */
1497#define B0RAT_4 0x00000400 /* Bank 0 Read Access Time = 4 cycles */
1498#define B0RAT_5 0x00000500 /* Bank 0 Read Access Time = 5 cycles */
1499#define B0RAT_6 0x00000600 /* Bank 0 Read Access Time = 6 cycles */
1500#define B0RAT_7 0x00000700 /* Bank 0 Read Access Time = 7 cycles */
1501#define B0RAT_8 0x00000800 /* Bank 0 Read Access Time = 8 cycles */
1502#define B0RAT_9 0x00000900 /* Bank 0 Read Access Time = 9 cycles */
1503#define B0RAT_10 0x00000A00 /* Bank 0 Read Access Time = 10 cycles */
1504#define B0RAT_11 0x00000B00 /* Bank 0 Read Access Time = 11 cycles */
1505#define B0RAT_12 0x00000C00 /* Bank 0 Read Access Time = 12 cycles */
1506#define B0RAT_13 0x00000D00 /* Bank 0 Read Access Time = 13 cycles */
1507#define B0RAT_14 0x00000E00 /* Bank 0 Read Access Time = 14 cycles */
1508#define B0RAT_15 0x00000F00 /* Bank 0 Read Access Time = 15 cycles */
1509#define B0WAT_1 0x00001000 /* Bank 0 Write Access Time = 1 cycle */
1510#define B0WAT_2 0x00002000 /* Bank 0 Write Access Time = 2 cycles */
1511#define B0WAT_3 0x00003000 /* Bank 0 Write Access Time = 3 cycles */
1512#define B0WAT_4 0x00004000 /* Bank 0 Write Access Time = 4 cycles */
1513#define B0WAT_5 0x00005000 /* Bank 0 Write Access Time = 5 cycles */
1514#define B0WAT_6 0x00006000 /* Bank 0 Write Access Time = 6 cycles */
1515#define B0WAT_7 0x00007000 /* Bank 0 Write Access Time = 7 cycles */
1516#define B0WAT_8 0x00008000 /* Bank 0 Write Access Time = 8 cycles */
1517#define B0WAT_9 0x00009000 /* Bank 0 Write Access Time = 9 cycles */
1518#define B0WAT_10 0x0000A000 /* Bank 0 Write Access Time = 10 cycles */
1519#define B0WAT_11 0x0000B000 /* Bank 0 Write Access Time = 11 cycles */
1520#define B0WAT_12 0x0000C000 /* Bank 0 Write Access Time = 12 cycles */
1521#define B0WAT_13 0x0000D000 /* Bank 0 Write Access Time = 13 cycles */
1522#define B0WAT_14 0x0000E000 /* Bank 0 Write Access Time = 14 cycles */
1523#define B0WAT_15 0x0000F000 /* Bank 0 Write Access Time = 15 cycles */
1524#define B1RDYEN 0x00010000 /* Bank 1 RDY enable, 0=disable, 1=enable */
1525#define B1RDYPOL 0x00020000 /* Bank 1 RDY Active high, 0=active low, 1=active high */
1526#define B1TT_1 0x00040000 /* Bank 1 Transition Time from Read to Write = 1 cycle */
1527#define B1TT_2 0x00080000 /* Bank 1 Transition Time from Read to Write = 2 cycles */
1528#define B1TT_3 0x000C0000 /* Bank 1 Transition Time from Read to Write = 3 cycles */
1529#define B1TT_4 0x00000000 /* Bank 1 Transition Time from Read to Write = 4 cycles */
1530#define B1ST_1 0x00100000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
1531#define B1ST_2 0x00200000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
1532#define B1ST_3 0x00300000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
1533#define B1ST_4 0x00000000 /* Bank 1 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
1534#define B1HT_1 0x00400000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
1535#define B1HT_2 0x00800000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
1536#define B1HT_3 0x00C00000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
1537#define B1HT_0 0x00000000 /* Bank 1 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
1538#define B1RAT_1 0x01000000 /* Bank 1 Read Access Time = 1 cycle */
1539#define B1RAT_2 0x02000000 /* Bank 1 Read Access Time = 2 cycles */
1540#define B1RAT_3 0x03000000 /* Bank 1 Read Access Time = 3 cycles */
1541#define B1RAT_4 0x04000000 /* Bank 1 Read Access Time = 4 cycles */
1542#define B1RAT_5 0x05000000 /* Bank 1 Read Access Time = 5 cycles */
1543#define B1RAT_6 0x06000000 /* Bank 1 Read Access Time = 6 cycles */
1544#define B1RAT_7 0x07000000 /* Bank 1 Read Access Time = 7 cycles */
1545#define B1RAT_8 0x08000000 /* Bank 1 Read Access Time = 8 cycles */
1546#define B1RAT_9 0x09000000 /* Bank 1 Read Access Time = 9 cycles */
1547#define B1RAT_10 0x0A000000 /* Bank 1 Read Access Time = 10 cycles */
1548#define B1RAT_11 0x0B000000 /* Bank 1 Read Access Time = 11 cycles */
1549#define B1RAT_12 0x0C000000 /* Bank 1 Read Access Time = 12 cycles */
1550#define B1RAT_13 0x0D000000 /* Bank 1 Read Access Time = 13 cycles */
1551#define B1RAT_14 0x0E000000 /* Bank 1 Read Access Time = 14 cycles */
1552#define B1RAT_15 0x0F000000 /* Bank 1 Read Access Time = 15 cycles */
1553#define B1WAT_1 0x10000000 /* Bank 1 Write Access Time = 1 cycle */
1554#define B1WAT_2 0x20000000 /* Bank 1 Write Access Time = 2 cycles */
1555#define B1WAT_3 0x30000000 /* Bank 1 Write Access Time = 3 cycles */
1556#define B1WAT_4 0x40000000 /* Bank 1 Write Access Time = 4 cycles */
1557#define B1WAT_5 0x50000000 /* Bank 1 Write Access Time = 5 cycles */
1558#define B1WAT_6 0x60000000 /* Bank 1 Write Access Time = 6 cycles */
1559#define B1WAT_7 0x70000000 /* Bank 1 Write Access Time = 7 cycles */
1560#define B1WAT_8 0x80000000 /* Bank 1 Write Access Time = 8 cycles */
1561#define B1WAT_9 0x90000000 /* Bank 1 Write Access Time = 9 cycles */
1562#define B1WAT_10 0xA0000000 /* Bank 1 Write Access Time = 10 cycles */
1563#define B1WAT_11 0xB0000000 /* Bank 1 Write Access Time = 11 cycles */
1564#define B1WAT_12 0xC0000000 /* Bank 1 Write Access Time = 12 cycles */
1565#define B1WAT_13 0xD0000000 /* Bank 1 Write Access Time = 13 cycles */
1566#define B1WAT_14 0xE0000000 /* Bank 1 Write Access Time = 14 cycles */
1567#define B1WAT_15 0xF0000000 /* Bank 1 Write Access Time = 15 cycles */
1568
1569/* AMBCTL1 Masks */
1570#define B2RDYEN 0x00000001 /* Bank 2 RDY Enable, 0=disable, 1=enable */
1571#define B2RDYPOL 0x00000002 /* Bank 2 RDY Active high, 0=active low, 1=active high */
1572#define B2TT_1 0x00000004 /* Bank 2 Transition Time from Read to Write = 1 cycle */
1573#define B2TT_2 0x00000008 /* Bank 2 Transition Time from Read to Write = 2 cycles */
1574#define B2TT_3 0x0000000C /* Bank 2 Transition Time from Read to Write = 3 cycles */
1575#define B2TT_4 0x00000000 /* Bank 2 Transition Time from Read to Write = 4 cycles */
1576#define B2ST_1 0x00000010 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
1577#define B2ST_2 0x00000020 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
1578#define B2ST_3 0x00000030 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
1579#define B2ST_4 0x00000000 /* Bank 2 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
1580#define B2HT_1 0x00000040 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
1581#define B2HT_2 0x00000080 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
1582#define B2HT_3 0x000000C0 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
1583#define B2HT_0 0x00000000 /* Bank 2 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
1584#define B2RAT_1 0x00000100 /* Bank 2 Read Access Time = 1 cycle */
1585#define B2RAT_2 0x00000200 /* Bank 2 Read Access Time = 2 cycles */
1586#define B2RAT_3 0x00000300 /* Bank 2 Read Access Time = 3 cycles */
1587#define B2RAT_4 0x00000400 /* Bank 2 Read Access Time = 4 cycles */
1588#define B2RAT_5 0x00000500 /* Bank 2 Read Access Time = 5 cycles */
1589#define B2RAT_6 0x00000600 /* Bank 2 Read Access Time = 6 cycles */
1590#define B2RAT_7 0x00000700 /* Bank 2 Read Access Time = 7 cycles */
1591#define B2RAT_8 0x00000800 /* Bank 2 Read Access Time = 8 cycles */
1592#define B2RAT_9 0x00000900 /* Bank 2 Read Access Time = 9 cycles */
1593#define B2RAT_10 0x00000A00 /* Bank 2 Read Access Time = 10 cycles */
1594#define B2RAT_11 0x00000B00 /* Bank 2 Read Access Time = 11 cycles */
1595#define B2RAT_12 0x00000C00 /* Bank 2 Read Access Time = 12 cycles */
1596#define B2RAT_13 0x00000D00 /* Bank 2 Read Access Time = 13 cycles */
1597#define B2RAT_14 0x00000E00 /* Bank 2 Read Access Time = 14 cycles */
1598#define B2RAT_15 0x00000F00 /* Bank 2 Read Access Time = 15 cycles */
1599#define B2WAT_1 0x00001000 /* Bank 2 Write Access Time = 1 cycle */
1600#define B2WAT_2 0x00002000 /* Bank 2 Write Access Time = 2 cycles */
1601#define B2WAT_3 0x00003000 /* Bank 2 Write Access Time = 3 cycles */
1602#define B2WAT_4 0x00004000 /* Bank 2 Write Access Time = 4 cycles */
1603#define B2WAT_5 0x00005000 /* Bank 2 Write Access Time = 5 cycles */
1604#define B2WAT_6 0x00006000 /* Bank 2 Write Access Time = 6 cycles */
1605#define B2WAT_7 0x00007000 /* Bank 2 Write Access Time = 7 cycles */
1606#define B2WAT_8 0x00008000 /* Bank 2 Write Access Time = 8 cycles */
1607#define B2WAT_9 0x00009000 /* Bank 2 Write Access Time = 9 cycles */
1608#define B2WAT_10 0x0000A000 /* Bank 2 Write Access Time = 10 cycles */
1609#define B2WAT_11 0x0000B000 /* Bank 2 Write Access Time = 11 cycles */
1610#define B2WAT_12 0x0000C000 /* Bank 2 Write Access Time = 12 cycles */
1611#define B2WAT_13 0x0000D000 /* Bank 2 Write Access Time = 13 cycles */
1612#define B2WAT_14 0x0000E000 /* Bank 2 Write Access Time = 14 cycles */
1613#define B2WAT_15 0x0000F000 /* Bank 2 Write Access Time = 15 cycles */
1614#define B3RDYEN 0x00010000 /* Bank 3 RDY enable, 0=disable, 1=enable */
1615#define B3RDYPOL 0x00020000 /* Bank 3 RDY Active high, 0=active low, 1=active high */
1616#define B3TT_1 0x00040000 /* Bank 3 Transition Time from Read to Write = 1 cycle */
1617#define B3TT_2 0x00080000 /* Bank 3 Transition Time from Read to Write = 2 cycles */
1618#define B3TT_3 0x000C0000 /* Bank 3 Transition Time from Read to Write = 3 cycles */
1619#define B3TT_4 0x00000000 /* Bank 3 Transition Time from Read to Write = 4 cycles */
1620#define B3ST_1 0x00100000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 1 cycle */
1621#define B3ST_2 0x00200000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 2 cycles */
1622#define B3ST_3 0x00300000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 3 cycles */
1623#define B3ST_4 0x00000000 /* Bank 3 Setup Time from AOE asserted to Read or Write asserted = 4 cycles */
1624#define B3HT_1 0x00400000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 1 cycle */
1625#define B3HT_2 0x00800000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 2 cycles */
1626#define B3HT_3 0x00C00000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 3 cycles */
1627#define B3HT_0 0x00000000 /* Bank 3 Hold Time from Read or Write deasserted to AOE deasserted = 0 cycles */
1628#define B3RAT_1 0x01000000 /* Bank 3 Read Access Time = 1 cycle */
1629#define B3RAT_2 0x02000000 /* Bank 3 Read Access Time = 2 cycles */
1630#define B3RAT_3 0x03000000 /* Bank 3 Read Access Time = 3 cycles */
1631#define B3RAT_4 0x04000000 /* Bank 3 Read Access Time = 4 cycles */
1632#define B3RAT_5 0x05000000 /* Bank 3 Read Access Time = 5 cycles */
1633#define B3RAT_6 0x06000000 /* Bank 3 Read Access Time = 6 cycles */
1634#define B3RAT_7 0x07000000 /* Bank 3 Read Access Time = 7 cycles */
1635#define B3RAT_8 0x08000000 /* Bank 3 Read Access Time = 8 cycles */
1636#define B3RAT_9 0x09000000 /* Bank 3 Read Access Time = 9 cycles */
1637#define B3RAT_10 0x0A000000 /* Bank 3 Read Access Time = 10 cycles */
1638#define B3RAT_11 0x0B000000 /* Bank 3 Read Access Time = 11 cycles */
1639#define B3RAT_12 0x0C000000 /* Bank 3 Read Access Time = 12 cycles */
1640#define B3RAT_13 0x0D000000 /* Bank 3 Read Access Time = 13 cycles */
1641#define B3RAT_14 0x0E000000 /* Bank 3 Read Access Time = 14 cycles */
1642#define B3RAT_15 0x0F000000 /* Bank 3 Read Access Time = 15 cycles */
1643#define B3WAT_1 0x10000000 /* Bank 3 Write Access Time = 1 cycle */
1644#define B3WAT_2 0x20000000 /* Bank 3 Write Access Time = 2 cycles */
1645#define B3WAT_3 0x30000000 /* Bank 3 Write Access Time = 3 cycles */
1646#define B3WAT_4 0x40000000 /* Bank 3 Write Access Time = 4 cycles */
1647#define B3WAT_5 0x50000000 /* Bank 3 Write Access Time = 5 cycles */
1648#define B3WAT_6 0x60000000 /* Bank 3 Write Access Time = 6 cycles */
1649#define B3WAT_7 0x70000000 /* Bank 3 Write Access Time = 7 cycles */
1650#define B3WAT_8 0x80000000 /* Bank 3 Write Access Time = 8 cycles */
1651#define B3WAT_9 0x90000000 /* Bank 3 Write Access Time = 9 cycles */
1652#define B3WAT_10 0xA0000000 /* Bank 3 Write Access Time = 10 cycles */
1653#define B3WAT_11 0xB0000000 /* Bank 3 Write Access Time = 11 cycles */
1654#define B3WAT_12 0xC0000000 /* Bank 3 Write Access Time = 12 cycles */
1655#define B3WAT_13 0xD0000000 /* Bank 3 Write Access Time = 13 cycles */
1656#define B3WAT_14 0xE0000000 /* Bank 3 Write Access Time = 14 cycles */
1657#define B3WAT_15 0xF0000000 /* Bank 3 Write Access Time = 15 cycles */
1658
1659/* ********************** SDRAM CONTROLLER MASKS *************************** */
1660
1661/* EBIU_SDGCTL Masks */
1662#define SCTLE 0x00000001 /* Enable SCLK[0], /SRAS, /SCAS, /SWE, SDQM[3:0] */
1663#define CL_2 0x00000008 /* SDRAM CAS latency = 2 cycles */
1664#define CL_3 0x0000000C /* SDRAM CAS latency = 3 cycles */
1665#define PFE 0x00000010 /* Enable SDRAM prefetch */
1666#define PFP 0x00000020 /* Prefetch has priority over AMC requests */
1667#define TRAS_1 0x00000040 /* SDRAM tRAS = 1 cycle */
1668#define TRAS_2 0x00000080 /* SDRAM tRAS = 2 cycles */
1669#define TRAS_3 0x000000C0 /* SDRAM tRAS = 3 cycles */
1670#define TRAS_4 0x00000100 /* SDRAM tRAS = 4 cycles */
1671#define TRAS_5 0x00000140 /* SDRAM tRAS = 5 cycles */
1672#define TRAS_6 0x00000180 /* SDRAM tRAS = 6 cycles */
1673#define TRAS_7 0x000001C0 /* SDRAM tRAS = 7 cycles */
1674#define TRAS_8 0x00000200 /* SDRAM tRAS = 8 cycles */
1675#define TRAS_9 0x00000240 /* SDRAM tRAS = 9 cycles */
1676#define TRAS_10 0x00000280 /* SDRAM tRAS = 10 cycles */
1677#define TRAS_11 0x000002C0 /* SDRAM tRAS = 11 cycles */
1678#define TRAS_12 0x00000300 /* SDRAM tRAS = 12 cycles */
1679#define TRAS_13 0x00000340 /* SDRAM tRAS = 13 cycles */
1680#define TRAS_14 0x00000380 /* SDRAM tRAS = 14 cycles */
1681#define TRAS_15 0x000003C0 /* SDRAM tRAS = 15 cycles */
1682#define TRP_1 0x00000800 /* SDRAM tRP = 1 cycle */
1683#define TRP_2 0x00001000 /* SDRAM tRP = 2 cycles */
1684#define TRP_3 0x00001800 /* SDRAM tRP = 3 cycles */
1685#define TRP_4 0x00002000 /* SDRAM tRP = 4 cycles */
1686#define TRP_5 0x00002800 /* SDRAM tRP = 5 cycles */
1687#define TRP_6 0x00003000 /* SDRAM tRP = 6 cycles */
1688#define TRP_7 0x00003800 /* SDRAM tRP = 7 cycles */
1689#define TRCD_1 0x00008000 /* SDRAM tRCD = 1 cycle */
1690#define TRCD_2 0x00010000 /* SDRAM tRCD = 2 cycles */
1691#define TRCD_3 0x00018000 /* SDRAM tRCD = 3 cycles */
1692#define TRCD_4 0x00020000 /* SDRAM tRCD = 4 cycles */
1693#define TRCD_5 0x00028000 /* SDRAM tRCD = 5 cycles */
1694#define TRCD_6 0x00030000 /* SDRAM tRCD = 6 cycles */
1695#define TRCD_7 0x00038000 /* SDRAM tRCD = 7 cycles */
1696#define TWR_1 0x00080000 /* SDRAM tWR = 1 cycle */
1697#define TWR_2 0x00100000 /* SDRAM tWR = 2 cycles */
1698#define TWR_3 0x00180000 /* SDRAM tWR = 3 cycles */
1699#define PUPSD 0x00200000 /*Power-up start delay */
1700#define PSM 0x00400000 /* SDRAM power-up sequence = Precharge, mode register set, 8 CBR refresh cycles */
1701#define PSS 0x00800000 /* enable SDRAM power-up sequence on next SDRAM access */
1702#define SRFS 0x01000000 /* Start SDRAM self-refresh mode */
1703#define EBUFE 0x02000000 /* Enable external buffering timing */
1704#define FBBRW 0x04000000 /* Fast back-to-back read write enable */
1705#define EMREN 0x10000000 /* Extended mode register enable */
1706#define TCSR 0x20000000 /* Temp compensated self refresh value 85 deg C */
1707#define CDDBG 0x40000000 /* Tristate SDRAM controls during bus grant */
1708
1709/* EBIU_SDBCTL Masks */
1710#define EB0_E 0x00000001 /* Enable SDRAM external bank 0 */
1711#define EB0_SZ_16 0x00000000 /* SDRAM external bank size = 16MB */
1712#define EB0_SZ_32 0x00000002 /* SDRAM external bank size = 32MB */
1713#define EB0_SZ_64 0x00000004 /* SDRAM external bank size = 64MB */
1714#define EB0_SZ_128 0x00000006 /* SDRAM external bank size = 128MB */
1715#define EB0_CAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */
1716#define EB0_CAW_9 0x00000010 /* SDRAM external bank column address width = 9 bits */
1717#define EB0_CAW_10 0x00000020 /* SDRAM external bank column address width = 9 bits */
1718#define EB0_CAW_11 0x00000030 /* SDRAM external bank column address width = 9 bits */
1719
1720#define EB1_E 0x00000100 /* Enable SDRAM external bank 1 */
1721#define EB1__SZ_16 0x00000000 /* SDRAM external bank size = 16MB */
1722#define EB1__SZ_32 0x00000200 /* SDRAM external bank size = 32MB */
1723#define EB1__SZ_64 0x00000400 /* SDRAM external bank size = 64MB */
1724#define EB1__SZ_128 0x00000600 /* SDRAM external bank size = 128MB */
1725#define EB1__CAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */
1726#define EB1__CAW_9 0x00001000 /* SDRAM external bank column address width = 9 bits */
1727#define EB1__CAW_10 0x00002000 /* SDRAM external bank column address width = 9 bits */
1728#define EB1__CAW_11 0x00003000 /* SDRAM external bank column address width = 9 bits */
1729
1730#define EB2__E 0x00010000 /* Enable SDRAM external bank 2 */
1731#define EB2__SZ_16 0x00000000 /* SDRAM external bank size = 16MB */
1732#define EB2__SZ_32 0x00020000 /* SDRAM external bank size = 32MB */
1733#define EB2__SZ_64 0x00040000 /* SDRAM external bank size = 64MB */
1734#define EB2__SZ_128 0x00060000 /* SDRAM external bank size = 128MB */
1735#define EB2__CAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */
1736#define EB2__CAW_9 0x00100000 /* SDRAM external bank column address width = 9 bits */
1737#define EB2__CAW_10 0x00200000 /* SDRAM external bank column address width = 9 bits */
1738#define EB2__CAW_11 0x00300000 /* SDRAM external bank column address width = 9 bits */
1739
1740#define EB3__E 0x01000000 /* Enable SDRAM external bank 3 */
1741#define EB3__SZ_16 0x00000000 /* SDRAM external bank size = 16MB */
1742#define EB3__SZ_32 0x02000000 /* SDRAM external bank size = 32MB */
1743#define EB3__SZ_64 0x04000000 /* SDRAM external bank size = 64MB */
1744#define EB3__SZ_128 0x06000000 /* SDRAM external bank size = 128MB */
1745#define EB3__CAW_8 0x00000000 /* SDRAM external bank column address width = 8 bits */
1746#define EB3__CAW_9 0x10000000 /* SDRAM external bank column address width = 9 bits */
1747#define EB3__CAW_10 0x20000000 /* SDRAM external bank column address width = 9 bits */
1748#define EB3__CAW_11 0x30000000 /* SDRAM external bank column address width = 9 bits */
1749
1750/* EBIU_SDSTAT Masks */
1751#define SDCI 0x00000001 /* SDRAM controller is idle */
1752#define SDSRA 0x00000002 /* SDRAM SDRAM self refresh is active */
1753#define SDPUA 0x00000004 /* SDRAM power up active */
1754#define SDRS 0x00000008 /* SDRAM is in reset state */
1755#define SDEASE 0x00000010 /* SDRAM EAB sticky error status - W1C */
1756#define BGSTAT 0x00000020 /* Bus granted */
1757
1758#endif /* _DEF_BF561_H */
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h
deleted file mode 100644
index 8bc46cd89a02..000000000000
--- a/include/asm-blackfin/mach-bf561/dma.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*****************************************************************************
2*
3* BF-533/2/1 Specific Declarations
4*
5****************************************************************************/
6
7#ifndef _MACH_DMA_H_
8#define _MACH_DMA_H_
9
10#define MAX_BLACKFIN_DMA_CHANNEL 36
11
12#define CH_PPI0 0
13#define CH_PPI (CH_PPI0)
14#define CH_PPI1 1
15#define CH_SPORT0_RX 12
16#define CH_SPORT0_TX 13
17#define CH_SPORT1_RX 14
18#define CH_SPORT1_TX 15
19#define CH_SPI 16
20#define CH_UART_RX 17
21#define CH_UART_TX 18
22#define CH_MEM_STREAM0_DEST 24 /* TX */
23#define CH_MEM_STREAM0_SRC 25 /* RX */
24#define CH_MEM_STREAM1_DEST 26 /* TX */
25#define CH_MEM_STREAM1_SRC 27 /* RX */
26#define CH_MEM_STREAM2_DEST 28
27#define CH_MEM_STREAM2_SRC 29
28#define CH_MEM_STREAM3_DEST 30
29#define CH_MEM_STREAM3_SRC 31
30#define CH_IMEM_STREAM0_DEST 32
31#define CH_IMEM_STREAM0_SRC 33
32#define CH_IMEM_STREAM1_DEST 34
33#define CH_IMEM_STREAM1_SRC 35
34
35#endif
diff --git a/include/asm-blackfin/mach-bf561/irq.h b/include/asm-blackfin/mach-bf561/irq.h
deleted file mode 100644
index 6698389c5564..000000000000
--- a/include/asm-blackfin/mach-bf561/irq.h
+++ /dev/null
@@ -1,447 +0,0 @@
1
2/*
3 * File: include/asm-blackfin/mach-bf561/irq.h
4 * Based on:
5 * Author:
6 *
7 * Created:
8 * Description:
9 *
10 * Rev:
11 *
12 * Modified:
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 _BF561_IRQ_H_
33#define _BF561_IRQ_H_
34
35/***********************************************************************
36 * Interrupt source definitions:
37 Event Source Core Event Name IRQ No
38 (highest priority)
39 Emulation Events 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 PLL Wakeup Interrupt IVG7 7
48 DMA1 Error (generic) IVG7 8
49 DMA2 Error (generic) IVG7 9
50 IMDMA Error (generic) IVG7 10
51 PPI1 Error Interrupt IVG7 11
52 PPI2 Error Interrupt IVG7 12
53 SPORT0 Error Interrupt IVG7 13
54 SPORT1 Error Interrupt IVG7 14
55 SPI Error Interrupt IVG7 15
56 UART Error Interrupt IVG7 16
57 Reserved Interrupt IVG7 17
58
59 DMA1 0 Interrupt(PPI1) IVG8 18
60 DMA1 1 Interrupt(PPI2) IVG8 19
61 DMA1 2 Interrupt IVG8 20
62 DMA1 3 Interrupt IVG8 21
63 DMA1 4 Interrupt IVG8 22
64 DMA1 5 Interrupt IVG8 23
65 DMA1 6 Interrupt IVG8 24
66 DMA1 7 Interrupt IVG8 25
67 DMA1 8 Interrupt IVG8 26
68 DMA1 9 Interrupt IVG8 27
69 DMA1 10 Interrupt IVG8 28
70 DMA1 11 Interrupt IVG8 29
71
72 DMA2 0 (SPORT0 RX) IVG9 30
73 DMA2 1 (SPORT0 TX) IVG9 31
74 DMA2 2 (SPORT1 RX) IVG9 32
75 DMA2 3 (SPORT2 TX) IVG9 33
76 DMA2 4 (SPI) IVG9 34
77 DMA2 5 (UART RX) IVG9 35
78 DMA2 6 (UART TX) IVG9 36
79 DMA2 7 Interrupt IVG9 37
80 DMA2 8 Interrupt IVG9 38
81 DMA2 9 Interrupt IVG9 39
82 DMA2 10 Interrupt IVG9 40
83 DMA2 11 Interrupt IVG9 41
84
85 TIMER 0 Interrupt IVG10 42
86 TIMER 1 Interrupt IVG10 43
87 TIMER 2 Interrupt IVG10 44
88 TIMER 3 Interrupt IVG10 45
89 TIMER 4 Interrupt IVG10 46
90 TIMER 5 Interrupt IVG10 47
91 TIMER 6 Interrupt IVG10 48
92 TIMER 7 Interrupt IVG10 49
93 TIMER 8 Interrupt IVG10 50
94 TIMER 9 Interrupt IVG10 51
95 TIMER 10 Interrupt IVG10 52
96 TIMER 11 Interrupt IVG10 53
97
98 Programmable Flags0 A (8) IVG11 54
99 Programmable Flags0 B (8) IVG11 55
100 Programmable Flags1 A (8) IVG11 56
101 Programmable Flags1 B (8) IVG11 57
102 Programmable Flags2 A (8) IVG11 58
103 Programmable Flags2 B (8) IVG11 59
104
105 MDMA1 0 write/read INT IVG8 60
106 MDMA1 1 write/read INT IVG8 61
107
108 MDMA2 0 write/read INT IVG9 62
109 MDMA2 1 write/read INT IVG9 63
110
111 IMDMA 0 write/read INT IVG12 64
112 IMDMA 1 write/read INT IVG12 65
113
114 Watch Dog Timer IVG13 66
115
116 Reserved interrupt IVG7 67
117 Reserved interrupt IVG7 68
118 Supplemental interrupt 0 IVG7 69
119 supplemental interrupt 1 IVG7 70
120
121 Softirq IVG14
122 System Call --
123 (lowest priority) IVG15
124
125 **********************************************************************/
126
127#define SYS_IRQS 71
128#define NR_PERI_INTS 64
129
130/*
131 * The ABSTRACT IRQ definitions
132 * the first seven of the following are fixed,
133 * the rest you change if you need to.
134 */
135/* IVG 0-6*/
136#define IRQ_EMU 0 /* Emulation */
137#define IRQ_RST 1 /* Reset */
138#define IRQ_NMI 2 /* Non Maskable Interrupt */
139#define IRQ_EVX 3 /* Exception */
140#define IRQ_UNUSED 4 /* Reserved interrupt */
141#define IRQ_HWERR 5 /* Hardware Error */
142#define IRQ_CORETMR 6 /* Core timer */
143
144#define IVG_BASE 7
145/* IVG 7 */
146#define IRQ_PLL_WAKEUP (IVG_BASE + 0) /* PLL Wakeup Interrupt */
147#define IRQ_DMA1_ERROR (IVG_BASE + 1) /* DMA1 Error (general) */
148#define IRQ_DMA_ERROR IRQ_DMA1_ERROR /* DMA1 Error (general) */
149#define IRQ_DMA2_ERROR (IVG_BASE + 2) /* DMA2 Error (general) */
150#define IRQ_IMDMA_ERROR (IVG_BASE + 3) /* IMDMA Error Interrupt */
151#define IRQ_PPI1_ERROR (IVG_BASE + 4) /* PPI1 Error Interrupt */
152#define IRQ_PPI_ERROR IRQ_PPI1_ERROR /* PPI1 Error Interrupt */
153#define IRQ_PPI2_ERROR (IVG_BASE + 5) /* PPI2 Error Interrupt */
154#define IRQ_SPORT0_ERROR (IVG_BASE + 6) /* SPORT0 Error Interrupt */
155#define IRQ_SPORT1_ERROR (IVG_BASE + 7) /* SPORT1 Error Interrupt */
156#define IRQ_SPI_ERROR (IVG_BASE + 8) /* SPI Error Interrupt */
157#define IRQ_UART_ERROR (IVG_BASE + 9) /* UART Error Interrupt */
158#define IRQ_RESERVED_ERROR (IVG_BASE + 10) /* Reversed Interrupt */
159/* IVG 8 */
160#define IRQ_DMA1_0 (IVG_BASE + 11) /* DMA1 0 Interrupt(PPI1) */
161#define IRQ_PPI IRQ_DMA1_0 /* DMA1 0 Interrupt(PPI1) */
162#define IRQ_PPI0 IRQ_DMA1_0 /* DMA1 0 Interrupt(PPI1) */
163#define IRQ_DMA1_1 (IVG_BASE + 12) /* DMA1 1 Interrupt(PPI2) */
164#define IRQ_PPI1 IRQ_DMA1_1 /* DMA1 1 Interrupt(PPI2) */
165#define IRQ_DMA1_2 (IVG_BASE + 13) /* DMA1 2 Interrupt */
166#define IRQ_DMA1_3 (IVG_BASE + 14) /* DMA1 3 Interrupt */
167#define IRQ_DMA1_4 (IVG_BASE + 15) /* DMA1 4 Interrupt */
168#define IRQ_DMA1_5 (IVG_BASE + 16) /* DMA1 5 Interrupt */
169#define IRQ_DMA1_6 (IVG_BASE + 17) /* DMA1 6 Interrupt */
170#define IRQ_DMA1_7 (IVG_BASE + 18) /* DMA1 7 Interrupt */
171#define IRQ_DMA1_8 (IVG_BASE + 19) /* DMA1 8 Interrupt */
172#define IRQ_DMA1_9 (IVG_BASE + 20) /* DMA1 9 Interrupt */
173#define IRQ_DMA1_10 (IVG_BASE + 21) /* DMA1 10 Interrupt */
174#define IRQ_DMA1_11 (IVG_BASE + 22) /* DMA1 11 Interrupt */
175/* IVG 9 */
176#define IRQ_DMA2_0 (IVG_BASE + 23) /* DMA2 0 (SPORT0 RX) */
177#define IRQ_SPORT0_RX IRQ_DMA2_0 /* DMA2 0 (SPORT0 RX) */
178#define IRQ_DMA2_1 (IVG_BASE + 24) /* DMA2 1 (SPORT0 TX) */
179#define IRQ_SPORT0_TX IRQ_DMA2_1 /* DMA2 1 (SPORT0 TX) */
180#define IRQ_DMA2_2 (IVG_BASE + 25) /* DMA2 2 (SPORT1 RX) */
181#define IRQ_SPORT1_RX IRQ_DMA2_2 /* DMA2 2 (SPORT1 RX) */
182#define IRQ_DMA2_3 (IVG_BASE + 26) /* DMA2 3 (SPORT2 TX) */
183#define IRQ_SPORT1_TX IRQ_DMA2_3 /* DMA2 3 (SPORT2 TX) */
184#define IRQ_DMA2_4 (IVG_BASE + 27) /* DMA2 4 (SPI) */
185#define IRQ_SPI IRQ_DMA2_4 /* DMA2 4 (SPI) */
186#define IRQ_DMA2_5 (IVG_BASE + 28) /* DMA2 5 (UART RX) */
187#define IRQ_UART_RX IRQ_DMA2_5 /* DMA2 5 (UART RX) */
188#define IRQ_DMA2_6 (IVG_BASE + 29) /* DMA2 6 (UART TX) */
189#define IRQ_UART_TX IRQ_DMA2_6 /* DMA2 6 (UART TX) */
190#define IRQ_DMA2_7 (IVG_BASE + 30) /* DMA2 7 Interrupt */
191#define IRQ_DMA2_8 (IVG_BASE + 31) /* DMA2 8 Interrupt */
192#define IRQ_DMA2_9 (IVG_BASE + 32) /* DMA2 9 Interrupt */
193#define IRQ_DMA2_10 (IVG_BASE + 33) /* DMA2 10 Interrupt */
194#define IRQ_DMA2_11 (IVG_BASE + 34) /* DMA2 11 Interrupt */
195/* IVG 10 */
196#define IRQ_TIMER0 (IVG_BASE + 35) /* TIMER 0 Interrupt */
197#define IRQ_TIMER1 (IVG_BASE + 36) /* TIMER 1 Interrupt */
198#define IRQ_TIMER2 (IVG_BASE + 37) /* TIMER 2 Interrupt */
199#define IRQ_TIMER3 (IVG_BASE + 38) /* TIMER 3 Interrupt */
200#define IRQ_TIMER4 (IVG_BASE + 39) /* TIMER 4 Interrupt */
201#define IRQ_TIMER5 (IVG_BASE + 40) /* TIMER 5 Interrupt */
202#define IRQ_TIMER6 (IVG_BASE + 41) /* TIMER 6 Interrupt */
203#define IRQ_TIMER7 (IVG_BASE + 42) /* TIMER 7 Interrupt */
204#define IRQ_TIMER8 (IVG_BASE + 43) /* TIMER 8 Interrupt */
205#define IRQ_TIMER9 (IVG_BASE + 44) /* TIMER 9 Interrupt */
206#define IRQ_TIMER10 (IVG_BASE + 45) /* TIMER 10 Interrupt */
207#define IRQ_TIMER11 (IVG_BASE + 46) /* TIMER 11 Interrupt */
208/* IVG 11 */
209#define IRQ_PROG0_INTA (IVG_BASE + 47) /* Programmable Flags0 A (8) */
210#define IRQ_PROG_INTA IRQ_PROG0_INTA /* Programmable Flags0 A (8) */
211#define IRQ_PROG0_INTB (IVG_BASE + 48) /* Programmable Flags0 B (8) */
212#define IRQ_PROG_INTB IRQ_PROG0_INTB /* Programmable Flags0 B (8) */
213#define IRQ_PROG1_INTA (IVG_BASE + 49) /* Programmable Flags1 A (8) */
214#define IRQ_PROG1_INTB (IVG_BASE + 50) /* Programmable Flags1 B (8) */
215#define IRQ_PROG2_INTA (IVG_BASE + 51) /* Programmable Flags2 A (8) */
216#define IRQ_PROG2_INTB (IVG_BASE + 52) /* Programmable Flags2 B (8) */
217/* IVG 8 */
218#define IRQ_DMA1_WRRD0 (IVG_BASE + 53) /* MDMA1 0 write/read INT */
219#define IRQ_DMA_WRRD0 IRQ_DMA1_WRRD0 /* MDMA1 0 write/read INT */
220#define IRQ_MEM_DMA0 IRQ_DMA1_WRRD0
221#define IRQ_DMA1_WRRD1 (IVG_BASE + 54) /* MDMA1 1 write/read INT */
222#define IRQ_DMA_WRRD1 IRQ_DMA1_WRRD1 /* MDMA1 1 write/read INT */
223#define IRQ_MEM_DMA1 IRQ_DMA1_WRRD1
224/* IVG 9 */
225#define IRQ_DMA2_WRRD0 (IVG_BASE + 55) /* MDMA2 0 write/read INT */
226#define IRQ_MEM_DMA2 IRQ_DMA2_WRRD0
227#define IRQ_DMA2_WRRD1 (IVG_BASE + 56) /* MDMA2 1 write/read INT */
228#define IRQ_MEM_DMA3 IRQ_DMA2_WRRD1
229/* IVG 12 */
230#define IRQ_IMDMA_WRRD0 (IVG_BASE + 57) /* IMDMA 0 write/read INT */
231#define IRQ_IMEM_DMA0 IRQ_IMDMA_WRRD0
232#define IRQ_IMDMA_WRRD1 (IVG_BASE + 58) /* IMDMA 1 write/read INT */
233#define IRQ_IMEM_DMA1 IRQ_IMDMA_WRRD1
234/* IVG 13 */
235#define IRQ_WATCH (IVG_BASE + 59) /* Watch Dog Timer */
236/* IVG 7 */
237#define IRQ_RESERVED_1 (IVG_BASE + 60) /* Reserved interrupt */
238#define IRQ_RESERVED_2 (IVG_BASE + 61) /* Reserved interrupt */
239#define IRQ_SUPPLE_0 (IVG_BASE + 62) /* Supplemental interrupt 0 */
240#define IRQ_SUPPLE_1 (IVG_BASE + 63) /* supplemental interrupt 1 */
241
242#define IRQ_PF0 73
243#define IRQ_PF1 74
244#define IRQ_PF2 75
245#define IRQ_PF3 76
246#define IRQ_PF4 77
247#define IRQ_PF5 78
248#define IRQ_PF6 79
249#define IRQ_PF7 80
250#define IRQ_PF8 81
251#define IRQ_PF9 82
252#define IRQ_PF10 83
253#define IRQ_PF11 84
254#define IRQ_PF12 85
255#define IRQ_PF13 86
256#define IRQ_PF14 87
257#define IRQ_PF15 88
258#define IRQ_PF16 89
259#define IRQ_PF17 90
260#define IRQ_PF18 91
261#define IRQ_PF19 92
262#define IRQ_PF20 93
263#define IRQ_PF21 94
264#define IRQ_PF22 95
265#define IRQ_PF23 96
266#define IRQ_PF24 97
267#define IRQ_PF25 98
268#define IRQ_PF26 99
269#define IRQ_PF27 100
270#define IRQ_PF28 101
271#define IRQ_PF29 102
272#define IRQ_PF30 103
273#define IRQ_PF31 104
274#define IRQ_PF32 105
275#define IRQ_PF33 106
276#define IRQ_PF34 107
277#define IRQ_PF35 108
278#define IRQ_PF36 109
279#define IRQ_PF37 110
280#define IRQ_PF38 111
281#define IRQ_PF39 112
282#define IRQ_PF40 113
283#define IRQ_PF41 114
284#define IRQ_PF42 115
285#define IRQ_PF43 116
286#define IRQ_PF44 117
287#define IRQ_PF45 118
288#define IRQ_PF46 119
289#define IRQ_PF47 120
290
291#define GPIO_IRQ_BASE IRQ_PF0
292
293#define NR_IRQS (IRQ_PF47 + 1)
294
295#define IVG7 7
296#define IVG8 8
297#define IVG9 9
298#define IVG10 10
299#define IVG11 11
300#define IVG12 12
301#define IVG13 13
302#define IVG14 14
303#define IVG15 15
304
305/*
306 * DEFAULT PRIORITIES:
307 */
308
309#define CONFIG_DEF_PLL_WAKEUP 7
310#define CONFIG_DEF_DMA1_ERROR 7
311#define CONFIG_DEF_DMA2_ERROR 7
312#define CONFIG_DEF_IMDMA_ERROR 7
313#define CONFIG_DEF_PPI1_ERROR 7
314#define CONFIG_DEF_PPI2_ERROR 7
315#define CONFIG_DEF_SPORT0_ERROR 7
316#define CONFIG_DEF_SPORT1_ERROR 7
317#define CONFIG_DEF_SPI_ERROR 7
318#define CONFIG_DEF_UART_ERROR 7
319#define CONFIG_DEF_RESERVED_ERROR 7
320#define CONFIG_DEF_DMA1_0 8
321#define CONFIG_DEF_DMA1_1 8
322#define CONFIG_DEF_DMA1_2 8
323#define CONFIG_DEF_DMA1_3 8
324#define CONFIG_DEF_DMA1_4 8
325#define CONFIG_DEF_DMA1_5 8
326#define CONFIG_DEF_DMA1_6 8
327#define CONFIG_DEF_DMA1_7 8
328#define CONFIG_DEF_DMA1_8 8
329#define CONFIG_DEF_DMA1_9 8
330#define CONFIG_DEF_DMA1_10 8
331#define CONFIG_DEF_DMA1_11 8
332#define CONFIG_DEF_DMA2_0 9
333#define CONFIG_DEF_DMA2_1 9
334#define CONFIG_DEF_DMA2_2 9
335#define CONFIG_DEF_DMA2_3 9
336#define CONFIG_DEF_DMA2_4 9
337#define CONFIG_DEF_DMA2_5 9
338#define CONFIG_DEF_DMA2_6 9
339#define CONFIG_DEF_DMA2_7 9
340#define CONFIG_DEF_DMA2_8 9
341#define CONFIG_DEF_DMA2_9 9
342#define CONFIG_DEF_DMA2_10 9
343#define CONFIG_DEF_DMA2_11 9
344#define CONFIG_DEF_TIMER0 10
345#define CONFIG_DEF_TIMER1 10
346#define CONFIG_DEF_TIMER2 10
347#define CONFIG_DEF_TIMER3 10
348#define CONFIG_DEF_TIMER4 10
349#define CONFIG_DEF_TIMER5 10
350#define CONFIG_DEF_TIMER6 10
351#define CONFIG_DEF_TIMER7 10
352#define CONFIG_DEF_TIMER8 10
353#define CONFIG_DEF_TIMER9 10
354#define CONFIG_DEF_TIMER10 10
355#define CONFIG_DEF_TIMER11 10
356#define CONFIG_DEF_PROG0_INTA 11
357#define CONFIG_DEF_PROG0_INTB 11
358#define CONFIG_DEF_PROG1_INTA 11
359#define CONFIG_DEF_PROG1_INTB 11
360#define CONFIG_DEF_PROG2_INTA 11
361#define CONFIG_DEF_PROG2_INTB 11
362#define CONFIG_DEF_DMA1_WRRD0 8
363#define CONFIG_DEF_DMA1_WRRD1 8
364#define CONFIG_DEF_DMA2_WRRD0 9
365#define CONFIG_DEF_DMA2_WRRD1 9
366#define CONFIG_DEF_IMDMA_WRRD0 12
367#define CONFIG_DEF_IMDMA_WRRD1 12
368#define CONFIG_DEF_WATCH 13
369#define CONFIG_DEF_RESERVED_1 7
370#define CONFIG_DEF_RESERVED_2 7
371#define CONFIG_DEF_SUPPLE_0 7
372#define CONFIG_DEF_SUPPLE_1 7
373
374/* IAR0 BIT FIELDS */
375#define IRQ_PLL_WAKEUP_POS 0
376#define IRQ_DMA1_ERROR_POS 4
377#define IRQ_DMA2_ERROR_POS 8
378#define IRQ_IMDMA_ERROR_POS 12
379#define IRQ_PPI0_ERROR_POS 16
380#define IRQ_PPI1_ERROR_POS 20
381#define IRQ_SPORT0_ERROR_POS 24
382#define IRQ_SPORT1_ERROR_POS 28
383/* IAR1 BIT FIELDS */
384#define IRQ_SPI_ERROR_POS 0
385#define IRQ_UART_ERROR_POS 4
386#define IRQ_RESERVED_ERROR_POS 8
387#define IRQ_DMA1_0_POS 12
388#define IRQ_DMA1_1_POS 16
389#define IRQ_DMA1_2_POS 20
390#define IRQ_DMA1_3_POS 24
391#define IRQ_DMA1_4_POS 28
392/* IAR2 BIT FIELDS */
393#define IRQ_DMA1_5_POS 0
394#define IRQ_DMA1_6_POS 4
395#define IRQ_DMA1_7_POS 8
396#define IRQ_DMA1_8_POS 12
397#define IRQ_DMA1_9_POS 16
398#define IRQ_DMA1_10_POS 20
399#define IRQ_DMA1_11_POS 24
400#define IRQ_DMA2_0_POS 28
401/* IAR3 BIT FIELDS */
402#define IRQ_DMA2_1_POS 0
403#define IRQ_DMA2_2_POS 4
404#define IRQ_DMA2_3_POS 8
405#define IRQ_DMA2_4_POS 12
406#define IRQ_DMA2_5_POS 16
407#define IRQ_DMA2_6_POS 20
408#define IRQ_DMA2_7_POS 24
409#define IRQ_DMA2_8_POS 28
410/* IAR4 BIT FIELDS */
411#define IRQ_DMA2_9_POS 0
412#define IRQ_DMA2_10_POS 4
413#define IRQ_DMA2_11_POS 8
414#define IRQ_TIMER0_POS 12
415#define IRQ_TIMER1_POS 16
416#define IRQ_TIMER2_POS 20
417#define IRQ_TIMER3_POS 24
418#define IRQ_TIMER4_POS 28
419/* IAR5 BIT FIELDS */
420#define IRQ_TIMER5_POS 0
421#define IRQ_TIMER6_POS 4
422#define IRQ_TIMER7_POS 8
423#define IRQ_TIMER8_POS 12
424#define IRQ_TIMER9_POS 16
425#define IRQ_TIMER10_POS 20
426#define IRQ_TIMER11_POS 24
427#define IRQ_PROG0_INTA_POS 28
428/* IAR6 BIT FIELDS */
429#define IRQ_PROG0_INTB_POS 0
430#define IRQ_PROG1_INTA_POS 4
431#define IRQ_PROG1_INTB_POS 8
432#define IRQ_PROG2_INTA_POS 12
433#define IRQ_PROG2_INTB_POS 16
434#define IRQ_DMA1_WRRD0_POS 20
435#define IRQ_DMA1_WRRD1_POS 24
436#define IRQ_DMA2_WRRD0_POS 28
437/* IAR7 BIT FIELDS */
438#define IRQ_DMA2_WRRD1_POS 0
439#define IRQ_IMDMA_WRRD0_POS 4
440#define IRQ_IMDMA_WRRD1_POS 8
441#define IRQ_WDTIMER_POS 12
442#define IRQ_RESERVED_1_POS 16
443#define IRQ_RESERVED_2_POS 20
444#define IRQ_SUPPLE_0_POS 24
445#define IRQ_SUPPLE_1_POS 28
446
447#endif /* _BF561_IRQ_H_ */
diff --git a/include/asm-blackfin/mach-bf561/mem_init.h b/include/asm-blackfin/mach-bf561/mem_init.h
deleted file mode 100644
index e163260bca18..000000000000
--- a/include/asm-blackfin/mach-bf561/mem_init.h
+++ /dev/null
@@ -1,295 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-bf561/mem_init.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31#if (CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || CONFIG_MEM_GENERIC_BOARD || CONFIG_MEM_MT48LC8M32B2B5_7)
32#if (CONFIG_SCLK_HZ > 119402985)
33#define SDRAM_tRP TRP_2
34#define SDRAM_tRP_num 2
35#define SDRAM_tRAS TRAS_7
36#define SDRAM_tRAS_num 7
37#define SDRAM_tRCD TRCD_2
38#define SDRAM_tWR TWR_2
39#endif
40#if (CONFIG_SCLK_HZ > 104477612) && (CONFIG_SCLK_HZ <= 119402985)
41#define SDRAM_tRP TRP_2
42#define SDRAM_tRP_num 2
43#define SDRAM_tRAS TRAS_6
44#define SDRAM_tRAS_num 6
45#define SDRAM_tRCD TRCD_2
46#define SDRAM_tWR TWR_2
47#endif
48#if (CONFIG_SCLK_HZ > 89552239) && (CONFIG_SCLK_HZ <= 104477612)
49#define SDRAM_tRP TRP_2
50#define SDRAM_tRP_num 2
51#define SDRAM_tRAS TRAS_5
52#define SDRAM_tRAS_num 5
53#define SDRAM_tRCD TRCD_2
54#define SDRAM_tWR TWR_2
55#endif
56#if (CONFIG_SCLK_HZ > 74626866) && (CONFIG_SCLK_HZ <= 89552239)
57#define SDRAM_tRP TRP_2
58#define SDRAM_tRP_num 2
59#define SDRAM_tRAS TRAS_4
60#define SDRAM_tRAS_num 4
61#define SDRAM_tRCD TRCD_2
62#define SDRAM_tWR TWR_2
63#endif
64#if (CONFIG_SCLK_HZ > 66666667) && (CONFIG_SCLK_HZ <= 74626866)
65#define SDRAM_tRP TRP_2
66#define SDRAM_tRP_num 2
67#define SDRAM_tRAS TRAS_3
68#define SDRAM_tRAS_num 3
69#define SDRAM_tRCD TRCD_2
70#define SDRAM_tWR TWR_2
71#endif
72#if (CONFIG_SCLK_HZ > 59701493) && (CONFIG_SCLK_HZ <= 66666667)
73#define SDRAM_tRP TRP_1
74#define SDRAM_tRP_num 1
75#define SDRAM_tRAS TRAS_4
76#define SDRAM_tRAS_num 3
77#define SDRAM_tRCD TRCD_1
78#define SDRAM_tWR TWR_2
79#endif
80#if (CONFIG_SCLK_HZ > 44776119) && (CONFIG_SCLK_HZ <= 59701493)
81#define SDRAM_tRP TRP_1
82#define SDRAM_tRP_num 1
83#define SDRAM_tRAS TRAS_3
84#define SDRAM_tRAS_num 3
85#define SDRAM_tRCD TRCD_1
86#define SDRAM_tWR TWR_2
87#endif
88#if (CONFIG_SCLK_HZ > 29850746) && (CONFIG_SCLK_HZ <= 44776119)
89#define SDRAM_tRP TRP_1
90#define SDRAM_tRP_num 1
91#define SDRAM_tRAS TRAS_2
92#define SDRAM_tRAS_num 2
93#define SDRAM_tRCD TRCD_1
94#define SDRAM_tWR TWR_2
95#endif
96#if (CONFIG_SCLK_HZ <= 29850746)
97#define SDRAM_tRP TRP_1
98#define SDRAM_tRP_num 1
99#define SDRAM_tRAS TRAS_1
100#define SDRAM_tRAS_num 1
101#define SDRAM_tRCD TRCD_1
102#define SDRAM_tWR TWR_2
103#endif
104#endif
105
106#if (CONFIG_MEM_MT48LC16M16A2TG_75)
107 /*SDRAM INFORMATION: */
108#define SDRAM_Tref 64 /* Refresh period in milliseconds */
109#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
110#define SDRAM_CL CL_3
111#endif
112
113#if (CONFIG_MEM_MT48LC64M4A2FB_7E)
114 /*SDRAM INFORMATION: */
115#define SDRAM_Tref 64 /* Refresh period in milliseconds */
116#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
117#define SDRAM_CL CL_3
118#endif
119
120#if (CONFIG_MEM_MT48LC8M32B2B5_7)
121 /*SDRAM INFORMATION: */
122#define SDRAM_Tref 64 /* Refresh period in milliseconds */
123#define SDRAM_NRA 4096 /* Number of row addresses in SDRAM */
124#define SDRAM_CL CL_3
125#endif
126
127#if (CONFIG_MEM_GENERIC_BOARD)
128 /*SDRAM INFORMATION: Modify this for your board */
129#define SDRAM_Tref 64 /* Refresh period in milliseconds */
130#define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */
131#define SDRAM_CL CL_3
132#endif
133
134/* Equation from section 17 (p17-46) of BF533 HRM */
135#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
136
137/* Enable SCLK Out */
138#define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS)
139
140#if defined CONFIG_CLKIN_HALF
141#define CLKIN_HALF 1
142#else
143#define CLKIN_HALF 0
144#endif
145
146#if defined CONFIG_PLL_BYPASS
147#define PLL_BYPASS 1
148#else
149#define PLL_BYPASS 0
150#endif
151
152/***************************************Currently Not Being Used *********************************/
153#define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
154#define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
155#define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ))
156#define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
157#define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
158
159#if (flash_EBIU_AMBCTL_TT > 3)
160#define flash_EBIU_AMBCTL0_TT B0TT_4
161#endif
162#if (flash_EBIU_AMBCTL_TT == 3)
163#define flash_EBIU_AMBCTL0_TT B0TT_3
164#endif
165#if (flash_EBIU_AMBCTL_TT == 2)
166#define flash_EBIU_AMBCTL0_TT B0TT_2
167#endif
168#if (flash_EBIU_AMBCTL_TT < 2)
169#define flash_EBIU_AMBCTL0_TT B0TT_1
170#endif
171
172#if (flash_EBIU_AMBCTL_ST > 3)
173#define flash_EBIU_AMBCTL0_ST B0ST_4
174#endif
175#if (flash_EBIU_AMBCTL_ST == 3)
176#define flash_EBIU_AMBCTL0_ST B0ST_3
177#endif
178#if (flash_EBIU_AMBCTL_ST == 2)
179#define flash_EBIU_AMBCTL0_ST B0ST_2
180#endif
181#if (flash_EBIU_AMBCTL_ST < 2)
182#define flash_EBIU_AMBCTL0_ST B0ST_1
183#endif
184
185#if (flash_EBIU_AMBCTL_HT > 2)
186#define flash_EBIU_AMBCTL0_HT B0HT_3
187#endif
188#if (flash_EBIU_AMBCTL_HT == 2)
189#define flash_EBIU_AMBCTL0_HT B0HT_2
190#endif
191#if (flash_EBIU_AMBCTL_HT == 1)
192#define flash_EBIU_AMBCTL0_HT B0HT_1
193#endif
194#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0)
195#define flash_EBIU_AMBCTL0_HT B0HT_0
196#endif
197#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0)
198#define flash_EBIU_AMBCTL0_HT B0HT_1
199#endif
200
201#if (flash_EBIU_AMBCTL_WAT > 14)
202#define flash_EBIU_AMBCTL0_WAT B0WAT_15
203#endif
204#if (flash_EBIU_AMBCTL_WAT == 14)
205#define flash_EBIU_AMBCTL0_WAT B0WAT_14
206#endif
207#if (flash_EBIU_AMBCTL_WAT == 13)
208#define flash_EBIU_AMBCTL0_WAT B0WAT_13
209#endif
210#if (flash_EBIU_AMBCTL_WAT == 12)
211#define flash_EBIU_AMBCTL0_WAT B0WAT_12
212#endif
213#if (flash_EBIU_AMBCTL_WAT == 11)
214#define flash_EBIU_AMBCTL0_WAT B0WAT_11
215#endif
216#if (flash_EBIU_AMBCTL_WAT == 10)
217#define flash_EBIU_AMBCTL0_WAT B0WAT_10
218#endif
219#if (flash_EBIU_AMBCTL_WAT == 9)
220#define flash_EBIU_AMBCTL0_WAT B0WAT_9
221#endif
222#if (flash_EBIU_AMBCTL_WAT == 8)
223#define flash_EBIU_AMBCTL0_WAT B0WAT_8
224#endif
225#if (flash_EBIU_AMBCTL_WAT == 7)
226#define flash_EBIU_AMBCTL0_WAT B0WAT_7
227#endif
228#if (flash_EBIU_AMBCTL_WAT == 6)
229#define flash_EBIU_AMBCTL0_WAT B0WAT_6
230#endif
231#if (flash_EBIU_AMBCTL_WAT == 5)
232#define flash_EBIU_AMBCTL0_WAT B0WAT_5
233#endif
234#if (flash_EBIU_AMBCTL_WAT == 4)
235#define flash_EBIU_AMBCTL0_WAT B0WAT_4
236#endif
237#if (flash_EBIU_AMBCTL_WAT == 3)
238#define flash_EBIU_AMBCTL0_WAT B0WAT_3
239#endif
240#if (flash_EBIU_AMBCTL_WAT == 2)
241#define flash_EBIU_AMBCTL0_WAT B0WAT_2
242#endif
243#if (flash_EBIU_AMBCTL_WAT == 1)
244#define flash_EBIU_AMBCTL0_WAT B0WAT_1
245#endif
246
247#if (flash_EBIU_AMBCTL_RAT > 14)
248#define flash_EBIU_AMBCTL0_RAT B0RAT_15
249#endif
250#if (flash_EBIU_AMBCTL_RAT == 14)
251#define flash_EBIU_AMBCTL0_RAT B0RAT_14
252#endif
253#if (flash_EBIU_AMBCTL_RAT == 13)
254#define flash_EBIU_AMBCTL0_RAT B0RAT_13
255#endif
256#if (flash_EBIU_AMBCTL_RAT == 12)
257#define flash_EBIU_AMBCTL0_RAT B0RAT_12
258#endif
259#if (flash_EBIU_AMBCTL_RAT == 11)
260#define flash_EBIU_AMBCTL0_RAT B0RAT_11
261#endif
262#if (flash_EBIU_AMBCTL_RAT == 10)
263#define flash_EBIU_AMBCTL0_RAT B0RAT_10
264#endif
265#if (flash_EBIU_AMBCTL_RAT == 9)
266#define flash_EBIU_AMBCTL0_RAT B0RAT_9
267#endif
268#if (flash_EBIU_AMBCTL_RAT == 8)
269#define flash_EBIU_AMBCTL0_RAT B0RAT_8
270#endif
271#if (flash_EBIU_AMBCTL_RAT == 7)
272#define flash_EBIU_AMBCTL0_RAT B0RAT_7
273#endif
274#if (flash_EBIU_AMBCTL_RAT == 6)
275#define flash_EBIU_AMBCTL0_RAT B0RAT_6
276#endif
277#if (flash_EBIU_AMBCTL_RAT == 5)
278#define flash_EBIU_AMBCTL0_RAT B0RAT_5
279#endif
280#if (flash_EBIU_AMBCTL_RAT == 4)
281#define flash_EBIU_AMBCTL0_RAT B0RAT_4
282#endif
283#if (flash_EBIU_AMBCTL_RAT == 3)
284#define flash_EBIU_AMBCTL0_RAT B0RAT_3
285#endif
286#if (flash_EBIU_AMBCTL_RAT == 2)
287#define flash_EBIU_AMBCTL0_RAT B0RAT_2
288#endif
289#if (flash_EBIU_AMBCTL_RAT == 1)
290#define flash_EBIU_AMBCTL0_RAT B0RAT_1
291#endif
292
293#define flash_EBIU_AMBCTL0 \
294 (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \
295 flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN)
diff --git a/include/asm-blackfin/mach-bf561/mem_map.h b/include/asm-blackfin/mach-bf561/mem_map.h
deleted file mode 100644
index c26d8486cc4b..000000000000
--- a/include/asm-blackfin/mach-bf561/mem_map.h
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * Memory MAP
3 * Common header file for blackfin BF561 of processors.
4 */
5
6#ifndef _MEM_MAP_561_H_
7#define _MEM_MAP_561_H_
8
9#define COREMMR_BASE 0xFFE00000 /* Core MMRs */
10#define SYSMMR_BASE 0xFFC00000 /* System MMRs */
11
12/* Async Memory Banks */
13#define ASYNC_BANK3_BASE 0x2C000000 /* Async Bank 3 */
14#define ASYNC_BANK3_SIZE 0x04000000 /* 64M */
15#define ASYNC_BANK2_BASE 0x28000000 /* Async Bank 2 */
16#define ASYNC_BANK2_SIZE 0x04000000 /* 64M */
17#define ASYNC_BANK1_BASE 0x24000000 /* Async Bank 1 */
18#define ASYNC_BANK1_SIZE 0x04000000 /* 64M */
19#define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */
20#define ASYNC_BANK0_SIZE 0x04000000 /* 64M */
21
22/* Boot ROM Memory */
23
24#define BOOT_ROM_START 0xEF000000
25#define BOOT_ROM_LENGTH 0x800
26
27/* Level 1 Memory */
28
29#ifdef CONFIG_BFIN_ICACHE
30#define BFIN_ICACHESIZE (16*1024)
31#else
32#define BFIN_ICACHESIZE (0*1024)
33#endif
34
35/* Memory Map for ADSP-BF561 processors */
36
37#ifdef CONFIG_BF561
38#define L1_CODE_START 0xFFA00000
39#define L1_DATA_A_START 0xFF800000
40#define L1_DATA_B_START 0xFF900000
41
42#define L1_CODE_LENGTH 0x4000
43
44#ifdef CONFIG_BFIN_DCACHE
45
46#ifdef CONFIG_BFIN_DCACHE_BANKA
47#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
48#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
49#define L1_DATA_B_LENGTH 0x8000
50#define BFIN_DCACHESIZE (16*1024)
51#define BFIN_DSUPBANKS 1
52#else
53#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
54#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
55#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
56#define BFIN_DCACHESIZE (32*1024)
57#define BFIN_DSUPBANKS 2
58#endif
59
60#else
61#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
62#define L1_DATA_A_LENGTH 0x8000
63#define L1_DATA_B_LENGTH 0x8000
64#define BFIN_DCACHESIZE (0*1024)
65#define BFIN_DSUPBANKS 0
66#endif /*CONFIG_BFIN_DCACHE*/
67#endif
68
69/* Level 2 Memory */
70#define L2_START 0xFEB00000
71#define L2_LENGTH 0x20000
72
73/* Scratch Pad Memory */
74
75#define L1_SCRATCH_START 0xFFB00000
76#define L1_SCRATCH_LENGTH 0x1000
77
78#endif /* _MEM_MAP_533_H_ */
diff --git a/include/asm-blackfin/mach-bf561/portmux.h b/include/asm-blackfin/mach-bf561/portmux.h
deleted file mode 100644
index a6ee8206efb6..000000000000
--- a/include/asm-blackfin/mach-bf561/portmux.h
+++ /dev/null
@@ -1,89 +0,0 @@
1#ifndef _MACH_PORTMUX_H_
2#define _MACH_PORTMUX_H_
3
4#define MAX_RESOURCES MAX_BLACKFIN_GPIOS
5
6#define P_PPI0_CLK (P_DONTCARE)
7#define P_PPI0_FS1 (P_DONTCARE)
8#define P_PPI0_FS2 (P_DONTCARE)
9#define P_PPI0_FS3 (P_DONTCARE)
10#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF47))
11#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF46))
12#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF45))
13#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF44))
14#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF43))
15#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF42))
16#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF41))
17#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF40))
18#define P_PPI0_D0 (P_DONTCARE)
19#define P_PPI0_D1 (P_DONTCARE)
20#define P_PPI0_D2 (P_DONTCARE)
21#define P_PPI0_D3 (P_DONTCARE)
22#define P_PPI0_D4 (P_DONTCARE)
23#define P_PPI0_D5 (P_DONTCARE)
24#define P_PPI0_D6 (P_DONTCARE)
25#define P_PPI0_D7 (P_DONTCARE)
26#define P_PPI1_CLK (P_DONTCARE)
27#define P_PPI1_FS1 (P_DONTCARE)
28#define P_PPI1_FS2 (P_DONTCARE)
29#define P_PPI1_FS3 (P_DONTCARE)
30#define P_PPI1_D15 (P_DEFINED | P_IDENT(GPIO_PF39))
31#define P_PPI1_D14 (P_DEFINED | P_IDENT(GPIO_PF38))
32#define P_PPI1_D13 (P_DEFINED | P_IDENT(GPIO_PF37))
33#define P_PPI1_D12 (P_DEFINED | P_IDENT(GPIO_PF36))
34#define P_PPI1_D11 (P_DEFINED | P_IDENT(GPIO_PF35))
35#define P_PPI1_D10 (P_DEFINED | P_IDENT(GPIO_PF34))
36#define P_PPI1_D9 (P_DEFINED | P_IDENT(GPIO_PF33))
37#define P_PPI1_D8 (P_DEFINED | P_IDENT(GPIO_PF32))
38#define P_PPI1_D0 (P_DONTCARE)
39#define P_PPI1_D1 (P_DONTCARE)
40#define P_PPI1_D2 (P_DONTCARE)
41#define P_PPI1_D3 (P_DONTCARE)
42#define P_PPI1_D4 (P_DONTCARE)
43#define P_PPI1_D5 (P_DONTCARE)
44#define P_PPI1_D6 (P_DONTCARE)
45#define P_PPI1_D7 (P_DONTCARE)
46#define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PF31))
47#define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PF30))
48#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PF29))
49#define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PF28))
50#define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF27))
51#define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF26))
52#define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PF25))
53#define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PF24))
54#define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PF23))
55#define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PF22))
56#define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PF21))
57#define P_SPORT1_DRPRI (P_DONTCARE)
58#define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PF20))
59#define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PF19))
60#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PF18))
61#define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PF17))
62#define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PF16))
63#define P_SPORT0_DRPRI (P_DONTCARE)
64#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15))
65#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF7))
66#define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF6))
67#define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5))
68#define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF4))
69#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF3))
70#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2))
71#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1))
72#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0))
73#define P_TMR11 (P_DONTCARE)
74#define P_TMR10 (P_DONTCARE)
75#define P_TMR9 (P_DONTCARE)
76#define P_TMR8 (P_DONTCARE)
77#define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PF7))
78#define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PF6))
79#define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PF5))
80#define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PF4))
81#define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF3))
82#define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF2))
83#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF1))
84#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF0))
85#define P_SPI0_MOSI (P_DONTCARE)
86#define P_SPI0_MISO (P_DONTCARE)
87#define P_SPI0_SCK (P_DONTCARE)
88
89#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
deleted file mode 100644
index ede210eca4ec..000000000000
--- a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
+++ /dev/null
@@ -1,336 +0,0 @@
1 /*
2 * File: include/asm-blackfin/mach-common/cdef_LPBlackfin.h
3 * Based on:
4 * Author: unknown
5 * COPYRIGHT 2005 Analog Devices
6 * Created: ?
7 * Description:
8 *
9 * Modified:
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; see the file COPYING.
25 * If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29#ifndef _CDEF_LPBLACKFIN_H
30#define _CDEF_LPBLACKFIN_H
31
32/*#if !defined(__ADSPLPBLACKFIN__)
33#warning cdef_LPBlackfin.h should only be included for 532 compatible chips.
34#endif
35*/
36#include <asm/mach-common/def_LPBlackfin.h>
37
38/*Cache & SRAM Memory*/
39#define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS)
40#define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val)
41#define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL)
42#if ANOMALY_05000125
43extern void bfin_write_DMEM_CONTROL(unsigned int val);
44#else
45#define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val)
46#endif
47#define bfin_read_DCPLB_STATUS() bfin_read32(DCPLB_STATUS)
48#define bfin_write_DCPLB_STATUS(val) bfin_write32(DCPLB_STATUS,val)
49#define bfin_read_DCPLB_FAULT_ADDR() bfin_read32(DCPLB_FAULT_ADDR)
50#define bfin_write_DCPLB_FAULT_ADDR(val) bfin_write32(DCPLB_FAULT_ADDR,val)
51/*
52#define MMR_TIMEOUT 0xFFE00010
53*/
54#define bfin_read_DCPLB_ADDR0() bfin_read32(DCPLB_ADDR0)
55#define bfin_write_DCPLB_ADDR0(val) bfin_write32(DCPLB_ADDR0,val)
56#define bfin_read_DCPLB_ADDR1() bfin_read32(DCPLB_ADDR1)
57#define bfin_write_DCPLB_ADDR1(val) bfin_write32(DCPLB_ADDR1,val)
58#define bfin_read_DCPLB_ADDR2() bfin_read32(DCPLB_ADDR2)
59#define bfin_write_DCPLB_ADDR2(val) bfin_write32(DCPLB_ADDR2,val)
60#define bfin_read_DCPLB_ADDR3() bfin_read32(DCPLB_ADDR3)
61#define bfin_write_DCPLB_ADDR3(val) bfin_write32(DCPLB_ADDR3,val)
62#define bfin_read_DCPLB_ADDR4() bfin_read32(DCPLB_ADDR4)
63#define bfin_write_DCPLB_ADDR4(val) bfin_write32(DCPLB_ADDR4,val)
64#define bfin_read_DCPLB_ADDR5() bfin_read32(DCPLB_ADDR5)
65#define bfin_write_DCPLB_ADDR5(val) bfin_write32(DCPLB_ADDR5,val)
66#define bfin_read_DCPLB_ADDR6() bfin_read32(DCPLB_ADDR6)
67#define bfin_write_DCPLB_ADDR6(val) bfin_write32(DCPLB_ADDR6,val)
68#define bfin_read_DCPLB_ADDR7() bfin_read32(DCPLB_ADDR7)
69#define bfin_write_DCPLB_ADDR7(val) bfin_write32(DCPLB_ADDR7,val)
70#define bfin_read_DCPLB_ADDR8() bfin_read32(DCPLB_ADDR8)
71#define bfin_write_DCPLB_ADDR8(val) bfin_write32(DCPLB_ADDR8,val)
72#define bfin_read_DCPLB_ADDR9() bfin_read32(DCPLB_ADDR9)
73#define bfin_write_DCPLB_ADDR9(val) bfin_write32(DCPLB_ADDR9,val)
74#define bfin_read_DCPLB_ADDR10() bfin_read32(DCPLB_ADDR10)
75#define bfin_write_DCPLB_ADDR10(val) bfin_write32(DCPLB_ADDR10,val)
76#define bfin_read_DCPLB_ADDR11() bfin_read32(DCPLB_ADDR11)
77#define bfin_write_DCPLB_ADDR11(val) bfin_write32(DCPLB_ADDR11,val)
78#define bfin_read_DCPLB_ADDR12() bfin_read32(DCPLB_ADDR12)
79#define bfin_write_DCPLB_ADDR12(val) bfin_write32(DCPLB_ADDR12,val)
80#define bfin_read_DCPLB_ADDR13() bfin_read32(DCPLB_ADDR13)
81#define bfin_write_DCPLB_ADDR13(val) bfin_write32(DCPLB_ADDR13,val)
82#define bfin_read_DCPLB_ADDR14() bfin_read32(DCPLB_ADDR14)
83#define bfin_write_DCPLB_ADDR14(val) bfin_write32(DCPLB_ADDR14,val)
84#define bfin_read_DCPLB_ADDR15() bfin_read32(DCPLB_ADDR15)
85#define bfin_write_DCPLB_ADDR15(val) bfin_write32(DCPLB_ADDR15,val)
86#define bfin_read_DCPLB_DATA0() bfin_read32(DCPLB_DATA0)
87#define bfin_write_DCPLB_DATA0(val) bfin_write32(DCPLB_DATA0,val)
88#define bfin_read_DCPLB_DATA1() bfin_read32(DCPLB_DATA1)
89#define bfin_write_DCPLB_DATA1(val) bfin_write32(DCPLB_DATA1,val)
90#define bfin_read_DCPLB_DATA2() bfin_read32(DCPLB_DATA2)
91#define bfin_write_DCPLB_DATA2(val) bfin_write32(DCPLB_DATA2,val)
92#define bfin_read_DCPLB_DATA3() bfin_read32(DCPLB_DATA3)
93#define bfin_write_DCPLB_DATA3(val) bfin_write32(DCPLB_DATA3,val)
94#define bfin_read_DCPLB_DATA4() bfin_read32(DCPLB_DATA4)
95#define bfin_write_DCPLB_DATA4(val) bfin_write32(DCPLB_DATA4,val)
96#define bfin_read_DCPLB_DATA5() bfin_read32(DCPLB_DATA5)
97#define bfin_write_DCPLB_DATA5(val) bfin_write32(DCPLB_DATA5,val)
98#define bfin_read_DCPLB_DATA6() bfin_read32(DCPLB_DATA6)
99#define bfin_write_DCPLB_DATA6(val) bfin_write32(DCPLB_DATA6,val)
100#define bfin_read_DCPLB_DATA7() bfin_read32(DCPLB_DATA7)
101#define bfin_write_DCPLB_DATA7(val) bfin_write32(DCPLB_DATA7,val)
102#define bfin_read_DCPLB_DATA8() bfin_read32(DCPLB_DATA8)
103#define bfin_write_DCPLB_DATA8(val) bfin_write32(DCPLB_DATA8,val)
104#define bfin_read_DCPLB_DATA9() bfin_read32(DCPLB_DATA9)
105#define bfin_write_DCPLB_DATA9(val) bfin_write32(DCPLB_DATA9,val)
106#define bfin_read_DCPLB_DATA10() bfin_read32(DCPLB_DATA10)
107#define bfin_write_DCPLB_DATA10(val) bfin_write32(DCPLB_DATA10,val)
108#define bfin_read_DCPLB_DATA11() bfin_read32(DCPLB_DATA11)
109#define bfin_write_DCPLB_DATA11(val) bfin_write32(DCPLB_DATA11,val)
110#define bfin_read_DCPLB_DATA12() bfin_read32(DCPLB_DATA12)
111#define bfin_write_DCPLB_DATA12(val) bfin_write32(DCPLB_DATA12,val)
112#define bfin_read_DCPLB_DATA13() bfin_read32(DCPLB_DATA13)
113#define bfin_write_DCPLB_DATA13(val) bfin_write32(DCPLB_DATA13,val)
114#define bfin_read_DCPLB_DATA14() bfin_read32(DCPLB_DATA14)
115#define bfin_write_DCPLB_DATA14(val) bfin_write32(DCPLB_DATA14,val)
116#define bfin_read_DCPLB_DATA15() bfin_read32(DCPLB_DATA15)
117#define bfin_write_DCPLB_DATA15(val) bfin_write32(DCPLB_DATA15,val)
118#define bfin_read_DTEST_COMMAND() bfin_read32(DTEST_COMMAND)
119#define bfin_write_DTEST_COMMAND(val) bfin_write32(DTEST_COMMAND,val)
120/*
121#define DTEST_INDEX 0xFFE00304
122*/
123#define bfin_read_DTEST_DATA0() bfin_read32(DTEST_DATA0)
124#define bfin_write_DTEST_DATA0(val) bfin_write32(DTEST_DATA0,val)
125#define bfin_read_DTEST_DATA1() bfin_read32(DTEST_DATA1)
126#define bfin_write_DTEST_DATA1(val) bfin_write32(DTEST_DATA1,val)
127/*
128#define DTEST_DATA2 0xFFE00408
129#define DTEST_DATA3 0xFFE0040C
130*/
131#define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL)
132#if ANOMALY_05000125
133extern void bfin_write_IMEM_CONTROL(unsigned int val);
134#else
135#define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val)
136#endif
137#define bfin_read_ICPLB_STATUS() bfin_read32(ICPLB_STATUS)
138#define bfin_write_ICPLB_STATUS(val) bfin_write32(ICPLB_STATUS,val)
139#define bfin_read_ICPLB_FAULT_ADDR() bfin_read32(ICPLB_FAULT_ADDR)
140#define bfin_write_ICPLB_FAULT_ADDR(val) bfin_write32(ICPLB_FAULT_ADDR,val)
141#define bfin_read_ICPLB_ADDR0() bfin_read32(ICPLB_ADDR0)
142#define bfin_write_ICPLB_ADDR0(val) bfin_write32(ICPLB_ADDR0,val)
143#define bfin_read_ICPLB_ADDR1() bfin_read32(ICPLB_ADDR1)
144#define bfin_write_ICPLB_ADDR1(val) bfin_write32(ICPLB_ADDR1,val)
145#define bfin_read_ICPLB_ADDR2() bfin_read32(ICPLB_ADDR2)
146#define bfin_write_ICPLB_ADDR2(val) bfin_write32(ICPLB_ADDR2,val)
147#define bfin_read_ICPLB_ADDR3() bfin_read32(ICPLB_ADDR3)
148#define bfin_write_ICPLB_ADDR3(val) bfin_write32(ICPLB_ADDR3,val)
149#define bfin_read_ICPLB_ADDR4() bfin_read32(ICPLB_ADDR4)
150#define bfin_write_ICPLB_ADDR4(val) bfin_write32(ICPLB_ADDR4,val)
151#define bfin_read_ICPLB_ADDR5() bfin_read32(ICPLB_ADDR5)
152#define bfin_write_ICPLB_ADDR5(val) bfin_write32(ICPLB_ADDR5,val)
153#define bfin_read_ICPLB_ADDR6() bfin_read32(ICPLB_ADDR6)
154#define bfin_write_ICPLB_ADDR6(val) bfin_write32(ICPLB_ADDR6,val)
155#define bfin_read_ICPLB_ADDR7() bfin_read32(ICPLB_ADDR7)
156#define bfin_write_ICPLB_ADDR7(val) bfin_write32(ICPLB_ADDR7,val)
157#define bfin_read_ICPLB_ADDR8() bfin_read32(ICPLB_ADDR8)
158#define bfin_write_ICPLB_ADDR8(val) bfin_write32(ICPLB_ADDR8,val)
159#define bfin_read_ICPLB_ADDR9() bfin_read32(ICPLB_ADDR9)
160#define bfin_write_ICPLB_ADDR9(val) bfin_write32(ICPLB_ADDR9,val)
161#define bfin_read_ICPLB_ADDR10() bfin_read32(ICPLB_ADDR10)
162#define bfin_write_ICPLB_ADDR10(val) bfin_write32(ICPLB_ADDR10,val)
163#define bfin_read_ICPLB_ADDR11() bfin_read32(ICPLB_ADDR11)
164#define bfin_write_ICPLB_ADDR11(val) bfin_write32(ICPLB_ADDR11,val)
165#define bfin_read_ICPLB_ADDR12() bfin_read32(ICPLB_ADDR12)
166#define bfin_write_ICPLB_ADDR12(val) bfin_write32(ICPLB_ADDR12,val)
167#define bfin_read_ICPLB_ADDR13() bfin_read32(ICPLB_ADDR13)
168#define bfin_write_ICPLB_ADDR13(val) bfin_write32(ICPLB_ADDR13,val)
169#define bfin_read_ICPLB_ADDR14() bfin_read32(ICPLB_ADDR14)
170#define bfin_write_ICPLB_ADDR14(val) bfin_write32(ICPLB_ADDR14,val)
171#define bfin_read_ICPLB_ADDR15() bfin_read32(ICPLB_ADDR15)
172#define bfin_write_ICPLB_ADDR15(val) bfin_write32(ICPLB_ADDR15,val)
173#define bfin_read_ICPLB_DATA0() bfin_read32(ICPLB_DATA0)
174#define bfin_write_ICPLB_DATA0(val) bfin_write32(ICPLB_DATA0,val)
175#define bfin_read_ICPLB_DATA1() bfin_read32(ICPLB_DATA1)
176#define bfin_write_ICPLB_DATA1(val) bfin_write32(ICPLB_DATA1,val)
177#define bfin_read_ICPLB_DATA2() bfin_read32(ICPLB_DATA2)
178#define bfin_write_ICPLB_DATA2(val) bfin_write32(ICPLB_DATA2,val)
179#define bfin_read_ICPLB_DATA3() bfin_read32(ICPLB_DATA3)
180#define bfin_write_ICPLB_DATA3(val) bfin_write32(ICPLB_DATA3,val)
181#define bfin_read_ICPLB_DATA4() bfin_read32(ICPLB_DATA4)
182#define bfin_write_ICPLB_DATA4(val) bfin_write32(ICPLB_DATA4,val)
183#define bfin_read_ICPLB_DATA5() bfin_read32(ICPLB_DATA5)
184#define bfin_write_ICPLB_DATA5(val) bfin_write32(ICPLB_DATA5,val)
185#define bfin_read_ICPLB_DATA6() bfin_read32(ICPLB_DATA6)
186#define bfin_write_ICPLB_DATA6(val) bfin_write32(ICPLB_DATA6,val)
187#define bfin_read_ICPLB_DATA7() bfin_read32(ICPLB_DATA7)
188#define bfin_write_ICPLB_DATA7(val) bfin_write32(ICPLB_DATA7,val)
189#define bfin_read_ICPLB_DATA8() bfin_read32(ICPLB_DATA8)
190#define bfin_write_ICPLB_DATA8(val) bfin_write32(ICPLB_DATA8,val)
191#define bfin_read_ICPLB_DATA9() bfin_read32(ICPLB_DATA9)
192#define bfin_write_ICPLB_DATA9(val) bfin_write32(ICPLB_DATA9,val)
193#define bfin_read_ICPLB_DATA10() bfin_read32(ICPLB_DATA10)
194#define bfin_write_ICPLB_DATA10(val) bfin_write32(ICPLB_DATA10,val)
195#define bfin_read_ICPLB_DATA11() bfin_read32(ICPLB_DATA11)
196#define bfin_write_ICPLB_DATA11(val) bfin_write32(ICPLB_DATA11,val)
197#define bfin_read_ICPLB_DATA12() bfin_read32(ICPLB_DATA12)
198#define bfin_write_ICPLB_DATA12(val) bfin_write32(ICPLB_DATA12,val)
199#define bfin_read_ICPLB_DATA13() bfin_read32(ICPLB_DATA13)
200#define bfin_write_ICPLB_DATA13(val) bfin_write32(ICPLB_DATA13,val)
201#define bfin_read_ICPLB_DATA14() bfin_read32(ICPLB_DATA14)
202#define bfin_write_ICPLB_DATA14(val) bfin_write32(ICPLB_DATA14,val)
203#define bfin_read_ICPLB_DATA15() bfin_read32(ICPLB_DATA15)
204#define bfin_write_ICPLB_DATA15(val) bfin_write32(ICPLB_DATA15,val)
205#define bfin_read_ITEST_COMMAND() bfin_read32(ITEST_COMMAND)
206#define bfin_write_ITEST_COMMAND(val) bfin_write32(ITEST_COMMAND,val)
207#if 0
208#define ITEST_INDEX 0xFFE01304 /* Instruction Test Index Register */
209#endif
210#define bfin_read_ITEST_DATA0() bfin_read32(ITEST_DATA0)
211#define bfin_write_ITEST_DATA0(val) bfin_write32(ITEST_DATA0,val)
212#define bfin_read_ITEST_DATA1() bfin_read32(ITEST_DATA1)
213#define bfin_write_ITEST_DATA1(val) bfin_write32(ITEST_DATA1,val)
214
215/* Event/Interrupt Registers*/
216
217#define bfin_read_EVT0() bfin_read32(EVT0)
218#define bfin_write_EVT0(val) bfin_write32(EVT0,val)
219#define bfin_read_EVT1() bfin_read32(EVT1)
220#define bfin_write_EVT1(val) bfin_write32(EVT1,val)
221#define bfin_read_EVT2() bfin_read32(EVT2)
222#define bfin_write_EVT2(val) bfin_write32(EVT2,val)
223#define bfin_read_EVT3() bfin_read32(EVT3)
224#define bfin_write_EVT3(val) bfin_write32(EVT3,val)
225#define bfin_read_EVT4() bfin_read32(EVT4)
226#define bfin_write_EVT4(val) bfin_write32(EVT4,val)
227#define bfin_read_EVT5() bfin_read32(EVT5)
228#define bfin_write_EVT5(val) bfin_write32(EVT5,val)
229#define bfin_read_EVT6() bfin_read32(EVT6)
230#define bfin_write_EVT6(val) bfin_write32(EVT6,val)
231#define bfin_read_EVT7() bfin_read32(EVT7)
232#define bfin_write_EVT7(val) bfin_write32(EVT7,val)
233#define bfin_read_EVT8() bfin_read32(EVT8)
234#define bfin_write_EVT8(val) bfin_write32(EVT8,val)
235#define bfin_read_EVT9() bfin_read32(EVT9)
236#define bfin_write_EVT9(val) bfin_write32(EVT9,val)
237#define bfin_read_EVT10() bfin_read32(EVT10)
238#define bfin_write_EVT10(val) bfin_write32(EVT10,val)
239#define bfin_read_EVT11() bfin_read32(EVT11)
240#define bfin_write_EVT11(val) bfin_write32(EVT11,val)
241#define bfin_read_EVT12() bfin_read32(EVT12)
242#define bfin_write_EVT12(val) bfin_write32(EVT12,val)
243#define bfin_read_EVT13() bfin_read32(EVT13)
244#define bfin_write_EVT13(val) bfin_write32(EVT13,val)
245#define bfin_read_EVT14() bfin_read32(EVT14)
246#define bfin_write_EVT14(val) bfin_write32(EVT14,val)
247#define bfin_read_EVT15() bfin_read32(EVT15)
248#define bfin_write_EVT15(val) bfin_write32(EVT15,val)
249#define bfin_read_IMASK() bfin_read32(IMASK)
250#define bfin_write_IMASK(val) bfin_write32(IMASK,val)
251#define bfin_read_IPEND() bfin_read32(IPEND)
252#define bfin_write_IPEND(val) bfin_write32(IPEND,val)
253#define bfin_read_ILAT() bfin_read32(ILAT)
254#define bfin_write_ILAT(val) bfin_write32(ILAT,val)
255
256/*Core Timer Registers*/
257#define bfin_read_TCNTL() bfin_read32(TCNTL)
258#define bfin_write_TCNTL(val) bfin_write32(TCNTL,val)
259#define bfin_read_TPERIOD() bfin_read32(TPERIOD)
260#define bfin_write_TPERIOD(val) bfin_write32(TPERIOD,val)
261#define bfin_read_TSCALE() bfin_read32(TSCALE)
262#define bfin_write_TSCALE(val) bfin_write32(TSCALE,val)
263#define bfin_read_TCOUNT() bfin_read32(TCOUNT)
264#define bfin_write_TCOUNT(val) bfin_write32(TCOUNT,val)
265
266/*Debug/MP/Emulation Registers*/
267#define bfin_read_DSPID() bfin_read32(DSPID)
268#define bfin_write_DSPID(val) bfin_write32(DSPID,val)
269#define bfin_read_DBGCTL() bfin_read32(DBGCTL)
270#define bfin_write_DBGCTL(val) bfin_write32(DBGCTL,val)
271#define bfin_read_DBGSTAT() bfin_read32(DBGSTAT)
272#define bfin_write_DBGSTAT(val) bfin_write32(DBGSTAT,val)
273#define bfin_read_EMUDAT() bfin_read32(EMUDAT)
274#define bfin_write_EMUDAT(val) bfin_write32(EMUDAT,val)
275
276/*Trace Buffer Registers*/
277#define bfin_read_TBUFCTL() bfin_read32(TBUFCTL)
278#define bfin_write_TBUFCTL(val) bfin_write32(TBUFCTL,val)
279#define bfin_read_TBUFSTAT() bfin_read32(TBUFSTAT)
280#define bfin_write_TBUFSTAT(val) bfin_write32(TBUFSTAT,val)
281#define bfin_read_TBUF() bfin_read32(TBUF)
282#define bfin_write_TBUF(val) bfin_write32(TBUF,val)
283
284/*Watch Point Control Registers*/
285#define bfin_read_WPIACTL() bfin_read32(WPIACTL)
286#define bfin_write_WPIACTL(val) bfin_write32(WPIACTL,val)
287#define bfin_read_WPIA0() bfin_read32(WPIA0)
288#define bfin_write_WPIA0(val) bfin_write32(WPIA0,val)
289#define bfin_read_WPIA1() bfin_read32(WPIA1)
290#define bfin_write_WPIA1(val) bfin_write32(WPIA1,val)
291#define bfin_read_WPIA2() bfin_read32(WPIA2)
292#define bfin_write_WPIA2(val) bfin_write32(WPIA2,val)
293#define bfin_read_WPIA3() bfin_read32(WPIA3)
294#define bfin_write_WPIA3(val) bfin_write32(WPIA3,val)
295#define bfin_read_WPIA4() bfin_read32(WPIA4)
296#define bfin_write_WPIA4(val) bfin_write32(WPIA4,val)
297#define bfin_read_WPIA5() bfin_read32(WPIA5)
298#define bfin_write_WPIA5(val) bfin_write32(WPIA5,val)
299#define bfin_read_WPIACNT0() bfin_read32(WPIACNT0)
300#define bfin_write_WPIACNT0(val) bfin_write32(WPIACNT0,val)
301#define bfin_read_WPIACNT1() bfin_read32(WPIACNT1)
302#define bfin_write_WPIACNT1(val) bfin_write32(WPIACNT1,val)
303#define bfin_read_WPIACNT2() bfin_read32(WPIACNT2)
304#define bfin_write_WPIACNT2(val) bfin_write32(WPIACNT2,val)
305#define bfin_read_WPIACNT3() bfin_read32(WPIACNT3)
306#define bfin_write_WPIACNT3(val) bfin_write32(WPIACNT3,val)
307#define bfin_read_WPIACNT4() bfin_read32(WPIACNT4)
308#define bfin_write_WPIACNT4(val) bfin_write32(WPIACNT4,val)
309#define bfin_read_WPIACNT5() bfin_read32(WPIACNT5)
310#define bfin_write_WPIACNT5(val) bfin_write32(WPIACNT5,val)
311#define bfin_read_WPDACTL() bfin_read32(WPDACTL)
312#define bfin_write_WPDACTL(val) bfin_write32(WPDACTL,val)
313#define bfin_read_WPDA0() bfin_read32(WPDA0)
314#define bfin_write_WPDA0(val) bfin_write32(WPDA0,val)
315#define bfin_read_WPDA1() bfin_read32(WPDA1)
316#define bfin_write_WPDA1(val) bfin_write32(WPDA1,val)
317#define bfin_read_WPDACNT0() bfin_read32(WPDACNT0)
318#define bfin_write_WPDACNT0(val) bfin_write32(WPDACNT0,val)
319#define bfin_read_WPDACNT1() bfin_read32(WPDACNT1)
320#define bfin_write_WPDACNT1(val) bfin_write32(WPDACNT1,val)
321#define bfin_read_WPSTAT() bfin_read32(WPSTAT)
322#define bfin_write_WPSTAT(val) bfin_write32(WPSTAT,val)
323
324/*Performance Monitor Registers*/
325#define bfin_read_PFCTL() bfin_read32(PFCTL)
326#define bfin_write_PFCTL(val) bfin_write32(PFCTL,val)
327#define bfin_read_PFCNTR0() bfin_read32(PFCNTR0)
328#define bfin_write_PFCNTR0(val) bfin_write32(PFCNTR0,val)
329#define bfin_read_PFCNTR1() bfin_read32(PFCNTR1)
330#define bfin_write_PFCNTR1(val) bfin_write32(PFCNTR1,val)
331
332/*
333#define IPRIO 0xFFE02110
334*/
335
336#endif /* _CDEF_LPBLACKFIN_H */
diff --git a/include/asm-blackfin/mach-common/clocks.h b/include/asm-blackfin/mach-common/clocks.h
deleted file mode 100644
index 033bba92d61c..000000000000
--- a/include/asm-blackfin/mach-common/clocks.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * File: include/asm-blackfin/mach-common/clocks.h
3 * Based on: include/asm-blackfin/mach-bf537/bf537.h
4 * Author: Robin Getz <rgetz@blackfin.uclinux.org>
5 *
6 * Created: 25Jul07
7 * Description: Common Clock definitions for various kernel files
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#ifndef _BFIN_CLOCKS_H
31#define _BFIN_CLOCKS_H
32
33#ifdef CONFIG_CCLK_DIV_1
34# define CONFIG_CCLK_ACT_DIV CCLK_DIV1
35# define CONFIG_CCLK_DIV 1
36#endif
37
38#ifdef CONFIG_CCLK_DIV_2
39# define CONFIG_CCLK_ACT_DIV CCLK_DIV2
40# define CONFIG_CCLK_DIV 2
41#endif
42
43#ifdef CONFIG_CCLK_DIV_4
44# define CONFIG_CCLK_ACT_DIV CCLK_DIV4
45# define CONFIG_CCLK_DIV 4
46#endif
47
48#ifdef CONFIG_CCLK_DIV_8
49# define CONFIG_CCLK_ACT_DIV CCLK_DIV8
50# define CONFIG_CCLK_DIV 8
51#endif
52
53#ifndef CONFIG_PLL_BYPASS
54# ifndef CONFIG_CLKIN_HALF
55# define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
56# else
57# define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
58# endif
59
60# define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
61# define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
62
63#else
64# define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ)
65# define CONFIG_CCLK_HZ (CONFIG_CLKIN_HZ)
66# define CONFIG_SCLK_HZ (CONFIG_CLKIN_HZ)
67# define CONFIG_VCO_MULT 0
68#endif
69
70#endif
diff --git a/include/asm-blackfin/mach-common/context.S b/include/asm-blackfin/mach-common/context.S
deleted file mode 100644
index c0e630edfb9a..000000000000
--- a/include/asm-blackfin/mach-common/context.S
+++ /dev/null
@@ -1,355 +0,0 @@
1/*
2 * File: arch/blackfin/kernel/context.S
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
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/*
31 * NOTE! The single-stepping code assumes that all interrupt handlers
32 * start by saving SYSCFG on the stack with their first instruction.
33 */
34
35/*
36 * Code to save processor context.
37 * We even save the register which are preserved by a function call
38 * - r4, r5, r6, r7, p3, p4, p5
39 */
40.macro save_context_with_interrupts
41 [--sp] = SYSCFG;
42
43 [--sp] = P0; /*orig_p0*/
44 [--sp] = R0; /*orig_r0*/
45
46 [--sp] = ( R7:0, P5:0 );
47 [--sp] = fp;
48 [--sp] = usp;
49
50 [--sp] = i0;
51 [--sp] = i1;
52 [--sp] = i2;
53 [--sp] = i3;
54
55 [--sp] = m0;
56 [--sp] = m1;
57 [--sp] = m2;
58 [--sp] = m3;
59
60 [--sp] = l0;
61 [--sp] = l1;
62 [--sp] = l2;
63 [--sp] = l3;
64
65 [--sp] = b0;
66 [--sp] = b1;
67 [--sp] = b2;
68 [--sp] = b3;
69 [--sp] = a0.x;
70 [--sp] = a0.w;
71 [--sp] = a1.x;
72 [--sp] = a1.w;
73
74 [--sp] = LC0;
75 [--sp] = LC1;
76 [--sp] = LT0;
77 [--sp] = LT1;
78 [--sp] = LB0;
79 [--sp] = LB1;
80
81 [--sp] = ASTAT;
82
83 [--sp] = r0; /* Skip reserved */
84 [--sp] = RETS;
85 r0 = RETI;
86 [--sp] = r0;
87 [--sp] = RETX;
88 [--sp] = RETN;
89 [--sp] = RETE;
90 [--sp] = SEQSTAT;
91 [--sp] = r0; /* Skip IPEND as well. */
92 /* Switch to other method of keeping interrupts disabled. */
93#ifdef CONFIG_DEBUG_HWERR
94 r0 = 0x3f;
95 sti r0;
96#else
97 cli r0;
98#endif
99 [--sp] = RETI; /*orig_pc*/
100 /* Clear all L registers. */
101 r0 = 0 (x);
102 l0 = r0;
103 l1 = r0;
104 l2 = r0;
105 l3 = r0;
106.endm
107
108.macro save_context_syscall
109 [--sp] = SYSCFG;
110
111 [--sp] = P0; /*orig_p0*/
112 [--sp] = R0; /*orig_r0*/
113 [--sp] = ( R7:0, P5:0 );
114 [--sp] = fp;
115 [--sp] = usp;
116
117 [--sp] = i0;
118 [--sp] = i1;
119 [--sp] = i2;
120 [--sp] = i3;
121
122 [--sp] = m0;
123 [--sp] = m1;
124 [--sp] = m2;
125 [--sp] = m3;
126
127 [--sp] = l0;
128 [--sp] = l1;
129 [--sp] = l2;
130 [--sp] = l3;
131
132 [--sp] = b0;
133 [--sp] = b1;
134 [--sp] = b2;
135 [--sp] = b3;
136 [--sp] = a0.x;
137 [--sp] = a0.w;
138 [--sp] = a1.x;
139 [--sp] = a1.w;
140
141 [--sp] = LC0;
142 [--sp] = LC1;
143 [--sp] = LT0;
144 [--sp] = LT1;
145 [--sp] = LB0;
146 [--sp] = LB1;
147
148 [--sp] = ASTAT;
149
150 [--sp] = r0; /* Skip reserved */
151 [--sp] = RETS;
152 r0 = RETI;
153 [--sp] = r0;
154 [--sp] = RETX;
155 [--sp] = RETN;
156 [--sp] = RETE;
157 [--sp] = SEQSTAT;
158 [--sp] = r0; /* Skip IPEND as well. */
159 [--sp] = RETI; /*orig_pc*/
160 /* Clear all L registers. */
161 r0 = 0 (x);
162 l0 = r0;
163 l1 = r0;
164 l2 = r0;
165 l3 = r0;
166.endm
167
168.macro save_context_no_interrupts
169 [--sp] = SYSCFG;
170 [--sp] = P0; /* orig_p0 */
171 [--sp] = R0; /* orig_r0 */
172 [--sp] = ( R7:0, P5:0 );
173 [--sp] = fp;
174 [--sp] = usp;
175
176 [--sp] = i0;
177 [--sp] = i1;
178 [--sp] = i2;
179 [--sp] = i3;
180
181 [--sp] = m0;
182 [--sp] = m1;
183 [--sp] = m2;
184 [--sp] = m3;
185
186 [--sp] = l0;
187 [--sp] = l1;
188 [--sp] = l2;
189 [--sp] = l3;
190
191 [--sp] = b0;
192 [--sp] = b1;
193 [--sp] = b2;
194 [--sp] = b3;
195 [--sp] = a0.x;
196 [--sp] = a0.w;
197 [--sp] = a1.x;
198 [--sp] = a1.w;
199
200 [--sp] = LC0;
201 [--sp] = LC1;
202 [--sp] = LT0;
203 [--sp] = LT1;
204 [--sp] = LB0;
205 [--sp] = LB1;
206
207 [--sp] = ASTAT;
208
209#ifdef CONFIG_KGDB
210 fp = 0(Z);
211 r1 = sp;
212 r1 += 60;
213 r1 += 60;
214 r1 += 60;
215 [--sp] = r1;
216#else
217 [--sp] = r0; /* Skip reserved */
218#endif
219 [--sp] = RETS;
220 r0 = RETI;
221 [--sp] = r0;
222 [--sp] = RETX;
223 [--sp] = RETN;
224 [--sp] = RETE;
225 [--sp] = SEQSTAT;
226#ifdef CONFIG_KGDB
227 r1.l = lo(IPEND);
228 r1.h = hi(IPEND);
229 [--sp] = r1;
230#else
231 [--sp] = r0; /* Skip IPEND as well. */
232#endif
233 [--sp] = r0; /*orig_pc*/
234 /* Clear all L registers. */
235 r0 = 0 (x);
236 l0 = r0;
237 l1 = r0;
238 l2 = r0;
239 l3 = r0;
240.endm
241
242.macro restore_context_no_interrupts
243 sp += 4; /* Skip orig_pc */
244 sp += 4; /* Skip IPEND */
245 SEQSTAT = [sp++];
246 RETE = [sp++];
247 RETN = [sp++];
248 RETX = [sp++];
249 r0 = [sp++];
250 RETI = r0; /* Restore RETI indirectly when in exception */
251 RETS = [sp++];
252
253 sp += 4; /* Skip Reserved */
254
255 ASTAT = [sp++];
256
257 LB1 = [sp++];
258 LB0 = [sp++];
259 LT1 = [sp++];
260 LT0 = [sp++];
261 LC1 = [sp++];
262 LC0 = [sp++];
263
264 a1.w = [sp++];
265 a1.x = [sp++];
266 a0.w = [sp++];
267 a0.x = [sp++];
268 b3 = [sp++];
269 b2 = [sp++];
270 b1 = [sp++];
271 b0 = [sp++];
272
273 l3 = [sp++];
274 l2 = [sp++];
275 l1 = [sp++];
276 l0 = [sp++];
277
278 m3 = [sp++];
279 m2 = [sp++];
280 m1 = [sp++];
281 m0 = [sp++];
282
283 i3 = [sp++];
284 i2 = [sp++];
285 i1 = [sp++];
286 i0 = [sp++];
287
288 sp += 4;
289 fp = [sp++];
290
291 ( R7 : 0, P5 : 0) = [ SP ++ ];
292 sp += 8; /* Skip orig_r0/orig_p0 */
293 SYSCFG = [sp++];
294.endm
295
296.macro restore_context_with_interrupts
297 sp += 4; /* Skip orig_pc */
298 sp += 4; /* Skip IPEND */
299 SEQSTAT = [sp++];
300 RETE = [sp++];
301 RETN = [sp++];
302 RETX = [sp++];
303 RETI = [sp++];
304 RETS = [sp++];
305
306 p0.h = _irq_flags;
307 p0.l = _irq_flags;
308 r0 = [p0];
309 sti r0;
310
311 sp += 4; /* Skip Reserved */
312
313 ASTAT = [sp++];
314
315 LB1 = [sp++];
316 LB0 = [sp++];
317 LT1 = [sp++];
318 LT0 = [sp++];
319 LC1 = [sp++];
320 LC0 = [sp++];
321
322 a1.w = [sp++];
323 a1.x = [sp++];
324 a0.w = [sp++];
325 a0.x = [sp++];
326 b3 = [sp++];
327 b2 = [sp++];
328 b1 = [sp++];
329 b0 = [sp++];
330
331 l3 = [sp++];
332 l2 = [sp++];
333 l1 = [sp++];
334 l0 = [sp++];
335
336 m3 = [sp++];
337 m2 = [sp++];
338 m1 = [sp++];
339 m0 = [sp++];
340
341 i3 = [sp++];
342 i2 = [sp++];
343 i1 = [sp++];
344 i0 = [sp++];
345
346 sp += 4;
347 fp = [sp++];
348
349 ( R7 : 0, P5 : 0) = [ SP ++ ];
350 sp += 8; /* Skip orig_r0/orig_p0 */
351 csync;
352 SYSCFG = [sp++];
353 csync;
354.endm
355
diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h
deleted file mode 100644
index e8967f6124f7..000000000000
--- a/include/asm-blackfin/mach-common/def_LPBlackfin.h
+++ /dev/null
@@ -1,712 +0,0 @@
1 /*
2 * File: include/asm-blackfin/mach-common/def_LPBlackfin.h
3 * Based on:
4 * Author: unknown
5 * COPYRIGHT 2005 Analog Devices
6 * Created: ?
7 * Description:
8 *
9 * Modified:
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; see the file COPYING.
25 * If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29/* LP Blackfin CORE REGISTER BIT & ADDRESS DEFINITIONS FOR ADSP-BF532/33 */
30
31#ifndef _DEF_LPBLACKFIN_H
32#define _DEF_LPBLACKFIN_H
33
34#include <asm/mach/anomaly.h>
35
36#define MK_BMSK_(x) (1<<x)
37
38#ifndef __ASSEMBLY__
39
40#include <linux/types.h>
41
42#if ANOMALY_05000198
43# define NOP_PAD_ANOMALY_05000198 "nop;"
44#else
45# define NOP_PAD_ANOMALY_05000198
46#endif
47
48#define bfin_read8(addr) ({ \
49 uint32_t __v; \
50 __asm__ __volatile__( \
51 NOP_PAD_ANOMALY_05000198 \
52 "%0 = b[%1] (z);" \
53 : "=d" (__v) \
54 : "a" (addr) \
55 ); \
56 __v; })
57
58#define bfin_read16(addr) ({ \
59 uint32_t __v; \
60 __asm__ __volatile__( \
61 NOP_PAD_ANOMALY_05000198 \
62 "%0 = w[%1] (z);" \
63 : "=d" (__v) \
64 : "a" (addr) \
65 ); \
66 __v; })
67
68#define bfin_read32(addr) ({ \
69 uint32_t __v; \
70 __asm__ __volatile__( \
71 NOP_PAD_ANOMALY_05000198 \
72 "%0 = [%1];" \
73 : "=d" (__v) \
74 : "a" (addr) \
75 ); \
76 __v; })
77
78#define bfin_write8(addr, val) \
79 __asm__ __volatile__( \
80 NOP_PAD_ANOMALY_05000198 \
81 "b[%0] = %1;" \
82 : \
83 : "a" (addr), "d" ((uint8_t)(val)) \
84 : "memory" \
85 )
86
87#define bfin_write16(addr, val) \
88 __asm__ __volatile__( \
89 NOP_PAD_ANOMALY_05000198 \
90 "w[%0] = %1;" \
91 : \
92 : "a" (addr), "d" ((uint16_t)(val)) \
93 : "memory" \
94 )
95
96#define bfin_write32(addr, val) \
97 __asm__ __volatile__( \
98 NOP_PAD_ANOMALY_05000198 \
99 "[%0] = %1;" \
100 : \
101 : "a" (addr), "d" (val) \
102 : "memory" \
103 )
104
105#endif /* __ASSEMBLY__ */
106
107/**************************************************
108 * System Register Bits
109 **************************************************/
110
111/**************************************************
112 * ASTAT register
113 **************************************************/
114
115/* definitions of ASTAT bit positions*/
116
117/*Result of last ALU0 or shifter operation is zero*/
118#define ASTAT_AZ_P 0x00000000
119/*Result of last ALU0 or shifter operation is negative*/
120#define ASTAT_AN_P 0x00000001
121/*Condition Code, used for holding comparison results*/
122#define ASTAT_CC_P 0x00000005
123/*Quotient Bit*/
124#define ASTAT_AQ_P 0x00000006
125/*Rounding mode, set for biased, clear for unbiased*/
126#define ASTAT_RND_MOD_P 0x00000008
127/*Result of last ALU0 operation generated a carry*/
128#define ASTAT_AC0_P 0x0000000C
129/*Result of last ALU0 operation generated a carry*/
130#define ASTAT_AC0_COPY_P 0x00000002
131/*Result of last ALU1 operation generated a carry*/
132#define ASTAT_AC1_P 0x0000000D
133/*Result of last ALU0 or MAC0 operation overflowed, sticky for MAC*/
134#define ASTAT_AV0_P 0x00000010
135/*Sticky version of ASTAT_AV0 */
136#define ASTAT_AV0S_P 0x00000011
137/*Result of last MAC1 operation overflowed, sticky for MAC*/
138#define ASTAT_AV1_P 0x00000012
139/*Sticky version of ASTAT_AV1 */
140#define ASTAT_AV1S_P 0x00000013
141/*Result of last ALU0 or MAC0 operation overflowed*/
142#define ASTAT_V_P 0x00000018
143/*Result of last ALU0 or MAC0 operation overflowed*/
144#define ASTAT_V_COPY_P 0x00000003
145/*Sticky version of ASTAT_V*/
146#define ASTAT_VS_P 0x00000019
147
148/* Masks */
149
150/*Result of last ALU0 or shifter operation is zero*/
151#define ASTAT_AZ MK_BMSK_(ASTAT_AZ_P)
152/*Result of last ALU0 or shifter operation is negative*/
153#define ASTAT_AN MK_BMSK_(ASTAT_AN_P)
154/*Result of last ALU0 operation generated a carry*/
155#define ASTAT_AC0 MK_BMSK_(ASTAT_AC0_P)
156/*Result of last ALU0 operation generated a carry*/
157#define ASTAT_AC0_COPY MK_BMSK_(ASTAT_AC0_COPY_P)
158/*Result of last ALU0 operation generated a carry*/
159#define ASTAT_AC1 MK_BMSK_(ASTAT_AC1_P)
160/*Result of last ALU0 or MAC0 operation overflowed, sticky for MAC*/
161#define ASTAT_AV0 MK_BMSK_(ASTAT_AV0_P)
162/*Result of last MAC1 operation overflowed, sticky for MAC*/
163#define ASTAT_AV1 MK_BMSK_(ASTAT_AV1_P)
164/*Condition Code, used for holding comparison results*/
165#define ASTAT_CC MK_BMSK_(ASTAT_CC_P)
166/*Quotient Bit*/
167#define ASTAT_AQ MK_BMSK_(ASTAT_AQ_P)
168/*Rounding mode, set for biased, clear for unbiased*/
169#define ASTAT_RND_MOD MK_BMSK_(ASTAT_RND_MOD_P)
170/*Overflow Bit*/
171#define ASTAT_V MK_BMSK_(ASTAT_V_P)
172/*Overflow Bit*/
173#define ASTAT_V_COPY MK_BMSK_(ASTAT_V_COPY_P)
174
175/**************************************************
176 * SEQSTAT register
177 **************************************************/
178
179/* Bit Positions */
180#define SEQSTAT_EXCAUSE0_P 0x00000000 /* Last exception cause bit 0 */
181#define SEQSTAT_EXCAUSE1_P 0x00000001 /* Last exception cause bit 1 */
182#define SEQSTAT_EXCAUSE2_P 0x00000002 /* Last exception cause bit 2 */
183#define SEQSTAT_EXCAUSE3_P 0x00000003 /* Last exception cause bit 3 */
184#define SEQSTAT_EXCAUSE4_P 0x00000004 /* Last exception cause bit 4 */
185#define SEQSTAT_EXCAUSE5_P 0x00000005 /* Last exception cause bit 5 */
186#define SEQSTAT_IDLE_REQ_P 0x0000000C /* Pending idle mode request,
187 * set by IDLE instruction.
188 */
189#define SEQSTAT_SFTRESET_P 0x0000000D /* Indicates whether the last
190 * reset was a software reset
191 * (=1)
192 */
193#define SEQSTAT_HWERRCAUSE0_P 0x0000000E /* Last hw error cause bit 0 */
194#define SEQSTAT_HWERRCAUSE1_P 0x0000000F /* Last hw error cause bit 1 */
195#define SEQSTAT_HWERRCAUSE2_P 0x00000010 /* Last hw error cause bit 2 */
196#define SEQSTAT_HWERRCAUSE3_P 0x00000011 /* Last hw error cause bit 3 */
197#define SEQSTAT_HWERRCAUSE4_P 0x00000012 /* Last hw error cause bit 4 */
198/* Masks */
199/* Exception cause */
200#define SEQSTAT_EXCAUSE (MK_BMSK_(SEQSTAT_EXCAUSE0_P) | \
201 MK_BMSK_(SEQSTAT_EXCAUSE1_P) | \
202 MK_BMSK_(SEQSTAT_EXCAUSE2_P) | \
203 MK_BMSK_(SEQSTAT_EXCAUSE3_P) | \
204 MK_BMSK_(SEQSTAT_EXCAUSE4_P) | \
205 MK_BMSK_(SEQSTAT_EXCAUSE5_P) | \
206 0)
207
208/* Indicates whether the last reset was a software reset (=1) */
209#define SEQSTAT_SFTRESET (MK_BMSK_(SEQSTAT_SFTRESET_P))
210
211/* Last hw error cause */
212#define SEQSTAT_HWERRCAUSE (MK_BMSK_(SEQSTAT_HWERRCAUSE0_P) | \
213 MK_BMSK_(SEQSTAT_HWERRCAUSE1_P) | \
214 MK_BMSK_(SEQSTAT_HWERRCAUSE2_P) | \
215 MK_BMSK_(SEQSTAT_HWERRCAUSE3_P) | \
216 MK_BMSK_(SEQSTAT_HWERRCAUSE4_P) | \
217 0)
218
219/* Translate bits to something useful */
220
221/* Last hw error cause */
222#define SEQSTAT_HWERRCAUSE_SHIFT (14)
223#define SEQSTAT_HWERRCAUSE_SYSTEM_MMR (0x02 << SEQSTAT_HWERRCAUSE_SHIFT)
224#define SEQSTAT_HWERRCAUSE_EXTERN_ADDR (0x03 << SEQSTAT_HWERRCAUSE_SHIFT)
225#define SEQSTAT_HWERRCAUSE_PERF_FLOW (0x12 << SEQSTAT_HWERRCAUSE_SHIFT)
226#define SEQSTAT_HWERRCAUSE_RAISE_5 (0x18 << SEQSTAT_HWERRCAUSE_SHIFT)
227
228/**************************************************
229 * SYSCFG register
230 **************************************************/
231
232/* Bit Positions */
233#define SYSCFG_SSSTEP_P 0x00000000 /* Supervisor single step, when
234 * set it forces an exception
235 * for each instruction executed
236 */
237#define SYSCFG_CCEN_P 0x00000001 /* Enable cycle counter (=1) */
238#define SYSCFG_SNEN_P 0x00000002 /* Self nesting Interrupt Enable */
239
240/* Masks */
241
242/* Supervisor single step, when set it forces an exception for each
243 *instruction executed
244 */
245#define SYSCFG_SSSTEP MK_BMSK_(SYSCFG_SSSTEP_P )
246/* Enable cycle counter (=1) */
247#define SYSCFG_CCEN MK_BMSK_(SYSCFG_CCEN_P )
248/* Self Nesting Interrupt Enable */
249#define SYSCFG_SNEN MK_BMSK_(SYSCFG_SNEN_P)
250/* Backward-compatibility for typos in prior releases */
251#define SYSCFG_SSSSTEP SYSCFG_SSSTEP
252#define SYSCFG_CCCEN SYSCFG_CCEN
253
254/****************************************************
255 * Core MMR Register Map
256 ****************************************************/
257
258/* Data Cache & SRAM Memory (0xFFE00000 - 0xFFE00404) */
259
260#define SRAM_BASE_ADDRESS 0xFFE00000 /* SRAM Base Address Register */
261#define DMEM_CONTROL 0xFFE00004 /* Data memory control */
262#define DCPLB_STATUS 0xFFE00008 /* Data Cache Programmable Look-Aside
263 * Buffer Status
264 */
265#define DCPLB_FAULT_STATUS 0xFFE00008 /* "" (older define) */
266#define DCPLB_FAULT_ADDR 0xFFE0000C /* Data Cache Programmable Look-Aside
267 * Buffer Fault Address
268 */
269#define DCPLB_ADDR0 0xFFE00100 /* Data Cache Protection Lookaside
270 * Buffer 0
271 */
272#define DCPLB_ADDR1 0xFFE00104 /* Data Cache Protection Lookaside
273 * Buffer 1
274 */
275#define DCPLB_ADDR2 0xFFE00108 /* Data Cache Protection Lookaside
276 * Buffer 2
277 */
278#define DCPLB_ADDR3 0xFFE0010C /* Data Cacheability Protection
279 * Lookaside Buffer 3
280 */
281#define DCPLB_ADDR4 0xFFE00110 /* Data Cacheability Protection
282 * Lookaside Buffer 4
283 */
284#define DCPLB_ADDR5 0xFFE00114 /* Data Cacheability Protection
285 * Lookaside Buffer 5
286 */
287#define DCPLB_ADDR6 0xFFE00118 /* Data Cacheability Protection
288 * Lookaside Buffer 6
289 */
290#define DCPLB_ADDR7 0xFFE0011C /* Data Cacheability Protection
291 * Lookaside Buffer 7
292 */
293#define DCPLB_ADDR8 0xFFE00120 /* Data Cacheability Protection
294 * Lookaside Buffer 8
295 */
296#define DCPLB_ADDR9 0xFFE00124 /* Data Cacheability Protection
297 * Lookaside Buffer 9
298 */
299#define DCPLB_ADDR10 0xFFE00128 /* Data Cacheability Protection
300 * Lookaside Buffer 10
301 */
302#define DCPLB_ADDR11 0xFFE0012C /* Data Cacheability Protection
303 * Lookaside Buffer 11
304 */
305#define DCPLB_ADDR12 0xFFE00130 /* Data Cacheability Protection
306 * Lookaside Buffer 12
307 */
308#define DCPLB_ADDR13 0xFFE00134 /* Data Cacheability Protection
309 * Lookaside Buffer 13
310 */
311#define DCPLB_ADDR14 0xFFE00138 /* Data Cacheability Protection
312 * Lookaside Buffer 14
313 */
314#define DCPLB_ADDR15 0xFFE0013C /* Data Cacheability Protection
315 * Lookaside Buffer 15
316 */
317#define DCPLB_DATA0 0xFFE00200 /* Data Cache 0 Status */
318#define DCPLB_DATA1 0xFFE00204 /* Data Cache 1 Status */
319#define DCPLB_DATA2 0xFFE00208 /* Data Cache 2 Status */
320#define DCPLB_DATA3 0xFFE0020C /* Data Cache 3 Status */
321#define DCPLB_DATA4 0xFFE00210 /* Data Cache 4 Status */
322#define DCPLB_DATA5 0xFFE00214 /* Data Cache 5 Status */
323#define DCPLB_DATA6 0xFFE00218 /* Data Cache 6 Status */
324#define DCPLB_DATA7 0xFFE0021C /* Data Cache 7 Status */
325#define DCPLB_DATA8 0xFFE00220 /* Data Cache 8 Status */
326#define DCPLB_DATA9 0xFFE00224 /* Data Cache 9 Status */
327#define DCPLB_DATA10 0xFFE00228 /* Data Cache 10 Status */
328#define DCPLB_DATA11 0xFFE0022C /* Data Cache 11 Status */
329#define DCPLB_DATA12 0xFFE00230 /* Data Cache 12 Status */
330#define DCPLB_DATA13 0xFFE00234 /* Data Cache 13 Status */
331#define DCPLB_DATA14 0xFFE00238 /* Data Cache 14 Status */
332#define DCPLB_DATA15 0xFFE0023C /* Data Cache 15 Status */
333#define DCPLB_DATA16 0xFFE00240 /* Extra Dummy entry */
334
335#define DTEST_COMMAND 0xFFE00300 /* Data Test Command Register */
336#define DTEST_DATA0 0xFFE00400 /* Data Test Data Register */
337#define DTEST_DATA1 0xFFE00404 /* Data Test Data Register */
338
339/* Instruction Cache & SRAM Memory (0xFFE01004 - 0xFFE01404) */
340
341#define IMEM_CONTROL 0xFFE01004 /* Instruction Memory Control */
342#define ICPLB_STATUS 0xFFE01008 /* Instruction Cache miss status */
343#define CODE_FAULT_STATUS 0xFFE01008 /* "" (older define) */
344#define ICPLB_FAULT_ADDR 0xFFE0100C /* Instruction Cache miss address */
345#define CODE_FAULT_ADDR 0xFFE0100C /* "" (older define) */
346#define ICPLB_ADDR0 0xFFE01100 /* Instruction Cacheability
347 * Protection Lookaside Buffer 0
348 */
349#define ICPLB_ADDR1 0xFFE01104 /* Instruction Cacheability
350 * Protection Lookaside Buffer 1
351 */
352#define ICPLB_ADDR2 0xFFE01108 /* Instruction Cacheability
353 * Protection Lookaside Buffer 2
354 */
355#define ICPLB_ADDR3 0xFFE0110C /* Instruction Cacheability
356 * Protection Lookaside Buffer 3
357 */
358#define ICPLB_ADDR4 0xFFE01110 /* Instruction Cacheability
359 * Protection Lookaside Buffer 4
360 */
361#define ICPLB_ADDR5 0xFFE01114 /* Instruction Cacheability
362 * Protection Lookaside Buffer 5
363 */
364#define ICPLB_ADDR6 0xFFE01118 /* Instruction Cacheability
365 * Protection Lookaside Buffer 6
366 */
367#define ICPLB_ADDR7 0xFFE0111C /* Instruction Cacheability
368 * Protection Lookaside Buffer 7
369 */
370#define ICPLB_ADDR8 0xFFE01120 /* Instruction Cacheability
371 * Protection Lookaside Buffer 8
372 */
373#define ICPLB_ADDR9 0xFFE01124 /* Instruction Cacheability
374 * Protection Lookaside Buffer 9
375 */
376#define ICPLB_ADDR10 0xFFE01128 /* Instruction Cacheability
377 * Protection Lookaside Buffer 10
378 */
379#define ICPLB_ADDR11 0xFFE0112C /* Instruction Cacheability
380 * Protection Lookaside Buffer 11
381 */
382#define ICPLB_ADDR12 0xFFE01130 /* Instruction Cacheability
383 * Protection Lookaside Buffer 12
384 */
385#define ICPLB_ADDR13 0xFFE01134 /* Instruction Cacheability
386 * Protection Lookaside Buffer 13
387 */
388#define ICPLB_ADDR14 0xFFE01138 /* Instruction Cacheability
389 * Protection Lookaside Buffer 14
390 */
391#define ICPLB_ADDR15 0xFFE0113C /* Instruction Cacheability
392 * Protection Lookaside Buffer 15
393 */
394#define ICPLB_DATA0 0xFFE01200 /* Instruction Cache 0 Status */
395#define ICPLB_DATA1 0xFFE01204 /* Instruction Cache 1 Status */
396#define ICPLB_DATA2 0xFFE01208 /* Instruction Cache 2 Status */
397#define ICPLB_DATA3 0xFFE0120C /* Instruction Cache 3 Status */
398#define ICPLB_DATA4 0xFFE01210 /* Instruction Cache 4 Status */
399#define ICPLB_DATA5 0xFFE01214 /* Instruction Cache 5 Status */
400#define ICPLB_DATA6 0xFFE01218 /* Instruction Cache 6 Status */
401#define ICPLB_DATA7 0xFFE0121C /* Instruction Cache 7 Status */
402#define ICPLB_DATA8 0xFFE01220 /* Instruction Cache 8 Status */
403#define ICPLB_DATA9 0xFFE01224 /* Instruction Cache 9 Status */
404#define ICPLB_DATA10 0xFFE01228 /* Instruction Cache 10 Status */
405#define ICPLB_DATA11 0xFFE0122C /* Instruction Cache 11 Status */
406#define ICPLB_DATA12 0xFFE01230 /* Instruction Cache 12 Status */
407#define ICPLB_DATA13 0xFFE01234 /* Instruction Cache 13 Status */
408#define ICPLB_DATA14 0xFFE01238 /* Instruction Cache 14 Status */
409#define ICPLB_DATA15 0xFFE0123C /* Instruction Cache 15 Status */
410#define ITEST_COMMAND 0xFFE01300 /* Instruction Test Command Register */
411#define ITEST_DATA0 0xFFE01400 /* Instruction Test Data Register */
412#define ITEST_DATA1 0xFFE01404 /* Instruction Test Data Register */
413
414/* Event/Interrupt Controller Registers (0xFFE02000 - 0xFFE02110) */
415
416#define EVT0 0xFFE02000 /* Event Vector 0 ESR Address */
417#define EVT1 0xFFE02004 /* Event Vector 1 ESR Address */
418#define EVT2 0xFFE02008 /* Event Vector 2 ESR Address */
419#define EVT3 0xFFE0200C /* Event Vector 3 ESR Address */
420#define EVT4 0xFFE02010 /* Event Vector 4 ESR Address */
421#define EVT5 0xFFE02014 /* Event Vector 5 ESR Address */
422#define EVT6 0xFFE02018 /* Event Vector 6 ESR Address */
423#define EVT7 0xFFE0201C /* Event Vector 7 ESR Address */
424#define EVT8 0xFFE02020 /* Event Vector 8 ESR Address */
425#define EVT9 0xFFE02024 /* Event Vector 9 ESR Address */
426#define EVT10 0xFFE02028 /* Event Vector 10 ESR Address */
427#define EVT11 0xFFE0202C /* Event Vector 11 ESR Address */
428#define EVT12 0xFFE02030 /* Event Vector 12 ESR Address */
429#define EVT13 0xFFE02034 /* Event Vector 13 ESR Address */
430#define EVT14 0xFFE02038 /* Event Vector 14 ESR Address */
431#define EVT15 0xFFE0203C /* Event Vector 15 ESR Address */
432#define IMASK 0xFFE02104 /* Interrupt Mask Register */
433#define IPEND 0xFFE02108 /* Interrupt Pending Register */
434#define ILAT 0xFFE0210C /* Interrupt Latch Register */
435#define IPRIO 0xFFE02110 /* Core Interrupt Priority Register */
436
437/* Core Timer Registers (0xFFE03000 - 0xFFE0300C) */
438
439#define TCNTL 0xFFE03000 /* Core Timer Control Register */
440#define TPERIOD 0xFFE03004 /* Core Timer Period Register */
441#define TSCALE 0xFFE03008 /* Core Timer Scale Register */
442#define TCOUNT 0xFFE0300C /* Core Timer Count Register */
443
444/* Debug/MP/Emulation Registers (0xFFE05000 - 0xFFE05008) */
445#define DSPID 0xFFE05000 /* DSP Processor ID Register for
446 * MP implementations
447 */
448
449#define DBGSTAT 0xFFE05008 /* Debug Status Register */
450
451/* Trace Buffer Registers (0xFFE06000 - 0xFFE06100) */
452
453#define TBUFCTL 0xFFE06000 /* Trace Buffer Control Register */
454#define TBUFSTAT 0xFFE06004 /* Trace Buffer Status Register */
455#define TBUF 0xFFE06100 /* Trace Buffer */
456
457/* Watchpoint Control Registers (0xFFE07000 - 0xFFE07200) */
458
459/* Watchpoint Instruction Address Control Register */
460#define WPIACTL 0xFFE07000
461/* Watchpoint Instruction Address Register 0 */
462#define WPIA0 0xFFE07040
463/* Watchpoint Instruction Address Register 1 */
464#define WPIA1 0xFFE07044
465/* Watchpoint Instruction Address Register 2 */
466#define WPIA2 0xFFE07048
467/* Watchpoint Instruction Address Register 3 */
468#define WPIA3 0xFFE0704C
469/* Watchpoint Instruction Address Register 4 */
470#define WPIA4 0xFFE07050
471/* Watchpoint Instruction Address Register 5 */
472#define WPIA5 0xFFE07054
473/* Watchpoint Instruction Address Count Register 0 */
474#define WPIACNT0 0xFFE07080
475/* Watchpoint Instruction Address Count Register 1 */
476#define WPIACNT1 0xFFE07084
477/* Watchpoint Instruction Address Count Register 2 */
478#define WPIACNT2 0xFFE07088
479/* Watchpoint Instruction Address Count Register 3 */
480#define WPIACNT3 0xFFE0708C
481/* Watchpoint Instruction Address Count Register 4 */
482#define WPIACNT4 0xFFE07090
483/* Watchpoint Instruction Address Count Register 5 */
484#define WPIACNT5 0xFFE07094
485/* Watchpoint Data Address Control Register */
486#define WPDACTL 0xFFE07100
487/* Watchpoint Data Address Register 0 */
488#define WPDA0 0xFFE07140
489/* Watchpoint Data Address Register 1 */
490#define WPDA1 0xFFE07144
491/* Watchpoint Data Address Count Value Register 0 */
492#define WPDACNT0 0xFFE07180
493/* Watchpoint Data Address Count Value Register 1 */
494#define WPDACNT1 0xFFE07184
495/* Watchpoint Status Register */
496#define WPSTAT 0xFFE07200
497
498/* Performance Monitor Registers (0xFFE08000 - 0xFFE08104) */
499
500/* Performance Monitor Control Register */
501#define PFCTL 0xFFE08000
502/* Performance Monitor Counter Register 0 */
503#define PFCNTR0 0xFFE08100
504/* Performance Monitor Counter Register 1 */
505#define PFCNTR1 0xFFE08104
506
507/****************************************************
508 * Core MMR Register Bits
509 ****************************************************/
510
511/**************************************************
512 * EVT registers (ILAT, IMASK, and IPEND).
513 **************************************************/
514
515/* Bit Positions */
516#define EVT_EMU_P 0x00000000 /* Emulator interrupt bit position */
517#define EVT_RST_P 0x00000001 /* Reset interrupt bit position */
518#define EVT_NMI_P 0x00000002 /* Non Maskable interrupt bit position */
519#define EVT_EVX_P 0x00000003 /* Exception bit position */
520#define EVT_IRPTEN_P 0x00000004 /* Global interrupt enable bit position */
521#define EVT_IVHW_P 0x00000005 /* Hardware Error interrupt bit position */
522#define EVT_IVTMR_P 0x00000006 /* Timer interrupt bit position */
523#define EVT_IVG7_P 0x00000007 /* IVG7 interrupt bit position */
524#define EVT_IVG8_P 0x00000008 /* IVG8 interrupt bit position */
525#define EVT_IVG9_P 0x00000009 /* IVG9 interrupt bit position */
526#define EVT_IVG10_P 0x0000000a /* IVG10 interrupt bit position */
527#define EVT_IVG11_P 0x0000000b /* IVG11 interrupt bit position */
528#define EVT_IVG12_P 0x0000000c /* IVG12 interrupt bit position */
529#define EVT_IVG13_P 0x0000000d /* IVG13 interrupt bit position */
530#define EVT_IVG14_P 0x0000000e /* IVG14 interrupt bit position */
531#define EVT_IVG15_P 0x0000000f /* IVG15 interrupt bit position */
532
533/* Masks */
534#define EVT_EMU MK_BMSK_(EVT_EMU_P ) /* Emulator interrupt mask */
535#define EVT_RST MK_BMSK_(EVT_RST_P ) /* Reset interrupt mask */
536#define EVT_NMI MK_BMSK_(EVT_NMI_P ) /* Non Maskable interrupt mask */
537#define EVT_EVX MK_BMSK_(EVT_EVX_P ) /* Exception mask */
538#define EVT_IRPTEN MK_BMSK_(EVT_IRPTEN_P) /* Global interrupt enable mask */
539#define EVT_IVHW MK_BMSK_(EVT_IVHW_P ) /* Hardware Error interrupt mask */
540#define EVT_IVTMR MK_BMSK_(EVT_IVTMR_P ) /* Timer interrupt mask */
541#define EVT_IVG7 MK_BMSK_(EVT_IVG7_P ) /* IVG7 interrupt mask */
542#define EVT_IVG8 MK_BMSK_(EVT_IVG8_P ) /* IVG8 interrupt mask */
543#define EVT_IVG9 MK_BMSK_(EVT_IVG9_P ) /* IVG9 interrupt mask */
544#define EVT_IVG10 MK_BMSK_(EVT_IVG10_P ) /* IVG10 interrupt mask */
545#define EVT_IVG11 MK_BMSK_(EVT_IVG11_P ) /* IVG11 interrupt mask */
546#define EVT_IVG12 MK_BMSK_(EVT_IVG12_P ) /* IVG12 interrupt mask */
547#define EVT_IVG13 MK_BMSK_(EVT_IVG13_P ) /* IVG13 interrupt mask */
548#define EVT_IVG14 MK_BMSK_(EVT_IVG14_P ) /* IVG14 interrupt mask */
549#define EVT_IVG15 MK_BMSK_(EVT_IVG15_P ) /* IVG15 interrupt mask */
550
551/**************************************************
552 * DMEM_CONTROL Register
553 **************************************************/
554/* Bit Positions */
555#define ENDM_P 0x00 /* (doesn't really exist) Enable
556 *Data Memory L1
557 */
558#define DMCTL_ENDM_P ENDM_P /* "" (older define) */
559
560#define ENDCPLB_P 0x01 /* Enable DCPLBS */
561#define DMCTL_ENDCPLB_P ENDCPLB_P /* "" (older define) */
562#define DMC0_P 0x02 /* L1 Data Memory Configure bit 0 */
563#define DMCTL_DMC0_P DMC0_P /* "" (older define) */
564#define DMC1_P 0x03 /* L1 Data Memory Configure bit 1 */
565#define DMCTL_DMC1_P DMC1_P /* "" (older define) */
566#define DCBS_P 0x04 /* L1 Data Cache Bank Select */
567#define PORT_PREF0_P 0x12 /* DAG0 Port Preference */
568#define PORT_PREF1_P 0x13 /* DAG1 Port Preference */
569
570/* Masks */
571#define ENDM 0x00000001 /* (doesn't really exist) Enable
572 * Data Memory L1
573 */
574#define ENDCPLB 0x00000002 /* Enable DCPLB */
575#define ASRAM_BSRAM 0x00000000
576#define ACACHE_BSRAM 0x00000008
577#define ACACHE_BCACHE 0x0000000C
578#define DCBS 0x00000010 /* L1 Data Cache Bank Select */
579#define PORT_PREF0 0x00001000 /* DAG0 Port Preference */
580#define PORT_PREF1 0x00002000 /* DAG1 Port Preference */
581
582/* IMEM_CONTROL Register */
583/* Bit Positions */
584#define ENIM_P 0x00 /* Enable L1 Code Memory */
585#define IMCTL_ENIM_P 0x00 /* "" (older define) */
586#define ENICPLB_P 0x01 /* Enable ICPLB */
587#define IMCTL_ENICPLB_P 0x01 /* "" (older define) */
588#define IMC_P 0x02 /* Enable */
589#define IMCTL_IMC_P 0x02 /* Configure L1 code memory as
590 * cache (0=SRAM)
591 */
592#define ILOC0_P 0x03 /* Lock Way 0 */
593#define ILOC1_P 0x04 /* Lock Way 1 */
594#define ILOC2_P 0x05 /* Lock Way 2 */
595#define ILOC3_P 0x06 /* Lock Way 3 */
596#define LRUPRIORST_P 0x0D /* Least Recently Used Replacement
597 * Priority
598 */
599/* Masks */
600#define ENIM 0x00000001 /* Enable L1 Code Memory */
601#define ENICPLB 0x00000002 /* Enable ICPLB */
602#define IMC 0x00000004 /* Configure L1 code memory as
603 * cache (0=SRAM)
604 */
605#define ILOC0 0x00000008 /* Lock Way 0 */
606#define ILOC1 0x00000010 /* Lock Way 1 */
607#define ILOC2 0x00000020 /* Lock Way 2 */
608#define ILOC3 0x00000040 /* Lock Way 3 */
609#define LRUPRIORST 0x00002000 /* Least Recently Used Replacement
610 * Priority
611 */
612
613/* TCNTL Masks */
614#define TMPWR 0x00000001 /* Timer Low Power Control,
615 * 0=low power mode, 1=active state
616 */
617#define TMREN 0x00000002 /* Timer enable, 0=disable, 1=enable */
618#define TAUTORLD 0x00000004 /* Timer auto reload */
619#define TINT 0x00000008 /* Timer generated interrupt 0=no
620 * interrupt has been generated,
621 * 1=interrupt has been generated
622 * (sticky)
623 */
624
625/* DCPLB_DATA and ICPLB_DATA Registers */
626/* Bit Positions */
627#define CPLB_VALID_P 0x00000000 /* 0=invalid entry, 1=valid entry */
628#define CPLB_LOCK_P 0x00000001 /* 0=entry may be replaced, 1=entry
629 * locked
630 */
631#define CPLB_USER_RD_P 0x00000002 /* 0=no read access, 1=read access
632 * allowed (user mode)
633 */
634/* Masks */
635#define CPLB_VALID 0x00000001 /* 0=invalid entry, 1=valid entry */
636#define CPLB_LOCK 0x00000002 /* 0=entry may be replaced, 1=entry
637 * locked
638 */
639#define CPLB_USER_RD 0x00000004 /* 0=no read access, 1=read access
640 * allowed (user mode)
641 */
642
643#define PAGE_SIZE_1KB 0x00000000 /* 1 KB page size */
644#define PAGE_SIZE_4KB 0x00010000 /* 4 KB page size */
645#define PAGE_SIZE_1MB 0x00020000 /* 1 MB page size */
646#define PAGE_SIZE_4MB 0x00030000 /* 4 MB page size */
647#define CPLB_L1SRAM 0x00000020 /* 0=SRAM mapped in L1, 0=SRAM not
648 * mapped to L1
649 */
650#define CPLB_PORTPRIO 0x00000200 /* 0=low priority port, 1= high
651 * priority port
652 */
653#define CPLB_L1_CHBL 0x00001000 /* 0=non-cacheable in L1, 1=cacheable
654 * in L1
655 */
656/* ICPLB_DATA only */
657#define CPLB_LRUPRIO 0x00000100 /* 0=can be replaced by any line,
658 * 1=priority for non-replacement
659 */
660/* DCPLB_DATA only */
661#define CPLB_USER_WR 0x00000008 /* 0=no write access, 0=write
662 * access allowed (user mode)
663 */
664#define CPLB_SUPV_WR 0x00000010 /* 0=no write access, 0=write
665 * access allowed (supervisor mode)
666 */
667#define CPLB_DIRTY 0x00000080 /* 1=dirty, 0=clean */
668#define CPLB_L1_AOW 0x00008000 /* 0=do not allocate cache lines on
669 * write-through writes,
670 * 1= allocate cache lines on
671 * write-through writes.
672 */
673#define CPLB_WT 0x00004000 /* 0=write-back, 1=write-through */
674
675#define CPLB_ALL_ACCESS CPLB_SUPV_WR | CPLB_USER_RD | CPLB_USER_WR
676
677/* TBUFCTL Masks */
678#define TBUFPWR 0x0001
679#define TBUFEN 0x0002
680#define TBUFOVF 0x0004
681#define TBUFCMPLP_SINGLE 0x0008
682#define TBUFCMPLP_DOUBLE 0x0010
683#define TBUFCMPLP (TBUFCMPLP_SINGLE | TBUFCMPLP_DOUBLE)
684
685/* TBUFSTAT Masks */
686#define TBUFCNT 0x001F
687
688/* ITEST_COMMAND and DTEST_COMMAND Registers */
689/* Masks */
690#define TEST_READ 0x00000000 /* Read Access */
691#define TEST_WRITE 0x00000002 /* Write Access */
692#define TEST_TAG 0x00000000 /* Access TAG */
693#define TEST_DATA 0x00000004 /* Access DATA */
694#define TEST_DW0 0x00000000 /* Select Double Word 0 */
695#define TEST_DW1 0x00000008 /* Select Double Word 1 */
696#define TEST_DW2 0x00000010 /* Select Double Word 2 */
697#define TEST_DW3 0x00000018 /* Select Double Word 3 */
698#define TEST_MB0 0x00000000 /* Select Mini-Bank 0 */
699#define TEST_MB1 0x00010000 /* Select Mini-Bank 1 */
700#define TEST_MB2 0x00020000 /* Select Mini-Bank 2 */
701#define TEST_MB3 0x00030000 /* Select Mini-Bank 3 */
702#define TEST_SET(x) ((x << 5) & 0x03E0) /* Set Index 0->31 */
703#define TEST_WAY0 0x00000000 /* Access Way0 */
704#define TEST_WAY1 0x04000000 /* Access Way1 */
705/* ITEST_COMMAND only */
706#define TEST_WAY2 0x08000000 /* Access Way2 */
707#define TEST_WAY3 0x0C000000 /* Access Way3 */
708/* DTEST_COMMAND only */
709#define TEST_BNKSELA 0x00000000 /* Access SuperBank A */
710#define TEST_BNKSELB 0x00800000 /* Access SuperBank B */
711
712#endif /* _DEF_LPBLACKFIN_H */
diff --git a/include/asm-blackfin/mem_map.h b/include/asm-blackfin/mem_map.h
deleted file mode 100644
index 42d1f37f6d9c..000000000000
--- a/include/asm-blackfin/mem_map.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * mem_map.h
3 * Common header file for blackfin family of processors.
4 *
5 */
6
7#ifndef _MEM_MAP_H_
8#define _MEM_MAP_H_
9
10#include <asm/mach/mem_map.h>
11
12#endif /* _MEM_MAP_H_ */
diff --git a/include/asm-blackfin/mman.h b/include/asm-blackfin/mman.h
deleted file mode 100644
index b58f5ad3f024..000000000000
--- a/include/asm-blackfin/mman.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef __BFIN_MMAN_H__
2#define __BFIN_MMAN_H__
3
4#define PROT_READ 0x1 /* page can be read */
5#define PROT_WRITE 0x2 /* page can be written */
6#define PROT_EXEC 0x4 /* page can be executed */
7#define PROT_SEM 0x8 /* page may be used for atomic ops */
8#define PROT_NONE 0x0 /* page can not be accessed */
9#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
10#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
11
12#define MAP_SHARED 0x01 /* Share changes */
13#define MAP_PRIVATE 0x02 /* Changes are private */
14#define MAP_TYPE 0x0f /* Mask for type of mapping */
15#define MAP_FIXED 0x10 /* Interpret addr exactly */
16#define MAP_ANONYMOUS 0x20 /* don't use a file */
17
18#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
19#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
20#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
21#define MAP_LOCKED 0x2000 /* pages are locked */
22#define MAP_NORESERVE 0x4000 /* don't check for reservations */
23#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
24#define MAP_NONBLOCK 0x10000 /* do not block on IO */
25
26#define MS_ASYNC 1 /* sync memory asynchronously */
27#define MS_INVALIDATE 2 /* invalidate the caches */
28#define MS_SYNC 4 /* synchronous memory sync */
29
30#define MCL_CURRENT 1 /* lock all current mappings */
31#define MCL_FUTURE 2 /* lock all future mappings */
32
33#define MADV_NORMAL 0x0 /* default page-in behavior */
34#define MADV_RANDOM 0x1 /* page-in minimum required */
35#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
36#define MADV_WILLNEED 0x3 /* pre-fault pages */
37#define MADV_DONTNEED 0x4 /* discard these pages */
38
39/* compatibility flags */
40#define MAP_ANON MAP_ANONYMOUS
41#define MAP_FILE 0
42
43#endif /* __BFIN_MMAN_H__ */
diff --git a/include/asm-blackfin/mmu.h b/include/asm-blackfin/mmu.h
deleted file mode 100644
index 757e43906ed4..000000000000
--- a/include/asm-blackfin/mmu.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef __MMU_H
2#define __MMU_H
3
4/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
5
6struct sram_list_struct {
7 struct sram_list_struct *next;
8 void *addr;
9 size_t length;
10};
11
12typedef struct {
13 struct vm_list_struct *vmlist;
14 unsigned long end_brk;
15 unsigned long stack_start;
16
17 /* Points to the location in SDRAM where the L1 stack is normally
18 saved, or NULL if the stack is always in SDRAM. */
19 void *l1_stack_save;
20
21 struct sram_list_struct *sram_list;
22
23#ifdef CONFIG_BINFMT_ELF_FDPIC
24 unsigned long exec_fdpic_loadmap;
25 unsigned long interp_fdpic_loadmap;
26#endif
27#ifdef CONFIG_MPU
28 unsigned long *page_rwx_mask;
29#endif
30} mm_context_t;
31
32#endif
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h
deleted file mode 100644
index f55ec3c23a92..000000000000
--- a/include/asm-blackfin/mmu_context.h
+++ /dev/null
@@ -1,181 +0,0 @@
1/*
2 * File: include/asm-blackfin/mmu_context.h
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2006 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 __BLACKFIN_MMU_CONTEXT_H__
31#define __BLACKFIN_MMU_CONTEXT_H__
32
33#include <linux/gfp.h>
34#include <linux/sched.h>
35#include <asm/setup.h>
36#include <asm/page.h>
37#include <asm/pgalloc.h>
38#include <asm/cplbinit.h>
39
40extern void *current_l1_stack_save;
41extern int nr_l1stack_tasks;
42extern void *l1_stack_base;
43extern unsigned long l1_stack_len;
44
45extern int l1sram_free(const void*);
46extern void *l1sram_alloc_max(void*);
47
48static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
49{
50}
51
52/* Called when creating a new context during fork() or execve(). */
53static inline int
54init_new_context(struct task_struct *tsk, struct mm_struct *mm)
55{
56#ifdef CONFIG_MPU
57 unsigned long p = __get_free_pages(GFP_KERNEL, page_mask_order);
58 mm->context.page_rwx_mask = (unsigned long *)p;
59 memset(mm->context.page_rwx_mask, 0,
60 page_mask_nelts * 3 * sizeof(long));
61#endif
62 return 0;
63}
64
65static inline void free_l1stack(void)
66{
67 nr_l1stack_tasks--;
68 if (nr_l1stack_tasks == 0)
69 l1sram_free(l1_stack_base);
70}
71static inline void destroy_context(struct mm_struct *mm)
72{
73 struct sram_list_struct *tmp;
74
75 if (current_l1_stack_save == mm->context.l1_stack_save)
76 current_l1_stack_save = NULL;
77 if (mm->context.l1_stack_save)
78 free_l1stack();
79
80 while ((tmp = mm->context.sram_list)) {
81 mm->context.sram_list = tmp->next;
82 sram_free(tmp->addr);
83 kfree(tmp);
84 }
85#ifdef CONFIG_MPU
86 if (current_rwx_mask == mm->context.page_rwx_mask)
87 current_rwx_mask = NULL;
88 free_pages((unsigned long)mm->context.page_rwx_mask, page_mask_order);
89#endif
90}
91
92static inline unsigned long
93alloc_l1stack(unsigned long length, unsigned long *stack_base)
94{
95 if (nr_l1stack_tasks == 0) {
96 l1_stack_base = l1sram_alloc_max(&l1_stack_len);
97 if (!l1_stack_base)
98 return 0;
99 }
100
101 if (l1_stack_len < length) {
102 if (nr_l1stack_tasks == 0)
103 l1sram_free(l1_stack_base);
104 return 0;
105 }
106 *stack_base = (unsigned long)l1_stack_base;
107 nr_l1stack_tasks++;
108 return l1_stack_len;
109}
110
111static inline int
112activate_l1stack(struct mm_struct *mm, unsigned long sp_base)
113{
114 if (current_l1_stack_save)
115 memcpy(current_l1_stack_save, l1_stack_base, l1_stack_len);
116 mm->context.l1_stack_save = current_l1_stack_save = (void*)sp_base;
117 memcpy(l1_stack_base, current_l1_stack_save, l1_stack_len);
118 return 1;
119}
120
121#define deactivate_mm(tsk,mm) do { } while (0)
122
123#define activate_mm(prev, next) switch_mm(prev, next, NULL)
124
125static inline void switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
126 struct task_struct *tsk)
127{
128 if (prev_mm == next_mm)
129 return;
130#ifdef CONFIG_MPU
131 if (prev_mm->context.page_rwx_mask == current_rwx_mask) {
132 flush_switched_cplbs();
133 set_mask_dcplbs(next_mm->context.page_rwx_mask);
134 }
135#endif
136
137 /* L1 stack switching. */
138 if (!next_mm->context.l1_stack_save)
139 return;
140 if (next_mm->context.l1_stack_save == current_l1_stack_save)
141 return;
142 if (current_l1_stack_save) {
143 memcpy(current_l1_stack_save, l1_stack_base, l1_stack_len);
144 }
145 current_l1_stack_save = next_mm->context.l1_stack_save;
146 memcpy(l1_stack_base, current_l1_stack_save, l1_stack_len);
147}
148
149#ifdef CONFIG_MPU
150static inline void protect_page(struct mm_struct *mm, unsigned long addr,
151 unsigned long flags)
152{
153 unsigned long *mask = mm->context.page_rwx_mask;
154 unsigned long page = addr >> 12;
155 unsigned long idx = page >> 5;
156 unsigned long bit = 1 << (page & 31);
157
158 if (flags & VM_MAYREAD)
159 mask[idx] |= bit;
160 else
161 mask[idx] &= ~bit;
162 mask += page_mask_nelts;
163 if (flags & VM_MAYWRITE)
164 mask[idx] |= bit;
165 else
166 mask[idx] &= ~bit;
167 mask += page_mask_nelts;
168 if (flags & VM_MAYEXEC)
169 mask[idx] |= bit;
170 else
171 mask[idx] &= ~bit;
172}
173
174static inline void update_protections(struct mm_struct *mm)
175{
176 flush_switched_cplbs();
177 set_mask_dcplbs(mm->context.page_rwx_mask);
178}
179#endif
180
181#endif
diff --git a/include/asm-blackfin/module.h b/include/asm-blackfin/module.h
deleted file mode 100644
index e3128df139d6..000000000000
--- a/include/asm-blackfin/module.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _ASM_BFIN_MODULE_H
2#define _ASM_BFIN_MODULE_H
3
4#define MODULE_SYMBOL_PREFIX "_"
5
6#define Elf_Shdr Elf32_Shdr
7#define Elf_Sym Elf32_Sym
8#define Elf_Ehdr Elf32_Ehdr
9
10struct mod_arch_specific {
11 Elf_Shdr *text_l1;
12 Elf_Shdr *data_a_l1;
13 Elf_Shdr *bss_a_l1;
14 Elf_Shdr *data_b_l1;
15 Elf_Shdr *bss_b_l1;
16 Elf_Shdr *text_l2;
17 Elf_Shdr *data_l2;
18 Elf_Shdr *bss_l2;
19};
20#endif /* _ASM_BFIN_MODULE_H */
diff --git a/include/asm-blackfin/msgbuf.h b/include/asm-blackfin/msgbuf.h
deleted file mode 100644
index 6fcbe8cd801d..000000000000
--- a/include/asm-blackfin/msgbuf.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _BFIN_MSGBUF_H
2#define _BFIN_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for bfin architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct msqid64_ds {
15 struct ipc64_perm msg_perm;
16 __kernel_time_t msg_stime; /* last msgsnd time */
17 unsigned long __unused1;
18 __kernel_time_t msg_rtime; /* last msgrcv time */
19 unsigned long __unused2;
20 __kernel_time_t msg_ctime; /* last change time */
21 unsigned long __unused3;
22 unsigned long msg_cbytes; /* current number of bytes on queue */
23 unsigned long msg_qnum; /* number of messages in queue */
24 unsigned long msg_qbytes; /* max number of bytes on queue */
25 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
26 __kernel_pid_t msg_lrpid; /* last receive pid */
27 unsigned long __unused4;
28 unsigned long __unused5;
29};
30
31#endif /* _BFIN_MSGBUF_H */
diff --git a/include/asm-blackfin/mutex.h b/include/asm-blackfin/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/include/asm-blackfin/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-blackfin/nand.h b/include/asm-blackfin/nand.h
deleted file mode 100644
index afbaafa793f1..000000000000
--- a/include/asm-blackfin/nand.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/* linux/include/asm-blackfin/nand.h
2 *
3 * Copyright (c) 2007 Analog Devices, Inc.
4 * Bryan Wu <bryan.wu@analog.com>
5 *
6 * BF5XX - NAND flash controller platfrom_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13/* struct bf5xx_nand_platform
14 *
15 * define a interface between platfrom board specific code and
16 * bf54x NFC driver.
17 *
18 * nr_partitions = number of partitions pointed to be partitoons (or zero)
19 * partitions = mtd partition list
20 */
21
22#define NFC_PG_SIZE_256 0
23#define NFC_PG_SIZE_512 1
24#define NFC_PG_SIZE_OFFSET 9
25
26#define NFC_NWIDTH_8 0
27#define NFC_NWIDTH_16 1
28#define NFC_NWIDTH_OFFSET 8
29
30#define NFC_RDDLY_OFFSET 4
31#define NFC_WRDLY_OFFSET 0
32
33#define NFC_STAT_NBUSY 1
34
35struct bf5xx_nand_platform {
36 /* NAND chip information */
37 unsigned short page_size;
38 unsigned short data_width;
39
40 /* RD/WR strobe delay timing information, all times in SCLK cycles */
41 unsigned short rd_dly;
42 unsigned short wr_dly;
43
44 /* NAND MTD partition information */
45 int nr_partitions;
46 struct mtd_partition *partitions;
47};
diff --git a/include/asm-blackfin/page.h b/include/asm-blackfin/page.h
deleted file mode 100644
index 344f6a8c1f22..000000000000
--- a/include/asm-blackfin/page.h
+++ /dev/null
@@ -1,88 +0,0 @@
1#ifndef _BLACKFIN_PAGE_H
2#define _BLACKFIN_PAGE_H
3
4/* PAGE_SHIFT determines the page size */
5
6#define PAGE_SHIFT 12
7#ifdef __ASSEMBLY__
8#define PAGE_SIZE (1 << PAGE_SHIFT)
9#else
10#define PAGE_SIZE (1UL << PAGE_SHIFT)
11#endif
12#define PAGE_MASK (~(PAGE_SIZE-1))
13
14#include <asm/setup.h>
15
16#ifndef __ASSEMBLY__
17
18#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
19#define free_user_page(page, addr) free_page(addr)
20
21#define clear_page(page) memset((page), 0, PAGE_SIZE)
22#define copy_page(to,from) memcpy((to), (from), PAGE_SIZE)
23
24#define clear_user_page(page, vaddr,pg) clear_page(page)
25#define copy_user_page(to, from, vaddr,pg) copy_page(to, from)
26
27/*
28 * These are used to make use of C type-checking..
29 */
30typedef struct {
31 unsigned long pte;
32} pte_t;
33typedef struct {
34 unsigned long pmd[16];
35} pmd_t;
36typedef struct {
37 unsigned long pgd;
38} pgd_t;
39typedef struct {
40 unsigned long pgprot;
41} pgprot_t;
42typedef struct page *pgtable_t;
43
44#define pte_val(x) ((x).pte)
45#define pmd_val(x) ((&x)->pmd[0])
46#define pgd_val(x) ((x).pgd)
47#define pgprot_val(x) ((x).pgprot)
48
49#define __pte(x) ((pte_t) { (x) } )
50#define __pmd(x) ((pmd_t) { (x) } )
51#define __pgd(x) ((pgd_t) { (x) } )
52#define __pgprot(x) ((pgprot_t) { (x) } )
53
54extern unsigned long memory_start;
55extern unsigned long memory_end;
56
57#endif /* !__ASSEMBLY__ */
58
59#include <asm/page_offset.h>
60#include <asm/io.h>
61
62#define PAGE_OFFSET (PAGE_OFFSET_RAW)
63
64#ifndef __ASSEMBLY__
65
66#define __pa(vaddr) virt_to_phys((void *)(vaddr))
67#define __va(paddr) phys_to_virt((unsigned long)(paddr))
68
69#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
70
71#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
72#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
73#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
74#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
75#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
76
77#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
78#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
79#define pfn_valid(pfn) ((pfn) < max_mapnr)
80
81#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
82 ((void *)(kaddr) < (void *)memory_end))
83
84#include <asm-generic/page.h>
85
86#endif /* __ASSEMBLY__ */
87
88#endif /* _BLACKFIN_PAGE_H */
diff --git a/include/asm-blackfin/page_offset.h b/include/asm-blackfin/page_offset.h
deleted file mode 100644
index cbaff24b4b25..000000000000
--- a/include/asm-blackfin/page_offset.h
+++ /dev/null
@@ -1,6 +0,0 @@
1
2/* This handles the memory map.. */
3
4#ifdef CONFIG_BLACKFIN
5#define PAGE_OFFSET_RAW 0x00000000
6#endif
diff --git a/include/asm-blackfin/param.h b/include/asm-blackfin/param.h
deleted file mode 100644
index 41564a6347f8..000000000000
--- a/include/asm-blackfin/param.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _BLACKFIN_PARAM_H
2#define _BLACKFIN_PARAM_H
3
4#ifdef __KERNEL__
5#define HZ CONFIG_HZ
6#define USER_HZ 100
7#define CLOCKS_PER_SEC (USER_HZ)
8#endif
9
10#ifndef HZ
11#define HZ 100
12#endif
13
14#define EXEC_PAGESIZE 4096
15
16#ifndef NOGROUP
17#define NOGROUP (-1)
18#endif
19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21
22#endif /* _BLACKFIN_PARAM_H */
diff --git a/include/asm-blackfin/pci.h b/include/asm-blackfin/pci.h
deleted file mode 100644
index 61277358c865..000000000000
--- a/include/asm-blackfin/pci.h
+++ /dev/null
@@ -1,148 +0,0 @@
1/* Changed from asm-m68k version, Lineo Inc. May 2001 */
2
3#ifndef _ASM_BFIN_PCI_H
4#define _ASM_BFIN_PCI_H
5
6#include <asm/scatterlist.h>
7
8/*
9 *
10 * Written by Wout Klaren.
11 */
12
13/* Added by Chang Junxiao */
14#define PCIBIOS_MIN_IO 0x00001000
15#define PCIBIOS_MIN_MEM 0x10000000
16
17#define PCI_DMA_BUS_IS_PHYS (1)
18struct pci_ops;
19
20/*
21 * Structure with hardware dependent information and functions of the
22 * PCI bus.
23 */
24struct pci_bus_info {
25
26 /*
27 * Resources of the PCI bus.
28 */
29 struct resource mem_space;
30 struct resource io_space;
31
32 /*
33 * System dependent functions.
34 */
35 struct pci_ops *bfin_pci_ops;
36 void (*fixup) (int pci_modify);
37 void (*conf_device) (unsigned char bus, unsigned char device_fn);
38};
39
40#define pcibios_assign_all_busses() 0
41static inline void pcibios_set_master(struct pci_dev *dev)
42{
43
44 /* No special bus mastering setup handling */
45}
46static inline void pcibios_penalize_isa_irq(int irq)
47{
48
49 /* We don't do dynamic PCI IRQ allocation */
50}
51static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
52 size_t size, int direction)
53{
54 if (direction == PCI_DMA_NONE)
55 BUG();
56
57 /* return virt_to_bus(ptr); */
58 return (dma_addr_t) ptr;
59}
60
61/* Unmap a single streaming mode DMA translation. The dma_addr and size
62 * must match what was provided for in a previous pci_map_single call. All
63 * other usages are undefined.
64 *
65 * After this call, reads by the cpu to the buffer are guarenteed to see
66 * whatever the device wrote there.
67 */
68static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
69 size_t size, int direction)
70{
71 if (direction == PCI_DMA_NONE)
72 BUG();
73
74 /* Nothing to do */
75}
76
77/* Map a set of buffers described by scatterlist in streaming
78 * mode for DMA. This is the scather-gather version of the
79 * above pci_map_single interface. Here the scatter gather list
80 * elements are each tagged with the appropriate dma address
81 * and length. They are obtained via sg_dma_{address,length}(SG).
82 *
83 * NOTE: An implementation may be able to use a smaller number of
84 * DMA address/length pairs than there are SG table elements.
85 * (for example via virtual mapping capabilities)
86 * The routine returns the number of addr/length pairs actually
87 * used, at most nents.
88 *
89 * Device ownership issues as mentioned above for pci_map_single are
90 * the same here.
91 */
92static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
93 int nents, int direction)
94{
95 if (direction == PCI_DMA_NONE)
96 BUG();
97 return nents;
98}
99
100/* Unmap a set of streaming mode DMA translations.
101 * Again, cpu read rules concerning calls here are the same as for
102 * pci_unmap_single() above.
103 */
104static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
105 int nents, int direction)
106{
107 if (direction == PCI_DMA_NONE)
108 BUG();
109
110 /* Nothing to do */
111}
112
113/* Make physical memory consistent for a single
114 * streaming mode DMA translation after a transfer.
115 *
116 * If you perform a pci_map_single() but wish to interrogate the
117 * buffer using the cpu, yet do not wish to teardown the PCI dma
118 * mapping, you must call this function before doing so. At the
119 * next point you give the PCI dma address back to the card, the
120 * device again owns the buffer.
121 */
122static inline void pci_dma_sync_single(struct pci_dev *hwdev,
123 dma_addr_t dma_handle, size_t size,
124 int direction)
125{
126 if (direction == PCI_DMA_NONE)
127 BUG();
128
129 /* Nothing to do */
130}
131
132/* Make physical memory consistent for a set of streaming
133 * mode DMA translations after a transfer.
134 *
135 * The same as pci_dma_sync_single but for a scatter-gather list,
136 * same rules and usage.
137 */
138static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
139 struct scatterlist *sg, int nelems,
140 int direction)
141{
142 if (direction == PCI_DMA_NONE)
143 BUG();
144
145 /* Nothing to do */
146}
147
148#endif /* _ASM_BFIN_PCI_H */
diff --git a/include/asm-blackfin/percpu.h b/include/asm-blackfin/percpu.h
deleted file mode 100644
index 78dd61f6b39f..000000000000
--- a/include/asm-blackfin/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ARCH_BLACKFIN_PERCPU__
2#define __ARCH_BLACKFIN_PERCPU__
3
4#include <asm-generic/percpu.h>
5
6#endif /* __ARCH_BLACKFIN_PERCPU__ */
diff --git a/include/asm-blackfin/pgalloc.h b/include/asm-blackfin/pgalloc.h
deleted file mode 100644
index c686e0542fd0..000000000000
--- a/include/asm-blackfin/pgalloc.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _BLACKFIN_PGALLOC_H
2#define _BLACKFIN_PGALLOC_H
3
4#include <asm/setup.h>
5
6#define check_pgt_cache() do { } while (0)
7
8#endif /* _BLACKFIN_PGALLOC_H */
diff --git a/include/asm-blackfin/pgtable.h b/include/asm-blackfin/pgtable.h
deleted file mode 100644
index b11b114689c0..000000000000
--- a/include/asm-blackfin/pgtable.h
+++ /dev/null
@@ -1,96 +0,0 @@
1#ifndef _BLACKFIN_PGTABLE_H
2#define _BLACKFIN_PGTABLE_H
3
4#include <asm-generic/4level-fixup.h>
5
6#include <asm/page.h>
7#include <asm/mach-common/def_LPBlackfin.h>
8
9typedef pte_t *pte_addr_t;
10/*
11* Trivial page table functions.
12*/
13#define pgd_present(pgd) (1)
14#define pgd_none(pgd) (0)
15#define pgd_bad(pgd) (0)
16#define pgd_clear(pgdp)
17#define kern_addr_valid(addr) (1)
18
19#define pmd_offset(a, b) ((void *)0)
20#define pmd_none(x) (!pmd_val(x))
21#define pmd_present(x) (pmd_val(x))
22#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
23#define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK)
24
25#define kern_addr_valid(addr) (1)
26
27#define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
28#define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
29#define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
30#define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
31#define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
32
33extern void paging_init(void);
34
35#define __swp_type(x) (0)
36#define __swp_offset(x) (0)
37#define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
38#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
39#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
40
41static inline int pte_file(pte_t pte)
42{
43 return 0;
44}
45
46#define set_pte(pteptr, pteval) (*(pteptr) = pteval)
47#define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval)
48
49/*
50 * Page assess control based on Blackfin CPLB management
51 */
52#define _PAGE_RD (CPLB_USER_RD)
53#define _PAGE_WR (CPLB_USER_WR)
54#define _PAGE_USER (CPLB_USER_RD | CPLB_USER_WR)
55#define _PAGE_ACCESSED CPLB_ALL_ACCESS
56#define _PAGE_DIRTY (CPLB_DIRTY)
57
58#define PTE_BIT_FUNC(fn, op) \
59 static inline pte_t pte_##fn(pte_t _pte) { _pte.pte op; return _pte; }
60
61PTE_BIT_FUNC(rdprotect, &= ~_PAGE_RD);
62PTE_BIT_FUNC(mkread, |= _PAGE_RD);
63PTE_BIT_FUNC(wrprotect, &= ~_PAGE_WR);
64PTE_BIT_FUNC(mkwrite, |= _PAGE_WR);
65PTE_BIT_FUNC(exprotect, &= ~_PAGE_USER);
66PTE_BIT_FUNC(mkexec, |= _PAGE_USER);
67PTE_BIT_FUNC(mkclean, &= ~_PAGE_DIRTY);
68PTE_BIT_FUNC(mkdirty, |= _PAGE_DIRTY);
69PTE_BIT_FUNC(mkold, &= ~_PAGE_ACCESSED);
70PTE_BIT_FUNC(mkyoung, |= _PAGE_ACCESSED);
71
72/*
73 * ZERO_PAGE is a global shared page that is always zero: used
74 * for zero-mapped memory areas etc..
75 */
76#define ZERO_PAGE(vaddr) (virt_to_page(0))
77
78extern unsigned int kobjsize(const void *objp);
79
80#define swapper_pg_dir ((pgd_t *) 0)
81/*
82 * No page table caches to initialise.
83 */
84#define pgtable_cache_init() do { } while (0)
85#define io_remap_pfn_range remap_pfn_range
86
87/*
88 * All 32bit addresses are effectively valid for vmalloc...
89 * Sort of meaningless for non-VM targets.
90 */
91#define VMALLOC_START 0
92#define VMALLOC_END 0xffffffff
93
94#include <asm-generic/pgtable.h>
95
96#endif /* _BLACKFIN_PGTABLE_H */
diff --git a/include/asm-blackfin/poll.h b/include/asm-blackfin/poll.h
deleted file mode 100644
index 94cc2636e0e2..000000000000
--- a/include/asm-blackfin/poll.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef __BFIN_POLL_H
2#define __BFIN_POLL_H
3
4#define POLLIN 1
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256
14#define POLLMSG 0x0400
15#define POLLREMOVE 0x1000
16#define POLLRDHUP 0x2000
17
18struct pollfd {
19 int fd;
20 short events;
21 short revents;
22};
23
24#endif /* __BFIN_POLL_H */
diff --git a/include/asm-blackfin/portmux.h b/include/asm-blackfin/portmux.h
deleted file mode 100644
index 0807b286cd9e..000000000000
--- a/include/asm-blackfin/portmux.h
+++ /dev/null
@@ -1,1188 +0,0 @@
1/*
2 * Common header file for blackfin family of processors.
3 *
4 */
5
6#ifndef _PORTMUX_H_
7#define _PORTMUX_H_
8
9#define P_IDENT(x) ((x) & 0x1FF)
10#define P_FUNCT(x) (((x) & 0x3) << 9)
11#define P_FUNCT2MUX(x) (((x) >> 9) & 0x3)
12#define P_DEFINED 0x8000
13#define P_UNDEF 0x4000
14#define P_MAYSHARE 0x2000
15#define P_DONTCARE 0x1000
16
17
18int peripheral_request(unsigned short per, const char *label);
19void peripheral_free(unsigned short per);
20int peripheral_request_list(const unsigned short per[], const char *label);
21void peripheral_free_list(const unsigned short per[]);
22
23#include <asm/gpio.h>
24#include <asm/mach/portmux.h>
25
26#ifndef P_SPORT2_TFS
27#define P_SPORT2_TFS P_UNDEF
28#endif
29
30#ifndef P_SPORT2_DTSEC
31#define P_SPORT2_DTSEC P_UNDEF
32#endif
33
34#ifndef P_SPORT2_DTPRI
35#define P_SPORT2_DTPRI P_UNDEF
36#endif
37
38#ifndef P_SPORT2_TSCLK
39#define P_SPORT2_TSCLK P_UNDEF
40#endif
41
42#ifndef P_SPORT2_RFS
43#define P_SPORT2_RFS P_UNDEF
44#endif
45
46#ifndef P_SPORT2_DRSEC
47#define P_SPORT2_DRSEC P_UNDEF
48#endif
49
50#ifndef P_SPORT2_DRPRI
51#define P_SPORT2_DRPRI P_UNDEF
52#endif
53
54#ifndef P_SPORT2_RSCLK
55#define P_SPORT2_RSCLK P_UNDEF
56#endif
57
58#ifndef P_SPORT3_TFS
59#define P_SPORT3_TFS P_UNDEF
60#endif
61
62#ifndef P_SPORT3_DTSEC
63#define P_SPORT3_DTSEC P_UNDEF
64#endif
65
66#ifndef P_SPORT3_DTPRI
67#define P_SPORT3_DTPRI P_UNDEF
68#endif
69
70#ifndef P_SPORT3_TSCLK
71#define P_SPORT3_TSCLK P_UNDEF
72#endif
73
74#ifndef P_SPORT3_RFS
75#define P_SPORT3_RFS P_UNDEF
76#endif
77
78#ifndef P_SPORT3_DRSEC
79#define P_SPORT3_DRSEC P_UNDEF
80#endif
81
82#ifndef P_SPORT3_DRPRI
83#define P_SPORT3_DRPRI P_UNDEF
84#endif
85
86#ifndef P_SPORT3_RSCLK
87#define P_SPORT3_RSCLK P_UNDEF
88#endif
89
90#ifndef P_TMR4
91#define P_TMR4 P_UNDEF
92#endif
93
94#ifndef P_TMR5
95#define P_TMR5 P_UNDEF
96#endif
97
98#ifndef P_TMR6
99#define P_TMR6 P_UNDEF
100#endif
101
102#ifndef P_TMR7
103#define P_TMR7 P_UNDEF
104#endif
105
106#ifndef P_TWI1_SCL
107#define P_TWI1_SCL P_UNDEF
108#endif
109
110#ifndef P_TWI1_SDA
111#define P_TWI1_SDA P_UNDEF
112#endif
113
114#ifndef P_UART3_RTS
115#define P_UART3_RTS P_UNDEF
116#endif
117
118#ifndef P_UART3_CTS
119#define P_UART3_CTS P_UNDEF
120#endif
121
122#ifndef P_UART2_TX
123#define P_UART2_TX P_UNDEF
124#endif
125
126#ifndef P_UART2_RX
127#define P_UART2_RX P_UNDEF
128#endif
129
130#ifndef P_UART3_TX
131#define P_UART3_TX P_UNDEF
132#endif
133
134#ifndef P_UART3_RX
135#define P_UART3_RX P_UNDEF
136#endif
137
138#ifndef P_SPI2_SS
139#define P_SPI2_SS P_UNDEF
140#endif
141
142#ifndef P_SPI2_SSEL1
143#define P_SPI2_SSEL1 P_UNDEF
144#endif
145
146#ifndef P_SPI2_SSEL2
147#define P_SPI2_SSEL2 P_UNDEF
148#endif
149
150#ifndef P_SPI2_SSEL3
151#define P_SPI2_SSEL3 P_UNDEF
152#endif
153
154#ifndef P_SPI2_SSEL4
155#define P_SPI2_SSEL4 P_UNDEF
156#endif
157
158#ifndef P_SPI2_SSEL5
159#define P_SPI2_SSEL5 P_UNDEF
160#endif
161
162#ifndef P_SPI2_SSEL6
163#define P_SPI2_SSEL6 P_UNDEF
164#endif
165
166#ifndef P_SPI2_SSEL7
167#define P_SPI2_SSEL7 P_UNDEF
168#endif
169
170#ifndef P_SPI2_SCK
171#define P_SPI2_SCK P_UNDEF
172#endif
173
174#ifndef P_SPI2_MOSI
175#define P_SPI2_MOSI P_UNDEF
176#endif
177
178#ifndef P_SPI2_MISO
179#define P_SPI2_MISO P_UNDEF
180#endif
181
182#ifndef P_TMR0
183#define P_TMR0 P_UNDEF
184#endif
185
186#ifndef P_TMR1
187#define P_TMR1 P_UNDEF
188#endif
189
190#ifndef P_TMR2
191#define P_TMR2 P_UNDEF
192#endif
193
194#ifndef P_TMR3
195#define P_TMR3 P_UNDEF
196#endif
197
198#ifndef P_SPORT0_TFS
199#define P_SPORT0_TFS P_UNDEF
200#endif
201
202#ifndef P_SPORT0_DTSEC
203#define P_SPORT0_DTSEC P_UNDEF
204#endif
205
206#ifndef P_SPORT0_DTPRI
207#define P_SPORT0_DTPRI P_UNDEF
208#endif
209
210#ifndef P_SPORT0_TSCLK
211#define P_SPORT0_TSCLK P_UNDEF
212#endif
213
214#ifndef P_SPORT0_RFS
215#define P_SPORT0_RFS P_UNDEF
216#endif
217
218#ifndef P_SPORT0_DRSEC
219#define P_SPORT0_DRSEC P_UNDEF
220#endif
221
222#ifndef P_SPORT0_DRPRI
223#define P_SPORT0_DRPRI P_UNDEF
224#endif
225
226#ifndef P_SPORT0_RSCLK
227#define P_SPORT0_RSCLK P_UNDEF
228#endif
229
230#ifndef P_SD_D0
231#define P_SD_D0 P_UNDEF
232#endif
233
234#ifndef P_SD_D1
235#define P_SD_D1 P_UNDEF
236#endif
237
238#ifndef P_SD_D2
239#define P_SD_D2 P_UNDEF
240#endif
241
242#ifndef P_SD_D3
243#define P_SD_D3 P_UNDEF
244#endif
245
246#ifndef P_SD_CLK
247#define P_SD_CLK P_UNDEF
248#endif
249
250#ifndef P_SD_CMD
251#define P_SD_CMD P_UNDEF
252#endif
253
254#ifndef P_MMCLK
255#define P_MMCLK P_UNDEF
256#endif
257
258#ifndef P_MBCLK
259#define P_MBCLK P_UNDEF
260#endif
261
262#ifndef P_PPI1_D0
263#define P_PPI1_D0 P_UNDEF
264#endif
265
266#ifndef P_PPI1_D1
267#define P_PPI1_D1 P_UNDEF
268#endif
269
270#ifndef P_PPI1_D2
271#define P_PPI1_D2 P_UNDEF
272#endif
273
274#ifndef P_PPI1_D3
275#define P_PPI1_D3 P_UNDEF
276#endif
277
278#ifndef P_PPI1_D4
279#define P_PPI1_D4 P_UNDEF
280#endif
281
282#ifndef P_PPI1_D5
283#define P_PPI1_D5 P_UNDEF
284#endif
285
286#ifndef P_PPI1_D6
287#define P_PPI1_D6 P_UNDEF
288#endif
289
290#ifndef P_PPI1_D7
291#define P_PPI1_D7 P_UNDEF
292#endif
293
294#ifndef P_PPI1_D8
295#define P_PPI1_D8 P_UNDEF
296#endif
297
298#ifndef P_PPI1_D9
299#define P_PPI1_D9 P_UNDEF
300#endif
301
302#ifndef P_PPI1_D10
303#define P_PPI1_D10 P_UNDEF
304#endif
305
306#ifndef P_PPI1_D11
307#define P_PPI1_D11 P_UNDEF
308#endif
309
310#ifndef P_PPI1_D12
311#define P_PPI1_D12 P_UNDEF
312#endif
313
314#ifndef P_PPI1_D13
315#define P_PPI1_D13 P_UNDEF
316#endif
317
318#ifndef P_PPI1_D14
319#define P_PPI1_D14 P_UNDEF
320#endif
321
322#ifndef P_PPI1_D15
323#define P_PPI1_D15 P_UNDEF
324#endif
325
326#ifndef P_HOST_D8
327#define P_HOST_D8 P_UNDEF
328#endif
329
330#ifndef P_HOST_D9
331#define P_HOST_D9 P_UNDEF
332#endif
333
334#ifndef P_HOST_D10
335#define P_HOST_D10 P_UNDEF
336#endif
337
338#ifndef P_HOST_D11
339#define P_HOST_D11 P_UNDEF
340#endif
341
342#ifndef P_HOST_D12
343#define P_HOST_D12 P_UNDEF
344#endif
345
346#ifndef P_HOST_D13
347#define P_HOST_D13 P_UNDEF
348#endif
349
350#ifndef P_HOST_D14
351#define P_HOST_D14 P_UNDEF
352#endif
353
354#ifndef P_HOST_D15
355#define P_HOST_D15 P_UNDEF
356#endif
357
358#ifndef P_HOST_D0
359#define P_HOST_D0 P_UNDEF
360#endif
361
362#ifndef P_HOST_D1
363#define P_HOST_D1 P_UNDEF
364#endif
365
366#ifndef P_HOST_D2
367#define P_HOST_D2 P_UNDEF
368#endif
369
370#ifndef P_HOST_D3
371#define P_HOST_D3 P_UNDEF
372#endif
373
374#ifndef P_HOST_D4
375#define P_HOST_D4 P_UNDEF
376#endif
377
378#ifndef P_HOST_D5
379#define P_HOST_D5 P_UNDEF
380#endif
381
382#ifndef P_HOST_D6
383#define P_HOST_D6 P_UNDEF
384#endif
385
386#ifndef P_HOST_D7
387#define P_HOST_D7 P_UNDEF
388#endif
389
390#ifndef P_SPORT1_TFS
391#define P_SPORT1_TFS P_UNDEF
392#endif
393
394#ifndef P_SPORT1_DTSEC
395#define P_SPORT1_DTSEC P_UNDEF
396#endif
397
398#ifndef P_SPORT1_DTPRI
399#define P_SPORT1_DTPRI P_UNDEF
400#endif
401
402#ifndef P_SPORT1_TSCLK
403#define P_SPORT1_TSCLK P_UNDEF
404#endif
405
406#ifndef P_SPORT1_RFS
407#define P_SPORT1_RFS P_UNDEF
408#endif
409
410#ifndef P_SPORT1_DRSEC
411#define P_SPORT1_DRSEC P_UNDEF
412#endif
413
414#ifndef P_SPORT1_DRPRI
415#define P_SPORT1_DRPRI P_UNDEF
416#endif
417
418#ifndef P_SPORT1_RSCLK
419#define P_SPORT1_RSCLK P_UNDEF
420#endif
421
422#ifndef P_PPI2_D0
423#define P_PPI2_D0 P_UNDEF
424#endif
425
426#ifndef P_PPI2_D1
427#define P_PPI2_D1 P_UNDEF
428#endif
429
430#ifndef P_PPI2_D2
431#define P_PPI2_D2 P_UNDEF
432#endif
433
434#ifndef P_PPI2_D3
435#define P_PPI2_D3 P_UNDEF
436#endif
437
438#ifndef P_PPI2_D4
439#define P_PPI2_D4 P_UNDEF
440#endif
441
442#ifndef P_PPI2_D5
443#define P_PPI2_D5 P_UNDEF
444#endif
445
446#ifndef P_PPI2_D6
447#define P_PPI2_D6 P_UNDEF
448#endif
449
450#ifndef P_PPI2_D7
451#define P_PPI2_D7 P_UNDEF
452#endif
453
454#ifndef P_PPI0_D18
455#define P_PPI0_D18 P_UNDEF
456#endif
457
458#ifndef P_PPI0_D19
459#define P_PPI0_D19 P_UNDEF
460#endif
461
462#ifndef P_PPI0_D20
463#define P_PPI0_D20 P_UNDEF
464#endif
465
466#ifndef P_PPI0_D21
467#define P_PPI0_D21 P_UNDEF
468#endif
469
470#ifndef P_PPI0_D22
471#define P_PPI0_D22 P_UNDEF
472#endif
473
474#ifndef P_PPI0_D23
475#define P_PPI0_D23 P_UNDEF
476#endif
477
478#ifndef P_KEY_ROW0
479#define P_KEY_ROW0 P_UNDEF
480#endif
481
482#ifndef P_KEY_ROW1
483#define P_KEY_ROW1 P_UNDEF
484#endif
485
486#ifndef P_KEY_ROW2
487#define P_KEY_ROW2 P_UNDEF
488#endif
489
490#ifndef P_KEY_ROW3
491#define P_KEY_ROW3 P_UNDEF
492#endif
493
494#ifndef P_KEY_COL0
495#define P_KEY_COL0 P_UNDEF
496#endif
497
498#ifndef P_KEY_COL1
499#define P_KEY_COL1 P_UNDEF
500#endif
501
502#ifndef P_KEY_COL2
503#define P_KEY_COL2 P_UNDEF
504#endif
505
506#ifndef P_KEY_COL3
507#define P_KEY_COL3 P_UNDEF
508#endif
509
510#ifndef P_SPI0_SCK
511#define P_SPI0_SCK P_UNDEF
512#endif
513
514#ifndef P_SPI0_MISO
515#define P_SPI0_MISO P_UNDEF
516#endif
517
518#ifndef P_SPI0_MOSI
519#define P_SPI0_MOSI P_UNDEF
520#endif
521
522#ifndef P_SPI0_SS
523#define P_SPI0_SS P_UNDEF
524#endif
525
526#ifndef P_SPI0_SSEL1
527#define P_SPI0_SSEL1 P_UNDEF
528#endif
529
530#ifndef P_SPI0_SSEL2
531#define P_SPI0_SSEL2 P_UNDEF
532#endif
533
534#ifndef P_SPI0_SSEL3
535#define P_SPI0_SSEL3 P_UNDEF
536#endif
537
538#ifndef P_SPI0_SSEL4
539#define P_SPI0_SSEL4 P_UNDEF
540#endif
541
542#ifndef P_SPI0_SSEL5
543#define P_SPI0_SSEL5 P_UNDEF
544#endif
545
546#ifndef P_SPI0_SSEL6
547#define P_SPI0_SSEL6 P_UNDEF
548#endif
549
550#ifndef P_SPI0_SSEL7
551#define P_SPI0_SSEL7 P_UNDEF
552#endif
553
554#ifndef P_UART0_TX
555#define P_UART0_TX P_UNDEF
556#endif
557
558#ifndef P_UART0_RX
559#define P_UART0_RX P_UNDEF
560#endif
561
562#ifndef P_UART1_RTS
563#define P_UART1_RTS P_UNDEF
564#endif
565
566#ifndef P_UART1_CTS
567#define P_UART1_CTS P_UNDEF
568#endif
569
570#ifndef P_PPI1_CLK
571#define P_PPI1_CLK P_UNDEF
572#endif
573
574#ifndef P_PPI1_FS1
575#define P_PPI1_FS1 P_UNDEF
576#endif
577
578#ifndef P_PPI1_FS2
579#define P_PPI1_FS2 P_UNDEF
580#endif
581
582#ifndef P_TWI0_SCL
583#define P_TWI0_SCL P_UNDEF
584#endif
585
586#ifndef P_TWI0_SDA
587#define P_TWI0_SDA P_UNDEF
588#endif
589
590#ifndef P_KEY_COL7
591#define P_KEY_COL7 P_UNDEF
592#endif
593
594#ifndef P_KEY_ROW6
595#define P_KEY_ROW6 P_UNDEF
596#endif
597
598#ifndef P_KEY_COL6
599#define P_KEY_COL6 P_UNDEF
600#endif
601
602#ifndef P_KEY_ROW5
603#define P_KEY_ROW5 P_UNDEF
604#endif
605
606#ifndef P_KEY_COL5
607#define P_KEY_COL5 P_UNDEF
608#endif
609
610#ifndef P_KEY_ROW4
611#define P_KEY_ROW4 P_UNDEF
612#endif
613
614#ifndef P_KEY_COL4
615#define P_KEY_COL4 P_UNDEF
616#endif
617
618#ifndef P_KEY_ROW7
619#define P_KEY_ROW7 P_UNDEF
620#endif
621
622#ifndef P_PPI0_D0
623#define P_PPI0_D0 P_UNDEF
624#endif
625
626#ifndef P_PPI0_D1
627#define P_PPI0_D1 P_UNDEF
628#endif
629
630#ifndef P_PPI0_D2
631#define P_PPI0_D2 P_UNDEF
632#endif
633
634#ifndef P_PPI0_D3
635#define P_PPI0_D3 P_UNDEF
636#endif
637
638#ifndef P_PPI0_D4
639#define P_PPI0_D4 P_UNDEF
640#endif
641
642#ifndef P_PPI0_D5
643#define P_PPI0_D5 P_UNDEF
644#endif
645
646#ifndef P_PPI0_D6
647#define P_PPI0_D6 P_UNDEF
648#endif
649
650#ifndef P_PPI0_D7
651#define P_PPI0_D7 P_UNDEF
652#endif
653
654#ifndef P_PPI0_D8
655#define P_PPI0_D8 P_UNDEF
656#endif
657
658#ifndef P_PPI0_D9
659#define P_PPI0_D9 P_UNDEF
660#endif
661
662#ifndef P_PPI0_D10
663#define P_PPI0_D10 P_UNDEF
664#endif
665
666#ifndef P_PPI0_D11
667#define P_PPI0_D11 P_UNDEF
668#endif
669
670#ifndef P_PPI0_D12
671#define P_PPI0_D12 P_UNDEF
672#endif
673
674#ifndef P_PPI0_D13
675#define P_PPI0_D13 P_UNDEF
676#endif
677
678#ifndef P_PPI0_D14
679#define P_PPI0_D14 P_UNDEF
680#endif
681
682#ifndef P_PPI0_D15
683#define P_PPI0_D15 P_UNDEF
684#endif
685
686#ifndef P_ATAPI_D0A
687#define P_ATAPI_D0A P_UNDEF
688#endif
689
690#ifndef P_ATAPI_D1A
691#define P_ATAPI_D1A P_UNDEF
692#endif
693
694#ifndef P_ATAPI_D2A
695#define P_ATAPI_D2A P_UNDEF
696#endif
697
698#ifndef P_ATAPI_D3A
699#define P_ATAPI_D3A P_UNDEF
700#endif
701
702#ifndef P_ATAPI_D4A
703#define P_ATAPI_D4A P_UNDEF
704#endif
705
706#ifndef P_ATAPI_D5A
707#define P_ATAPI_D5A P_UNDEF
708#endif
709
710#ifndef P_ATAPI_D6A
711#define P_ATAPI_D6A P_UNDEF
712#endif
713
714#ifndef P_ATAPI_D7A
715#define P_ATAPI_D7A P_UNDEF
716#endif
717
718#ifndef P_ATAPI_D8A
719#define P_ATAPI_D8A P_UNDEF
720#endif
721
722#ifndef P_ATAPI_D9A
723#define P_ATAPI_D9A P_UNDEF
724#endif
725
726#ifndef P_ATAPI_D10A
727#define P_ATAPI_D10A P_UNDEF
728#endif
729
730#ifndef P_ATAPI_D11A
731#define P_ATAPI_D11A P_UNDEF
732#endif
733
734#ifndef P_ATAPI_D12A
735#define P_ATAPI_D12A P_UNDEF
736#endif
737
738#ifndef P_ATAPI_D13A
739#define P_ATAPI_D13A P_UNDEF
740#endif
741
742#ifndef P_ATAPI_D14A
743#define P_ATAPI_D14A P_UNDEF
744#endif
745
746#ifndef P_ATAPI_D15A
747#define P_ATAPI_D15A P_UNDEF
748#endif
749
750#ifndef P_PPI0_CLK
751#define P_PPI0_CLK P_UNDEF
752#endif
753
754#ifndef P_PPI0_FS1
755#define P_PPI0_FS1 P_UNDEF
756#endif
757
758#ifndef P_PPI0_FS2
759#define P_PPI0_FS2 P_UNDEF
760#endif
761
762#ifndef P_PPI0_D16
763#define P_PPI0_D16 P_UNDEF
764#endif
765
766#ifndef P_PPI0_D17
767#define P_PPI0_D17 P_UNDEF
768#endif
769
770#ifndef P_SPI1_SSEL1
771#define P_SPI1_SSEL1 P_UNDEF
772#endif
773
774#ifndef P_SPI1_SSEL2
775#define P_SPI1_SSEL2 P_UNDEF
776#endif
777
778#ifndef P_SPI1_SSEL3
779#define P_SPI1_SSEL3 P_UNDEF
780#endif
781
782
783#ifndef P_SPI1_SSEL4
784#define P_SPI1_SSEL4 P_UNDEF
785#endif
786
787#ifndef P_SPI1_SSEL5
788#define P_SPI1_SSEL5 P_UNDEF
789#endif
790
791#ifndef P_SPI1_SSEL6
792#define P_SPI1_SSEL6 P_UNDEF
793#endif
794
795#ifndef P_SPI1_SSEL7
796#define P_SPI1_SSEL7 P_UNDEF
797#endif
798
799#ifndef P_SPI1_SCK
800#define P_SPI1_SCK P_UNDEF
801#endif
802
803#ifndef P_SPI1_MISO
804#define P_SPI1_MISO P_UNDEF
805#endif
806
807#ifndef P_SPI1_MOSI
808#define P_SPI1_MOSI P_UNDEF
809#endif
810
811#ifndef P_SPI1_SS
812#define P_SPI1_SS P_UNDEF
813#endif
814
815#ifndef P_CAN0_TX
816#define P_CAN0_TX P_UNDEF
817#endif
818
819#ifndef P_CAN0_RX
820#define P_CAN0_RX P_UNDEF
821#endif
822
823#ifndef P_CAN1_TX
824#define P_CAN1_TX P_UNDEF
825#endif
826
827#ifndef P_CAN1_RX
828#define P_CAN1_RX P_UNDEF
829#endif
830
831#ifndef P_ATAPI_A0A
832#define P_ATAPI_A0A P_UNDEF
833#endif
834
835#ifndef P_ATAPI_A1A
836#define P_ATAPI_A1A P_UNDEF
837#endif
838
839#ifndef P_ATAPI_A2A
840#define P_ATAPI_A2A P_UNDEF
841#endif
842
843#ifndef P_HOST_CE
844#define P_HOST_CE P_UNDEF
845#endif
846
847#ifndef P_HOST_RD
848#define P_HOST_RD P_UNDEF
849#endif
850
851#ifndef P_HOST_WR
852#define P_HOST_WR P_UNDEF
853#endif
854
855#ifndef P_MTXONB
856#define P_MTXONB P_UNDEF
857#endif
858
859#ifndef P_PPI2_FS2
860#define P_PPI2_FS2 P_UNDEF
861#endif
862
863#ifndef P_PPI2_FS1
864#define P_PPI2_FS1 P_UNDEF
865#endif
866
867#ifndef P_PPI2_CLK
868#define P_PPI2_CLK P_UNDEF
869#endif
870
871#ifndef P_CNT_CZM
872#define P_CNT_CZM P_UNDEF
873#endif
874
875#ifndef P_UART1_TX
876#define P_UART1_TX P_UNDEF
877#endif
878
879#ifndef P_UART1_RX
880#define P_UART1_RX P_UNDEF
881#endif
882
883#ifndef P_ATAPI_RESET
884#define P_ATAPI_RESET P_UNDEF
885#endif
886
887#ifndef P_HOST_ADDR
888#define P_HOST_ADDR P_UNDEF
889#endif
890
891#ifndef P_HOST_ACK
892#define P_HOST_ACK P_UNDEF
893#endif
894
895#ifndef P_MTX
896#define P_MTX P_UNDEF
897#endif
898
899#ifndef P_MRX
900#define P_MRX P_UNDEF
901#endif
902
903#ifndef P_MRXONB
904#define P_MRXONB P_UNDEF
905#endif
906
907#ifndef P_A4
908#define P_A4 P_UNDEF
909#endif
910
911#ifndef P_A5
912#define P_A5 P_UNDEF
913#endif
914
915#ifndef P_A6
916#define P_A6 P_UNDEF
917#endif
918
919#ifndef P_A7
920#define P_A7 P_UNDEF
921#endif
922
923#ifndef P_A8
924#define P_A8 P_UNDEF
925#endif
926
927#ifndef P_A9
928#define P_A9 P_UNDEF
929#endif
930
931#ifndef P_PPI1_FS3
932#define P_PPI1_FS3 P_UNDEF
933#endif
934
935#ifndef P_PPI2_FS3
936#define P_PPI2_FS3 P_UNDEF
937#endif
938
939#ifndef P_TMR8
940#define P_TMR8 P_UNDEF
941#endif
942
943#ifndef P_TMR9
944#define P_TMR9 P_UNDEF
945#endif
946
947#ifndef P_TMR10
948#define P_TMR10 P_UNDEF
949#endif
950#ifndef P_TMR11
951#define P_TMR11 P_UNDEF
952#endif
953
954#ifndef P_DMAR0
955#define P_DMAR0 P_UNDEF
956#endif
957
958#ifndef P_DMAR1
959#define P_DMAR1 P_UNDEF
960#endif
961
962#ifndef P_PPI0_FS3
963#define P_PPI0_FS3 P_UNDEF
964#endif
965
966#ifndef P_CNT_CDG
967#define P_CNT_CDG P_UNDEF
968#endif
969
970#ifndef P_CNT_CUD
971#define P_CNT_CUD P_UNDEF
972#endif
973
974#ifndef P_A10
975#define P_A10 P_UNDEF
976#endif
977
978#ifndef P_A11
979#define P_A11 P_UNDEF
980#endif
981
982#ifndef P_A12
983#define P_A12 P_UNDEF
984#endif
985
986#ifndef P_A13
987#define P_A13 P_UNDEF
988#endif
989
990#ifndef P_A14
991#define P_A14 P_UNDEF
992#endif
993
994#ifndef P_A15
995#define P_A15 P_UNDEF
996#endif
997
998#ifndef P_A16
999#define P_A16 P_UNDEF
1000#endif
1001
1002#ifndef P_A17
1003#define P_A17 P_UNDEF
1004#endif
1005
1006#ifndef P_A18
1007#define P_A18 P_UNDEF
1008#endif
1009
1010#ifndef P_A19
1011#define P_A19 P_UNDEF
1012#endif
1013
1014#ifndef P_A20
1015#define P_A20 P_UNDEF
1016#endif
1017
1018#ifndef P_A21
1019#define P_A21 P_UNDEF
1020#endif
1021
1022#ifndef P_A22
1023#define P_A22 P_UNDEF
1024#endif
1025
1026#ifndef P_A23
1027#define P_A23 P_UNDEF
1028#endif
1029
1030#ifndef P_A24
1031#define P_A24 P_UNDEF
1032#endif
1033
1034#ifndef P_A25
1035#define P_A25 P_UNDEF
1036#endif
1037
1038#ifndef P_NOR_CLK
1039#define P_NOR_CLK P_UNDEF
1040#endif
1041
1042#ifndef P_TMRCLK
1043#define P_TMRCLK P_UNDEF
1044#endif
1045
1046#ifndef P_AMC_ARDY_NOR_WAIT
1047#define P_AMC_ARDY_NOR_WAIT P_UNDEF
1048#endif
1049
1050#ifndef P_NAND_CE
1051#define P_NAND_CE P_UNDEF
1052#endif
1053
1054#ifndef P_NAND_RB
1055#define P_NAND_RB P_UNDEF
1056#endif
1057
1058#ifndef P_ATAPI_DIOR
1059#define P_ATAPI_DIOR P_UNDEF
1060#endif
1061
1062#ifndef P_ATAPI_DIOW
1063#define P_ATAPI_DIOW P_UNDEF
1064#endif
1065
1066#ifndef P_ATAPI_CS0
1067#define P_ATAPI_CS0 P_UNDEF
1068#endif
1069
1070#ifndef P_ATAPI_CS1
1071#define P_ATAPI_CS1 P_UNDEF
1072#endif
1073
1074#ifndef P_ATAPI_DMACK
1075#define P_ATAPI_DMACK P_UNDEF
1076#endif
1077
1078#ifndef P_ATAPI_DMARQ
1079#define P_ATAPI_DMARQ P_UNDEF
1080#endif
1081
1082#ifndef P_ATAPI_INTRQ
1083#define P_ATAPI_INTRQ P_UNDEF
1084#endif
1085
1086#ifndef P_ATAPI_IORDY
1087#define P_ATAPI_IORDY P_UNDEF
1088#endif
1089
1090#ifndef P_AMC_BR
1091#define P_AMC_BR P_UNDEF
1092#endif
1093
1094#ifndef P_AMC_BG
1095#define P_AMC_BG P_UNDEF
1096#endif
1097
1098#ifndef P_AMC_BGH
1099#define P_AMC_BGH P_UNDEF
1100#endif
1101
1102/* EMAC */
1103
1104#ifndef P_MII0_ETxD0
1105#define P_MII0_ETxD0 P_UNDEF
1106#endif
1107
1108#ifndef P_MII0_ETxD1
1109#define P_MII0_ETxD1 P_UNDEF
1110#endif
1111
1112#ifndef P_MII0_ETxD2
1113#define P_MII0_ETxD2 P_UNDEF
1114#endif
1115
1116#ifndef P_MII0_ETxD3
1117#define P_MII0_ETxD3 P_UNDEF
1118#endif
1119
1120#ifndef P_MII0_ETxEN
1121#define P_MII0_ETxEN P_UNDEF
1122#endif
1123
1124#ifndef P_MII0_TxCLK
1125#define P_MII0_TxCLK P_UNDEF
1126#endif
1127
1128#ifndef P_MII0_PHYINT
1129#define P_MII0_PHYINT P_UNDEF
1130#endif
1131
1132#ifndef P_MII0_COL
1133#define P_MII0_COL P_UNDEF
1134#endif
1135
1136#ifndef P_MII0_ERxD0
1137#define P_MII0_ERxD0 P_UNDEF
1138#endif
1139
1140#ifndef P_MII0_ERxD1
1141#define P_MII0_ERxD1 P_UNDEF
1142#endif
1143
1144#ifndef P_MII0_ERxD2
1145#define P_MII0_ERxD2 P_UNDEF
1146#endif
1147
1148#ifndef P_MII0_ERxD3
1149#define P_MII0_ERxD3 P_UNDEF
1150#endif
1151
1152#ifndef P_MII0_ERxDV
1153#define P_MII0_ERxDV P_UNDEF
1154#endif
1155
1156#ifndef P_MII0_ERxCLK
1157#define P_MII0_ERxCLK P_UNDEF
1158#endif
1159
1160#ifndef P_MII0_ERxER
1161#define P_MII0_ERxER P_UNDEF
1162#endif
1163
1164#ifndef P_MII0_CRS
1165#define P_MII0_CRS P_UNDEF
1166#endif
1167
1168#ifndef P_RMII0_REF_CLK
1169#define P_RMII0_REF_CLK P_UNDEF
1170#endif
1171
1172#ifndef P_RMII0_MDINT
1173#define P_RMII0_MDINT P_UNDEF
1174#endif
1175
1176#ifndef P_RMII0_CRS_DV
1177#define P_RMII0_CRS_DV P_UNDEF
1178#endif
1179
1180#ifndef P_MDC
1181#define P_MDC P_UNDEF
1182#endif
1183
1184#ifndef P_MDIO
1185#define P_MDIO P_UNDEF
1186#endif
1187
1188#endif /* _PORTMUX_H_ */
diff --git a/include/asm-blackfin/posix_types.h b/include/asm-blackfin/posix_types.h
deleted file mode 100644
index 23aa1f8c1bd1..000000000000
--- a/include/asm-blackfin/posix_types.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef __ARCH_BFIN_POSIX_TYPES_H
2#define __ARCH_BFIN_POSIX_TYPES_H
3
4/*
5 * This file is generally used by user-level software, so you need to
6 * be a little careful about namespace pollution etc. Also, we cannot
7 * assume GCC is being used.
8 */
9
10typedef unsigned long __kernel_ino_t;
11typedef unsigned short __kernel_mode_t;
12typedef unsigned short __kernel_nlink_t;
13typedef long __kernel_off_t;
14typedef int __kernel_pid_t;
15typedef unsigned int __kernel_ipc_pid_t;
16typedef unsigned int __kernel_uid_t;
17typedef unsigned int __kernel_gid_t;
18typedef unsigned long __kernel_size_t;
19typedef long __kernel_ssize_t;
20typedef int __kernel_ptrdiff_t;
21typedef long __kernel_time_t;
22typedef long __kernel_suseconds_t;
23typedef long __kernel_clock_t;
24typedef int __kernel_timer_t;
25typedef int __kernel_clockid_t;
26typedef int __kernel_daddr_t;
27typedef char *__kernel_caddr_t;
28typedef unsigned short __kernel_uid16_t;
29typedef unsigned short __kernel_gid16_t;
30typedef unsigned int __kernel_uid32_t;
31typedef unsigned int __kernel_gid32_t;
32
33typedef unsigned short __kernel_old_uid_t;
34typedef unsigned short __kernel_old_gid_t;
35typedef unsigned short __kernel_old_dev_t;
36
37#ifdef __GNUC__
38typedef long long __kernel_loff_t;
39#endif
40
41typedef struct {
42 int val[2];
43} __kernel_fsid_t;
44
45#if defined(__KERNEL__)
46
47#undef __FD_SET
48#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
49
50#undef __FD_CLR
51#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
52
53#undef __FD_ISSET
54#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
55
56#undef __FD_ZERO
57#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
58
59#endif /* defined(__KERNEL__) */
60
61#endif
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h
deleted file mode 100644
index 6f3995b119d8..000000000000
--- a/include/asm-blackfin/processor.h
+++ /dev/null
@@ -1,158 +0,0 @@
1#ifndef __ASM_BFIN_PROCESSOR_H
2#define __ASM_BFIN_PROCESSOR_H
3
4/*
5 * Default implementation of macro that returns current
6 * instruction pointer ("program counter").
7 */
8#define current_text_addr() ({ __label__ _l; _l: &&_l;})
9
10#include <asm/blackfin.h>
11#include <asm/segment.h>
12#include <linux/compiler.h>
13
14static inline unsigned long rdusp(void)
15{
16 unsigned long usp;
17
18 __asm__ __volatile__("%0 = usp;\n\t":"=da"(usp));
19 return usp;
20}
21
22static inline void wrusp(unsigned long usp)
23{
24 __asm__ __volatile__("usp = %0;\n\t"::"da"(usp));
25}
26
27/*
28 * User space process size: 1st byte beyond user address space.
29 * Fairly meaningless on nommu. Parts of user programs can be scattered
30 * in a lot of places, so just disable this by setting it to 0xFFFFFFFF.
31 */
32#define TASK_SIZE 0xFFFFFFFF
33
34#ifdef __KERNEL__
35#define STACK_TOP TASK_SIZE
36#endif
37
38#define TASK_UNMAPPED_BASE 0
39
40struct thread_struct {
41 unsigned long ksp; /* kernel stack pointer */
42 unsigned long usp; /* user stack pointer */
43 unsigned short seqstat; /* saved status register */
44 unsigned long esp0; /* points to SR of stack frame pt_regs */
45 unsigned long pc; /* instruction pointer */
46 void * debuggerinfo;
47};
48
49#define INIT_THREAD { \
50 sizeof(init_stack) + (unsigned long) init_stack, 0, \
51 PS_S, 0, 0 \
52}
53
54/*
55 * Do necessary setup to start up a newly executed thread.
56 *
57 * pass the data segment into user programs if it exists,
58 * it can't hurt anything as far as I can tell
59 */
60#define start_thread(_regs, _pc, _usp) \
61do { \
62 set_fs(USER_DS); \
63 (_regs)->pc = (_pc); \
64 if (current->mm) \
65 (_regs)->p5 = current->mm->start_data; \
66 task_thread_info(current)->l1_task_info.stack_start \
67 = (void *)current->mm->context.stack_start; \
68 task_thread_info(current)->l1_task_info.lowest_sp = (void *)(_usp); \
69 memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info, \
70 sizeof(*L1_SCRATCH_TASK_INFO)); \
71 wrusp(_usp); \
72} while(0)
73
74/* Forward declaration, a strange C thing */
75struct task_struct;
76
77/* Free all resources held by a thread. */
78static inline void release_thread(struct task_struct *dead_task)
79{
80}
81
82#define prepare_to_copy(tsk) do { } while (0)
83
84extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
85
86/*
87 * Free current thread data structures etc..
88 */
89static inline void exit_thread(void)
90{
91}
92
93/*
94 * Return saved PC of a blocked thread.
95 */
96#define thread_saved_pc(tsk) (tsk->thread.pc)
97
98unsigned long get_wchan(struct task_struct *p);
99
100#define KSTK_EIP(tsk) \
101 ({ \
102 unsigned long eip = 0; \
103 if ((tsk)->thread.esp0 > PAGE_SIZE && \
104 MAP_NR((tsk)->thread.esp0) < max_mapnr) \
105 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
106 eip; })
107#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
108
109#define cpu_relax() barrier()
110
111/* Get the Silicon Revision of the chip */
112static inline uint32_t __pure bfin_revid(void)
113{
114 /* stored in the upper 4 bits */
115 uint32_t revid = bfin_read_CHIPID() >> 28;
116
117#ifdef CONFIG_BF52x
118 /* ANOMALY_05000357
119 * Incorrect Revision Number in DSPID Register
120 */
121 if (revid == 0)
122 switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) {
123 case 0x0010:
124 revid = 0;
125 break;
126 case 0x2796:
127 revid = 1;
128 break;
129 default:
130 revid = 0xFFFF;
131 break;
132 }
133#endif
134 return revid;
135}
136
137static inline uint32_t __pure bfin_compiled_revid(void)
138{
139#if defined(CONFIG_BF_REV_0_0)
140 return 0;
141#elif defined(CONFIG_BF_REV_0_1)
142 return 1;
143#elif defined(CONFIG_BF_REV_0_2)
144 return 2;
145#elif defined(CONFIG_BF_REV_0_3)
146 return 3;
147#elif defined(CONFIG_BF_REV_0_4)
148 return 4;
149#elif defined(CONFIG_BF_REV_0_5)
150 return 5;
151#elif defined(CONFIG_BF_REV_ANY)
152 return 0xffff;
153#else
154 return -1;
155#endif
156}
157
158#endif
diff --git a/include/asm-blackfin/ptrace.h b/include/asm-blackfin/ptrace.h
deleted file mode 100644
index a45a80e54adc..000000000000
--- a/include/asm-blackfin/ptrace.h
+++ /dev/null
@@ -1,168 +0,0 @@
1#ifndef _BFIN_PTRACE_H
2#define _BFIN_PTRACE_H
3
4/*
5 * GCC defines register number like this:
6 * -----------------------------
7 * 0 - 7 are data registers R0-R7
8 * 8 - 15 are address registers P0-P7
9 * 16 - 31 dsp registers I/B/L0 -- I/B/L3 & M0--M3
10 * 32 - 33 A registers A0 & A1
11 * 34 - status register
12 * -----------------------------
13 *
14 * We follows above, except:
15 * 32-33 --- Low 32-bit of A0&1
16 * 34-35 --- High 8-bit of A0&1
17 */
18
19#ifndef __ASSEMBLY__
20
21/* this struct defines the way the registers are stored on the
22 stack during a system call. */
23
24struct pt_regs {
25 long orig_pc;
26 long ipend;
27 long seqstat;
28 long rete;
29 long retn;
30 long retx;
31 long pc; /* PC == RETI */
32 long rets;
33 long reserved; /* Used as scratch during system calls */
34 long astat;
35 long lb1;
36 long lb0;
37 long lt1;
38 long lt0;
39 long lc1;
40 long lc0;
41 long a1w;
42 long a1x;
43 long a0w;
44 long a0x;
45 long b3;
46 long b2;
47 long b1;
48 long b0;
49 long l3;
50 long l2;
51 long l1;
52 long l0;
53 long m3;
54 long m2;
55 long m1;
56 long m0;
57 long i3;
58 long i2;
59 long i1;
60 long i0;
61 long usp;
62 long fp;
63 long p5;
64 long p4;
65 long p3;
66 long p2;
67 long p1;
68 long p0;
69 long r7;
70 long r6;
71 long r5;
72 long r4;
73 long r3;
74 long r2;
75 long r1;
76 long r0;
77 long orig_r0;
78 long orig_p0;
79 long syscfg;
80};
81
82/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
83#define PTRACE_GETREGS 12
84#define PTRACE_SETREGS 13 /* ptrace signal */
85
86#define PTRACE_GETFDPIC 31
87#define PTRACE_GETFDPIC_EXEC 0
88#define PTRACE_GETFDPIC_INTERP 1
89
90#define PS_S (0x0002)
91
92#ifdef __KERNEL__
93
94/* user_mode returns true if only one bit is set in IPEND, other than the
95 master interrupt enable. */
96#define user_mode(regs) (!(((regs)->ipend & ~0x10) & (((regs)->ipend & ~0x10) - 1)))
97#define instruction_pointer(regs) ((regs)->pc)
98#define profile_pc(regs) instruction_pointer(regs)
99extern void show_regs(struct pt_regs *);
100
101#endif /* __KERNEL__ */
102
103#endif /* __ASSEMBLY__ */
104
105/*
106 * Offsets used by 'ptrace' system call interface.
107 */
108
109#define PT_R0 204
110#define PT_R1 200
111#define PT_R2 196
112#define PT_R3 192
113#define PT_R4 188
114#define PT_R5 184
115#define PT_R6 180
116#define PT_R7 176
117#define PT_P0 172
118#define PT_P1 168
119#define PT_P2 164
120#define PT_P3 160
121#define PT_P4 156
122#define PT_P5 152
123#define PT_FP 148
124#define PT_USP 144
125#define PT_I0 140
126#define PT_I1 136
127#define PT_I2 132
128#define PT_I3 128
129#define PT_M0 124
130#define PT_M1 120
131#define PT_M2 116
132#define PT_M3 112
133#define PT_L0 108
134#define PT_L1 104
135#define PT_L2 100
136#define PT_L3 96
137#define PT_B0 92
138#define PT_B1 88
139#define PT_B2 84
140#define PT_B3 80
141#define PT_A0X 76
142#define PT_A0W 72
143#define PT_A1X 68
144#define PT_A1W 64
145#define PT_LC0 60
146#define PT_LC1 56
147#define PT_LT0 52
148#define PT_LT1 48
149#define PT_LB0 44
150#define PT_LB1 40
151#define PT_ASTAT 36
152#define PT_RESERVED 32
153#define PT_RETS 28
154#define PT_PC 24
155#define PT_RETX 20
156#define PT_RETN 16
157#define PT_RETE 12
158#define PT_SEQSTAT 8
159#define PT_IPEND 4
160
161#define PT_SYSCFG 216
162#define PT_TEXT_ADDR 220
163#define PT_TEXT_END_ADDR 224
164#define PT_DATA_ADDR 228
165#define PT_FDPIC_EXEC 232
166#define PT_FDPIC_INTERP 236
167
168#endif /* _BFIN_PTRACE_H */
diff --git a/include/asm-blackfin/reboot.h b/include/asm-blackfin/reboot.h
deleted file mode 100644
index 6d448b5f5985..000000000000
--- a/include/asm-blackfin/reboot.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-blackfin/reboot.h - shutdown/reboot header
3 *
4 * Copyright 2004-2007 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __ASM_REBOOT_H__
10#define __ASM_REBOOT_H__
11
12/* optional board specific hooks */
13extern void native_machine_restart(char *cmd);
14extern void native_machine_halt(void);
15extern void native_machine_power_off(void);
16
17/* common reboot workarounds */
18extern void bfin_gpio_reset_spi0_ssel1(void);
19
20#endif
diff --git a/include/asm-blackfin/resource.h b/include/asm-blackfin/resource.h
deleted file mode 100644
index 091355ab3495..000000000000
--- a/include/asm-blackfin/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _BFIN_RESOURCE_H
2#define _BFIN_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif /* _BFIN_RESOURCE_H */
diff --git a/include/asm-blackfin/scatterlist.h b/include/asm-blackfin/scatterlist.h
deleted file mode 100644
index 04f448711cd0..000000000000
--- a/include/asm-blackfin/scatterlist.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef _BLACKFIN_SCATTERLIST_H
2#define _BLACKFIN_SCATTERLIST_H
3
4#include <linux/mm.h>
5
6struct scatterlist {
7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
9#endif
10 unsigned long page_link;
11 unsigned int offset;
12 dma_addr_t dma_address;
13 unsigned int length;
14};
15
16/*
17 * These macros should be used after a pci_map_sg call has been done
18 * to get bus addresses of each of the SG entries and their lengths.
19 * You should only work with the number of sg entries pci_map_sg
20 * returns, or alternatively stop on the first sg_dma_len(sg) which
21 * is 0.
22 */
23#define sg_dma_address(sg) ((sg)->dma_address)
24#define sg_dma_len(sg) ((sg)->length)
25
26#define ISA_DMA_THRESHOLD (0xffffffff)
27
28#endif /* !(_BLACKFIN_SCATTERLIST_H) */
diff --git a/include/asm-blackfin/sections.h b/include/asm-blackfin/sections.h
deleted file mode 100644
index 1443c3353a8c..000000000000
--- a/include/asm-blackfin/sections.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _BLACKFIN_SECTIONS_H
2#define _BLACKFIN_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#endif
diff --git a/include/asm-blackfin/segment.h b/include/asm-blackfin/segment.h
deleted file mode 100644
index 02cfd09b5a99..000000000000
--- a/include/asm-blackfin/segment.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _BFIN_SEGMENT_H
2#define _BFIN_SEGMENT_H
3
4#define KERNEL_DS (0x5)
5#define USER_DS (0x1)
6
7#endif /* _BFIN_SEGMENT_H */
diff --git a/include/asm-blackfin/sembuf.h b/include/asm-blackfin/sembuf.h
deleted file mode 100644
index 18deb5c7fa5d..000000000000
--- a/include/asm-blackfin/sembuf.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _BFIN_SEMBUF_H
2#define _BFIN_SEMBUF_H
3
4/*
5 * The semid64_ds structure for bfin architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17 unsigned long __unused1;
18 __kernel_time_t sem_ctime; /* last change time */
19 unsigned long __unused2;
20 unsigned long sem_nsems; /* no. of semaphores in array */
21 unsigned long __unused3;
22 unsigned long __unused4;
23};
24
25#endif /* _BFIN_SEMBUF_H */
diff --git a/include/asm-blackfin/serial.h b/include/asm-blackfin/serial.h
deleted file mode 100644
index 994dd869558c..000000000000
--- a/include/asm-blackfin/serial.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-blackfin/serial.h
3 */
4
5#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH
diff --git a/include/asm-blackfin/setup.h b/include/asm-blackfin/setup.h
deleted file mode 100644
index 01c8c6cbe6fc..000000000000
--- a/include/asm-blackfin/setup.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2** asm/setup.h -- Definition of the Linux/bfin setup information
3**
4** This file is subject to the terms and conditions of the GNU General Public
5** License. See the file COPYING in the main directory of this archive
6** for more details.
7**
8** Copyright Lineo, Inc 2001 Tony Kou
9**
10*/
11
12#ifndef _BFIN_SETUP_H
13#define _BFIN_SETUP_H
14
15#define COMMAND_LINE_SIZE 512
16
17#endif /* _BFIN_SETUP_H */
diff --git a/include/asm-blackfin/shmbuf.h b/include/asm-blackfin/shmbuf.h
deleted file mode 100644
index 612436303e89..000000000000
--- a/include/asm-blackfin/shmbuf.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef _BFIN_SHMBUF_H
2#define _BFIN_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for bfin architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct shmid64_ds {
15 struct ipc64_perm shm_perm; /* operation perms */
16 size_t shm_segsz; /* size of segment (bytes) */
17 __kernel_time_t shm_atime; /* last attach time */
18 unsigned long __unused1;
19 __kernel_time_t shm_dtime; /* last detach time */
20 unsigned long __unused2;
21 __kernel_time_t shm_ctime; /* last change time */
22 unsigned long __unused3;
23 __kernel_pid_t shm_cpid; /* pid of creator */
24 __kernel_pid_t shm_lpid; /* pid of last operator */
25 unsigned long shm_nattch; /* no. of current attaches */
26 unsigned long __unused4;
27 unsigned long __unused5;
28};
29
30struct shminfo64 {
31 unsigned long shmmax;
32 unsigned long shmmin;
33 unsigned long shmmni;
34 unsigned long shmseg;
35 unsigned long shmall;
36 unsigned long __unused1;
37 unsigned long __unused2;
38 unsigned long __unused3;
39 unsigned long __unused4;
40};
41
42#endif /* _BFIN_SHMBUF_H */
diff --git a/include/asm-blackfin/shmparam.h b/include/asm-blackfin/shmparam.h
deleted file mode 100644
index 3c03906b7664..000000000000
--- a/include/asm-blackfin/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _BFIN_SHMPARAM_H
2#define _BFIN_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _BFIN_SHMPARAM_H */
diff --git a/include/asm-blackfin/sigcontext.h b/include/asm-blackfin/sigcontext.h
deleted file mode 100644
index ce00b03c2775..000000000000
--- a/include/asm-blackfin/sigcontext.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef _ASM_BLACKFIN_SIGCONTEXT_H
2#define _ASM_BLACKFIN_SIGCONTEXT_H
3
4/* Add new entries at the end of the structure only. */
5struct sigcontext {
6 unsigned long sc_r0;
7 unsigned long sc_r1;
8 unsigned long sc_r2;
9 unsigned long sc_r3;
10 unsigned long sc_r4;
11 unsigned long sc_r5;
12 unsigned long sc_r6;
13 unsigned long sc_r7;
14 unsigned long sc_p0;
15 unsigned long sc_p1;
16 unsigned long sc_p2;
17 unsigned long sc_p3;
18 unsigned long sc_p4;
19 unsigned long sc_p5;
20 unsigned long sc_usp;
21 unsigned long sc_a0w;
22 unsigned long sc_a1w;
23 unsigned long sc_a0x;
24 unsigned long sc_a1x;
25 unsigned long sc_astat;
26 unsigned long sc_rets;
27 unsigned long sc_pc;
28 unsigned long sc_retx;
29 unsigned long sc_fp;
30 unsigned long sc_i0;
31 unsigned long sc_i1;
32 unsigned long sc_i2;
33 unsigned long sc_i3;
34 unsigned long sc_m0;
35 unsigned long sc_m1;
36 unsigned long sc_m2;
37 unsigned long sc_m3;
38 unsigned long sc_l0;
39 unsigned long sc_l1;
40 unsigned long sc_l2;
41 unsigned long sc_l3;
42 unsigned long sc_b0;
43 unsigned long sc_b1;
44 unsigned long sc_b2;
45 unsigned long sc_b3;
46 unsigned long sc_lc0;
47 unsigned long sc_lc1;
48 unsigned long sc_lt0;
49 unsigned long sc_lt1;
50 unsigned long sc_lb0;
51 unsigned long sc_lb1;
52 unsigned long sc_seqstat;
53};
54
55#endif
diff --git a/include/asm-blackfin/siginfo.h b/include/asm-blackfin/siginfo.h
deleted file mode 100644
index eca4565cea37..000000000000
--- a/include/asm-blackfin/siginfo.h
+++ /dev/null
@@ -1,35 +0,0 @@
1#ifndef _BFIN_SIGINFO_H
2#define _BFIN_SIGINFO_H
3
4#include <linux/types.h>
5#include <asm-generic/siginfo.h>
6
7#define UID16_SIGINFO_COMPAT_NEEDED
8
9#define si_uid16 _sifields._kill._uid
10
11#define ILL_ILLPARAOP (__SI_FAULT|2) /* illegal opcode combine ********** */
12#define ILL_ILLEXCPT (__SI_FAULT|4) /* unrecoverable exception ********** */
13#define ILL_CPLB_VI (__SI_FAULT|9) /* D/I CPLB protect violation ******** */
14#define ILL_CPLB_MISS (__SI_FAULT|10) /* D/I CPLB miss ******** */
15#define ILL_CPLB_MULHIT (__SI_FAULT|11) /* D/I CPLB multiple hit ******** */
16
17/*
18 * SIGBUS si_codes
19 */
20#define BUS_OPFETCH (__SI_FAULT|4) /* error from instruction fetch ******** */
21
22/*
23 * SIGTRAP si_codes
24 */
25#define TRAP_STEP (__SI_FAULT|1) /* single-step breakpoint************* */
26#define TRAP_TRACEFLOW (__SI_FAULT|2) /* trace buffer overflow ************* */
27#define TRAP_WATCHPT (__SI_FAULT|3) /* watchpoint match ************* */
28#define TRAP_ILLTRAP (__SI_FAULT|4) /* illegal trap ************* */
29
30/*
31 * SIGSEGV si_codes
32 */
33#define SEGV_STACKFLOW (__SI_FAULT|3) /* stack overflow */
34
35#endif
diff --git a/include/asm-blackfin/signal.h b/include/asm-blackfin/signal.h
deleted file mode 100644
index 87951d251458..000000000000
--- a/include/asm-blackfin/signal.h
+++ /dev/null
@@ -1,160 +0,0 @@
1#ifndef _BLACKFIN_SIGNAL_H
2#define _BLACKFIN_SIGNAL_H
3
4#include <linux/types.h>
5
6/* Avoid too many header ordering problems. */
7struct siginfo;
8
9#ifdef __KERNEL__
10/* Most things should be clean enough to redefine this at will, if care
11 is taken to make libc match. */
12
13#define _NSIG 64
14#define _NSIG_BPW 32
15#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
16
17typedef unsigned long old_sigset_t; /* at least 32 bits */
18
19typedef struct {
20 unsigned long sig[_NSIG_WORDS];
21} sigset_t;
22
23#else
24/* Here we must cater to libcs that poke about in kernel headers. */
25
26#define NSIG 32
27typedef unsigned long sigset_t;
28
29#endif /* __KERNEL__ */
30
31#define SIGHUP 1
32#define SIGINT 2
33#define SIGQUIT 3
34#define SIGILL 4
35#define SIGTRAP 5
36#define SIGABRT 6
37#define SIGIOT 6
38#define SIGBUS 7
39#define SIGFPE 8
40#define SIGKILL 9
41#define SIGUSR1 10
42#define SIGSEGV 11
43#define SIGUSR2 12
44#define SIGPIPE 13
45#define SIGALRM 14
46#define SIGTERM 15
47#define SIGSTKFLT 16
48#define SIGCHLD 17
49#define SIGCONT 18
50#define SIGSTOP 19
51#define SIGTSTP 20
52#define SIGTTIN 21
53#define SIGTTOU 22
54#define SIGURG 23
55#define SIGXCPU 24
56#define SIGXFSZ 25
57#define SIGVTALRM 26
58#define SIGPROF 27
59#define SIGWINCH 28
60#define SIGIO 29
61#define SIGPOLL SIGIO
62/*
63#define SIGLOST 29
64*/
65#define SIGPWR 30
66#define SIGSYS 31
67#define SIGUNUSED 31
68
69/* These should not be considered constants from userland. */
70#define SIGRTMIN 32
71#define SIGRTMAX _NSIG
72
73/*
74 * SA_FLAGS values:
75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered.
81 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
82 * SA_NODEFER prevents the current signal from being masked in the handler.
83 *
84 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
85 * Unix names RESETHAND and NODEFER respectively.
86 */
87#define SA_NOCLDSTOP 0x00000001
88#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
89#define SA_SIGINFO 0x00000004
90#define SA_ONSTACK 0x08000000
91#define SA_RESTART 0x10000000
92#define SA_NODEFER 0x40000000
93#define SA_RESETHAND 0x80000000
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98/*
99 * sigaltstack controls
100 */
101#define SS_ONSTACK 1
102#define SS_DISABLE 2
103
104#define MINSIGSTKSZ 2048
105#define SIGSTKSZ 8192
106
107#include <asm-generic/signal.h>
108
109#ifdef __KERNEL__
110struct old_sigaction {
111 __sighandler_t sa_handler;
112 old_sigset_t sa_mask;
113 unsigned long sa_flags;
114 void (*sa_restorer) (void);
115};
116
117struct sigaction {
118 __sighandler_t sa_handler;
119 unsigned long sa_flags;
120 void (*sa_restorer) (void);
121 sigset_t sa_mask; /* mask last for extensibility */
122};
123
124struct k_sigaction {
125 struct sigaction sa;
126};
127#else
128/* Here we must cater to libcs that poke about in kernel headers. */
129
130struct sigaction {
131 union {
132 __sighandler_t _sa_handler;
133 void (*_sa_sigaction) (int, struct siginfo *, void *);
134 } _u;
135 sigset_t sa_mask;
136 unsigned long sa_flags;
137 void (*sa_restorer) (void);
138};
139
140#define sa_handler _u._sa_handler
141#define sa_sigaction _u._sa_sigaction
142
143#endif /* __KERNEL__ */
144
145typedef struct sigaltstack {
146 void __user *ss_sp;
147 int ss_flags;
148 size_t ss_size;
149} stack_t;
150
151#ifdef __KERNEL__
152
153#include <asm/sigcontext.h>
154#undef __HAVE_ARCH_SIG_BITOPS
155
156#define ptrace_signal_deliver(regs, cookie) do { } while (0)
157
158#endif /* __KERNEL__ */
159
160#endif /* _BLACKFIN_SIGNAL_H */
diff --git a/include/asm-blackfin/socket.h b/include/asm-blackfin/socket.h
deleted file mode 100644
index 2ca702e44d47..000000000000
--- a/include/asm-blackfin/socket.h
+++ /dev/null
@@ -1,56 +0,0 @@
1#ifndef _ASM_SOCKET_H
2#define _ASM_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockoptions(2) */
7#define SOL_SOCKET 1
8
9#define SO_DEBUG 1
10#define SO_REUSEADDR 2
11#define SO_TYPE 3
12#define SO_ERROR 4
13#define SO_DONTROUTE 5
14#define SO_BROADCAST 6
15#define SO_SNDBUF 7
16#define SO_RCVBUF 8
17#define SO_SNDBUFFORCE 32
18#define SO_RCVBUFFORCE 33
19#define SO_KEEPALIVE 9
20#define SO_OOBINLINE 10
21#define SO_NO_CHECK 11
22#define SO_PRIORITY 12
23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */
26#define SO_PASSCRED 16
27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18
29#define SO_SNDLOWAT 19
30#define SO_RCVTIMEO 20
31#define SO_SNDTIMEO 21
32
33/* Security levels - as per NRL IPv6 - don't actually do anything */
34#define SO_SECURITY_AUTHENTICATION 22
35#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
36#define SO_SECURITY_ENCRYPTION_NETWORK 24
37
38#define SO_BINDTODEVICE 25
39
40/* Socket filtering */
41#define SO_ATTACH_FILTER 26
42#define SO_DETACH_FILTER 27
43
44#define SO_PEERNAME 28
45#define SO_TIMESTAMP 29
46#define SCM_TIMESTAMP SO_TIMESTAMP
47
48#define SO_ACCEPTCONN 30
49#define SO_PEERSEC 31
50#define SO_PASSSEC 34
51#define SO_TIMESTAMPNS 35
52#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
53
54#define SO_MARK 36
55
56#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-blackfin/sockios.h b/include/asm-blackfin/sockios.h
deleted file mode 100644
index 426b89bfaa8b..000000000000
--- a/include/asm-blackfin/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_BFIN_SOCKIOS__
2#define __ARCH_BFIN_SOCKIOS__
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif /* __ARCH_BFIN_SOCKIOS__ */
diff --git a/include/asm-blackfin/spinlock.h b/include/asm-blackfin/spinlock.h
deleted file mode 100644
index 64e908a50646..000000000000
--- a/include/asm-blackfin/spinlock.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __BFIN_SPINLOCK_H
2#define __BFIN_SPINLOCK_H
3
4#error blackfin architecture does not support SMP spin lock yet
5
6#endif
diff --git a/include/asm-blackfin/stat.h b/include/asm-blackfin/stat.h
deleted file mode 100644
index d2b6f11ec231..000000000000
--- a/include/asm-blackfin/stat.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef _BFIN_STAT_H
2#define _BFIN_STAT_H
3
4struct stat {
5 unsigned short st_dev;
6 unsigned short __pad1;
7 unsigned long st_ino;
8 unsigned short st_mode;
9 unsigned short st_nlink;
10 unsigned short st_uid;
11 unsigned short st_gid;
12 unsigned short st_rdev;
13 unsigned short __pad2;
14 unsigned long st_size;
15 unsigned long st_blksize;
16 unsigned long st_blocks;
17 unsigned long st_atime;
18 unsigned long __unused1;
19 unsigned long st_mtime;
20 unsigned long __unused2;
21 unsigned long st_ctime;
22 unsigned long __unused3;
23 unsigned long __unused4;
24 unsigned long __unused5;
25};
26
27/* This matches struct stat64 in glibc2.1, hence the absolutely
28 * insane amounts of padding around dev_t's.
29 */
30struct stat64 {
31 unsigned long long st_dev;
32 unsigned char __pad1[4];
33
34#define STAT64_HAS_BROKEN_ST_INO 1
35 unsigned long __st_ino;
36
37 unsigned int st_mode;
38 unsigned int st_nlink;
39
40 unsigned long st_uid;
41 unsigned long st_gid;
42
43 unsigned long long st_rdev;
44 unsigned char __pad2[4];
45
46 long long st_size;
47 unsigned long st_blksize;
48
49 long long st_blocks; /* Number 512-byte blocks allocated. */
50
51 unsigned long st_atime;
52 unsigned long st_atime_nsec;
53
54 unsigned long st_mtime;
55 unsigned long st_mtime_nsec;
56
57 unsigned long st_ctime;
58 unsigned long st_ctime_nsec;
59
60 unsigned long long st_ino;
61};
62
63#endif /* _BFIN_STAT_H */
diff --git a/include/asm-blackfin/statfs.h b/include/asm-blackfin/statfs.h
deleted file mode 100644
index 350672091ba3..000000000000
--- a/include/asm-blackfin/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _BFIN_STATFS_H
2#define _BFIN_STATFS_H
3
4#include <asm-generic/statfs.h>
5
6#endif /* _BFIN_STATFS_H */
diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h
deleted file mode 100644
index 321f4d96e4ae..000000000000
--- a/include/asm-blackfin/string.h
+++ /dev/null
@@ -1,137 +0,0 @@
1#ifndef _BLACKFIN_STRING_H_
2#define _BLACKFIN_STRING_H_
3
4#include <linux/types.h>
5
6#ifdef __KERNEL__ /* only set these up for kernel code */
7
8#define __HAVE_ARCH_STRCPY
9extern inline char *strcpy(char *dest, const char *src)
10{
11 char *xdest = dest;
12 char temp = 0;
13
14 __asm__ __volatile__ (
15 "1:"
16 "%2 = B [%1++] (Z);"
17 "B [%0++] = %2;"
18 "CC = %2;"
19 "if cc jump 1b (bp);"
20 : "+&a" (dest), "+&a" (src), "=&d" (temp)
21 :
22 : "memory", "CC");
23
24 return xdest;
25}
26
27#define __HAVE_ARCH_STRNCPY
28extern inline char *strncpy(char *dest, const char *src, size_t n)
29{
30 char *xdest = dest;
31 char temp = 0;
32
33 if (n == 0)
34 return xdest;
35
36 __asm__ __volatile__ (
37 "1:"
38 "%3 = B [%1++] (Z);"
39 "B [%0++] = %3;"
40 "CC = %3;"
41 "if ! cc jump 2f;"
42 "%2 += -1;"
43 "CC = %2 == 0;"
44 "if ! cc jump 1b (bp);"
45 "jump 4f;"
46 "2:"
47 /* if src is shorter than n, we need to null pad bytes now */
48 "%3 = 0;"
49 "3:"
50 "%2 += -1;"
51 "CC = %2 == 0;"
52 "if cc jump 4f;"
53 "B [%0++] = %3;"
54 "jump 3b;"
55 "4:"
56 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp)
57 :
58 : "memory", "CC");
59
60 return xdest;
61}
62
63#define __HAVE_ARCH_STRCMP
64extern inline int strcmp(const char *cs, const char *ct)
65{
66 /* need to use int's here so the char's in the assembly don't get
67 * sign extended incorrectly when we don't want them to be
68 */
69 int __res1, __res2;
70
71 __asm__ __volatile__ (
72 "1:"
73 "%2 = B[%0++] (Z);" /* get *cs */
74 "%3 = B[%1++] (Z);" /* get *ct */
75 "CC = %2 == %3;" /* compare a byte */
76 "if ! cc jump 2f;" /* not equal, break out */
77 "CC = %2;" /* at end of cs? */
78 "if cc jump 1b (bp);" /* no, keep going */
79 "jump.s 3f;" /* strings are equal */
80 "2:"
81 "%2 = %2 - %3;" /* *cs - *ct */
82 "3:"
83 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
84 :
85 : "memory", "CC");
86
87 return __res1;
88}
89
90#define __HAVE_ARCH_STRNCMP
91extern inline int strncmp(const char *cs, const char *ct, size_t count)
92{
93 /* need to use int's here so the char's in the assembly don't get
94 * sign extended incorrectly when we don't want them to be
95 */
96 int __res1, __res2;
97
98 if (!count)
99 return 0;
100
101 __asm__ __volatile__ (
102 "1:"
103 "%3 = B[%0++] (Z);" /* get *cs */
104 "%4 = B[%1++] (Z);" /* get *ct */
105 "CC = %3 == %4;" /* compare a byte */
106 "if ! cc jump 3f;" /* not equal, break out */
107 "CC = %3;" /* at end of cs? */
108 "if ! cc jump 4f;" /* yes, all done */
109 "%2 += -1;" /* no, adjust count */
110 "CC = %2 == 0;"
111 "if ! cc jump 1b;" /* more to do, keep going */
112 "2:"
113 "%3 = 0;" /* strings are equal */
114 "jump.s 4f;"
115 "3:"
116 "%3 = %3 - %4;" /* *cs - *ct */
117 "4:"
118 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2)
119 :
120 : "memory", "CC");
121
122 return __res1;
123}
124
125#define __HAVE_ARCH_MEMSET
126extern void *memset(void *s, int c, size_t count);
127#define __HAVE_ARCH_MEMCPY
128extern void *memcpy(void *d, const void *s, size_t count);
129#define __HAVE_ARCH_MEMCMP
130extern int memcmp(const void *, const void *, __kernel_size_t);
131#define __HAVE_ARCH_MEMCHR
132extern void *memchr(const void *s, int c, size_t n);
133#define __HAVE_ARCH_MEMMOVE
134extern void *memmove(void *dest, const void *src, size_t count);
135
136#endif /*__KERNEL__*/
137#endif /* _BLACKFIN_STRING_H_ */
diff --git a/include/asm-blackfin/system.h b/include/asm-blackfin/system.h
deleted file mode 100644
index 51494ef5bb41..000000000000
--- a/include/asm-blackfin/system.h
+++ /dev/null
@@ -1,221 +0,0 @@
1/*
2 * File: include/asm/system.h
3 * Based on:
4 * Author: Tony Kou (tonyko@lineo.ca)
5 * Copyright (c) 2002 Arcturus Networks Inc.
6 * (www.arcturusnetworks.com)
7 * Copyright (c) 2003 Metrowerks (www.metrowerks.com)
8 * Copyright (c) 2004 Analog Device Inc.
9 * Created: 25Jan2001 - Tony Kou
10 * Description: system.h include file
11 *
12 * Modified: 22Sep2006 - Robin Getz
13 * - move include blackfin.h down, so I can get access to
14 * irq functions in other include files.
15 *
16 * Bugs: Enter bugs at http://blackfin.uclinux.org/
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2, or (at your option)
21 * any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; see the file COPYING.
30 * If not, write to the Free Software Foundation,
31 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 */
33
34#ifndef _BLACKFIN_SYSTEM_H
35#define _BLACKFIN_SYSTEM_H
36
37#include <linux/linkage.h>
38#include <linux/compiler.h>
39#include <asm/mach/anomaly.h>
40
41/*
42 * Interrupt configuring macros.
43 */
44
45extern unsigned long irq_flags;
46
47#define local_irq_enable() \
48 __asm__ __volatile__( \
49 "sti %0;" \
50 : \
51 : "d" (irq_flags) \
52 )
53
54#define local_irq_disable() \
55 do { \
56 int __tmp_dummy; \
57 __asm__ __volatile__( \
58 "cli %0;" \
59 : "=d" (__tmp_dummy) \
60 ); \
61 } while (0)
62
63#if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
64# define NOP_PAD_ANOMALY_05000244 "nop; nop;"
65#else
66# define NOP_PAD_ANOMALY_05000244
67#endif
68
69#define idle_with_irq_disabled() \
70 __asm__ __volatile__( \
71 NOP_PAD_ANOMALY_05000244 \
72 ".align 8;" \
73 "sti %0;" \
74 "idle;" \
75 : \
76 : "d" (irq_flags) \
77 )
78
79#ifdef CONFIG_DEBUG_HWERR
80# define __save_and_cli(x) \
81 __asm__ __volatile__( \
82 "cli %0;" \
83 "sti %1;" \
84 : "=&d" (x) \
85 : "d" (0x3F) \
86 )
87#else
88# define __save_and_cli(x) \
89 __asm__ __volatile__( \
90 "cli %0;" \
91 : "=&d" (x) \
92 )
93#endif
94
95#define local_save_flags(x) \
96 __asm__ __volatile__( \
97 "cli %0;" \
98 "sti %0;" \
99 : "=d" (x) \
100 )
101
102#ifdef CONFIG_DEBUG_HWERR
103#define irqs_enabled_from_flags(x) (((x) & ~0x3f) != 0)
104#else
105#define irqs_enabled_from_flags(x) ((x) != 0x1f)
106#endif
107
108#define local_irq_restore(x) \
109 do { \
110 if (irqs_enabled_from_flags(x)) \
111 local_irq_enable(); \
112 } while (0)
113
114/* For spinlocks etc */
115#define local_irq_save(x) __save_and_cli(x)
116
117#define irqs_disabled() \
118({ \
119 unsigned long flags; \
120 local_save_flags(flags); \
121 !irqs_enabled_from_flags(flags); \
122})
123
124/*
125 * Force strict CPU ordering.
126 */
127#define nop() asm volatile ("nop;\n\t"::)
128#define mb() asm volatile ("" : : :"memory")
129#define rmb() asm volatile ("" : : :"memory")
130#define wmb() asm volatile ("" : : :"memory")
131#define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
132
133#define read_barrier_depends() do { } while(0)
134
135#ifdef CONFIG_SMP
136#define smp_mb() mb()
137#define smp_rmb() rmb()
138#define smp_wmb() wmb()
139#define smp_read_barrier_depends() read_barrier_depends()
140#else
141#define smp_mb() barrier()
142#define smp_rmb() barrier()
143#define smp_wmb() barrier()
144#define smp_read_barrier_depends() do { } while(0)
145#endif
146
147#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
148
149struct __xchg_dummy {
150 unsigned long a[100];
151};
152#define __xg(x) ((volatile struct __xchg_dummy *)(x))
153
154static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
155 int size)
156{
157 unsigned long tmp = 0;
158 unsigned long flags = 0;
159
160 local_irq_save(flags);
161
162 switch (size) {
163 case 1:
164 __asm__ __volatile__
165 ("%0 = b%2 (z);\n\t"
166 "b%2 = %1;\n\t"
167 : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory");
168 break;
169 case 2:
170 __asm__ __volatile__
171 ("%0 = w%2 (z);\n\t"
172 "w%2 = %1;\n\t"
173 : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory");
174 break;
175 case 4:
176 __asm__ __volatile__
177 ("%0 = %2;\n\t"
178 "%2 = %1;\n\t"
179 : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory");
180 break;
181 }
182 local_irq_restore(flags);
183 return tmp;
184}
185
186#include <asm-generic/cmpxchg-local.h>
187
188/*
189 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
190 * them available.
191 */
192#define cmpxchg_local(ptr, o, n) \
193 ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
194 (unsigned long)(n), sizeof(*(ptr))))
195#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
196
197#ifndef CONFIG_SMP
198#include <asm-generic/cmpxchg.h>
199#endif
200
201#define prepare_to_switch() do { } while(0)
202
203/*
204 * switch_to(n) should switch tasks to task ptr, first checking that
205 * ptr isn't the current task, in which case it does nothing.
206 */
207
208#include <asm/blackfin.h>
209
210asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
211
212#define switch_to(prev,next,last) \
213do { \
214 memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \
215 sizeof *L1_SCRATCH_TASK_INFO); \
216 memcpy (L1_SCRATCH_TASK_INFO, &task_thread_info(next)->l1_task_info, \
217 sizeof *L1_SCRATCH_TASK_INFO); \
218 (last) = resume (prev, next); \
219} while (0)
220
221#endif /* _BLACKFIN_SYSTEM_H */
diff --git a/include/asm-blackfin/termbits.h b/include/asm-blackfin/termbits.h
deleted file mode 100644
index f37feb7cf895..000000000000
--- a/include/asm-blackfin/termbits.h
+++ /dev/null
@@ -1,198 +0,0 @@
1#ifndef __ARCH_BFIN_TERMBITS_H__
2#define __ARCH_BFIN_TERMBITS_H__
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61/* c_iflag bits */
62#define IGNBRK 0000001
63#define BRKINT 0000002
64#define IGNPAR 0000004
65#define PARMRK 0000010
66#define INPCK 0000020
67#define ISTRIP 0000040
68#define INLCR 0000100
69#define IGNCR 0000200
70#define ICRNL 0000400
71#define IUCLC 0001000
72#define IXON 0002000
73#define IXANY 0004000
74#define IXOFF 0010000
75#define IMAXBEL 0020000
76#define IUTF8 0040000
77
78/* c_oflag bits */
79#define OPOST 0000001
80#define OLCUC 0000002
81#define ONLCR 0000004
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85#define OFILL 0000100
86#define OFDEL 0000200
87#define NLDLY 0000400
88#define NL0 0000000
89#define NL1 0000400
90#define CRDLY 0003000
91#define CR0 0000000
92#define CR1 0001000
93#define CR2 0002000
94#define CR3 0003000
95#define TABDLY 0014000
96#define TAB0 0000000
97#define TAB1 0004000
98#define TAB2 0010000
99#define TAB3 0014000
100#define XTABS 0014000
101#define BSDLY 0020000
102#define BS0 0000000
103#define BS1 0020000
104#define VTDLY 0040000
105#define VT0 0000000
106#define VT1 0040000
107#define FFDLY 0100000
108#define FF0 0000000
109#define FF1 0100000
110
111/* c_cflag bit meaning */
112#define CBAUD 0010017
113#define B0 0000000 /* hang up */
114#define B50 0000001
115#define B75 0000002
116#define B110 0000003
117#define B134 0000004
118#define B150 0000005
119#define B200 0000006
120#define B300 0000007
121#define B600 0000010
122#define B1200 0000011
123#define B1800 0000012
124#define B2400 0000013
125#define B4800 0000014
126#define B9600 0000015
127#define B19200 0000016
128#define B38400 0000017
129#define EXTA B19200
130#define EXTB B38400
131#define CSIZE 0000060
132#define CS5 0000000
133#define CS6 0000020
134#define CS7 0000040
135#define CS8 0000060
136#define CSTOPB 0000100
137#define CREAD 0000200
138#define PARENB 0000400
139#define PARODD 0001000
140#define HUPCL 0002000
141#define CLOCAL 0004000
142#define CBAUDEX 0010000
143#define BOTHER 0010000
144#define B57600 0010001
145#define B115200 0010002
146#define B230400 0010003
147#define B460800 0010004
148#define B500000 0010005
149#define B576000 0010006
150#define B921600 0010007
151#define B1000000 0010010
152#define B1152000 0010011
153#define B1500000 0010012
154#define B2000000 0010013
155#define B2500000 0010014
156#define B3000000 0010015
157#define B3500000 0010016
158#define B4000000 0010017
159#define CIBAUD 002003600000 /* input baud rate */
160#define CMSPAR 010000000000 /* mark or space (stick) parity */
161#define CRTSCTS 020000000000 /* flow control */
162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
165/* c_lflag bits */
166#define ISIG 0000001
167#define ICANON 0000002
168#define XCASE 0000004
169#define ECHO 0000010
170#define ECHOE 0000020
171#define ECHOK 0000040
172#define ECHONL 0000100
173#define NOFLSH 0000200
174#define TOSTOP 0000400
175#define ECHOCTL 0001000
176#define ECHOPRT 0002000
177#define ECHOKE 0004000
178#define FLUSHO 0010000
179#define PENDIN 0040000
180#define IEXTEN 0100000
181
182/* tcflow() and TCXONC use these */
183#define TCOOFF 0
184#define TCOON 1
185#define TCIOFF 2
186#define TCION 3
187
188/* tcflush() and TCFLSH use these */
189#define TCIFLUSH 0
190#define TCOFLUSH 1
191#define TCIOFLUSH 2
192
193/* tcsetattr uses these */
194#define TCSANOW 0
195#define TCSADRAIN 1
196#define TCSAFLUSH 2
197
198#endif /* __ARCH_BFIN_TERMBITS_H__ */
diff --git a/include/asm-blackfin/termios.h b/include/asm-blackfin/termios.h
deleted file mode 100644
index d50d063c605a..000000000000
--- a/include/asm-blackfin/termios.h
+++ /dev/null
@@ -1,94 +0,0 @@
1#ifndef __BFIN_TERMIOS_H__
2#define __BFIN_TERMIOS_H__
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42#ifdef __KERNEL__
43
44/* intr=^C quit=^\ erase=del kill=^U
45 eof=^D vtime=\0 vmin=\1 sxtc=\0
46 start=^Q stop=^S susp=^Z eol=\0
47 reprint=^R discard=^U werase=^W lnext=^V
48 eol2=\0
49*/
50#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
51
52/*
53 * Translate a "termio" structure into a "termios". Ugh.
54 */
55#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
56 unsigned short __tmp; \
57 get_user(__tmp,&(termio)->x); \
58 *(unsigned short *) &(termios)->x = __tmp; \
59}
60
61#define user_termio_to_kernel_termios(termios, termio) \
62({ \
63 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
64 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
67 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
68})
69
70/*
71 * Translate a "termios" structure into a "termio". Ugh.
72 */
73#define kernel_termios_to_user_termio(termio, termios) \
74({ \
75 put_user((termios)->c_iflag, &(termio)->c_iflag); \
76 put_user((termios)->c_oflag, &(termio)->c_oflag); \
77 put_user((termios)->c_cflag, &(termio)->c_cflag); \
78 put_user((termios)->c_lflag, &(termio)->c_lflag); \
79 put_user((termios)->c_line, &(termio)->c_line); \
80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
81})
82
83#define user_termios_to_kernel_termios(k, u) \
84 copy_from_user(k, u, sizeof(struct termios2))
85#define kernel_termios_to_user_termios(u, k) \
86 copy_to_user(u, k, sizeof(struct termios2))
87#define user_termios_to_kernel_termios_1(k, u) \
88 copy_from_user(k, u, sizeof(struct termios))
89#define kernel_termios_to_user_termios_1(u, k) \
90 copy_to_user(u, k, sizeof(struct termios))
91
92#endif /* __KERNEL__ */
93
94#endif /* __BFIN_TERMIOS_H__ */
diff --git a/include/asm-blackfin/thread_info.h b/include/asm-blackfin/thread_info.h
deleted file mode 100644
index 642769329d12..000000000000
--- a/include/asm-blackfin/thread_info.h
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * File: include/asm-blackfin/thread_info.h
3 * Based on: include/asm-m68knommu/thread_info.h
4 * Author: LG Soft India
5 * Copyright (C) 2004-2005 Analog Devices Inc.
6 * Created: Tue Sep 21 2004
7 * Description: Blackfin low-level thread information
8 * Modified:
9 * Bugs: Enter bugs at http://blackfin.uclinux.org/
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; see the file COPYING.
23 * If not, write to the Free Software Foundation,
24 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 */
26
27#ifndef _ASM_THREAD_INFO_H
28#define _ASM_THREAD_INFO_H
29
30#include <asm/page.h>
31#include <asm/entry.h>
32#include <asm/l1layout.h>
33#include <linux/compiler.h>
34
35#ifdef __KERNEL__
36
37/* Thread Align Mask to reach to the top of the stack
38 * for any process
39 */
40#define ALIGN_PAGE_MASK 0xffffe000
41
42/*
43 * Size of kernel stack for each process. This must be a power of 2...
44 */
45#define THREAD_SIZE_ORDER 1
46#define THREAD_SIZE 8192 /* 2 pages */
47
48#ifndef __ASSEMBLY__
49
50typedef unsigned long mm_segment_t;
51
52/*
53 * low level task data.
54 * If you change this, change the TI_* offsets below to match.
55 */
56
57struct thread_info {
58 struct task_struct *task; /* main task structure */
59 struct exec_domain *exec_domain; /* execution domain */
60 unsigned long flags; /* low level flags */
61 int cpu; /* cpu we're on */
62 int preempt_count; /* 0 => preemptable, <0 => BUG */
63 mm_segment_t addr_limit; /* address limit */
64 struct restart_block restart_block;
65 struct l1_scratch_task_info l1_task_info;
66};
67
68/*
69 * macros/functions for gaining access to the thread information structure
70 */
71#define INIT_THREAD_INFO(tsk) \
72{ \
73 .task = &tsk, \
74 .exec_domain = &default_exec_domain, \
75 .flags = 0, \
76 .cpu = 0, \
77 .preempt_count = 1, \
78 .restart_block = { \
79 .fn = do_no_restart_syscall, \
80 }, \
81}
82#define init_thread_info (init_thread_union.thread_info)
83#define init_stack (init_thread_union.stack)
84
85/* Given a task stack pointer, you can find its corresponding
86 * thread_info structure just by masking it to the THREAD_SIZE
87 * boundary (currently 8K as you can see above).
88 */
89__attribute_const__
90static inline struct thread_info *current_thread_info(void)
91{
92 struct thread_info *ti;
93 __asm__("%0 = sp;": "=&d"(ti):
94 );
95 return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1));
96}
97
98#endif /* __ASSEMBLY__ */
99
100/*
101 * Offsets in thread_info structure, used in assembly code
102 */
103#define TI_TASK 0
104#define TI_EXECDOMAIN 4
105#define TI_FLAGS 8
106#define TI_CPU 12
107#define TI_PREEMPT 16
108
109#define PREEMPT_ACTIVE 0x4000000
110
111/*
112 * thread information flag bit numbers
113 */
114#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
115#define TIF_SIGPENDING 1 /* signal pending */
116#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
117#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
118 TIF_NEED_RESCHED */
119#define TIF_MEMDIE 4
120#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
121#define TIF_FREEZE 6 /* is freezing for suspend */
122
123/* as above, but as bit values */
124#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
125#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
126#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
127#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
128#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
129#define _TIF_FREEZE (1<<TIF_FREEZE)
130
131#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
132
133#endif /* __KERNEL__ */
134
135#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-blackfin/time.h b/include/asm-blackfin/time.h
deleted file mode 100644
index ddc43ce38533..000000000000
--- a/include/asm-blackfin/time.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * asm-blackfin/time.h:
3 *
4 * Copyright 2004-2008 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef _ASM_BLACKFIN_TIME_H
10#define _ASM_BLACKFIN_TIME_H
11
12/*
13 * The way that the Blackfin core timer works is:
14 * - CCLK is divided by a programmable 8-bit pre-scaler (TSCALE)
15 * - Every time TSCALE ticks, a 32bit is counted down (TCOUNT)
16 *
17 * If you take the fastest clock (1ns, or 1GHz to make the math work easier)
18 * 10ms is 10,000,000 clock ticks, which fits easy into a 32-bit counter
19 * (32 bit counter is 4,294,967,296ns or 4.2 seconds) so, we don't need
20 * to use TSCALE, and program it to zero (which is pass CCLK through).
21 * If you feel like using it, try to keep HZ * TIMESCALE to some
22 * value that divides easy (like power of 2).
23 */
24
25#ifndef CONFIG_CPU_FREQ
26#define TIME_SCALE 1
27#define __bfin_cycles_off (0)
28#define __bfin_cycles_mod (0)
29#else
30/*
31 * Blackfin CPU frequency scaling supports max Core Clock 1, 1/2 and 1/4 .
32 * Whenever we change the Core Clock frequency changes we immediately
33 * adjust the Core Timer Presale Register. This way we don't lose time.
34 */
35#define TIME_SCALE 4
36extern unsigned long long __bfin_cycles_off;
37extern unsigned int __bfin_cycles_mod;
38#endif
39
40#endif
diff --git a/include/asm-blackfin/timex.h b/include/asm-blackfin/timex.h
deleted file mode 100644
index 22b0806161bb..000000000000
--- a/include/asm-blackfin/timex.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * asm-blackfin/timex.h: cpu cycles!
3 *
4 * Copyright 2004-2008 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef _ASM_BLACKFIN_TIMEX_H
10#define _ASM_BLACKFIN_TIMEX_H
11
12#define CLOCK_TICK_RATE 1000000 /* Underlying HZ */
13
14typedef unsigned long long cycles_t;
15
16static inline cycles_t get_cycles(void)
17{
18 unsigned long tmp, tmp2;
19 __asm__("%0 = cycles; %1 = cycles2;" : "=d"(tmp), "=d"(tmp2));
20 return tmp | ((cycles_t)tmp2 << 32);
21}
22
23#endif
diff --git a/include/asm-blackfin/tlb.h b/include/asm-blackfin/tlb.h
deleted file mode 100644
index 89a12ee916d8..000000000000
--- a/include/asm-blackfin/tlb.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _BLACKFIN_TLB_H
2#define _BLACKFIN_TLB_H
3
4#define tlb_start_vma(tlb, vma) do { } while (0)
5#define tlb_end_vma(tlb, vma) do { } while (0)
6#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
7
8/*
9 * .. because we flush the whole mm when it
10 * fills up.
11 */
12#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
13
14#include <asm-generic/tlb.h>
15
16#endif /* _BLACKFIN_TLB_H */
diff --git a/include/asm-blackfin/tlbflush.h b/include/asm-blackfin/tlbflush.h
deleted file mode 100644
index 277b400924b8..000000000000
--- a/include/asm-blackfin/tlbflush.h
+++ /dev/null
@@ -1,56 +0,0 @@
1#ifndef _BLACKFIN_TLBFLUSH_H
2#define _BLACKFIN_TLBFLUSH_H
3
4/*
5 * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org>
6 * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com>
7 */
8
9#include <asm/setup.h>
10
11/*
12 * flush all user-space atc entries.
13 */
14static inline void __flush_tlb(void)
15{
16 BUG();
17}
18
19static inline void __flush_tlb_one(unsigned long addr)
20{
21 BUG();
22}
23
24#define flush_tlb() __flush_tlb()
25
26/*
27 * flush all atc entries (both kernel and user-space entries).
28 */
29static inline void flush_tlb_all(void)
30{
31 BUG();
32}
33
34static inline void flush_tlb_mm(struct mm_struct *mm)
35{
36 BUG();
37}
38
39static inline void flush_tlb_page(struct vm_area_struct *vma,
40 unsigned long addr)
41{
42 BUG();
43}
44
45static inline void flush_tlb_range(struct mm_struct *mm,
46 unsigned long start, unsigned long end)
47{
48 BUG();
49}
50
51static inline void flush_tlb_kernel_page(unsigned long addr)
52{
53 BUG();
54}
55
56#endif
diff --git a/include/asm-blackfin/topology.h b/include/asm-blackfin/topology.h
deleted file mode 100644
index acee23987897..000000000000
--- a/include/asm-blackfin/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_BLACKFIN_TOPOLOGY_H
2#define _ASM_BLACKFIN_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_BLACKFIN_TOPOLOGY_H */
diff --git a/include/asm-blackfin/trace.h b/include/asm-blackfin/trace.h
deleted file mode 100644
index 312b596b9731..000000000000
--- a/include/asm-blackfin/trace.h
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * Common header file for blackfin family of processors.
3 *
4 */
5
6#ifndef _BLACKFIN_TRACE_
7#define _BLACKFIN_TRACE_
8
9/* Normally, we use ON, but you can't turn on software expansion until
10 * interrupts subsystem is ready
11 */
12
13#define BFIN_TRACE_INIT ((CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION << 4) | 0x03)
14#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
15#define BFIN_TRACE_ON (BFIN_TRACE_INIT | (CONFIG_DEBUG_BFIN_HWTRACE_EXPAND << 2))
16#else
17#define BFIN_TRACE_ON (BFIN_TRACE_INIT)
18#endif
19
20#ifndef __ASSEMBLY__
21extern unsigned long trace_buff_offset;
22extern unsigned long software_trace_buff[];
23
24/* Trace Macros for C files */
25
26#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
27
28#define trace_buffer_save(x) \
29 do { \
30 (x) = bfin_read_TBUFCTL(); \
31 bfin_write_TBUFCTL((x) & ~TBUFEN); \
32 } while (0)
33
34#define trace_buffer_restore(x) \
35 do { \
36 bfin_write_TBUFCTL((x)); \
37 } while (0)
38#else /* DEBUG_BFIN_HWTRACE_ON */
39
40#define trace_buffer_save(x)
41#define trace_buffer_restore(x)
42#endif /* CONFIG_DEBUG_BFIN_HWTRACE_ON */
43
44#else
45/* Trace Macros for Assembly files */
46
47#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
48
49#define trace_buffer_stop(preg, dreg) \
50 preg.L = LO(TBUFCTL); \
51 preg.H = HI(TBUFCTL); \
52 dreg = 0x1; \
53 [preg] = dreg;
54
55#define trace_buffer_init(preg, dreg) \
56 preg.L = LO(TBUFCTL); \
57 preg.H = HI(TBUFCTL); \
58 dreg = BFIN_TRACE_INIT; \
59 [preg] = dreg;
60
61#define trace_buffer_save(preg, dreg) \
62 preg.L = LO(TBUFCTL); \
63 preg.H = HI(TBUFCTL); \
64 dreg = [preg]; \
65 [--sp] = dreg; \
66 dreg = 0x1; \
67 [preg] = dreg;
68
69#define trace_buffer_restore(preg, dreg) \
70 preg.L = LO(TBUFCTL); \
71 preg.H = HI(TBUFCTL); \
72 dreg = [sp++]; \
73 [preg] = dreg;
74
75#else /* CONFIG_DEBUG_BFIN_HWTRACE_ON */
76
77#define trace_buffer_stop(preg, dreg)
78#define trace_buffer_init(preg, dreg)
79#define trace_buffer_save(preg, dreg)
80#define trace_buffer_restore(preg, dreg)
81
82#endif /* CONFIG_DEBUG_BFIN_HWTRACE_ON */
83
84#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
85# define DEBUG_HWTRACE_SAVE(preg, dreg) trace_buffer_save(preg, dreg)
86# define DEBUG_HWTRACE_RESTORE(preg, dreg) trace_buffer_restore(preg, dreg)
87#else
88# define DEBUG_HWTRACE_SAVE(preg, dreg)
89# define DEBUG_HWTRACE_RESTORE(preg, dreg)
90#endif
91
92#endif /* __ASSEMBLY__ */
93
94#endif /* _BLACKFIN_TRACE_ */
diff --git a/include/asm-blackfin/traps.h b/include/asm-blackfin/traps.h
deleted file mode 100644
index f0e5f940d9ca..000000000000
--- a/include/asm-blackfin/traps.h
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2 * linux/include/asm/traps.h
3 *
4 * Copyright (C) 1993 Hamish Macdonald
5 *
6 * Lineo, Inc Jul 2001 Tony Kou
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file COPYING in the main directory of this archive
10 * for more details.
11 */
12
13#ifndef _BFIN_TRAPS_H
14#define _BFIN_TRAPS_H
15
16#define VEC_SYS (0)
17#define VEC_EXCPT01 (1)
18#define VEC_EXCPT02 (2)
19#define VEC_EXCPT03 (3)
20#define VEC_EXCPT04 (4)
21#define VEC_EXCPT05 (5)
22#define VEC_EXCPT06 (6)
23#define VEC_EXCPT07 (7)
24#define VEC_EXCPT08 (8)
25#define VEC_EXCPT09 (9)
26#define VEC_EXCPT10 (10)
27#define VEC_EXCPT11 (11)
28#define VEC_EXCPT12 (12)
29#define VEC_EXCPT13 (13)
30#define VEC_EXCPT14 (14)
31#define VEC_EXCPT15 (15)
32#define VEC_STEP (16)
33#define VEC_OVFLOW (17)
34#define VEC_UNDEF_I (33)
35#define VEC_ILGAL_I (34)
36#define VEC_CPLB_VL (35)
37#define VEC_MISALI_D (36)
38#define VEC_UNCOV (37)
39#define VEC_CPLB_M (38)
40#define VEC_CPLB_MHIT (39)
41#define VEC_WATCH (40)
42#define VEC_ISTRU_VL (41) /*ADSP-BF535 only (MH) */
43#define VEC_MISALI_I (42)
44#define VEC_CPLB_I_VL (43)
45#define VEC_CPLB_I_M (44)
46#define VEC_CPLB_I_MHIT (45)
47#define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */
48/* The hardware reserves (63) for future use - we use it to tell our
49 * normal exception handling code we have a hardware error
50 */
51#define VEC_HWERR (63)
52
53#ifndef __ASSEMBLY__
54
55#define HWC_x2(level) \
56 "System MMR Error\n" \
57 level " - An error occurred due to an invalid access to an System MMR location\n" \
58 level " Possible reason: a 32-bit register is accessed with a 16-bit instruction\n" \
59 level " or a 16-bit register is accessed with a 32-bit instruction.\n"
60#define HWC_x3(level) \
61 "External Memory Addressing Error\n"
62#define HWC_x12(level) \
63 "Performance Monitor Overflow\n"
64#define HWC_x18(level) \
65 "RAISE 5 instruction\n" \
66 level " Software issued a RAISE 5 instruction to invoke the Hardware\n"
67#define HWC_default(level) \
68 "Reserved\n"
69#define EXC_0x03(level) \
70 "Application stack overflow\n" \
71 level " - Please increase the stack size of the application using elf2flt -s option,\n" \
72 level " and/or reduce the stack use of the application.\n"
73#define EXC_0x10(level) \
74 "Single step\n" \
75 level " - When the processor is in single step mode, every instruction\n" \
76 level " generates an exception. Primarily used for debugging.\n"
77#define EXC_0x11(level) \
78 "Exception caused by a trace buffer full condition\n" \
79 level " - The processor takes this exception when the trace\n" \
80 level " buffer overflows (only when enabled by the Trace Unit Control register).\n"
81#define EXC_0x21(level) \
82 "Undefined instruction\n" \
83 level " - May be used to emulate instructions that are not defined for\n" \
84 level " a particular processor implementation.\n"
85#define EXC_0x22(level) \
86 "Illegal instruction combination\n" \
87 level " - See section for multi-issue rules in the ADSP-BF53x Blackfin\n" \
88 level " Processor Instruction Set Reference.\n"
89#define EXC_0x23(level) \
90 "Data access CPLB protection violation\n" \
91 level " - Attempted read or write to Supervisor resource,\n" \
92 level " or illegal data memory access. \n"
93#define EXC_0x24(level) \
94 "Data access misaligned address violation\n" \
95 level " - Attempted misaligned data memory or data cache access.\n"
96#define EXC_0x25(level) \
97 "Unrecoverable event\n" \
98 level " - For example, an exception generated while processing a previous exception.\n"
99#define EXC_0x26(level) \
100 "Data access CPLB miss\n" \
101 level " - Used by the MMU to signal a CPLB miss on a data access.\n"
102#define EXC_0x27(level) \
103 "Data access multiple CPLB hits\n" \
104 level " - More than one CPLB entry matches data fetch address.\n"
105#define EXC_0x28(level) \
106 "Program Sequencer Exception caused by an emulation watchpoint match\n" \
107 level " - There is a watchpoint match, and one of the EMUSW\n" \
108 level " bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n"
109#define EXC_0x2A(level) \
110 "Instruction fetch misaligned address violation\n" \
111 level " - Attempted misaligned instruction cache fetch. On a misaligned instruction fetch\n" \
112 level " exception, the return address provided in RETX is the destination address which is\n" \
113 level " misaligned, rather than the address of the offending instruction.\n"
114#define EXC_0x2B(level) \
115 "CPLB protection violation\n" \
116 level " - Illegal instruction fetch access (memory protection violation).\n"
117#define EXC_0x2C(level) \
118 "Instruction fetch CPLB miss\n" \
119 level " - CPLB miss on an instruction fetch.\n"
120#define EXC_0x2D(level) \
121 "Instruction fetch multiple CPLB hits\n" \
122 level " - More than one CPLB entry matches instruction fetch address.\n"
123#define EXC_0x2E(level) \
124 "Illegal use of supervisor resource\n" \
125 level " - Attempted to use a Supervisor register or instruction from User mode.\n" \
126 level " Supervisor resources are registers and instructions that are reserved\n" \
127 level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \
128 level " only instructions.\n"
129
130#endif /* __ASSEMBLY__ */
131#endif /* _BFIN_TRAPS_H */
diff --git a/include/asm-blackfin/types.h b/include/asm-blackfin/types.h
deleted file mode 100644
index 8441cbc2bf9e..000000000000
--- a/include/asm-blackfin/types.h
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifndef _BFIN_TYPES_H
2#define _BFIN_TYPES_H
3
4/*
5 * This file is never included by application software unless
6 * explicitly requested (e.g., via linux/types.h) in which case the
7 * application is Linux specific so (user-) name space pollution is
8 * not a major issue. However, for interoperability, libraries still
9 * need to be careful to avoid a name clashes.
10 */
11#include <asm-generic/int-ll64.h>
12
13#ifndef __ASSEMBLY__
14
15typedef unsigned short umode_t;
16
17#endif /* __ASSEMBLY__ */
18/*
19 * These aren't exported outside the kernel to avoid name space clashes
20 */
21#ifdef __KERNEL__
22
23#define BITS_PER_LONG 32
24
25#ifndef __ASSEMBLY__
26
27/* Dma addresses are 32-bits wide. */
28
29typedef u32 dma_addr_t;
30typedef u64 dma64_addr_t;
31
32#endif /* __ASSEMBLY__ */
33
34#endif /* __KERNEL__ */
35
36#endif /* _BFIN_TYPES_H */
diff --git a/include/asm-blackfin/uaccess.h b/include/asm-blackfin/uaccess.h
deleted file mode 100644
index d928b8099056..000000000000
--- a/include/asm-blackfin/uaccess.h
+++ /dev/null
@@ -1,271 +0,0 @@
1/* Changes made by Lineo Inc. May 2001
2 *
3 * Based on: include/asm-m68knommu/uaccess.h
4 */
5
6#ifndef __BLACKFIN_UACCESS_H
7#define __BLACKFIN_UACCESS_H
8
9/*
10 * User space memory access functions
11 */
12#include <linux/sched.h>
13#include <linux/mm.h>
14#include <linux/string.h>
15
16#include <asm/segment.h>
17#ifdef CONFIG_ACCESS_CHECK
18# include <asm/bfin-global.h>
19#endif
20
21#define get_ds() (KERNEL_DS)
22#define get_fs() (current_thread_info()->addr_limit)
23
24static inline void set_fs(mm_segment_t fs)
25{
26 current_thread_info()->addr_limit = fs;
27}
28
29#define segment_eq(a,b) ((a) == (b))
30
31#define VERIFY_READ 0
32#define VERIFY_WRITE 1
33
34#define access_ok(type, addr, size) _access_ok((unsigned long)(addr), (size))
35
36static inline int is_in_rom(unsigned long addr)
37{
38 /*
39 * What we are really trying to do is determine if addr is
40 * in an allocated kernel memory region. If not then assume
41 * we cannot free it or otherwise de-allocate it. Ideally
42 * we could restrict this to really being in a ROM or flash,
43 * but that would need to be done on a board by board basis,
44 * not globally.
45 */
46 if ((addr < _ramstart) || (addr >= _ramend))
47 return (1);
48
49 /* Default case, not in ROM */
50 return (0);
51}
52
53/*
54 * The fs value determines whether argument validity checking should be
55 * performed or not. If get_fs() == USER_DS, checking is performed, with
56 * get_fs() == KERNEL_DS, checking is bypassed.
57 */
58
59#ifndef CONFIG_ACCESS_CHECK
60static inline int _access_ok(unsigned long addr, unsigned long size) { return 1; }
61#else
62#ifdef CONFIG_ACCESS_OK_L1
63extern int _access_ok(unsigned long addr, unsigned long size)__attribute__((l1_text));
64#else
65extern int _access_ok(unsigned long addr, unsigned long size);
66#endif
67#endif
68
69/*
70 * The exception table consists of pairs of addresses: the first is the
71 * address of an instruction that is allowed to fault, and the second is
72 * the address at which the program should continue. No registers are
73 * modified, so it is entirely up to the continuation code to figure out
74 * what to do.
75 *
76 * All the routines below use bits of fixup code that are out of line
77 * with the main instruction path. This means when everything is well,
78 * we don't even have to jump over them. Further, they do not intrude
79 * on our cache or tlb entries.
80 */
81
82struct exception_table_entry {
83 unsigned long insn, fixup;
84};
85
86/* Returns 0 if exception not found and fixup otherwise. */
87extern unsigned long search_exception_table(unsigned long);
88
89/*
90 * These are the main single-value transfer routines. They automatically
91 * use the right size if we just have the right pointer type.
92 */
93
94#define put_user(x,p) \
95 ({ \
96 int _err = 0; \
97 typeof(*(p)) _x = (x); \
98 typeof(*(p)) *_p = (p); \
99 if (!access_ok(VERIFY_WRITE, _p, sizeof(*(_p)))) {\
100 _err = -EFAULT; \
101 } \
102 else { \
103 switch (sizeof (*(_p))) { \
104 case 1: \
105 __put_user_asm(_x, _p, B); \
106 break; \
107 case 2: \
108 __put_user_asm(_x, _p, W); \
109 break; \
110 case 4: \
111 __put_user_asm(_x, _p, ); \
112 break; \
113 case 8: { \
114 long _xl, _xh; \
115 _xl = ((long *)&_x)[0]; \
116 _xh = ((long *)&_x)[1]; \
117 __put_user_asm(_xl, ((long *)_p)+0, ); \
118 __put_user_asm(_xh, ((long *)_p)+1, ); \
119 } break; \
120 default: \
121 _err = __put_user_bad(); \
122 break; \
123 } \
124 } \
125 _err; \
126 })
127
128#define __put_user(x,p) put_user(x,p)
129static inline int bad_user_access_length(void)
130{
131 panic("bad_user_access_length");
132 return -1;
133}
134
135#define __put_user_bad() (printk(KERN_INFO "put_user_bad %s:%d %s\n",\
136 __FILE__, __LINE__, __func__),\
137 bad_user_access_length(), (-EFAULT))
138
139/*
140 * Tell gcc we read from memory instead of writing: this is because
141 * we do not write to any memory gcc knows about, so there are no
142 * aliasing issues.
143 */
144
145#define __ptr(x) ((unsigned long *)(x))
146
147#define __put_user_asm(x,p,bhw) \
148 __asm__ (#bhw"[%1] = %0;\n\t" \
149 : /* no outputs */ \
150 :"d" (x),"a" (__ptr(p)) : "memory")
151
152#define get_user(x,p) \
153 ({ \
154 int _err = 0; \
155 typeof(*(p)) *_p = (p); \
156 if (!access_ok(VERIFY_READ, _p, sizeof(*(_p)))) { \
157 _err = -EFAULT; \
158 } \
159 else { \
160 switch (sizeof(*(_p))) { \
161 case 1: \
162 __get_user_asm(x, _p, B,(Z)); \
163 break; \
164 case 2: \
165 __get_user_asm(x, _p, W,(Z)); \
166 break; \
167 case 4: \
168 __get_user_asm(x, _p, , ); \
169 break; \
170 case 8: { \
171 unsigned long _xl, _xh; \
172 __get_user_asm(_xl, ((unsigned long *)_p)+0, , ); \
173 __get_user_asm(_xh, ((unsigned long *)_p)+1, , ); \
174 ((unsigned long *)&x)[0] = _xl; \
175 ((unsigned long *)&x)[1] = _xh; \
176 } break; \
177 default: \
178 x = 0; \
179 printk(KERN_INFO "get_user_bad: %s:%d %s\n", \
180 __FILE__, __LINE__, __func__); \
181 _err = __get_user_bad(); \
182 break; \
183 } \
184 } \
185 _err; \
186 })
187
188#define __get_user(x,p) get_user(x,p)
189
190#define __get_user_bad() (bad_user_access_length(), (-EFAULT))
191
192#define __get_user_asm(x,p,bhw,option) \
193 { \
194 unsigned long _tmp; \
195 __asm__ ("%0 =" #bhw "[%1]"#option";\n\t" \
196 : "=d" (_tmp) \
197 : "a" (__ptr(p))); \
198 (x) = (__typeof__(*(p))) _tmp; \
199 }
200
201#define __copy_from_user(to, from, n) copy_from_user(to, from, n)
202#define __copy_to_user(to, from, n) copy_to_user(to, from, n)
203#define __copy_to_user_inatomic __copy_to_user
204#define __copy_from_user_inatomic __copy_from_user
205
206#define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n))\
207 return retval; })
208
209#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n))\
210 return retval; })
211
212static inline long copy_from_user(void *to,
213 const void __user * from, unsigned long n)
214{
215 if (access_ok(VERIFY_READ, from, n))
216 memcpy(to, from, n);
217 else
218 return n;
219 return 0;
220}
221
222static inline long copy_to_user(void *to,
223 const void __user * from, unsigned long n)
224{
225 if (access_ok(VERIFY_WRITE, to, n))
226 memcpy(to, from, n);
227 else
228 return n;
229 return 0;
230}
231
232/*
233 * Copy a null terminated string from userspace.
234 */
235
236static inline long strncpy_from_user(char *dst,
237 const char *src, long count)
238{
239 char *tmp;
240 if (!access_ok(VERIFY_READ, src, 1))
241 return -EFAULT;
242 strncpy(dst, src, count);
243 for (tmp = dst; *tmp && count > 0; tmp++, count--) ;
244 return (tmp - dst);
245}
246
247/*
248 * Return the size of a string (including the ending 0)
249 *
250 * Return 0 on exception, a value greater than N if too long
251 */
252static inline long strnlen_user(const char *src, long n)
253{
254 return (strlen(src) + 1);
255}
256
257#define strlen_user(str) strnlen_user(str, 32767)
258
259/*
260 * Zero Userspace
261 */
262
263static inline unsigned long __clear_user(void *to, unsigned long n)
264{
265 memset(to, 0, n);
266 return 0;
267}
268
269#define clear_user(to, n) __clear_user(to, n)
270
271#endif /* _BLACKFIN_UACCESS_H */
diff --git a/include/asm-blackfin/ucontext.h b/include/asm-blackfin/ucontext.h
deleted file mode 100644
index 4a4e3856beba..000000000000
--- a/include/asm-blackfin/ucontext.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/** Changes made by Tony Kou Lineo Inc. May 2001
2 *
3 * Based on: include/m68knommu/ucontext.h
4 */
5
6#ifndef _BLACKFIN_UCONTEXT_H
7#define _BLACKFIN_UCONTEXT_H
8
9struct ucontext {
10 unsigned long uc_flags; /* the others are necessary */
11 struct ucontext *uc_link;
12 stack_t uc_stack;
13 struct sigcontext uc_mcontext;
14 sigset_t uc_sigmask; /* mask last for extensibility */
15};
16
17#endif /* _BLACKFIN_UCONTEXT_H */
diff --git a/include/asm-blackfin/unaligned.h b/include/asm-blackfin/unaligned.h
deleted file mode 100644
index fd8a1d634945..000000000000
--- a/include/asm-blackfin/unaligned.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _ASM_BLACKFIN_UNALIGNED_H
2#define _ASM_BLACKFIN_UNALIGNED_H
3
4#include <linux/unaligned/le_struct.h>
5#include <linux/unaligned/be_byteshift.h>
6#include <linux/unaligned/generic.h>
7
8#define get_unaligned __get_unaligned_le
9#define put_unaligned __put_unaligned_le
10
11#endif /* _ASM_BLACKFIN_UNALIGNED_H */
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h
deleted file mode 100644
index 42955d0c439b..000000000000
--- a/include/asm-blackfin/unistd.h
+++ /dev/null
@@ -1,432 +0,0 @@
1#ifndef __ASM_BFIN_UNISTD_H
2#define __ASM_BFIN_UNISTD_H
3/*
4 * This file contains the system call numbers.
5 */
6#define __NR_restart_syscall 0
7#define __NR_exit 1
8#define __NR_fork 2
9#define __NR_read 3
10#define __NR_write 4
11#define __NR_open 5
12#define __NR_close 6
13 /* 7 __NR_waitpid obsolete */
14#define __NR_creat 8
15#define __NR_link 9
16#define __NR_unlink 10
17#define __NR_execve 11
18#define __NR_chdir 12
19#define __NR_time 13
20#define __NR_mknod 14
21#define __NR_chmod 15
22#define __NR_chown 16
23 /* 17 __NR_break obsolete */
24 /* 18 __NR_oldstat obsolete */
25#define __NR_lseek 19
26#define __NR_getpid 20
27#define __NR_mount 21
28 /* 22 __NR_umount obsolete */
29#define __NR_setuid 23
30#define __NR_getuid 24
31#define __NR_stime 25
32#define __NR_ptrace 26
33#define __NR_alarm 27
34 /* 28 __NR_oldfstat obsolete */
35#define __NR_pause 29
36 /* 30 __NR_utime obsolete */
37 /* 31 __NR_stty obsolete */
38 /* 32 __NR_gtty obsolete */
39#define __NR_access 33
40#define __NR_nice 34
41 /* 35 __NR_ftime obsolete */
42#define __NR_sync 36
43#define __NR_kill 37
44#define __NR_rename 38
45#define __NR_mkdir 39
46#define __NR_rmdir 40
47#define __NR_dup 41
48#define __NR_pipe 42
49#define __NR_times 43
50 /* 44 __NR_prof obsolete */
51#define __NR_brk 45
52#define __NR_setgid 46
53#define __NR_getgid 47
54 /* 48 __NR_signal obsolete */
55#define __NR_geteuid 49
56#define __NR_getegid 50
57#define __NR_acct 51
58#define __NR_umount2 52
59 /* 53 __NR_lock obsolete */
60#define __NR_ioctl 54
61#define __NR_fcntl 55
62 /* 56 __NR_mpx obsolete */
63#define __NR_setpgid 57
64 /* 58 __NR_ulimit obsolete */
65 /* 59 __NR_oldolduname obsolete */
66#define __NR_umask 60
67#define __NR_chroot 61
68#define __NR_ustat 62
69#define __NR_dup2 63
70#define __NR_getppid 64
71#define __NR_getpgrp 65
72#define __NR_setsid 66
73 /* 67 __NR_sigaction obsolete */
74#define __NR_sgetmask 68
75#define __NR_ssetmask 69
76#define __NR_setreuid 70
77#define __NR_setregid 71
78 /* 72 __NR_sigsuspend obsolete */
79 /* 73 __NR_sigpending obsolete */
80#define __NR_sethostname 74
81#define __NR_setrlimit 75
82 /* 76 __NR_old_getrlimit obsolete */
83#define __NR_getrusage 77
84#define __NR_gettimeofday 78
85#define __NR_settimeofday 79
86#define __NR_getgroups 80
87#define __NR_setgroups 81
88 /* 82 __NR_select obsolete */
89#define __NR_symlink 83
90 /* 84 __NR_oldlstat obsolete */
91#define __NR_readlink 85
92 /* 86 __NR_uselib obsolete */
93 /* 87 __NR_swapon obsolete */
94#define __NR_reboot 88
95 /* 89 __NR_readdir obsolete */
96 /* 90 __NR_mmap obsolete */
97#define __NR_munmap 91
98#define __NR_truncate 92
99#define __NR_ftruncate 93
100#define __NR_fchmod 94
101#define __NR_fchown 95
102#define __NR_getpriority 96
103#define __NR_setpriority 97
104 /* 98 __NR_profil obsolete */
105#define __NR_statfs 99
106#define __NR_fstatfs 100
107 /* 101 __NR_ioperm */
108 /* 102 __NR_socketcall obsolete */
109#define __NR_syslog 103
110#define __NR_setitimer 104
111#define __NR_getitimer 105
112#define __NR_stat 106
113#define __NR_lstat 107
114#define __NR_fstat 108
115 /* 109 __NR_olduname obsolete */
116 /* 110 __NR_iopl obsolete */
117#define __NR_vhangup 111
118 /* 112 __NR_idle obsolete */
119 /* 113 __NR_vm86old */
120#define __NR_wait4 114
121 /* 115 __NR_swapoff obsolete */
122#define __NR_sysinfo 116
123 /* 117 __NR_ipc oboslete */
124#define __NR_fsync 118
125 /* 119 __NR_sigreturn obsolete */
126#define __NR_clone 120
127#define __NR_setdomainname 121
128#define __NR_uname 122
129 /* 123 __NR_modify_ldt obsolete */
130#define __NR_adjtimex 124
131#define __NR_mprotect 125
132 /* 126 __NR_sigprocmask obsolete */
133 /* 127 __NR_create_module obsolete */
134#define __NR_init_module 128
135#define __NR_delete_module 129
136 /* 130 __NR_get_kernel_syms obsolete */
137#define __NR_quotactl 131
138#define __NR_getpgid 132
139#define __NR_fchdir 133
140#define __NR_bdflush 134
141 /* 135 was sysfs */
142#define __NR_personality 136
143 /* 137 __NR_afs_syscall */
144#define __NR_setfsuid 138
145#define __NR_setfsgid 139
146#define __NR__llseek 140
147#define __NR_getdents 141
148 /* 142 __NR__newselect obsolete */
149#define __NR_flock 143
150 /* 144 __NR_msync obsolete */
151#define __NR_readv 145
152#define __NR_writev 146
153#define __NR_getsid 147
154#define __NR_fdatasync 148
155#define __NR__sysctl 149
156 /* 150 __NR_mlock */
157 /* 151 __NR_munlock */
158 /* 152 __NR_mlockall */
159 /* 153 __NR_munlockall */
160#define __NR_sched_setparam 154
161#define __NR_sched_getparam 155
162#define __NR_sched_setscheduler 156
163#define __NR_sched_getscheduler 157
164#define __NR_sched_yield 158
165#define __NR_sched_get_priority_max 159
166#define __NR_sched_get_priority_min 160
167#define __NR_sched_rr_get_interval 161
168#define __NR_nanosleep 162
169#define __NR_mremap 163
170#define __NR_setresuid 164
171#define __NR_getresuid 165
172 /* 166 __NR_vm86 */
173 /* 167 __NR_query_module */
174 /* 168 __NR_poll */
175#define __NR_nfsservctl 169
176#define __NR_setresgid 170
177#define __NR_getresgid 171
178#define __NR_prctl 172
179#define __NR_rt_sigreturn 173
180#define __NR_rt_sigaction 174
181#define __NR_rt_sigprocmask 175
182#define __NR_rt_sigpending 176
183#define __NR_rt_sigtimedwait 177
184#define __NR_rt_sigqueueinfo 178
185#define __NR_rt_sigsuspend 179
186#define __NR_pread 180
187#define __NR_pwrite 181
188#define __NR_lchown 182
189#define __NR_getcwd 183
190#define __NR_capget 184
191#define __NR_capset 185
192#define __NR_sigaltstack 186
193#define __NR_sendfile 187
194 /* 188 __NR_getpmsg */
195 /* 189 __NR_putpmsg */
196#define __NR_vfork 190
197#define __NR_getrlimit 191
198#define __NR_mmap2 192
199#define __NR_truncate64 193
200#define __NR_ftruncate64 194
201#define __NR_stat64 195
202#define __NR_lstat64 196
203#define __NR_fstat64 197
204#define __NR_chown32 198
205#define __NR_getuid32 199
206#define __NR_getgid32 200
207#define __NR_geteuid32 201
208#define __NR_getegid32 202
209#define __NR_setreuid32 203
210#define __NR_setregid32 204
211#define __NR_getgroups32 205
212#define __NR_setgroups32 206
213#define __NR_fchown32 207
214#define __NR_setresuid32 208
215#define __NR_getresuid32 209
216#define __NR_setresgid32 210
217#define __NR_getresgid32 211
218#define __NR_lchown32 212
219#define __NR_setuid32 213
220#define __NR_setgid32 214
221#define __NR_setfsuid32 215
222#define __NR_setfsgid32 216
223#define __NR_pivot_root 217
224 /* 218 __NR_mincore */
225 /* 219 __NR_madvise */
226#define __NR_getdents64 220
227#define __NR_fcntl64 221
228 /* 222 reserved for TUX */
229 /* 223 reserved for TUX */
230#define __NR_gettid 224
231#define __NR_readahead 225
232#define __NR_setxattr 226
233#define __NR_lsetxattr 227
234#define __NR_fsetxattr 228
235#define __NR_getxattr 229
236#define __NR_lgetxattr 230
237#define __NR_fgetxattr 231
238#define __NR_listxattr 232
239#define __NR_llistxattr 233
240#define __NR_flistxattr 234
241#define __NR_removexattr 235
242#define __NR_lremovexattr 236
243#define __NR_fremovexattr 237
244#define __NR_tkill 238
245#define __NR_sendfile64 239
246#define __NR_futex 240
247#define __NR_sched_setaffinity 241
248#define __NR_sched_getaffinity 242
249 /* 243 __NR_set_thread_area */
250 /* 244 __NR_get_thread_area */
251#define __NR_io_setup 245
252#define __NR_io_destroy 246
253#define __NR_io_getevents 247
254#define __NR_io_submit 248
255#define __NR_io_cancel 249
256 /* 250 __NR_alloc_hugepages */
257 /* 251 __NR_free_hugepages */
258#define __NR_exit_group 252
259#define __NR_lookup_dcookie 253
260#define __NR_bfin_spinlock 254
261
262#define __NR_epoll_create 255
263#define __NR_epoll_ctl 256
264#define __NR_epoll_wait 257
265 /* 258 __NR_remap_file_pages */
266#define __NR_set_tid_address 259
267#define __NR_timer_create 260
268#define __NR_timer_settime 261
269#define __NR_timer_gettime 262
270#define __NR_timer_getoverrun 263
271#define __NR_timer_delete 264
272#define __NR_clock_settime 265
273#define __NR_clock_gettime 266
274#define __NR_clock_getres 267
275#define __NR_clock_nanosleep 268
276#define __NR_statfs64 269
277#define __NR_fstatfs64 270
278#define __NR_tgkill 271
279#define __NR_utimes 272
280#define __NR_fadvise64_64 273
281 /* 274 __NR_vserver */
282 /* 275 __NR_mbind */
283 /* 276 __NR_get_mempolicy */
284 /* 277 __NR_set_mempolicy */
285#define __NR_mq_open 278
286#define __NR_mq_unlink 279
287#define __NR_mq_timedsend 280
288#define __NR_mq_timedreceive 281
289#define __NR_mq_notify 282
290#define __NR_mq_getsetattr 283
291#define __NR_kexec_load 284
292#define __NR_waitid 285
293#define __NR_add_key 286
294#define __NR_request_key 287
295#define __NR_keyctl 288
296#define __NR_ioprio_set 289
297#define __NR_ioprio_get 290
298#define __NR_inotify_init 291
299#define __NR_inotify_add_watch 292
300#define __NR_inotify_rm_watch 293
301 /* 294 __NR_migrate_pages */
302#define __NR_openat 295
303#define __NR_mkdirat 296
304#define __NR_mknodat 297
305#define __NR_fchownat 298
306#define __NR_futimesat 299
307#define __NR_fstatat64 300
308#define __NR_unlinkat 301
309#define __NR_renameat 302
310#define __NR_linkat 303
311#define __NR_symlinkat 304
312#define __NR_readlinkat 305
313#define __NR_fchmodat 306
314#define __NR_faccessat 307
315#define __NR_pselect6 308
316#define __NR_ppoll 309
317#define __NR_unshare 310
318
319/* Blackfin private syscalls */
320#define __NR_sram_alloc 311
321#define __NR_sram_free 312
322#define __NR_dma_memcpy 313
323
324/* socket syscalls */
325#define __NR_accept 314
326#define __NR_bind 315
327#define __NR_connect 316
328#define __NR_getpeername 317
329#define __NR_getsockname 318
330#define __NR_getsockopt 319
331#define __NR_listen 320
332#define __NR_recv 321
333#define __NR_recvfrom 322
334#define __NR_recvmsg 323
335#define __NR_send 324
336#define __NR_sendmsg 325
337#define __NR_sendto 326
338#define __NR_setsockopt 327
339#define __NR_shutdown 328
340#define __NR_socket 329
341#define __NR_socketpair 330
342
343/* sysv ipc syscalls */
344#define __NR_semctl 331
345#define __NR_semget 332
346#define __NR_semop 333
347#define __NR_msgctl 334
348#define __NR_msgget 335
349#define __NR_msgrcv 336
350#define __NR_msgsnd 337
351#define __NR_shmat 338
352#define __NR_shmctl 339
353#define __NR_shmdt 340
354#define __NR_shmget 341
355
356#define __NR_splice 342
357#define __NR_sync_file_range 343
358#define __NR_tee 344
359#define __NR_vmsplice 345
360
361#define __NR_epoll_pwait 346
362#define __NR_utimensat 347
363#define __NR_signalfd 348
364#define __NR_timerfd_create 349
365#define __NR_eventfd 350
366#define __NR_pread64 351
367#define __NR_pwrite64 352
368#define __NR_fadvise64 353
369#define __NR_set_robust_list 354
370#define __NR_get_robust_list 355
371#define __NR_fallocate 356
372#define __NR_semtimedop 357
373#define __NR_timerfd_settime 358
374#define __NR_timerfd_gettime 359
375
376#define __NR_syscall 360
377#define NR_syscalls __NR_syscall
378
379/* Old optional stuff no one actually uses */
380#define __IGNORE_sysfs
381#define __IGNORE_uselib
382
383/* Implement the newer interfaces */
384#define __IGNORE_mmap
385#define __IGNORE_poll
386#define __IGNORE_select
387#define __IGNORE_utime
388
389/* Not relevant on no-mmu */
390#define __IGNORE_swapon
391#define __IGNORE_swapoff
392#define __IGNORE_msync
393#define __IGNORE_mlock
394#define __IGNORE_munlock
395#define __IGNORE_mlockall
396#define __IGNORE_munlockall
397#define __IGNORE_mincore
398#define __IGNORE_madvise
399#define __IGNORE_remap_file_pages
400#define __IGNORE_mbind
401#define __IGNORE_get_mempolicy
402#define __IGNORE_set_mempolicy
403#define __IGNORE_migrate_pages
404#define __IGNORE_move_pages
405#define __IGNORE_getcpu
406
407#ifdef __KERNEL__
408#define __ARCH_WANT_IPC_PARSE_VERSION
409#define __ARCH_WANT_STAT64
410#define __ARCH_WANT_SYS_ALARM
411#define __ARCH_WANT_SYS_GETHOSTNAME
412#define __ARCH_WANT_SYS_PAUSE
413#define __ARCH_WANT_SYS_SGETMASK
414#define __ARCH_WANT_SYS_TIME
415#define __ARCH_WANT_SYS_FADVISE64
416#define __ARCH_WANT_SYS_GETPGRP
417#define __ARCH_WANT_SYS_LLSEEK
418#define __ARCH_WANT_SYS_NICE
419#define __ARCH_WANT_SYS_RT_SIGACTION
420#define __ARCH_WANT_SYS_RT_SIGSUSPEND
421
422/*
423 * "Conditional" syscalls
424 *
425 * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
426 * but it doesn't work on all toolchains, so we just do it by hand
427 */
428#define cond_syscall(x) asm(".weak\t_" #x "\n\t.set\t_" #x ",_sys_ni_syscall");
429
430#endif /* __KERNEL__ */
431
432#endif /* __ASM_BFIN_UNISTD_H */
diff --git a/include/asm-blackfin/user.h b/include/asm-blackfin/user.h
deleted file mode 100644
index afe6a0e1f7ce..000000000000
--- a/include/asm-blackfin/user.h
+++ /dev/null
@@ -1,89 +0,0 @@
1#ifndef _BFIN_USER_H
2#define _BFIN_USER_H
3
4/* Changes by Tony Kou Lineo, Inc. July, 2001
5 *
6 * Based include/asm-m68knommu/user.h
7 *
8 */
9
10/* Core file format: The core file is written in such a way that gdb
11 can understand it and provide useful information to the user (under
12 linux we use the 'trad-core' bfd). There are quite a number of
13 obstacles to being able to view the contents of the floating point
14 registers, and until these are solved you will not be able to view the
15 contents of them. Actually, you can read in the core file and look at
16 the contents of the user struct to find out what the floating point
17 registers contain.
18 The actual file contents are as follows:
19 UPAGE: 1 page consisting of a user struct that tells gdb what is present
20 in the file. Directly after this is a copy of the task_struct, which
21 is currently not used by gdb, but it may come in useful at some point.
22 All of the registers are stored as part of the upage. The upage should
23 always be only one page.
24 DATA: The data area is stored. We use current->end_text to
25 current->brk to pick up all of the user variables, plus any memory
26 that may have been malloced. No attempt is made to determine if a page
27 is demand-zero or if a page is totally unused, we just cover the entire
28 range. All of the addresses are rounded in such a way that an integral
29 number of pages is written.
30 STACK: We need the stack information in order to get a meaningful
31 backtrace. We need to write the data from (esp) to
32 current->start_stack, so we round each of these off in order to be able
33 to write an integer number of pages.
34 The minimum core file size is 3 pages, or 12288 bytes.
35*/
36struct user_bfinfp_struct {
37};
38
39/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
40 is still the layout used by user (the new pt_regs doesn't have
41 all registers). */
42struct user_regs_struct {
43 long r0, r1, r2, r3, r4, r5, r6, r7;
44 long p0, p1, p2, p3, p4, p5, usp, fp;
45 long i0, i1, i2, i3;
46 long l0, l1, l2, l3;
47 long b0, b1, b2, b3;
48 long m0, m1, m2, m3;
49 long a0w, a1w;
50 long a0x, a1x;
51 unsigned long rets;
52 unsigned long astat;
53 unsigned long pc;
54 unsigned long orig_p0;
55};
56
57/* When the kernel dumps core, it starts by dumping the user struct -
58 this will be used by gdb to figure out where the data and stack segments
59 are within the file, and what virtual addresses to use. */
60
61struct user {
62/* We start with the registers, to mimic the way that "memory" is returned
63 from the ptrace(3,...) function. */
64
65 struct user_regs_struct regs; /* Where the registers are actually stored */
66
67/* The rest of this junk is to help gdb figure out what goes where */
68 unsigned long int u_tsize; /* Text segment size (pages). */
69 unsigned long int u_dsize; /* Data segment size (pages). */
70 unsigned long int u_ssize; /* Stack segment size (pages). */
71 unsigned long start_code; /* Starting virtual address of text. */
72 unsigned long start_stack; /* Starting virtual address of stack area.
73 This is actually the bottom of the stack,
74 the top of the stack is always found in the
75 esp register. */
76 long int signal; /* Signal that caused the core dump. */
77 int reserved; /* No longer used */
78 unsigned long u_ar0;
79 /* Used by gdb to help find the values for */
80 /* the registers. */
81 unsigned long magic; /* To uniquely identify a core file */
82 char u_comm[32]; /* User command that was responsible */
83};
84#define NBPG PAGE_SIZE
85#define UPAGES 1
86#define HOST_TEXT_START_ADDR (u.start_code)
87#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
88
89#endif
diff --git a/include/asm-cris/Kbuild b/include/asm-cris/Kbuild
index b7037d80d461..d5b631935ec8 100644
--- a/include/asm-cris/Kbuild
+++ b/include/asm-cris/Kbuild
@@ -1,6 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += arch/
4header-y += arch-v10/ 3header-y += arch-v10/
5header-y += arch-v32/ 4header-y += arch-v32/
6 5
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h
index 20e44fe00abf..ca7475e73b5e 100644
--- a/include/asm-frv/io.h
+++ b/include/asm-frv/io.h
@@ -271,6 +271,8 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l
271 return __ioremap(physaddr, size, IOMAP_FULL_CACHING); 271 return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
272} 272}
273 273
274#define ioremap_wc ioremap_nocache
275
274extern void iounmap(void volatile __iomem *addr); 276extern void iounmap(void volatile __iomem *addr);
275 277
276static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) 278static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index 864181385579..15828b2d663c 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -68,12 +68,16 @@
68 ((nr) << _IOC_NRSHIFT) | \ 68 ((nr) << _IOC_NRSHIFT) | \
69 ((size) << _IOC_SIZESHIFT)) 69 ((size) << _IOC_SIZESHIFT))
70 70
71#ifdef __KERNEL__
71/* provoke compile error for invalid uses of size argument */ 72/* provoke compile error for invalid uses of size argument */
72extern unsigned int __invalid_size_argument_for_IOC; 73extern unsigned int __invalid_size_argument_for_IOC;
73#define _IOC_TYPECHECK(t) \ 74#define _IOC_TYPECHECK(t) \
74 ((sizeof(t) == sizeof(t[1]) && \ 75 ((sizeof(t) == sizeof(t[1]) && \
75 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 76 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
76 sizeof(t) : __invalid_size_argument_for_IOC) 77 sizeof(t) : __invalid_size_argument_for_IOC)
78#else
79#define _IOC_TYPECHECK(t) (sizeof(t))
80#endif
77 81
78/* used to create numbers */ 82/* used to create numbers */
79#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) 83#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h
index be4af0029ac0..71ef3f0b9685 100644
--- a/include/asm-generic/rtc.h
+++ b/include/asm-generic/rtc.h
@@ -15,6 +15,7 @@
15#include <linux/mc146818rtc.h> 15#include <linux/mc146818rtc.h>
16#include <linux/rtc.h> 16#include <linux/rtc.h>
17#include <linux/bcd.h> 17#include <linux/bcd.h>
18#include <linux/delay.h>
18 19
19#define RTC_PIE 0x40 /* periodic interrupt enable */ 20#define RTC_PIE 0x40 /* periodic interrupt enable */
20#define RTC_AIE 0x20 /* alarm interrupt enable */ 21#define RTC_AIE 0x20 /* alarm interrupt enable */
@@ -43,7 +44,6 @@ static inline unsigned char rtc_is_updating(void)
43 44
44static inline unsigned int get_rtc_time(struct rtc_time *time) 45static inline unsigned int get_rtc_time(struct rtc_time *time)
45{ 46{
46 unsigned long uip_watchdog = jiffies;
47 unsigned char ctrl; 47 unsigned char ctrl;
48 unsigned long flags; 48 unsigned long flags;
49 49
@@ -53,19 +53,15 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
53 53
54 /* 54 /*
55 * read RTC once any update in progress is done. The update 55 * read RTC once any update in progress is done. The update
56 * can take just over 2ms. We wait 10 to 20ms. There is no need to 56 * can take just over 2ms. We wait 20ms. There is no need to
57 * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. 57 * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP.
58 * If you need to know *exactly* when a second has started, enable 58 * If you need to know *exactly* when a second has started, enable
59 * periodic update complete interrupts, (via ioctl) and then 59 * periodic update complete interrupts, (via ioctl) and then
60 * immediately read /dev/rtc which will block until you get the IRQ. 60 * immediately read /dev/rtc which will block until you get the IRQ.
61 * Once the read clears, read the RTC time (again via ioctl). Easy. 61 * Once the read clears, read the RTC time (again via ioctl). Easy.
62 */ 62 */
63 63 if (rtc_is_updating())
64 if (rtc_is_updating() != 0) 64 mdelay(20);
65 while (jiffies - uip_watchdog < 2*HZ/100) {
66 barrier();
67 cpu_relax();
68 }
69 65
70 /* 66 /*
71 * Only the values that we read from the RTC are set. We leave 67 * Only the values that we read from the RTC are set. We leave
diff --git a/include/asm-h8300/Kbuild b/include/asm-h8300/Kbuild
deleted file mode 100644
index c68e1680da01..000000000000
--- a/include/asm-h8300/Kbuild
+++ /dev/null
@@ -1 +0,0 @@
1include include/asm-generic/Kbuild.asm
diff --git a/include/asm-h8300/a.out.h b/include/asm-h8300/a.out.h
deleted file mode 100644
index ded780f0a492..000000000000
--- a/include/asm-h8300/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef __H8300_A_OUT_H__
2#define __H8300_A_OUT_H__
3
4struct exec
5{
6 unsigned long a_info; /* Use macros N_MAGIC, etc for access */
7 unsigned a_text; /* length of text, in bytes */
8 unsigned a_data; /* length of data, in bytes */
9 unsigned a_bss; /* length of uninitialized data area for file, in bytes */
10 unsigned a_syms; /* length of symbol table data in file, in bytes */
11 unsigned a_entry; /* start address */
12 unsigned a_trsize; /* length of relocation info for text, in bytes */
13 unsigned a_drsize; /* length of relocation info for data, in bytes */
14};
15
16#define N_TRSIZE(a) ((a).a_trsize)
17#define N_DRSIZE(a) ((a).a_drsize)
18#define N_SYMSIZE(a) ((a).a_syms)
19
20#endif /* __H8300_A_OUT_H__ */
diff --git a/include/asm-h8300/atomic.h b/include/asm-h8300/atomic.h
deleted file mode 100644
index b4cf0ea97ede..000000000000
--- a/include/asm-h8300/atomic.h
+++ /dev/null
@@ -1,144 +0,0 @@
1#ifndef __ARCH_H8300_ATOMIC__
2#define __ARCH_H8300_ATOMIC__
3
4/*
5 * Atomic operations that C can't guarantee us. Useful for
6 * resource counting etc..
7 */
8
9typedef struct { int counter; } atomic_t;
10#define ATOMIC_INIT(i) { (i) }
11
12#define atomic_read(v) ((v)->counter)
13#define atomic_set(v, i) (((v)->counter) = i)
14
15#include <asm/system.h>
16#include <linux/kernel.h>
17
18static __inline__ int atomic_add_return(int i, atomic_t *v)
19{
20 int ret,flags;
21 local_irq_save(flags);
22 ret = v->counter += i;
23 local_irq_restore(flags);
24 return ret;
25}
26
27#define atomic_add(i, v) atomic_add_return(i, v)
28#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
29
30static __inline__ int atomic_sub_return(int i, atomic_t *v)
31{
32 int ret,flags;
33 local_irq_save(flags);
34 ret = v->counter -= i;
35 local_irq_restore(flags);
36 return ret;
37}
38
39#define atomic_sub(i, v) atomic_sub_return(i, v)
40#define atomic_sub_and_test(i,v) (atomic_sub_return(i, v) == 0)
41
42static __inline__ int atomic_inc_return(atomic_t *v)
43{
44 int ret,flags;
45 local_irq_save(flags);
46 v->counter++;
47 ret = v->counter;
48 local_irq_restore(flags);
49 return ret;
50}
51
52#define atomic_inc(v) atomic_inc_return(v)
53
54/*
55 * atomic_inc_and_test - increment and test
56 * @v: pointer of type atomic_t
57 *
58 * Atomically increments @v by 1
59 * and returns true if the result is zero, or false for all
60 * other cases.
61 */
62#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
63
64static __inline__ int atomic_dec_return(atomic_t *v)
65{
66 int ret,flags;
67 local_irq_save(flags);
68 --v->counter;
69 ret = v->counter;
70 local_irq_restore(flags);
71 return ret;
72}
73
74#define atomic_dec(v) atomic_dec_return(v)
75
76static __inline__ int atomic_dec_and_test(atomic_t *v)
77{
78 int ret,flags;
79 local_irq_save(flags);
80 --v->counter;
81 ret = v->counter;
82 local_irq_restore(flags);
83 return ret == 0;
84}
85
86static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
87{
88 int ret;
89 unsigned long flags;
90
91 local_irq_save(flags);
92 ret = v->counter;
93 if (likely(ret == old))
94 v->counter = new;
95 local_irq_restore(flags);
96 return ret;
97}
98
99#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
100
101static inline int atomic_add_unless(atomic_t *v, int a, int u)
102{
103 int ret;
104 unsigned long flags;
105
106 local_irq_save(flags);
107 ret = v->counter;
108 if (ret != u)
109 v->counter += a;
110 local_irq_restore(flags);
111 return ret != u;
112}
113#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
114
115static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v)
116{
117 __asm__ __volatile__("stc ccr,r1l\n\t"
118 "orc #0x80,ccr\n\t"
119 "mov.l %0,er0\n\t"
120 "and.l %1,er0\n\t"
121 "mov.l er0,%0\n\t"
122 "ldc r1l,ccr"
123 : "=m" (*v) : "g" (~(mask)) :"er0","er1");
124}
125
126static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v)
127{
128 __asm__ __volatile__("stc ccr,r1l\n\t"
129 "orc #0x80,ccr\n\t"
130 "mov.l %0,er0\n\t"
131 "or.l %1,er0\n\t"
132 "mov.l er0,%0\n\t"
133 "ldc r1l,ccr"
134 : "=m" (*v) : "g" (mask) :"er0","er1");
135}
136
137/* Atomic operations are already serializing */
138#define smp_mb__before_atomic_dec() barrier()
139#define smp_mb__after_atomic_dec() barrier()
140#define smp_mb__before_atomic_inc() barrier()
141#define smp_mb__after_atomic_inc() barrier()
142
143#include <asm-generic/atomic.h>
144#endif /* __ARCH_H8300_ATOMIC __ */
diff --git a/include/asm-h8300/auxvec.h b/include/asm-h8300/auxvec.h
deleted file mode 100644
index 1d36fe38b088..000000000000
--- a/include/asm-h8300/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASMH8300_AUXVEC_H
2#define __ASMH8300_AUXVEC_H
3
4#endif
diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h
deleted file mode 100644
index cb18e3b0aa94..000000000000
--- a/include/asm-h8300/bitops.h
+++ /dev/null
@@ -1,212 +0,0 @@
1#ifndef _H8300_BITOPS_H
2#define _H8300_BITOPS_H
3
4/*
5 * Copyright 1992, Linus Torvalds.
6 * Copyright 2002, Yoshinori Sato
7 */
8
9#include <linux/compiler.h>
10#include <asm/system.h>
11
12#ifdef __KERNEL__
13
14#ifndef _LINUX_BITOPS_H
15#error only <linux/bitops.h> can be included directly
16#endif
17
18/*
19 * Function prototypes to keep gcc -Wall happy
20 */
21
22/*
23 * ffz = Find First Zero in word. Undefined if no zero exists,
24 * so code should check against ~0UL first..
25 */
26static __inline__ unsigned long ffz(unsigned long word)
27{
28 unsigned long result;
29
30 result = -1;
31 __asm__("1:\n\t"
32 "shlr.l %2\n\t"
33 "adds #1,%0\n\t"
34 "bcs 1b"
35 : "=r" (result)
36 : "0" (result),"r" (word));
37 return result;
38}
39
40#define H8300_GEN_BITOP_CONST(OP,BIT) \
41 case BIT: \
42 __asm__(OP " #" #BIT ",@%0"::"r"(b_addr):"memory"); \
43 break;
44
45#define H8300_GEN_BITOP(FNAME,OP) \
46static __inline__ void FNAME(int nr, volatile unsigned long* addr) \
47{ \
48 volatile unsigned char *b_addr; \
49 b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \
50 if (__builtin_constant_p(nr)) { \
51 switch(nr & 7) { \
52 H8300_GEN_BITOP_CONST(OP,0) \
53 H8300_GEN_BITOP_CONST(OP,1) \
54 H8300_GEN_BITOP_CONST(OP,2) \
55 H8300_GEN_BITOP_CONST(OP,3) \
56 H8300_GEN_BITOP_CONST(OP,4) \
57 H8300_GEN_BITOP_CONST(OP,5) \
58 H8300_GEN_BITOP_CONST(OP,6) \
59 H8300_GEN_BITOP_CONST(OP,7) \
60 } \
61 } else { \
62 __asm__(OP " %w0,@%1"::"r"(nr),"r"(b_addr):"memory"); \
63 } \
64}
65
66/*
67 * clear_bit() doesn't provide any barrier for the compiler.
68 */
69#define smp_mb__before_clear_bit() barrier()
70#define smp_mb__after_clear_bit() barrier()
71
72H8300_GEN_BITOP(set_bit ,"bset")
73H8300_GEN_BITOP(clear_bit ,"bclr")
74H8300_GEN_BITOP(change_bit,"bnot")
75#define __set_bit(nr,addr) set_bit((nr),(addr))
76#define __clear_bit(nr,addr) clear_bit((nr),(addr))
77#define __change_bit(nr,addr) change_bit((nr),(addr))
78
79#undef H8300_GEN_BITOP
80#undef H8300_GEN_BITOP_CONST
81
82static __inline__ int test_bit(int nr, const unsigned long* addr)
83{
84 return (*((volatile unsigned char *)addr +
85 ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0;
86}
87
88#define __test_bit(nr, addr) test_bit(nr, addr)
89
90#define H8300_GEN_TEST_BITOP_CONST_INT(OP,BIT) \
91 case BIT: \
92 __asm__("stc ccr,%w1\n\t" \
93 "orc #0x80,ccr\n\t" \
94 "bld #" #BIT ",@%4\n\t" \
95 OP " #" #BIT ",@%4\n\t" \
96 "rotxl.l %0\n\t" \
97 "ldc %w1,ccr" \
98 : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
99 : "0" (retval),"r" (b_addr) \
100 : "memory"); \
101 break;
102
103#define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \
104 case BIT: \
105 __asm__("bld #" #BIT ",@%3\n\t" \
106 OP " #" #BIT ",@%3\n\t" \
107 "rotxl.l %0\n\t" \
108 : "=r"(retval),"=m"(*b_addr) \
109 : "0" (retval),"r" (b_addr) \
110 : "memory"); \
111 break;
112
113#define H8300_GEN_TEST_BITOP(FNNAME,OP) \
114static __inline__ int FNNAME(int nr, volatile void * addr) \
115{ \
116 int retval = 0; \
117 char ccrsave; \
118 volatile unsigned char *b_addr; \
119 b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \
120 if (__builtin_constant_p(nr)) { \
121 switch(nr & 7) { \
122 H8300_GEN_TEST_BITOP_CONST_INT(OP,0) \
123 H8300_GEN_TEST_BITOP_CONST_INT(OP,1) \
124 H8300_GEN_TEST_BITOP_CONST_INT(OP,2) \
125 H8300_GEN_TEST_BITOP_CONST_INT(OP,3) \
126 H8300_GEN_TEST_BITOP_CONST_INT(OP,4) \
127 H8300_GEN_TEST_BITOP_CONST_INT(OP,5) \
128 H8300_GEN_TEST_BITOP_CONST_INT(OP,6) \
129 H8300_GEN_TEST_BITOP_CONST_INT(OP,7) \
130 } \
131 } else { \
132 __asm__("stc ccr,%w1\n\t" \
133 "orc #0x80,ccr\n\t" \
134 "btst %w5,@%4\n\t" \
135 OP " %w5,@%4\n\t" \
136 "beq 1f\n\t" \
137 "inc.l #1,%0\n" \
138 "1:\n\t" \
139 "ldc %w1,ccr" \
140 : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
141 : "0" (retval),"r" (b_addr),"r"(nr) \
142 : "memory"); \
143 } \
144 return retval; \
145} \
146 \
147static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \
148{ \
149 int retval = 0; \
150 volatile unsigned char *b_addr; \
151 b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \
152 if (__builtin_constant_p(nr)) { \
153 switch(nr & 7) { \
154 H8300_GEN_TEST_BITOP_CONST(OP,0) \
155 H8300_GEN_TEST_BITOP_CONST(OP,1) \
156 H8300_GEN_TEST_BITOP_CONST(OP,2) \
157 H8300_GEN_TEST_BITOP_CONST(OP,3) \
158 H8300_GEN_TEST_BITOP_CONST(OP,4) \
159 H8300_GEN_TEST_BITOP_CONST(OP,5) \
160 H8300_GEN_TEST_BITOP_CONST(OP,6) \
161 H8300_GEN_TEST_BITOP_CONST(OP,7) \
162 } \
163 } else { \
164 __asm__("btst %w4,@%3\n\t" \
165 OP " %w4,@%3\n\t" \
166 "beq 1f\n\t" \
167 "inc.l #1,%0\n" \
168 "1:" \
169 : "=r"(retval),"=m"(*b_addr) \
170 : "0" (retval),"r" (b_addr),"r"(nr) \
171 : "memory"); \
172 } \
173 return retval; \
174}
175
176H8300_GEN_TEST_BITOP(test_and_set_bit, "bset")
177H8300_GEN_TEST_BITOP(test_and_clear_bit, "bclr")
178H8300_GEN_TEST_BITOP(test_and_change_bit,"bnot")
179#undef H8300_GEN_TEST_BITOP_CONST
180#undef H8300_GEN_TEST_BITOP_CONST_INT
181#undef H8300_GEN_TEST_BITOP
182
183#include <asm-generic/bitops/ffs.h>
184
185static __inline__ unsigned long __ffs(unsigned long word)
186{
187 unsigned long result;
188
189 result = -1;
190 __asm__("1:\n\t"
191 "shlr.l %2\n\t"
192 "adds #1,%0\n\t"
193 "bcc 1b"
194 : "=r" (result)
195 : "0"(result),"r"(word));
196 return result;
197}
198
199#include <asm-generic/bitops/find.h>
200#include <asm-generic/bitops/sched.h>
201#include <asm-generic/bitops/hweight.h>
202#include <asm-generic/bitops/lock.h>
203#include <asm-generic/bitops/ext2-non-atomic.h>
204#include <asm-generic/bitops/ext2-atomic.h>
205#include <asm-generic/bitops/minix.h>
206
207#endif /* __KERNEL__ */
208
209#include <asm-generic/bitops/fls.h>
210#include <asm-generic/bitops/fls64.h>
211
212#endif /* _H8300_BITOPS_H */
diff --git a/include/asm-h8300/bootinfo.h b/include/asm-h8300/bootinfo.h
deleted file mode 100644
index 5bed7e7aac0a..000000000000
--- a/include/asm-h8300/bootinfo.h
+++ /dev/null
@@ -1,2 +0,0 @@
1
2/* Nothing for h8300 */
diff --git a/include/asm-h8300/bug.h b/include/asm-h8300/bug.h
deleted file mode 100644
index edddf5b086e5..000000000000
--- a/include/asm-h8300/bug.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef _H8300_BUG_H
2#define _H8300_BUG_H
3#include <asm-generic/bug.h>
4#endif
diff --git a/include/asm-h8300/bugs.h b/include/asm-h8300/bugs.h
deleted file mode 100644
index 1cb4afba6eb1..000000000000
--- a/include/asm-h8300/bugs.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-h8300/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14static void check_bugs(void)
15{
16}
diff --git a/include/asm-h8300/byteorder.h b/include/asm-h8300/byteorder.h
deleted file mode 100644
index 36e597d61619..000000000000
--- a/include/asm-h8300/byteorder.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _H8300_BYTEORDER_H
2#define _H8300_BYTEORDER_H
3
4#include <asm/types.h>
5
6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __BYTEORDER_HAS_U64__
8# define __SWAB_64_THRU_32__
9#endif
10
11#include <linux/byteorder/big_endian.h>
12
13#endif /* _H8300_BYTEORDER_H */
diff --git a/include/asm-h8300/cache.h b/include/asm-h8300/cache.h
deleted file mode 100644
index c6350283649d..000000000000
--- a/include/asm-h8300/cache.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __ARCH_H8300_CACHE_H
2#define __ARCH_H8300_CACHE_H
3
4/* bytes per L1 cache line */
5#define L1_CACHE_BYTES 4
6
7/* m68k-elf-gcc 2.95.2 doesn't like these */
8
9#define __cacheline_aligned
10#define ____cacheline_aligned
11
12#endif
diff --git a/include/asm-h8300/cachectl.h b/include/asm-h8300/cachectl.h
deleted file mode 100644
index c464022d8e26..000000000000
--- a/include/asm-h8300/cachectl.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef _H8300_CACHECTL_H
2#define _H8300_CACHECTL_H
3
4/* Definitions for the cacheflush system call. */
5
6#define FLUSH_SCOPE_LINE 0 /* Flush a cache line */
7#define FLUSH_SCOPE_PAGE 0 /* Flush a page */
8#define FLUSH_SCOPE_ALL 0 /* Flush the whole cache -- superuser only */
9
10#define FLUSH_CACHE_DATA 0 /* Writeback and flush data cache */
11#define FLUSH_CACHE_INSN 0 /* Flush instruction cache */
12#define FLUSH_CACHE_BOTH 0 /* Flush both caches */
13
14#endif /* _H8300_CACHECTL_H */
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h
deleted file mode 100644
index 5ffdca217b95..000000000000
--- a/include/asm-h8300/cacheflush.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * (C) Copyright 2002, Yoshinori Sato <ysato@users.sourceforge.jp>
3 */
4
5#ifndef _ASM_H8300_CACHEFLUSH_H
6#define _ASM_H8300_CACHEFLUSH_H
7
8/*
9 * Cache handling functions
10 * No Cache memory all dummy functions
11 */
12
13#define flush_cache_all()
14#define flush_cache_mm(mm)
15#define flush_cache_dup_mm(mm) do { } while (0)
16#define flush_cache_range(vma,a,b)
17#define flush_cache_page(vma,p,pfn)
18#define flush_dcache_page(page)
19#define flush_dcache_mmap_lock(mapping)
20#define flush_dcache_mmap_unlock(mapping)
21#define flush_icache()
22#define flush_icache_page(vma,page)
23#define flush_icache_range(start,len)
24#define flush_cache_vmap(start, end)
25#define flush_cache_vunmap(start, end)
26#define cache_push_v(vaddr,len)
27#define cache_push(paddr,len)
28#define cache_clear(paddr,len)
29
30#define flush_dcache_range(a,b)
31
32#define flush_icache_user_range(vma,page,addr,len)
33
34#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
35 memcpy(dst, src, len)
36#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
37 memcpy(dst, src, len)
38
39#endif /* _ASM_H8300_CACHEFLUSH_H */
diff --git a/include/asm-h8300/checksum.h b/include/asm-h8300/checksum.h
deleted file mode 100644
index 98724e12508c..000000000000
--- a/include/asm-h8300/checksum.h
+++ /dev/null
@@ -1,102 +0,0 @@
1#ifndef _H8300_CHECKSUM_H
2#define _H8300_CHECKSUM_H
3
4/*
5 * computes the checksum of a memory block at buff, length len,
6 * and adds in "sum" (32-bit)
7 *
8 * returns a 32-bit number suitable for feeding into itself
9 * or csum_tcpudp_magic
10 *
11 * this function must be called with even lengths, except
12 * for the last fragment, which may be odd
13 *
14 * it's best to have buff aligned on a 32-bit boundary
15 */
16__wsum csum_partial(const void *buff, int len, __wsum sum);
17
18/*
19 * the same as csum_partial, but copies from src while it
20 * checksums
21 *
22 * here even more important to align src and dst on a 32-bit (or even
23 * better 64-bit) boundary
24 */
25
26__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
27
28
29/*
30 * the same as csum_partial_copy, but copies from user space.
31 *
32 * here even more important to align src and dst on a 32-bit (or even
33 * better 64-bit) boundary
34 */
35
36extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
37 int len, __wsum sum, int *csum_err);
38
39__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
40
41
42/*
43 * Fold a partial checksum
44 */
45
46static inline __sum16 csum_fold(__wsum sum)
47{
48 __asm__("mov.l %0,er0\n\t"
49 "add.w e0,r0\n\t"
50 "xor.w e0,e0\n\t"
51 "rotxl.w e0\n\t"
52 "add.w e0,r0\n\t"
53 "sub.w e0,e0\n\t"
54 "mov.l er0,%0"
55 : "=r"(sum)
56 : "0"(sum)
57 : "er0");
58 return (__force __sum16)~sum;
59}
60
61
62/*
63 * computes the checksum of the TCP/UDP pseudo-header
64 * returns a 16-bit checksum, already complemented
65 */
66
67static inline __wsum
68csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
69 unsigned short proto, __wsum sum)
70{
71 __asm__ ("sub.l er0,er0\n\t"
72 "add.l %2,%0\n\t"
73 "addx #0,r0l\n\t"
74 "add.l %3,%0\n\t"
75 "addx #0,r0l\n\t"
76 "add.l %4,%0\n\t"
77 "addx #0,r0l\n\t"
78 "add.l er0,%0\n\t"
79 "bcc 1f\n\t"
80 "inc.l #1,%0\n"
81 "1:"
82 : "=&r" (sum)
83 : "0" (sum), "r" (daddr), "r" (saddr), "r" (len + proto)
84 :"er0");
85 return sum;
86}
87
88static inline __sum16
89csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
90 unsigned short proto, __wsum sum)
91{
92 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
93}
94
95/*
96 * this routine is used for miscellaneous IP-like checksums, mainly
97 * in icmp.c
98 */
99
100extern __sum16 ip_compute_csum(const void *buff, int len);
101
102#endif /* _H8300_CHECKSUM_H */
diff --git a/include/asm-h8300/cputime.h b/include/asm-h8300/cputime.h
deleted file mode 100644
index 092e187c7b08..000000000000
--- a/include/asm-h8300/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __H8300_CPUTIME_H
2#define __H8300_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __H8300_CPUTIME_H */
diff --git a/include/asm-h8300/current.h b/include/asm-h8300/current.h
deleted file mode 100644
index 57d74ee55a14..000000000000
--- a/include/asm-h8300/current.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _H8300_CURRENT_H
2#define _H8300_CURRENT_H
3/*
4 * current.h
5 * (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com>
6 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
7 *
8 * rather than dedicate a register (as the m68k source does), we
9 * just keep a global, we should probably just change it all to be
10 * current and lose _current_task.
11 */
12
13#include <linux/thread_info.h>
14#include <asm/thread_info.h>
15
16struct task_struct;
17
18static inline struct task_struct *get_current(void)
19{
20 return(current_thread_info()->task);
21}
22
23#define current get_current()
24
25#endif /* _H8300_CURRENT_H */
diff --git a/include/asm-h8300/dbg.h b/include/asm-h8300/dbg.h
deleted file mode 100644
index 2c6d1cbcf736..000000000000
--- a/include/asm-h8300/dbg.h
+++ /dev/null
@@ -1,2 +0,0 @@
1#define DEBUG 1
2#define BREAK asm volatile ("trap #3")
diff --git a/include/asm-h8300/delay.h b/include/asm-h8300/delay.h
deleted file mode 100644
index 743beba70f82..000000000000
--- a/include/asm-h8300/delay.h
+++ /dev/null
@@ -1,38 +0,0 @@
1#ifndef _H8300_DELAY_H
2#define _H8300_DELAY_H
3
4#include <asm/param.h>
5
6/*
7 * Copyright (C) 2002 Yoshinori Sato <ysato@sourceforge.jp>
8 *
9 * Delay routines, using a pre-computed "loops_per_second" value.
10 */
11
12static inline void __delay(unsigned long loops)
13{
14 __asm__ __volatile__ ("1:\n\t"
15 "dec.l #1,%0\n\t"
16 "bne 1b"
17 :"=r" (loops):"0"(loops));
18}
19
20/*
21 * Use only for very small delays ( < 1 msec). Should probably use a
22 * lookup table, really, as the multiplications take much too long with
23 * short delays. This is a "reasonable" implementation, though (and the
24 * first constant multiplications gets optimized away if the delay is
25 * a constant)
26 */
27
28extern unsigned long loops_per_jiffy;
29
30static inline void udelay(unsigned long usecs)
31{
32 usecs *= 4295; /* 2**32 / 1000000 */
33 usecs /= (loops_per_jiffy*HZ);
34 if (usecs)
35 __delay(usecs);
36}
37
38#endif /* _H8300_DELAY_H */
diff --git a/include/asm-h8300/device.h b/include/asm-h8300/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-h8300/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-h8300/div64.h b/include/asm-h8300/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/include/asm-h8300/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/include/asm-h8300/dma.h b/include/asm-h8300/dma.h
deleted file mode 100644
index 3edbaaaedf5b..000000000000
--- a/include/asm-h8300/dma.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _H8300_DMA_H
2#define _H8300_DMA_H
3
4
5/*
6 * Set number of channels of DMA on ColdFire for different implementations.
7 */
8#define MAX_DMA_CHANNELS 0
9#define MAX_DMA_ADDRESS PAGE_OFFSET
10
11/* These are in kernel/dma.c: */
12extern int request_dma(unsigned int dmanr, const char *device_id); /* reserve a DMA channel */
13extern void free_dma(unsigned int dmanr); /* release it again */
14
15#endif /* _H8300_DMA_H */
diff --git a/include/asm-h8300/elf.h b/include/asm-h8300/elf.h
deleted file mode 100644
index a8b57d1f4128..000000000000
--- a/include/asm-h8300/elf.h
+++ /dev/null
@@ -1,104 +0,0 @@
1#ifndef __ASMH8300_ELF_H
2#define __ASMH8300_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9#include <asm/user.h>
10
11typedef unsigned long elf_greg_t;
12
13#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
14typedef elf_greg_t elf_gregset_t[ELF_NGREG];
15typedef unsigned long elf_fpregset_t;
16
17/*
18 * This is used to ensure we don't load something for the wrong architecture.
19 */
20#define elf_check_arch(x) ((x)->e_machine == EM_H8_300)
21
22/*
23 * These are used to set parameters in the core dumps.
24 */
25#define ELF_CLASS ELFCLASS32
26#define ELF_DATA ELFDATA2MSB
27#define ELF_ARCH EM_H8_300
28#if defined(__H8300H__)
29#define ELF_CORE_EFLAGS 0x810000
30#endif
31#if defined(__H8300S__)
32#define ELF_CORE_EFLAGS 0x820000
33#endif
34
35#define ELF_PLAT_INIT(_r) _r->er1 = 0
36
37#define USE_ELF_CORE_DUMP
38#define ELF_EXEC_PAGESIZE 4096
39
40/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
41 use of this is to invoke "./ld.so someprog" to test out a new version of
42 the loader. We need to make sure that it is out of the way of the program
43 that it will "exec", and that there is sufficient room for the brk. */
44
45#define ELF_ET_DYN_BASE 0xD0000000UL
46
47/* This yields a mask that user programs can use to figure out what
48 instruction set this cpu supports. */
49
50#define ELF_HWCAP (0)
51
52/* This yields a string that ld.so will use to load implementation
53 specific libraries for optimization. This is more specific in
54 intent than poking at uname or /proc/cpuinfo. */
55
56#define ELF_PLATFORM (NULL)
57
58#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
59
60#define R_H8_NONE 0
61#define R_H8_DIR32 1
62#define R_H8_DIR32_28 2
63#define R_H8_DIR32_24 3
64#define R_H8_DIR32_16 4
65#define R_H8_DIR32U 6
66#define R_H8_DIR32U_28 7
67#define R_H8_DIR32U_24 8
68#define R_H8_DIR32U_20 9
69#define R_H8_DIR32U_16 10
70#define R_H8_DIR24 11
71#define R_H8_DIR24_20 12
72#define R_H8_DIR24_16 13
73#define R_H8_DIR24U 14
74#define R_H8_DIR24U_20 15
75#define R_H8_DIR24U_16 16
76#define R_H8_DIR16 17
77#define R_H8_DIR16U 18
78#define R_H8_DIR16S_32 19
79#define R_H8_DIR16S_28 20
80#define R_H8_DIR16S_24 21
81#define R_H8_DIR16S_20 22
82#define R_H8_DIR16S 23
83#define R_H8_DIR8 24
84#define R_H8_DIR8U 25
85#define R_H8_DIR8Z_32 26
86#define R_H8_DIR8Z_28 27
87#define R_H8_DIR8Z_24 28
88#define R_H8_DIR8Z_20 29
89#define R_H8_DIR8Z_16 30
90#define R_H8_PCREL16 31
91#define R_H8_PCREL8 32
92#define R_H8_BPOS 33
93#define R_H8_PCREL32 34
94#define R_H8_GOT32O 35
95#define R_H8_GOT16O 36
96#define R_H8_DIR16A8 59
97#define R_H8_DIR16R8 60
98#define R_H8_DIR24A8 61
99#define R_H8_DIR24R8 62
100#define R_H8_DIR32A16 63
101#define R_H8_ABS32 65
102#define R_H8_ABS32A16 127
103
104#endif
diff --git a/include/asm-h8300/emergency-restart.h b/include/asm-h8300/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/include/asm-h8300/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-h8300/errno.h b/include/asm-h8300/errno.h
deleted file mode 100644
index 0c2f5641fdcc..000000000000
--- a/include/asm-h8300/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_ERRNO_H
2#define _H8300_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif /* _H8300_ERRNO_H */
diff --git a/include/asm-h8300/fb.h b/include/asm-h8300/fb.h
deleted file mode 100644
index c7df38030992..000000000000
--- a/include/asm-h8300/fb.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4
5#define fb_pgprotect(...) do {} while (0)
6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h
deleted file mode 100644
index 1952cb2e3b06..000000000000
--- a/include/asm-h8300/fcntl.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _H8300_FCNTL_H
2#define _H8300_FCNTL_H
3
4#define O_DIRECTORY 040000 /* must be a directory */
5#define O_NOFOLLOW 0100000 /* don't follow links */
6#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
7#define O_LARGEFILE 0400000
8
9#include <asm-generic/fcntl.h>
10
11#endif /* _H8300_FCNTL_H */
diff --git a/include/asm-h8300/flat.h b/include/asm-h8300/flat.h
deleted file mode 100644
index 2a873508a9a1..000000000000
--- a/include/asm-h8300/flat.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * include/asm-h8300/flat.h -- uClinux flat-format executables
3 */
4
5#ifndef __H8300_FLAT_H__
6#define __H8300_FLAT_H__
7
8#define flat_stack_align(sp) /* nothing needed */
9#define flat_argvp_envp_on_stack() 1
10#define flat_old_ram_flag(flags) 1
11#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
12#define flat_set_persistent(relval, p) 0
13
14/*
15 * on the H8 a couple of the relocations have an instruction in the
16 * top byte. As there can only be 24bits of address space, we just
17 * always preserve that 8bits at the top, when it isn't an instruction
18 * is is 0 (davidm@snapgear.com)
19 */
20
21#define flat_get_relocate_addr(rel) (rel)
22#define flat_get_addr_from_rp(rp, relval, flags, persistent) \
23 (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff))
24#define flat_put_addr_at_rp(rp, addr, rel) \
25 put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp)
26
27#endif /* __H8300_FLAT_H__ */
diff --git a/include/asm-h8300/fpu.h b/include/asm-h8300/fpu.h
deleted file mode 100644
index 4fc416e80bef..000000000000
--- a/include/asm-h8300/fpu.h
+++ /dev/null
@@ -1 +0,0 @@
1/* Nothing do */
diff --git a/include/asm-h8300/futex.h b/include/asm-h8300/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/include/asm-h8300/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/include/asm-h8300/gpio.h b/include/asm-h8300/gpio.h
deleted file mode 100644
index a714f0c0efbc..000000000000
--- a/include/asm-h8300/gpio.h
+++ /dev/null
@@ -1,52 +0,0 @@
1#ifndef _H8300_GPIO_H
2#define _H8300_GPIO_H
3
4#define H8300_GPIO_P1 0
5#define H8300_GPIO_P2 1
6#define H8300_GPIO_P3 2
7#define H8300_GPIO_P4 3
8#define H8300_GPIO_P5 4
9#define H8300_GPIO_P6 5
10#define H8300_GPIO_P7 6
11#define H8300_GPIO_P8 7
12#define H8300_GPIO_P9 8
13#define H8300_GPIO_PA 9
14#define H8300_GPIO_PB 10
15#define H8300_GPIO_PC 11
16#define H8300_GPIO_PD 12
17#define H8300_GPIO_PE 13
18#define H8300_GPIO_PF 14
19#define H8300_GPIO_PG 15
20#define H8300_GPIO_PH 16
21
22#define H8300_GPIO_B7 0x80
23#define H8300_GPIO_B6 0x40
24#define H8300_GPIO_B5 0x20
25#define H8300_GPIO_B4 0x10
26#define H8300_GPIO_B3 0x08
27#define H8300_GPIO_B2 0x04
28#define H8300_GPIO_B1 0x02
29#define H8300_GPIO_B0 0x01
30
31#define H8300_GPIO_INPUT 0
32#define H8300_GPIO_OUTPUT 1
33
34#define H8300_GPIO_RESERVE(port, bits) \
35 h8300_reserved_gpio(port, bits)
36
37#define H8300_GPIO_FREE(port, bits) \
38 h8300_free_gpio(port, bits)
39
40#define H8300_GPIO_DDR(port, bit, dir) \
41 h8300_set_gpio_dir(((port) << 8) | (bit), dir)
42
43#define H8300_GPIO_GETDIR(port, bit) \
44 h8300_get_gpio_dir(((port) << 8) | (bit))
45
46extern int h8300_reserved_gpio(int port, int bits);
47extern int h8300_free_gpio(int port, int bits);
48extern int h8300_set_gpio_dir(int port_bit, int dir);
49extern int h8300_get_gpio_dir(int port_bit);
50extern int h8300_init_gpio(void);
51
52#endif
diff --git a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h
deleted file mode 100644
index 9d7f7a7462b2..000000000000
--- a/include/asm-h8300/hardirq.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef __H8300_HARDIRQ_H
2#define __H8300_HARDIRQ_H
3
4#include <linux/kernel.h>
5#include <linux/threads.h>
6#include <linux/interrupt.h>
7#include <linux/irq.h>
8
9typedef struct {
10 unsigned int __softirq_pending;
11} ____cacheline_aligned irq_cpustat_t;
12
13#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
14
15extern void ack_bad_irq(unsigned int irq);
16
17#define HARDIRQ_BITS 8
18
19/*
20 * The hardirq mask has to be large enough to have
21 * space for potentially all IRQ sources in the system
22 * nesting on a single CPU:
23 */
24#if (1 << HARDIRQ_BITS) < NR_IRQS
25# error HARDIRQ_BITS is too low!
26#endif
27
28#endif
diff --git a/include/asm-h8300/hw_irq.h b/include/asm-h8300/hw_irq.h
deleted file mode 100644
index d75a5a1119e8..000000000000
--- a/include/asm-h8300/hw_irq.h
+++ /dev/null
@@ -1 +0,0 @@
1/* Do Nothing */
diff --git a/include/asm-h8300/io.h b/include/asm-h8300/io.h
deleted file mode 100644
index 26dc6ccd9441..000000000000
--- a/include/asm-h8300/io.h
+++ /dev/null
@@ -1,324 +0,0 @@
1#ifndef _H8300_IO_H
2#define _H8300_IO_H
3
4#ifdef __KERNEL__
5
6#include <asm/virtconvert.h>
7
8#if defined(CONFIG_H83007) || defined(CONFIG_H83068)
9#include <asm/regs306x.h>
10#elif defined(CONFIG_H8S2678)
11#include <asm/regs267x.h>
12#else
13#error UNKNOWN CPU TYPE
14#endif
15
16
17/*
18 * These are for ISA/PCI shared memory _only_ and should never be used
19 * on any other type of memory, including Zorro memory. They are meant to
20 * access the bus in the bus byte order which is little-endian!.
21 *
22 * readX/writeX() are used to access memory mapped devices. On some
23 * architectures the memory mapped IO stuff needs to be accessed
24 * differently. On the m68k architecture, we just read/write the
25 * memory location directly.
26 */
27/* ++roman: The assignments to temp. vars avoid that gcc sometimes generates
28 * two accesses to memory, which may be undesireable for some devices.
29 */
30
31/*
32 * swap functions are sometimes needed to interface little-endian hardware
33 */
34
35static inline unsigned short _swapw(volatile unsigned short v)
36{
37#ifndef H8300_IO_NOSWAP
38 unsigned short r;
39 __asm__("xor.b %w0,%x0\n\t"
40 "xor.b %x0,%w0\n\t"
41 "xor.b %w0,%x0"
42 :"=r"(r)
43 :"0"(v));
44 return r;
45#else
46 return v;
47#endif
48}
49
50static inline unsigned long _swapl(volatile unsigned long v)
51{
52#ifndef H8300_IO_NOSWAP
53 unsigned long r;
54 __asm__("xor.b %w0,%x0\n\t"
55 "xor.b %x0,%w0\n\t"
56 "xor.b %w0,%x0\n\t"
57 "xor.w %e0,%f0\n\t"
58 "xor.w %f0,%e0\n\t"
59 "xor.w %e0,%f0\n\t"
60 "xor.b %w0,%x0\n\t"
61 "xor.b %x0,%w0\n\t"
62 "xor.b %w0,%x0"
63 :"=r"(r)
64 :"0"(v));
65 return r;
66#else
67 return v;
68#endif
69}
70
71#define readb(addr) \
72 ({ unsigned char __v = \
73 *(volatile unsigned char *)((unsigned long)(addr) & 0x00ffffff); \
74 __v; })
75#define readw(addr) \
76 ({ unsigned short __v = \
77 *(volatile unsigned short *)((unsigned long)(addr) & 0x00ffffff); \
78 __v; })
79#define readl(addr) \
80 ({ unsigned long __v = \
81 *(volatile unsigned long *)((unsigned long)(addr) & 0x00ffffff); \
82 __v; })
83
84#define writeb(b,addr) (void)((*(volatile unsigned char *) \
85 ((unsigned long)(addr) & 0x00ffffff)) = (b))
86#define writew(b,addr) (void)((*(volatile unsigned short *) \
87 ((unsigned long)(addr) & 0x00ffffff)) = (b))
88#define writel(b,addr) (void)((*(volatile unsigned long *) \
89 ((unsigned long)(addr) & 0x00ffffff)) = (b))
90#define readb_relaxed(addr) readb(addr)
91#define readw_relaxed(addr) readw(addr)
92#define readl_relaxed(addr) readl(addr)
93
94#define __raw_readb readb
95#define __raw_readw readw
96#define __raw_readl readl
97#define __raw_writeb writeb
98#define __raw_writew writew
99#define __raw_writel writel
100
101static inline int h8300_buswidth(unsigned int addr)
102{
103 return (*(volatile unsigned char *)ABWCR & (1 << ((addr >> 21) & 7))) == 0;
104}
105
106static inline void io_outsb(unsigned int addr, const void *buf, int len)
107{
108 volatile unsigned char *ap_b = (volatile unsigned char *) addr;
109 volatile unsigned short *ap_w = (volatile unsigned short *) addr;
110 unsigned char *bp = (unsigned char *) buf;
111
112 if(h8300_buswidth(addr) && (addr & 1)) {
113 while (len--)
114 *ap_w = *bp++;
115 } else {
116 while (len--)
117 *ap_b = *bp++;
118 }
119}
120
121static inline void io_outsw(unsigned int addr, const void *buf, int len)
122{
123 volatile unsigned short *ap = (volatile unsigned short *) addr;
124 unsigned short *bp = (unsigned short *) buf;
125 while (len--)
126 *ap = _swapw(*bp++);
127}
128
129static inline void io_outsl(unsigned int addr, const void *buf, int len)
130{
131 volatile unsigned long *ap = (volatile unsigned long *) addr;
132 unsigned long *bp = (unsigned long *) buf;
133 while (len--)
134 *ap = _swapl(*bp++);
135}
136
137static inline void io_outsw_noswap(unsigned int addr, const void *buf, int len)
138{
139 volatile unsigned short *ap = (volatile unsigned short *) addr;
140 unsigned short *bp = (unsigned short *) buf;
141 while (len--)
142 *ap = *bp++;
143}
144
145static inline void io_outsl_noswap(unsigned int addr, const void *buf, int len)
146{
147 volatile unsigned long *ap = (volatile unsigned long *) addr;
148 unsigned long *bp = (unsigned long *) buf;
149 while (len--)
150 *ap = *bp++;
151}
152
153static inline void io_insb(unsigned int addr, void *buf, int len)
154{
155 volatile unsigned char *ap_b;
156 volatile unsigned short *ap_w;
157 unsigned char *bp = (unsigned char *) buf;
158
159 if(h8300_buswidth(addr)) {
160 ap_w = (volatile unsigned short *)(addr & ~1);
161 while (len--)
162 *bp++ = *ap_w & 0xff;
163 } else {
164 ap_b = (volatile unsigned char *)addr;
165 while (len--)
166 *bp++ = *ap_b;
167 }
168}
169
170static inline void io_insw(unsigned int addr, void *buf, int len)
171{
172 volatile unsigned short *ap = (volatile unsigned short *) addr;
173 unsigned short *bp = (unsigned short *) buf;
174 while (len--)
175 *bp++ = _swapw(*ap);
176}
177
178static inline void io_insl(unsigned int addr, void *buf, int len)
179{
180 volatile unsigned long *ap = (volatile unsigned long *) addr;
181 unsigned long *bp = (unsigned long *) buf;
182 while (len--)
183 *bp++ = _swapl(*ap);
184}
185
186static inline void io_insw_noswap(unsigned int addr, void *buf, int len)
187{
188 volatile unsigned short *ap = (volatile unsigned short *) addr;
189 unsigned short *bp = (unsigned short *) buf;
190 while (len--)
191 *bp++ = *ap;
192}
193
194static inline void io_insl_noswap(unsigned int addr, void *buf, int len)
195{
196 volatile unsigned long *ap = (volatile unsigned long *) addr;
197 unsigned long *bp = (unsigned long *) buf;
198 while (len--)
199 *bp++ = *ap;
200}
201
202/*
203 * make the short names macros so specific devices
204 * can override them as required
205 */
206
207#define memset_io(a,b,c) memset((void *)(a),(b),(c))
208#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
209#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
210
211#define mmiowb()
212
213#define inb(addr) ((h8300_buswidth(addr))?readw((addr) & ~1) & 0xff:readb(addr))
214#define inw(addr) _swapw(readw(addr))
215#define inl(addr) _swapl(readl(addr))
216#define outb(x,addr) ((void)((h8300_buswidth(addr) && \
217 ((addr) & 1))?writew(x,(addr) & ~1):writeb(x,addr)))
218#define outw(x,addr) ((void) writew(_swapw(x),addr))
219#define outl(x,addr) ((void) writel(_swapl(x),addr))
220
221#define inb_p(addr) inb(addr)
222#define inw_p(addr) inw(addr)
223#define inl_p(addr) inl(addr)
224#define outb_p(x,addr) outb(x,addr)
225#define outw_p(x,addr) outw(x,addr)
226#define outl_p(x,addr) outl(x,addr)
227
228#define outsb(a,b,l) io_outsb(a,b,l)
229#define outsw(a,b,l) io_outsw(a,b,l)
230#define outsl(a,b,l) io_outsl(a,b,l)
231
232#define insb(a,b,l) io_insb(a,b,l)
233#define insw(a,b,l) io_insw(a,b,l)
234#define insl(a,b,l) io_insl(a,b,l)
235
236#define IO_SPACE_LIMIT 0xffffff
237
238
239/* Values for nocacheflag and cmode */
240#define IOMAP_FULL_CACHING 0
241#define IOMAP_NOCACHE_SER 1
242#define IOMAP_NOCACHE_NONSER 2
243#define IOMAP_WRITETHROUGH 3
244
245extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
246extern void __iounmap(void *addr, unsigned long size);
247
248static inline void *ioremap(unsigned long physaddr, unsigned long size)
249{
250 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
251}
252static inline void *ioremap_nocache(unsigned long physaddr, unsigned long size)
253{
254 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
255}
256static inline void *ioremap_writethrough(unsigned long physaddr, unsigned long size)
257{
258 return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
259}
260static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size)
261{
262 return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
263}
264
265extern void iounmap(void *addr);
266
267/* H8/300 internal I/O functions */
268static __inline__ unsigned char ctrl_inb(unsigned long addr)
269{
270 return *(volatile unsigned char*)addr;
271}
272
273static __inline__ unsigned short ctrl_inw(unsigned long addr)
274{
275 return *(volatile unsigned short*)addr;
276}
277
278static __inline__ unsigned long ctrl_inl(unsigned long addr)
279{
280 return *(volatile unsigned long*)addr;
281}
282
283static __inline__ void ctrl_outb(unsigned char b, unsigned long addr)
284{
285 *(volatile unsigned char*)addr = b;
286}
287
288static __inline__ void ctrl_outw(unsigned short b, unsigned long addr)
289{
290 *(volatile unsigned short*)addr = b;
291}
292
293static __inline__ void ctrl_outl(unsigned long b, unsigned long addr)
294{
295 *(volatile unsigned long*)addr = b;
296}
297
298/* Pages to physical address... */
299#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
300#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT)
301
302/*
303 * Macros used for converting between virtual and physical mappings.
304 */
305#define phys_to_virt(vaddr) ((void *) (vaddr))
306#define virt_to_phys(vaddr) ((unsigned long) (vaddr))
307
308#define virt_to_bus virt_to_phys
309#define bus_to_virt phys_to_virt
310
311/*
312 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
313 * access
314 */
315#define xlate_dev_mem_ptr(p) __va(p)
316
317/*
318 * Convert a virtual cached pointer to an uncached pointer
319 */
320#define xlate_dev_kmem_ptr(p) p
321
322#endif /* __KERNEL__ */
323
324#endif /* _H8300_IO_H */
diff --git a/include/asm-h8300/ioctl.h b/include/asm-h8300/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/include/asm-h8300/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/include/asm-h8300/ioctls.h b/include/asm-h8300/ioctls.h
deleted file mode 100644
index 98a53d067269..000000000000
--- a/include/asm-h8300/ioctls.h
+++ /dev/null
@@ -1,85 +0,0 @@
1#ifndef __ARCH_H8300_IOCTLS_H__
2#define __ARCH_H8300_IOCTLS_H__
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS 0x5401
9#define TCSETS 0x5402
10#define TCSETSW 0x5403
11#define TCSETSF 0x5404
12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TCGETS2 _IOR('T',0x2A, struct termios2)
51#define TCSETS2 _IOW('T',0x2B, struct termios2)
52#define TCSETSW2 _IOW('T',0x2C, struct termios2)
53#define TCSETSF2 _IOW('T',0x2D, struct termios2)
54#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
55#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
56
57#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
58#define FIOCLEX 0x5451
59#define FIOASYNC 0x5452
60#define TIOCSERCONFIG 0x5453
61#define TIOCSERGWILD 0x5454
62#define TIOCSERSWILD 0x5455
63#define TIOCGLCKTRMIOS 0x5456
64#define TIOCSLCKTRMIOS 0x5457
65#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
66#define TIOCSERGETLSR 0x5459 /* Get line status register */
67#define TIOCSERGETMULTI 0x545A /* Get multiport config */
68#define TIOCSERSETMULTI 0x545B /* Set multiport config */
69
70#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
71#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
72#define FIOQSIZE 0x545E
73
74/* Used for packet mode */
75#define TIOCPKT_DATA 0
76#define TIOCPKT_FLUSHREAD 1
77#define TIOCPKT_FLUSHWRITE 2
78#define TIOCPKT_STOP 4
79#define TIOCPKT_START 8
80#define TIOCPKT_NOSTOP 16
81#define TIOCPKT_DOSTOP 32
82
83#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
84
85#endif /* __ARCH_H8300_IOCTLS_H__ */
diff --git a/include/asm-h8300/ipcbuf.h b/include/asm-h8300/ipcbuf.h
deleted file mode 100644
index 2cd1ebcc109d..000000000000
--- a/include/asm-h8300/ipcbuf.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef __H8300_IPCBUF_H__
2#define __H8300_IPCBUF_H__
3
4/*
5 * The user_ipc_perm structure for H8/300 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24 unsigned short __pad2;
25 unsigned long __unused1;
26 unsigned long __unused2;
27};
28
29#endif /* __H8300_IPCBUF_H__ */
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h
deleted file mode 100644
index 13d7c601cd0a..000000000000
--- a/include/asm-h8300/irq.h
+++ /dev/null
@@ -1,49 +0,0 @@
1#ifndef _H8300_IRQ_H_
2#define _H8300_IRQ_H_
3
4#include <asm/ptrace.h>
5
6#if defined(CONFIG_CPU_H8300H)
7#define NR_IRQS 64
8#define EXT_IRQ0 12
9#define EXT_IRQ1 13
10#define EXT_IRQ2 14
11#define EXT_IRQ3 15
12#define EXT_IRQ4 16
13#define EXT_IRQ5 17
14#define EXT_IRQ6 18
15#define EXT_IRQ7 19
16#define EXT_IRQS 5
17#define IER_REGS *(volatile unsigned char *)IER
18#endif
19#if defined(CONFIG_CPU_H8S)
20#define NR_IRQS 128
21#define EXT_IRQ0 16
22#define EXT_IRQ1 17
23#define EXT_IRQ2 18
24#define EXT_IRQ3 19
25#define EXT_IRQ4 20
26#define EXT_IRQ5 21
27#define EXT_IRQ6 22
28#define EXT_IRQ7 23
29#define EXT_IRQ8 24
30#define EXT_IRQ9 25
31#define EXT_IRQ10 26
32#define EXT_IRQ11 27
33#define EXT_IRQ12 28
34#define EXT_IRQ13 29
35#define EXT_IRQ14 30
36#define EXT_IRQ15 31
37#define EXT_IRQS 15
38
39#define IER_REGS *(volatile unsigned short *)IER
40#endif
41
42static __inline__ int irq_canonicalize(int irq)
43{
44 return irq;
45}
46
47typedef void (*h8300_vector)(void);
48
49#endif /* _H8300_IRQ_H_ */
diff --git a/include/asm-h8300/irq_regs.h b/include/asm-h8300/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-h8300/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-h8300/kdebug.h b/include/asm-h8300/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-h8300/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-h8300/kmap_types.h b/include/asm-h8300/kmap_types.h
deleted file mode 100644
index 1ec8a3427120..000000000000
--- a/include/asm-h8300/kmap_types.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef _ASM_H8300_KMAP_TYPES_H
2#define _ASM_H8300_KMAP_TYPES_H
3
4enum km_type {
5 KM_BOUNCE_READ,
6 KM_SKB_SUNRPC_DATA,
7 KM_SKB_DATA_SOFTIRQ,
8 KM_USER0,
9 KM_USER1,
10 KM_BIO_SRC_IRQ,
11 KM_BIO_DST_IRQ,
12 KM_PTE0,
13 KM_PTE1,
14 KM_IRQ0,
15 KM_IRQ1,
16 KM_SOFTIRQ0,
17 KM_SOFTIRQ1,
18 KM_TYPE_NR
19};
20
21#endif
diff --git a/include/asm-h8300/linkage.h b/include/asm-h8300/linkage.h
deleted file mode 100644
index 6f4df7d46180..000000000000
--- a/include/asm-h8300/linkage.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _H8300_LINKAGE_H
2#define _H8300_LINKAGE_H
3
4#undef SYMBOL_NAME_LABEL
5#undef SYMBOL_NAME
6#define SYMBOL_NAME_LABEL(_name_) _##_name_##:
7#define SYMBOL_NAME(_name_) _##_name_
8#endif
diff --git a/include/asm-h8300/local.h b/include/asm-h8300/local.h
deleted file mode 100644
index fdd4efe437cd..000000000000
--- a/include/asm-h8300/local.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_LOCAL_H_
2#define _H8300_LOCAL_H_
3
4#include <asm-generic/local.h>
5
6#endif
diff --git a/include/asm-h8300/mc146818rtc.h b/include/asm-h8300/mc146818rtc.h
deleted file mode 100644
index ab9d9646d241..000000000000
--- a/include/asm-h8300/mc146818rtc.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef _H8300_MC146818RTC_H
5#define _H8300_MC146818RTC_H
6
7/* empty include file to satisfy the include in genrtc.c/ide-geometry.c */
8
9#endif /* _H8300_MC146818RTC_H */
diff --git a/include/asm-h8300/md.h b/include/asm-h8300/md.h
deleted file mode 100644
index 1a47dc6691fb..000000000000
--- a/include/asm-h8300/md.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* $Id: md.h,v 1.1 2002/11/19 02:09:26 gerg Exp $
2 * md.h: High speed xor_block operation for RAID4/5
3 *
4 */
5
6#ifndef __ASM_MD_H
7#define __ASM_MD_H
8
9/* #define HAVE_ARCH_XORBLOCK */
10
11#define MD_XORBLOCK_ALIGNMENT sizeof(long)
12
13#endif /* __ASM_MD_H */
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h
deleted file mode 100644
index b9f104f22a36..000000000000
--- a/include/asm-h8300/mman.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef __H8300_MMAN_H__
2#define __H8300_MMAN_H__
3
4#include <asm-generic/mman.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __H8300_MMAN_H__ */
diff --git a/include/asm-h8300/mmu.h b/include/asm-h8300/mmu.h
deleted file mode 100644
index 2ce06ea46104..000000000000
--- a/include/asm-h8300/mmu.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __MMU_H
2#define __MMU_H
3
4/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
5
6typedef struct {
7 struct vm_list_struct *vmlist;
8 unsigned long end_brk;
9} mm_context_t;
10
11#endif
diff --git a/include/asm-h8300/mmu_context.h b/include/asm-h8300/mmu_context.h
deleted file mode 100644
index f44b730da54d..000000000000
--- a/include/asm-h8300/mmu_context.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef __H8300_MMU_CONTEXT_H
2#define __H8300_MMU_CONTEXT_H
3
4#include <asm/setup.h>
5#include <asm/page.h>
6#include <asm/pgalloc.h>
7#include <asm-generic/mm_hooks.h>
8
9static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
10{
11}
12
13static inline int
14init_new_context(struct task_struct *tsk, struct mm_struct *mm)
15{
16 // mm->context = virt_to_phys(mm->pgd);
17 return(0);
18}
19
20#define destroy_context(mm) do { } while(0)
21#define deactivate_mm(tsk,mm) do { } while(0)
22
23static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
24{
25}
26
27static inline void activate_mm(struct mm_struct *prev_mm,
28 struct mm_struct *next_mm)
29{
30}
31
32#endif
diff --git a/include/asm-h8300/module.h b/include/asm-h8300/module.h
deleted file mode 100644
index de23231f3196..000000000000
--- a/include/asm-h8300/module.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_H8300_MODULE_H
2#define _ASM_H8300_MODULE_H
3/*
4 * This file contains the H8/300 architecture specific module code.
5 */
6struct mod_arch_specific { };
7#define Elf_Shdr Elf32_Shdr
8#define Elf_Sym Elf32_Sym
9#define Elf_Ehdr Elf32_Ehdr
10
11#define MODULE_SYMBOL_PREFIX "_"
12
13#endif /* _ASM_H8/300_MODULE_H */
diff --git a/include/asm-h8300/msgbuf.h b/include/asm-h8300/msgbuf.h
deleted file mode 100644
index 6b148cd09aa5..000000000000
--- a/include/asm-h8300/msgbuf.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _H8300_MSGBUF_H
2#define _H8300_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for H8/300 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct msqid64_ds {
15 struct ipc64_perm msg_perm;
16 __kernel_time_t msg_stime; /* last msgsnd time */
17 unsigned long __unused1;
18 __kernel_time_t msg_rtime; /* last msgrcv time */
19 unsigned long __unused2;
20 __kernel_time_t msg_ctime; /* last change time */
21 unsigned long __unused3;
22 unsigned long msg_cbytes; /* current number of bytes on queue */
23 unsigned long msg_qnum; /* number of messages in queue */
24 unsigned long msg_qbytes; /* max number of bytes on queue */
25 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
26 __kernel_pid_t msg_lrpid; /* last receive pid */
27 unsigned long __unused4;
28 unsigned long __unused5;
29};
30
31#endif /* _H8300_MSGBUF_H */
diff --git a/include/asm-h8300/mutex.h b/include/asm-h8300/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/include/asm-h8300/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h
deleted file mode 100644
index 0b6acf0b03aa..000000000000
--- a/include/asm-h8300/page.h
+++ /dev/null
@@ -1,78 +0,0 @@
1#ifndef _H8300_PAGE_H
2#define _H8300_PAGE_H
3
4/* PAGE_SHIFT determines the page size */
5
6#define PAGE_SHIFT (12)
7#define PAGE_SIZE (1UL << PAGE_SHIFT)
8#define PAGE_MASK (~(PAGE_SIZE-1))
9
10#include <asm/setup.h>
11
12#ifndef __ASSEMBLY__
13
14#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
15#define free_user_page(page, addr) free_page(addr)
16
17#define clear_page(page) memset((page), 0, PAGE_SIZE)
18#define copy_page(to,from) memcpy((to), (from), PAGE_SIZE)
19
20#define clear_user_page(page, vaddr, pg) clear_page(page)
21#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
22
23#define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
24 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
25#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
26
27/*
28 * These are used to make use of C type-checking..
29 */
30typedef struct { unsigned long pte; } pte_t;
31typedef struct { unsigned long pmd[16]; } pmd_t;
32typedef struct { unsigned long pgd; } pgd_t;
33typedef struct { unsigned long pgprot; } pgprot_t;
34typedef struct page *pgtable_t;
35
36#define pte_val(x) ((x).pte)
37#define pmd_val(x) ((&x)->pmd[0])
38#define pgd_val(x) ((x).pgd)
39#define pgprot_val(x) ((x).pgprot)
40
41#define __pte(x) ((pte_t) { (x) } )
42#define __pmd(x) ((pmd_t) { (x) } )
43#define __pgd(x) ((pgd_t) { (x) } )
44#define __pgprot(x) ((pgprot_t) { (x) } )
45
46extern unsigned long memory_start;
47extern unsigned long memory_end;
48
49#endif /* !__ASSEMBLY__ */
50
51#include <asm/page_offset.h>
52
53#define PAGE_OFFSET (PAGE_OFFSET_RAW)
54
55#ifndef __ASSEMBLY__
56
57#define __pa(vaddr) virt_to_phys(vaddr)
58#define __va(paddr) phys_to_virt((unsigned long)paddr)
59
60#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
61#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
62
63#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
64#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
65#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
66#define pfn_valid(page) (page < max_mapnr)
67
68#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
69
70#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
71 ((void *)(kaddr) < (void *)memory_end))
72
73#endif /* __ASSEMBLY__ */
74
75#include <asm-generic/memory_model.h>
76#include <asm-generic/page.h>
77
78#endif /* _H8300_PAGE_H */
diff --git a/include/asm-h8300/page_offset.h b/include/asm-h8300/page_offset.h
deleted file mode 100644
index f8706463008c..000000000000
--- a/include/asm-h8300/page_offset.h
+++ /dev/null
@@ -1,3 +0,0 @@
1
2#define PAGE_OFFSET_RAW 0x00000000
3
diff --git a/include/asm-h8300/param.h b/include/asm-h8300/param.h
deleted file mode 100644
index 1c72fb8080ff..000000000000
--- a/include/asm-h8300/param.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _H8300_PARAM_H
2#define _H8300_PARAM_H
3
4#ifdef __KERNEL__
5#define HZ CONFIG_HZ
6#define USER_HZ HZ
7#define CLOCKS_PER_SEC (USER_HZ)
8#else
9#define HZ 100
10#endif
11
12#define EXEC_PAGESIZE 4096
13
14#ifndef NOGROUP
15#define NOGROUP (-1)
16#endif
17
18#define MAXHOSTNAMELEN 64 /* max length of hostname */
19
20#endif /* _H8300_PARAM_H */
diff --git a/include/asm-h8300/pci.h b/include/asm-h8300/pci.h
deleted file mode 100644
index 97389b35aa35..000000000000
--- a/include/asm-h8300/pci.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _ASM_H8300_PCI_H
2#define _ASM_H8300_PCI_H
3
4/*
5 * asm-h8300/pci.h - H8/300 specific PCI declarations.
6 *
7 * Yoshinori Sato <ysato@users.sourceforge.jp>
8 */
9
10#define pcibios_assign_all_busses() 0
11#define pcibios_scan_all_fns(a, b) 0
12
13static inline void pcibios_set_master(struct pci_dev *dev)
14{
15 /* No special bus mastering setup handling */
16}
17
18static inline void pcibios_penalize_isa_irq(int irq, int active)
19{
20 /* We don't do dynamic PCI IRQ allocation */
21}
22
23#define PCI_DMA_BUS_IS_PHYS (1)
24
25#endif /* _ASM_H8300_PCI_H */
diff --git a/include/asm-h8300/percpu.h b/include/asm-h8300/percpu.h
deleted file mode 100644
index 72c03e3666d8..000000000000
--- a/include/asm-h8300/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ARCH_H8300_PERCPU__
2#define __ARCH_H8300_PERCPU__
3
4#include <asm-generic/percpu.h>
5
6#endif /* __ARCH_H8300_PERCPU__ */
diff --git a/include/asm-h8300/pgalloc.h b/include/asm-h8300/pgalloc.h
deleted file mode 100644
index c2e89a286d23..000000000000
--- a/include/asm-h8300/pgalloc.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _H8300_PGALLOC_H
2#define _H8300_PGALLOC_H
3
4#include <asm/setup.h>
5
6#define check_pgt_cache() do { } while (0)
7
8#endif /* _H8300_PGALLOC_H */
diff --git a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h
deleted file mode 100644
index a09230a08e02..000000000000
--- a/include/asm-h8300/pgtable.h
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifndef _H8300_PGTABLE_H
2#define _H8300_PGTABLE_H
3
4#include <asm-generic/4level-fixup.h>
5
6#include <linux/slab.h>
7#include <asm/processor.h>
8#include <asm/page.h>
9#include <asm/io.h>
10
11#define pgd_present(pgd) (1) /* pages are always present on NO_MM */
12#define pgd_none(pgd) (0)
13#define pgd_bad(pgd) (0)
14#define pgd_clear(pgdp)
15#define kern_addr_valid(addr) (1)
16#define pmd_offset(a, b) ((void *)0)
17#define pmd_none(pmd) (1)
18#define pgd_offset_k(adrdress) ((pgd_t *)0)
19#define pte_offset_kernel(dir, address) ((pte_t *)0)
20
21#define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
22#define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
23#define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
24#define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
25#define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
26
27extern void paging_init(void);
28#define swapper_pg_dir ((pgd_t *) 0)
29
30#define __swp_type(x) (0)
31#define __swp_offset(x) (0)
32#define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
33#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
34#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
35
36static inline int pte_file(pte_t pte) { return 0; }
37
38/*
39 * ZERO_PAGE is a global shared page that is always zero: used
40 * for zero-mapped memory areas etc..
41 */
42#define ZERO_PAGE(vaddr) (virt_to_page(0))
43
44/*
45 * These would be in other places but having them here reduces the diffs.
46 */
47extern unsigned int kobjsize(const void *objp);
48extern int is_in_rom(unsigned long);
49
50/*
51 * No page table caches to initialise
52 */
53#define pgtable_cache_init() do { } while (0)
54
55#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
56 remap_pfn_range(vma, vaddr, pfn, size, prot)
57
58/*
59 * All 32bit addresses are effectively valid for vmalloc...
60 * Sort of meaningless for non-VM targets.
61 */
62#define VMALLOC_START 0
63#define VMALLOC_END 0xffffffff
64
65/*
66 * All 32bit addresses are effectively valid for vmalloc...
67 * Sort of meaningless for non-VM targets.
68 */
69#define VMALLOC_START 0
70#define VMALLOC_END 0xffffffff
71
72#define arch_enter_lazy_cpu_mode() do {} while (0)
73#endif /* _H8300_PGTABLE_H */
diff --git a/include/asm-h8300/poll.h b/include/asm-h8300/poll.h
deleted file mode 100644
index f61540c22d94..000000000000
--- a/include/asm-h8300/poll.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __H8300_POLL_H
2#define __H8300_POLL_H
3
4#define POLLWRNORM POLLOUT
5#define POLLWRBAND 256
6
7#include <asm-generic/poll.h>
8
9#undef POLLREMOVE
10
11#endif
diff --git a/include/asm-h8300/posix_types.h b/include/asm-h8300/posix_types.h
deleted file mode 100644
index 5c553927fc53..000000000000
--- a/include/asm-h8300/posix_types.h
+++ /dev/null
@@ -1,60 +0,0 @@
1#ifndef __ARCH_H8300_POSIX_TYPES_H
2#define __ARCH_H8300_POSIX_TYPES_H
3
4/*
5 * This file is generally used by user-level software, so you need to
6 * be a little careful about namespace pollution etc. Also, we cannot
7 * assume GCC is being used.
8 */
9
10typedef unsigned long __kernel_ino_t;
11typedef unsigned short __kernel_mode_t;
12typedef unsigned short __kernel_nlink_t;
13typedef long __kernel_off_t;
14typedef int __kernel_pid_t;
15typedef unsigned short __kernel_ipc_pid_t;
16typedef unsigned short __kernel_uid_t;
17typedef unsigned short __kernel_gid_t;
18typedef unsigned int __kernel_size_t;
19typedef int __kernel_ssize_t;
20typedef int __kernel_ptrdiff_t;
21typedef long __kernel_time_t;
22typedef long __kernel_suseconds_t;
23typedef long __kernel_clock_t;
24typedef int __kernel_timer_t;
25typedef int __kernel_clockid_t;
26typedef int __kernel_daddr_t;
27typedef char * __kernel_caddr_t;
28typedef unsigned short __kernel_uid16_t;
29typedef unsigned short __kernel_gid16_t;
30typedef unsigned int __kernel_uid32_t;
31typedef unsigned int __kernel_gid32_t;
32
33typedef unsigned short __kernel_old_uid_t;
34typedef unsigned short __kernel_old_gid_t;
35
36#ifdef __GNUC__
37typedef long long __kernel_loff_t;
38#endif
39
40typedef struct {
41 int val[2];
42} __kernel_fsid_t;
43
44#if defined(__KERNEL__)
45
46#undef __FD_SET
47#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
48
49#undef __FD_CLR
50#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
51
52#undef __FD_ISSET
53#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
54
55#undef __FD_ZERO
56#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
57
58#endif /* defined(__KERNEL__) */
59
60#endif
diff --git a/include/asm-h8300/processor.h b/include/asm-h8300/processor.h
deleted file mode 100644
index 69e8a34eb6d5..000000000000
--- a/include/asm-h8300/processor.h
+++ /dev/null
@@ -1,140 +0,0 @@
1/*
2 * include/asm-h8300/processor.h
3 *
4 * Copyright (C) 2002 Yoshinori Sato
5 *
6 * Based on: linux/asm-m68nommu/processor.h
7 *
8 * Copyright (C) 1995 Hamish Macdonald
9 */
10
11#ifndef __ASM_H8300_PROCESSOR_H
12#define __ASM_H8300_PROCESSOR_H
13
14/*
15 * Default implementation of macro that returns current
16 * instruction pointer ("program counter").
17 */
18#define current_text_addr() ({ __label__ _l; _l: &&_l;})
19
20#include <linux/compiler.h>
21#include <asm/segment.h>
22#include <asm/fpu.h>
23#include <asm/ptrace.h>
24#include <asm/current.h>
25
26static inline unsigned long rdusp(void) {
27 extern unsigned int sw_usp;
28 return(sw_usp);
29}
30
31static inline void wrusp(unsigned long usp) {
32 extern unsigned int sw_usp;
33 sw_usp = usp;
34}
35
36/*
37 * User space process size: 3.75GB. This is hardcoded into a few places,
38 * so don't change it unless you know what you are doing.
39 */
40#define TASK_SIZE (0xFFFFFFFFUL)
41
42#ifdef __KERNEL__
43#define STACK_TOP TASK_SIZE
44#define STACK_TOP_MAX STACK_TOP
45#endif
46
47/*
48 * This decides where the kernel will search for a free chunk of vm
49 * space during mmap's. We won't be using it
50 */
51#define TASK_UNMAPPED_BASE 0
52
53struct thread_struct {
54 unsigned long ksp; /* kernel stack pointer */
55 unsigned long usp; /* user stack pointer */
56 unsigned long ccr; /* saved status register */
57 unsigned long esp0; /* points to SR of stack frame */
58 struct {
59 unsigned short *addr;
60 unsigned short inst;
61 } breakinfo;
62};
63
64#define INIT_THREAD { \
65 .ksp = sizeof(init_stack) + (unsigned long)init_stack, \
66 .usp = 0, \
67 .ccr = PS_S, \
68 .esp0 = 0, \
69 .breakinfo = { \
70 .addr = (unsigned short *)-1, \
71 .inst = 0 \
72 } \
73}
74
75/*
76 * Do necessary setup to start up a newly executed thread.
77 *
78 * pass the data segment into user programs if it exists,
79 * it can't hurt anything as far as I can tell
80 */
81#if defined(__H8300H__)
82#define start_thread(_regs, _pc, _usp) \
83do { \
84 set_fs(USER_DS); /* reads from user space */ \
85 (_regs)->pc = (_pc); \
86 (_regs)->ccr = 0x00; /* clear all flags */ \
87 (_regs)->er5 = current->mm->start_data; /* GOT base */ \
88 wrusp((unsigned long)(_usp) - sizeof(unsigned long)*3); \
89} while(0)
90#endif
91#if defined(__H8300S__)
92#define start_thread(_regs, _pc, _usp) \
93do { \
94 set_fs(USER_DS); /* reads from user space */ \
95 (_regs)->pc = (_pc); \
96 (_regs)->ccr = 0x00; /* clear kernel flag */ \
97 (_regs)->exr = 0x78; /* enable all interrupts */ \
98 (_regs)->er5 = current->mm->start_data; /* GOT base */ \
99 /* 14 = space for retaddr(4), vector(4), er0(4) and ext(2) on stack */ \
100 wrusp(((unsigned long)(_usp)) - 14); \
101} while(0)
102#endif
103
104/* Forward declaration, a strange C thing */
105struct task_struct;
106
107/* Free all resources held by a thread. */
108static inline void release_thread(struct task_struct *dead_task)
109{
110}
111
112extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
113
114#define prepare_to_copy(tsk) do { } while (0)
115
116/*
117 * Free current thread data structures etc..
118 */
119static inline void exit_thread(void)
120{
121}
122
123/*
124 * Return saved PC of a blocked thread.
125 */
126unsigned long thread_saved_pc(struct task_struct *tsk);
127unsigned long get_wchan(struct task_struct *p);
128
129#define KSTK_EIP(tsk) \
130 ({ \
131 unsigned long eip = 0; \
132 if ((tsk)->thread.esp0 > PAGE_SIZE && \
133 MAP_NR((tsk)->thread.esp0) < max_mapnr) \
134 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
135 eip; })
136#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
137
138#define cpu_relax() barrier()
139
140#endif
diff --git a/include/asm-h8300/ptrace.h b/include/asm-h8300/ptrace.h
deleted file mode 100644
index c2e05e4b512e..000000000000
--- a/include/asm-h8300/ptrace.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _H8300_PTRACE_H
2#define _H8300_PTRACE_H
3
4#ifndef __ASSEMBLY__
5
6#define PT_ER1 0
7#define PT_ER2 1
8#define PT_ER3 2
9#define PT_ER4 3
10#define PT_ER5 4
11#define PT_ER6 5
12#define PT_ER0 6
13#define PT_ORIG_ER0 7
14#define PT_CCR 8
15#define PT_PC 9
16#define PT_USP 10
17#define PT_EXR 12
18
19/* this struct defines the way the registers are stored on the
20 stack during a system call. */
21
22struct pt_regs {
23 long retpc;
24 long er4;
25 long er5;
26 long er6;
27 long er3;
28 long er2;
29 long er1;
30 long orig_er0;
31 unsigned short ccr;
32 long er0;
33 long vector;
34#if defined(CONFIG_CPU_H8S)
35 unsigned short exr;
36#endif
37 unsigned long pc;
38} __attribute__((aligned(2),packed));
39
40#define PTRACE_GETREGS 12
41#define PTRACE_SETREGS 13
42
43#ifdef __KERNEL__
44#ifndef PS_S
45#define PS_S (0x10)
46#endif
47
48#if defined(__H8300H__)
49#define H8300_REGS_NO 11
50#endif
51#if defined(__H8300S__)
52#define H8300_REGS_NO 12
53#endif
54
55/* Find the stack offset for a register, relative to thread.esp0. */
56#define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg)
57
58#define user_mode(regs) (!((regs)->ccr & PS_S))
59#define instruction_pointer(regs) ((regs)->pc)
60#define profile_pc(regs) instruction_pointer(regs)
61extern void show_regs(struct pt_regs *);
62#endif /* __KERNEL__ */
63#endif /* __ASSEMBLY__ */
64#endif /* _H8300_PTRACE_H */
diff --git a/include/asm-h8300/regs267x.h b/include/asm-h8300/regs267x.h
deleted file mode 100644
index 1bff731a9f77..000000000000
--- a/include/asm-h8300/regs267x.h
+++ /dev/null
@@ -1,336 +0,0 @@
1/* internal Peripherals Register address define */
2/* CPU: H8/306x */
3
4#if !defined(__REGS_H8S267x__)
5#define __REGS_H8S267x__
6
7#if defined(__KERNEL__)
8
9#define DASTCR 0xFEE01A
10#define DADR0 0xFFFFA4
11#define DADR1 0xFFFFA5
12#define DACR01 0xFFFFA6
13#define DADR2 0xFFFFA8
14#define DADR3 0xFFFFA9
15#define DACR23 0xFFFFAA
16
17#define ADDRA 0xFFFF90
18#define ADDRAH 0xFFFF90
19#define ADDRAL 0xFFFF91
20#define ADDRB 0xFFFF92
21#define ADDRBH 0xFFFF92
22#define ADDRBL 0xFFFF93
23#define ADDRC 0xFFFF94
24#define ADDRCH 0xFFFF94
25#define ADDRCL 0xFFFF95
26#define ADDRD 0xFFFF96
27#define ADDRDH 0xFFFF96
28#define ADDRDL 0xFFFF97
29#define ADDRE 0xFFFF98
30#define ADDREH 0xFFFF98
31#define ADDREL 0xFFFF99
32#define ADDRF 0xFFFF9A
33#define ADDRFH 0xFFFF9A
34#define ADDRFL 0xFFFF9B
35#define ADDRG 0xFFFF9C
36#define ADDRGH 0xFFFF9C
37#define ADDRGL 0xFFFF9D
38#define ADDRH 0xFFFF9E
39#define ADDRHH 0xFFFF9E
40#define ADDRHL 0xFFFF9F
41
42#define ADCSR 0xFFFFA0
43#define ADCR 0xFFFFA1
44
45#define ABWCR 0xFFFEC0
46#define ASTCR 0xFFFEC1
47#define WTCRAH 0xFFFEC2
48#define WTCRAL 0xFFFEC3
49#define WTCRBH 0xFFFEC4
50#define WTCRBL 0xFFFEC5
51#define RDNCR 0xFFFEC6
52#define CSACRH 0xFFFEC8
53#define CSACRL 0xFFFEC9
54#define BROMCRH 0xFFFECA
55#define BROMCRL 0xFFFECB
56#define BCR 0xFFFECC
57#define DRAMCR 0xFFFED0
58#define DRACCR 0xFFFED2
59#define REFCR 0xFFFED4
60#define RTCNT 0xFFFED6
61#define RTCOR 0xFFFED7
62
63#define MAR0AH 0xFFFEE0
64#define MAR0AL 0xFFFEE2
65#define IOAR0A 0xFFFEE4
66#define ETCR0A 0xFFFEE6
67#define MAR0BH 0xFFFEE8
68#define MAR0BL 0xFFFEEA
69#define IOAR0B 0xFFFEEC
70#define ETCR0B 0xFFFEEE
71#define MAR1AH 0xFFFEF0
72#define MAR1AL 0xFFFEF2
73#define IOAR1A 0xFFFEF4
74#define ETCR1A 0xFFFEF6
75#define MAR1BH 0xFFFEF8
76#define MAR1BL 0xFFFEFA
77#define IOAR1B 0xFFFEFC
78#define ETCR1B 0xFFFEFE
79#define DMAWER 0xFFFF20
80#define DMATCR 0xFFFF21
81#define DMACR0A 0xFFFF22
82#define DMACR0B 0xFFFF23
83#define DMACR1A 0xFFFF24
84#define DMACR1B 0xFFFF25
85#define DMABCRH 0xFFFF26
86#define DMABCRL 0xFFFF27
87
88#define EDSAR0 0xFFFDC0
89#define EDDAR0 0xFFFDC4
90#define EDTCR0 0xFFFDC8
91#define EDMDR0 0xFFFDCC
92#define EDMDR0H 0xFFFDCC
93#define EDMDR0L 0xFFFDCD
94#define EDACR0 0xFFFDCE
95#define EDSAR1 0xFFFDD0
96#define EDDAR1 0xFFFDD4
97#define EDTCR1 0xFFFDD8
98#define EDMDR1 0xFFFDDC
99#define EDMDR1H 0xFFFDDC
100#define EDMDR1L 0xFFFDDD
101#define EDACR1 0xFFFDDE
102#define EDSAR2 0xFFFDE0
103#define EDDAR2 0xFFFDE4
104#define EDTCR2 0xFFFDE8
105#define EDMDR2 0xFFFDEC
106#define EDMDR2H 0xFFFDEC
107#define EDMDR2L 0xFFFDED
108#define EDACR2 0xFFFDEE
109#define EDSAR3 0xFFFDF0
110#define EDDAR3 0xFFFDF4
111#define EDTCR3 0xFFFDF8
112#define EDMDR3 0xFFFDFC
113#define EDMDR3H 0xFFFDFC
114#define EDMDR3L 0xFFFDFD
115#define EDACR3 0xFFFDFE
116
117#define IPRA 0xFFFE00
118#define IPRB 0xFFFE02
119#define IPRC 0xFFFE04
120#define IPRD 0xFFFE06
121#define IPRE 0xFFFE08
122#define IPRF 0xFFFE0A
123#define IPRG 0xFFFE0C
124#define IPRH 0xFFFE0E
125#define IPRI 0xFFFE10
126#define IPRJ 0xFFFE12
127#define IPRK 0xFFFE14
128#define ITSR 0xFFFE16
129#define SSIER 0xFFFE18
130#define ISCRH 0xFFFE1A
131#define ISCRL 0xFFFE1C
132
133#define INTCR 0xFFFF31
134#define IER 0xFFFF32
135#define IERH 0xFFFF32
136#define IERL 0xFFFF33
137#define ISR 0xFFFF34
138#define ISRH 0xFFFF34
139#define ISRL 0xFFFF35
140
141#define P1DDR 0xFFFE20
142#define P2DDR 0xFFFE21
143#define P3DDR 0xFFFE22
144#define P4DDR 0xFFFE23
145#define P5DDR 0xFFFE24
146#define P6DDR 0xFFFE25
147#define P7DDR 0xFFFE26
148#define P8DDR 0xFFFE27
149#define P9DDR 0xFFFE28
150#define PADDR 0xFFFE29
151#define PBDDR 0xFFFE2A
152#define PCDDR 0xFFFE2B
153#define PDDDR 0xFFFE2C
154#define PEDDR 0xFFFE2D
155#define PFDDR 0xFFFE2E
156#define PGDDR 0xFFFE2F
157#define PHDDR 0xFFFF74
158
159#define PFCR0 0xFFFE32
160#define PFCR1 0xFFFE33
161#define PFCR2 0xFFFE34
162
163#define PAPCR 0xFFFE36
164#define PBPCR 0xFFFE37
165#define PCPCR 0xFFFE38
166#define PDPCR 0xFFFE39
167#define PEPCR 0xFFFE3A
168
169#define P3ODR 0xFFFE3C
170#define PAODR 0xFFFE3D
171
172#define P1DR 0xFFFF60
173#define P2DR 0xFFFF61
174#define P3DR 0xFFFF62
175#define P4DR 0xFFFF63
176#define P5DR 0xFFFF64
177#define P6DR 0xFFFF65
178#define P7DR 0xFFFF66
179#define P8DR 0xFFFF67
180#define P9DR 0xFFFF68
181#define PADR 0xFFFF69
182#define PBDR 0xFFFF6A
183#define PCDR 0xFFFF6B
184#define PDDR 0xFFFF6C
185#define PEDR 0xFFFF6D
186#define PFDR 0xFFFF6E
187#define PGDR 0xFFFF6F
188#define PHDR 0xFFFF72
189
190#define PORT1 0xFFFF50
191#define PORT2 0xFFFF51
192#define PORT3 0xFFFF52
193#define PORT4 0xFFFF53
194#define PORT5 0xFFFF54
195#define PORT6 0xFFFF55
196#define PORT7 0xFFFF56
197#define PORT8 0xFFFF57
198#define PORT9 0xFFFF58
199#define PORTA 0xFFFF59
200#define PORTB 0xFFFF5A
201#define PORTC 0xFFFF5B
202#define PORTD 0xFFFF5C
203#define PORTE 0xFFFF5D
204#define PORTF 0xFFFF5E
205#define PORTG 0xFFFF5F
206#define PORTH 0xFFFF70
207
208#define PCR 0xFFFF46
209#define PMR 0xFFFF47
210#define NDERH 0xFFFF48
211#define NDERL 0xFFFF49
212#define PODRH 0xFFFF4A
213#define PODRL 0xFFFF4B
214#define NDRH1 0xFFFF4C
215#define NDRL1 0xFFFF4D
216#define NDRH2 0xFFFF4E
217#define NDRL2 0xFFFF4F
218
219#define SMR0 0xFFFF78
220#define BRR0 0xFFFF79
221#define SCR0 0xFFFF7A
222#define TDR0 0xFFFF7B
223#define SSR0 0xFFFF7C
224#define RDR0 0xFFFF7D
225#define SCMR0 0xFFFF7E
226#define SMR1 0xFFFF80
227#define BRR1 0xFFFF81
228#define SCR1 0xFFFF82
229#define TDR1 0xFFFF83
230#define SSR1 0xFFFF84
231#define RDR1 0xFFFF85
232#define SCMR1 0xFFFF86
233#define SMR2 0xFFFF88
234#define BRR2 0xFFFF89
235#define SCR2 0xFFFF8A
236#define TDR2 0xFFFF8B
237#define SSR2 0xFFFF8C
238#define RDR2 0xFFFF8D
239#define SCMR2 0xFFFF8E
240
241#define IRCR0 0xFFFE1E
242#define SEMR 0xFFFDA8
243
244#define MDCR 0xFFFF3E
245#define SYSCR 0xFFFF3D
246#define MSTPCRH 0xFFFF40
247#define MSTPCRL 0xFFFF41
248#define FLMCR1 0xFFFFC8
249#define FLMCR2 0xFFFFC9
250#define EBR1 0xFFFFCA
251#define EBR2 0xFFFFCB
252#define CTGARC_RAMCR 0xFFFECE
253#define SBYCR 0xFFFF3A
254#define SCKCR 0xFFFF3B
255#define PLLCR 0xFFFF45
256
257#define TSTR 0xFFFFC0
258#define TSNC 0XFFFFC1
259
260#define TCR0 0xFFFFD0
261#define TMDR0 0xFFFFD1
262#define TIORH0 0xFFFFD2
263#define TIORL0 0xFFFFD3
264#define TIER0 0xFFFFD4
265#define TSR0 0xFFFFD5
266#define TCNT0 0xFFFFD6
267#define GRA0 0xFFFFD8
268#define GRB0 0xFFFFDA
269#define GRC0 0xFFFFDC
270#define GRD0 0xFFFFDE
271#define TCR1 0xFFFFE0
272#define TMDR1 0xFFFFE1
273#define TIORH1 0xFFFFE2
274#define TIORL1 0xFFFFE3
275#define TIER1 0xFFFFE4
276#define TSR1 0xFFFFE5
277#define TCNT1 0xFFFFE6
278#define GRA1 0xFFFFE8
279#define GRB1 0xFFFFEA
280#define TCR2 0xFFFFF0
281#define TMDR2 0xFFFFF1
282#define TIORH2 0xFFFFF2
283#define TIORL2 0xFFFFF3
284#define TIER2 0xFFFFF4
285#define TSR2 0xFFFFF5
286#define TCNT2 0xFFFFF6
287#define GRA2 0xFFFFF8
288#define GRB2 0xFFFFFA
289#define TCR3 0xFFFE80
290#define TMDR3 0xFFFE81
291#define TIORH3 0xFFFE82
292#define TIORL3 0xFFFE83
293#define TIER3 0xFFFE84
294#define TSR3 0xFFFE85
295#define TCNT3 0xFFFE86
296#define GRA3 0xFFFE88
297#define GRB3 0xFFFE8A
298#define GRC3 0xFFFE8C
299#define GRD3 0xFFFE8E
300#define TCR4 0xFFFE90
301#define TMDR4 0xFFFE91
302#define TIORH4 0xFFFE92
303#define TIORL4 0xFFFE93
304#define TIER4 0xFFFE94
305#define TSR4 0xFFFE95
306#define TCNT4 0xFFFE96
307#define GRA4 0xFFFE98
308#define GRB4 0xFFFE9A
309#define TCR5 0xFFFEA0
310#define TMDR5 0xFFFEA1
311#define TIORH5 0xFFFEA2
312#define TIORL5 0xFFFEA3
313#define TIER5 0xFFFEA4
314#define TSR5 0xFFFEA5
315#define TCNT5 0xFFFEA6
316#define GRA5 0xFFFEA8
317#define GRB5 0xFFFEAA
318
319#define _8TCR0 0xFFFFB0
320#define _8TCR1 0xFFFFB1
321#define _8TCSR0 0xFFFFB2
322#define _8TCSR1 0xFFFFB3
323#define _8TCORA0 0xFFFFB4
324#define _8TCORA1 0xFFFFB5
325#define _8TCORB0 0xFFFFB6
326#define _8TCORB1 0xFFFFB7
327#define _8TCNT0 0xFFFFB8
328#define _8TCNT1 0xFFFFB9
329
330#define TCSR 0xFFFFBC
331#define TCNT 0xFFFFBD
332#define RSTCSRW 0xFFFFBE
333#define RSTCSRR 0xFFFFBF
334
335#endif /* __KERNEL__ */
336#endif /* __REGS_H8S267x__ */
diff --git a/include/asm-h8300/regs306x.h b/include/asm-h8300/regs306x.h
deleted file mode 100644
index 027dd633fa25..000000000000
--- a/include/asm-h8300/regs306x.h
+++ /dev/null
@@ -1,212 +0,0 @@
1/* internal Peripherals Register address define */
2/* CPU: H8/306x */
3
4#if !defined(__REGS_H8306x__)
5#define __REGS_H8306x__
6
7#if defined(__KERNEL__)
8
9#define DASTCR 0xFEE01A
10#define DADR0 0xFEE09C
11#define DADR1 0xFEE09D
12#define DACR 0xFEE09E
13
14#define ADDRAH 0xFFFFE0
15#define ADDRAL 0xFFFFE1
16#define ADDRBH 0xFFFFE2
17#define ADDRBL 0xFFFFE3
18#define ADDRCH 0xFFFFE4
19#define ADDRCL 0xFFFFE5
20#define ADDRDH 0xFFFFE6
21#define ADDRDL 0xFFFFE7
22#define ADCSR 0xFFFFE8
23#define ADCR 0xFFFFE9
24
25#define BRCR 0xFEE013
26#define ADRCR 0xFEE01E
27#define CSCR 0xFEE01F
28#define ABWCR 0xFEE020
29#define ASTCR 0xFEE021
30#define WCRH 0xFEE022
31#define WCRL 0xFEE023
32#define BCR 0xFEE024
33#define DRCRA 0xFEE026
34#define DRCRB 0xFEE027
35#define RTMCSR 0xFEE028
36#define RTCNT 0xFEE029
37#define RTCOR 0xFEE02A
38
39#define MAR0AR 0xFFFF20
40#define MAR0AE 0xFFFF21
41#define MAR0AH 0xFFFF22
42#define MAR0AL 0xFFFF23
43#define ETCR0AL 0xFFFF24
44#define ETCR0AH 0xFFFF25
45#define IOAR0A 0xFFFF26
46#define DTCR0A 0xFFFF27
47#define MAR0BR 0xFFFF28
48#define MAR0BE 0xFFFF29
49#define MAR0BH 0xFFFF2A
50#define MAR0BL 0xFFFF2B
51#define ETCR0BL 0xFFFF2C
52#define ETCR0BH 0xFFFF2D
53#define IOAR0B 0xFFFF2E
54#define DTCR0B 0xFFFF2F
55#define MAR1AR 0xFFFF30
56#define MAR1AE 0xFFFF31
57#define MAR1AH 0xFFFF32
58#define MAR1AL 0xFFFF33
59#define ETCR1AL 0xFFFF34
60#define ETCR1AH 0xFFFF35
61#define IOAR1A 0xFFFF36
62#define DTCR1A 0xFFFF37
63#define MAR1BR 0xFFFF38
64#define MAR1BE 0xFFFF39
65#define MAR1BH 0xFFFF3A
66#define MAR1BL 0xFFFF3B
67#define ETCR1BL 0xFFFF3C
68#define ETCR1BH 0xFFFF3D
69#define IOAR1B 0xFFFF3E
70#define DTCR1B 0xFFFF3F
71
72#define ISCR 0xFEE014
73#define IER 0xFEE015
74#define ISR 0xFEE016
75#define IPRA 0xFEE018
76#define IPRB 0xFEE019
77
78#define P1DDR 0xFEE000
79#define P2DDR 0xFEE001
80#define P3DDR 0xFEE002
81#define P4DDR 0xFEE003
82#define P5DDR 0xFEE004
83#define P6DDR 0xFEE005
84/*#define P7DDR 0xFEE006*/
85#define P8DDR 0xFEE007
86#define P9DDR 0xFEE008
87#define PADDR 0xFEE009
88#define PBDDR 0xFEE00A
89
90#define P1DR 0xFFFFD0
91#define P2DR 0xFFFFD1
92#define P3DR 0xFFFFD2
93#define P4DR 0xFFFFD3
94#define P5DR 0xFFFFD4
95#define P6DR 0xFFFFD5
96/*#define P7DR 0xFFFFD6*/
97#define P8DR 0xFFFFD7
98#define P9DR 0xFFFFD8
99#define PADR 0xFFFFD9
100#define PBDR 0xFFFFDA
101
102#define P2CR 0xFEE03C
103#define P4CR 0xFEE03E
104#define P5CR 0xFEE03F
105
106#define SMR0 0xFFFFB0
107#define BRR0 0xFFFFB1
108#define SCR0 0xFFFFB2
109#define TDR0 0xFFFFB3
110#define SSR0 0xFFFFB4
111#define RDR0 0xFFFFB5
112#define SCMR0 0xFFFFB6
113#define SMR1 0xFFFFB8
114#define BRR1 0xFFFFB9
115#define SCR1 0xFFFFBA
116#define TDR1 0xFFFFBB
117#define SSR1 0xFFFFBC
118#define RDR1 0xFFFFBD
119#define SCMR1 0xFFFFBE
120#define SMR2 0xFFFFC0
121#define BRR2 0xFFFFC1
122#define SCR2 0xFFFFC2
123#define TDR2 0xFFFFC3
124#define SSR2 0xFFFFC4
125#define RDR2 0xFFFFC5
126#define SCMR2 0xFFFFC6
127
128#define MDCR 0xFEE011
129#define SYSCR 0xFEE012
130#define DIVCR 0xFEE01B
131#define MSTCRH 0xFEE01C
132#define MSTCRL 0xFEE01D
133#define FLMCR1 0xFEE030
134#define FLMCR2 0xFEE031
135#define EBR1 0xFEE032
136#define EBR2 0xFEE033
137#define RAMCR 0xFEE077
138
139#define TSTR 0xFFFF60
140#define TSNC 0XFFFF61
141#define TMDR 0xFFFF62
142#define TOLR 0xFFFF63
143#define TISRA 0xFFFF64
144#define TISRB 0xFFFF65
145#define TISRC 0xFFFF66
146#define TCR0 0xFFFF68
147#define TIOR0 0xFFFF69
148#define TCNT0H 0xFFFF6A
149#define TCNT0L 0xFFFF6B
150#define GRA0H 0xFFFF6C
151#define GRA0L 0xFFFF6D
152#define GRB0H 0xFFFF6E
153#define GRB0L 0xFFFF6F
154#define TCR1 0xFFFF70
155#define TIOR1 0xFFFF71
156#define TCNT1H 0xFFFF72
157#define TCNT1L 0xFFFF73
158#define GRA1H 0xFFFF74
159#define GRA1L 0xFFFF75
160#define GRB1H 0xFFFF76
161#define GRB1L 0xFFFF77
162#define TCR3 0xFFFF78
163#define TIOR3 0xFFFF79
164#define TCNT3H 0xFFFF7A
165#define TCNT3L 0xFFFF7B
166#define GRA3H 0xFFFF7C
167#define GRA3L 0xFFFF7D
168#define GRB3H 0xFFFF7E
169#define GRB3L 0xFFFF7F
170
171#define _8TCR0 0xFFFF80
172#define _8TCR1 0xFFFF81
173#define _8TCSR0 0xFFFF82
174#define _8TCSR1 0xFFFF83
175#define TCORA0 0xFFFF84
176#define TCORA1 0xFFFF85
177#define TCORB0 0xFFFF86
178#define TCORB1 0xFFFF87
179#define _8TCNT0 0xFFFF88
180#define _8TCNT1 0xFFFF89
181
182#define _8TCR2 0xFFFF90
183#define _8TCR3 0xFFFF91
184#define _8TCSR2 0xFFFF92
185#define _8TCSR3 0xFFFF93
186#define TCORA2 0xFFFF94
187#define TCORA3 0xFFFF95
188#define TCORB2 0xFFFF96
189#define TCORB3 0xFFFF97
190#define _8TCNT2 0xFFFF98
191#define _8TCNT3 0xFFFF99
192
193#define TCSR 0xFFFF8C
194#define TCNT 0xFFFF8D
195#define RSTCSR 0xFFFF8F
196
197#define TPMR 0xFFFFA0
198#define TPCR 0xFFFFA1
199#define NDERB 0xFFFFA2
200#define NDERA 0xFFFFA3
201#define NDRB1 0xFFFFA4
202#define NDRA1 0xFFFFA5
203#define NDRB2 0xFFFFA6
204#define NDRA2 0xFFFFA7
205
206#define TCSR 0xFFFF8C
207#define TCNT 0xFFFF8D
208#define RSTCSRW 0xFFFF8E
209#define RSTCSRR 0xFFFF8F
210
211#endif /* __KERNEL__ */
212#endif /* __REGS_H8306x__ */
diff --git a/include/asm-h8300/resource.h b/include/asm-h8300/resource.h
deleted file mode 100644
index 46c5f4391607..000000000000
--- a/include/asm-h8300/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_RESOURCE_H
2#define _H8300_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif /* _H8300_RESOURCE_H */
diff --git a/include/asm-h8300/scatterlist.h b/include/asm-h8300/scatterlist.h
deleted file mode 100644
index d3ecdd87ac90..000000000000
--- a/include/asm-h8300/scatterlist.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef _H8300_SCATTERLIST_H
2#define _H8300_SCATTERLIST_H
3
4#include <asm/types.h>
5
6struct scatterlist {
7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
9#endif
10 unsigned long page_link;
11 unsigned int offset;
12 dma_addr_t dma_address;
13 unsigned int length;
14};
15
16#define ISA_DMA_THRESHOLD (0xffffffff)
17
18#endif /* !(_H8300_SCATTERLIST_H) */
diff --git a/include/asm-h8300/sections.h b/include/asm-h8300/sections.h
deleted file mode 100644
index a81743e8b743..000000000000
--- a/include/asm-h8300/sections.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_SECTIONS_H_
2#define _H8300_SECTIONS_H_
3
4#include <asm-generic/sections.h>
5
6#endif
diff --git a/include/asm-h8300/segment.h b/include/asm-h8300/segment.h
deleted file mode 100644
index b79a82d0f99d..000000000000
--- a/include/asm-h8300/segment.h
+++ /dev/null
@@ -1,49 +0,0 @@
1#ifndef _H8300_SEGMENT_H
2#define _H8300_SEGMENT_H
3
4/* define constants */
5#define USER_DATA (1)
6#ifndef __USER_DS
7#define __USER_DS (USER_DATA)
8#endif
9#define USER_PROGRAM (2)
10#define SUPER_DATA (3)
11#ifndef __KERNEL_DS
12#define __KERNEL_DS (SUPER_DATA)
13#endif
14#define SUPER_PROGRAM (4)
15
16#ifndef __ASSEMBLY__
17
18typedef struct {
19 unsigned long seg;
20} mm_segment_t;
21
22#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
23#define USER_DS MAKE_MM_SEG(__USER_DS)
24#define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
25
26/*
27 * Get/set the SFC/DFC registers for MOVES instructions
28 */
29
30static inline mm_segment_t get_fs(void)
31{
32 return USER_DS;
33}
34
35static inline mm_segment_t get_ds(void)
36{
37 /* return the supervisor data space code */
38 return KERNEL_DS;
39}
40
41static inline void set_fs(mm_segment_t val)
42{
43}
44
45#define segment_eq(a,b) ((a).seg == (b).seg)
46
47#endif /* __ASSEMBLY__ */
48
49#endif /* _H8300_SEGMENT_H */
diff --git a/include/asm-h8300/sembuf.h b/include/asm-h8300/sembuf.h
deleted file mode 100644
index e04a3ec0cb92..000000000000
--- a/include/asm-h8300/sembuf.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _H8300_SEMBUF_H
2#define _H8300_SEMBUF_H
3
4/*
5 * The semid64_ds structure for m68k architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17 unsigned long __unused1;
18 __kernel_time_t sem_ctime; /* last change time */
19 unsigned long __unused2;
20 unsigned long sem_nsems; /* no. of semaphores in array */
21 unsigned long __unused3;
22 unsigned long __unused4;
23};
24
25#endif /* _H8300_SEMBUF_H */
diff --git a/include/asm-h8300/setup.h b/include/asm-h8300/setup.h
deleted file mode 100644
index e2c600e96733..000000000000
--- a/include/asm-h8300/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __H8300_SETUP_H
2#define __H8300_SETUP_H
3
4#define COMMAND_LINE_SIZE 512
5
6#endif
diff --git a/include/asm-h8300/sh_bios.h b/include/asm-h8300/sh_bios.h
deleted file mode 100644
index b6bb6e58295c..000000000000
--- a/include/asm-h8300/sh_bios.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* eCos HAL interface header */
2
3#ifndef SH_BIOS_H
4#define SH_BIOS_H
5
6#define HAL_IF_VECTOR_TABLE 0xfffe20
7#define CALL_IF_SET_CONSOLE_COMM 13
8#define QUERY_CURRENT -1
9#define MANGLER -3
10
11/* Checking for GDB stub active */
12/* suggestion Jonathan Larmour */
13static int sh_bios_in_gdb_mode(void)
14{
15 static int gdb_active = -1;
16 if (gdb_active == -1) {
17 int (*set_console_comm)(int);
18 set_console_comm = ((void **)HAL_IF_VECTOR_TABLE)[CALL_IF_SET_CONSOLE_COMM];
19 gdb_active = (set_console_comm(QUERY_CURRENT) == MANGLER);
20 }
21 return gdb_active;
22}
23
24static void sh_bios_gdb_detach(void)
25{
26
27}
28
29#endif
diff --git a/include/asm-h8300/shm.h b/include/asm-h8300/shm.h
deleted file mode 100644
index ed6623c0545d..000000000000
--- a/include/asm-h8300/shm.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _H8300_SHM_H
2#define _H8300_SHM_H
3
4
5/* format of page table entries that correspond to shared memory pages
6 currently out in swap space (see also mm/swap.c):
7 bits 0-1 (PAGE_PRESENT) is = 0
8 bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE
9 bits 31..9 are used like this:
10 bits 15..9 (SHM_ID) the id of the shared memory segment
11 bits 30..16 (SHM_IDX) the index of the page within the shared memory segment
12 (actually only bits 25..16 get used since SHMMAX is so low)
13 bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach
14*/
15/* on the m68k both bits 0 and 1 must be zero */
16/* format on the sun3 is similar, but bits 30, 31 are set to zero and all
17 others are reduced by 2. --m */
18
19#ifndef CONFIG_SUN3
20#define SHM_ID_SHIFT 9
21#else
22#define SHM_ID_SHIFT 7
23#endif
24#define _SHM_ID_BITS 7
25#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
26
27#define SHM_IDX_SHIFT (SHM_ID_SHIFT+_SHM_ID_BITS)
28#define _SHM_IDX_BITS 15
29#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
30
31#endif /* _H8300_SHM_H */
diff --git a/include/asm-h8300/shmbuf.h b/include/asm-h8300/shmbuf.h
deleted file mode 100644
index 64e77993a7a9..000000000000
--- a/include/asm-h8300/shmbuf.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef _H8300_SHMBUF_H
2#define _H8300_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for m68k architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct shmid64_ds {
15 struct ipc64_perm shm_perm; /* operation perms */
16 size_t shm_segsz; /* size of segment (bytes) */
17 __kernel_time_t shm_atime; /* last attach time */
18 unsigned long __unused1;
19 __kernel_time_t shm_dtime; /* last detach time */
20 unsigned long __unused2;
21 __kernel_time_t shm_ctime; /* last change time */
22 unsigned long __unused3;
23 __kernel_pid_t shm_cpid; /* pid of creator */
24 __kernel_pid_t shm_lpid; /* pid of last operator */
25 unsigned long shm_nattch; /* no. of current attaches */
26 unsigned long __unused4;
27 unsigned long __unused5;
28};
29
30struct shminfo64 {
31 unsigned long shmmax;
32 unsigned long shmmin;
33 unsigned long shmmni;
34 unsigned long shmseg;
35 unsigned long shmall;
36 unsigned long __unused1;
37 unsigned long __unused2;
38 unsigned long __unused3;
39 unsigned long __unused4;
40};
41
42#endif /* _H8300_SHMBUF_H */
diff --git a/include/asm-h8300/shmparam.h b/include/asm-h8300/shmparam.h
deleted file mode 100644
index d1863953ec64..000000000000
--- a/include/asm-h8300/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_SHMPARAM_H
2#define _H8300_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _H8300_SHMPARAM_H */
diff --git a/include/asm-h8300/sigcontext.h b/include/asm-h8300/sigcontext.h
deleted file mode 100644
index e4b81505f8f8..000000000000
--- a/include/asm-h8300/sigcontext.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef _ASM_H8300_SIGCONTEXT_H
2#define _ASM_H8300_SIGCONTEXT_H
3
4struct sigcontext {
5 unsigned long sc_mask; /* old sigmask */
6 unsigned long sc_usp; /* old user stack pointer */
7 unsigned long sc_er0;
8 unsigned long sc_er1;
9 unsigned long sc_er2;
10 unsigned long sc_er3;
11 unsigned long sc_er4;
12 unsigned long sc_er5;
13 unsigned long sc_er6;
14 unsigned short sc_ccr;
15 unsigned long sc_pc;
16};
17
18#endif
diff --git a/include/asm-h8300/siginfo.h b/include/asm-h8300/siginfo.h
deleted file mode 100644
index bc8fbea931a5..000000000000
--- a/include/asm-h8300/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_SIGINFO_H
2#define _H8300_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h
deleted file mode 100644
index 7bc15048a64f..000000000000
--- a/include/asm-h8300/signal.h
+++ /dev/null
@@ -1,161 +0,0 @@
1#ifndef _H8300_SIGNAL_H
2#define _H8300_SIGNAL_H
3
4#include <linux/types.h>
5
6/* Avoid too many header ordering problems. */
7struct siginfo;
8
9#ifdef __KERNEL__
10/* Most things should be clean enough to redefine this at will, if care
11 is taken to make libc match. */
12
13#define _NSIG 64
14#define _NSIG_BPW 32
15#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
16
17typedef unsigned long old_sigset_t; /* at least 32 bits */
18
19typedef struct {
20 unsigned long sig[_NSIG_WORDS];
21} sigset_t;
22
23#else
24/* Here we must cater to libcs that poke about in kernel headers. */
25
26#define NSIG 32
27typedef unsigned long sigset_t;
28
29#endif /* __KERNEL__ */
30
31#define SIGHUP 1
32#define SIGINT 2
33#define SIGQUIT 3
34#define SIGILL 4
35#define SIGTRAP 5
36#define SIGABRT 6
37#define SIGIOT 6
38#define SIGBUS 7
39#define SIGFPE 8
40#define SIGKILL 9
41#define SIGUSR1 10
42#define SIGSEGV 11
43#define SIGUSR2 12
44#define SIGPIPE 13
45#define SIGALRM 14
46#define SIGTERM 15
47#define SIGSTKFLT 16
48#define SIGCHLD 17
49#define SIGCONT 18
50#define SIGSTOP 19
51#define SIGTSTP 20
52#define SIGTTIN 21
53#define SIGTTOU 22
54#define SIGURG 23
55#define SIGXCPU 24
56#define SIGXFSZ 25
57#define SIGVTALRM 26
58#define SIGPROF 27
59#define SIGWINCH 28
60#define SIGIO 29
61#define SIGPOLL SIGIO
62/*
63#define SIGLOST 29
64*/
65#define SIGPWR 30
66#define SIGSYS 31
67#define SIGUNUSED 31
68
69/* These should not be considered constants from userland. */
70#define SIGRTMIN 32
71#define SIGRTMAX _NSIG
72
73/*
74 * SA_FLAGS values:
75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_RESTART flag to get restarting signals (which were the default long ago)
78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
79 * SA_RESETHAND clears the handler when the signal is delivered.
80 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
81 * SA_NODEFER prevents the current signal from being masked in the handler.
82 *
83 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
84 * Unix names RESETHAND and NODEFER respectively.
85 */
86#define SA_NOCLDSTOP 0x00000001
87#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
88#define SA_SIGINFO 0x00000004
89#define SA_ONSTACK 0x08000000
90#define SA_RESTART 0x10000000
91#define SA_NODEFER 0x40000000
92#define SA_RESETHAND 0x80000000
93
94#define SA_NOMASK SA_NODEFER
95#define SA_ONESHOT SA_RESETHAND
96
97#define SA_RESTORER 0x04000000
98
99/*
100 * sigaltstack controls
101 */
102#define SS_ONSTACK 1
103#define SS_DISABLE 2
104
105#define MINSIGSTKSZ 2048
106#define SIGSTKSZ 8192
107
108#include <asm-generic/signal.h>
109
110#ifdef __KERNEL__
111struct old_sigaction {
112 __sighandler_t sa_handler;
113 old_sigset_t sa_mask;
114 unsigned long sa_flags;
115 void (*sa_restorer)(void);
116};
117
118struct sigaction {
119 __sighandler_t sa_handler;
120 unsigned long sa_flags;
121 void (*sa_restorer)(void);
122 sigset_t sa_mask; /* mask last for extensibility */
123};
124
125struct k_sigaction {
126 struct sigaction sa;
127};
128#else
129/* Here we must cater to libcs that poke about in kernel headers. */
130
131struct sigaction {
132 union {
133 __sighandler_t _sa_handler;
134 void (*_sa_sigaction)(int, struct siginfo *, void *);
135 } _u;
136 sigset_t sa_mask;
137 unsigned long sa_flags;
138 void (*sa_restorer)(void);
139};
140
141#define sa_handler _u._sa_handler
142#define sa_sigaction _u._sa_sigaction
143
144#endif /* __KERNEL__ */
145
146typedef struct sigaltstack {
147 void *ss_sp;
148 int ss_flags;
149 size_t ss_size;
150} stack_t;
151
152#ifdef __KERNEL__
153
154#include <asm/sigcontext.h>
155#undef __HAVE_ARCH_SIG_BITOPS
156
157#define ptrace_signal_deliver(regs, cookie) do { } while (0)
158
159#endif /* __KERNEL__ */
160
161#endif /* _H8300_SIGNAL_H */
diff --git a/include/asm-h8300/smp.h b/include/asm-h8300/smp.h
deleted file mode 100644
index 9e9bd7e58922..000000000000
--- a/include/asm-h8300/smp.h
+++ /dev/null
@@ -1 +0,0 @@
1/* nothing required here yet */
diff --git a/include/asm-h8300/socket.h b/include/asm-h8300/socket.h
deleted file mode 100644
index da2520dbf254..000000000000
--- a/include/asm-h8300/socket.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef _ASM_SOCKET_H
2#define _ASM_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockoptions(2) */
7#define SOL_SOCKET 1
8
9#define SO_DEBUG 1
10#define SO_REUSEADDR 2
11#define SO_TYPE 3
12#define SO_ERROR 4
13#define SO_DONTROUTE 5
14#define SO_BROADCAST 6
15#define SO_SNDBUF 7
16#define SO_RCVBUF 8
17#define SO_SNDBUFFORCE 32
18#define SO_RCVBUFFORCE 33
19#define SO_KEEPALIVE 9
20#define SO_OOBINLINE 10
21#define SO_NO_CHECK 11
22#define SO_PRIORITY 12
23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */
26#define SO_PASSCRED 16
27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18
29#define SO_SNDLOWAT 19
30#define SO_RCVTIMEO 20
31#define SO_SNDTIMEO 21
32
33/* Security levels - as per NRL IPv6 - don't actually do anything */
34#define SO_SECURITY_AUTHENTICATION 22
35#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
36#define SO_SECURITY_ENCRYPTION_NETWORK 24
37
38#define SO_BINDTODEVICE 25
39
40/* Socket filtering */
41#define SO_ATTACH_FILTER 26
42#define SO_DETACH_FILTER 27
43
44#define SO_PEERNAME 28
45#define SO_TIMESTAMP 29
46#define SCM_TIMESTAMP SO_TIMESTAMP
47
48#define SO_ACCEPTCONN 30
49
50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54
55#define SO_MARK 36
56
57#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-h8300/sockios.h b/include/asm-h8300/sockios.h
deleted file mode 100644
index e9c7ec810c23..000000000000
--- a/include/asm-h8300/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_H8300_SOCKIOS__
2#define __ARCH_H8300_SOCKIOS__
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif /* __ARCH_H8300_SOCKIOS__ */
diff --git a/include/asm-h8300/spinlock.h b/include/asm-h8300/spinlock.h
deleted file mode 100644
index d5407fa173e4..000000000000
--- a/include/asm-h8300/spinlock.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __H8300_SPINLOCK_H
2#define __H8300_SPINLOCK_H
3
4#error "H8/300 doesn't do SMP yet"
5
6#endif
diff --git a/include/asm-h8300/stat.h b/include/asm-h8300/stat.h
deleted file mode 100644
index 62c3cc24dfe6..000000000000
--- a/include/asm-h8300/stat.h
+++ /dev/null
@@ -1,78 +0,0 @@
1#ifndef _H8300_STAT_H
2#define _H8300_STAT_H
3
4struct __old_kernel_stat {
5 unsigned short st_dev;
6 unsigned short st_ino;
7 unsigned short st_mode;
8 unsigned short st_nlink;
9 unsigned short st_uid;
10 unsigned short st_gid;
11 unsigned short st_rdev;
12 unsigned long st_size;
13 unsigned long st_atime;
14 unsigned long st_mtime;
15 unsigned long st_ctime;
16};
17
18struct stat {
19 unsigned short st_dev;
20 unsigned short __pad1;
21 unsigned long st_ino;
22 unsigned short st_mode;
23 unsigned short st_nlink;
24 unsigned short st_uid;
25 unsigned short st_gid;
26 unsigned short st_rdev;
27 unsigned short __pad2;
28 unsigned long st_size;
29 unsigned long st_blksize;
30 unsigned long st_blocks;
31 unsigned long st_atime;
32 unsigned long __unused1;
33 unsigned long st_mtime;
34 unsigned long __unused2;
35 unsigned long st_ctime;
36 unsigned long __unused3;
37 unsigned long __unused4;
38 unsigned long __unused5;
39};
40
41/* This matches struct stat64 in glibc2.1, hence the absolutely
42 * insane amounts of padding around dev_t's.
43 */
44struct stat64 {
45 unsigned long long st_dev;
46 unsigned char __pad1[2];
47
48#define STAT64_HAS_BROKEN_ST_INO 1
49 unsigned long __st_ino;
50
51 unsigned int st_mode;
52 unsigned int st_nlink;
53
54 unsigned long st_uid;
55 unsigned long st_gid;
56
57 unsigned long long st_rdev;
58 unsigned char __pad3[2];
59
60 long long st_size;
61 unsigned long st_blksize;
62
63 unsigned long __pad4; /* future possible st_blocks high bits */
64 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
65
66 unsigned long st_atime;
67 unsigned long st_atime_nsec;
68
69 unsigned long st_mtime;
70 unsigned long st_mtime_nsec;
71
72 unsigned long st_ctime;
73 unsigned long st_ctime_nsec;
74
75 unsigned long long st_ino;
76};
77
78#endif /* _H8300_STAT_H */
diff --git a/include/asm-h8300/statfs.h b/include/asm-h8300/statfs.h
deleted file mode 100644
index b96efa712aac..000000000000
--- a/include/asm-h8300/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _H8300_STATFS_H
2#define _H8300_STATFS_H
3
4#include <asm-generic/statfs.h>
5
6#endif /* _H8300_STATFS_H */
diff --git a/include/asm-h8300/string.h b/include/asm-h8300/string.h
deleted file mode 100644
index ca5034897d87..000000000000
--- a/include/asm-h8300/string.h
+++ /dev/null
@@ -1,44 +0,0 @@
1#ifndef _H8300_STRING_H_
2#define _H8300_STRING_H_
3
4#ifdef __KERNEL__ /* only set these up for kernel code */
5
6#include <asm/setup.h>
7#include <asm/page.h>
8
9#define __HAVE_ARCH_MEMSET
10extern void * memset(void * s, int c, size_t count);
11
12#define __HAVE_ARCH_MEMCPY
13extern void * memcpy(void *d, const void *s, size_t count);
14
15#else /* KERNEL */
16
17/*
18 * let user libraries deal with these,
19 * IMHO the kernel has no place defining these functions for user apps
20 */
21
22#define __HAVE_ARCH_STRCPY 1
23#define __HAVE_ARCH_STRNCPY 1
24#define __HAVE_ARCH_STRCAT 1
25#define __HAVE_ARCH_STRNCAT 1
26#define __HAVE_ARCH_STRCMP 1
27#define __HAVE_ARCH_STRNCMP 1
28#define __HAVE_ARCH_STRNICMP 1
29#define __HAVE_ARCH_STRCHR 1
30#define __HAVE_ARCH_STRRCHR 1
31#define __HAVE_ARCH_STRSTR 1
32#define __HAVE_ARCH_STRLEN 1
33#define __HAVE_ARCH_STRNLEN 1
34#define __HAVE_ARCH_MEMSET 1
35#define __HAVE_ARCH_MEMCPY 1
36#define __HAVE_ARCH_MEMMOVE 1
37#define __HAVE_ARCH_MEMSCAN 1
38#define __HAVE_ARCH_MEMCMP 1
39#define __HAVE_ARCH_MEMCHR 1
40#define __HAVE_ARCH_STRTOK 1
41
42#endif /* KERNEL */
43
44#endif /* _M68K_STRING_H_ */
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h
deleted file mode 100644
index 4b8e475908ae..000000000000
--- a/include/asm-h8300/system.h
+++ /dev/null
@@ -1,158 +0,0 @@
1#ifndef _H8300_SYSTEM_H
2#define _H8300_SYSTEM_H
3
4#include <linux/linkage.h>
5
6/*
7 * switch_to(n) should switch tasks to task ptr, first checking that
8 * ptr isn't the current task, in which case it does nothing. This
9 * also clears the TS-flag if the task we switched to has used the
10 * math co-processor latest.
11 */
12/*
13 * switch_to() saves the extra registers, that are not saved
14 * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and
15 * a0-a1. Some of these are used by schedule() and its predecessors
16 * and so we might get see unexpected behaviors when a task returns
17 * with unexpected register values.
18 *
19 * syscall stores these registers itself and none of them are used
20 * by syscall after the function in the syscall has been called.
21 *
22 * Beware that resume now expects *next to be in d1 and the offset of
23 * tss to be in a1. This saves a few instructions as we no longer have
24 * to push them onto the stack and read them back right after.
25 *
26 * 02/17/96 - Jes Sorensen (jds@kom.auc.dk)
27 *
28 * Changed 96/09/19 by Andreas Schwab
29 * pass prev in a0, next in a1, offset of tss in d1, and whether
30 * the mm structures are shared in d2 (to avoid atc flushing).
31 *
32 * H8/300 Porting 2002/09/04 Yoshinori Sato
33 */
34
35asmlinkage void resume(void);
36#define switch_to(prev,next,last) { \
37 void *_last; \
38 __asm__ __volatile__( \
39 "mov.l %1, er0\n\t" \
40 "mov.l %2, er1\n\t" \
41 "mov.l %3, er2\n\t" \
42 "jsr @_resume\n\t" \
43 "mov.l er2,%0\n\t" \
44 : "=r" (_last) \
45 : "r" (&(prev->thread)), \
46 "r" (&(next->thread)), \
47 "g" (prev) \
48 : "cc", "er0", "er1", "er2", "er3"); \
49 (last) = _last; \
50}
51
52#define __sti() asm volatile ("andc #0x7f,ccr")
53#define __cli() asm volatile ("orc #0x80,ccr")
54
55#define __save_flags(x) \
56 asm volatile ("stc ccr,%w0":"=r" (x))
57
58#define __restore_flags(x) \
59 asm volatile ("ldc %w0,ccr": :"r" (x))
60
61#define irqs_disabled() \
62({ \
63 unsigned char flags; \
64 __save_flags(flags); \
65 ((flags & 0x80) == 0x80); \
66})
67
68#define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc")
69
70/* For spinlocks etc */
71#define local_irq_disable() __cli()
72#define local_irq_enable() __sti()
73#define local_irq_save(x) ({ __save_flags(x); local_irq_disable(); })
74#define local_irq_restore(x) __restore_flags(x)
75#define local_save_flags(x) __save_flags(x)
76
77/*
78 * Force strict CPU ordering.
79 * Not really required on H8...
80 */
81#define nop() asm volatile ("nop"::)
82#define mb() asm volatile ("" : : :"memory")
83#define rmb() asm volatile ("" : : :"memory")
84#define wmb() asm volatile ("" : : :"memory")
85#define set_mb(var, value) do { xchg(&var, value); } while (0)
86
87#ifdef CONFIG_SMP
88#define smp_mb() mb()
89#define smp_rmb() rmb()
90#define smp_wmb() wmb()
91#define smp_read_barrier_depends() read_barrier_depends()
92#else
93#define smp_mb() barrier()
94#define smp_rmb() barrier()
95#define smp_wmb() barrier()
96#define smp_read_barrier_depends() do { } while(0)
97#endif
98
99#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
100
101struct __xchg_dummy { unsigned long a[100]; };
102#define __xg(x) ((volatile struct __xchg_dummy *)(x))
103
104static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
105{
106 unsigned long tmp, flags;
107
108 local_irq_save(flags);
109
110 switch (size) {
111 case 1:
112 __asm__ __volatile__
113 ("mov.b %2,%0\n\t"
114 "mov.b %1,%2"
115 : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory");
116 break;
117 case 2:
118 __asm__ __volatile__
119 ("mov.w %2,%0\n\t"
120 "mov.w %1,%2"
121 : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory");
122 break;
123 case 4:
124 __asm__ __volatile__
125 ("mov.l %2,%0\n\t"
126 "mov.l %1,%2"
127 : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory");
128 break;
129 default:
130 tmp = 0;
131 }
132 local_irq_restore(flags);
133 return tmp;
134}
135
136#define HARD_RESET_NOW() ({ \
137 local_irq_disable(); \
138 asm("jmp @@0"); \
139})
140
141#include <asm-generic/cmpxchg-local.h>
142
143/*
144 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
145 * them available.
146 */
147#define cmpxchg_local(ptr, o, n) \
148 ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
149 (unsigned long)(n), sizeof(*(ptr))))
150#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
151
152#ifndef CONFIG_SMP
153#include <asm-generic/cmpxchg.h>
154#endif
155
156#define arch_align_stack(x) (x)
157
158#endif /* _H8300_SYSTEM_H */
diff --git a/include/asm-h8300/target_time.h b/include/asm-h8300/target_time.h
deleted file mode 100644
index 9f2a9aa1fe6f..000000000000
--- a/include/asm-h8300/target_time.h
+++ /dev/null
@@ -1,4 +0,0 @@
1extern int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *));
2extern void platform_timer_eoi(void);
3extern void platform_gettod(unsigned int *year, unsigned int *mon, unsigned int *day,
4 unsigned int *hour, unsigned int *min, unsigned int *sec);
diff --git a/include/asm-h8300/termbits.h b/include/asm-h8300/termbits.h
deleted file mode 100644
index 31eca81db3f7..000000000000
--- a/include/asm-h8300/termbits.h
+++ /dev/null
@@ -1,200 +0,0 @@
1#ifndef __ARCH_H8300_TERMBITS_H__
2#define __ARCH_H8300_TERMBITS_H__
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61
62/* c_iflag bits */
63#define IGNBRK 0000001
64#define BRKINT 0000002
65#define IGNPAR 0000004
66#define PARMRK 0000010
67#define INPCK 0000020
68#define ISTRIP 0000040
69#define INLCR 0000100
70#define IGNCR 0000200
71#define ICRNL 0000400
72#define IUCLC 0001000
73#define IXON 0002000
74#define IXANY 0004000
75#define IXOFF 0010000
76#define IMAXBEL 0020000
77#define IUTF8 0040000
78
79/* c_oflag bits */
80#define OPOST 0000001
81#define OLCUC 0000002
82#define ONLCR 0000004
83#define OCRNL 0000010
84#define ONOCR 0000020
85#define ONLRET 0000040
86#define OFILL 0000100
87#define OFDEL 0000200
88#define NLDLY 0000400
89#define NL0 0000000
90#define NL1 0000400
91#define CRDLY 0003000
92#define CR0 0000000
93#define CR1 0001000
94#define CR2 0002000
95#define CR3 0003000
96#define TABDLY 0014000
97#define TAB0 0000000
98#define TAB1 0004000
99#define TAB2 0010000
100#define TAB3 0014000
101#define XTABS 0014000
102#define BSDLY 0020000
103#define BS0 0000000
104#define BS1 0020000
105#define VTDLY 0040000
106#define VT0 0000000
107#define VT1 0040000
108#define FFDLY 0100000
109#define FF0 0000000
110#define FF1 0100000
111
112/* c_cflag bit meaning */
113#define CBAUD 0010017
114#define B0 0000000 /* hang up */
115#define B50 0000001
116#define B75 0000002
117#define B110 0000003
118#define B134 0000004
119#define B150 0000005
120#define B200 0000006
121#define B300 0000007
122#define B600 0000010
123#define B1200 0000011
124#define B1800 0000012
125#define B2400 0000013
126#define B4800 0000014
127#define B9600 0000015
128#define B19200 0000016
129#define B38400 0000017
130#define EXTA B19200
131#define EXTB B38400
132#define CSIZE 0000060
133#define CS5 0000000
134#define CS6 0000020
135#define CS7 0000040
136#define CS8 0000060
137#define CSTOPB 0000100
138#define CREAD 0000200
139#define PARENB 0000400
140#define PARODD 0001000
141#define HUPCL 0002000
142#define CLOCAL 0004000
143#define CBAUDEX 0010000
144#define BOTHER 0010000
145#define B57600 0010001
146#define B115200 0010002
147#define B230400 0010003
148#define B460800 0010004
149#define B500000 0010005
150#define B576000 0010006
151#define B921600 0010007
152#define B1000000 0010010
153#define B1152000 0010011
154#define B1500000 0010012
155#define B2000000 0010013
156#define B2500000 0010014
157#define B3000000 0010015
158#define B3500000 0010016
159#define B4000000 0010017
160#define CIBAUD 002003600000 /* input baud rate */
161#define CMSPAR 010000000000 /* mark or space (stick) parity */
162#define CRTSCTS 020000000000 /* flow control */
163
164#define IBSHIFT 16 /* shift from CBAUD to CIBAUD */
165
166/* c_lflag bits */
167#define ISIG 0000001
168#define ICANON 0000002
169#define XCASE 0000004
170#define ECHO 0000010
171#define ECHOE 0000020
172#define ECHOK 0000040
173#define ECHONL 0000100
174#define NOFLSH 0000200
175#define TOSTOP 0000400
176#define ECHOCTL 0001000
177#define ECHOPRT 0002000
178#define ECHOKE 0004000
179#define FLUSHO 0010000
180#define PENDIN 0040000
181#define IEXTEN 0100000
182
183
184/* tcflow() and TCXONC use these */
185#define TCOOFF 0
186#define TCOON 1
187#define TCIOFF 2
188#define TCION 3
189
190/* tcflush() and TCFLSH use these */
191#define TCIFLUSH 0
192#define TCOFLUSH 1
193#define TCIOFLUSH 2
194
195/* tcsetattr uses these */
196#define TCSANOW 0
197#define TCSADRAIN 1
198#define TCSAFLUSH 2
199
200#endif /* __ARCH_H8300_TERMBITS_H__ */
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h
deleted file mode 100644
index 70eea64b4213..000000000000
--- a/include/asm-h8300/termios.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef _H8300_TERMIOS_H
2#define _H8300_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24#ifdef __KERNEL__
25/* intr=^C quit=^| erase=del kill=^U
26 eof=^D vtime=\0 vmin=\1 sxtc=\0
27 start=^Q stop=^S susp=^Z eol=\0
28 reprint=^R discard=^U werase=^W lnext=^V
29 eol2=\0
30*/
31#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
32#endif
33
34/* modem lines */
35#define TIOCM_LE 0x001
36#define TIOCM_DTR 0x002
37#define TIOCM_RTS 0x004
38#define TIOCM_ST 0x008
39#define TIOCM_SR 0x010
40#define TIOCM_CTS 0x020
41#define TIOCM_CAR 0x040
42#define TIOCM_RNG 0x080
43#define TIOCM_DSR 0x100
44#define TIOCM_CD TIOCM_CAR
45#define TIOCM_RI TIOCM_RNG
46#define TIOCM_OUT1 0x2000
47#define TIOCM_OUT2 0x4000
48#define TIOCM_LOOP 0x8000
49
50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51
52#ifdef __KERNEL__
53
54/*
55 * Translate a "termio" structure into a "termios". Ugh.
56 */
57#define user_termio_to_kernel_termios(termios, termio) \
58({ \
59 unsigned short tmp; \
60 get_user(tmp, &(termio)->c_iflag); \
61 (termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
62 get_user(tmp, &(termio)->c_oflag); \
63 (termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
64 get_user(tmp, &(termio)->c_cflag); \
65 (termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
66 get_user(tmp, &(termio)->c_lflag); \
67 (termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
68 get_user((termios)->c_line, &(termio)->c_line); \
69 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
70})
71
72/*
73 * Translate a "termios" structure into a "termio". Ugh.
74 */
75#define kernel_termios_to_user_termio(termio, termios) \
76({ \
77 put_user((termios)->c_iflag, &(termio)->c_iflag); \
78 put_user((termios)->c_oflag, &(termio)->c_oflag); \
79 put_user((termios)->c_cflag, &(termio)->c_cflag); \
80 put_user((termios)->c_lflag, &(termio)->c_lflag); \
81 put_user((termios)->c_line, &(termio)->c_line); \
82 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
83})
84
85#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
86#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
87#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
88#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
89
90#endif /* __KERNEL__ */
91
92#endif /* _H8300_TERMIOS_H */
diff --git a/include/asm-h8300/thread_info.h b/include/asm-h8300/thread_info.h
deleted file mode 100644
index aafd4d322ec3..000000000000
--- a/include/asm-h8300/thread_info.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/* thread_info.h: h8300 low-level thread information
2 * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp>
3 *
4 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
5 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
6 */
7
8#ifndef _ASM_THREAD_INFO_H
9#define _ASM_THREAD_INFO_H
10
11#include <asm/page.h>
12
13#ifdef __KERNEL__
14
15#ifndef __ASSEMBLY__
16
17/*
18 * low level task data.
19 * If you change this, change the TI_* offsets below to match.
20 */
21struct thread_info {
22 struct task_struct *task; /* main task structure */
23 struct exec_domain *exec_domain; /* execution domain */
24 unsigned long flags; /* low level flags */
25 int cpu; /* cpu we're on */
26 int preempt_count; /* 0 => preemptable, <0 => BUG */
27 struct restart_block restart_block;
28};
29
30/*
31 * macros/functions for gaining access to the thread information structure
32 */
33#define INIT_THREAD_INFO(tsk) \
34{ \
35 .task = &tsk, \
36 .exec_domain = &default_exec_domain, \
37 .flags = 0, \
38 .cpu = 0, \
39 .preempt_count = 1, \
40 .restart_block = { \
41 .fn = do_no_restart_syscall, \
42 }, \
43}
44
45#define init_thread_info (init_thread_union.thread_info)
46#define init_stack (init_thread_union.stack)
47
48
49/*
50 * Size of kernel stack for each process. This must be a power of 2...
51 */
52#define THREAD_SIZE_ORDER 1
53#define THREAD_SIZE 8192 /* 2 pages */
54
55
56/* how to get the thread information struct from C */
57static inline struct thread_info *current_thread_info(void)
58{
59 struct thread_info *ti;
60 __asm__(
61 "mov.l sp, %0 \n\t"
62 "and.l %1, %0"
63 : "=&r"(ti)
64 : "i" (~(THREAD_SIZE-1))
65 );
66 return ti;
67}
68
69#endif /* __ASSEMBLY__ */
70
71/*
72 * Offsets in thread_info structure, used in assembly code
73 */
74#define TI_TASK 0
75#define TI_EXECDOMAIN 4
76#define TI_FLAGS 8
77#define TI_CPU 12
78#define TI_PRE_COUNT 16
79
80#define PREEMPT_ACTIVE 0x4000000
81
82/*
83 * thread information flag bit numbers
84 */
85#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
86#define TIF_SIGPENDING 1 /* signal pending */
87#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
88#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
89 TIF_NEED_RESCHED */
90#define TIF_MEMDIE 4
91#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
92
93/* as above, but as bit values */
94#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
95#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
96#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
97#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
98#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
99
100#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
101
102#endif /* __KERNEL__ */
103
104#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-h8300/timex.h b/include/asm-h8300/timex.h
deleted file mode 100644
index 23e67013439f..000000000000
--- a/include/asm-h8300/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-h8300/timex.h
3 *
4 * H8/300 architecture timex specifications
5 */
6#ifndef _ASM_H8300_TIMEX_H
7#define _ASM_H8300_TIMEX_H
8
9#define CLOCK_TICK_RATE (CONFIG_CPU_CLOCK*1000/8192) /* Timer input freq. */
10
11typedef unsigned long cycles_t;
12extern short h8300_timer_count;
13
14static inline cycles_t get_cycles(void)
15{
16 return 0;
17}
18
19#endif
diff --git a/include/asm-h8300/tlb.h b/include/asm-h8300/tlb.h
deleted file mode 100644
index 3dea80ad9e6f..000000000000
--- a/include/asm-h8300/tlb.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 include/asm-h8300/tlb.h
3*/
4
5#ifndef __H8300_TLB_H__
6#define __H8300_TLB_H__
7
8#define tlb_flush(tlb) do { } while(0)
9
10/*
11 include/asm-h8300/tlb.h
12*/
13
14#ifndef __H8300_TLB_H__
15#define __H8300_TLB_H__
16
17#define tlb_flush(tlb) do { } while(0)
18
19#include <asm-generic/tlb.h>
20
21#endif
22
23#endif
diff --git a/include/asm-h8300/tlbflush.h b/include/asm-h8300/tlbflush.h
deleted file mode 100644
index 41c148a9208e..000000000000
--- a/include/asm-h8300/tlbflush.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef _H8300_TLBFLUSH_H
2#define _H8300_TLBFLUSH_H
3
4/*
5 * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org>
6 * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com>
7 */
8
9#include <asm/setup.h>
10
11/*
12 * flush all user-space atc entries.
13 */
14static inline void __flush_tlb(void)
15{
16 BUG();
17}
18
19static inline void __flush_tlb_one(unsigned long addr)
20{
21 BUG();
22}
23
24#define flush_tlb() __flush_tlb()
25
26/*
27 * flush all atc entries (both kernel and user-space entries).
28 */
29static inline void flush_tlb_all(void)
30{
31 BUG();
32}
33
34static inline void flush_tlb_mm(struct mm_struct *mm)
35{
36 BUG();
37}
38
39static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
40{
41 BUG();
42}
43
44static inline void flush_tlb_range(struct mm_struct *mm,
45 unsigned long start, unsigned long end)
46{
47 BUG();
48}
49
50static inline void flush_tlb_kernel_page(unsigned long addr)
51{
52 BUG();
53}
54
55#endif /* _H8300_TLBFLUSH_H */
diff --git a/include/asm-h8300/topology.h b/include/asm-h8300/topology.h
deleted file mode 100644
index fdc121924d4c..000000000000
--- a/include/asm-h8300/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_H8300_TOPOLOGY_H
2#define _ASM_H8300_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_H8300_TOPOLOGY_H */
diff --git a/include/asm-h8300/traps.h b/include/asm-h8300/traps.h
deleted file mode 100644
index 41cf6be02f68..000000000000
--- a/include/asm-h8300/traps.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-h8300/traps.h
3 *
4 * Copyright (C) 2003 Yoshinori Sato <ysato@users.sourceforge.jp>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#ifndef _H8300_TRAPS_H
12#define _H8300_TRAPS_H
13
14extern void system_call(void);
15extern void interrupt_entry(void);
16extern void trace_break(void);
17
18#define JMP_OP 0x5a000000
19#define JSR_OP 0x5e000000
20#define VECTOR(address) ((JMP_OP)|((unsigned long)address))
21#define REDIRECT(address) ((JSR_OP)|((unsigned long)address))
22
23#define TRACE_VEC 5
24
25#define TRAP0_VEC 8
26#define TRAP1_VEC 9
27#define TRAP2_VEC 10
28#define TRAP3_VEC 11
29
30#if defined(__H8300H__)
31#define NR_TRAPS 12
32#endif
33#if defined(__H8300S__)
34#define NR_TRAPS 16
35#endif
36
37#endif /* _H8300_TRAPS_H */
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h
deleted file mode 100644
index 12875190b156..000000000000
--- a/include/asm-h8300/types.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef _H8300_TYPES_H
2#define _H8300_TYPES_H
3
4#include <asm-generic/int-ll64.h>
5
6#if !defined(__ASSEMBLY__)
7
8/*
9 * This file is never included by application software unless
10 * explicitly requested (e.g., via linux/types.h) in which case the
11 * application is Linux specific so (user-) name space pollution is
12 * not a major issue. However, for interoperability, libraries still
13 * need to be careful to avoid a name clashes.
14 */
15
16typedef unsigned short umode_t;
17
18/*
19 * These aren't exported outside the kernel to avoid name space clashes
20 */
21#ifdef __KERNEL__
22
23#define BITS_PER_LONG 32
24
25/* Dma addresses are 32-bits wide. */
26
27typedef u32 dma_addr_t;
28
29#endif /* __KERNEL__ */
30
31#endif /* __ASSEMBLY__ */
32
33#endif /* _H8300_TYPES_H */
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h
deleted file mode 100644
index 356068cd0879..000000000000
--- a/include/asm-h8300/uaccess.h
+++ /dev/null
@@ -1,162 +0,0 @@
1#ifndef __H8300_UACCESS_H
2#define __H8300_UACCESS_H
3
4/*
5 * User space memory access functions
6 */
7#include <linux/sched.h>
8#include <linux/mm.h>
9#include <linux/string.h>
10
11#include <asm/segment.h>
12
13#define VERIFY_READ 0
14#define VERIFY_WRITE 1
15
16/* We let the MMU do all checking */
17#define access_ok(type, addr, size) __access_ok((unsigned long)addr,size)
18static inline int __access_ok(unsigned long addr, unsigned long size)
19{
20#define RANGE_CHECK_OK(addr, size, lower, upper) \
21 (((addr) >= (lower)) && (((addr) + (size)) < (upper)))
22
23 extern unsigned long _ramend;
24 return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend));
25}
26
27/*
28 * The exception table consists of pairs of addresses: the first is the
29 * address of an instruction that is allowed to fault, and the second is
30 * the address at which the program should continue. No registers are
31 * modified, so it is entirely up to the continuation code to figure out
32 * what to do.
33 *
34 * All the routines below use bits of fixup code that are out of line
35 * with the main instruction path. This means when everything is well,
36 * we don't even have to jump over them. Further, they do not intrude
37 * on our cache or tlb entries.
38 */
39
40struct exception_table_entry
41{
42 unsigned long insn, fixup;
43};
44
45/* Returns 0 if exception not found and fixup otherwise. */
46extern unsigned long search_exception_table(unsigned long);
47
48
49/*
50 * These are the main single-value transfer routines. They automatically
51 * use the right size if we just have the right pointer type.
52 */
53
54#define put_user(x, ptr) \
55({ \
56 int __pu_err = 0; \
57 typeof(*(ptr)) __pu_val = (x); \
58 switch (sizeof (*(ptr))) { \
59 case 1: \
60 case 2: \
61 case 4: \
62 *(ptr) = (__pu_val); \
63 break; \
64 case 8: \
65 memcpy(ptr, &__pu_val, sizeof (*(ptr))); \
66 break; \
67 default: \
68 __pu_err = __put_user_bad(); \
69 break; \
70 } \
71 __pu_err; \
72})
73#define __put_user(x, ptr) put_user(x, ptr)
74
75extern int __put_user_bad(void);
76
77/*
78 * Tell gcc we read from memory instead of writing: this is because
79 * we do not write to any memory gcc knows about, so there are no
80 * aliasing issues.
81 */
82
83#define __ptr(x) ((unsigned long *)(x))
84
85/*
86 * Tell gcc we read from memory instead of writing: this is because
87 * we do not write to any memory gcc knows about, so there are no
88 * aliasing issues.
89 */
90
91#define get_user(x, ptr) \
92({ \
93 int __gu_err = 0; \
94 typeof(*(ptr)) __gu_val = *ptr; \
95 switch (sizeof(*(ptr))) { \
96 case 1: \
97 case 2: \
98 case 4: \
99 case 8: \
100 break; \
101 default: \
102 __gu_err = __get_user_bad(); \
103 __gu_val = 0; \
104 break; \
105 } \
106 (x) = __gu_val; \
107 __gu_err; \
108})
109#define __get_user(x, ptr) get_user(x, ptr)
110
111extern int __get_user_bad(void);
112
113#define copy_from_user(to, from, n) (memcpy(to, from, n), 0)
114#define copy_to_user(to, from, n) (memcpy(to, from, n), 0)
115
116#define __copy_from_user(to, from, n) copy_from_user(to, from, n)
117#define __copy_to_user(to, from, n) copy_to_user(to, from, n)
118#define __copy_to_user_inatomic __copy_to_user
119#define __copy_from_user_inatomic __copy_from_user
120
121#define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; })
122
123#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; })
124
125/*
126 * Copy a null terminated string from userspace.
127 */
128
129static inline long
130strncpy_from_user(char *dst, const char *src, long count)
131{
132 char *tmp;
133 strncpy(dst, src, count);
134 for (tmp = dst; *tmp && count > 0; tmp++, count--)
135 ;
136 return(tmp - dst); /* DAVIDM should we count a NUL ? check getname */
137}
138
139/*
140 * Return the size of a string (including the ending 0)
141 *
142 * Return 0 on exception, a value greater than N if too long
143 */
144static inline long strnlen_user(const char *src, long n)
145{
146 return(strlen(src) + 1); /* DAVIDM make safer */
147}
148
149#define strlen_user(str) strnlen_user(str, 32767)
150
151/*
152 * Zero Userspace
153 */
154
155static inline unsigned long
156clear_user(void *to, unsigned long n)
157{
158 memset(to, 0, n);
159 return 0;
160}
161
162#endif /* _H8300_UACCESS_H */
diff --git a/include/asm-h8300/ucontext.h b/include/asm-h8300/ucontext.h
deleted file mode 100644
index 0bcf8f85fab9..000000000000
--- a/include/asm-h8300/ucontext.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _H8300_UCONTEXT_H
2#define _H8300_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif
diff --git a/include/asm-h8300/unaligned.h b/include/asm-h8300/unaligned.h
deleted file mode 100644
index b8d06c70c2da..000000000000
--- a/include/asm-h8300/unaligned.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _ASM_H8300_UNALIGNED_H
2#define _ASM_H8300_UNALIGNED_H
3
4#include <linux/unaligned/be_memmove.h>
5#include <linux/unaligned/le_byteshift.h>
6#include <linux/unaligned/generic.h>
7
8#define get_unaligned __get_unaligned_be
9#define put_unaligned __put_unaligned_be
10
11#endif /* _ASM_H8300_UNALIGNED_H */
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
deleted file mode 100644
index 99f3c3561ecb..000000000000
--- a/include/asm-h8300/unistd.h
+++ /dev/null
@@ -1,364 +0,0 @@
1#ifndef _ASM_H8300_UNISTD_H_
2#define _ASM_H8300_UNISTD_H_
3
4/*
5 * This file contains the system call numbers.
6 */
7
8#define __NR_restart_syscall 0
9#define __NR_exit 1
10#define __NR_fork 2
11#define __NR_read 3
12#define __NR_write 4
13#define __NR_open 5
14#define __NR_close 6
15#define __NR_waitpid 7
16#define __NR_creat 8
17#define __NR_link 9
18#define __NR_unlink 10
19#define __NR_execve 11
20#define __NR_chdir 12
21#define __NR_time 13
22#define __NR_mknod 14
23#define __NR_chmod 15
24#define __NR_lchown 16
25#define __NR_break 17
26#define __NR_oldstat 18
27#define __NR_lseek 19
28#define __NR_getpid 20
29#define __NR_mount 21
30#define __NR_umount 22
31#define __NR_setuid 23
32#define __NR_getuid 24
33#define __NR_stime 25
34#define __NR_ptrace 26
35#define __NR_alarm 27
36#define __NR_oldfstat 28
37#define __NR_pause 29
38#define __NR_utime 30
39#define __NR_stty 31
40#define __NR_gtty 32
41#define __NR_access 33
42#define __NR_nice 34
43#define __NR_ftime 35
44#define __NR_sync 36
45#define __NR_kill 37
46#define __NR_rename 38
47#define __NR_mkdir 39
48#define __NR_rmdir 40
49#define __NR_dup 41
50#define __NR_pipe 42
51#define __NR_times 43
52#define __NR_prof 44
53#define __NR_brk 45
54#define __NR_setgid 46
55#define __NR_getgid 47
56#define __NR_signal 48
57#define __NR_geteuid 49
58#define __NR_getegid 50
59#define __NR_acct 51
60#define __NR_umount2 52
61#define __NR_lock 53
62#define __NR_ioctl 54
63#define __NR_fcntl 55
64#define __NR_mpx 56
65#define __NR_setpgid 57
66#define __NR_ulimit 58
67#define __NR_oldolduname 59
68#define __NR_umask 60
69#define __NR_chroot 61
70#define __NR_ustat 62
71#define __NR_dup2 63
72#define __NR_getppid 64
73#define __NR_getpgrp 65
74#define __NR_setsid 66
75#define __NR_sigaction 67
76#define __NR_sgetmask 68
77#define __NR_ssetmask 69
78#define __NR_setreuid 70
79#define __NR_setregid 71
80#define __NR_sigsuspend 72
81#define __NR_sigpending 73
82#define __NR_sethostname 74
83#define __NR_setrlimit 75
84#define __NR_getrlimit 76
85#define __NR_getrusage 77
86#define __NR_gettimeofday 78
87#define __NR_settimeofday 79
88#define __NR_getgroups 80
89#define __NR_setgroups 81
90#define __NR_select 82
91#define __NR_symlink 83
92#define __NR_oldlstat 84
93#define __NR_readlink 85
94#define __NR_uselib 86
95#define __NR_swapon 87
96#define __NR_reboot 88
97#define __NR_readdir 89
98#define __NR_mmap 90
99#define __NR_munmap 91
100#define __NR_truncate 92
101#define __NR_ftruncate 93
102#define __NR_fchmod 94
103#define __NR_fchown 95
104#define __NR_getpriority 96
105#define __NR_setpriority 97
106#define __NR_profil 98
107#define __NR_statfs 99
108#define __NR_fstatfs 100
109#define __NR_ioperm 101
110#define __NR_socketcall 102
111#define __NR_syslog 103
112#define __NR_setitimer 104
113#define __NR_getitimer 105
114#define __NR_stat 106
115#define __NR_lstat 107
116#define __NR_fstat 108
117#define __NR_olduname 109
118#define __NR_iopl 110
119#define __NR_vhangup 111
120#define __NR_idle 112
121#define __NR_vm86old 113
122#define __NR_wait4 114
123#define __NR_swapoff 115
124#define __NR_sysinfo 116
125#define __NR_ipc 117
126#define __NR_fsync 118
127#define __NR_sigreturn 119
128#define __NR_clone 120
129#define __NR_setdomainname 121
130#define __NR_uname 122
131#define __NR_modify_ldt 123
132#define __NR_adjtimex 124
133#define __NR_mprotect 125
134#define __NR_sigprocmask 126
135#define __NR_create_module 127
136#define __NR_init_module 128
137#define __NR_delete_module 129
138#define __NR_get_kernel_syms 130
139#define __NR_quotactl 131
140#define __NR_getpgid 132
141#define __NR_fchdir 133
142#define __NR_bdflush 134
143#define __NR_sysfs 135
144#define __NR_personality 136
145#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
146#define __NR_setfsuid 138
147#define __NR_setfsgid 139
148#define __NR__llseek 140
149#define __NR_getdents 141
150#define __NR__newselect 142
151#define __NR_flock 143
152#define __NR_msync 144
153#define __NR_readv 145
154#define __NR_writev 146
155#define __NR_getsid 147
156#define __NR_fdatasync 148
157#define __NR__sysctl 149
158#define __NR_mlock 150
159#define __NR_munlock 151
160#define __NR_mlockall 152
161#define __NR_munlockall 153
162#define __NR_sched_setparam 154
163#define __NR_sched_getparam 155
164#define __NR_sched_setscheduler 156
165#define __NR_sched_getscheduler 157
166#define __NR_sched_yield 158
167#define __NR_sched_get_priority_max 159
168#define __NR_sched_get_priority_min 160
169#define __NR_sched_rr_get_interval 161
170#define __NR_nanosleep 162
171#define __NR_mremap 163
172#define __NR_setresuid 164
173#define __NR_getresuid 165
174#define __NR_vm86 166
175#define __NR_query_module 167
176#define __NR_poll 168
177#define __NR_nfsservctl 169
178#define __NR_setresgid 170
179#define __NR_getresgid 171
180#define __NR_prctl 172
181#define __NR_rt_sigreturn 173
182#define __NR_rt_sigaction 174
183#define __NR_rt_sigprocmask 175
184#define __NR_rt_sigpending 176
185#define __NR_rt_sigtimedwait 177
186#define __NR_rt_sigqueueinfo 178
187#define __NR_rt_sigsuspend 179
188#define __NR_pread64 180
189#define __NR_pwrite64 181
190#define __NR_chown 182
191#define __NR_getcwd 183
192#define __NR_capget 184
193#define __NR_capset 185
194#define __NR_sigaltstack 186
195#define __NR_sendfile 187
196#define __NR_getpmsg 188 /* some people actually want streams */
197#define __NR_putpmsg 189 /* some people actually want streams */
198#define __NR_vfork 190
199#define __NR_ugetrlimit 191
200#define __NR_mmap2 192
201#define __NR_truncate64 193
202#define __NR_ftruncate64 194
203#define __NR_stat64 195
204#define __NR_lstat64 196
205#define __NR_fstat64 197
206#define __NR_lchown32 198
207#define __NR_getuid32 199
208#define __NR_getgid32 200
209#define __NR_geteuid32 201
210#define __NR_getegid32 202
211#define __NR_setreuid32 203
212#define __NR_setregid32 204
213#define __NR_getgroups32 205
214#define __NR_setgroups32 206
215#define __NR_fchown32 207
216#define __NR_setresuid32 208
217#define __NR_getresuid32 209
218#define __NR_setresgid32 210
219#define __NR_getresgid32 211
220#define __NR_chown32 212
221#define __NR_setuid32 213
222#define __NR_setgid32 214
223#define __NR_setfsuid32 215
224#define __NR_setfsgid32 216
225#define __NR_pivot_root 217
226#define __NR_mincore 218
227#define __NR_madvise 219
228#define __NR_madvise1 219
229#define __NR_getdents64 220
230#define __NR_fcntl64 221
231/* 223 is unused */
232#define __NR_gettid 224
233#define __NR_readahead 225
234#define __NR_setxattr 226
235#define __NR_lsetxattr 227
236#define __NR_fsetxattr 228
237#define __NR_getxattr 229
238#define __NR_lgetxattr 230
239#define __NR_fgetxattr 231
240#define __NR_listxattr 232
241#define __NR_llistxattr 233
242#define __NR_flistxattr 234
243#define __NR_removexattr 235
244#define __NR_lremovexattr 236
245#define __NR_fremovexattr 237
246#define __NR_tkill 238
247#define __NR_sendfile64 239
248#define __NR_futex 240
249#define __NR_sched_setaffinity 241
250#define __NR_sched_getaffinity 242
251#define __NR_set_thread_area 243
252#define __NR_get_thread_area 244
253#define __NR_io_setup 245
254#define __NR_io_destroy 246
255#define __NR_io_getevents 247
256#define __NR_io_submit 248
257#define __NR_io_cancel 249
258#define __NR_fadvise64 250
259/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */
260#define __NR_exit_group 252
261#define __NR_lookup_dcookie 253
262#define __NR_epoll_create 254
263#define __NR_epoll_ctl 255
264#define __NR_epoll_wait 256
265#define __NR_remap_file_pages 257
266#define __NR_set_tid_address 258
267#define __NR_timer_create 259
268#define __NR_timer_settime (__NR_timer_create+1)
269#define __NR_timer_gettime (__NR_timer_create+2)
270#define __NR_timer_getoverrun (__NR_timer_create+3)
271#define __NR_timer_delete (__NR_timer_create+4)
272#define __NR_clock_settime (__NR_timer_create+5)
273#define __NR_clock_gettime (__NR_timer_create+6)
274#define __NR_clock_getres (__NR_timer_create+7)
275#define __NR_clock_nanosleep (__NR_timer_create+8)
276#define __NR_statfs64 268
277#define __NR_fstatfs64 269
278#define __NR_tgkill 270
279#define __NR_utimes 271
280#define __NR_fadvise64_64 272
281#define __NR_vserver 273
282#define __NR_mbind 274
283#define __NR_get_mempolicy 275
284#define __NR_set_mempolicy 276
285#define __NR_mq_open 277
286#define __NR_mq_unlink (__NR_mq_open+1)
287#define __NR_mq_timedsend (__NR_mq_open+2)
288#define __NR_mq_timedreceive (__NR_mq_open+3)
289#define __NR_mq_notify (__NR_mq_open+4)
290#define __NR_mq_getsetattr (__NR_mq_open+5)
291#define __NR_kexec_load 283
292#define __NR_waitid 284
293/* #define __NR_sys_setaltroot 285 */
294#define __NR_add_key 286
295#define __NR_request_key 287
296#define __NR_keyctl 288
297#define __NR_ioprio_set 289
298#define __NR_ioprio_get 290
299#define __NR_inotify_init 291
300#define __NR_inotify_add_watch 292
301#define __NR_inotify_rm_watch 293
302#define __NR_migrate_pages 294
303#define __NR_openat 295
304#define __NR_mkdirat 296
305#define __NR_mknodat 297
306#define __NR_fchownat 298
307#define __NR_futimesat 299
308#define __NR_fstatat64 300
309#define __NR_unlinkat 301
310#define __NR_renameat 302
311#define __NR_linkat 303
312#define __NR_symlinkat 304
313#define __NR_readlinkat 305
314#define __NR_fchmodat 306
315#define __NR_faccessat 307
316#define __NR_pselect6 308
317#define __NR_ppoll 309
318#define __NR_unshare 310
319#define __NR_set_robust_list 311
320#define __NR_get_robust_list 312
321#define __NR_splice 313
322#define __NR_sync_file_range 314
323#define __NR_tee 315
324#define __NR_vmsplice 316
325#define __NR_move_pages 317
326#define __NR_getcpu 318
327#define __NR_epoll_pwait 319
328
329#ifdef __KERNEL__
330
331#define NR_syscalls 320
332
333#define __ARCH_WANT_IPC_PARSE_VERSION
334#define __ARCH_WANT_OLD_READDIR
335#define __ARCH_WANT_OLD_STAT
336#define __ARCH_WANT_STAT64
337#define __ARCH_WANT_SYS_ALARM
338#define __ARCH_WANT_SYS_GETHOSTNAME
339#define __ARCH_WANT_SYS_PAUSE
340#define __ARCH_WANT_SYS_SGETMASK
341#define __ARCH_WANT_SYS_SIGNAL
342#define __ARCH_WANT_SYS_TIME
343#define __ARCH_WANT_SYS_UTIME
344#define __ARCH_WANT_SYS_WAITPID
345#define __ARCH_WANT_SYS_SOCKETCALL
346#define __ARCH_WANT_SYS_FADVISE64
347#define __ARCH_WANT_SYS_GETPGRP
348#define __ARCH_WANT_SYS_LLSEEK
349#define __ARCH_WANT_SYS_NICE
350#define __ARCH_WANT_SYS_OLD_GETRLIMIT
351#define __ARCH_WANT_SYS_OLDUMOUNT
352#define __ARCH_WANT_SYS_SIGPENDING
353#define __ARCH_WANT_SYS_SIGPROCMASK
354#define __ARCH_WANT_SYS_RT_SIGACTION
355
356/*
357 * "Conditional" syscalls
358 */
359#define cond_syscall(name) \
360 asm (".weak\t_" #name "\n" \
361 ".set\t_" #name ",_sys_ni_syscall");
362
363#endif /* __KERNEL__ */
364#endif /* _ASM_H8300_UNISTD_H_ */
diff --git a/include/asm-h8300/user.h b/include/asm-h8300/user.h
deleted file mode 100644
index 14a9e18950f1..000000000000
--- a/include/asm-h8300/user.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef _H8300_USER_H
2#define _H8300_USER_H
3
4#include <asm/page.h>
5
6/* Core file format: The core file is written in such a way that gdb
7 can understand it and provide useful information to the user (under
8 linux we use the 'trad-core' bfd). There are quite a number of
9 obstacles to being able to view the contents of the floating point
10 registers, and until these are solved you will not be able to view the
11 contents of them. Actually, you can read in the core file and look at
12 the contents of the user struct to find out what the floating point
13 registers contain.
14 The actual file contents are as follows:
15 UPAGE: 1 page consisting of a user struct that tells gdb what is present
16 in the file. Directly after this is a copy of the task_struct, which
17 is currently not used by gdb, but it may come in useful at some point.
18 All of the registers are stored as part of the upage. The upage should
19 always be only one page.
20 DATA: The data area is stored. We use current->end_text to
21 current->brk to pick up all of the user variables, plus any memory
22 that may have been malloced. No attempt is made to determine if a page
23 is demand-zero or if a page is totally unused, we just cover the entire
24 range. All of the addresses are rounded in such a way that an integral
25 number of pages is written.
26 STACK: We need the stack information in order to get a meaningful
27 backtrace. We need to write the data from (esp) to
28 current->start_stack, so we round each of these off in order to be able
29 to write an integer number of pages.
30 The minimum core file size is 3 pages, or 12288 bytes.
31*/
32
33/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
34 is still the layout used by user (the new pt_regs doesn't have
35 all registers). */
36struct user_regs_struct {
37 long er1,er2,er3,er4,er5,er6;
38 long er0;
39 long usp;
40 long orig_er0;
41 short ccr;
42 long pc;
43};
44
45
46/* When the kernel dumps core, it starts by dumping the user struct -
47 this will be used by gdb to figure out where the data and stack segments
48 are within the file, and what virtual addresses to use. */
49struct user{
50/* We start with the registers, to mimic the way that "memory" is returned
51 from the ptrace(3,...) function. */
52 struct user_regs_struct regs; /* Where the registers are actually stored */
53/* ptrace does not yet supply these. Someday.... */
54/* The rest of this junk is to help gdb figure out what goes where */
55 unsigned long int u_tsize; /* Text segment size (pages). */
56 unsigned long int u_dsize; /* Data segment size (pages). */
57 unsigned long int u_ssize; /* Stack segment size (pages). */
58 unsigned long start_code; /* Starting virtual address of text. */
59 unsigned long start_stack; /* Starting virtual address of stack area.
60 This is actually the bottom of the stack,
61 the top of the stack is always found in the
62 esp register. */
63 long int signal; /* Signal that caused the core dump. */
64 int reserved; /* No longer used */
65 unsigned long u_ar0; /* Used by gdb to help find the values for */
66 /* the registers. */
67 unsigned long magic; /* To uniquely identify a core file */
68 char u_comm[32]; /* User command that was responsible */
69};
70#define NBPG PAGE_SIZE
71#define UPAGES 1
72#define HOST_TEXT_START_ADDR (u.start_code)
73#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
74
75#endif
diff --git a/include/asm-h8300/virtconvert.h b/include/asm-h8300/virtconvert.h
deleted file mode 100644
index 19cfd62b11c3..000000000000
--- a/include/asm-h8300/virtconvert.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef __H8300_VIRT_CONVERT__
2#define __H8300_VIRT_CONVERT__
3
4/*
5 * Macros used for converting between virtual and physical mappings.
6 */
7
8#ifdef __KERNEL__
9
10#include <asm/setup.h>
11#include <asm/page.h>
12
13#define phys_to_virt(vaddr) ((void *) (vaddr))
14#define virt_to_phys(vaddr) ((unsigned long) (vaddr))
15
16#define virt_to_bus virt_to_phys
17#define bus_to_virt phys_to_virt
18
19#endif
20#endif
diff --git a/include/asm-mips/kexec.h b/include/asm-mips/kexec.h
index cdbab43b7d3a..4314892aaebb 100644
--- a/include/asm-mips/kexec.h
+++ b/include/asm-mips/kexec.h
@@ -16,7 +16,7 @@
16 /* Maximum address we can use for the control code buffer */ 16 /* Maximum address we can use for the control code buffer */
17#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000) 17#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000)
18 18
19#define KEXEC_CONTROL_CODE_SIZE 4096 19#define KEXEC_CONTROL_PAGE_SIZE 4096
20 20
21/* The native architecture */ 21/* The native architecture */
22#define KEXEC_ARCH KEXEC_ARCH_MIPS 22#define KEXEC_ARCH KEXEC_ARCH_MIPS
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 4964c82f85f9..a73e1531e151 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -344,16 +344,22 @@
344#define __NR_timerfd_create (__NR_Linux + 321) 344#define __NR_timerfd_create (__NR_Linux + 321)
345#define __NR_timerfd_gettime (__NR_Linux + 322) 345#define __NR_timerfd_gettime (__NR_Linux + 322)
346#define __NR_timerfd_settime (__NR_Linux + 323) 346#define __NR_timerfd_settime (__NR_Linux + 323)
347#define __NR_signalfd4 (__NR_Linux + 324)
348#define __NR_eventfd2 (__NR_Linux + 325)
349#define __NR_epoll_create1 (__NR_Linux + 326)
350#define __NR_dup3 (__NR_Linux + 327)
351#define __NR_pipe2 (__NR_Linux + 328)
352#define __NR_inotify_init1 (__NR_Linux + 329)
347 353
348/* 354/*
349 * Offset of the last Linux o32 flavoured syscall 355 * Offset of the last Linux o32 flavoured syscall
350 */ 356 */
351#define __NR_Linux_syscalls 323 357#define __NR_Linux_syscalls 329
352 358
353#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 359#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
354 360
355#define __NR_O32_Linux 4000 361#define __NR_O32_Linux 4000
356#define __NR_O32_Linux_syscalls 323 362#define __NR_O32_Linux_syscalls 329
357 363
358#if _MIPS_SIM == _MIPS_SIM_ABI64 364#if _MIPS_SIM == _MIPS_SIM_ABI64
359 365
@@ -644,16 +650,22 @@
644#define __NR_timerfd_create (__NR_Linux + 280) 650#define __NR_timerfd_create (__NR_Linux + 280)
645#define __NR_timerfd_gettime (__NR_Linux + 281) 651#define __NR_timerfd_gettime (__NR_Linux + 281)
646#define __NR_timerfd_settime (__NR_Linux + 282) 652#define __NR_timerfd_settime (__NR_Linux + 282)
653#define __NR_signalfd4 (__NR_Linux + 283)
654#define __NR_eventfd2 (__NR_Linux + 284)
655#define __NR_epoll_create1 (__NR_Linux + 285)
656#define __NR_dup3 (__NR_Linux + 286)
657#define __NR_pipe2 (__NR_Linux + 287)
658#define __NR_inotify_init1 (__NR_Linux + 288)
647 659
648/* 660/*
649 * Offset of the last Linux 64-bit flavoured syscall 661 * Offset of the last Linux 64-bit flavoured syscall
650 */ 662 */
651#define __NR_Linux_syscalls 282 663#define __NR_Linux_syscalls 288
652 664
653#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 665#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
654 666
655#define __NR_64_Linux 5000 667#define __NR_64_Linux 5000
656#define __NR_64_Linux_syscalls 282 668#define __NR_64_Linux_syscalls 288
657 669
658#if _MIPS_SIM == _MIPS_SIM_NABI32 670#if _MIPS_SIM == _MIPS_SIM_NABI32
659 671
@@ -948,16 +960,22 @@
948#define __NR_timerfd_create (__NR_Linux + 284) 960#define __NR_timerfd_create (__NR_Linux + 284)
949#define __NR_timerfd_gettime (__NR_Linux + 285) 961#define __NR_timerfd_gettime (__NR_Linux + 285)
950#define __NR_timerfd_settime (__NR_Linux + 286) 962#define __NR_timerfd_settime (__NR_Linux + 286)
963#define __NR_signalfd4 (__NR_Linux + 287)
964#define __NR_eventfd2 (__NR_Linux + 288)
965#define __NR_epoll_create1 (__NR_Linux + 289)
966#define __NR_dup3 (__NR_Linux + 290)
967#define __NR_pipe2 (__NR_Linux + 291)
968#define __NR_inotify_init1 (__NR_Linux + 292)
951 969
952/* 970/*
953 * Offset of the last N32 flavoured syscall 971 * Offset of the last N32 flavoured syscall
954 */ 972 */
955#define __NR_Linux_syscalls 286 973#define __NR_Linux_syscalls 292
956 974
957#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 975#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
958 976
959#define __NR_N32_Linux 6000 977#define __NR_N32_Linux 6000
960#define __NR_N32_Linux_syscalls 286 978#define __NR_N32_Linux_syscalls 292
961 979
962#ifdef __KERNEL__ 980#ifdef __KERNEL__
963 981
diff --git a/include/asm-mn10300/io.h b/include/asm-mn10300/io.h
index b8b6dc878250..c1a4119e6497 100644
--- a/include/asm-mn10300/io.h
+++ b/include/asm-mn10300/io.h
@@ -259,6 +259,8 @@ static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
259 return (void *) (offset | 0x20000000); 259 return (void *) (offset | 0x20000000);
260} 260}
261 261
262#define ioremap_wc ioremap_nocache
263
262static inline void iounmap(void *addr) 264static inline void iounmap(void *addr)
263{ 265{
264} 266}
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h
index 22aa58ca1991..dcc812067394 100644
--- a/include/asm-x86/amd_iommu_types.h
+++ b/include/asm-x86/amd_iommu_types.h
@@ -31,9 +31,6 @@
31#define ALIAS_TABLE_ENTRY_SIZE 2 31#define ALIAS_TABLE_ENTRY_SIZE 2
32#define RLOOKUP_TABLE_ENTRY_SIZE (sizeof(void *)) 32#define RLOOKUP_TABLE_ENTRY_SIZE (sizeof(void *))
33 33
34/* helper macros */
35#define LOW_U32(x) ((x) & ((1ULL << 32)-1))
36
37/* Length of the MMIO region for the AMD IOMMU */ 34/* Length of the MMIO region for the AMD IOMMU */
38#define MMIO_REGION_LENGTH 0x4000 35#define MMIO_REGION_LENGTH 0x4000
39 36
@@ -69,6 +66,9 @@
69#define MMIO_EVT_TAIL_OFFSET 0x2018 66#define MMIO_EVT_TAIL_OFFSET 0x2018
70#define MMIO_STATUS_OFFSET 0x2020 67#define MMIO_STATUS_OFFSET 0x2020
71 68
69/* MMIO status bits */
70#define MMIO_STATUS_COM_WAIT_INT_MASK 0x04
71
72/* feature control bits */ 72/* feature control bits */
73#define CONTROL_IOMMU_EN 0x00ULL 73#define CONTROL_IOMMU_EN 0x00ULL
74#define CONTROL_HT_TUN_EN 0x01ULL 74#define CONTROL_HT_TUN_EN 0x01ULL
@@ -89,6 +89,7 @@
89#define CMD_INV_IOMMU_PAGES 0x03 89#define CMD_INV_IOMMU_PAGES 0x03
90 90
91#define CMD_COMPL_WAIT_STORE_MASK 0x01 91#define CMD_COMPL_WAIT_STORE_MASK 0x01
92#define CMD_COMPL_WAIT_INT_MASK 0x02
92#define CMD_INV_IOMMU_PAGES_SIZE_MASK 0x01 93#define CMD_INV_IOMMU_PAGES_SIZE_MASK 0x01
93#define CMD_INV_IOMMU_PAGES_PDE_MASK 0x02 94#define CMD_INV_IOMMU_PAGES_PDE_MASK 0x02
94 95
@@ -99,6 +100,7 @@
99#define DEV_ENTRY_TRANSLATION 0x01 100#define DEV_ENTRY_TRANSLATION 0x01
100#define DEV_ENTRY_IR 0x3d 101#define DEV_ENTRY_IR 0x3d
101#define DEV_ENTRY_IW 0x3e 102#define DEV_ENTRY_IW 0x3e
103#define DEV_ENTRY_NO_PAGE_FAULT 0x62
102#define DEV_ENTRY_EX 0x67 104#define DEV_ENTRY_EX 0x67
103#define DEV_ENTRY_SYSMGT1 0x68 105#define DEV_ENTRY_SYSMGT1 0x68
104#define DEV_ENTRY_SYSMGT2 0x69 106#define DEV_ENTRY_SYSMGT2 0x69
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h
index a0095191c02e..91c7d03e65bc 100644
--- a/include/asm-x86/atomic_64.h
+++ b/include/asm-x86/atomic_64.h
@@ -228,7 +228,7 @@ static inline void atomic64_add(long i, atomic64_t *v)
228{ 228{
229 asm volatile(LOCK_PREFIX "addq %1,%0" 229 asm volatile(LOCK_PREFIX "addq %1,%0"
230 : "=m" (v->counter) 230 : "=m" (v->counter)
231 : "ir" (i), "m" (v->counter)); 231 : "er" (i), "m" (v->counter));
232} 232}
233 233
234/** 234/**
@@ -242,7 +242,7 @@ static inline void atomic64_sub(long i, atomic64_t *v)
242{ 242{
243 asm volatile(LOCK_PREFIX "subq %1,%0" 243 asm volatile(LOCK_PREFIX "subq %1,%0"
244 : "=m" (v->counter) 244 : "=m" (v->counter)
245 : "ir" (i), "m" (v->counter)); 245 : "er" (i), "m" (v->counter));
246} 246}
247 247
248/** 248/**
@@ -260,7 +260,7 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v)
260 260
261 asm volatile(LOCK_PREFIX "subq %2,%0; sete %1" 261 asm volatile(LOCK_PREFIX "subq %2,%0; sete %1"
262 : "=m" (v->counter), "=qm" (c) 262 : "=m" (v->counter), "=qm" (c)
263 : "ir" (i), "m" (v->counter) : "memory"); 263 : "er" (i), "m" (v->counter) : "memory");
264 return c; 264 return c;
265} 265}
266 266
@@ -341,7 +341,7 @@ static inline int atomic64_add_negative(long i, atomic64_t *v)
341 341
342 asm volatile(LOCK_PREFIX "addq %2,%0; sets %1" 342 asm volatile(LOCK_PREFIX "addq %2,%0; sets %1"
343 : "=m" (v->counter), "=qm" (c) 343 : "=m" (v->counter), "=qm" (c)
344 : "ir" (i), "m" (v->counter) : "memory"); 344 : "er" (i), "m" (v->counter) : "memory");
345 return c; 345 return c;
346} 346}
347 347
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
index 2f5a792b0acc..762f6a6bc707 100644
--- a/include/asm-x86/cpufeature.h
+++ b/include/asm-x86/cpufeature.h
@@ -91,6 +91,7 @@
91#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ 91#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */
92#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ 92#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */
93#define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */ 93#define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */
94#define X86_FEATURE_XMM4_2 (4*32+20) /* Streaming SIMD Extensions-4.2 */
94 95
95/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ 96/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
96#define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */ 97#define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */
@@ -189,6 +190,7 @@ extern const char * const x86_power_flags[32];
189#define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) 190#define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES)
190#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) 191#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
191#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) 192#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT)
193#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2)
192 194
193#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) 195#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
194# define cpu_has_invlpg 1 196# define cpu_has_invlpg 1
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h
index 7ed2bd7a7f51..d4f2b0abe929 100644
--- a/include/asm-x86/efi.h
+++ b/include/asm-x86/efi.h
@@ -86,7 +86,7 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
86 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 86 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
87 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) 87 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
88 88
89extern void *efi_ioremap(unsigned long addr, unsigned long size); 89extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size);
90 90
91#endif /* CONFIG_X86_32 */ 91#endif /* CONFIG_X86_32 */
92 92
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h
index b02ea6e17de8..754d635f90ff 100644
--- a/include/asm-x86/genapic_32.h
+++ b/include/asm-x86/genapic_32.h
@@ -118,6 +118,7 @@ enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
118#define get_uv_system_type() UV_NONE 118#define get_uv_system_type() UV_NONE
119#define is_uv_system() 0 119#define is_uv_system() 0
120#define uv_wakeup_secondary(a, b) 1 120#define uv_wakeup_secondary(a, b) 1
121#define uv_system_init() do {} while (0)
121 122
122 123
123#endif 124#endif
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
index 0f8504627c41..a47d63129135 100644
--- a/include/asm-x86/genapic_64.h
+++ b/include/asm-x86/genapic_64.h
@@ -42,6 +42,7 @@ extern int is_uv_system(void);
42extern struct genapic apic_x2apic_uv_x; 42extern struct genapic apic_x2apic_uv_x;
43DECLARE_PER_CPU(int, x2apic_extra_bits); 43DECLARE_PER_CPU(int, x2apic_extra_bits);
44extern void uv_cpu_init(void); 44extern void uv_cpu_init(void);
45extern void uv_system_init(void);
45extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); 46extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
46 47
47extern void setup_apic_routing(void); 48extern void setup_apic_routing(void);
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
index bb06027fc83e..2c1cda0b8a86 100644
--- a/include/asm-x86/geode.h
+++ b/include/asm-x86/geode.h
@@ -50,6 +50,7 @@ extern int geode_get_dev_base(unsigned int dev);
50#define MSR_PIC_YSEL_HIGH 0x51400021 50#define MSR_PIC_YSEL_HIGH 0x51400021
51#define MSR_PIC_ZSEL_LOW 0x51400022 51#define MSR_PIC_ZSEL_LOW 0x51400022
52#define MSR_PIC_ZSEL_HIGH 0x51400023 52#define MSR_PIC_ZSEL_HIGH 0x51400023
53#define MSR_PIC_IRQM_LPC 0x51400025
53 54
54#define MSR_MFGPT_IRQ 0x51400028 55#define MSR_MFGPT_IRQ 0x51400028
55#define MSR_MFGPT_NR 0x51400029 56#define MSR_MFGPT_NR 0x51400029
@@ -237,7 +238,7 @@ static inline u16 geode_mfgpt_read(int timer, u16 reg)
237} 238}
238 239
239extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); 240extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable);
240extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable); 241extern int geode_mfgpt_set_irq(int timer, int cmp, int *irq, int enable);
241extern int geode_mfgpt_alloc_timer(int timer, int domain); 242extern int geode_mfgpt_alloc_timer(int timer, int domain);
242 243
243#define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) 244#define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1)
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h
index 77ba51df5668..edd0b95f14d0 100644
--- a/include/asm-x86/hw_irq.h
+++ b/include/asm-x86/hw_irq.h
@@ -98,9 +98,17 @@ extern void (*const interrupt[NR_IRQS])(void);
98#else 98#else
99typedef int vector_irq_t[NR_VECTORS]; 99typedef int vector_irq_t[NR_VECTORS];
100DECLARE_PER_CPU(vector_irq_t, vector_irq); 100DECLARE_PER_CPU(vector_irq_t, vector_irq);
101extern spinlock_t vector_lock;
102#endif 101#endif
103extern void setup_vector_irq(int cpu); 102
103#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64)
104extern void lock_vector_lock(void);
105extern void unlock_vector_lock(void);
106extern void __setup_vector_irq(int cpu);
107#else
108static inline void lock_vector_lock(void) {}
109static inline void unlock_vector_lock(void) {}
110static inline void __setup_vector_irq(int cpu) {}
111#endif
104 112
105#endif /* !ASSEMBLY_ */ 113#endif /* !ASSEMBLY_ */
106 114
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
index 96fa8449ff11..56d00e31aec0 100644
--- a/include/asm-x86/i387.h
+++ b/include/asm-x86/i387.h
@@ -13,6 +13,7 @@
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/regset.h> 15#include <linux/regset.h>
16#include <linux/hardirq.h>
16#include <asm/asm.h> 17#include <asm/asm.h>
17#include <asm/processor.h> 18#include <asm/processor.h>
18#include <asm/sigcontext.h> 19#include <asm/sigcontext.h>
@@ -62,8 +63,6 @@ static inline int restore_fpu_checking(struct i387_fxsave_struct *fx)
62#else 63#else
63 : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0)); 64 : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0));
64#endif 65#endif
65 if (unlikely(err))
66 init_fpu(current);
67 return err; 66 return err;
68} 67}
69 68
@@ -236,6 +235,37 @@ static inline void kernel_fpu_end(void)
236 preempt_enable(); 235 preempt_enable();
237} 236}
238 237
238/*
239 * Some instructions like VIA's padlock instructions generate a spurious
240 * DNA fault but don't modify SSE registers. And these instructions
241 * get used from interrupt context aswell. To prevent these kernel instructions
242 * in interrupt context interact wrongly with other user/kernel fpu usage, we
243 * should use them only in the context of irq_ts_save/restore()
244 */
245static inline int irq_ts_save(void)
246{
247 /*
248 * If we are in process context, we are ok to take a spurious DNA fault.
249 * Otherwise, doing clts() in process context require pre-emption to
250 * be disabled or some heavy lifting like kernel_fpu_begin()
251 */
252 if (!in_interrupt())
253 return 0;
254
255 if (read_cr0() & X86_CR0_TS) {
256 clts();
257 return 1;
258 }
259
260 return 0;
261}
262
263static inline void irq_ts_restore(int TS_state)
264{
265 if (TS_state)
266 stts();
267}
268
239#ifdef CONFIG_X86_64 269#ifdef CONFIG_X86_64
240 270
241static inline void save_init_fpu(struct task_struct *tsk) 271static inline void save_init_fpu(struct task_struct *tsk)
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h
index bf5d629b3a39..0f954dc89cb3 100644
--- a/include/asm-x86/io.h
+++ b/include/asm-x86/io.h
@@ -21,7 +21,7 @@ extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
21 21
22#define build_mmio_read(name, size, type, reg, barrier) \ 22#define build_mmio_read(name, size, type, reg, barrier) \
23static inline type name(const volatile void __iomem *addr) \ 23static inline type name(const volatile void __iomem *addr) \
24{ type ret; asm volatile("mov" size " %1,%0":"=" reg (ret) \ 24{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \
25:"m" (*(volatile type __force *)addr) barrier); return ret; } 25:"m" (*(volatile type __force *)addr) barrier); return ret; }
26 26
27#define build_mmio_write(name, size, type, reg, barrier) \ 27#define build_mmio_write(name, size, type, reg, barrier) \
@@ -29,13 +29,13 @@ static inline void name(type val, volatile void __iomem *addr) \
29{ asm volatile("mov" size " %0,%1": :reg (val), \ 29{ asm volatile("mov" size " %0,%1": :reg (val), \
30"m" (*(volatile type __force *)addr) barrier); } 30"m" (*(volatile type __force *)addr) barrier); }
31 31
32build_mmio_read(readb, "b", unsigned char, "q", :"memory") 32build_mmio_read(readb, "b", unsigned char, "=q", :"memory")
33build_mmio_read(readw, "w", unsigned short, "r", :"memory") 33build_mmio_read(readw, "w", unsigned short, "=r", :"memory")
34build_mmio_read(readl, "l", unsigned int, "r", :"memory") 34build_mmio_read(readl, "l", unsigned int, "=r", :"memory")
35 35
36build_mmio_read(__readb, "b", unsigned char, "q", ) 36build_mmio_read(__readb, "b", unsigned char, "=q", )
37build_mmio_read(__readw, "w", unsigned short, "r", ) 37build_mmio_read(__readw, "w", unsigned short, "=r", )
38build_mmio_read(__readl, "l", unsigned int, "r", ) 38build_mmio_read(__readl, "l", unsigned int, "=r", )
39 39
40build_mmio_write(writeb, "b", unsigned char, "q", :"memory") 40build_mmio_write(writeb, "b", unsigned char, "q", :"memory")
41build_mmio_write(writew, "w", unsigned short, "r", :"memory") 41build_mmio_write(writew, "w", unsigned short, "r", :"memory")
@@ -59,8 +59,8 @@ build_mmio_write(__writel, "l", unsigned int, "r", )
59#define mmiowb() barrier() 59#define mmiowb() barrier()
60 60
61#ifdef CONFIG_X86_64 61#ifdef CONFIG_X86_64
62build_mmio_read(readq, "q", unsigned long, "r", :"memory") 62build_mmio_read(readq, "q", unsigned long, "=r", :"memory")
63build_mmio_read(__readq, "q", unsigned long, "r", ) 63build_mmio_read(__readq, "q", unsigned long, "=r", )
64build_mmio_write(writeq, "q", unsigned long, "r", :"memory") 64build_mmio_write(writeq, "q", unsigned long, "r", :"memory")
65build_mmio_write(__writeq, "q", unsigned long, "r", ) 65build_mmio_write(__writeq, "q", unsigned long, "r", )
66 66
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h
index 90b1d1f12f08..a48c7f2dbdc0 100644
--- a/include/asm-x86/irq_vectors.h
+++ b/include/asm-x86/irq_vectors.h
@@ -76,6 +76,7 @@
76#define CALL_FUNCTION_SINGLE_VECTOR 0xfb 76#define CALL_FUNCTION_SINGLE_VECTOR 0xfb
77#define THERMAL_APIC_VECTOR 0xfa 77#define THERMAL_APIC_VECTOR 0xfa
78#define THRESHOLD_APIC_VECTOR 0xf9 78#define THRESHOLD_APIC_VECTOR 0xf9
79#define UV_BAU_MESSAGE 0xf8
79#define INVALIDATE_TLB_VECTOR_END 0xf7 80#define INVALIDATE_TLB_VECTOR_END 0xf7
80#define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */ 81#define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */
81 82
@@ -109,7 +110,15 @@
109#define LAST_VM86_IRQ 15 110#define LAST_VM86_IRQ 15
110#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) 111#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
111 112
112#if !defined(CONFIG_X86_VOYAGER) 113#ifdef CONFIG_X86_64
114# if NR_CPUS < MAX_IO_APICS
115# define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
116# else
117# define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
118# endif
119# define NR_IRQ_VECTORS NR_IRQS
120
121#elif !defined(CONFIG_X86_VOYAGER)
113 122
114# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) 123# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
115 124
diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h
index c0e52a14fd4d..4246ab7dc988 100644
--- a/include/asm-x86/kexec.h
+++ b/include/asm-x86/kexec.h
@@ -41,6 +41,10 @@
41# define PAGES_NR 17 41# define PAGES_NR 17
42#endif 42#endif
43 43
44#ifdef CONFIG_X86_32
45# define KEXEC_CONTROL_CODE_MAX_SIZE 2048
46#endif
47
44#ifndef __ASSEMBLY__ 48#ifndef __ASSEMBLY__
45 49
46#include <linux/string.h> 50#include <linux/string.h>
@@ -63,7 +67,7 @@
63/* Maximum address we can use for the control code buffer */ 67/* Maximum address we can use for the control code buffer */
64# define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE 68# define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
65 69
66# define KEXEC_CONTROL_CODE_SIZE 4096 70# define KEXEC_CONTROL_PAGE_SIZE 4096
67 71
68/* The native architecture */ 72/* The native architecture */
69# define KEXEC_ARCH KEXEC_ARCH_386 73# define KEXEC_ARCH KEXEC_ARCH_386
@@ -79,7 +83,7 @@
79# define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL) 83# define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL)
80 84
81/* Allocate one page for the pdp and the second for the code */ 85/* Allocate one page for the pdp and the second for the code */
82# define KEXEC_CONTROL_CODE_SIZE (4096UL + 4096UL) 86# define KEXEC_CONTROL_PAGE_SIZE (4096UL + 4096UL)
83 87
84/* The native architecture */ 88/* The native architecture */
85# define KEXEC_ARCH KEXEC_ARCH_X86_64 89# define KEXEC_ARCH KEXEC_ARCH_X86_64
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 0f3c53114614..c2e34c275900 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -722,7 +722,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void);
722 722
723#define __kvm_handle_fault_on_reboot(insn) \ 723#define __kvm_handle_fault_on_reboot(insn) \
724 "666: " insn "\n\t" \ 724 "666: " insn "\n\t" \
725 ".pushsection .text.fixup, \"ax\" \n" \ 725 ".pushsection .fixup, \"ax\" \n" \
726 "667: \n\t" \ 726 "667: \n\t" \
727 KVM_EX_PUSH " $666b \n\t" \ 727 KVM_EX_PUSH " $666b \n\t" \
728 "jmp kvm_handle_fault_on_reboot \n\t" \ 728 "jmp kvm_handle_fault_on_reboot \n\t" \
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h
index 94f1fd79e22a..531eaa587455 100644
--- a/include/asm-x86/mce.h
+++ b/include/asm-x86/mce.h
@@ -92,6 +92,7 @@ extern int mce_disabled;
92 92
93void mce_log(struct mce *m); 93void mce_log(struct mce *m);
94DECLARE_PER_CPU(struct sys_device, device_mce); 94DECLARE_PER_CPU(struct sys_device, device_mce);
95extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
95 96
96#ifdef CONFIG_X86_MCE_INTEL 97#ifdef CONFIG_X86_MCE_INTEL
97void mce_intel_feature_init(struct cpuinfo_x86 *c); 98void mce_intel_feature_init(struct cpuinfo_x86 *c);
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h
index c1682b542daf..90bc4108a4fd 100644
--- a/include/asm-x86/mman.h
+++ b/include/asm-x86/mman.h
@@ -12,6 +12,7 @@
12#define MAP_NORESERVE 0x4000 /* don't check for reservations */ 12#define MAP_NORESERVE 0x4000 /* don't check for reservations */
13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
14#define MAP_NONBLOCK 0x10000 /* do not block on IO */ 14#define MAP_NONBLOCK 0x10000 /* do not block on IO */
15#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
15 16
16#define MCL_CURRENT 1 /* lock all current mappings */ 17#define MCL_CURRENT 1 /* lock all current mappings */
17#define MCL_FUTURE 2 /* lock all future mappings */ 18#define MCL_FUTURE 2 /* lock all future mappings */
diff --git a/include/asm-x86/mmconfig.h b/include/asm-x86/mmconfig.h
index 95beda07c6fa..e293ab81e850 100644
--- a/include/asm-x86/mmconfig.h
+++ b/include/asm-x86/mmconfig.h
@@ -3,7 +3,7 @@
3 3
4#ifdef CONFIG_PCI_MMCONFIG 4#ifdef CONFIG_PCI_MMCONFIG
5extern void __cpuinit fam10h_check_enable_mmcfg(void); 5extern void __cpuinit fam10h_check_enable_mmcfg(void);
6extern void __init check_enable_amd_mmconf_dmi(void); 6extern void __cpuinit check_enable_amd_mmconf_dmi(void);
7#else 7#else
8static inline void fam10h_check_enable_mmcfg(void) { } 8static inline void fam10h_check_enable_mmcfg(void) { }
9static inline void check_enable_amd_mmconf_dmi(void) { } 9static inline void check_enable_amd_mmconf_dmi(void) { }
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h
index b2298a227567..5862e6460658 100644
--- a/include/asm-x86/mmzone_32.h
+++ b/include/asm-x86/mmzone_32.h
@@ -97,10 +97,16 @@ static inline int pfn_valid(int pfn)
97 reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags)) 97 reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags))
98#define alloc_bootmem(x) \ 98#define alloc_bootmem(x) \
99 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 99 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_nopanic(x) \
101 __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), SMP_CACHE_BYTES, \
102 __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_low(x) \ 103#define alloc_bootmem_low(x) \
101 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) 104 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0)
102#define alloc_bootmem_pages(x) \ 105#define alloc_bootmem_pages(x) \
103 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 106 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
107#define alloc_bootmem_pages_nopanic(x) \
108 __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), PAGE_SIZE, \
109 __pa(MAX_DMA_ADDRESS))
104#define alloc_bootmem_low_pages(x) \ 110#define alloc_bootmem_low_pages(x) \
105 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) 111 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0)
106#define alloc_bootmem_node(pgdat, x) \ 112#define alloc_bootmem_node(pgdat, x) \
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index ca110ee73f07..2362cfda1fbc 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -52,14 +52,14 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr,
52{ 52{
53 DECLARE_ARGS(val, low, high); 53 DECLARE_ARGS(val, low, high);
54 54
55 asm volatile("2: rdmsr ; xor %0,%0\n" 55 asm volatile("2: rdmsr ; xor %[err],%[err]\n"
56 "1:\n\t" 56 "1:\n\t"
57 ".section .fixup,\"ax\"\n\t" 57 ".section .fixup,\"ax\"\n\t"
58 "3: mov %3,%0 ; jmp 1b\n\t" 58 "3: mov %[fault],%[err] ; jmp 1b\n\t"
59 ".previous\n\t" 59 ".previous\n\t"
60 _ASM_EXTABLE(2b, 3b) 60 _ASM_EXTABLE(2b, 3b)
61 : "=r" (*err), EAX_EDX_RET(val, low, high) 61 : [err] "=r" (*err), EAX_EDX_RET(val, low, high)
62 : "c" (msr), "i" (-EFAULT)); 62 : "c" (msr), [fault] "i" (-EFAULT));
63 return EAX_EDX_VAL(val, low, high); 63 return EAX_EDX_VAL(val, low, high);
64} 64}
65 65
@@ -73,15 +73,15 @@ static inline int native_write_msr_safe(unsigned int msr,
73 unsigned low, unsigned high) 73 unsigned low, unsigned high)
74{ 74{
75 int err; 75 int err;
76 asm volatile("2: wrmsr ; xor %0,%0\n" 76 asm volatile("2: wrmsr ; xor %[err],%[err]\n"
77 "1:\n\t" 77 "1:\n\t"
78 ".section .fixup,\"ax\"\n\t" 78 ".section .fixup,\"ax\"\n\t"
79 "3: mov %4,%0 ; jmp 1b\n\t" 79 "3: mov %[fault],%[err] ; jmp 1b\n\t"
80 ".previous\n\t" 80 ".previous\n\t"
81 _ASM_EXTABLE(2b, 3b) 81 _ASM_EXTABLE(2b, 3b)
82 : "=a" (err) 82 : [err] "=a" (err)
83 : "c" (msr), "0" (low), "d" (high), 83 : "c" (msr), "0" (low), "d" (high),
84 "i" (-EFAULT) 84 [fault] "i" (-EFAULT)
85 : "memory"); 85 : "memory");
86 return err; 86 return err;
87} 87}
@@ -192,19 +192,20 @@ do { \
192#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0) 192#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0)
193 193
194#ifdef CONFIG_SMP 194#ifdef CONFIG_SMP
195void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); 195int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
196void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); 196int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
197int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); 197int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
198
199int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); 198int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
200#else /* CONFIG_SMP */ 199#else /* CONFIG_SMP */
201static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) 200static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
202{ 201{
203 rdmsr(msr_no, *l, *h); 202 rdmsr(msr_no, *l, *h);
203 return 0;
204} 204}
205static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) 205static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
206{ 206{
207 wrmsr(msr_no, l, h); 207 wrmsr(msr_no, l, h);
208 return 0;
208} 209}
209static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, 210static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no,
210 u32 *l, u32 *h) 211 u32 *l, u32 *h)
diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h
index 4e91ee1e37aa..f643a3a92da0 100644
--- a/include/asm-x86/percpu.h
+++ b/include/asm-x86/percpu.h
@@ -182,7 +182,7 @@ do { \
182 DEFINE_PER_CPU(_type, _name) = _initvalue; \ 182 DEFINE_PER_CPU(_type, _name) = _initvalue; \
183 __typeof__(_type) _name##_early_map[NR_CPUS] __initdata = \ 183 __typeof__(_type) _name##_early_map[NR_CPUS] __initdata = \
184 { [0 ... NR_CPUS-1] = _initvalue }; \ 184 { [0 ... NR_CPUS-1] = _initvalue }; \
185 __typeof__(_type) *_name##_early_ptr = _name##_early_map 185 __typeof__(_type) *_name##_early_ptr __refdata = _name##_early_map
186 186
187#define EXPORT_EARLY_PER_CPU_SYMBOL(_name) \ 187#define EXPORT_EARLY_PER_CPU_SYMBOL(_name) \
188 EXPORT_PER_CPU_SYMBOL(_name) 188 EXPORT_PER_CPU_SYMBOL(_name)
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index ac5fff4cc58a..549144d03d99 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -151,7 +151,7 @@ static inline void native_pgd_clear(pgd_t *pgd)
151#define VMALLOC_END _AC(0xffffe1ffffffffff, UL) 151#define VMALLOC_END _AC(0xffffe1ffffffffff, UL)
152#define VMEMMAP_START _AC(0xffffe20000000000, UL) 152#define VMEMMAP_START _AC(0xffffe20000000000, UL)
153#define MODULES_VADDR _AC(0xffffffffa0000000, UL) 153#define MODULES_VADDR _AC(0xffffffffa0000000, UL)
154#define MODULES_END _AC(0xfffffffffff00000, UL) 154#define MODULES_END _AC(0xffffffffff000000, UL)
155#define MODULES_LEN (MODULES_END - MODULES_VADDR) 155#define MODULES_LEN (MODULES_END - MODULES_VADDR)
156 156
157#ifndef __ASSEMBLY__ 157#ifndef __ASSEMBLY__
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 5f58da401b43..4df3e2f6fb56 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -728,6 +728,29 @@ extern unsigned long boot_option_idle_override;
728extern unsigned long idle_halt; 728extern unsigned long idle_halt;
729extern unsigned long idle_nomwait; 729extern unsigned long idle_nomwait;
730 730
731/*
732 * on systems with caches, caches must be flashed as the absolute
733 * last instruction before going into a suspended halt. Otherwise,
734 * dirty data can linger in the cache and become stale on resume,
735 * leading to strange errors.
736 *
737 * perform a variety of operations to guarantee that the compiler
738 * will not reorder instructions. wbinvd itself is serializing
739 * so the processor will not reorder.
740 *
741 * Systems without cache can just go into halt.
742 */
743static inline void wbinvd_halt(void)
744{
745 mb();
746 /* check for clflush to determine if wbinvd is legal */
747 if (cpu_has_clflush)
748 asm volatile("cli; wbinvd; 1: hlt; jmp 1b" : : : "memory");
749 else
750 while (1)
751 halt();
752}
753
731extern void enable_sep_cpu(void); 754extern void enable_sep_cpu(void);
732extern int sysenter_setup(void); 755extern int sysenter_setup(void);
733 756
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h
index 4f9a9861799a..e39c790dbfd2 100644
--- a/include/asm-x86/spinlock.h
+++ b/include/asm-x86/spinlock.h
@@ -65,7 +65,7 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock)
65{ 65{
66 int tmp = ACCESS_ONCE(lock->slock); 66 int tmp = ACCESS_ONCE(lock->slock);
67 67
68 return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1; 68 return (((tmp >> 8) - tmp) & 0xff) > 1;
69} 69}
70 70
71static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) 71static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
@@ -127,7 +127,7 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock)
127{ 127{
128 int tmp = ACCESS_ONCE(lock->slock); 128 int tmp = ACCESS_ONCE(lock->slock);
129 129
130 return (((tmp >> 16) & 0xffff) - (tmp & 0xffff)) > 1; 130 return (((tmp >> 16) - tmp) & 0xffff) > 1;
131} 131}
132 132
133static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) 133static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
diff --git a/include/asm-x86/uv/uv_bau.h b/include/asm-x86/uv/uv_bau.h
index 91ac0dfb7588..610b6b308e93 100644
--- a/include/asm-x86/uv/uv_bau.h
+++ b/include/asm-x86/uv/uv_bau.h
@@ -40,11 +40,6 @@
40#define UV_ACTIVATION_DESCRIPTOR_SIZE 32 40#define UV_ACTIVATION_DESCRIPTOR_SIZE 32
41#define UV_DISTRIBUTION_SIZE 256 41#define UV_DISTRIBUTION_SIZE 256
42#define UV_SW_ACK_NPENDING 8 42#define UV_SW_ACK_NPENDING 8
43#define UV_BAU_MESSAGE 200
44/*
45 * Messaging irq; see irq_64.h and include/asm-x86/hw_irq_64.h
46 * To be dynamically allocated in the future
47 */
48#define UV_NET_ENDPOINT_INTD 0x38 43#define UV_NET_ENDPOINT_INTD 0x38
49#define UV_DESC_BASE_PNODE_SHIFT 49 44#define UV_DESC_BASE_PNODE_SHIFT 49
50#define UV_PAYLOADQ_PNODE_SHIFT 49 45#define UV_PAYLOADQ_PNODE_SHIFT 49
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h
index 8e15dd28c91f..04ee0610014a 100644
--- a/include/asm-x86/xen/hypervisor.h
+++ b/include/asm-x86/xen/hypervisor.h
@@ -35,7 +35,6 @@
35 35
36#include <linux/types.h> 36#include <linux/types.h>
37#include <linux/kernel.h> 37#include <linux/kernel.h>
38#include <linux/version.h>
39 38
40#include <xen/interface/xen.h> 39#include <xen/interface/xen.h>
41#include <xen/interface/version.h> 40#include <xen/interface/version.h>
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index d12498ec8a4e..ee48ef8fb2ea 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -101,6 +101,24 @@ static inline int crypto_ahash_digest(struct ahash_request *req)
101 return crt->digest(req); 101 return crt->digest(req);
102} 102}
103 103
104static inline int crypto_ahash_init(struct ahash_request *req)
105{
106 struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req));
107 return crt->init(req);
108}
109
110static inline int crypto_ahash_update(struct ahash_request *req)
111{
112 struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req));
113 return crt->update(req);
114}
115
116static inline int crypto_ahash_final(struct ahash_request *req)
117{
118 struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req));
119 return crt->final(req);
120}
121
104static inline void ahash_request_set_tfm(struct ahash_request *req, 122static inline void ahash_request_set_tfm(struct ahash_request *req,
105 struct crypto_ahash *tfm) 123 struct crypto_ahash *tfm)
106{ 124{
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index a26f565e8189..7d970678f940 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -250,6 +250,8 @@ unifdef-y += isdn.h
250unifdef-y += isdnif.h 250unifdef-y += isdnif.h
251unifdef-y += isdn_divertif.h 251unifdef-y += isdn_divertif.h
252unifdef-y += isdn_ppp.h 252unifdef-y += isdn_ppp.h
253unifdef-y += ivtv.h
254unifdef-y += ivtvfb.h
253unifdef-y += joystick.h 255unifdef-y += joystick.h
254unifdef-y += kdev_t.h 256unifdef-y += kdev_t.h
255unifdef-y += kd.h 257unifdef-y += kd.h
@@ -356,6 +358,7 @@ unifdef-y += virtio_balloon.h
356unifdef-y += virtio_console.h 358unifdef-y += virtio_console.h
357unifdef-y += virtio_pci.h 359unifdef-y += virtio_pci.h
358unifdef-y += virtio_ring.h 360unifdef-y += virtio_ring.h
361unifdef-y += virtio_rng.h
359unifdef-y += vt.h 362unifdef-y += vt.h
360unifdef-y += wait.h 363unifdef-y += wait.h
361unifdef-y += wanrouter.h 364unifdef-y += wanrouter.h
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 972b12bcfb36..2b8df8b420fd 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -30,6 +30,8 @@
30#ifndef _AGP_BACKEND_H 30#ifndef _AGP_BACKEND_H
31#define _AGP_BACKEND_H 1 31#define _AGP_BACKEND_H 1
32 32
33#include <linux/list.h>
34
33enum chipset_type { 35enum chipset_type {
34 NOT_SUPPORTED, 36 NOT_SUPPORTED,
35 SUPPORTED, 37 SUPPORTED,
@@ -78,6 +80,8 @@ struct agp_memory {
78 bool is_bound; 80 bool is_bound;
79 bool is_flushed; 81 bool is_flushed;
80 bool vmalloc_flag; 82 bool vmalloc_flag;
83 /* list of agp_memory mapped to the aperture */
84 struct list_head mapped_list;
81}; 85};
82 86
83#define AGP_NORMAL_MEMORY 0 87#define AGP_NORMAL_MEMORY 0
@@ -96,6 +100,7 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t,
96extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); 100extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
97extern int agp_bind_memory(struct agp_memory *, off_t); 101extern int agp_bind_memory(struct agp_memory *, off_t);
98extern int agp_unbind_memory(struct agp_memory *); 102extern int agp_unbind_memory(struct agp_memory *);
103extern int agp_rebind_memory(void);
99extern void agp_enable(struct agp_bridge_data *, u32); 104extern void agp_enable(struct agp_bridge_data *, u32);
100extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); 105extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
101extern void agp_backend_release(struct agp_bridge_data *); 106extern void agp_backend_release(struct agp_bridge_data *);
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 1c622e2b0504..1ce19c1ef0e9 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -46,18 +46,48 @@ enum {
46 ATA_MAX_SECTORS_TAPE = 65535, 46 ATA_MAX_SECTORS_TAPE = 65535,
47 47
48 ATA_ID_WORDS = 256, 48 ATA_ID_WORDS = 256,
49 ATA_ID_CONFIG = 0,
50 ATA_ID_CYLS = 1,
51 ATA_ID_HEADS = 3,
52 ATA_ID_SECTORS = 6,
49 ATA_ID_SERNO = 10, 53 ATA_ID_SERNO = 10,
54 ATA_ID_BUF_SIZE = 21,
50 ATA_ID_FW_REV = 23, 55 ATA_ID_FW_REV = 23,
51 ATA_ID_PROD = 27, 56 ATA_ID_PROD = 27,
57 ATA_ID_MAX_MULTSECT = 47,
58 ATA_ID_DWORD_IO = 48,
59 ATA_ID_CAPABILITY = 49,
52 ATA_ID_OLD_PIO_MODES = 51, 60 ATA_ID_OLD_PIO_MODES = 51,
61 ATA_ID_OLD_DMA_MODES = 52,
53 ATA_ID_FIELD_VALID = 53, 62 ATA_ID_FIELD_VALID = 53,
63 ATA_ID_CUR_CYLS = 54,
64 ATA_ID_CUR_HEADS = 55,
65 ATA_ID_CUR_SECTORS = 56,
66 ATA_ID_MULTSECT = 59,
67 ATA_ID_LBA_CAPACITY = 60,
68 ATA_ID_SWDMA_MODES = 62,
54 ATA_ID_MWDMA_MODES = 63, 69 ATA_ID_MWDMA_MODES = 63,
55 ATA_ID_PIO_MODES = 64, 70 ATA_ID_PIO_MODES = 64,
56 ATA_ID_EIDE_DMA_MIN = 65, 71 ATA_ID_EIDE_DMA_MIN = 65,
72 ATA_ID_EIDE_DMA_TIME = 66,
57 ATA_ID_EIDE_PIO = 67, 73 ATA_ID_EIDE_PIO = 67,
58 ATA_ID_EIDE_PIO_IORDY = 68, 74 ATA_ID_EIDE_PIO_IORDY = 68,
59 ATA_ID_UDMA_MODES = 88, 75 ATA_ID_QUEUE_DEPTH = 75,
60 ATA_ID_MAJOR_VER = 80, 76 ATA_ID_MAJOR_VER = 80,
77 ATA_ID_COMMAND_SET_1 = 82,
78 ATA_ID_COMMAND_SET_2 = 83,
79 ATA_ID_CFSSE = 84,
80 ATA_ID_CFS_ENABLE_1 = 85,
81 ATA_ID_CFS_ENABLE_2 = 86,
82 ATA_ID_CSF_DEFAULT = 87,
83 ATA_ID_UDMA_MODES = 88,
84 ATA_ID_HW_CONFIG = 93,
85 ATA_ID_SPG = 98,
86 ATA_ID_LBA_CAPACITY_2 = 100,
87 ATA_ID_LAST_LUN = 126,
88 ATA_ID_DLF = 128,
89 ATA_ID_CSFO = 129,
90 ATA_ID_CFA_POWER = 160,
61 ATA_ID_PIO4 = (1 << 1), 91 ATA_ID_PIO4 = (1 << 1),
62 92
63 ATA_ID_SERNO_LEN = 20, 93 ATA_ID_SERNO_LEN = 20,
@@ -123,13 +153,26 @@ enum {
123 ATA_BUSY = (1 << 7), /* BSY status bit */ 153 ATA_BUSY = (1 << 7), /* BSY status bit */
124 ATA_DRDY = (1 << 6), /* device ready */ 154 ATA_DRDY = (1 << 6), /* device ready */
125 ATA_DF = (1 << 5), /* device fault */ 155 ATA_DF = (1 << 5), /* device fault */
156 ATA_DSC = (1 << 4), /* drive seek complete */
126 ATA_DRQ = (1 << 3), /* data request i/o */ 157 ATA_DRQ = (1 << 3), /* data request i/o */
158 ATA_CORR = (1 << 2), /* corrected data error */
159 ATA_IDX = (1 << 1), /* index */
127 ATA_ERR = (1 << 0), /* have an error */ 160 ATA_ERR = (1 << 0), /* have an error */
128 ATA_SRST = (1 << 2), /* software reset */ 161 ATA_SRST = (1 << 2), /* software reset */
129 ATA_ICRC = (1 << 7), /* interface CRC error */ 162 ATA_ICRC = (1 << 7), /* interface CRC error */
163 ATA_BBK = ATA_ICRC, /* pre-EIDE: block marked bad */
130 ATA_UNC = (1 << 6), /* uncorrectable media error */ 164 ATA_UNC = (1 << 6), /* uncorrectable media error */
165 ATA_MC = (1 << 5), /* media changed */
131 ATA_IDNF = (1 << 4), /* ID not found */ 166 ATA_IDNF = (1 << 4), /* ID not found */
167 ATA_MCR = (1 << 3), /* media change requested */
132 ATA_ABORTED = (1 << 2), /* command aborted */ 168 ATA_ABORTED = (1 << 2), /* command aborted */
169 ATA_TRK0NF = (1 << 1), /* track 0 not found */
170 ATA_AMNF = (1 << 0), /* address mark not found */
171 ATAPI_LFS = 0xF0, /* last failed sense */
172 ATAPI_EOM = ATA_TRK0NF, /* end of media */
173 ATAPI_ILI = ATA_AMNF, /* illegal length indication */
174 ATAPI_IO = (1 << 1),
175 ATAPI_COD = (1 << 0),
133 176
134 /* ATA command block registers */ 177 /* ATA command block registers */
135 ATA_REG_DATA = 0x00, 178 ATA_REG_DATA = 0x00,
@@ -192,6 +235,13 @@ enum {
192 ATA_CMD_PMP_WRITE = 0xE8, 235 ATA_CMD_PMP_WRITE = 0xE8,
193 ATA_CMD_CONF_OVERLAY = 0xB1, 236 ATA_CMD_CONF_OVERLAY = 0xB1,
194 ATA_CMD_SEC_FREEZE_LOCK = 0xF5, 237 ATA_CMD_SEC_FREEZE_LOCK = 0xF5,
238 ATA_CMD_SMART = 0xB0,
239 ATA_CMD_MEDIA_LOCK = 0xDE,
240 ATA_CMD_MEDIA_UNLOCK = 0xDF,
241 /* marked obsolete in the ATA/ATAPI-7 spec */
242 ATA_CMD_RESTORE = 0x10,
243 /* EXABYTE specific */
244 ATA_EXABYTE_ENABLE_NEST = 0xF0,
195 245
196 /* READ_LOG_EXT pages */ 246 /* READ_LOG_EXT pages */
197 ATA_LOG_SATA_NCQ = 0x10, 247 ATA_LOG_SATA_NCQ = 0x10,
@@ -232,6 +282,10 @@ enum {
232 SETFEATURES_WC_ON = 0x02, /* Enable write cache */ 282 SETFEATURES_WC_ON = 0x02, /* Enable write cache */
233 SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ 283 SETFEATURES_WC_OFF = 0x82, /* Disable write cache */
234 284
285 /* Enable/Disable Automatic Acoustic Management */
286 SETFEATURES_AAM_ON = 0x42,
287 SETFEATURES_AAM_OFF = 0xC2,
288
235 SETFEATURES_SPINUP = 0x07, /* Spin-up drive */ 289 SETFEATURES_SPINUP = 0x07, /* Spin-up drive */
236 290
237 SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */ 291 SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */
@@ -254,6 +308,15 @@ enum {
254 ATA_DCO_IDENTIFY = 0xC2, 308 ATA_DCO_IDENTIFY = 0xC2,
255 ATA_DCO_SET = 0xC3, 309 ATA_DCO_SET = 0xC3,
256 310
311 /* feature values for SMART */
312 ATA_SMART_ENABLE = 0xD8,
313 ATA_SMART_READ_VALUES = 0xD0,
314 ATA_SMART_READ_THRESHOLDS = 0xD1,
315
316 /* password used in LBA Mid / LBA High for executing SMART commands */
317 ATA_SMART_LBAM_PASS = 0x4F,
318 ATA_SMART_LBAH_PASS = 0xC2,
319
257 /* ATAPI stuff */ 320 /* ATAPI stuff */
258 ATAPI_PKT_DMA = (1 << 0), 321 ATAPI_PKT_DMA = (1 << 0),
259 ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: 322 ATAPI_DMADIR = (1 << 2), /* ATAPI data dir:
@@ -438,17 +501,17 @@ static inline int ata_is_data(u8 prot)
438/* 501/*
439 * id tests 502 * id tests
440 */ 503 */
441#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) 504#define ata_id_is_ata(id) (((id)[ATA_ID_CONFIG] & (1 << 15)) == 0)
442#define ata_id_has_lba(id) ((id)[49] & (1 << 9)) 505#define ata_id_has_lba(id) ((id)[ATA_ID_CAPABILITY] & (1 << 9))
443#define ata_id_has_dma(id) ((id)[49] & (1 << 8)) 506#define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8))
444#define ata_id_has_ncq(id) ((id)[76] & (1 << 8)) 507#define ata_id_has_ncq(id) ((id)[76] & (1 << 8))
445#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) 508#define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1)
446#define ata_id_removeable(id) ((id)[0] & (1 << 7)) 509#define ata_id_removeable(id) ((id)[ATA_ID_CONFIG] & (1 << 7))
447#define ata_id_has_atapi_AN(id) \ 510#define ata_id_has_atapi_AN(id) \
448 ( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \ 511 ( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \
449 ((id)[78] & (1 << 5)) ) 512 ((id)[78] & (1 << 5)) )
450#define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) 513#define ata_id_iordy_disable(id) ((id)[ATA_ID_CAPABILITY] & (1 << 10))
451#define ata_id_has_iordy(id) ((id)[49] & (1 << 11)) 514#define ata_id_has_iordy(id) ((id)[ATA_ID_CAPABILITY] & (1 << 11))
452#define ata_id_u32(id,n) \ 515#define ata_id_u32(id,n) \
453 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) 516 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
454#define ata_id_u64(id,n) \ 517#define ata_id_u64(id,n) \
@@ -457,7 +520,7 @@ static inline int ata_is_data(u8 prot)
457 ((u64) (id)[(n) + 1] << 16) | \ 520 ((u64) (id)[(n) + 1] << 16) | \
458 ((u64) (id)[(n) + 0]) ) 521 ((u64) (id)[(n) + 0]) )
459 522
460#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) 523#define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20)
461 524
462static inline bool ata_id_has_hipm(const u16 *id) 525static inline bool ata_id_has_hipm(const u16 *id)
463{ 526{
@@ -482,75 +545,75 @@ static inline bool ata_id_has_dipm(const u16 *id)
482 545
483static inline int ata_id_has_fua(const u16 *id) 546static inline int ata_id_has_fua(const u16 *id)
484{ 547{
485 if ((id[84] & 0xC000) != 0x4000) 548 if ((id[ATA_ID_CFSSE] & 0xC000) != 0x4000)
486 return 0; 549 return 0;
487 return id[84] & (1 << 6); 550 return id[ATA_ID_CFSSE] & (1 << 6);
488} 551}
489 552
490static inline int ata_id_has_flush(const u16 *id) 553static inline int ata_id_has_flush(const u16 *id)
491{ 554{
492 if ((id[83] & 0xC000) != 0x4000) 555 if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000)
493 return 0; 556 return 0;
494 return id[83] & (1 << 12); 557 return id[ATA_ID_COMMAND_SET_2] & (1 << 12);
495} 558}
496 559
497static inline int ata_id_has_flush_ext(const u16 *id) 560static inline int ata_id_has_flush_ext(const u16 *id)
498{ 561{
499 if ((id[83] & 0xC000) != 0x4000) 562 if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000)
500 return 0; 563 return 0;
501 return id[83] & (1 << 13); 564 return id[ATA_ID_COMMAND_SET_2] & (1 << 13);
502} 565}
503 566
504static inline int ata_id_has_lba48(const u16 *id) 567static inline int ata_id_has_lba48(const u16 *id)
505{ 568{
506 if ((id[83] & 0xC000) != 0x4000) 569 if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000)
507 return 0; 570 return 0;
508 if (!ata_id_u64(id, 100)) 571 if (!ata_id_u64(id, ATA_ID_LBA_CAPACITY_2))
509 return 0; 572 return 0;
510 return id[83] & (1 << 10); 573 return id[ATA_ID_COMMAND_SET_2] & (1 << 10);
511} 574}
512 575
513static inline int ata_id_hpa_enabled(const u16 *id) 576static inline int ata_id_hpa_enabled(const u16 *id)
514{ 577{
515 /* Yes children, word 83 valid bits cover word 82 data */ 578 /* Yes children, word 83 valid bits cover word 82 data */
516 if ((id[83] & 0xC000) != 0x4000) 579 if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000)
517 return 0; 580 return 0;
518 /* And 87 covers 85-87 */ 581 /* And 87 covers 85-87 */
519 if ((id[87] & 0xC000) != 0x4000) 582 if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
520 return 0; 583 return 0;
521 /* Check command sets enabled as well as supported */ 584 /* Check command sets enabled as well as supported */
522 if ((id[85] & ( 1 << 10)) == 0) 585 if ((id[ATA_ID_CFS_ENABLE_1] & (1 << 10)) == 0)
523 return 0; 586 return 0;
524 return id[82] & (1 << 10); 587 return id[ATA_ID_COMMAND_SET_1] & (1 << 10);
525} 588}
526 589
527static inline int ata_id_has_wcache(const u16 *id) 590static inline int ata_id_has_wcache(const u16 *id)
528{ 591{
529 /* Yes children, word 83 valid bits cover word 82 data */ 592 /* Yes children, word 83 valid bits cover word 82 data */
530 if ((id[83] & 0xC000) != 0x4000) 593 if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000)
531 return 0; 594 return 0;
532 return id[82] & (1 << 5); 595 return id[ATA_ID_COMMAND_SET_1] & (1 << 5);
533} 596}
534 597
535static inline int ata_id_has_pm(const u16 *id) 598static inline int ata_id_has_pm(const u16 *id)
536{ 599{
537 if ((id[83] & 0xC000) != 0x4000) 600 if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000)
538 return 0; 601 return 0;
539 return id[82] & (1 << 3); 602 return id[ATA_ID_COMMAND_SET_1] & (1 << 3);
540} 603}
541 604
542static inline int ata_id_rahead_enabled(const u16 *id) 605static inline int ata_id_rahead_enabled(const u16 *id)
543{ 606{
544 if ((id[87] & 0xC000) != 0x4000) 607 if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
545 return 0; 608 return 0;
546 return id[85] & (1 << 6); 609 return id[ATA_ID_CFS_ENABLE_1] & (1 << 6);
547} 610}
548 611
549static inline int ata_id_wcache_enabled(const u16 *id) 612static inline int ata_id_wcache_enabled(const u16 *id)
550{ 613{
551 if ((id[87] & 0xC000) != 0x4000) 614 if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
552 return 0; 615 return 0;
553 return id[85] & (1 << 5); 616 return id[ATA_ID_CFS_ENABLE_1] & (1 << 5);
554} 617}
555 618
556/** 619/**
@@ -581,7 +644,7 @@ static inline unsigned int ata_id_major_version(const u16 *id)
581 644
582static inline int ata_id_is_sata(const u16 *id) 645static inline int ata_id_is_sata(const u16 *id)
583{ 646{
584 return ata_id_major_version(id) >= 5 && id[93] == 0; 647 return ata_id_major_version(id) >= 5 && id[ATA_ID_HW_CONFIG] == 0;
585} 648}
586 649
587static inline int ata_id_has_tpm(const u16 *id) 650static inline int ata_id_has_tpm(const u16 *id)
@@ -599,7 +662,7 @@ static inline int ata_id_has_dword_io(const u16 *id)
599 /* ATA 8 reuses this flag for "trusted" computing */ 662 /* ATA 8 reuses this flag for "trusted" computing */
600 if (ata_id_major_version(id) > 7) 663 if (ata_id_major_version(id) > 7)
601 return 0; 664 return 0;
602 if (id[48] & (1 << 0)) 665 if (id[ATA_ID_DWORD_IO] & (1 << 0))
603 return 1; 666 return 1;
604 return 0; 667 return 0;
605} 668}
@@ -608,22 +671,22 @@ static inline int ata_id_current_chs_valid(const u16 *id)
608{ 671{
609 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command 672 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
610 has not been issued to the device then the values of 673 has not been issued to the device then the values of
611 id[54] to id[56] are vendor specific. */ 674 id[ATA_ID_CUR_CYLS] to id[ATA_ID_CUR_SECTORS] are vendor specific. */
612 return (id[53] & 0x01) && /* Current translation valid */ 675 return (id[ATA_ID_FIELD_VALID] & 1) && /* Current translation valid */
613 id[54] && /* cylinders in current translation */ 676 id[ATA_ID_CUR_CYLS] && /* cylinders in current translation */
614 id[55] && /* heads in current translation */ 677 id[ATA_ID_CUR_HEADS] && /* heads in current translation */
615 id[55] <= 16 && 678 id[ATA_ID_CUR_HEADS] <= 16 &&
616 id[56]; /* sectors in current translation */ 679 id[ATA_ID_CUR_SECTORS]; /* sectors in current translation */
617} 680}
618 681
619static inline int ata_id_is_cfa(const u16 *id) 682static inline int ata_id_is_cfa(const u16 *id)
620{ 683{
621 u16 v = id[0]; 684 if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */
622 if (v == 0x848A) /* Standard CF */
623 return 1; 685 return 1;
624 /* Could be CF hiding as standard ATA */ 686 /* Could be CF hiding as standard ATA */
625 if (ata_id_major_version(id) >= 3 && id[82] != 0xFFFF && 687 if (ata_id_major_version(id) >= 3 &&
626 (id[82] & ( 1 << 2))) 688 id[ATA_ID_COMMAND_SET_1] != 0xFFFF &&
689 (id[ATA_ID_COMMAND_SET_1] & (1 << 2)))
627 return 1; 690 return 1;
628 return 0; 691 return 0;
629} 692}
@@ -632,21 +695,21 @@ static inline int ata_drive_40wire(const u16 *dev_id)
632{ 695{
633 if (ata_id_is_sata(dev_id)) 696 if (ata_id_is_sata(dev_id))
634 return 0; /* SATA */ 697 return 0; /* SATA */
635 if ((dev_id[93] & 0xE000) == 0x6000) 698 if ((dev_id[ATA_ID_HW_CONFIG] & 0xE000) == 0x6000)
636 return 0; /* 80 wire */ 699 return 0; /* 80 wire */
637 return 1; 700 return 1;
638} 701}
639 702
640static inline int ata_drive_40wire_relaxed(const u16 *dev_id) 703static inline int ata_drive_40wire_relaxed(const u16 *dev_id)
641{ 704{
642 if ((dev_id[93] & 0x2000) == 0x2000) 705 if ((dev_id[ATA_ID_HW_CONFIG] & 0x2000) == 0x2000)
643 return 0; /* 80 wire */ 706 return 0; /* 80 wire */
644 return 1; 707 return 1;
645} 708}
646 709
647static inline int atapi_cdb_len(const u16 *dev_id) 710static inline int atapi_cdb_len(const u16 *dev_id)
648{ 711{
649 u16 tmp = dev_id[0] & 0x3; 712 u16 tmp = dev_id[ATA_ID_CONFIG] & 0x3;
650 switch (tmp) { 713 switch (tmp) {
651 case 0: return 12; 714 case 0: return 12;
652 case 1: return 16; 715 case 1: return 16;
@@ -656,7 +719,7 @@ static inline int atapi_cdb_len(const u16 *dev_id)
656 719
657static inline int atapi_command_packet_set(const u16 *dev_id) 720static inline int atapi_command_packet_set(const u16 *dev_id)
658{ 721{
659 return (dev_id[0] >> 8) & 0x1f; 722 return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f;
660} 723}
661 724
662static inline int atapi_id_dmadir(const u16 *dev_id) 725static inline int atapi_id_dmadir(const u16 *dev_id)
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 1abfe664c444..89781fd48859 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -110,6 +110,7 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits);
110 110
111extern int bitmap_scnprintf(char *buf, unsigned int len, 111extern int bitmap_scnprintf(char *buf, unsigned int len,
112 const unsigned long *src, int nbits); 112 const unsigned long *src, int nbits);
113extern int bitmap_scnprintf_len(unsigned int nr_bits);
113extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, 114extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
114 unsigned long *dst, int nbits); 115 unsigned long *dst, int nbits);
115extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, 116extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e61f22be4d0e..44710d7e7bff 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -280,6 +280,15 @@ struct blk_queue_tag {
280 atomic_t refcnt; /* map can be shared */ 280 atomic_t refcnt; /* map can be shared */
281}; 281};
282 282
283#define BLK_SCSI_MAX_CMDS (256)
284#define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8))
285
286struct blk_cmd_filter {
287 unsigned long read_ok[BLK_SCSI_CMD_PER_LONG];
288 unsigned long write_ok[BLK_SCSI_CMD_PER_LONG];
289 struct kobject kobj;
290};
291
283struct request_queue 292struct request_queue
284{ 293{
285 /* 294 /*
@@ -398,6 +407,7 @@ struct request_queue
398#if defined(CONFIG_BLK_DEV_BSG) 407#if defined(CONFIG_BLK_DEV_BSG)
399 struct bsg_class_device bsg_dev; 408 struct bsg_class_device bsg_dev;
400#endif 409#endif
410 struct blk_cmd_filter cmd_filter;
401}; 411};
402 412
403#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ 413#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */
@@ -807,8 +817,6 @@ extern void blk_put_queue(struct request_queue *);
807/* 817/*
808 * tag stuff 818 * tag stuff
809 */ 819 */
810#define blk_queue_tag_depth(q) ((q)->queue_tags->busy)
811#define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth)
812#define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) 820#define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED)
813extern int blk_queue_start_tag(struct request_queue *, struct request *); 821extern int blk_queue_start_tag(struct request_queue *, struct request *);
814extern struct request *blk_queue_find_tag(struct request_queue *, int); 822extern struct request *blk_queue_find_tag(struct request_queue *, int);
@@ -833,11 +841,11 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *);
833/* 841/*
834* command filter functions 842* command filter functions
835*/ 843*/
836extern int blk_verify_command(struct file *file, unsigned char *cmd); 844extern int blk_verify_command(struct blk_cmd_filter *filter,
837extern int blk_cmd_filter_verify_command(struct blk_scsi_cmd_filter *filter, 845 unsigned char *cmd, int has_write_perm);
838 unsigned char *cmd, mode_t *f_mode);
839extern int blk_register_filter(struct gendisk *disk); 846extern int blk_register_filter(struct gendisk *disk);
840extern void blk_unregister_filter(struct gendisk *disk); 847extern void blk_unregister_filter(struct gendisk *disk);
848extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
841 849
842#define MAX_PHYS_SEGMENTS 128 850#define MAX_PHYS_SEGMENTS 128
843#define MAX_HW_SEGMENTS 128 851#define MAX_HW_SEGMENTS 128
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 652470b687c9..95837bfb5256 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -97,10 +97,14 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
97#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE 97#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
98#define alloc_bootmem(x) \ 98#define alloc_bootmem(x) \
99 __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 99 __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_nopanic(x) \
101 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_low(x) \ 102#define alloc_bootmem_low(x) \
101 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) 103 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)
102#define alloc_bootmem_pages(x) \ 104#define alloc_bootmem_pages(x) \
103 __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 105 __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
106#define alloc_bootmem_pages_nopanic(x) \
107 __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
104#define alloc_bootmem_low_pages(x) \ 108#define alloc_bootmem_low_pages(x) \
105 __alloc_bootmem_low(x, PAGE_SIZE, 0) 109 __alloc_bootmem_low(x, PAGE_SIZE, 0)
106#define alloc_bootmem_node(pgdat, x) \ 110#define alloc_bootmem_node(pgdat, x) \
diff --git a/include/linux/byteorder.h b/include/linux/byteorder.h
new file mode 100644
index 000000000000..29f002d73d98
--- /dev/null
+++ b/include/linux/byteorder.h
@@ -0,0 +1,372 @@
1#ifndef _LINUX_BYTEORDER_H
2#define _LINUX_BYTEORDER_H
3
4#include <linux/types.h>
5#include <linux/swab.h>
6
7#if defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
8# error Fix asm/byteorder.h to define one endianness
9#endif
10
11#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
12# error Fix asm/byteorder.h to define arch endianness
13#endif
14
15#ifdef __LITTLE_ENDIAN
16# undef __LITTLE_ENDIAN
17# define __LITTLE_ENDIAN 1234
18#endif
19
20#ifdef __BIG_ENDIAN
21# undef __BIG_ENDIAN
22# define __BIG_ENDIAN 4321
23#endif
24
25#if defined(__LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN_BITFIELD)
26# define __LITTLE_ENDIAN_BITFIELD
27#endif
28
29#if defined(__BIG_ENDIAN) && !defined(__BIG_ENDIAN_BITFIELD)
30# define __BIG_ENDIAN_BITFIELD
31#endif
32
33#ifdef __LITTLE_ENDIAN
34# define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
35# define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
36# define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
37# define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
38# define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
39# define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
40
41# define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
42# define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
43# define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
44# define __cpu_to_be16(x) ((__force __be16)__swab16(x))
45# define __cpu_to_be32(x) ((__force __be32)__swab32(x))
46# define __cpu_to_be64(x) ((__force __be64)__swab64(x))
47#endif
48
49#ifdef __BIG_ENDIAN
50# define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
51# define __be32_to_cpu(x) ((__force __u32)(__be32)(x))
52# define __be64_to_cpu(x) ((__force __u64)(__be64)(x))
53# define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
54# define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
55# define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
56
57# define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
58# define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
59# define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
60# define __cpu_to_le16(x) ((__force __le16)__swab16(x))
61# define __cpu_to_le32(x) ((__force __le32)__swab32(x))
62# define __cpu_to_le64(x) ((__force __le64)__swab64(x))
63#endif
64
65/*
66 * These helpers could be phased out over time as the base version
67 * handles constant folding.
68 */
69#define __constant_htonl(x) __cpu_to_be32(x)
70#define __constant_ntohl(x) __be32_to_cpu(x)
71#define __constant_htons(x) __cpu_to_be16(x)
72#define __constant_ntohs(x) __be16_to_cpu(x)
73
74#define __constant_le16_to_cpu(x) __le16_to_cpu(x)
75#define __constant_le32_to_cpu(x) __le32_to_cpu(x)
76#define __constant_le64_to_cpu(x) __le64_to_cpu(x)
77#define __constant_be16_to_cpu(x) __be16_to_cpu(x)
78#define __constant_be32_to_cpu(x) __be32_to_cpu(x)
79#define __constant_be64_to_cpu(x) __be64_to_cpu(x)
80
81#define __constant_cpu_to_le16(x) __cpu_to_le16(x)
82#define __constant_cpu_to_le32(x) __cpu_to_le32(x)
83#define __constant_cpu_to_le64(x) __cpu_to_le64(x)
84#define __constant_cpu_to_be16(x) __cpu_to_be16(x)
85#define __constant_cpu_to_be32(x) __cpu_to_be32(x)
86#define __constant_cpu_to_be64(x) __cpu_to_be64(x)
87
88static inline void __le16_to_cpus(__u16 *p)
89{
90#ifdef __BIG_ENDIAN
91 __swab16s(p);
92#endif
93}
94
95static inline void __cpu_to_le16s(__u16 *p)
96{
97#ifdef __BIG_ENDIAN
98 __swab16s(p);
99#endif
100}
101
102static inline void __le32_to_cpus(__u32 *p)
103{
104#ifdef __BIG_ENDIAN
105 __swab32s(p);
106#endif
107}
108
109static inline void __cpu_to_le32s(__u32 *p)
110{
111#ifdef __BIG_ENDIAN
112 __swab32s(p);
113#endif
114}
115
116static inline void __le64_to_cpus(__u64 *p)
117{
118#ifdef __BIG_ENDIAN
119 __swab64s(p);
120#endif
121}
122
123static inline void __cpu_to_le64s(__u64 *p)
124{
125#ifdef __BIG_ENDIAN
126 __swab64s(p);
127#endif
128}
129
130static inline void __be16_to_cpus(__u16 *p)
131{
132#ifdef __LITTLE_ENDIAN
133 __swab16s(p);
134#endif
135}
136
137static inline void __cpu_to_be16s(__u16 *p)
138{
139#ifdef __LITTLE_ENDIAN
140 __swab16s(p);
141#endif
142}
143
144static inline void __be32_to_cpus(__u32 *p)
145{
146#ifdef __LITTLE_ENDIAN
147 __swab32s(p);
148#endif
149}
150
151static inline void __cpu_to_be32s(__u32 *p)
152{
153#ifdef __LITTLE_ENDIAN
154 __swab32s(p);
155#endif
156}
157
158static inline void __be64_to_cpus(__u64 *p)
159{
160#ifdef __LITTLE_ENDIAN
161 __swab64s(p);
162#endif
163}
164
165static inline void __cpu_to_be64s(__u64 *p)
166{
167#ifdef __LITTLE_ENDIAN
168 __swab64s(p);
169#endif
170}
171
172static inline __u16 __le16_to_cpup(const __le16 *p)
173{
174#ifdef __LITTLE_ENDIAN
175 return (__force __u16)*p;
176#else
177 return __swab16p((__force __u16 *)p);
178#endif
179}
180
181static inline __u32 __le32_to_cpup(const __le32 *p)
182{
183#ifdef __LITTLE_ENDIAN
184 return (__force __u32)*p;
185#else
186 return __swab32p((__force __u32 *)p);
187#endif
188}
189
190static inline __u64 __le64_to_cpup(const __le64 *p)
191{
192#ifdef __LITTLE_ENDIAN
193 return (__force __u64)*p;
194#else
195 return __swab64p((__force __u64 *)p);
196#endif
197}
198
199static inline __le16 __cpu_to_le16p(const __u16 *p)
200{
201#ifdef __LITTLE_ENDIAN
202 return (__force __le16)*p;
203#else
204 return (__force __le16)__swab16p(p);
205#endif
206}
207
208static inline __le32 __cpu_to_le32p(const __u32 *p)
209{
210#ifdef __LITTLE_ENDIAN
211 return (__force __le32)*p;
212#else
213 return (__force __le32)__swab32p(p);
214#endif
215}
216
217static inline __le64 __cpu_to_le64p(const __u64 *p)
218{
219#ifdef __LITTLE_ENDIAN
220 return (__force __le64)*p;
221#else
222 return (__force __le64)__swab64p(p);
223#endif
224}
225
226static inline __u16 __be16_to_cpup(const __be16 *p)
227{
228#ifdef __BIG_ENDIAN
229 return (__force __u16)*p;
230#else
231 return __swab16p((__force __u16 *)p);
232#endif
233}
234
235static inline __u32 __be32_to_cpup(const __be32 *p)
236{
237#ifdef __BIG_ENDIAN
238 return (__force __u32)*p;
239#else
240 return __swab32p((__force __u32 *)p);
241#endif
242}
243
244static inline __u64 __be64_to_cpup(const __be64 *p)
245{
246#ifdef __BIG_ENDIAN
247 return (__force __u64)*p;
248#else
249 return __swab64p((__force __u64 *)p);
250#endif
251}
252
253static inline __be16 __cpu_to_be16p(const __u16 *p)
254{
255#ifdef __BIG_ENDIAN
256 return (__force __be16)*p;
257#else
258 return (__force __be16)__swab16p(p);
259#endif
260}
261
262static inline __be32 __cpu_to_be32p(const __u32 *p)
263{
264#ifdef __BIG_ENDIAN
265 return (__force __be32)*p;
266#else
267 return (__force __be32)__swab32p(p);
268#endif
269}
270
271static inline __be64 __cpu_to_be64p(const __u64 *p)
272{
273#ifdef __BIG_ENDIAN
274 return (__force __be64)*p;
275#else
276 return (__force __be64)__swab64p(p);
277#endif
278}
279
280#ifdef __KERNEL__
281
282# define le16_to_cpu __le16_to_cpu
283# define le32_to_cpu __le32_to_cpu
284# define le64_to_cpu __le64_to_cpu
285# define be16_to_cpu __be16_to_cpu
286# define be32_to_cpu __be32_to_cpu
287# define be64_to_cpu __be64_to_cpu
288# define cpu_to_le16 __cpu_to_le16
289# define cpu_to_le32 __cpu_to_le32
290# define cpu_to_le64 __cpu_to_le64
291# define cpu_to_be16 __cpu_to_be16
292# define cpu_to_be32 __cpu_to_be32
293# define cpu_to_be64 __cpu_to_be64
294
295# define le16_to_cpup __le16_to_cpup
296# define le32_to_cpup __le32_to_cpup
297# define le64_to_cpup __le64_to_cpup
298# define be16_to_cpup __be16_to_cpup
299# define be32_to_cpup __be32_to_cpup
300# define be64_to_cpup __be64_to_cpup
301# define cpu_to_le16p __cpu_to_le16p
302# define cpu_to_le32p __cpu_to_le32p
303# define cpu_to_le64p __cpu_to_le64p
304# define cpu_to_be16p __cpu_to_be16p
305# define cpu_to_be32p __cpu_to_be32p
306# define cpu_to_be64p __cpu_to_be64p
307
308# define le16_to_cpus __le16_to_cpus
309# define le32_to_cpus __le32_to_cpus
310# define le64_to_cpus __le64_to_cpus
311# define be16_to_cpus __be16_to_cpus
312# define be32_to_cpus __be32_to_cpus
313# define be64_to_cpus __be64_to_cpus
314# define cpu_to_le16s __cpu_to_le16s
315# define cpu_to_le32s __cpu_to_le32s
316# define cpu_to_le64s __cpu_to_le64s
317# define cpu_to_be16s __cpu_to_be16s
318# define cpu_to_be32s __cpu_to_be32s
319# define cpu_to_be64s __cpu_to_be64s
320
321/*
322 * They have to be macros in order to do the constant folding
323 * correctly - if the argument passed into a inline function
324 * it is no longer constant according to gcc..
325 */
326# undef ntohl
327# undef ntohs
328# undef htonl
329# undef htons
330
331# define ___htonl(x) __cpu_to_be32(x)
332# define ___htons(x) __cpu_to_be16(x)
333# define ___ntohl(x) __be32_to_cpu(x)
334# define ___ntohs(x) __be16_to_cpu(x)
335
336# define htonl(x) ___htonl(x)
337# define ntohl(x) ___ntohl(x)
338# define htons(x) ___htons(x)
339# define ntohs(x) ___ntohs(x)
340
341static inline void le16_add_cpu(__le16 *var, u16 val)
342{
343 *var = cpu_to_le16(le16_to_cpup(var) + val);
344}
345
346static inline void le32_add_cpu(__le32 *var, u32 val)
347{
348 *var = cpu_to_le32(le32_to_cpup(var) + val);
349}
350
351static inline void le64_add_cpu(__le64 *var, u64 val)
352{
353 *var = cpu_to_le64(le64_to_cpup(var) + val);
354}
355
356static inline void be16_add_cpu(__be16 *var, u16 val)
357{
358 *var = cpu_to_be16(be16_to_cpup(var) + val);
359}
360
361static inline void be32_add_cpu(__be32 *var, u32 val)
362{
363 *var = cpu_to_be32(be32_to_cpup(var) + val);
364}
365
366static inline void be64_add_cpu(__be64 *var, u64 val)
367{
368 *var = cpu_to_be64(be64_to_cpup(var) + val);
369}
370
371#endif /* __KERNEL__ */
372#endif /* _LINUX_BYTEORDER_H */
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 02673846d205..9d1fe30b6f6c 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -503,8 +503,19 @@ extern const kernel_cap_t __cap_init_eff_set;
503 503
504kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); 504kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
505 505
506int capable(int cap); 506/**
507int __capable(struct task_struct *t, int cap); 507 * has_capability - Determine if a task has a superior capability available
508 * @t: The task in question
509 * @cap: The capability to be tested for
510 *
511 * Return true if the specified task has the given superior capability
512 * currently in effect, false if not.
513 *
514 * Note that this does not set PF_SUPERPRIV on the task.
515 */
516#define has_capability(t, cap) (security_capable((t), (cap)) == 0)
517
518extern int capable(int cap);
508 519
509#endif /* __KERNEL__ */ 520#endif /* __KERNEL__ */
510 521
diff --git a/include/linux/completion.h b/include/linux/completion.h
index d2961b66d53d..02ef8835999c 100644
--- a/include/linux/completion.h
+++ b/include/linux/completion.h
@@ -49,10 +49,13 @@ extern unsigned long wait_for_completion_timeout(struct completion *x,
49 unsigned long timeout); 49 unsigned long timeout);
50extern unsigned long wait_for_completion_interruptible_timeout( 50extern unsigned long wait_for_completion_interruptible_timeout(
51 struct completion *x, unsigned long timeout); 51 struct completion *x, unsigned long timeout);
52extern bool try_wait_for_completion(struct completion *x);
53extern bool completion_done(struct completion *x);
52 54
53extern void complete(struct completion *); 55extern void complete(struct completion *);
54extern void complete_all(struct completion *); 56extern void complete_all(struct completion *);
55 57
56#define INIT_COMPLETION(x) ((x).done = 0) 58#define INIT_COMPLETION(x) ((x).done = 0)
57 59
60
58#endif 61#endif
diff --git a/include/linux/cred.h b/include/linux/cred.h
new file mode 100644
index 000000000000..b69222cc1fd2
--- /dev/null
+++ b/include/linux/cred.h
@@ -0,0 +1,50 @@
1/* Credentials management
2 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef _LINUX_CRED_H
13#define _LINUX_CRED_H
14
15#define get_current_user() (get_uid(current->user))
16
17#define task_uid(task) ((task)->uid)
18#define task_gid(task) ((task)->gid)
19#define task_euid(task) ((task)->euid)
20#define task_egid(task) ((task)->egid)
21
22#define current_uid() (current->uid)
23#define current_gid() (current->gid)
24#define current_euid() (current->euid)
25#define current_egid() (current->egid)
26#define current_suid() (current->suid)
27#define current_sgid() (current->sgid)
28#define current_fsuid() (current->fsuid)
29#define current_fsgid() (current->fsgid)
30#define current_cap() (current->cap_effective)
31
32#define current_uid_gid(_uid, _gid) \
33do { \
34 *(_uid) = current->uid; \
35 *(_gid) = current->gid; \
36} while(0)
37
38#define current_euid_egid(_uid, _gid) \
39do { \
40 *(_uid) = current->euid; \
41 *(_gid) = current->egid; \
42} while(0)
43
44#define current_fsuid_fsgid(_uid, _gid) \
45do { \
46 *(_uid) = current->fsuid; \
47 *(_gid) = current->fsgid; \
48} while(0)
49
50#endif /* _LINUX_CRED_H */
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 07aa198f19ed..efba1de629ac 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -230,7 +230,7 @@ extern void d_delete(struct dentry *);
230extern struct dentry * d_alloc(struct dentry *, const struct qstr *); 230extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
231extern struct dentry * d_alloc_anon(struct inode *); 231extern struct dentry * d_alloc_anon(struct inode *);
232extern struct dentry * d_splice_alias(struct inode *, struct dentry *); 232extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
233extern struct dentry * d_add_ci(struct inode *, struct dentry *, struct qstr *); 233extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
234extern void shrink_dcache_sb(struct super_block *); 234extern void shrink_dcache_sb(struct super_block *);
235extern void shrink_dcache_parent(struct dentry *); 235extern void shrink_dcache_parent(struct dentry *);
236extern void shrink_dcache_for_umount(struct super_block *); 236extern void shrink_dcache_for_umount(struct super_block *);
diff --git a/include/linux/device.h b/include/linux/device.h
index d24a47f80f9c..4d8372d135df 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -358,6 +358,7 @@ struct device {
358 358
359 struct kobject kobj; 359 struct kobject kobj;
360 char bus_id[BUS_ID_SIZE]; /* position on parent bus */ 360 char bus_id[BUS_ID_SIZE]; /* position on parent bus */
361 const char *init_name; /* initial name of the device */
361 struct device_type *type; 362 struct device_type *type;
362 unsigned uevent_suppress:1; 363 unsigned uevent_suppress:1;
363 364
@@ -406,7 +407,7 @@ struct device {
406/* Get the wakeup routines, which depend on struct device */ 407/* Get the wakeup routines, which depend on struct device */
407#include <linux/pm_wakeup.h> 408#include <linux/pm_wakeup.h>
408 409
409static inline const char *dev_name(struct device *dev) 410static inline const char *dev_name(const struct device *dev)
410{ 411{
411 /* will be changed into kobject_name(&dev->kobj) in the near future */ 412 /* will be changed into kobject_name(&dev->kobj) in the near future */
412 return dev->bus_id; 413 return dev->bus_id;
@@ -518,7 +519,7 @@ extern void device_shutdown(void);
518extern void sysdev_shutdown(void); 519extern void sysdev_shutdown(void);
519 520
520/* debugging and troubleshooting/diagnostic helpers. */ 521/* debugging and troubleshooting/diagnostic helpers. */
521extern const char *dev_driver_string(struct device *dev); 522extern const char *dev_driver_string(const struct device *dev);
522#define dev_printk(level, dev, format, arg...) \ 523#define dev_printk(level, dev, format, arg...) \
523 printk(level "%s %s: " format , dev_driver_string(dev) , \ 524 printk(level "%s %s: " format , dev_driver_string(dev) , \
524 dev_name(dev) , ## arg) 525 dev_name(dev) , ## arg)
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index f5abd1306638..27e772cefb6a 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -35,6 +35,27 @@ enum fid_type {
35 FILEID_INO32_GEN_PARENT = 2, 35 FILEID_INO32_GEN_PARENT = 2,
36 36
37 /* 37 /*
38 * 64 bit object ID, 64 bit root object ID,
39 * 32 bit generation number.
40 */
41 FILEID_BTRFS_WITHOUT_PARENT = 0x4d,
42
43 /*
44 * 64 bit object ID, 64 bit root object ID,
45 * 32 bit generation number,
46 * 64 bit parent object ID, 32 bit parent generation.
47 */
48 FILEID_BTRFS_WITH_PARENT = 0x4e,
49
50 /*
51 * 64 bit object ID, 64 bit root object ID,
52 * 32 bit generation number,
53 * 64 bit parent object ID, 32 bit parent generation,
54 * 64 bit parent root object ID.
55 */
56 FILEID_BTRFS_WITH_PARENT_ROOT = 0x4f,
57
58 /*
38 * 32 bit block number, 16 bit partition reference, 59 * 32 bit block number, 16 bit partition reference,
39 * 16 bit unused, 32 bit generation number. 60 * 16 bit unused, 32 bit generation number.
40 */ 61 */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 3b8870e32afd..531ccd5f5960 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -976,6 +976,9 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
976 976
977/* drivers/video/fb_defio.c */ 977/* drivers/video/fb_defio.c */
978extern void fb_deferred_io_init(struct fb_info *info); 978extern void fb_deferred_io_init(struct fb_info *info);
979extern void fb_deferred_io_open(struct fb_info *info,
980 struct inode *inode,
981 struct file *file);
979extern void fb_deferred_io_cleanup(struct fb_info *info); 982extern void fb_deferred_io_cleanup(struct fb_info *info);
980extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, 983extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry,
981 int datasync); 984 int datasync);
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h
index acbdbcc16051..6e199c8dfacc 100644
--- a/include/linux/firmware-map.h
+++ b/include/linux/firmware-map.h
@@ -24,34 +24,8 @@
24 */ 24 */
25#ifdef CONFIG_FIRMWARE_MEMMAP 25#ifdef CONFIG_FIRMWARE_MEMMAP
26 26
27/**
28 * Adds a firmware mapping entry. This function uses kmalloc() for memory
29 * allocation. Use firmware_map_add_early() if you want to use the bootmem
30 * allocator.
31 *
32 * That function must be called before late_initcall.
33 *
34 * @start: Start of the memory range.
35 * @end: End of the memory range (inclusive).
36 * @type: Type of the memory range.
37 *
38 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
39 */
40int firmware_map_add(resource_size_t start, resource_size_t end, 27int firmware_map_add(resource_size_t start, resource_size_t end,
41 const char *type); 28 const char *type);
42
43/**
44 * Adds a firmware mapping entry. This function uses the bootmem allocator
45 * for memory allocation. Use firmware_map_add() if you want to use kmalloc().
46 *
47 * That function must be called before late_initcall.
48 *
49 * @start: Start of the memory range.
50 * @end: End of the memory range (inclusive).
51 * @type: Type of the memory range.
52 *
53 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
54 */
55int firmware_map_add_early(resource_size_t start, resource_size_t end, 29int firmware_map_add_early(resource_size_t start, resource_size_t end,
56 const char *type); 30 const char *type);
57 31
diff --git a/include/linux/fs_uart_pd.h b/include/linux/fs_uart_pd.h
index 809bb9ffc788..36b61ff39277 100644
--- a/include/linux/fs_uart_pd.h
+++ b/include/linux/fs_uart_pd.h
@@ -12,7 +12,6 @@
12#ifndef FS_UART_PD_H 12#ifndef FS_UART_PD_H
13#define FS_UART_PD_H 13#define FS_UART_PD_H
14 14
15#include <linux/version.h>
16#include <asm/types.h> 15#include <asm/types.h>
17 16
18enum fs_uart_id { 17enum fs_uart_id {
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index f368d041e02d..bb384068272e 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -98,6 +98,27 @@ static inline void tracer_disable(void)
98#endif 98#endif
99} 99}
100 100
101/* Ftrace disable/restore without lock. Some synchronization mechanism
102 * must be used to prevent ftrace_enabled to be changed between
103 * disable/restore. */
104static inline int __ftrace_enabled_save(void)
105{
106#ifdef CONFIG_FTRACE
107 int saved_ftrace_enabled = ftrace_enabled;
108 ftrace_enabled = 0;
109 return saved_ftrace_enabled;
110#else
111 return 0;
112#endif
113}
114
115static inline void __ftrace_enabled_restore(int enabled)
116{
117#ifdef CONFIG_FTRACE
118 ftrace_enabled = enabled;
119#endif
120}
121
101#ifdef CONFIG_FRAME_POINTER 122#ifdef CONFIG_FRAME_POINTER
102/* TODO: need to fix this for ARM */ 123/* TODO: need to fix this for ARM */
103# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) 124# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 118216f1bd3c..be4f5e5bfe06 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -110,15 +110,6 @@ struct hd_struct {
110#define GENHD_FL_SUPPRESS_PARTITION_INFO 32 110#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
111#define GENHD_FL_FAIL 64 111#define GENHD_FL_FAIL 64
112 112
113#define BLK_SCSI_MAX_CMDS (256)
114#define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8))
115
116struct blk_scsi_cmd_filter {
117 unsigned long read_ok[BLK_SCSI_CMD_PER_LONG];
118 unsigned long write_ok[BLK_SCSI_CMD_PER_LONG];
119 struct kobject kobj;
120};
121
122struct gendisk { 113struct gendisk {
123 int major; /* major number of driver */ 114 int major; /* major number of driver */
124 int first_minor; 115 int first_minor;
@@ -128,7 +119,6 @@ struct gendisk {
128 struct hd_struct **part; /* [indexed by minor] */ 119 struct hd_struct **part; /* [indexed by minor] */
129 struct block_device_operations *fops; 120 struct block_device_operations *fops;
130 struct request_queue *queue; 121 struct request_queue *queue;
131 struct blk_scsi_cmd_filter cmd_filter;
132 void *private_data; 122 void *private_data;
133 sector_t capacity; 123 sector_t capacity;
134 124
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 4862398e05bf..bf34c5f4c051 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -39,7 +39,6 @@
39#define I2C_DRIVERID_SAA7111A 8 /* video input processor */ 39#define I2C_DRIVERID_SAA7111A 8 /* video input processor */
40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */ 40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */
41#define I2C_DRIVERID_SAA7110 22 /* video decoder */ 41#define I2C_DRIVERID_SAA7110 22 /* video decoder */
42#define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */
43#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ 42#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
44#define I2C_DRIVERID_PCF8583 25 /* real time clock */ 43#define I2C_DRIVERID_PCF8583 25 /* real time clock */
45#define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */ 44#define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */
@@ -95,7 +94,6 @@
95#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ 94#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
96#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ 95#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */
97#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ 96#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */
98#define I2C_HW_B_G400 0x010009 /* Matrox G400 */
99#define I2C_HW_B_I810 0x01000a /* Intel I810 */ 97#define I2C_HW_B_I810 0x01000a /* Intel I810 */
100#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ 98#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */
101#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ 99#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 08be0d21864c..06115128047f 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -97,7 +97,19 @@ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
97 97
98/** 98/**
99 * struct i2c_driver - represent an I2C device driver 99 * struct i2c_driver - represent an I2C device driver
100 * @id: Unique driver ID (optional)
100 * @class: What kind of i2c device we instantiate (for detect) 101 * @class: What kind of i2c device we instantiate (for detect)
102 * @attach_adapter: Callback for bus addition (for legacy drivers)
103 * @detach_adapter: Callback for bus removal (for legacy drivers)
104 * @detach_client: Callback for device removal (for legacy drivers)
105 * @probe: Callback for device binding (new-style drivers)
106 * @remove: Callback for device unbinding (new-style drivers)
107 * @shutdown: Callback for device shutdown
108 * @suspend: Callback for device suspend
109 * @resume: Callback for device resume
110 * @command: Callback for bus-wide signaling (optional)
111 * @driver: Device driver model driver
112 * @id_table: List of I2C devices supported by this driver
101 * @detect: Callback for device detection 113 * @detect: Callback for device detection
102 * @address_data: The I2C addresses to probe, ignore or force (for detect) 114 * @address_data: The I2C addresses to probe, ignore or force (for detect)
103 * @clients: List of detected clients we created (for i2c-core use only) 115 * @clients: List of detected clients we created (for i2c-core use only)
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
index 4c6307ad9fdb..8529f57ba263 100644
--- a/include/linux/if_tun.h
+++ b/include/linux/if_tun.h
@@ -45,6 +45,7 @@
45#define TUNGETFEATURES _IOR('T', 207, unsigned int) 45#define TUNGETFEATURES _IOR('T', 207, unsigned int)
46#define TUNSETOFFLOAD _IOW('T', 208, unsigned int) 46#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)
47#define TUNSETTXFILTER _IOW('T', 209, unsigned int) 47#define TUNSETTXFILTER _IOW('T', 209, unsigned int)
48#define TUNGETIFF _IOR('T', 210, unsigned int)
48 49
49/* TUNSETIFF ifr flags */ 50/* TUNSETIFF ifr flags */
50#define IFF_TUN 0x0001 51#define IFF_TUN 0x0001
diff --git a/include/linux/init.h b/include/linux/init.h
index 11b84e106053..93538b696e3d 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -139,6 +139,7 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[];
139extern initcall_t __security_initcall_start[], __security_initcall_end[]; 139extern initcall_t __security_initcall_start[], __security_initcall_end[];
140 140
141/* Defined in init/main.c */ 141/* Defined in init/main.c */
142extern int do_one_initcall(initcall_t fn);
142extern char __initdata boot_command_line[]; 143extern char __initdata boot_command_line[];
143extern char *saved_command_line; 144extern char *saved_command_line;
144extern unsigned int reset_devices; 145extern unsigned int reset_devices;
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 22d2115458c6..8d3b7a9afd17 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -109,6 +109,7 @@ extern struct resource iomem_resource;
109extern int request_resource(struct resource *root, struct resource *new); 109extern int request_resource(struct resource *root, struct resource *new);
110extern int release_resource(struct resource *new); 110extern int release_resource(struct resource *new);
111extern int insert_resource(struct resource *parent, struct resource *new); 111extern int insert_resource(struct resource *parent, struct resource *new);
112extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
112extern int allocate_resource(struct resource *root, struct resource *new, 113extern int allocate_resource(struct resource *root, struct resource *new,
113 resource_size_t size, resource_size_t min, 114 resource_size_t size, resource_size_t min,
114 resource_size_t max, resource_size_t align, 115 resource_size_t max, resource_size_t align,
diff --git a/include/linux/ivtv.h b/include/linux/ivtv.h
index 794b8daa9378..17ca64b5a66c 100644
--- a/include/linux/ivtv.h
+++ b/include/linux/ivtv.h
@@ -21,11 +21,7 @@
21#ifndef __LINUX_IVTV_H__ 21#ifndef __LINUX_IVTV_H__
22#define __LINUX_IVTV_H__ 22#define __LINUX_IVTV_H__
23 23
24#ifdef __KERNEL__ 24#include <linux/compiler.h>
25#include <linux/compiler.h> /* need __user */
26#else
27#define __user
28#endif
29#include <linux/types.h> 25#include <linux/types.h>
30 26
31/* ivtv knows several distinct output modes: MPEG streaming, 27/* ivtv knows several distinct output modes: MPEG streaming,
diff --git a/include/linux/ivtvfb.h b/include/linux/ivtvfb.h
index e980ba62ddcc..e20af47b59ad 100644
--- a/include/linux/ivtvfb.h
+++ b/include/linux/ivtvfb.h
@@ -21,11 +21,7 @@
21#ifndef __LINUX_IVTVFB_H__ 21#ifndef __LINUX_IVTVFB_H__
22#define __LINUX_IVTVFB_H__ 22#define __LINUX_IVTVFB_H__
23 23
24#ifdef __KERNEL__ 24#include <linux/compiler.h>
25#include <linux/compiler.h> /* need __user */
26#else
27#define __user
28#endif
29#include <linux/types.h> 25#include <linux/types.h>
30 26
31/* Framebuffer external API */ 27/* Framebuffer external API */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index aaa998f65c7a..2651f805ba6d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -108,6 +108,13 @@ struct completion;
108struct pt_regs; 108struct pt_regs;
109struct user; 109struct user;
110 110
111#ifdef CONFIG_PREEMPT_VOLUNTARY
112extern int _cond_resched(void);
113# define might_resched() _cond_resched()
114#else
115# define might_resched() do { } while (0)
116#endif
117
111/** 118/**
112 * might_sleep - annotation for functions that can sleep 119 * might_sleep - annotation for functions that can sleep
113 * 120 *
@@ -118,13 +125,6 @@ struct user;
118 * be bitten later when the calling function happens to sleep when it is not 125 * be bitten later when the calling function happens to sleep when it is not
119 * supposed to. 126 * supposed to.
120 */ 127 */
121#ifdef CONFIG_PREEMPT_VOLUNTARY
122extern int _cond_resched(void);
123# define might_resched() _cond_resched()
124#else
125# define might_resched() do { } while (0)
126#endif
127
128#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP 128#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
129 void __might_sleep(char *file, int line); 129 void __might_sleep(char *file, int line);
130# define might_sleep() \ 130# define might_sleep() \
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 32110cede64f..17f76fc05173 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -25,8 +25,8 @@
25#error KEXEC_CONTROL_MEMORY_LIMIT not defined 25#error KEXEC_CONTROL_MEMORY_LIMIT not defined
26#endif 26#endif
27 27
28#ifndef KEXEC_CONTROL_CODE_SIZE 28#ifndef KEXEC_CONTROL_PAGE_SIZE
29#error KEXEC_CONTROL_CODE_SIZE not defined 29#error KEXEC_CONTROL_PAGE_SIZE not defined
30#endif 30#endif
31 31
32#ifndef KEXEC_ARCH 32#ifndef KEXEC_ARCH
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 69511f74f912..70a30651cd12 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -320,12 +320,12 @@ struct kvm_trace_rec {
320 struct { 320 struct {
321 __u64 cycle_u64; 321 __u64 cycle_u64;
322 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 322 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
323 } cycle; 323 } __attribute__((packed)) cycle;
324 struct { 324 struct {
325 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 325 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
326 } nocycle; 326 } nocycle;
327 } u; 327 } u;
328} __attribute__((packed)); 328};
329 329
330#define KVMIO 0xAE 330#define KVMIO 0xAE
331 331
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 06b80337303b..225bfc5bd9ec 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -163,6 +163,7 @@ enum {
163 ATA_DEV_NONE = 9, /* no device */ 163 ATA_DEV_NONE = 9, /* no device */
164 164
165 /* struct ata_link flags */ 165 /* struct ata_link flags */
166 ATA_LFLAG_NO_HRST = (1 << 1), /* avoid hardreset */
166 ATA_LFLAG_NO_SRST = (1 << 2), /* avoid softreset */ 167 ATA_LFLAG_NO_SRST = (1 << 2), /* avoid softreset */
167 ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */ 168 ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */
168 ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */ 169 ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */
@@ -646,6 +647,7 @@ struct ata_link {
646 647
647 unsigned int flags; /* ATA_LFLAG_xxx */ 648 unsigned int flags; /* ATA_LFLAG_xxx */
648 649
650 u32 saved_scontrol; /* SControl on probe */
649 unsigned int hw_sata_spd_limit; 651 unsigned int hw_sata_spd_limit;
650 unsigned int sata_spd_limit; 652 unsigned int sata_spd_limit;
651 unsigned int sata_spd; /* current SATA PHY speed */ 653 unsigned int sata_spd; /* current SATA PHY speed */
@@ -1427,6 +1429,28 @@ static inline unsigned long ata_deadline(unsigned long from_jiffies,
1427 return from_jiffies + msecs_to_jiffies(timeout_msecs); 1429 return from_jiffies + msecs_to_jiffies(timeout_msecs);
1428} 1430}
1429 1431
1432/* Don't open code these in drivers as there are traps. Firstly the range may
1433 change in future hardware and specs, secondly 0xFF means 'no DMA' but is
1434 > UDMA_0. Dyma ddreigiau */
1435
1436static inline int ata_using_mwdma(struct ata_device *adev)
1437{
1438 if (adev->dma_mode >= XFER_MW_DMA_0 && adev->dma_mode <= XFER_MW_DMA_4)
1439 return 1;
1440 return 0;
1441}
1442
1443static inline int ata_using_udma(struct ata_device *adev)
1444{
1445 if (adev->dma_mode >= XFER_UDMA_0 && adev->dma_mode <= XFER_UDMA_7)
1446 return 1;
1447 return 0;
1448}
1449
1450static inline int ata_dma_enabled(struct ata_device *adev)
1451{
1452 return (adev->dma_mode == 0xFF ? 0 : 1);
1453}
1430 1454
1431/************************************************************************** 1455/**************************************************************************
1432 * PMP - drivers/ata/libata-pmp.c 1456 * PMP - drivers/ata/libata-pmp.c
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 2486eb4edbf1..331e5f1c2d8e 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -89,6 +89,7 @@ struct lock_class {
89 89
90 struct lockdep_subclass_key *key; 90 struct lockdep_subclass_key *key;
91 unsigned int subclass; 91 unsigned int subclass;
92 unsigned int dep_gen_id;
92 93
93 /* 94 /*
94 * IRQ/softirq usage tracking bits: 95 * IRQ/softirq usage tracking bits:
@@ -189,6 +190,14 @@ struct lock_chain {
189 u64 chain_key; 190 u64 chain_key;
190}; 191};
191 192
193#define MAX_LOCKDEP_KEYS_BITS 13
194/*
195 * Subtract one because we offset hlock->class_idx by 1 in order
196 * to make 0 mean no class. This avoids overflowing the class_idx
197 * bitfield and hitting the BUG in hlock_class().
198 */
199#define MAX_LOCKDEP_KEYS ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1)
200
192struct held_lock { 201struct held_lock {
193 /* 202 /*
194 * One-way hash of the dependency chain up to this point. We 203 * One-way hash of the dependency chain up to this point. We
@@ -205,14 +214,14 @@ struct held_lock {
205 * with zero), here we store the previous hash value: 214 * with zero), here we store the previous hash value:
206 */ 215 */
207 u64 prev_chain_key; 216 u64 prev_chain_key;
208 struct lock_class *class;
209 unsigned long acquire_ip; 217 unsigned long acquire_ip;
210 struct lockdep_map *instance; 218 struct lockdep_map *instance;
211 219 struct lockdep_map *nest_lock;
212#ifdef CONFIG_LOCK_STAT 220#ifdef CONFIG_LOCK_STAT
213 u64 waittime_stamp; 221 u64 waittime_stamp;
214 u64 holdtime_stamp; 222 u64 holdtime_stamp;
215#endif 223#endif
224 unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS;
216 /* 225 /*
217 * The lock-stack is unified in that the lock chains of interrupt 226 * The lock-stack is unified in that the lock chains of interrupt
218 * contexts nest ontop of process context chains, but we 'separate' 227 * contexts nest ontop of process context chains, but we 'separate'
@@ -226,11 +235,11 @@ struct held_lock {
226 * The following field is used to detect when we cross into an 235 * The following field is used to detect when we cross into an
227 * interrupt context: 236 * interrupt context:
228 */ 237 */
229 int irq_context; 238 unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */
230 int trylock; 239 unsigned int trylock:1;
231 int read; 240 unsigned int read:2; /* see lock_acquire() comment */
232 int check; 241 unsigned int check:2; /* see lock_acquire() comment */
233 int hardirqs_off; 242 unsigned int hardirqs_off:1;
234}; 243};
235 244
236/* 245/*
@@ -294,11 +303,15 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
294 * 2: full validation 303 * 2: full validation
295 */ 304 */
296extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, 305extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
297 int trylock, int read, int check, unsigned long ip); 306 int trylock, int read, int check,
307 struct lockdep_map *nest_lock, unsigned long ip);
298 308
299extern void lock_release(struct lockdep_map *lock, int nested, 309extern void lock_release(struct lockdep_map *lock, int nested,
300 unsigned long ip); 310 unsigned long ip);
301 311
312extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass,
313 unsigned long ip);
314
302# define INIT_LOCKDEP .lockdep_recursion = 0, 315# define INIT_LOCKDEP .lockdep_recursion = 0,
303 316
304#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) 317#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
@@ -313,8 +326,9 @@ static inline void lockdep_on(void)
313{ 326{
314} 327}
315 328
316# define lock_acquire(l, s, t, r, c, i) do { } while (0) 329# define lock_acquire(l, s, t, r, c, n, i) do { } while (0)
317# define lock_release(l, n, i) do { } while (0) 330# define lock_release(l, n, i) do { } while (0)
331# define lock_set_subclass(l, s, i) do { } while (0)
318# define lockdep_init() do { } while (0) 332# define lockdep_init() do { } while (0)
319# define lockdep_info() do { } while (0) 333# define lockdep_info() do { } while (0)
320# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) 334# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0)
@@ -400,9 +414,11 @@ static inline void print_irqtrace_events(struct task_struct *curr)
400 414
401#ifdef CONFIG_DEBUG_LOCK_ALLOC 415#ifdef CONFIG_DEBUG_LOCK_ALLOC
402# ifdef CONFIG_PROVE_LOCKING 416# ifdef CONFIG_PROVE_LOCKING
403# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 417# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
418# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i)
404# else 419# else
405# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 420# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
421# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, NULL, i)
406# endif 422# endif
407# define spin_release(l, n, i) lock_release(l, n, i) 423# define spin_release(l, n, i) lock_release(l, n, i)
408#else 424#else
@@ -412,11 +428,11 @@ static inline void print_irqtrace_events(struct task_struct *curr)
412 428
413#ifdef CONFIG_DEBUG_LOCK_ALLOC 429#ifdef CONFIG_DEBUG_LOCK_ALLOC
414# ifdef CONFIG_PROVE_LOCKING 430# ifdef CONFIG_PROVE_LOCKING
415# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 431# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
416# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i) 432# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, NULL, i)
417# else 433# else
418# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 434# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
419# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, i) 435# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, NULL, i)
420# endif 436# endif
421# define rwlock_release(l, n, i) lock_release(l, n, i) 437# define rwlock_release(l, n, i) lock_release(l, n, i)
422#else 438#else
@@ -427,9 +443,9 @@ static inline void print_irqtrace_events(struct task_struct *curr)
427 443
428#ifdef CONFIG_DEBUG_LOCK_ALLOC 444#ifdef CONFIG_DEBUG_LOCK_ALLOC
429# ifdef CONFIG_PROVE_LOCKING 445# ifdef CONFIG_PROVE_LOCKING
430# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 446# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
431# else 447# else
432# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 448# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
433# endif 449# endif
434# define mutex_release(l, n, i) lock_release(l, n, i) 450# define mutex_release(l, n, i) lock_release(l, n, i)
435#else 451#else
@@ -439,11 +455,11 @@ static inline void print_irqtrace_events(struct task_struct *curr)
439 455
440#ifdef CONFIG_DEBUG_LOCK_ALLOC 456#ifdef CONFIG_DEBUG_LOCK_ALLOC
441# ifdef CONFIG_PROVE_LOCKING 457# ifdef CONFIG_PROVE_LOCKING
442# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 458# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
443# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, i) 459# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i)
444# else 460# else
445# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 461# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
446# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, i) 462# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i)
447# endif 463# endif
448# define rwsem_release(l, n, i) lock_release(l, n, i) 464# define rwsem_release(l, n, i) lock_release(l, n, i)
449#else 465#else
@@ -452,4 +468,16 @@ static inline void print_irqtrace_events(struct task_struct *curr)
452# define rwsem_release(l, n, i) do { } while (0) 468# define rwsem_release(l, n, i) do { } while (0)
453#endif 469#endif
454 470
471#ifdef CONFIG_DEBUG_LOCK_ALLOC
472# ifdef CONFIG_PROVE_LOCKING
473# define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_)
474# else
475# define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_)
476# endif
477# define lock_map_release(l) lock_release(l, 1, _THIS_IP_)
478#else
479# define lock_map_acquire(l) do { } while (0)
480# define lock_map_release(l) do { } while (0)
481#endif
482
455#endif /* __LINUX_LOCKDEP_H */ 483#endif /* __LINUX_LOCKDEP_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 335288bff1b7..72a15dc26bbf 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -73,7 +73,7 @@ extern unsigned int kobjsize(const void *objp);
73#endif 73#endif
74 74
75/* 75/*
76 * vm_flags.. 76 * vm_flags in vm_area_struct, see mm_types.h.
77 */ 77 */
78#define VM_READ 0x00000001 /* currently active flags */ 78#define VM_READ 0x00000001 /* currently active flags */
79#define VM_WRITE 0x00000002 79#define VM_WRITE 0x00000002
@@ -834,7 +834,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma,
834 struct vm_area_struct **pprev, unsigned long start, 834 struct vm_area_struct **pprev, unsigned long start,
835 unsigned long end, unsigned long newflags); 835 unsigned long end, unsigned long newflags);
836 836
837#ifdef CONFIG_HAVE_GET_USER_PAGES_FAST
838/* 837/*
839 * get_user_pages_fast provides equivalent functionality to get_user_pages, 838 * get_user_pages_fast provides equivalent functionality to get_user_pages,
840 * operating on current and current->mm (force=0 and doesn't return any vmas). 839 * operating on current and current->mm (force=0 and doesn't return any vmas).
@@ -848,25 +847,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma,
848int get_user_pages_fast(unsigned long start, int nr_pages, int write, 847int get_user_pages_fast(unsigned long start, int nr_pages, int write,
849 struct page **pages); 848 struct page **pages);
850 849
851#else
852/*
853 * Should probably be moved to asm-generic, and architectures can include it if
854 * they don't implement their own get_user_pages_fast.
855 */
856#define get_user_pages_fast(start, nr_pages, write, pages) \
857({ \
858 struct mm_struct *mm = current->mm; \
859 int ret; \
860 \
861 down_read(&mm->mmap_sem); \
862 ret = get_user_pages(current, mm, start, nr_pages, \
863 write, 0, pages, NULL); \
864 up_read(&mm->mmap_sem); \
865 \
866 ret; \
867})
868#endif
869
870/* 850/*
871 * A callback you can register to apply pressure to ageable caches. 851 * A callback you can register to apply pressure to ageable caches.
872 * 852 *
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 386edbe2cb4e..bf334138c7c1 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -113,7 +113,7 @@ struct vm_area_struct {
113 struct vm_area_struct *vm_next; 113 struct vm_area_struct *vm_next;
114 114
115 pgprot_t vm_page_prot; /* Access permissions of this VMA. */ 115 pgprot_t vm_page_prot; /* Access permissions of this VMA. */
116 unsigned long vm_flags; /* Flags, listed below. */ 116 unsigned long vm_flags; /* Flags, see mm.h. */
117 117
118 struct rb_node vm_rb; 118 struct rb_node vm_rb;
119 119
diff --git a/include/linux/net.h b/include/linux/net.h
index 4a9a30f2d68f..6dc14a240042 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -18,16 +18,9 @@
18#ifndef _LINUX_NET_H 18#ifndef _LINUX_NET_H
19#define _LINUX_NET_H 19#define _LINUX_NET_H
20 20
21#include <linux/wait.h>
22#include <linux/socket.h> 21#include <linux/socket.h>
23#include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */
24#include <asm/socket.h> 22#include <asm/socket.h>
25 23
26struct poll_table_struct;
27struct pipe_inode_info;
28struct inode;
29struct net;
30
31#define NPROTO AF_MAX 24#define NPROTO AF_MAX
32 25
33#define SYS_SOCKET 1 /* sys_socket(2) */ 26#define SYS_SOCKET 1 /* sys_socket(2) */
@@ -62,6 +55,13 @@ typedef enum {
62#ifdef __KERNEL__ 55#ifdef __KERNEL__
63#include <linux/stringify.h> 56#include <linux/stringify.h>
64#include <linux/random.h> 57#include <linux/random.h>
58#include <linux/wait.h>
59#include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */
60
61struct poll_table_struct;
62struct pipe_inode_info;
63struct inode;
64struct net;
65 65
66#define SOCK_ASYNC_NOSPACE 0 66#define SOCK_ASYNC_NOSPACE 0
67#define SOCK_ASYNC_WAITDATA 1 67#define SOCK_ASYNC_WAITDATA 1
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 3ba25065fa96..8837928fbf33 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -57,6 +57,15 @@ static inline acpi_status pcie_osc_support_set(u32 flags)
57{ 57{
58 return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING); 58 return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING);
59} 59}
60static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
61{
62 /* Find root host bridge */
63 while (pdev->bus->self)
64 pdev = pdev->bus->self;
65
66 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus),
67 pdev->bus->number);
68}
60#else 69#else
61#if !defined(AE_ERROR) 70#if !defined(AE_ERROR)
62typedef u32 acpi_status; 71typedef u32 acpi_status;
@@ -66,6 +75,8 @@ static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
66{return AE_ERROR;} 75{return AE_ERROR;}
67static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;} 76static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;}
68static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;} 77static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;}
78static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
79{ return NULL; }
69#endif 80#endif
70 81
71#endif /* _PCI_ACPI_H_ */ 82#endif /* _PCI_ACPI_H_ */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9ec2bcce8e83..f1624b396754 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2428,6 +2428,9 @@
2428#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a 2428#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a
2429#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 2429#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30
2430#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 2430#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60
2431#define PCI_DEVICE_ID_INTEL_PCH_0 0x3b10
2432#define PCI_DEVICE_ID_INTEL_PCH_1 0x3b11
2433#define PCI_DEVICE_ID_INTEL_PCH_2 0x3b30
2431#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2434#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
2432#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 2435#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0
2433#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 2436#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 22921ac4cfd9..d7e98ff8021e 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -161,4 +161,13 @@ pid_t pid_vnr(struct pid *pid);
161 } \ 161 } \
162 } while (0) 162 } while (0)
163 163
164#define do_each_pid_thread(pid, type, task) \
165 do_each_pid_task(pid, type, task) { \
166 struct task_struct *tg___ = task; \
167 do {
168
169#define while_each_pid_thread(pid, type, task) \
170 } while_each_thread(tg___, task); \
171 task = tg___; \
172 } while_each_pid_task(pid, type, task)
164#endif /* _LINUX_PID_H */ 173#endif /* _LINUX_PID_H */
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h
index 8c774905dcfe..4ab843622727 100644
--- a/include/linux/rcuclassic.h
+++ b/include/linux/rcuclassic.h
@@ -117,7 +117,7 @@ extern int rcu_needs_cpu(int cpu);
117#ifdef CONFIG_DEBUG_LOCK_ALLOC 117#ifdef CONFIG_DEBUG_LOCK_ALLOC
118extern struct lockdep_map rcu_lock_map; 118extern struct lockdep_map rcu_lock_map;
119# define rcu_read_acquire() \ 119# define rcu_read_acquire() \
120 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, _THIS_IP_) 120 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
121# define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) 121# define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_)
122#else 122#else
123# define rcu_read_acquire() do { } while (0) 123# define rcu_read_acquire() do { } while (0)
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index b93b541cf111..988e55fe649b 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -59,6 +59,7 @@ extern void machine_crash_shutdown(struct pt_regs *);
59 * Architecture independent implemenations of sys_reboot commands. 59 * Architecture independent implemenations of sys_reboot commands.
60 */ 60 */
61 61
62extern void kernel_restart_prepare(char *cmd);
62extern void kernel_restart(char *cmd); 63extern void kernel_restart(char *cmd);
63extern void kernel_halt(void); 64extern void kernel_halt(void);
64extern void kernel_power_off(void); 65extern void kernel_power_off(void);
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 69407f85e10b..fed6f5e0b411 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -102,7 +102,7 @@ int try_to_unmap(struct page *, int ignore_refs);
102 * Called from mm/filemap_xip.c to unmap empty zero page 102 * Called from mm/filemap_xip.c to unmap empty zero page
103 */ 103 */
104pte_t *page_check_address(struct page *, struct mm_struct *, 104pte_t *page_check_address(struct page *, struct mm_struct *,
105 unsigned long, spinlock_t **); 105 unsigned long, spinlock_t **, int);
106 106
107/* 107/*
108 * Used by swapoff to help locate where page is expected in vma. 108 * Used by swapoff to help locate where page is expected in vma.
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5270d449ff9d..cfb0d87b99fc 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -87,6 +87,7 @@ struct sched_param {
87#include <linux/task_io_accounting.h> 87#include <linux/task_io_accounting.h>
88#include <linux/kobject.h> 88#include <linux/kobject.h>
89#include <linux/latencytop.h> 89#include <linux/latencytop.h>
90#include <linux/cred.h>
90 91
91#include <asm/processor.h> 92#include <asm/processor.h>
92 93
@@ -1551,16 +1552,10 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
1551 1552
1552extern unsigned long long sched_clock(void); 1553extern unsigned long long sched_clock(void);
1553 1554
1554#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK 1555extern void sched_clock_init(void);
1555static inline void sched_clock_init(void) 1556extern u64 sched_clock_cpu(int cpu);
1556{
1557}
1558
1559static inline u64 sched_clock_cpu(int cpu)
1560{
1561 return sched_clock();
1562}
1563 1557
1558#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
1564static inline void sched_clock_tick(void) 1559static inline void sched_clock_tick(void)
1565{ 1560{
1566} 1561}
@@ -1572,28 +1567,11 @@ static inline void sched_clock_idle_sleep_event(void)
1572static inline void sched_clock_idle_wakeup_event(u64 delta_ns) 1567static inline void sched_clock_idle_wakeup_event(u64 delta_ns)
1573{ 1568{
1574} 1569}
1575 1570#else
1576#ifdef CONFIG_NO_HZ
1577static inline void sched_clock_tick_stop(int cpu)
1578{
1579}
1580
1581static inline void sched_clock_tick_start(int cpu)
1582{
1583}
1584#endif
1585
1586#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
1587extern void sched_clock_init(void);
1588extern u64 sched_clock_cpu(int cpu);
1589extern void sched_clock_tick(void); 1571extern void sched_clock_tick(void);
1590extern void sched_clock_idle_sleep_event(void); 1572extern void sched_clock_idle_sleep_event(void);
1591extern void sched_clock_idle_wakeup_event(u64 delta_ns); 1573extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1592#ifdef CONFIG_NO_HZ
1593extern void sched_clock_tick_stop(int cpu);
1594extern void sched_clock_tick_start(int cpu);
1595#endif 1574#endif
1596#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
1597 1575
1598/* 1576/*
1599 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu 1577 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu
diff --git a/include/linux/security.h b/include/linux/security.h
index fd96e7f8a6f9..80c4d002864c 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -46,8 +46,8 @@ struct audit_krule;
46 */ 46 */
47extern int cap_capable(struct task_struct *tsk, int cap); 47extern int cap_capable(struct task_struct *tsk, int cap);
48extern int cap_settime(struct timespec *ts, struct timezone *tz); 48extern int cap_settime(struct timespec *ts, struct timezone *tz);
49extern int cap_ptrace(struct task_struct *parent, struct task_struct *child, 49extern int cap_ptrace_may_access(struct task_struct *child, unsigned int mode);
50 unsigned int mode); 50extern int cap_ptrace_traceme(struct task_struct *parent);
51extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 51extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
52extern int cap_capset_check(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 52extern int cap_capset_check(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
53extern void cap_capset_set(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 53extern void cap_capset_set(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
@@ -1157,17 +1157,24 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1157 * @alter contains the flag indicating whether changes are to be made. 1157 * @alter contains the flag indicating whether changes are to be made.
1158 * Return 0 if permission is granted. 1158 * Return 0 if permission is granted.
1159 * 1159 *
1160 * @ptrace: 1160 * @ptrace_may_access:
1161 * Check permission before allowing the @parent process to trace the 1161 * Check permission before allowing the current process to trace the
1162 * @child process. 1162 * @child process.
1163 * Security modules may also want to perform a process tracing check 1163 * Security modules may also want to perform a process tracing check
1164 * during an execve in the set_security or apply_creds hooks of 1164 * during an execve in the set_security or apply_creds hooks of
1165 * binprm_security_ops if the process is being traced and its security 1165 * binprm_security_ops if the process is being traced and its security
1166 * attributes would be changed by the execve. 1166 * attributes would be changed by the execve.
1167 * @parent contains the task_struct structure for parent process. 1167 * @child contains the task_struct structure for the target process.
1168 * @child contains the task_struct structure for child process.
1169 * @mode contains the PTRACE_MODE flags indicating the form of access. 1168 * @mode contains the PTRACE_MODE flags indicating the form of access.
1170 * Return 0 if permission is granted. 1169 * Return 0 if permission is granted.
1170 * @ptrace_traceme:
1171 * Check that the @parent process has sufficient permission to trace the
1172 * current process before allowing the current process to present itself
1173 * to the @parent process for tracing.
1174 * The parent process will still have to undergo the ptrace_may_access
1175 * checks before it is allowed to trace this one.
1176 * @parent contains the task_struct structure for debugger process.
1177 * Return 0 if permission is granted.
1171 * @capget: 1178 * @capget:
1172 * Get the @effective, @inheritable, and @permitted capability sets for 1179 * Get the @effective, @inheritable, and @permitted capability sets for
1173 * the @target process. The hook may also perform permission checking to 1180 * the @target process. The hook may also perform permission checking to
@@ -1287,8 +1294,8 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1287struct security_operations { 1294struct security_operations {
1288 char name[SECURITY_NAME_MAX + 1]; 1295 char name[SECURITY_NAME_MAX + 1];
1289 1296
1290 int (*ptrace) (struct task_struct *parent, struct task_struct *child, 1297 int (*ptrace_may_access) (struct task_struct *child, unsigned int mode);
1291 unsigned int mode); 1298 int (*ptrace_traceme) (struct task_struct *parent);
1292 int (*capget) (struct task_struct *target, 1299 int (*capget) (struct task_struct *target,
1293 kernel_cap_t *effective, 1300 kernel_cap_t *effective,
1294 kernel_cap_t *inheritable, kernel_cap_t *permitted); 1301 kernel_cap_t *inheritable, kernel_cap_t *permitted);
@@ -1560,8 +1567,8 @@ extern struct dentry *securityfs_create_dir(const char *name, struct dentry *par
1560extern void securityfs_remove(struct dentry *dentry); 1567extern void securityfs_remove(struct dentry *dentry);
1561 1568
1562/* Security operations */ 1569/* Security operations */
1563int security_ptrace(struct task_struct *parent, struct task_struct *child, 1570int security_ptrace_may_access(struct task_struct *child, unsigned int mode);
1564 unsigned int mode); 1571int security_ptrace_traceme(struct task_struct *parent);
1565int security_capget(struct task_struct *target, 1572int security_capget(struct task_struct *target,
1566 kernel_cap_t *effective, 1573 kernel_cap_t *effective,
1567 kernel_cap_t *inheritable, 1574 kernel_cap_t *inheritable,
@@ -1742,11 +1749,15 @@ static inline int security_init(void)
1742 return 0; 1749 return 0;
1743} 1750}
1744 1751
1745static inline int security_ptrace(struct task_struct *parent, 1752static inline int security_ptrace_may_access(struct task_struct *child,
1746 struct task_struct *child, 1753 unsigned int mode)
1747 unsigned int mode) 1754{
1755 return cap_ptrace_may_access(child, mode);
1756}
1757
1758static inline int security_ptrace_traceme(struct task_struct *parent)
1748{ 1759{
1749 return cap_ptrace(parent, child, mode); 1760 return cap_ptrace_traceme(parent);
1750} 1761}
1751 1762
1752static inline int security_capget(struct task_struct *target, 1763static inline int security_capget(struct task_struct *target,
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index a66304a09955..a1783b229ef4 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -4,6 +4,8 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/string.h> 5#include <linux/string.h>
6#include <linux/mutex.h> 6#include <linux/mutex.h>
7#include <linux/cpumask.h>
8#include <linux/nodemask.h>
7 9
8struct seq_operations; 10struct seq_operations;
9struct file; 11struct file;
@@ -47,6 +49,16 @@ int seq_path(struct seq_file *, struct path *, char *);
47int seq_dentry(struct seq_file *, struct dentry *, char *); 49int seq_dentry(struct seq_file *, struct dentry *, char *);
48int seq_path_root(struct seq_file *m, struct path *path, struct path *root, 50int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
49 char *esc); 51 char *esc);
52int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits);
53static inline int seq_cpumask(struct seq_file *m, cpumask_t *mask)
54{
55 return seq_bitmap(m, mask->bits, NR_CPUS);
56}
57
58static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)
59{
60 return seq_bitmap(m, mask->bits, MAX_NUMNODES);
61}
50 62
51int single_open(struct file *, int (*)(struct seq_file *, void *), void *); 63int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
52int single_release(struct inode *, struct file *); 64int single_release(struct inode *, struct file *);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index cfcc45b3bef0..909923717830 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -901,7 +901,7 @@ extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta);
901static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) 901static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len)
902{ 902{
903 if (len > skb_headlen(skb) && 903 if (len > skb_headlen(skb) &&
904 !__pskb_pull_tail(skb, len-skb_headlen(skb))) 904 !__pskb_pull_tail(skb, len - skb_headlen(skb)))
905 return NULL; 905 return NULL;
906 skb->len -= len; 906 skb->len -= len;
907 return skb->data += len; 907 return skb->data += len;
@@ -918,7 +918,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
918 return 1; 918 return 1;
919 if (unlikely(len > skb->len)) 919 if (unlikely(len > skb->len))
920 return 0; 920 return 0;
921 return __pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL; 921 return __pskb_pull_tail(skb, len - skb_headlen(skb)) != NULL;
922} 922}
923 923
924/** 924/**
@@ -1321,7 +1321,7 @@ static inline int skb_padto(struct sk_buff *skb, unsigned int len)
1321 unsigned int size = skb->len; 1321 unsigned int size = skb->len;
1322 if (likely(size >= len)) 1322 if (likely(size >= len))
1323 return 0; 1323 return 0;
1324 return skb_pad(skb, len-size); 1324 return skb_pad(skb, len - size);
1325} 1325}
1326 1326
1327static inline int skb_add_data(struct sk_buff *skb, 1327static inline int skb_add_data(struct sk_buff *skb,
@@ -1452,6 +1452,10 @@ extern int skb_copy_datagram_iovec(const struct sk_buff *from,
1452extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, 1452extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
1453 int hlen, 1453 int hlen,
1454 struct iovec *iov); 1454 struct iovec *iov);
1455extern int skb_copy_datagram_from_iovec(struct sk_buff *skb,
1456 int offset,
1457 struct iovec *from,
1458 int len);
1455extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); 1459extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
1456extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, 1460extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
1457 unsigned int flags); 1461 unsigned int flags);
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 61e5610ad165..e0c0fccced46 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -183,8 +183,14 @@ do { \
183 183
184#ifdef CONFIG_DEBUG_LOCK_ALLOC 184#ifdef CONFIG_DEBUG_LOCK_ALLOC
185# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) 185# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass)
186# define spin_lock_nest_lock(lock, nest_lock) \
187 do { \
188 typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\
189 _spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \
190 } while (0)
186#else 191#else
187# define spin_lock_nested(lock, subclass) _spin_lock(lock) 192# define spin_lock_nested(lock, subclass) _spin_lock(lock)
193# define spin_lock_nest_lock(lock, nest_lock) _spin_lock(lock)
188#endif 194#endif
189 195
190#define write_lock(lock) _write_lock(lock) 196#define write_lock(lock) _write_lock(lock)
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h
index 8a2307ce7296..d79845d034b5 100644
--- a/include/linux/spinlock_api_smp.h
+++ b/include/linux/spinlock_api_smp.h
@@ -22,6 +22,8 @@ int in_lock_functions(unsigned long addr);
22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); 22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock);
23void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) 23void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
24 __acquires(lock); 24 __acquires(lock);
25void __lockfunc _spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *map)
26 __acquires(lock);
25void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); 27void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock);
26void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); 28void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock);
27void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); 29void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock);
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index f1cb0ba6d715..faf1519b5adc 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -3,16 +3,13 @@
3/* "Bogolock": stop the entire machine, disable interrupts. This is a 3/* "Bogolock": stop the entire machine, disable interrupts. This is a
4 very heavy lock, which is equivalent to grabbing every spinlock 4 very heavy lock, which is equivalent to grabbing every spinlock
5 (and more). So the "read" side to such a lock is anything which 5 (and more). So the "read" side to such a lock is anything which
6 diables preeempt. */ 6 disables preeempt. */
7#include <linux/cpu.h> 7#include <linux/cpu.h>
8#include <linux/cpumask.h> 8#include <linux/cpumask.h>
9#include <asm/system.h> 9#include <asm/system.h>
10 10
11#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) 11#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP)
12 12
13/* Deprecated, but useful for transition. */
14#define ALL_CPUS ~0U
15
16/** 13/**
17 * stop_machine: freeze the machine on all CPUs and run this function 14 * stop_machine: freeze the machine on all CPUs and run this function
18 * @fn: the function to run 15 * @fn: the function to run
@@ -50,18 +47,4 @@ static inline int stop_machine(int (*fn)(void *), void *data,
50 return ret; 47 return ret;
51} 48}
52#endif /* CONFIG_SMP */ 49#endif /* CONFIG_SMP */
53
54static inline int __deprecated stop_machine_run(int (*fn)(void *), void *data,
55 unsigned int cpu)
56{
57 /* If they don't care which cpu fn runs on, just pick one. */
58 if (cpu == NR_CPUS)
59 return stop_machine(fn, data, NULL);
60 else if (cpu == ~0U)
61 return stop_machine(fn, data, &cpu_possible_map);
62 else {
63 cpumask_t cpus = cpumask_of_cpu(cpu);
64 return stop_machine(fn, data, &cpus);
65 }
66}
67#endif /* _LINUX_STOP_MACHINE */ 50#endif /* _LINUX_STOP_MACHINE */
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index c63435095970..2ce8207686e2 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -217,11 +217,11 @@ struct platform_hibernation_ops {
217#ifdef CONFIG_HIBERNATION 217#ifdef CONFIG_HIBERNATION
218/* kernel/power/snapshot.c */ 218/* kernel/power/snapshot.c */
219extern void __register_nosave_region(unsigned long b, unsigned long e, int km); 219extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
220static inline void register_nosave_region(unsigned long b, unsigned long e) 220static inline void __init register_nosave_region(unsigned long b, unsigned long e)
221{ 221{
222 __register_nosave_region(b, e, 0); 222 __register_nosave_region(b, e, 0);
223} 223}
224static inline void register_nosave_region_late(unsigned long b, unsigned long e) 224static inline void __init register_nosave_region_late(unsigned long b, unsigned long e)
225{ 225{
226 __register_nosave_region(b, e, 1); 226 __register_nosave_region(b, e, 1);
227} 227}
diff --git a/include/linux/swab.h b/include/linux/swab.h
new file mode 100644
index 000000000000..270d5c208a89
--- /dev/null
+++ b/include/linux/swab.h
@@ -0,0 +1,309 @@
1#ifndef _LINUX_SWAB_H
2#define _LINUX_SWAB_H
3
4#include <linux/types.h>
5#include <linux/compiler.h>
6#include <asm/byteorder.h>
7
8/*
9 * casts are necessary for constants, because we never know how for sure
10 * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
11 */
12#define __const_swab16(x) ((__u16)( \
13 (((__u16)(x) & (__u16)0x00ffU) << 8) | \
14 (((__u16)(x) & (__u16)0xff00U) >> 8)))
15
16#define __const_swab32(x) ((__u32)( \
17 (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
18 (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
19 (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
20 (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
21
22#define __const_swab64(x) ((__u64)( \
23 (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
24 (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
25 (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
26 (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
27 (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
28 (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
29 (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
30 (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56)))
31
32#define __const_swahw32(x) ((__u32)( \
33 (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \
34 (((__u32)(x) & (__u32)0xffff0000UL) >> 16)))
35
36#define __const_swahb32(x) ((__u32)( \
37 (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \
38 (((__u32)(x) & (__u32)0xff00ff00UL) >> 8)))
39
40/*
41 * Implement the following as inlines, but define the interface using
42 * macros to allow constant folding when possible:
43 * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
44 */
45
46static inline __attribute_const__ __u16 ___swab16(__u16 val)
47{
48#ifdef __arch_swab16
49 return __arch_swab16(val);
50#elif defined(__arch_swab16p)
51 return __arch_swab16p(&val);
52#else
53 return __const_swab16(val);
54#endif
55}
56
57static inline __attribute_const__ __u32 ___swab32(__u32 val)
58{
59#ifdef __arch_swab32
60 return __arch_swab32(val);
61#elif defined(__arch_swab32p)
62 return __arch_swab32p(&val);
63#else
64 return __const_swab32(val);
65#endif
66}
67
68static inline __attribute_const__ __u64 ___swab64(__u64 val)
69{
70#ifdef __arch_swab64
71 return __arch_swab64(val);
72#elif defined(__arch_swab64p)
73 return __arch_swab64p(&val);
74#elif defined(__SWAB_64_THRU_32__)
75 __u32 h = val >> 32;
76 __u32 l = val & ((1ULL << 32) - 1);
77 return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h)));
78#else
79 return __const_swab64(val);
80#endif
81}
82
83static inline __attribute_const__ __u32 ___swahw32(__u32 val)
84{
85#ifdef __arch_swahw32
86 return __arch_swahw32(val);
87#elif defined(__arch_swahw32p)
88 return __arch_swahw32p(&val);
89#else
90 return __const_swahw32(val);
91#endif
92}
93
94static inline __attribute_const__ __u32 ___swahb32(__u32 val)
95{
96#ifdef __arch_swahb32
97 return __arch_swahb32(val);
98#elif defined(__arch_swahb32p)
99 return __arch_swahb32p(&val);
100#else
101 return __const_swahb32(val);
102#endif
103}
104
105/**
106 * __swab16 - return a byteswapped 16-bit value
107 * @x: value to byteswap
108 */
109#define __swab16(x) \
110 (__builtin_constant_p((__u16)(x)) ? \
111 __const_swab16((x)) : \
112 ___swab16((x)))
113
114/**
115 * __swab32 - return a byteswapped 32-bit value
116 * @x: value to byteswap
117 */
118#define __swab32(x) \
119 (__builtin_constant_p((__u32)(x)) ? \
120 __const_swab32((x)) : \
121 ___swab32((x)))
122
123/**
124 * __swab64 - return a byteswapped 64-bit value
125 * @x: value to byteswap
126 */
127#define __swab64(x) \
128 (__builtin_constant_p((__u64)(x)) ? \
129 __const_swab64((x)) : \
130 ___swab64((x)))
131
132/**
133 * __swahw32 - return a word-swapped 32-bit value
134 * @x: value to wordswap
135 *
136 * __swahw32(0x12340000) is 0x00001234
137 */
138#define __swahw32(x) \
139 (__builtin_constant_p((__u32)(x)) ? \
140 __const_swahw32((x)) : \
141 ___swahw32((x)))
142
143/**
144 * __swahb32 - return a high and low byte-swapped 32-bit value
145 * @x: value to byteswap
146 *
147 * __swahb32(0x12345678) is 0x34127856
148 */
149#define __swahb32(x) \
150 (__builtin_constant_p((__u32)(x)) ? \
151 __const_swahb32((x)) : \
152 ___swahb32((x)))
153
154/**
155 * __swab16p - return a byteswapped 16-bit value from a pointer
156 * @p: pointer to a naturally-aligned 16-bit value
157 */
158static inline __u16 __swab16p(const __u16 *p)
159{
160#ifdef __arch_swab16p
161 return __arch_swab16p(p);
162#else
163 return __swab16(*p);
164#endif
165}
166
167/**
168 * __swab32p - return a byteswapped 32-bit value from a pointer
169 * @p: pointer to a naturally-aligned 32-bit value
170 */
171static inline __u32 __swab32p(const __u32 *p)
172{
173#ifdef __arch_swab32p
174 return __arch_swab32p(p);
175#else
176 return __swab32(*p);
177#endif
178}
179
180/**
181 * __swab64p - return a byteswapped 64-bit value from a pointer
182 * @p: pointer to a naturally-aligned 64-bit value
183 */
184static inline __u64 __swab64p(const __u64 *p)
185{
186#ifdef __arch_swab64p
187 return __arch_swab64p(p);
188#else
189 return __swab64(*p);
190#endif
191}
192
193/**
194 * __swahw32p - return a wordswapped 32-bit value from a pointer
195 * @p: pointer to a naturally-aligned 32-bit value
196 *
197 * See __swahw32() for details of wordswapping.
198 */
199static inline __u32 __swahw32p(const __u32 *p)
200{
201#ifdef __arch_swahw32p
202 return __arch_swahw32p(p);
203#else
204 return __swahw32(*p);
205#endif
206}
207
208/**
209 * __swahb32p - return a high and low byteswapped 32-bit value from a pointer
210 * @p: pointer to a naturally-aligned 32-bit value
211 *
212 * See __swahb32() for details of high/low byteswapping.
213 */
214static inline __u32 __swahb32p(const __u32 *p)
215{
216#ifdef __arch_swahb32p
217 return __arch_swahb32p(p);
218#else
219 return __swahb32(*p);
220#endif
221}
222
223/**
224 * __swab16s - byteswap a 16-bit value in-place
225 * @p: pointer to a naturally-aligned 16-bit value
226 */
227static inline void __swab16s(__u16 *p)
228{
229#ifdef __arch_swab16s
230 __arch_swab16s(p);
231#else
232 *p = __swab16p(p);
233#endif
234}
235/**
236 * __swab32s - byteswap a 32-bit value in-place
237 * @p: pointer to a naturally-aligned 32-bit value
238 */
239static inline void __swab32s(__u32 *p)
240{
241#ifdef __arch_swab32s
242 __arch_swab32s(p);
243#else
244 *p = __swab32p(p);
245#endif
246}
247
248/**
249 * __swab64s - byteswap a 64-bit value in-place
250 * @p: pointer to a naturally-aligned 64-bit value
251 */
252static inline void __swab64s(__u64 *p)
253{
254#ifdef __arch_swab64s
255 __arch_swab64s(p);
256#else
257 *p = __swab64p(p);
258#endif
259}
260
261/**
262 * __swahw32s - wordswap a 32-bit value in-place
263 * @p: pointer to a naturally-aligned 32-bit value
264 *
265 * See __swahw32() for details of wordswapping
266 */
267static inline void __swahw32s(__u32 *p)
268{
269#ifdef __arch_swahw32s
270 __arch_swahw32s(p);
271#else
272 *p = __swahw32p(p);
273#endif
274}
275
276/**
277 * __swahb32s - high and low byteswap a 32-bit value in-place
278 * @p: pointer to a naturally-aligned 32-bit value
279 *
280 * See __swahb32() for details of high and low byte swapping
281 */
282static inline void __swahb32s(__u32 *p)
283{
284#ifdef __arch_swahb32s
285 __arch_swahb32s(p);
286#else
287 *p = __swahb32p(p);
288#endif
289}
290
291#ifdef __KERNEL__
292# define swab16 __swab16
293# define swab32 __swab32
294# define swab64 __swab64
295# define swahw32 __swahw32
296# define swahb32 __swahb32
297# define swab16p __swab16p
298# define swab32p __swab32p
299# define swab64p __swab64p
300# define swahw32p __swahw32p
301# define swahb32p __swahb32p
302# define swab16s __swab16s
303# define swab32s __swab32s
304# define swab64s __swab64s
305# define swahw32s __swahw32s
306# define swahb32s __swahb32s
307#endif /* __KERNEL__ */
308
309#endif /* _LINUX_SWAB_H */
diff --git a/include/linux/tick.h b/include/linux/tick.h
index d3c02695dc5d..8cf8cfe2cc97 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -74,10 +74,13 @@ extern struct tick_device *tick_get_device(int cpu);
74extern int tick_init_highres(void); 74extern int tick_init_highres(void);
75extern int tick_program_event(ktime_t expires, int force); 75extern int tick_program_event(ktime_t expires, int force);
76extern void tick_setup_sched_timer(void); 76extern void tick_setup_sched_timer(void);
77# endif
78
79# if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS
77extern void tick_cancel_sched_timer(int cpu); 80extern void tick_cancel_sched_timer(int cpu);
78# else 81# else
79static inline void tick_cancel_sched_timer(int cpu) { } 82static inline void tick_cancel_sched_timer(int cpu) { }
80# endif /* HIGHRES */ 83# endif
81 84
82# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST 85# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
83extern struct tick_device *tick_get_broadcast_device(void); 86extern struct tick_device *tick_get_broadcast_device(void);
diff --git a/include/linux/tty.h b/include/linux/tty.h
index e3579cb086e0..0cbec74ec086 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -331,6 +331,8 @@ extern int tty_write_room(struct tty_struct *tty);
331extern void tty_driver_flush_buffer(struct tty_struct *tty); 331extern void tty_driver_flush_buffer(struct tty_struct *tty);
332extern void tty_throttle(struct tty_struct *tty); 332extern void tty_throttle(struct tty_struct *tty);
333extern void tty_unthrottle(struct tty_struct *tty); 333extern void tty_unthrottle(struct tty_struct *tty);
334extern int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
335 struct winsize *ws);
334 336
335extern int is_current_pgrp_orphaned(void); 337extern int is_current_pgrp_orphaned(void);
336extern struct pid *tty_get_pgrp(struct tty_struct *tty); 338extern struct pid *tty_get_pgrp(struct tty_struct *tty);
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index e1065ac0d922..16d27944c321 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -168,6 +168,18 @@
168 * 168 *
169 * Optional: If not provided then the write method is called under 169 * Optional: If not provided then the write method is called under
170 * the atomic write lock to keep it serialized with the ldisc. 170 * the atomic write lock to keep it serialized with the ldisc.
171 *
172 * int (*resize)(struct tty_struct *tty, struct tty_struct *real_tty,
173 * unsigned int rows, unsigned int cols);
174 *
175 * Called when a termios request is issued which changes the
176 * requested terminal geometry.
177 *
178 * Optional: the default action is to update the termios structure
179 * without error. This is usually the correct behaviour. Drivers should
180 * not force errors here if they are not resizable objects (eg a serial
181 * line). See tty_do_resize() if you need to wrap the standard method
182 * in your own logic - the usual case.
171 */ 183 */
172 184
173#include <linux/fs.h> 185#include <linux/fs.h>
@@ -206,6 +218,8 @@ struct tty_operations {
206 int (*tiocmget)(struct tty_struct *tty, struct file *file); 218 int (*tiocmget)(struct tty_struct *tty, struct file *file);
207 int (*tiocmset)(struct tty_struct *tty, struct file *file, 219 int (*tiocmset)(struct tty_struct *tty, struct file *file,
208 unsigned int set, unsigned int clear); 220 unsigned int set, unsigned int clear);
221 int (*resize)(struct tty_struct *tty, struct tty_struct *real_tty,
222 struct winsize *ws);
209#ifdef CONFIG_CONSOLE_POLL 223#ifdef CONFIG_CONSOLE_POLL
210 int (*poll_init)(struct tty_driver *driver, int line, char *options); 224 int (*poll_init)(struct tty_driver *driver, int line, char *options);
211 int (*poll_get_char)(struct tty_driver *driver, int line); 225 int (*poll_get_char)(struct tty_driver *driver, int line);
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 5811c5da69f9..94ac74aba6b6 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -110,6 +110,10 @@ enum usb_interface_condition {
110 * @sysfs_files_created: sysfs attributes exist 110 * @sysfs_files_created: sysfs attributes exist
111 * @needs_remote_wakeup: flag set when the driver requires remote-wakeup 111 * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
112 * capability during autosuspend. 112 * capability during autosuspend.
113 * @needs_altsetting0: flag set when a set-interface request for altsetting 0
114 * has been deferred.
115 * @needs_binding: flag set when the driver should be re-probed or unbound
116 * following a reset or suspend operation it doesn't support.
113 * @dev: driver model's view of this device 117 * @dev: driver model's view of this device
114 * @usb_dev: if an interface is bound to the USB major, this will point 118 * @usb_dev: if an interface is bound to the USB major, this will point
115 * to the sysfs representation for that device. 119 * to the sysfs representation for that device.
@@ -160,6 +164,7 @@ struct usb_interface {
160 unsigned is_active:1; /* the interface is not suspended */ 164 unsigned is_active:1; /* the interface is not suspended */
161 unsigned sysfs_files_created:1; /* the sysfs attributes exist */ 165 unsigned sysfs_files_created:1; /* the sysfs attributes exist */
162 unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ 166 unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
167 unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */
163 unsigned needs_binding:1; /* needs delayed unbind/rebind */ 168 unsigned needs_binding:1; /* needs delayed unbind/rebind */
164 169
165 struct device dev; /* interface specific device info */ 170 struct device dev; /* interface specific device info */
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
new file mode 100644
index 000000000000..630962c04ca4
--- /dev/null
+++ b/include/linux/usb/musb.h
@@ -0,0 +1,98 @@
1/*
2 * This is used to for host and peripheral modes of the driver for
3 * Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC.
4 *
5 * Board initialization should put one of these into dev->platform_data,
6 * probably on some platform_device named "musb_hdrc". It encapsulates
7 * key configuration differences between boards.
8 */
9
10/* The USB role is defined by the connector used on the board, so long as
11 * standards are being followed. (Developer boards sometimes won't.)
12 */
13enum musb_mode {
14 MUSB_UNDEFINED = 0,
15 MUSB_HOST, /* A or Mini-A connector */
16 MUSB_PERIPHERAL, /* B or Mini-B connector */
17 MUSB_OTG /* Mini-AB connector */
18};
19
20struct clk;
21
22struct musb_hdrc_eps_bits {
23 const char name[16];
24 u8 bits;
25};
26
27struct musb_hdrc_config {
28 /* MUSB configuration-specific details */
29 unsigned multipoint:1; /* multipoint device */
30 unsigned dyn_fifo:1; /* supports dynamic fifo sizing */
31 unsigned soft_con:1; /* soft connect required */
32 unsigned utm_16:1; /* utm data witdh is 16 bits */
33 unsigned big_endian:1; /* true if CPU uses big-endian */
34 unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */
35 unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */
36 unsigned high_iso_tx:1; /* Tx ep required for HB iso */
37 unsigned high_iso_rx:1; /* Rx ep required for HD iso */
38 unsigned dma:1; /* supports DMA */
39 unsigned vendor_req:1; /* vendor registers required */
40
41 u8 num_eps; /* number of endpoints _with_ ep0 */
42 u8 dma_channels; /* number of dma channels */
43 u8 dyn_fifo_size; /* dynamic size in bytes */
44 u8 vendor_ctrl; /* vendor control reg width */
45 u8 vendor_stat; /* vendor status reg witdh */
46 u8 dma_req_chan; /* bitmask for required dma channels */
47 u8 ram_bits; /* ram address size */
48
49 struct musb_hdrc_eps_bits *eps_bits;
50};
51
52struct musb_hdrc_platform_data {
53 /* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */
54 u8 mode;
55
56 /* for clk_get() */
57 const char *clock;
58
59 /* (HOST or OTG) switch VBUS on/off */
60 int (*set_vbus)(struct device *dev, int is_on);
61
62 /* (HOST or OTG) mA/2 power supplied on (default = 8mA) */
63 u8 power;
64
65 /* (PERIPHERAL) mA/2 max power consumed (default = 100mA) */
66 u8 min_power;
67
68 /* (HOST or OTG) msec/2 after VBUS on till power good */
69 u8 potpgt;
70
71 /* Power the device on or off */
72 int (*set_power)(int state);
73
74 /* Turn device clock on or off */
75 int (*set_clock)(struct clk *clock, int is_on);
76
77 /* MUSB configuration-specific details */
78 struct musb_hdrc_config *config;
79};
80
81
82/* TUSB 6010 support */
83
84#define TUSB6010_OSCCLK_60 16667 /* psec/clk @ 60.0 MHz */
85#define TUSB6010_REFCLK_24 41667 /* psec/clk @ 24.0 MHz XI */
86#define TUSB6010_REFCLK_19 52083 /* psec/clk @ 19.2 MHz CLKIN */
87
88#ifdef CONFIG_ARCH_OMAP2
89
90extern int __init tusb6010_setup_interface(
91 struct musb_hdrc_platform_data *data,
92 unsigned ps_refclk, unsigned waitpin,
93 unsigned async_cs, unsigned sync_cs,
94 unsigned irq, unsigned dmachan);
95
96extern int tusb6010_platform_retime(unsigned is_refclk);
97
98#endif /* OMAP2 */
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 09a3e6a7518f..655341d0f534 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -17,7 +17,8 @@
17#include <linux/mutex.h> 17#include <linux/mutex.h>
18 18
19#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */ 19#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */
20#define SERIAL_TTY_MINORS 255 /* loads of devices :) */ 20#define SERIAL_TTY_MINORS 254 /* loads of devices :) */
21#define SERIAL_TTY_NO_MINOR 255 /* No minor was assigned */
21 22
22/* The maximum number of ports one device can grab at once */ 23/* The maximum number of ports one device can grab at once */
23#define MAX_NUM_PORTS 8 24#define MAX_NUM_PORTS 8
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index e466bd54a50e..e65a6bed4e3e 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -55,13 +55,13 @@
55 */ 55 */
56#ifndef __LINUX_VIDEODEV2_H 56#ifndef __LINUX_VIDEODEV2_H
57#define __LINUX_VIDEODEV2_H 57#define __LINUX_VIDEODEV2_H
58
58#ifdef __KERNEL__ 59#ifdef __KERNEL__
59#include <linux/time.h> /* need struct timeval */ 60#include <linux/time.h> /* need struct timeval */
60#include <linux/compiler.h> /* need __user */
61#else 61#else
62#define __user
63#include <sys/time.h> 62#include <sys/time.h>
64#endif 63#endif
64#include <linux/compiler.h>
65#include <linux/ioctl.h> 65#include <linux/ioctl.h>
66#include <linux/types.h> 66#include <linux/types.h>
67 67
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 364789aae9f3..328eb4022727 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -4,9 +4,9 @@
4#include <linux/spinlock.h> 4#include <linux/spinlock.h>
5#include <asm/page.h> /* pgprot_t */ 5#include <asm/page.h> /* pgprot_t */
6 6
7struct vm_area_struct; 7struct vm_area_struct; /* vma defining user mapping in mm_types.h */
8 8
9/* bits in vm_struct->flags */ 9/* bits in flags of vmalloc's vm_struct below */
10#define VM_IOREMAP 0x00000001 /* ioremap() and friends */ 10#define VM_IOREMAP 0x00000001 /* ioremap() and friends */
11#define VM_ALLOC 0x00000002 /* vmalloc() */ 11#define VM_ALLOC 0x00000002 /* vmalloc() */
12#define VM_MAP 0x00000004 /* vmap()ed pages */ 12#define VM_MAP 0x00000004 /* vmap()ed pages */
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 1c78d56c57e5..1cbd0a7db4e6 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -35,7 +35,6 @@ extern int fg_console, last_console, want_console;
35int vc_allocate(unsigned int console); 35int vc_allocate(unsigned int console);
36int vc_cons_allocated(unsigned int console); 36int vc_cons_allocated(unsigned int console);
37int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); 37int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines);
38int vc_lock_resize(struct vc_data *vc, unsigned int cols, unsigned int lines);
39void vc_deallocate(unsigned int console); 38void vc_deallocate(unsigned int console);
40void reset_palette(struct vc_data *vc); 39void reset_palette(struct vc_data *vc);
41void do_blank_screen(int entering_gfx); 40void do_blank_screen(int entering_gfx);
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 06b28142b3ab..c216de528b08 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -80,7 +80,8 @@ extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
80 struct net_device *dev, 80 struct net_device *dev,
81 int strict); 81 int strict);
82 82
83extern int ipv6_dev_get_saddr(struct net_device *dev, 83extern int ipv6_dev_get_saddr(struct net *net,
84 struct net_device *dev,
84 const struct in6_addr *daddr, 85 const struct in6_addr *daddr,
85 unsigned int srcprefs, 86 unsigned int srcprefs,
86 struct in6_addr *saddr); 87 struct in6_addr *saddr);
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 2f8b3c06a101..5f53db7e4e57 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -38,11 +38,6 @@ struct route_info {
38#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 38#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020
39 39
40 40
41#ifdef CONFIG_IPV6_MULTIPLE_TABLES
42extern struct rt6_info *ip6_prohibit_entry;
43extern struct rt6_info *ip6_blk_hole_entry;
44#endif
45
46extern void ip6_route_input(struct sk_buff *skb); 41extern void ip6_route_input(struct sk_buff *skb);
47 42
48extern struct dst_entry * ip6_route_output(struct net *net, 43extern struct dst_entry * ip6_route_output(struct net *net,
@@ -112,13 +107,13 @@ struct rt6_rtnl_dump_arg
112{ 107{
113 struct sk_buff *skb; 108 struct sk_buff *skb;
114 struct netlink_callback *cb; 109 struct netlink_callback *cb;
110 struct net *net;
115}; 111};
116 112
117extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); 113extern int rt6_dump_route(struct rt6_info *rt, void *p_arg);
118extern void rt6_ifdown(struct net *net, struct net_device *dev); 114extern void rt6_ifdown(struct net *net, struct net_device *dev);
119extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); 115extern void rt6_mtu_change(struct net_device *dev, unsigned mtu);
120 116
121extern rwlock_t rt6_lock;
122 117
123/* 118/*
124 * Store a destination cache entry in a socket 119 * Store a destination cache entry in a socket
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index cbb59ebed4ae..7312c3dd309f 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -140,8 +140,24 @@ struct ip_vs_seq {
140 140
141 141
142/* 142/*
143 * IPVS statistics object 143 * IPVS statistics objects
144 */ 144 */
145struct ip_vs_estimator {
146 struct list_head list;
147
148 u64 last_inbytes;
149 u64 last_outbytes;
150 u32 last_conns;
151 u32 last_inpkts;
152 u32 last_outpkts;
153
154 u32 cps;
155 u32 inpps;
156 u32 outpps;
157 u32 inbps;
158 u32 outbps;
159};
160
145struct ip_vs_stats 161struct ip_vs_stats
146{ 162{
147 __u32 conns; /* connections scheduled */ 163 __u32 conns; /* connections scheduled */
@@ -156,7 +172,15 @@ struct ip_vs_stats
156 __u32 inbps; /* current in byte rate */ 172 __u32 inbps; /* current in byte rate */
157 __u32 outbps; /* current out byte rate */ 173 __u32 outbps; /* current out byte rate */
158 174
175 /*
176 * Don't add anything before the lock, because we use memcpy() to copy
177 * the members before the lock to struct ip_vs_stats_user in
178 * ip_vs_ctl.c.
179 */
180
159 spinlock_t lock; /* spin lock */ 181 spinlock_t lock; /* spin lock */
182
183 struct ip_vs_estimator est; /* estimator */
160}; 184};
161 185
162struct dst_entry; 186struct dst_entry;
@@ -440,7 +464,7 @@ struct ip_vs_app
440 */ 464 */
441extern const char *ip_vs_proto_name(unsigned proto); 465extern const char *ip_vs_proto_name(unsigned proto);
442extern void ip_vs_init_hash_table(struct list_head *table, int rows); 466extern void ip_vs_init_hash_table(struct list_head *table, int rows);
443#define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table(t, sizeof(t)/sizeof(t[0])) 467#define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table((t), ARRAY_SIZE((t)))
444 468
445#define IP_VS_APP_TYPE_FTP 1 469#define IP_VS_APP_TYPE_FTP 1
446 470
@@ -620,7 +644,7 @@ extern int sysctl_ip_vs_expire_quiescent_template;
620extern int sysctl_ip_vs_sync_threshold[2]; 644extern int sysctl_ip_vs_sync_threshold[2];
621extern int sysctl_ip_vs_nat_icmp_send; 645extern int sysctl_ip_vs_nat_icmp_send;
622extern struct ip_vs_stats ip_vs_stats; 646extern struct ip_vs_stats ip_vs_stats;
623extern struct ctl_path net_vs_ctl_path[]; 647extern const struct ctl_path net_vs_ctl_path[];
624 648
625extern struct ip_vs_service * 649extern struct ip_vs_service *
626ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); 650ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport);
@@ -659,7 +683,7 @@ extern void ip_vs_sync_conn(struct ip_vs_conn *cp);
659/* 683/*
660 * IPVS rate estimator prototypes (from ip_vs_est.c) 684 * IPVS rate estimator prototypes (from ip_vs_est.c)
661 */ 685 */
662extern int ip_vs_new_estimator(struct ip_vs_stats *stats); 686extern void ip_vs_new_estimator(struct ip_vs_stats *stats);
663extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); 687extern void ip_vs_kill_estimator(struct ip_vs_stats *stats);
664extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); 688extern void ip_vs_zero_estimator(struct ip_vs_stats *stats);
665 689
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b397e4d984c7..ff137fd7714f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -708,10 +708,7 @@ enum ieee80211_tkip_key_type {
708 * rely on the host system for such buffering. This option is used 708 * rely on the host system for such buffering. This option is used
709 * to configure the IEEE 802.11 upper layer to buffer broadcast and 709 * to configure the IEEE 802.11 upper layer to buffer broadcast and
710 * multicast frames when there are power saving stations so that 710 * multicast frames when there are power saving stations so that
711 * the driver can fetch them with ieee80211_get_buffered_bc(). Note 711 * the driver can fetch them with ieee80211_get_buffered_bc().
712 * that not setting this flag works properly only when the
713 * %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because
714 * otherwise the stack will not know when the DTIM beacon was sent.
715 * 712 *
716 * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE: 713 * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:
717 * Hardware is not capable of short slot operation on the 2.4 GHz band. 714 * Hardware is not capable of short slot operation on the 2.4 GHz band.
@@ -1099,10 +1096,8 @@ enum ieee80211_ampdu_mlme_action {
1099 * See the section "Frame filtering" for more information. 1096 * See the section "Frame filtering" for more information.
1100 * This callback must be implemented and atomic. 1097 * This callback must be implemented and atomic.
1101 * 1098 *
1102 * @set_tim: Set TIM bit. If the hardware/firmware takes care of beacon 1099 * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
1103 * generation (that is, %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set) 1100 * must be set or cleared for a given AID. Must be atomic.
1104 * mac80211 calls this function when a TIM bit must be set or cleared
1105 * for a given AID. Must be atomic.
1106 * 1101 *
1107 * @set_key: See the section "Hardware crypto acceleration" 1102 * @set_key: See the section "Hardware crypto acceleration"
1108 * This callback can sleep, and is only called between add_interface 1103 * This callback can sleep, and is only called between add_interface
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 6affcfaa123e..b786a5b09253 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -78,6 +78,7 @@ extern struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops,
78 78
79extern int register_qdisc(struct Qdisc_ops *qops); 79extern int register_qdisc(struct Qdisc_ops *qops);
80extern int unregister_qdisc(struct Qdisc_ops *qops); 80extern int unregister_qdisc(struct Qdisc_ops *qops);
81extern void qdisc_list_del(struct Qdisc *q);
81extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); 82extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle);
82extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); 83extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle);
83extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, 84extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
@@ -89,7 +90,10 @@ extern void __qdisc_run(struct Qdisc *q);
89 90
90static inline void qdisc_run(struct Qdisc *q) 91static inline void qdisc_run(struct Qdisc *q)
91{ 92{
92 if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) 93 struct netdev_queue *txq = q->dev_queue;
94
95 if (!netif_tx_queue_stopped(txq) &&
96 !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
93 __qdisc_run(q); 97 __qdisc_run(q);
94} 98}
95 99
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index a7abfda3e447..e5569625d2a5 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -27,6 +27,7 @@ enum qdisc_state_t
27{ 27{
28 __QDISC_STATE_RUNNING, 28 __QDISC_STATE_RUNNING,
29 __QDISC_STATE_SCHED, 29 __QDISC_STATE_SCHED,
30 __QDISC_STATE_DEACTIVATED,
30}; 31};
31 32
32struct qdisc_size_table { 33struct qdisc_size_table {
@@ -60,7 +61,6 @@ struct Qdisc
60 struct gnet_stats_basic bstats; 61 struct gnet_stats_basic bstats;
61 struct gnet_stats_queue qstats; 62 struct gnet_stats_queue qstats;
62 struct gnet_stats_rate_est rate_est; 63 struct gnet_stats_rate_est rate_est;
63 struct rcu_head q_rcu;
64 int (*reshape_fail)(struct sk_buff *skb, 64 int (*reshape_fail)(struct sk_buff *skb,
65 struct Qdisc *q); 65 struct Qdisc *q);
66 66
@@ -193,6 +193,11 @@ static inline struct Qdisc *qdisc_root(struct Qdisc *qdisc)
193 return qdisc->dev_queue->qdisc; 193 return qdisc->dev_queue->qdisc;
194} 194}
195 195
196static inline struct Qdisc *qdisc_root_sleeping(struct Qdisc *qdisc)
197{
198 return qdisc->dev_queue->qdisc_sleeping;
199}
200
196/* The qdisc root lock is a mechanism by which to top level 201/* The qdisc root lock is a mechanism by which to top level
197 * of a qdisc tree can be locked from any qdisc node in the 202 * of a qdisc tree can be locked from any qdisc node in the
198 * forest. This allows changing the configuration of some 203 * forest. This allows changing the configuration of some
@@ -212,6 +217,14 @@ static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc)
212 return qdisc_lock(root); 217 return qdisc_lock(root);
213} 218}
214 219
220static inline spinlock_t *qdisc_root_sleeping_lock(struct Qdisc *qdisc)
221{
222 struct Qdisc *root = qdisc_root_sleeping(qdisc);
223
224 ASSERT_RTNL();
225 return qdisc_lock(root);
226}
227
215static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) 228static inline struct net_device *qdisc_dev(struct Qdisc *qdisc)
216{ 229{
217 return qdisc->dev_queue->dev; 230 return qdisc->dev_queue->dev;
@@ -219,12 +232,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc)
219 232
220static inline void sch_tree_lock(struct Qdisc *q) 233static inline void sch_tree_lock(struct Qdisc *q)
221{ 234{
222 spin_lock_bh(qdisc_root_lock(q)); 235 spin_lock_bh(qdisc_root_sleeping_lock(q));
223} 236}
224 237
225static inline void sch_tree_unlock(struct Qdisc *q) 238static inline void sch_tree_unlock(struct Qdisc *q)
226{ 239{
227 spin_unlock_bh(qdisc_root_lock(q)); 240 spin_unlock_bh(qdisc_root_sleeping_lock(q));
228} 241}
229 242
230#define tcf_tree_lock(tp) sch_tree_lock((tp)->q) 243#define tcf_tree_lock(tp) sch_tree_lock((tp)->q)
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 291d56a19167..80b2e93c2936 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -6,6 +6,7 @@
6#include <linux/spinlock.h> 6#include <linux/spinlock.h>
7#include <linux/workqueue.h> 7#include <linux/workqueue.h>
8#include <linux/blkdev.h> 8#include <linux/blkdev.h>
9#include <scsi/scsi.h>
9#include <asm/atomic.h> 10#include <asm/atomic.h>
10 11
11struct request_queue; 12struct request_queue;
@@ -426,7 +427,7 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev)
426 427
427static inline int scsi_device_protection(struct scsi_device *sdev) 428static inline int scsi_device_protection(struct scsi_device *sdev)
428{ 429{
429 return sdev->inquiry[5] & (1<<0); 430 return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0);
430} 431}
431 432
432#define MODULE_ALIAS_SCSI_DEVICE(type) \ 433#define MODULE_ALIAS_SCSI_DEVICE(type) \
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 613173b5db69..920c4e9cb93d 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -41,6 +41,7 @@ struct atmel_lcdfb_info {
41 struct work_struct task; 41 struct work_struct task;
42 42
43 unsigned int guard_time; 43 unsigned int guard_time;
44 unsigned int smem_len;
44 struct platform_device *pdev; 45 struct platform_device *pdev;
45 struct clk *bus_clk; 46 struct clk *bus_clk;
46 struct clk *lcdc_clk; 47 struct clk *lcdc_clk;
diff --git a/include/video/radeon.h b/include/video/radeon.h
index 95a1f2038b1d..099ffa5e5bee 100644
--- a/include/video/radeon.h
+++ b/include/video/radeon.h
@@ -742,6 +742,10 @@
742#define SOFT_RESET_RB (1 << 6) 742#define SOFT_RESET_RB (1 << 6)
743#define SOFT_RESET_HDP (1 << 7) 743#define SOFT_RESET_HDP (1 << 7)
744 744
745/* WAIT_UNTIL bit constants */
746#define WAIT_DMA_GUI_IDLE (1 << 9)
747#define WAIT_2D_IDLECLEAN (1 << 16)
748
745/* SURFACE_CNTL bit consants */ 749/* SURFACE_CNTL bit consants */
746#define SURF_TRANSLATION_DIS (1 << 8) 750#define SURF_TRANSLATION_DIS (1 << 8)
747#define NONSURF_AP0_SWP_16BPP (1 << 20) 751#define NONSURF_AP0_SWP_16BPP (1 << 20)