blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
#ifndef _BFIN_IO_H
|
|
|
|
#define _BFIN_IO_H
|
|
|
|
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#endif
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These are for ISA/PCI shared memory _only_ and should never be used
|
|
|
|
* on any other type of memory, including Zorro memory. They are meant to
|
|
|
|
* access the bus in the bus byte order which is little-endian!.
|
|
|
|
*
|
|
|
|
* readX/writeX() are used to access memory mapped devices. On some
|
|
|
|
* architectures the memory mapped IO stuff needs to be accessed
|
|
|
|
* differently. On the bfin architecture, we just read/write the
|
|
|
|
* memory location directly.
|
|
|
|
*/
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2007-06-20 23:34:16 -04:00
|
|
|
static inline unsigned char readb(const volatile void __iomem *addr)
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
{
|
|
|
|
unsigned int val;
|
|
|
|
int tmp;
|
|
|
|
|
|
|
|
__asm__ __volatile__ ("cli %1;\n\t"
|
|
|
|
"NOP; NOP; SSYNC;\n\t"
|
|
|
|
"%0 = b [%2] (z);\n\t"
|
|
|
|
"sti %1;\n\t"
|
|
|
|
: "=d"(val), "=d"(tmp): "a"(addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
return (unsigned char) val;
|
|
|
|
}
|
|
|
|
|
2007-06-20 23:34:16 -04:00
|
|
|
static inline unsigned short readw(const volatile void __iomem *addr)
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
{
|
|
|
|
unsigned int val;
|
|
|
|
int tmp;
|
|
|
|
|
|
|
|
__asm__ __volatile__ ("cli %1;\n\t"
|
|
|
|
"NOP; NOP; SSYNC;\n\t"
|
|
|
|
"%0 = w [%2] (z);\n\t"
|
|
|
|
"sti %1;\n\t"
|
|
|
|
: "=d"(val), "=d"(tmp): "a"(addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
return (unsigned short) val;
|
|
|
|
}
|
|
|
|
|
2007-06-20 23:34:16 -04:00
|
|
|
static inline unsigned int readl(const volatile void __iomem *addr)
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
{
|
|
|
|
unsigned int val;
|
|
|
|
int tmp;
|
|
|
|
|
|
|
|
__asm__ __volatile__ ("cli %1;\n\t"
|
|
|
|
"NOP; NOP; SSYNC;\n\t"
|
|
|
|
"%0 = [%2];\n\t"
|
|
|
|
"sti %1;\n\t"
|
|
|
|
: "=d"(val), "=d"(tmp): "a"(addr)
|
|
|
|
);
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
|
|
|
#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
|
|
|
|
#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
|
|
|
|
#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
|
|
|
|
|
|
|
|
#define __raw_readb readb
|
|
|
|
#define __raw_readw readw
|
|
|
|
#define __raw_readl readl
|
|
|
|
#define __raw_writeb writeb
|
|
|
|
#define __raw_writew writew
|
|
|
|
#define __raw_writel writel
|
|
|
|
#define memset_io(a,b,c) memset((void *)(a),(b),(c))
|
|
|
|
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
|
|
|
|
#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
|
|
|
|
|
2009-04-01 08:25:58 -04:00
|
|
|
/* Convert "I/O port addresses" to actual addresses. i.e. ugly casts. */
|
|
|
|
#define __io(port) ((void *)(unsigned long)(port))
|
|
|
|
|
|
|
|
#define inb(port) readb(__io(port))
|
|
|
|
#define inw(port) readw(__io(port))
|
|
|
|
#define inl(port) readl(__io(port))
|
|
|
|
#define outb(x,port) writeb(x,__io(port))
|
|
|
|
#define outw(x,port) writew(x,__io(port))
|
|
|
|
#define outl(x,port) writel(x,__io(port))
|
|
|
|
|
|
|
|
#define inb_p(port) inb(__io(port))
|
|
|
|
#define inw_p(port) inw(__io(port))
|
|
|
|
#define inl_p(port) inl(__io(port))
|
|
|
|
#define outb_p(x,port) outb(x,__io(port))
|
|
|
|
#define outw_p(x,port) outw(x,__io(port))
|
|
|
|
#define outl_p(x,port) outl(x,__io(port))
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
|
2009-01-07 10:14:39 -05:00
|
|
|
#define ioread8_rep(a,d,c) readsb(a,d,c)
|
|
|
|
#define ioread16_rep(a,d,c) readsw(a,d,c)
|
|
|
|
#define ioread32_rep(a,d,c) readsl(a,d,c)
|
|
|
|
#define iowrite8_rep(a,s,c) writesb(a,s,c)
|
|
|
|
#define iowrite16_rep(a,s,c) writesw(a,s,c)
|
|
|
|
#define iowrite32_rep(a,s,c) writesl(a,s,c)
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
|
|
|
|
#define ioread8(X) readb(X)
|
|
|
|
#define ioread16(X) readw(X)
|
|
|
|
#define ioread32(X) readl(X)
|
|
|
|
#define iowrite8(val,X) writeb(val,X)
|
|
|
|
#define iowrite16(val,X) writew(val,X)
|
|
|
|
#define iowrite32(val,X) writel(val,X)
|
|
|
|
|
2008-11-18 04:48:21 -05:00
|
|
|
#define mmiowb() wmb()
|
|
|
|
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
#define IO_SPACE_LIMIT 0xffffffff
|
|
|
|
|
|
|
|
/* Values for nocacheflag and cmode */
|
|
|
|
#define IOMAP_NOCACHE_SER 1
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2007-10-09 03:09:49 -04:00
|
|
|
extern void outsb(unsigned long port, const void *addr, unsigned long count);
|
|
|
|
extern void outsw(unsigned long port, const void *addr, unsigned long count);
|
2008-05-17 04:38:52 -04:00
|
|
|
extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
|
2007-10-09 03:09:49 -04:00
|
|
|
extern void outsl(unsigned long port, const void *addr, unsigned long count);
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
|
2007-10-09 03:09:49 -04:00
|
|
|
extern void insb(unsigned long port, void *addr, unsigned long count);
|
|
|
|
extern void insw(unsigned long port, void *addr, unsigned long count);
|
2008-05-17 04:38:52 -04:00
|
|
|
extern void insw_8(unsigned long port, void *addr, unsigned long count);
|
2007-10-09 03:09:49 -04:00
|
|
|
extern void insl(unsigned long port, void *addr, unsigned long count);
|
2007-11-17 10:46:58 -05:00
|
|
|
extern void insl_16(unsigned long port, void *addr, unsigned long count);
|
2007-05-21 06:09:17 -04:00
|
|
|
|
2007-10-09 03:09:49 -04:00
|
|
|
extern void dma_outsb(unsigned long port, const void *addr, unsigned short count);
|
|
|
|
extern void dma_outsw(unsigned long port, const void *addr, unsigned short count);
|
|
|
|
extern void dma_outsl(unsigned long port, const void *addr, unsigned short count);
|
2007-05-21 06:09:17 -04:00
|
|
|
|
2007-10-09 03:09:49 -04:00
|
|
|
extern void dma_insb(unsigned long port, void *addr, unsigned short count);
|
|
|
|
extern void dma_insw(unsigned long port, void *addr, unsigned short count);
|
|
|
|
extern void dma_insl(unsigned long port, void *addr, unsigned short count);
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
|
2008-10-16 10:31:56 -04:00
|
|
|
static inline void readsl(const void __iomem *addr, void *buf, int len)
|
|
|
|
{
|
|
|
|
insl((unsigned long)addr, buf, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void readsw(const void __iomem *addr, void *buf, int len)
|
|
|
|
{
|
|
|
|
insw((unsigned long)addr, buf, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void readsb(const void __iomem *addr, void *buf, int len)
|
|
|
|
{
|
|
|
|
insb((unsigned long)addr, buf, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void writesl(const void __iomem *addr, const void *buf, int len)
|
|
|
|
{
|
|
|
|
outsl((unsigned long)addr, buf, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void writesw(const void __iomem *addr, const void *buf, int len)
|
|
|
|
{
|
|
|
|
outsw((unsigned long)addr, buf, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void writesb(const void __iomem *addr, const void *buf, int len)
|
|
|
|
{
|
|
|
|
outsb((unsigned long)addr, buf, len);
|
|
|
|
}
|
|
|
|
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 17:50:22 -04:00
|
|
|
/*
|
|
|
|
* Map some physical address range into the kernel address space.
|
|
|
|
*/
|
|
|
|
static inline void __iomem *__ioremap(unsigned long physaddr, unsigned long size,
|
|
|
|
int cacheflag)
|
|
|
|
{
|
|
|
|
return (void __iomem *)physaddr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Unmap a ioremap()ed region again
|
|
|
|
*/
|
|
|
|
static inline void iounmap(void *addr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* __iounmap unmaps nearly everything, so be careful
|
|
|
|
* it doesn't free currently pointer/page tables anymore but it
|
|
|
|
* wans't used anyway and might be added later.
|
|
|
|
*/
|
|
|
|
static inline void __iounmap(void *addr, unsigned long size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set new cache mode for some kernel address space.
|
|
|
|
* The caller must push data for that range itself, if such data may already
|
|
|
|
* be in the cache.
|
|
|
|
*/
|
|
|
|
static inline void kernel_set_cachemode(void *addr, unsigned long size,
|
|
|
|
int cmode)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
|
|
|
|
{
|
|
|
|
return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
|
|
|
|
}
|
|
|
|
static inline void __iomem *ioremap_nocache(unsigned long physaddr,
|
|
|
|
unsigned long size)
|
|
|
|
{
|
|
|
|
return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern void blkfin_inv_cache_all(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define ioport_map(port, nr) ((void __iomem*)(port))
|
|
|
|
#define ioport_unmap(addr)
|
|
|
|
|
|
|
|
/* Pages to physical address... */
|
|
|
|
#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
|
|
|
|
#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT)
|
|
|
|
|
|
|
|
#define phys_to_virt(vaddr) ((void *) (vaddr))
|
|
|
|
#define virt_to_phys(vaddr) ((unsigned long) (vaddr))
|
|
|
|
|
|
|
|
#define virt_to_bus virt_to_phys
|
|
|
|
#define bus_to_virt phys_to_virt
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
|
|
|
|
* access
|
|
|
|
*/
|
|
|
|
#define xlate_dev_mem_ptr(p) __va(p)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Convert a virtual cached pointer to an uncached pointer
|
|
|
|
*/
|
|
|
|
#define xlate_dev_kmem_ptr(p) p
|
|
|
|
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
|
|
|
|
#endif /* _BFIN_IO_H */
|