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 15:50:22 -06:00
|
|
|
/*
|
2009-09-24 08:11:24 -06:00
|
|
|
* Set up the interrupt priorities
|
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 15:50:22 -06:00
|
|
|
*
|
2009-09-24 08:11:24 -06:00
|
|
|
* Copyright 2004-2009 Analog Devices Inc.
|
|
|
|
* 2003 Bas Vermeulen <bas@buyways.nl>
|
|
|
|
* 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca>
|
|
|
|
* 2000-2001 Lineo, Inc. D. Jefff Dionne <jeff@lineo.ca>
|
|
|
|
* 1999 D. Jeff Dionne <jeff@uclinux.org>
|
|
|
|
* 1996 Roman Zippel
|
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 15:50:22 -06:00
|
|
|
*
|
2009-09-24 08:11:24 -06:00
|
|
|
* Licensed under the GPL-2
|
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 15:50:22 -06:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/kernel_stat.h>
|
|
|
|
#include <linux/seq_file.h>
|
|
|
|
#include <linux/irq.h>
|
2011-03-17 00:12:48 -06:00
|
|
|
#include <linux/sched.h>
|
2012-05-16 03:56:51 -06:00
|
|
|
#include <linux/syscore_ops.h>
|
|
|
|
#include <asm/delay.h>
|
2009-01-07 08:14:39 -07:00
|
|
|
#ifdef CONFIG_IPIPE
|
|
|
|
#include <linux/ipipe.h>
|
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
#include <asm/traps.h>
|
|
|
|
#include <asm/blackfin.h>
|
|
|
|
#include <asm/gpio.h>
|
|
|
|
#include <asm/irq_handler.h>
|
2009-10-15 11:12:05 -06:00
|
|
|
#include <asm/dpmc.h>
|
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 15:50:22 -06:00
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
|
|
|
# define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1))
|
|
|
|
#else
|
|
|
|
# define SIC_SYSIRQ(irq) ((irq) - IVG15)
|
|
|
|
#endif
|
2008-11-18 02:48:22 -07:00
|
|
|
|
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 15:50:22 -06:00
|
|
|
/*
|
|
|
|
* NOTES:
|
|
|
|
* - we have separated the physical Hardware interrupt from the
|
|
|
|
* levels that the LINUX kernel sees (see the description in irq.h)
|
|
|
|
* -
|
|
|
|
*/
|
|
|
|
|
2009-01-07 08:14:39 -07:00
|
|
|
#ifndef CONFIG_SMP
|
2007-10-21 10:19:31 -06:00
|
|
|
/* Initialize this to an actual value to force it into the .data
|
|
|
|
* section so that we know it is properly initialized at entry into
|
|
|
|
* the kernel but before bss is initialized to zero (which is where
|
|
|
|
* it would live otherwise). The 0x1f magic represents the IRQs we
|
|
|
|
* cannot actually mask out in hardware.
|
|
|
|
*/
|
2008-11-18 02:48:22 -07:00
|
|
|
unsigned long bfin_irq_flags = 0x1f;
|
|
|
|
EXPORT_SYMBOL(bfin_irq_flags);
|
2009-01-07 08:14:39 -07:00
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
|
2008-02-08 13:12:37 -07:00
|
|
|
#ifdef CONFIG_PM
|
|
|
|
unsigned long bfin_sic_iwr[3]; /* Up to 3 SIC_IWRx registers */
|
2008-08-05 03:38:41 -06:00
|
|
|
unsigned vr_wakeup;
|
2008-02-08 13:12:37 -07:00
|
|
|
#endif
|
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2011-03-29 22:43:52 -06:00
|
|
|
static struct ivgx {
|
2008-02-24 22:50:20 -07:00
|
|
|
/* irq number for request_irq, available in mach-bf5xx/irq.h */
|
2007-07-12 08:41:45 -06:00
|
|
|
unsigned int irqno;
|
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 15:50:22 -06:00
|
|
|
/* corresponding bit in the SIC_ISR register */
|
2007-07-12 08:41:45 -06:00
|
|
|
unsigned int isrflag;
|
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 15:50:22 -06:00
|
|
|
} ivg_table[NR_PERI_INTS];
|
|
|
|
|
2011-03-29 22:43:52 -06:00
|
|
|
static struct ivg_slice {
|
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 15:50:22 -06:00
|
|
|
/* position of first irq in ivg_table for given ivg */
|
|
|
|
struct ivgx *ifirst;
|
|
|
|
struct ivgx *istop;
|
|
|
|
} ivg7_13[IVG13 - IVG7 + 1];
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Search SIC_IAR and fill tables with the irqvalues
|
|
|
|
* and their positions in the SIC_ISR register.
|
|
|
|
*/
|
|
|
|
static void __init search_IAR(void)
|
|
|
|
{
|
|
|
|
unsigned ivg, irq_pos = 0;
|
|
|
|
for (ivg = 0; ivg <= IVG13 - IVG7; ivg++) {
|
2010-04-22 15:15:00 -06:00
|
|
|
int irqN;
|
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 15:50:22 -06:00
|
|
|
|
2007-07-12 02:17:18 -06:00
|
|
|
ivg7_13[ivg].istop = ivg7_13[ivg].ifirst = &ivg_table[irq_pos];
|
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 15:50:22 -06:00
|
|
|
|
2010-04-22 15:15:00 -06:00
|
|
|
for (irqN = 0; irqN < NR_PERI_INTS; irqN += 4) {
|
|
|
|
int irqn;
|
2012-05-16 03:56:51 -06:00
|
|
|
u32 iar =
|
|
|
|
bfin_read32((unsigned long *)SIC_IAR0 +
|
2010-04-22 15:15:00 -06:00
|
|
|
#if defined(CONFIG_BF51x) || defined(CONFIG_BF52x) || \
|
|
|
|
defined(CONFIG_BF538) || defined(CONFIG_BF539)
|
|
|
|
((irqN % 32) >> 3) + ((irqN / 32) * ((SIC_IAR4 - SIC_IAR0) / 4))
|
2007-10-21 02:54:27 -06:00
|
|
|
#else
|
2010-04-22 15:15:00 -06:00
|
|
|
(irqN >> 3)
|
2007-10-21 02:54:27 -06:00
|
|
|
#endif
|
2010-04-22 15:15:00 -06:00
|
|
|
);
|
|
|
|
for (irqn = irqN; irqn < irqN + 4; ++irqn) {
|
|
|
|
int iar_shift = (irqn & 7) * 4;
|
|
|
|
if (ivg == (0xf & (iar >> iar_shift))) {
|
|
|
|
ivg_table[irq_pos].irqno = IVG7 + irqn;
|
|
|
|
ivg_table[irq_pos].isrflag = 1 << (irqn % 32);
|
|
|
|
ivg7_13[ivg].istop++;
|
|
|
|
irq_pos++;
|
|
|
|
}
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-05-16 03:56:51 -06:00
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
|
|
|
|
/*
|
2008-02-24 22:50:20 -07:00
|
|
|
* This is for core internal IRQs
|
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 15:50:22 -06:00
|
|
|
*/
|
2011-04-15 01:08:20 -06:00
|
|
|
void bfin_ack_noop(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
|
|
|
/* Dummy function. */
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:27 -07:00
|
|
|
static void bfin_core_mask_irq(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:27 -07:00
|
|
|
bfin_irq_flags &= ~(1 << d->irq);
|
2010-10-07 07:08:52 -06:00
|
|
|
if (!hard_irqs_disabled())
|
|
|
|
hard_local_irq_enable();
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:27 -07:00
|
|
|
static void bfin_core_unmask_irq(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:27 -07:00
|
|
|
bfin_irq_flags |= 1 << d->irq;
|
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 15:50:22 -06:00
|
|
|
/*
|
|
|
|
* If interrupts are enabled, IMASK must contain the same value
|
2008-11-18 02:48:22 -07:00
|
|
|
* as bfin_irq_flags. Make sure that invariant holds. If interrupts
|
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 15:50:22 -06:00
|
|
|
* are currently disabled we need not do anything; one of the
|
|
|
|
* callers will take care of setting IMASK to the proper value
|
|
|
|
* when reenabling interrupts.
|
2008-11-18 02:48:22 -07:00
|
|
|
* local_irq_enable just does "STI bfin_irq_flags", so it's exactly
|
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 15:50:22 -06:00
|
|
|
* what we need.
|
|
|
|
*/
|
2010-10-07 07:08:52 -06:00
|
|
|
if (!hard_irqs_disabled())
|
|
|
|
hard_local_irq_enable();
|
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 15:50:22 -06:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-04-15 01:08:20 -06:00
|
|
|
void bfin_internal_mask_irq(unsigned int irq)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-04-14 23:35:53 -06:00
|
|
|
unsigned long flags = hard_local_irq_save();
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2011-04-14 23:35:53 -06:00
|
|
|
#ifdef SIC_IMASK0
|
|
|
|
unsigned mask_bank = SIC_SYSIRQ(irq) / 32;
|
|
|
|
unsigned mask_bit = SIC_SYSIRQ(irq) % 32;
|
2007-07-12 03:26:31 -06:00
|
|
|
bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) &
|
2012-05-16 03:56:51 -06:00
|
|
|
~(1 << mask_bit));
|
|
|
|
# if defined(CONFIG_SMP) || defined(CONFIG_ICC)
|
2009-01-07 08:14:39 -07:00
|
|
|
bfin_write_SICB_IMASK(mask_bank, bfin_read_SICB_IMASK(mask_bank) &
|
2012-05-16 03:56:51 -06:00
|
|
|
~(1 << mask_bit));
|
2011-04-14 23:35:53 -06:00
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
|
2012-05-16 03:56:51 -06:00
|
|
|
~(1 << SIC_SYSIRQ(irq)));
|
|
|
|
#endif /* end of SIC_IMASK0 */
|
2009-01-07 08:14:39 -07:00
|
|
|
#endif
|
2010-10-07 07:08:52 -06:00
|
|
|
hard_local_irq_restore(flags);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:29 -07:00
|
|
|
static void bfin_internal_mask_irq_chip(struct irq_data *d)
|
|
|
|
{
|
|
|
|
bfin_internal_mask_irq(d->irq);
|
|
|
|
}
|
|
|
|
|
2009-12-28 00:29:57 -07:00
|
|
|
#ifdef CONFIG_SMP
|
2012-05-16 03:56:51 -06:00
|
|
|
void bfin_internal_unmask_irq_affinity(unsigned int irq,
|
2009-12-28 00:29:57 -07:00
|
|
|
const struct cpumask *affinity)
|
|
|
|
#else
|
2011-04-15 01:08:20 -06:00
|
|
|
void bfin_internal_unmask_irq(unsigned int irq)
|
2009-12-28 00:29:57 -07:00
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
{
|
2011-04-14 23:35:53 -06:00
|
|
|
unsigned long flags = hard_local_irq_save();
|
2009-03-04 01:52:38 -07:00
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2011-04-14 23:35:53 -06:00
|
|
|
#ifdef SIC_IMASK0
|
|
|
|
unsigned mask_bank = SIC_SYSIRQ(irq) / 32;
|
|
|
|
unsigned mask_bit = SIC_SYSIRQ(irq) % 32;
|
|
|
|
# ifdef CONFIG_SMP
|
2009-12-28 00:29:57 -07:00
|
|
|
if (cpumask_test_cpu(0, affinity))
|
2011-04-14 23:35:53 -06:00
|
|
|
# endif
|
2009-12-28 00:29:57 -07:00
|
|
|
bfin_write_SIC_IMASK(mask_bank,
|
2012-05-16 03:56:51 -06:00
|
|
|
bfin_read_SIC_IMASK(mask_bank) |
|
|
|
|
(1 << mask_bit));
|
2011-04-14 23:35:53 -06:00
|
|
|
# ifdef CONFIG_SMP
|
2009-12-28 00:29:57 -07:00
|
|
|
if (cpumask_test_cpu(1, affinity))
|
|
|
|
bfin_write_SICB_IMASK(mask_bank,
|
2012-05-16 03:56:51 -06:00
|
|
|
bfin_read_SICB_IMASK(mask_bank) |
|
|
|
|
(1 << mask_bit));
|
2011-04-14 23:35:53 -06:00
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() |
|
2012-05-16 03:56:51 -06:00
|
|
|
(1 << SIC_SYSIRQ(irq)));
|
|
|
|
#endif
|
2009-01-07 08:14:39 -07:00
|
|
|
#endif
|
2012-05-16 03:56:51 -06:00
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef CONFIG_BF60x
|
|
|
|
static void bfin_sec_preflow_handler(struct irq_data *d)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
unsigned int sid = SIC_SYSIRQ(d->irq);
|
|
|
|
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CSID, sid);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_mask_ack_irq(struct irq_data *d)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
unsigned int sid = SIC_SYSIRQ(d->irq);
|
|
|
|
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CSID, sid);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_unmask_irq(struct irq_data *d)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
unsigned int sid = SIC_SYSIRQ(d->irq);
|
|
|
|
|
|
|
|
bfin_write32(SEC_END, sid);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_enable_ssi(unsigned int sid)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
uint32_t reg_sctl = bfin_read_SEC_SCTL(sid);
|
|
|
|
|
|
|
|
reg_sctl |= SEC_SCTL_SRC_EN;
|
|
|
|
bfin_write_SEC_SCTL(sid, reg_sctl);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_disable_ssi(unsigned int sid)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
uint32_t reg_sctl = bfin_read_SEC_SCTL(sid);
|
|
|
|
|
|
|
|
reg_sctl &= ((uint32_t)~SEC_SCTL_SRC_EN);
|
|
|
|
bfin_write_SEC_SCTL(sid, reg_sctl);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_set_ssi_coreid(unsigned int sid, unsigned int coreid)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
uint32_t reg_sctl = bfin_read_SEC_SCTL(sid);
|
|
|
|
|
|
|
|
reg_sctl &= ((uint32_t)~SEC_SCTL_CTG);
|
|
|
|
bfin_write_SEC_SCTL(sid, reg_sctl | ((coreid << 20) & SEC_SCTL_CTG));
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_enable_sci(unsigned int sid)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
uint32_t reg_sctl = bfin_read_SEC_SCTL(sid);
|
|
|
|
|
|
|
|
if (sid == SIC_SYSIRQ(IRQ_WATCH0))
|
|
|
|
reg_sctl |= SEC_SCTL_FAULT_EN;
|
|
|
|
else
|
|
|
|
reg_sctl |= SEC_SCTL_INT_EN;
|
|
|
|
bfin_write_SEC_SCTL(sid, reg_sctl);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_disable_sci(unsigned int sid)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
uint32_t reg_sctl = bfin_read_SEC_SCTL(sid);
|
|
|
|
|
|
|
|
reg_sctl &= ((uint32_t)~SEC_SCTL_INT_EN);
|
|
|
|
bfin_write_SEC_SCTL(sid, reg_sctl);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_enable(struct irq_data *d)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
unsigned int sid = SIC_SYSIRQ(d->irq);
|
|
|
|
|
|
|
|
bfin_sec_enable_sci(sid);
|
|
|
|
bfin_sec_enable_ssi(sid);
|
2011-04-14 23:35:53 -06:00
|
|
|
|
2010-10-07 07:08:52 -06:00
|
|
|
hard_local_irq_restore(flags);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
static void bfin_sec_disable(struct irq_data *d)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
unsigned int sid = SIC_SYSIRQ(d->irq);
|
|
|
|
|
|
|
|
bfin_sec_disable_sci(sid);
|
|
|
|
bfin_sec_disable_ssi(sid);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void bfin_sec_raise_irq(unsigned int sid)
|
|
|
|
{
|
|
|
|
unsigned long flags = hard_local_irq_save();
|
|
|
|
|
|
|
|
bfin_write32(SEC_RAISE, sid);
|
|
|
|
|
|
|
|
hard_local_irq_restore(flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void init_software_driven_irq(void)
|
|
|
|
{
|
|
|
|
bfin_sec_set_ssi_coreid(34, 0);
|
|
|
|
bfin_sec_set_ssi_coreid(35, 1);
|
|
|
|
bfin_sec_set_ssi_coreid(36, 0);
|
|
|
|
bfin_sec_set_ssi_coreid(37, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void bfin_sec_resume(void)
|
|
|
|
{
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CCTL, SEC_CCTL_RESET);
|
|
|
|
udelay(100);
|
|
|
|
bfin_write_SEC_GCTL(SEC_GCTL_EN);
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CCTL, SEC_CCTL_EN | SEC_CCTL_NMI_EN);
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_sec_sfi_fault(uint32_t gstat)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_sec_sci_fault(uint32_t gstat)
|
|
|
|
{
|
|
|
|
uint32_t core_id;
|
|
|
|
uint32_t cstat;
|
|
|
|
|
|
|
|
core_id = gstat & SEC_GSTAT_SCI;
|
|
|
|
cstat = bfin_read_SEC_SCI(core_id, SEC_CSTAT);
|
|
|
|
if (cstat & SEC_CSTAT_ERR) {
|
|
|
|
switch (cstat & SEC_CSTAT_ERRC) {
|
|
|
|
case SEC_CSTAT_ACKERR:
|
|
|
|
printk(KERN_DEBUG "sec ack err\n");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
printk(KERN_DEBUG "sec sci unknow err\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_sec_ssi_fault(uint32_t gstat)
|
|
|
|
{
|
|
|
|
uint32_t sid;
|
|
|
|
uint32_t sstat;
|
|
|
|
|
|
|
|
sid = gstat & SEC_GSTAT_SID;
|
|
|
|
sstat = bfin_read_SEC_SSTAT(sid);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void handle_sec_fault(unsigned int irq, struct irq_desc *desc)
|
|
|
|
{
|
|
|
|
uint32_t sec_gstat;
|
|
|
|
|
|
|
|
raw_spin_lock(&desc->lock);
|
|
|
|
|
|
|
|
sec_gstat = bfin_read32(SEC_GSTAT);
|
|
|
|
if (sec_gstat & SEC_GSTAT_ERR) {
|
|
|
|
|
|
|
|
switch (sec_gstat & SEC_GSTAT_ERRC) {
|
|
|
|
case 0:
|
|
|
|
handle_sec_sfi_fault(sec_gstat);
|
|
|
|
break;
|
|
|
|
case SEC_GSTAT_SCIERR:
|
|
|
|
handle_sec_sci_fault(sec_gstat);
|
|
|
|
break;
|
|
|
|
case SEC_GSTAT_SSIERR:
|
|
|
|
handle_sec_ssi_fault(sec_gstat);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
raw_spin_unlock(&desc->lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int sec_suspend(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void sec_resume(void)
|
|
|
|
{
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CCTL, SEC_CCTL_RESET);
|
|
|
|
udelay(100);
|
|
|
|
bfin_write_SEC_GCTL(SEC_GCTL_EN);
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CCTL, SEC_CCTL_EN | SEC_CCTL_NMI_EN);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct syscore_ops sec_pm_syscore_ops = {
|
|
|
|
.suspend = sec_suspend,
|
|
|
|
.resume = sec_resume,
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2009-12-28 00:29:57 -07:00
|
|
|
#ifdef CONFIG_SMP
|
2011-02-06 11:23:29 -07:00
|
|
|
static void bfin_internal_unmask_irq_chip(struct irq_data *d)
|
2009-12-28 00:29:57 -07:00
|
|
|
{
|
2011-02-06 11:23:29 -07:00
|
|
|
bfin_internal_unmask_irq_affinity(d->irq, d->affinity);
|
2009-12-28 00:29:57 -07:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:29 -07:00
|
|
|
static int bfin_internal_set_affinity(struct irq_data *d,
|
|
|
|
const struct cpumask *mask, bool force)
|
2009-12-28 00:29:57 -07:00
|
|
|
{
|
2011-02-06 11:23:29 -07:00
|
|
|
bfin_internal_mask_irq(d->irq);
|
|
|
|
bfin_internal_unmask_irq_affinity(d->irq, mask);
|
2009-12-28 00:29:57 -07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2011-02-06 11:23:29 -07:00
|
|
|
#else
|
|
|
|
static void bfin_internal_unmask_irq_chip(struct irq_data *d)
|
|
|
|
{
|
|
|
|
bfin_internal_unmask_irq(d->irq);
|
|
|
|
}
|
2009-12-28 00:29:57 -07:00
|
|
|
#endif
|
|
|
|
|
2012-05-17 03:29:54 -06:00
|
|
|
#if defined(CONFIG_PM) && !defined(CONFIG_BF60x)
|
2008-02-08 13:12:37 -07:00
|
|
|
int bfin_internal_set_wake(unsigned int irq, unsigned int state)
|
|
|
|
{
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 bank, bit, wakeup = 0;
|
2008-02-08 13:12:37 -07:00
|
|
|
unsigned long flags;
|
2008-02-24 22:50:20 -07:00
|
|
|
bank = SIC_SYSIRQ(irq) / 32;
|
|
|
|
bit = SIC_SYSIRQ(irq) % 32;
|
2008-02-08 13:12:37 -07:00
|
|
|
|
2008-08-05 03:38:41 -06:00
|
|
|
switch (irq) {
|
|
|
|
#ifdef IRQ_RTC
|
|
|
|
case IRQ_RTC:
|
|
|
|
wakeup |= WAKE;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#ifdef IRQ_CAN0_RX
|
|
|
|
case IRQ_CAN0_RX:
|
|
|
|
wakeup |= CANWE;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#ifdef IRQ_CAN1_RX
|
|
|
|
case IRQ_CAN1_RX:
|
|
|
|
wakeup |= CANWE;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#ifdef IRQ_USB_INT0
|
|
|
|
case IRQ_USB_INT0:
|
|
|
|
wakeup |= USBWE;
|
|
|
|
break;
|
|
|
|
#endif
|
2008-08-28 03:32:01 -06:00
|
|
|
#ifdef CONFIG_BF54x
|
2008-08-05 03:38:41 -06:00
|
|
|
case IRQ_CNT:
|
|
|
|
wakeup |= ROTWE;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-10-07 07:08:52 -06:00
|
|
|
flags = hard_local_irq_save();
|
2008-02-08 13:12:37 -07:00
|
|
|
|
2008-08-05 03:38:41 -06:00
|
|
|
if (state) {
|
2008-02-08 13:12:37 -07:00
|
|
|
bfin_sic_iwr[bank] |= (1 << bit);
|
2008-08-05 03:38:41 -06:00
|
|
|
vr_wakeup |= wakeup;
|
|
|
|
|
|
|
|
} else {
|
2008-02-08 13:12:37 -07:00
|
|
|
bfin_sic_iwr[bank] &= ~(1 << bit);
|
2008-08-05 03:38:41 -06:00
|
|
|
vr_wakeup &= ~wakeup;
|
|
|
|
}
|
2008-02-08 13:12:37 -07:00
|
|
|
|
2010-10-07 07:08:52 -06:00
|
|
|
hard_local_irq_restore(flags);
|
2008-02-08 13:12:37 -07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2011-02-06 11:23:29 -07:00
|
|
|
|
|
|
|
static int bfin_internal_set_wake_chip(struct irq_data *d, unsigned int state)
|
|
|
|
{
|
|
|
|
return bfin_internal_set_wake(d->irq, state);
|
|
|
|
}
|
2011-04-14 23:35:53 -06:00
|
|
|
#else
|
2012-05-17 03:29:54 -06:00
|
|
|
# define bfin_internal_set_wake(irq, state)
|
2011-04-14 23:35:53 -06:00
|
|
|
# define bfin_internal_set_wake_chip NULL
|
2008-02-08 13:12:37 -07:00
|
|
|
#endif
|
|
|
|
|
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 15:50:22 -06:00
|
|
|
static struct irq_chip bfin_core_irqchip = {
|
2008-10-08 03:08:15 -06:00
|
|
|
.name = "CORE",
|
2011-02-06 11:23:27 -07:00
|
|
|
.irq_mask = bfin_core_mask_irq,
|
|
|
|
.irq_unmask = bfin_core_unmask_irq,
|
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 15:50:22 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct irq_chip bfin_internal_irqchip = {
|
2008-10-08 03:08:15 -06:00
|
|
|
.name = "INTN",
|
2011-02-06 11:23:29 -07:00
|
|
|
.irq_mask = bfin_internal_mask_irq_chip,
|
|
|
|
.irq_unmask = bfin_internal_unmask_irq_chip,
|
|
|
|
.irq_disable = bfin_internal_mask_irq_chip,
|
|
|
|
.irq_enable = bfin_internal_unmask_irq_chip,
|
2009-12-28 00:29:57 -07:00
|
|
|
#ifdef CONFIG_SMP
|
2011-02-06 11:23:29 -07:00
|
|
|
.irq_set_affinity = bfin_internal_set_affinity,
|
2009-12-28 00:29:57 -07:00
|
|
|
#endif
|
2011-02-06 11:23:29 -07:00
|
|
|
.irq_set_wake = bfin_internal_set_wake_chip,
|
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 15:50:22 -06:00
|
|
|
};
|
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifdef CONFIG_BF60x
|
|
|
|
static struct irq_chip bfin_sec_irqchip = {
|
|
|
|
.name = "SEC",
|
|
|
|
.irq_mask_ack = bfin_sec_mask_ack_irq,
|
|
|
|
.irq_mask = bfin_sec_mask_ack_irq,
|
|
|
|
.irq_unmask = bfin_sec_unmask_irq,
|
|
|
|
.irq_eoi = bfin_sec_unmask_irq,
|
|
|
|
.irq_disable = bfin_sec_disable,
|
|
|
|
.irq_enable = bfin_sec_enable,
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2011-04-15 01:08:20 -06:00
|
|
|
void bfin_handle_irq(unsigned irq)
|
2009-01-07 08:14:39 -07:00
|
|
|
{
|
|
|
|
#ifdef CONFIG_IPIPE
|
|
|
|
struct pt_regs regs; /* Contents not used. */
|
|
|
|
ipipe_trace_irq_entry(irq);
|
|
|
|
__ipipe_handle_irq(irq, ®s);
|
|
|
|
ipipe_trace_irq_exit(irq);
|
|
|
|
#else /* !CONFIG_IPIPE */
|
2011-02-06 11:23:25 -07:00
|
|
|
generic_handle_irq(irq);
|
2009-01-07 08:14:39 -07:00
|
|
|
#endif /* !CONFIG_IPIPE */
|
|
|
|
}
|
|
|
|
|
2010-02-19 08:09:10 -07:00
|
|
|
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
|
|
|
static int mac_stat_int_mask;
|
|
|
|
|
|
|
|
static void bfin_mac_status_ack_irq(unsigned int irq)
|
|
|
|
{
|
|
|
|
switch (irq) {
|
|
|
|
case IRQ_MAC_MMCINT:
|
|
|
|
bfin_write_EMAC_MMC_TIRQS(
|
|
|
|
bfin_read_EMAC_MMC_TIRQE() &
|
|
|
|
bfin_read_EMAC_MMC_TIRQS());
|
|
|
|
bfin_write_EMAC_MMC_RIRQS(
|
|
|
|
bfin_read_EMAC_MMC_RIRQE() &
|
|
|
|
bfin_read_EMAC_MMC_RIRQS());
|
|
|
|
break;
|
|
|
|
case IRQ_MAC_RXFSINT:
|
|
|
|
bfin_write_EMAC_RX_STKY(
|
|
|
|
bfin_read_EMAC_RX_IRQE() &
|
|
|
|
bfin_read_EMAC_RX_STKY());
|
|
|
|
break;
|
|
|
|
case IRQ_MAC_TXFSINT:
|
|
|
|
bfin_write_EMAC_TX_STKY(
|
|
|
|
bfin_read_EMAC_TX_IRQE() &
|
|
|
|
bfin_read_EMAC_TX_STKY());
|
|
|
|
break;
|
|
|
|
case IRQ_MAC_WAKEDET:
|
|
|
|
bfin_write_EMAC_WKUP_CTL(
|
|
|
|
bfin_read_EMAC_WKUP_CTL() | MPKS | RWKS);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
/* These bits are W1C */
|
|
|
|
bfin_write_EMAC_SYSTAT(1L << (irq - IRQ_MAC_PHYINT));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:34 -07:00
|
|
|
static void bfin_mac_status_mask_irq(struct irq_data *d)
|
2010-02-19 08:09:10 -07:00
|
|
|
{
|
2011-02-06 11:23:34 -07:00
|
|
|
unsigned int irq = d->irq;
|
|
|
|
|
2010-02-19 08:09:10 -07:00
|
|
|
mac_stat_int_mask &= ~(1L << (irq - IRQ_MAC_PHYINT));
|
2011-04-15 01:08:20 -06:00
|
|
|
#ifdef BF537_FAMILY
|
2010-02-19 08:09:10 -07:00
|
|
|
switch (irq) {
|
|
|
|
case IRQ_MAC_PHYINT:
|
|
|
|
bfin_write_EMAC_SYSCTL(bfin_read_EMAC_SYSCTL() & ~PHYIE);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
if (!mac_stat_int_mask)
|
|
|
|
bfin_internal_mask_irq(IRQ_MAC_ERROR);
|
|
|
|
#endif
|
|
|
|
bfin_mac_status_ack_irq(irq);
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:34 -07:00
|
|
|
static void bfin_mac_status_unmask_irq(struct irq_data *d)
|
2010-02-19 08:09:10 -07:00
|
|
|
{
|
2011-02-06 11:23:34 -07:00
|
|
|
unsigned int irq = d->irq;
|
|
|
|
|
2011-04-15 01:08:20 -06:00
|
|
|
#ifdef BF537_FAMILY
|
2010-02-19 08:09:10 -07:00
|
|
|
switch (irq) {
|
|
|
|
case IRQ_MAC_PHYINT:
|
|
|
|
bfin_write_EMAC_SYSCTL(bfin_read_EMAC_SYSCTL() | PHYIE);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
if (!mac_stat_int_mask)
|
|
|
|
bfin_internal_unmask_irq(IRQ_MAC_ERROR);
|
|
|
|
#endif
|
|
|
|
mac_stat_int_mask |= 1L << (irq - IRQ_MAC_PHYINT);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef CONFIG_PM
|
2011-02-06 11:23:34 -07:00
|
|
|
int bfin_mac_status_set_wake(struct irq_data *d, unsigned int state)
|
2010-02-19 08:09:10 -07:00
|
|
|
{
|
2011-04-15 01:08:20 -06:00
|
|
|
#ifdef BF537_FAMILY
|
2010-02-19 08:09:10 -07:00
|
|
|
return bfin_internal_set_wake(IRQ_GENERIC_ERROR, state);
|
|
|
|
#else
|
|
|
|
return bfin_internal_set_wake(IRQ_MAC_ERROR, state);
|
|
|
|
#endif
|
|
|
|
}
|
2011-04-14 23:35:53 -06:00
|
|
|
#else
|
|
|
|
# define bfin_mac_status_set_wake NULL
|
2010-02-19 08:09:10 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static struct irq_chip bfin_mac_status_irqchip = {
|
|
|
|
.name = "MACST",
|
2011-02-06 11:23:34 -07:00
|
|
|
.irq_mask = bfin_mac_status_mask_irq,
|
|
|
|
.irq_unmask = bfin_mac_status_unmask_irq,
|
|
|
|
.irq_set_wake = bfin_mac_status_set_wake,
|
2010-02-19 08:09:10 -07:00
|
|
|
};
|
|
|
|
|
2011-04-15 01:08:20 -06:00
|
|
|
void bfin_demux_mac_status_irq(unsigned int int_err_irq,
|
|
|
|
struct irq_desc *inta_desc)
|
2010-02-19 08:09:10 -07:00
|
|
|
{
|
|
|
|
int i, irq = 0;
|
|
|
|
u32 status = bfin_read_EMAC_SYSTAT();
|
|
|
|
|
2010-08-20 05:59:27 -06:00
|
|
|
for (i = 0; i <= (IRQ_MAC_STMDONE - IRQ_MAC_PHYINT); i++)
|
2010-02-19 08:09:10 -07:00
|
|
|
if (status & (1L << i)) {
|
|
|
|
irq = IRQ_MAC_PHYINT + i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (irq) {
|
|
|
|
if (mac_stat_int_mask & (1L << (irq - IRQ_MAC_PHYINT))) {
|
|
|
|
bfin_handle_irq(irq);
|
|
|
|
} else {
|
|
|
|
bfin_mac_status_ack_irq(irq);
|
|
|
|
pr_debug("IRQ %d:"
|
2012-05-16 03:56:51 -06:00
|
|
|
" MASKED MAC ERROR INTERRUPT ASSERTED\n",
|
|
|
|
irq);
|
2010-02-19 08:09:10 -07:00
|
|
|
}
|
|
|
|
} else
|
|
|
|
printk(KERN_ERR
|
2012-05-16 03:56:51 -06:00
|
|
|
"%s : %s : LINE %d :\nIRQ ?: MAC ERROR"
|
|
|
|
" INTERRUPT ASSERTED BUT NO SOURCE FOUND"
|
|
|
|
"(EMAC_SYSTAT=0x%X)\n",
|
|
|
|
__func__, __FILE__, __LINE__, status);
|
2010-02-19 08:09:10 -07:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-10-08 04:02:44 -06:00
|
|
|
static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle)
|
|
|
|
{
|
2009-01-07 08:14:39 -07:00
|
|
|
#ifdef CONFIG_IPIPE
|
2011-03-17 00:12:48 -06:00
|
|
|
handle = handle_level_irq;
|
2009-01-07 08:14:39 -07:00
|
|
|
#endif
|
2011-03-24 10:22:30 -06:00
|
|
|
__irq_set_handler_locked(irq, handle);
|
2008-10-08 04:02:44 -06:00
|
|
|
}
|
|
|
|
|
2008-11-18 02:48:22 -07:00
|
|
|
static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS);
|
2008-04-23 18:10:10 -06:00
|
|
|
extern void bfin_gpio_irq_prepare(unsigned gpio);
|
2007-12-24 01:56:12 -07:00
|
|
|
|
2011-06-26 11:56:23 -06:00
|
|
|
#if !BFIN_GPIO_PINT
|
2008-11-18 02:48:22 -07:00
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_ack_irq(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2008-11-18 02:48:22 -07:00
|
|
|
/* AFAIK ack_irq in case mask_ack is provided
|
|
|
|
* get's only called for edge sense irqs
|
|
|
|
*/
|
2011-02-06 11:23:36 -07:00
|
|
|
set_gpio_data(irq_to_gpio(d->irq), 0);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_mask_ack_irq(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
unsigned int irq = d->irq;
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 gpionr = irq_to_gpio(irq);
|
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 15:50:22 -06:00
|
|
|
|
2011-03-24 10:21:01 -06:00
|
|
|
if (!irqd_is_level_type(d))
|
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 15:50:22 -06:00
|
|
|
set_gpio_data(gpionr, 0);
|
|
|
|
|
|
|
|
set_gpio_maska(gpionr, 0);
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_mask_irq(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
set_gpio_maska(irq_to_gpio(d->irq), 0);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_unmask_irq(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
set_gpio_maska(irq_to_gpio(d->irq), 1);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static unsigned int bfin_gpio_irq_startup(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 gpionr = irq_to_gpio(d->irq);
|
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 15:50:22 -06:00
|
|
|
|
2008-11-18 02:48:22 -07:00
|
|
|
if (__test_and_set_bit(gpionr, gpio_enabled))
|
2008-04-23 18:10:10 -06:00
|
|
|
bfin_gpio_irq_prepare(gpionr);
|
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 15:50:22 -06:00
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
bfin_gpio_unmask_irq(d);
|
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 15:50:22 -06:00
|
|
|
|
2008-04-23 18:10:10 -06:00
|
|
|
return 0;
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_irq_shutdown(struct irq_data *d)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 gpionr = irq_to_gpio(d->irq);
|
2008-11-18 02:48:21 -07:00
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
bfin_gpio_mask_irq(d);
|
2008-11-18 02:48:21 -07:00
|
|
|
__clear_bit(gpionr, gpio_enabled);
|
2009-01-07 08:14:38 -07:00
|
|
|
bfin_gpio_irq_free(gpionr);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
unsigned int irq = d->irq;
|
2008-11-18 02:48:22 -07:00
|
|
|
int ret;
|
|
|
|
char buf[16];
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 gpionr = irq_to_gpio(irq);
|
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 15:50:22 -06:00
|
|
|
|
|
|
|
if (type == IRQ_TYPE_PROBE) {
|
|
|
|
/* only probe unenabled GPIO interrupt lines */
|
2009-06-13 08:32:29 -06:00
|
|
|
if (test_bit(gpionr, gpio_enabled))
|
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 15:50:22 -06:00
|
|
|
return 0;
|
|
|
|
type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
|
2007-07-12 02:17:18 -06:00
|
|
|
IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
|
2008-11-18 02:48:22 -07:00
|
|
|
|
2009-01-07 08:14:38 -07:00
|
|
|
snprintf(buf, 16, "gpio-irq%d", irq);
|
|
|
|
ret = bfin_gpio_irq_request(gpionr, buf);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
2008-11-18 02:48:22 -07:00
|
|
|
if (__test_and_set_bit(gpionr, gpio_enabled))
|
2008-04-23 18:10:10 -06:00
|
|
|
bfin_gpio_irq_prepare(gpionr);
|
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 15:50:22 -06:00
|
|
|
|
|
|
|
} else {
|
2008-11-18 02:48:22 -07:00
|
|
|
__clear_bit(gpionr, gpio_enabled);
|
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 15:50:22 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-02-02 01:17:52 -07:00
|
|
|
set_gpio_inen(gpionr, 0);
|
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 15:50:22 -06:00
|
|
|
set_gpio_dir(gpionr, 0);
|
|
|
|
|
|
|
|
if ((type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
|
|
|
|
== (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
|
|
|
|
set_gpio_both(gpionr, 1);
|
|
|
|
else
|
|
|
|
set_gpio_both(gpionr, 0);
|
|
|
|
|
|
|
|
if ((type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)))
|
|
|
|
set_gpio_polar(gpionr, 1); /* low or falling edge denoted by one */
|
|
|
|
else
|
|
|
|
set_gpio_polar(gpionr, 0); /* high or rising edge denoted by zero */
|
|
|
|
|
2008-02-02 01:17:52 -07:00
|
|
|
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
|
|
|
|
set_gpio_edge(gpionr, 1);
|
|
|
|
set_gpio_inen(gpionr, 1);
|
|
|
|
set_gpio_data(gpionr, 0);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
set_gpio_edge(gpionr, 0);
|
|
|
|
set_gpio_inen(gpionr, 1);
|
|
|
|
}
|
|
|
|
|
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 15:50:22 -06:00
|
|
|
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
|
2008-10-08 04:02:44 -06:00
|
|
|
bfin_set_irq_handler(irq, handle_edge_irq);
|
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 15:50:22 -06:00
|
|
|
else
|
2008-10-08 04:02:44 -06:00
|
|
|
bfin_set_irq_handler(irq, handle_level_irq);
|
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 15:50:22 -06:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-02-08 13:12:37 -07:00
|
|
|
#ifdef CONFIG_PM
|
2011-04-15 01:19:22 -06:00
|
|
|
static int bfin_gpio_set_wake(struct irq_data *d, unsigned int state)
|
2008-02-08 13:12:37 -07:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
return gpio_pm_wakeup_ctrl(irq_to_gpio(d->irq), state);
|
2008-02-08 13:12:37 -07:00
|
|
|
}
|
2011-04-14 23:35:53 -06:00
|
|
|
#else
|
|
|
|
# define bfin_gpio_set_wake NULL
|
2008-02-08 13:12:37 -07:00
|
|
|
#endif
|
|
|
|
|
2011-04-15 10:51:33 -06:00
|
|
|
static void bfin_demux_gpio_block(unsigned int irq)
|
|
|
|
{
|
|
|
|
unsigned int gpio, mask;
|
|
|
|
|
|
|
|
gpio = irq_to_gpio(irq);
|
|
|
|
mask = get_gpiop_data(gpio) & get_gpiop_maska(gpio);
|
|
|
|
|
|
|
|
while (mask) {
|
|
|
|
if (mask & 1)
|
|
|
|
bfin_handle_irq(irq);
|
|
|
|
irq++;
|
|
|
|
mask >>= 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-15 11:04:59 -06:00
|
|
|
void bfin_demux_gpio_irq(unsigned int inta_irq,
|
2012-05-16 03:56:51 -06:00
|
|
|
struct irq_desc *desc)
|
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 15:50:22 -06:00
|
|
|
{
|
2011-04-15 10:51:33 -06:00
|
|
|
unsigned int irq;
|
2008-02-08 13:11:14 -07:00
|
|
|
|
|
|
|
switch (inta_irq) {
|
2011-04-15 10:51:33 -06:00
|
|
|
#if defined(BF537_FAMILY)
|
2011-04-15 11:04:59 -06:00
|
|
|
case IRQ_PF_INTA_PG_INTA:
|
2011-04-15 10:51:33 -06:00
|
|
|
bfin_demux_gpio_block(IRQ_PF0);
|
|
|
|
irq = IRQ_PG0;
|
2008-02-08 13:11:14 -07:00
|
|
|
break;
|
2011-04-15 11:04:59 -06:00
|
|
|
case IRQ_PH_INTA_MAC_RX:
|
2008-02-08 13:11:14 -07:00
|
|
|
irq = IRQ_PH0;
|
|
|
|
break;
|
2011-04-15 10:51:33 -06:00
|
|
|
#elif defined(BF533_FAMILY)
|
|
|
|
case IRQ_PROG_INTA:
|
|
|
|
irq = IRQ_PF0;
|
|
|
|
break;
|
2011-04-14 23:35:53 -06:00
|
|
|
#elif defined(BF538_FAMILY)
|
2008-11-18 02:48:22 -07:00
|
|
|
case IRQ_PORTF_INTA:
|
|
|
|
irq = IRQ_PF0;
|
|
|
|
break;
|
2008-11-18 02:48:21 -07:00
|
|
|
#elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x)
|
2008-02-08 13:11:14 -07:00
|
|
|
case IRQ_PORTF_INTA:
|
|
|
|
irq = IRQ_PF0;
|
|
|
|
break;
|
|
|
|
case IRQ_PORTG_INTA:
|
|
|
|
irq = IRQ_PG0;
|
|
|
|
break;
|
|
|
|
case IRQ_PORTH_INTA:
|
|
|
|
irq = IRQ_PH0;
|
|
|
|
break;
|
|
|
|
#elif defined(CONFIG_BF561)
|
|
|
|
case IRQ_PROG0_INTA:
|
|
|
|
irq = IRQ_PF0;
|
|
|
|
break;
|
|
|
|
case IRQ_PROG1_INTA:
|
|
|
|
irq = IRQ_PF16;
|
|
|
|
break;
|
|
|
|
case IRQ_PROG2_INTA:
|
|
|
|
irq = IRQ_PF32;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
default:
|
|
|
|
BUG();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-04-15 10:51:33 -06:00
|
|
|
bfin_demux_gpio_block(irq);
|
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 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
2011-06-26 11:56:23 -06:00
|
|
|
#else
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
# ifndef CONFIG_BF60x
|
2007-07-12 02:17:18 -06:00
|
|
|
#define NR_PINT_SYS_IRQS 4
|
|
|
|
#define NR_PINTS 160
|
2012-05-16 03:56:51 -06:00
|
|
|
# else
|
|
|
|
#define NR_PINT_SYS_IRQS 6
|
|
|
|
#define NR_PINTS 112
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define NR_PINT_BITS 32
|
2007-07-12 02:17:18 -06:00
|
|
|
#define IRQ_NOT_AVAIL 0xFF
|
|
|
|
|
|
|
|
#define PINT_2_BANK(x) ((x) >> 5)
|
|
|
|
#define PINT_2_BIT(x) ((x) & 0x1F)
|
|
|
|
#define PINT_BIT(x) (1 << (PINT_2_BIT(x)))
|
|
|
|
|
|
|
|
static unsigned char irq2pint_lut[NR_PINTS];
|
2007-07-12 02:39:29 -06:00
|
|
|
static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS];
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2011-06-26 11:22:05 -06:00
|
|
|
static struct bfin_pint_regs * const pint[NR_PINT_SYS_IRQS] = {
|
|
|
|
(struct bfin_pint_regs *)PINT0_MASK_SET,
|
|
|
|
(struct bfin_pint_regs *)PINT1_MASK_SET,
|
|
|
|
(struct bfin_pint_regs *)PINT2_MASK_SET,
|
|
|
|
(struct bfin_pint_regs *)PINT3_MASK_SET,
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifdef CONFIG_BF60x
|
|
|
|
(struct bfin_pint_regs *)PINT4_MASK_SET,
|
|
|
|
(struct bfin_pint_regs *)PINT5_MASK_SET,
|
|
|
|
#endif
|
2007-07-12 02:17:18 -06:00
|
|
|
};
|
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2008-11-18 02:48:22 -07:00
|
|
|
inline unsigned int get_irq_base(u32 bank, u8 bmap)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2008-11-18 02:48:22 -07:00
|
|
|
unsigned int irq_base;
|
2007-07-12 02:17:18 -06:00
|
|
|
|
|
|
|
if (bank < 2) { /*PA-PB */
|
|
|
|
irq_base = IRQ_PA0 + bmap * 16;
|
|
|
|
} else { /*PC-PJ */
|
|
|
|
irq_base = IRQ_PC0 + bmap * 16;
|
|
|
|
}
|
|
|
|
|
|
|
|
return irq_base;
|
|
|
|
}
|
2012-05-16 03:56:51 -06:00
|
|
|
#else
|
|
|
|
inline unsigned int get_irq_base(u32 bank, u8 bmap)
|
|
|
|
{
|
|
|
|
unsigned int irq_base;
|
|
|
|
|
|
|
|
irq_base = IRQ_PA0 + bank * 16 + bmap * 16;
|
|
|
|
|
|
|
|
return irq_base;
|
|
|
|
}
|
|
|
|
#endif
|
2007-07-12 02:17:18 -06:00
|
|
|
|
|
|
|
/* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */
|
|
|
|
void init_pint_lut(void)
|
|
|
|
{
|
|
|
|
u16 bank, bit, irq_base, bit_pos;
|
|
|
|
u32 pint_assign;
|
|
|
|
u8 bmap;
|
|
|
|
|
|
|
|
memset(irq2pint_lut, IRQ_NOT_AVAIL, sizeof(irq2pint_lut));
|
|
|
|
|
|
|
|
for (bank = 0; bank < NR_PINT_SYS_IRQS; bank++) {
|
|
|
|
|
|
|
|
pint_assign = pint[bank]->assign;
|
|
|
|
|
|
|
|
for (bit = 0; bit < NR_PINT_BITS; bit++) {
|
|
|
|
|
|
|
|
bmap = (pint_assign >> ((bit / 8) * 8)) & 0xFF;
|
|
|
|
|
|
|
|
irq_base = get_irq_base(bank, bmap);
|
|
|
|
|
|
|
|
irq_base += (bit % 8) + ((bit / 8) & 1 ? 8 : 0);
|
|
|
|
bit_pos = bit + bank * NR_PINT_BITS;
|
|
|
|
|
2007-07-12 02:39:29 -06:00
|
|
|
pint2irq_lut[bit_pos] = irq_base - SYS_IRQS;
|
2007-07-12 02:17:18 -06:00
|
|
|
irq2pint_lut[irq_base - SYS_IRQS] = bit_pos;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_ack_irq(struct irq_data *d)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
|
2007-12-24 03:51:34 -07:00
|
|
|
u32 pintbit = PINT_BIT(pint_val);
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 bank = PINT_2_BANK(pint_val);
|
2007-12-24 03:51:34 -07:00
|
|
|
|
2011-03-24 10:21:01 -06:00
|
|
|
if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
|
2007-12-24 03:51:34 -07:00
|
|
|
if (pint[bank]->invert_set & pintbit)
|
|
|
|
pint[bank]->invert_clear = pintbit;
|
|
|
|
else
|
|
|
|
pint[bank]->invert_set = pintbit;
|
|
|
|
}
|
|
|
|
pint[bank]->request = pintbit;
|
2007-07-12 02:17:18 -06:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_mask_ack_irq(struct irq_data *d)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
|
2007-07-12 02:39:29 -06:00
|
|
|
u32 pintbit = PINT_BIT(pint_val);
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 bank = PINT_2_BANK(pint_val);
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2011-03-24 10:21:01 -06:00
|
|
|
if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
|
2007-12-24 03:51:34 -07:00
|
|
|
if (pint[bank]->invert_set & pintbit)
|
|
|
|
pint[bank]->invert_clear = pintbit;
|
|
|
|
else
|
|
|
|
pint[bank]->invert_set = pintbit;
|
|
|
|
}
|
|
|
|
|
2007-07-12 02:39:29 -06:00
|
|
|
pint[bank]->request = pintbit;
|
|
|
|
pint[bank]->mask_clear = pintbit;
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_mask_irq(struct irq_data *d)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
|
2007-07-12 02:17:18 -06:00
|
|
|
|
|
|
|
pint[PINT_2_BANK(pint_val)]->mask_clear = PINT_BIT(pint_val);
|
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_unmask_irq(struct irq_data *d)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
|
2007-07-12 02:39:29 -06:00
|
|
|
u32 pintbit = PINT_BIT(pint_val);
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 bank = PINT_2_BANK(pint_val);
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2007-07-12 02:39:29 -06:00
|
|
|
pint[bank]->mask_set = pintbit;
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static unsigned int bfin_gpio_irq_startup(struct irq_data *d)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
unsigned int irq = d->irq;
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 gpionr = irq_to_gpio(irq);
|
|
|
|
u32 pint_val = irq2pint_lut[irq - SYS_IRQS];
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2007-07-24 02:17:28 -06:00
|
|
|
if (pint_val == IRQ_NOT_AVAIL) {
|
|
|
|
printk(KERN_ERR
|
|
|
|
"GPIO IRQ %d :Not in PINT Assign table "
|
|
|
|
"Reconfigure Interrupt to Port Assignemt\n", irq);
|
2007-07-12 02:17:18 -06:00
|
|
|
return -ENODEV;
|
2007-07-24 02:17:28 -06:00
|
|
|
}
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2008-11-18 02:48:22 -07:00
|
|
|
if (__test_and_set_bit(gpionr, gpio_enabled))
|
2008-04-23 18:10:10 -06:00
|
|
|
bfin_gpio_irq_prepare(gpionr);
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
bfin_gpio_unmask_irq(d);
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2008-04-23 18:10:10 -06:00
|
|
|
return 0;
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static void bfin_gpio_irq_shutdown(struct irq_data *d)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 gpionr = irq_to_gpio(d->irq);
|
2007-12-24 03:51:34 -07:00
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
bfin_gpio_mask_irq(d);
|
2008-11-18 02:48:22 -07:00
|
|
|
__clear_bit(gpionr, gpio_enabled);
|
2009-01-07 08:14:38 -07:00
|
|
|
bfin_gpio_irq_free(gpionr);
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
|
|
|
|
2011-02-06 11:23:36 -07:00
|
|
|
static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2011-02-06 11:23:36 -07:00
|
|
|
unsigned int irq = d->irq;
|
2008-11-18 02:48:22 -07:00
|
|
|
int ret;
|
|
|
|
char buf[16];
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 gpionr = irq_to_gpio(irq);
|
|
|
|
u32 pint_val = irq2pint_lut[irq - SYS_IRQS];
|
2007-07-12 02:39:29 -06:00
|
|
|
u32 pintbit = PINT_BIT(pint_val);
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 bank = PINT_2_BANK(pint_val);
|
2007-07-12 02:17:18 -06:00
|
|
|
|
|
|
|
if (pint_val == IRQ_NOT_AVAIL)
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
if (type == IRQ_TYPE_PROBE) {
|
|
|
|
/* only probe unenabled GPIO interrupt lines */
|
2009-06-13 08:32:29 -06:00
|
|
|
if (test_bit(gpionr, gpio_enabled))
|
2007-07-12 02:17:18 -06:00
|
|
|
return 0;
|
|
|
|
type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
|
|
|
|
IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
|
2009-01-07 08:14:38 -07:00
|
|
|
|
|
|
|
snprintf(buf, 16, "gpio-irq%d", irq);
|
|
|
|
ret = bfin_gpio_irq_request(gpionr, buf);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
2008-11-18 02:48:22 -07:00
|
|
|
if (__test_and_set_bit(gpionr, gpio_enabled))
|
2008-04-23 18:10:10 -06:00
|
|
|
bfin_gpio_irq_prepare(gpionr);
|
2007-07-12 02:17:18 -06:00
|
|
|
|
|
|
|
} else {
|
2008-11-18 02:48:22 -07:00
|
|
|
__clear_bit(gpionr, gpio_enabled);
|
2007-07-12 02:17:18 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)))
|
2007-07-12 02:39:29 -06:00
|
|
|
pint[bank]->invert_set = pintbit; /* low or falling edge denoted by one */
|
2007-07-12 02:17:18 -06:00
|
|
|
else
|
2007-12-24 03:51:34 -07:00
|
|
|
pint[bank]->invert_clear = pintbit; /* high or rising edge denoted by zero */
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2007-12-24 03:51:34 -07:00
|
|
|
if ((type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
|
|
|
|
== (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
|
|
|
|
if (gpio_get_value(gpionr))
|
|
|
|
pint[bank]->invert_set = pintbit;
|
|
|
|
else
|
|
|
|
pint[bank]->invert_clear = pintbit;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
|
|
|
|
pint[bank]->edge_set = pintbit;
|
2008-10-08 04:02:44 -06:00
|
|
|
bfin_set_irq_handler(irq, handle_edge_irq);
|
2007-12-24 03:51:34 -07:00
|
|
|
} else {
|
|
|
|
pint[bank]->edge_clear = pintbit;
|
2008-10-08 04:02:44 -06:00
|
|
|
bfin_set_irq_handler(irq, handle_level_irq);
|
2007-12-24 03:51:34 -07:00
|
|
|
}
|
|
|
|
|
2007-07-12 02:17:18 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-02-08 13:12:37 -07:00
|
|
|
#ifdef CONFIG_PM
|
2011-04-15 01:19:22 -06:00
|
|
|
static int bfin_gpio_set_wake(struct irq_data *d, unsigned int state)
|
2008-02-08 13:12:37 -07:00
|
|
|
{
|
|
|
|
u32 pint_irq;
|
2011-02-06 11:23:36 -07:00
|
|
|
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
|
2008-02-08 13:12:37 -07:00
|
|
|
u32 bank = PINT_2_BANK(pint_val);
|
|
|
|
|
|
|
|
switch (bank) {
|
|
|
|
case 0:
|
|
|
|
pint_irq = IRQ_PINT0;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
pint_irq = IRQ_PINT2;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
pint_irq = IRQ_PINT3;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
pint_irq = IRQ_PINT1;
|
|
|
|
break;
|
2012-04-27 00:13:01 -06:00
|
|
|
#ifdef CONFIG_BF60x
|
2012-05-16 03:56:51 -06:00
|
|
|
case 4:
|
|
|
|
pint_irq = IRQ_PINT4;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
pint_irq = IRQ_PINT5;
|
|
|
|
break;
|
2012-04-27 00:13:01 -06:00
|
|
|
#endif
|
2008-02-08 13:12:37 -07:00
|
|
|
default:
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
bfin_internal_set_wake(pint_irq, state);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2011-04-14 23:35:53 -06:00
|
|
|
#else
|
|
|
|
# define bfin_gpio_set_wake NULL
|
2008-02-08 13:12:37 -07:00
|
|
|
#endif
|
|
|
|
|
2011-04-15 11:04:59 -06:00
|
|
|
void bfin_demux_gpio_irq(unsigned int inta_irq,
|
2012-05-16 03:56:51 -06:00
|
|
|
struct irq_desc *desc)
|
2007-07-12 02:17:18 -06:00
|
|
|
{
|
2008-11-18 02:48:22 -07:00
|
|
|
u32 bank, pint_val;
|
2007-07-12 02:17:18 -06:00
|
|
|
u32 request, irq;
|
2012-05-16 03:56:51 -06:00
|
|
|
u32 level_mask;
|
|
|
|
int umask = 0;
|
|
|
|
struct irq_chip *chip = irq_desc_get_chip(desc);
|
|
|
|
|
|
|
|
if (chip->irq_mask_ack) {
|
|
|
|
chip->irq_mask_ack(&desc->irq_data);
|
|
|
|
} else {
|
|
|
|
chip->irq_mask(&desc->irq_data);
|
|
|
|
if (chip->irq_ack)
|
|
|
|
chip->irq_ack(&desc->irq_data);
|
|
|
|
}
|
2007-07-12 02:17:18 -06:00
|
|
|
|
2008-02-08 13:11:14 -07:00
|
|
|
switch (inta_irq) {
|
2007-07-12 02:17:18 -06:00
|
|
|
case IRQ_PINT0:
|
|
|
|
bank = 0;
|
|
|
|
break;
|
|
|
|
case IRQ_PINT2:
|
|
|
|
bank = 2;
|
|
|
|
break;
|
|
|
|
case IRQ_PINT3:
|
|
|
|
bank = 3;
|
|
|
|
break;
|
|
|
|
case IRQ_PINT1:
|
|
|
|
bank = 1;
|
|
|
|
break;
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifdef CONFIG_BF60x
|
|
|
|
case IRQ_PINT4:
|
|
|
|
bank = 4;
|
|
|
|
break;
|
|
|
|
case IRQ_PINT5:
|
|
|
|
bank = 5;
|
|
|
|
break;
|
|
|
|
#endif
|
2007-07-12 02:39:29 -06:00
|
|
|
default:
|
|
|
|
return;
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
pint_val = bank * NR_PINT_BITS;
|
|
|
|
|
|
|
|
request = pint[bank]->request;
|
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
level_mask = pint[bank]->edge_set & request;
|
|
|
|
|
2007-07-12 02:17:18 -06:00
|
|
|
while (request) {
|
|
|
|
if (request & 1) {
|
2007-07-12 02:39:29 -06:00
|
|
|
irq = pint2irq_lut[pint_val] + SYS_IRQS;
|
2012-05-16 03:56:51 -06:00
|
|
|
if (level_mask & PINT_BIT(pint_val)) {
|
|
|
|
umask = 1;
|
|
|
|
chip->irq_unmask(&desc->irq_data);
|
|
|
|
}
|
2009-01-07 08:14:39 -07:00
|
|
|
bfin_handle_irq(irq);
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
|
|
|
pint_val++;
|
|
|
|
request >>= 1;
|
|
|
|
}
|
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
if (!umask)
|
|
|
|
chip->irq_unmask(&desc->irq_data);
|
2007-07-12 02:17:18 -06:00
|
|
|
}
|
2007-11-15 06:12:32 -07:00
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
|
2008-11-18 02:48:22 -07:00
|
|
|
static struct irq_chip bfin_gpio_irqchip = {
|
|
|
|
.name = "GPIO",
|
2011-02-06 11:23:36 -07:00
|
|
|
.irq_ack = bfin_gpio_ack_irq,
|
|
|
|
.irq_mask = bfin_gpio_mask_irq,
|
|
|
|
.irq_mask_ack = bfin_gpio_mask_ack_irq,
|
|
|
|
.irq_unmask = bfin_gpio_unmask_irq,
|
|
|
|
.irq_disable = bfin_gpio_mask_irq,
|
|
|
|
.irq_enable = bfin_gpio_unmask_irq,
|
|
|
|
.irq_set_type = bfin_gpio_irq_type,
|
|
|
|
.irq_startup = bfin_gpio_irq_startup,
|
|
|
|
.irq_shutdown = bfin_gpio_irq_shutdown,
|
|
|
|
.irq_set_wake = bfin_gpio_set_wake,
|
2008-11-18 02:48:22 -07:00
|
|
|
};
|
|
|
|
|
2009-01-07 08:14:39 -07:00
|
|
|
void __cpuinit init_exception_vectors(void)
|
2007-07-25 00:44:49 -06:00
|
|
|
{
|
2007-08-05 03:03:59 -06:00
|
|
|
/* cannot program in software:
|
|
|
|
* evt0 - emulation (jtag)
|
|
|
|
* evt1 - reset
|
|
|
|
*/
|
|
|
|
bfin_write_EVT2(evt_nmi);
|
2007-07-25 00:44:49 -06:00
|
|
|
bfin_write_EVT3(trap);
|
|
|
|
bfin_write_EVT5(evt_ivhw);
|
|
|
|
bfin_write_EVT6(evt_timer);
|
|
|
|
bfin_write_EVT7(evt_evt7);
|
|
|
|
bfin_write_EVT8(evt_evt8);
|
|
|
|
bfin_write_EVT9(evt_evt9);
|
|
|
|
bfin_write_EVT10(evt_evt10);
|
|
|
|
bfin_write_EVT11(evt_evt11);
|
|
|
|
bfin_write_EVT12(evt_evt12);
|
|
|
|
bfin_write_EVT13(evt_evt13);
|
2009-06-22 10:23:48 -06:00
|
|
|
bfin_write_EVT14(evt_evt14);
|
2007-07-25 00:44:49 -06:00
|
|
|
bfin_write_EVT15(evt_system_call);
|
|
|
|
CSYNC();
|
|
|
|
}
|
|
|
|
|
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 15:50:22 -06:00
|
|
|
/*
|
|
|
|
* This function should be called during kernel startup to initialize
|
|
|
|
* the BFin IRQ handling routines.
|
|
|
|
*/
|
2008-11-18 02:48:22 -07:00
|
|
|
|
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 15:50:22 -06:00
|
|
|
int __init init_arch_irq(void)
|
|
|
|
{
|
|
|
|
int irq;
|
|
|
|
unsigned long ilat = 0;
|
2011-04-14 23:35:53 -06:00
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
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 15:50:22 -06:00
|
|
|
/* Disable all the peripheral intrs - page 4-29 HW Ref manual */
|
2011-04-14 23:35:53 -06:00
|
|
|
#ifdef SIC_IMASK0
|
2007-07-12 08:41:45 -06:00
|
|
|
bfin_write_SIC_IMASK0(SIC_UNMASK_ALL);
|
|
|
|
bfin_write_SIC_IMASK1(SIC_UNMASK_ALL);
|
2011-04-14 23:35:53 -06:00
|
|
|
# ifdef SIC_IMASK2
|
2007-10-21 02:54:27 -06:00
|
|
|
bfin_write_SIC_IMASK2(SIC_UNMASK_ALL);
|
2007-11-15 06:12:32 -07:00
|
|
|
# endif
|
2012-05-16 03:56:51 -06:00
|
|
|
# if defined(CONFIG_SMP) || defined(CONFIG_ICC)
|
2009-01-07 08:14:39 -07:00
|
|
|
bfin_write_SICB_IMASK0(SIC_UNMASK_ALL);
|
|
|
|
bfin_write_SICB_IMASK1(SIC_UNMASK_ALL);
|
|
|
|
# endif
|
2007-07-12 08:41:45 -06:00
|
|
|
#else
|
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 15:50:22 -06:00
|
|
|
bfin_write_SIC_IMASK(SIC_UNMASK_ALL);
|
2007-07-12 08:41:45 -06:00
|
|
|
#endif
|
2012-05-16 03:56:51 -06:00
|
|
|
#else /* CONFIG_BF60x */
|
|
|
|
bfin_write_SEC_GCTL(SEC_GCTL_RESET);
|
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
|
|
|
|
local_irq_disable();
|
|
|
|
|
2011-06-26 11:56:23 -06:00
|
|
|
#if BFIN_GPIO_PINT
|
2007-11-15 06:12:32 -07:00
|
|
|
# ifdef CONFIG_PINTx_REASSIGN
|
2007-07-12 02:17:18 -06:00
|
|
|
pint[0]->assign = CONFIG_PINT0_ASSIGN;
|
|
|
|
pint[1]->assign = CONFIG_PINT1_ASSIGN;
|
|
|
|
pint[2]->assign = CONFIG_PINT2_ASSIGN;
|
|
|
|
pint[3]->assign = CONFIG_PINT3_ASSIGN;
|
2012-05-16 03:56:51 -06:00
|
|
|
# ifdef CONFIG_BF60x
|
|
|
|
pint[4]->assign = CONFIG_PINT4_ASSIGN;
|
|
|
|
pint[5]->assign = CONFIG_PINT5_ASSIGN;
|
|
|
|
# endif
|
2007-11-15 06:12:32 -07:00
|
|
|
# endif
|
2007-07-12 02:17:18 -06:00
|
|
|
/* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */
|
|
|
|
init_pint_lut();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
for (irq = 0; irq <= SYS_IRQS; irq++) {
|
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 15:50:22 -06:00
|
|
|
if (irq <= IRQ_CORETMR)
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_chip(irq, &bfin_core_irqchip);
|
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 15:50:22 -06:00
|
|
|
else
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_chip(irq, &bfin_internal_irqchip);
|
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 15:50:22 -06:00
|
|
|
|
2008-02-24 22:50:20 -07:00
|
|
|
switch (irq) {
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2011-06-26 11:56:23 -06:00
|
|
|
#if BFIN_GPIO_PINT
|
2008-02-24 22:50:20 -07:00
|
|
|
case IRQ_PINT0:
|
|
|
|
case IRQ_PINT1:
|
|
|
|
case IRQ_PINT2:
|
|
|
|
case IRQ_PINT3:
|
2011-06-26 11:56:23 -06:00
|
|
|
#elif defined(BF537_FAMILY)
|
|
|
|
case IRQ_PH_INTA_MAC_RX:
|
|
|
|
case IRQ_PF_INTA_PG_INTA:
|
|
|
|
#elif defined(BF533_FAMILY)
|
|
|
|
case IRQ_PROG_INTA:
|
2008-11-18 02:48:21 -07:00
|
|
|
#elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x)
|
2008-02-24 22:50:20 -07:00
|
|
|
case IRQ_PORTF_INTA:
|
|
|
|
case IRQ_PORTG_INTA:
|
|
|
|
case IRQ_PORTH_INTA:
|
2008-02-08 13:11:14 -07:00
|
|
|
#elif defined(CONFIG_BF561)
|
2008-02-24 22:50:20 -07:00
|
|
|
case IRQ_PROG0_INTA:
|
|
|
|
case IRQ_PROG1_INTA:
|
|
|
|
case IRQ_PROG2_INTA:
|
2011-04-14 23:35:53 -06:00
|
|
|
#elif defined(BF538_FAMILY)
|
2008-11-18 02:48:22 -07:00
|
|
|
case IRQ_PORTF_INTA:
|
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 15:50:22 -06:00
|
|
|
#endif
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_chained_handler(irq, bfin_demux_gpio_irq);
|
2008-02-24 22:50:20 -07:00
|
|
|
break;
|
2010-02-19 08:09:10 -07:00
|
|
|
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
|
|
|
case IRQ_MAC_ERROR:
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_chained_handler(irq,
|
|
|
|
bfin_demux_mac_status_irq);
|
2010-02-19 08:09:10 -07:00
|
|
|
break;
|
|
|
|
#endif
|
2012-05-16 03:56:51 -06:00
|
|
|
#if defined(CONFIG_SMP) || defined(CONFIG_ICC)
|
2009-01-07 08:14:39 -07:00
|
|
|
case IRQ_SUPPLE_0:
|
|
|
|
case IRQ_SUPPLE_1:
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_handler(irq, handle_percpu_irq);
|
2009-01-07 08:14:39 -07:00
|
|
|
break;
|
|
|
|
#endif
|
2012-05-16 03:56:51 -06:00
|
|
|
#endif
|
2009-08-17 22:29:33 -06:00
|
|
|
|
2009-12-30 00:12:50 -07:00
|
|
|
#ifdef CONFIG_TICKSOURCE_CORETMR
|
|
|
|
case IRQ_CORETMR:
|
|
|
|
# ifdef CONFIG_SMP
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_handler(irq, handle_percpu_irq);
|
2009-12-30 00:12:50 -07:00
|
|
|
# else
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_handler(irq, handle_simple_irq);
|
2009-12-30 00:12:50 -07:00
|
|
|
# endif
|
2011-04-14 23:35:53 -06:00
|
|
|
break;
|
2009-08-17 22:29:33 -06:00
|
|
|
#endif
|
2009-12-30 00:12:50 -07:00
|
|
|
|
|
|
|
#ifdef CONFIG_TICKSOURCE_GPTMR0
|
|
|
|
case IRQ_TIMER0:
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_handler(irq, handle_simple_irq);
|
2009-06-15 21:25:42 -06:00
|
|
|
break;
|
2009-12-30 00:12:50 -07:00
|
|
|
#endif
|
|
|
|
|
2009-06-15 21:25:42 -06:00
|
|
|
default:
|
2011-04-14 23:35:53 -06:00
|
|
|
#ifdef CONFIG_IPIPE
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_handler(irq, handle_level_irq);
|
2011-04-14 23:35:53 -06:00
|
|
|
#else
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_handler(irq, handle_simple_irq);
|
2011-04-14 23:35:53 -06:00
|
|
|
#endif
|
2008-02-24 22:50:20 -07:00
|
|
|
break;
|
|
|
|
}
|
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 15:50:22 -06:00
|
|
|
}
|
2008-02-24 22:50:20 -07:00
|
|
|
|
2011-04-15 01:08:20 -06:00
|
|
|
init_mach_irq();
|
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 15:50:22 -06:00
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
|
|
|
#if (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) && !defined(CONFIG_BF60x)
|
2010-02-19 08:09:10 -07:00
|
|
|
for (irq = IRQ_MAC_PHYINT; irq <= IRQ_MAC_STMDONE; irq++)
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_chip_and_handler(irq, &bfin_mac_status_irqchip,
|
2010-02-19 08:09:10 -07:00
|
|
|
handle_level_irq);
|
|
|
|
#endif
|
2008-02-24 22:50:20 -07:00
|
|
|
/* if configured as edge, then will be changed to do_edge_IRQ */
|
2010-02-19 08:09:10 -07:00
|
|
|
for (irq = GPIO_IRQ_BASE;
|
|
|
|
irq < (GPIO_IRQ_BASE + MAX_BLACKFIN_GPIOS); irq++)
|
2011-03-24 10:22:30 -06:00
|
|
|
irq_set_chip_and_handler(irq, &bfin_gpio_irqchip,
|
2008-02-24 22:50:20 -07:00
|
|
|
handle_level_irq);
|
2012-05-16 03:56:51 -06:00
|
|
|
#else
|
|
|
|
for (irq = BFIN_IRQ(0); irq <= SYS_IRQS; irq++) {
|
2012-05-30 04:04:02 -06:00
|
|
|
if (irq < CORE_IRQS && irq != IRQ_CGU_EVT) {
|
2012-05-16 03:56:51 -06:00
|
|
|
irq_set_chip(irq, &bfin_sec_irqchip);
|
|
|
|
__irq_set_handler(irq, handle_sec_fault, 0, NULL);
|
|
|
|
} else if (irq >= BFIN_IRQ(21) && irq <= BFIN_IRQ(26)) {
|
|
|
|
irq_set_chip(irq, &bfin_sec_irqchip);
|
|
|
|
irq_set_chained_handler(irq, bfin_demux_gpio_irq);
|
|
|
|
} else if (irq >= BFIN_IRQ(34) && irq <= BFIN_IRQ(37)) {
|
|
|
|
irq_set_chip(irq, &bfin_sec_irqchip);
|
|
|
|
irq_set_handler(irq, handle_percpu_irq);
|
|
|
|
} else {
|
|
|
|
irq_set_chip_and_handler(irq, &bfin_sec_irqchip,
|
|
|
|
handle_fasteoi_irq);
|
|
|
|
__irq_set_preflow_handler(irq, bfin_sec_preflow_handler);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (irq = GPIO_IRQ_BASE;
|
|
|
|
irq < (GPIO_IRQ_BASE + MAX_BLACKFIN_GPIOS); irq++)
|
|
|
|
irq_set_chip_and_handler(irq, &bfin_gpio_irqchip,
|
|
|
|
handle_level_irq);
|
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
bfin_write_IMASK(0);
|
|
|
|
CSYNC();
|
|
|
|
ilat = bfin_read_ILAT();
|
|
|
|
CSYNC();
|
|
|
|
bfin_write_ILAT(ilat);
|
|
|
|
CSYNC();
|
|
|
|
|
2007-07-12 02:17:18 -06:00
|
|
|
printk(KERN_INFO "Configuring Blackfin Priority Driven Interrupts\n");
|
2008-11-18 02:48:22 -07:00
|
|
|
/* IMASK=xxx is equivalent to STI xx or bfin_irq_flags=xx,
|
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 15:50:22 -06:00
|
|
|
* local_irq_enable()
|
|
|
|
*/
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
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 15:50:22 -06:00
|
|
|
program_IAR();
|
|
|
|
/* Therefore it's better to setup IARs before interrupts enabled */
|
|
|
|
search_IAR();
|
|
|
|
|
|
|
|
/* Enable interrupts IVG7-15 */
|
2008-11-18 02:48:22 -07:00
|
|
|
bfin_irq_flags |= IMASK_IVG15 |
|
2012-05-16 03:56:51 -06:00
|
|
|
IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
|
|
|
|
IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
|
|
|
|
|
|
|
|
bfin_sti(bfin_irq_flags);
|
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 15:50:22 -06:00
|
|
|
|
2009-04-15 02:48:08 -06:00
|
|
|
/* This implicitly covers ANOMALY_05000171
|
|
|
|
* Boot-ROM code modifies SICA_IWRx wakeup registers
|
|
|
|
*/
|
2009-02-04 01:49:45 -07:00
|
|
|
#ifdef SIC_IWR0
|
2008-08-06 03:55:32 -06:00
|
|
|
bfin_write_SIC_IWR0(IWR_DISABLE_ALL);
|
2009-02-04 01:49:45 -07:00
|
|
|
# ifdef SIC_IWR1
|
2008-11-18 02:48:21 -07:00
|
|
|
/* BF52x/BF51x system reset does not properly reset SIC_IWR1 which
|
2008-08-13 03:41:13 -06:00
|
|
|
* will screw up the bootrom as it relies on MDMA0/1 waking it
|
|
|
|
* up from IDLE instructions. See this report for more info:
|
|
|
|
* http://blackfin.uclinux.org/gf/tracker/4323
|
|
|
|
*/
|
2008-11-18 02:48:22 -07:00
|
|
|
if (ANOMALY_05000435)
|
|
|
|
bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11));
|
|
|
|
else
|
|
|
|
bfin_write_SIC_IWR1(IWR_DISABLE_ALL);
|
2009-02-04 01:49:45 -07:00
|
|
|
# endif
|
|
|
|
# ifdef SIC_IWR2
|
2008-08-06 03:55:32 -06:00
|
|
|
bfin_write_SIC_IWR2(IWR_DISABLE_ALL);
|
2008-02-24 21:04:57 -07:00
|
|
|
# endif
|
|
|
|
#else
|
2008-08-06 03:55:32 -06:00
|
|
|
bfin_write_SIC_IWR(IWR_DISABLE_ALL);
|
2008-02-24 21:04:57 -07:00
|
|
|
#endif
|
2012-05-16 03:56:51 -06:00
|
|
|
#else /* CONFIG_BF60x */
|
|
|
|
/* Enable interrupts IVG7-15 */
|
|
|
|
bfin_irq_flags |= IMASK_IVG15 |
|
|
|
|
IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
|
|
|
|
IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
|
2008-02-24 21:04:57 -07:00
|
|
|
|
2012-05-16 03:56:51 -06:00
|
|
|
|
|
|
|
bfin_write_SEC_FCTL(SEC_FCTL_EN | SEC_FCTL_SYSRST_EN | SEC_FCTL_FLTIN_EN);
|
|
|
|
bfin_sec_enable_sci(SIC_SYSIRQ(IRQ_WATCH0));
|
|
|
|
bfin_sec_enable_ssi(SIC_SYSIRQ(IRQ_WATCH0));
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CCTL, SEC_CCTL_RESET);
|
|
|
|
udelay(100);
|
|
|
|
bfin_write_SEC_GCTL(SEC_GCTL_EN);
|
|
|
|
bfin_write_SEC_SCI(0, SEC_CCTL, SEC_CCTL_EN | SEC_CCTL_NMI_EN);
|
|
|
|
init_software_driven_irq();
|
|
|
|
register_syscore_ops(&sec_pm_syscore_ops);
|
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef CONFIG_DO_IRQ_L1
|
2007-11-15 06:12:32 -07:00
|
|
|
__attribute__((l1_text))
|
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 15:50:22 -06:00
|
|
|
#endif
|
2011-03-29 23:35:41 -06:00
|
|
|
static int vec_to_irq(int vec)
|
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 15:50:22 -06:00
|
|
|
{
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2011-03-29 23:35:41 -06:00
|
|
|
struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst;
|
|
|
|
struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop;
|
|
|
|
unsigned long sic_status[3];
|
2012-05-16 03:56:51 -06:00
|
|
|
#endif
|
2011-03-29 23:35:41 -06:00
|
|
|
if (likely(vec == EVT_IVTMR_P))
|
|
|
|
return IRQ_CORETMR;
|
2012-05-16 03:56:51 -06:00
|
|
|
#ifndef CONFIG_BF60x
|
2011-03-29 23:35:41 -06:00
|
|
|
#ifdef SIC_ISR
|
|
|
|
sic_status[0] = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR();
|
|
|
|
#else
|
|
|
|
if (smp_processor_id()) {
|
2009-06-01 17:43:02 -06:00
|
|
|
# ifdef SICB_ISR0
|
2011-03-29 23:35:41 -06:00
|
|
|
/* This will be optimized out in UP mode. */
|
|
|
|
sic_status[0] = bfin_read_SICB_ISR0() & bfin_read_SICB_IMASK0();
|
|
|
|
sic_status[1] = bfin_read_SICB_ISR1() & bfin_read_SICB_IMASK1();
|
2009-06-01 17:43:02 -06:00
|
|
|
# endif
|
2011-03-29 23:35:41 -06:00
|
|
|
} else {
|
|
|
|
sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0();
|
|
|
|
sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef SIC_ISR2
|
|
|
|
sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2();
|
|
|
|
#endif
|
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 15:50:22 -06:00
|
|
|
|
2011-03-29 23:35:41 -06:00
|
|
|
for (;; ivg++) {
|
|
|
|
if (ivg >= ivg_stop)
|
|
|
|
return -1;
|
|
|
|
#ifdef SIC_ISR
|
|
|
|
if (sic_status[0] & ivg->isrflag)
|
|
|
|
#else
|
|
|
|
if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag)
|
2007-07-12 08:41:45 -06:00
|
|
|
#endif
|
2011-03-29 23:35:41 -06:00
|
|
|
return ivg->irqno;
|
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 15:50:22 -06:00
|
|
|
}
|
2012-05-16 03:56:51 -06:00
|
|
|
#else
|
|
|
|
/* for bf60x read */
|
|
|
|
return BFIN_IRQ(bfin_read_SEC_SCI(0, SEC_CSID));
|
|
|
|
#endif /* end of CONFIG_BF60x */
|
2011-03-29 23:35:41 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef CONFIG_DO_IRQ_L1
|
|
|
|
__attribute__((l1_text))
|
|
|
|
#endif
|
|
|
|
void do_irq(int vec, struct pt_regs *fp)
|
|
|
|
{
|
|
|
|
int irq = vec_to_irq(vec);
|
|
|
|
if (irq == -1)
|
|
|
|
return;
|
|
|
|
asm_do_IRQ(irq, fp);
|
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 15:50:22 -06:00
|
|
|
}
|
2009-01-07 08:14:39 -07:00
|
|
|
|
|
|
|
#ifdef CONFIG_IPIPE
|
|
|
|
|
|
|
|
int __ipipe_get_irq_priority(unsigned irq)
|
|
|
|
{
|
|
|
|
int ient, prio;
|
|
|
|
|
|
|
|
if (irq <= IRQ_CORETMR)
|
|
|
|
return irq;
|
|
|
|
|
|
|
|
for (ient = 0; ient < NR_PERI_INTS; ient++) {
|
|
|
|
struct ivgx *ivg = ivg_table + ient;
|
|
|
|
if (ivg->irqno == irq) {
|
|
|
|
for (prio = 0; prio <= IVG13-IVG7; prio++) {
|
|
|
|
if (ivg7_13[prio].ifirst <= ivg &&
|
|
|
|
ivg7_13[prio].istop > ivg)
|
|
|
|
return IVG7 + prio;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return IVG15;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Hw interrupts are disabled on entry (check SAVE_CONTEXT). */
|
|
|
|
#ifdef CONFIG_DO_IRQ_L1
|
|
|
|
__attribute__((l1_text))
|
|
|
|
#endif
|
|
|
|
asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
|
|
|
|
{
|
2009-03-04 01:52:38 -07:00
|
|
|
struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr();
|
2009-06-15 21:25:42 -06:00
|
|
|
struct ipipe_domain *this_domain = __ipipe_current_domain;
|
2009-01-07 08:14:39 -07:00
|
|
|
struct ivgx *ivg_stop = ivg7_13[vec-IVG7].istop;
|
|
|
|
struct ivgx *ivg = ivg7_13[vec-IVG7].ifirst;
|
2011-03-17 00:12:48 -06:00
|
|
|
int irq, s = 0;
|
2009-01-07 08:14:39 -07:00
|
|
|
|
2011-03-29 23:35:41 -06:00
|
|
|
irq = vec_to_irq(vec);
|
|
|
|
if (irq == -1)
|
|
|
|
return 0;
|
2009-01-07 08:14:39 -07:00
|
|
|
|
|
|
|
if (irq == IRQ_SYSTMR) {
|
2009-06-15 21:25:42 -06:00
|
|
|
#if !defined(CONFIG_GENERIC_CLOCKEVENTS) || defined(CONFIG_TICKSOURCE_GPTMR0)
|
2009-01-07 08:14:39 -07:00
|
|
|
bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */
|
2009-03-04 01:52:38 -07:00
|
|
|
#endif
|
2009-01-07 08:14:39 -07:00
|
|
|
/* This is basically what we need from the register frame. */
|
|
|
|
__raw_get_cpu_var(__ipipe_tick_regs).ipend = regs->ipend;
|
|
|
|
__raw_get_cpu_var(__ipipe_tick_regs).pc = regs->pc;
|
2009-03-04 01:52:38 -07:00
|
|
|
if (this_domain != ipipe_root_domain)
|
2009-01-07 08:14:39 -07:00
|
|
|
__raw_get_cpu_var(__ipipe_tick_regs).ipend &= ~0x10;
|
2009-03-04 01:52:38 -07:00
|
|
|
else
|
|
|
|
__raw_get_cpu_var(__ipipe_tick_regs).ipend |= 0x10;
|
2009-01-07 08:14:39 -07:00
|
|
|
}
|
|
|
|
|
2011-03-17 00:12:48 -06:00
|
|
|
/*
|
|
|
|
* We don't want Linux interrupt handlers to run at the
|
|
|
|
* current core priority level (i.e. < EVT15), since this
|
|
|
|
* might delay other interrupts handled by a high priority
|
|
|
|
* domain. Here is what we do instead:
|
|
|
|
*
|
|
|
|
* - we raise the SYNCDEFER bit to prevent
|
|
|
|
* __ipipe_handle_irq() to sync the pipeline for the root
|
|
|
|
* stage for the incoming interrupt. Upon return, that IRQ is
|
|
|
|
* pending in the interrupt log.
|
|
|
|
*
|
|
|
|
* - we raise the TIF_IRQ_SYNC bit for the current thread, so
|
|
|
|
* that _schedule_and_signal_from_int will eventually sync the
|
|
|
|
* pipeline from EVT15.
|
|
|
|
*/
|
2009-03-04 01:52:38 -07:00
|
|
|
if (this_domain == ipipe_root_domain) {
|
|
|
|
s = __test_and_set_bit(IPIPE_SYNCDEFER_FLAG, &p->status);
|
|
|
|
barrier();
|
|
|
|
}
|
2009-01-07 08:14:39 -07:00
|
|
|
|
|
|
|
ipipe_trace_irq_entry(irq);
|
|
|
|
__ipipe_handle_irq(irq, regs);
|
2009-03-04 01:52:38 -07:00
|
|
|
ipipe_trace_irq_exit(irq);
|
2009-01-07 08:14:39 -07:00
|
|
|
|
2011-03-17 00:12:48 -06:00
|
|
|
if (user_mode(regs) &&
|
|
|
|
!ipipe_test_foreign_stack() &&
|
|
|
|
(current->ipipe_flags & PF_EVTRET) != 0) {
|
|
|
|
/*
|
|
|
|
* Testing for user_regs() does NOT fully eliminate
|
|
|
|
* foreign stack contexts, because of the forged
|
|
|
|
* interrupt returns we do through
|
|
|
|
* __ipipe_call_irqtail. In that case, we might have
|
|
|
|
* preempted a foreign stack context in a high
|
|
|
|
* priority domain, with a single interrupt level now
|
|
|
|
* pending after the irqtail unwinding is done. In
|
|
|
|
* which case user_mode() is now true, and the event
|
|
|
|
* gets dispatched spuriously.
|
|
|
|
*/
|
|
|
|
current->ipipe_flags &= ~PF_EVTRET;
|
|
|
|
__ipipe_dispatch_event(IPIPE_EVENT_RETURN, regs);
|
|
|
|
}
|
|
|
|
|
2009-03-04 01:52:38 -07:00
|
|
|
if (this_domain == ipipe_root_domain) {
|
|
|
|
set_thread_flag(TIF_IRQ_SYNC);
|
|
|
|
if (!s) {
|
|
|
|
__clear_bit(IPIPE_SYNCDEFER_FLAG, &p->status);
|
|
|
|
return !test_bit(IPIPE_STALL_FLAG, &p->status);
|
|
|
|
}
|
|
|
|
}
|
2009-01-07 08:14:39 -07:00
|
|
|
|
2009-05-15 05:01:59 -06:00
|
|
|
return 0;
|
2009-01-07 08:14:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_IPIPE */
|