Commit 82afee68 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits)
  Blackfin serial driver: supporting BF548-EZKIT serial port
  Video Console: Blackfin doesnt support VGA console
  Blackfin arch: Add peripheral io API to gpio header file
  Blackfin arch: set up gpio interrupt IRQ_PJ9 for BF54x ATAPI PATA driver
  Blackfin arch: add missing CONFIG_LARGE_ALLOCS when upstream merging
  Blackfin arch: as pointed out by Robert P. J. Day, update the CPU_FREQ name to match current Kconfig
  Blackfin arch: extract the entry point from the linked kernel
  Blackfin arch: clean up some coding style issues
  Blackfin arch: combine the common code of free_initrd_mem and free_initmem
  Blackfin arch: Add Support for Peripheral PortMux and resouce allocation
  Blackfin arch: use PAGE_SIZE when doing aligns rather than hardcoded values
  Blackfin arch: fix bug set dma_address properly in dma_map_sg
  Blackfin arch: Disable CACHELINE_ALIGNED_L1 for BF54x by default
  Blackfin arch: Port the dm9000 driver to Blackfin by using the correct low-level io routines
  Blackfin arch: There is no CDPRIO Bit in the EBIU_AMGCTL Register of BF54x arch
  Blackfin arch: scrub dead code
  Blackfin arch: Fix Warning add some defines in BF54x header file
  Blackfin arch: add BF54x missing GPIO access functions
  Blackfin arch: Some memory and code optimizations - Fix SYS_IRQS
  Blackfin arch: Enable BF54x PIN/GPIO interrupts
  ...
parents 068345f4 f4d640c9
A Simple Guide to Configure KGDB
Sonic Zhang <sonic.zhang@analog.com>
Aug. 24th 2006
This KGDB patch enables the kernel developer to do source level debugging on
the kernel for the Blackfin architecture. The debugging works over either the
ethernet interface or one of the uarts. Both software breakpoints and
hardware breakpoints are supported in this version.
http://docs.blackfin.uclinux.org/doku.php?id=kgdb
2 known issues:
1. This bug:
http://blackfin.uclinux.org/tracker/index.php?func=detail&aid=544&group_id=18&atid=145
The GDB client for Blackfin uClinux causes incorrect values of local
variables to be displayed when the user breaks the running of kernel in GDB.
2. Because of a hardware bug in Blackfin 533 v1.0.3:
05000067 - Watchpoints (Hardware Breakpoints) are not supported
Hardware breakpoints cannot be set properly.
Debug over Ethernet:
1. Compile and install the cross platform version of gdb for blackfin, which
can be found at $(BINROOT)/bfin-elf-gdb.
2. Apply this patch to the 2.6.x kernel. Select the menuconfig option under
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
With this selected, option "Full Symbolic/Source Debugging support" and
"Compile the kernel with frame pointers" are also selected.
3. Select option "KGDB: connect over (Ethernet)". Add "kgdboe=@target-IP/,@host-IP/" to
the option "Compiled-in Kernel Boot Parameter" under "Kernel hacking".
4. Connect minicom to the serial port and boot the kernel image.
5. Configure the IP "/> ifconfig eth0 target-IP"
6. Start GDB client "bfin-elf-gdb vmlinux".
7. Connect to the target "(gdb) target remote udp:target-IP:6443".
8. Set software breakpoint "(gdb) break sys_open".
9. Continue "(gdb) c".
10. Run ls in the target console "/> ls".
11. Breakpoint hits. "Breakpoint 1: sys_open(..."
12. Display local variables and function paramters.
(*) This operation gives wrong results, see known issue 1.
13. Single stepping "(gdb) si".
14. Remove breakpoint 1. "(gdb) del 1"
15. Set hardware breakpoint "(gdb) hbreak sys_open".
16. Continue "(gdb) c".
17. Run ls in the target console "/> ls".
18. Hardware breakpoint hits. "Breakpoint 1: sys_open(...".
(*) This hardware breakpoint will not be hit, see known issue 2.
19. Continue "(gdb) c".
20. Interrupt the target in GDB "Ctrl+C".
21. Detach from the target "(gdb) detach".
22. Exit GDB "(gdb) quit".
Debug over the UART:
1. Compile and install the cross platform version of gdb for blackfin, which
can be found at $(BINROOT)/bfin-elf-gdb.
2. Apply this patch to the 2.6.x kernel. Select the menuconfig option under
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
With this selected, option "Full Symbolic/Source Debugging support" and
"Compile the kernel with frame pointers" are also selected.
3. Select option "KGDB: connect over (UART)". Set "KGDB: UART port number" to be
a different one from the console. Don't forget to change the mode of
blackfin serial driver to PIO. Otherwise kgdb works incorrectly on UART.
4. If you want connect to kgdb when the kernel boots, enable
"KGDB: Wait for gdb connection early"
5. Compile kernel.
6. Connect minicom to the serial port of the console and boot the kernel image.
7. Start GDB client "bfin-elf-gdb vmlinux".
8. Set the baud rate in GDB "(gdb) set remotebaud 57600".
9. Connect to the target on the second serial port "(gdb) target remote /dev/ttyS1".
10. Set software breakpoint "(gdb) break sys_open".
11. Continue "(gdb) c".
12. Run ls in the target console "/> ls".
13. A breakpoint is hit. "Breakpoint 1: sys_open(..."
14. All other operations are the same as that in KGDB over Ethernet.
Debug over the same UART as console:
1. Compile and install the cross platform version of gdb for blackfin, which
can be found at $(BINROOT)/bfin-elf-gdb.
2. Apply this patch to the 2.6.x kernel. Select the menuconfig option under
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
With this selected, option "Full Symbolic/Source Debugging support" and
"Compile the kernel with frame pointers" are also selected.
3. Select option "KGDB: connect over UART". Set "KGDB: UART port number" to console.
Don't forget to change the mode of blackfin serial driver to PIO.
Otherwise kgdb works incorrectly on UART.
4. If you want connect to kgdb when the kernel boots, enable
"KGDB: Wait for gdb connection early"
5. Connect minicom to the serial port and boot the kernel image.
6. (Optional) Ask target to wait for gdb connection by entering Ctrl+A. In minicom, you should enter Ctrl+A+A.
7. Start GDB client "bfin-elf-gdb vmlinux".
8. Set the baud rate in GDB "(gdb) set remotebaud 57600".
9. Connect to the target "(gdb) target remote /dev/ttyS0".
10. Set software breakpoint "(gdb) break sys_open".
11. Continue "(gdb) c". Then enter Ctrl+C twice to stop GDB connection.
12. Run ls in the target console "/> ls". Dummy string can be seen on the console.
13. Then connect the gdb to target again. "(gdb) target remote /dev/ttyS0".
Now you will find a breakpoint is hit. "Breakpoint 1: sys_open(..."
14. All other operations are the same as that in KGDB over Ethernet. The only
difference is that after continue command in GDB, please stop GDB
connection by 2 "Ctrl+C"s and connect again after breakpoints are hit or
Ctrl+A is entered.
...@@ -71,6 +71,7 @@ config GENERIC_CALIBRATE_DELAY ...@@ -71,6 +71,7 @@ config GENERIC_CALIBRATE_DELAY
config IRQCHIP_DEMUX_GPIO config IRQCHIP_DEMUX_GPIO
bool bool
depends on (BF53x || BF561 || BF54x)
default y default y
source "init/Kconfig" source "init/Kconfig"
...@@ -114,6 +115,26 @@ config BF537 ...@@ -114,6 +115,26 @@ config BF537
help help
BF537 Processor Support. BF537 Processor Support.
config BF542
bool "BF542"
help
BF542 Processor Support.
config BF544
bool "BF544"
help
BF544 Processor Support.
config BF548
bool "BF548"
help
BF548 Processor Support.
config BF549
bool "BF549"
help
BF549 Processor Support.
config BF561 config BF561
bool "BF561" bool "BF561"
help help
...@@ -125,6 +146,11 @@ choice ...@@ -125,6 +146,11 @@ choice
prompt "Silicon Rev" prompt "Silicon Rev"
default BF_REV_0_2 if BF537 default BF_REV_0_2 if BF537
default BF_REV_0_3 if BF533 default BF_REV_0_3 if BF533
default BF_REV_0_0 if BF549
config BF_REV_0_0
bool "0.0"
depends on (BF549)
config BF_REV_0_2 config BF_REV_0_2
bool "0.2" bool "0.2"
...@@ -150,6 +176,16 @@ config BF_REV_NONE ...@@ -150,6 +176,16 @@ config BF_REV_NONE
endchoice endchoice
config BF53x
bool
depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
default y
config BF54x
bool
depends on (BF542 || BF544 || BF548 || BF549)
default y
config BFIN_DUAL_CORE config BFIN_DUAL_CORE
bool bool
depends on (BF561) depends on (BF561)
...@@ -198,6 +234,12 @@ config BFIN537_BLUETECHNIX_CM ...@@ -198,6 +234,12 @@ config BFIN537_BLUETECHNIX_CM
help help
CM-BF537 support for EVAL- and DEV-Board. CM-BF537 support for EVAL- and DEV-Board.
config BFIN548_EZKIT
bool "BF548-EZKIT"
depends on (BF548 || BF549)
help
BFIN548-EZKIT board Support.
config BFIN561_BLUETECHNIX_CM config BFIN561_BLUETECHNIX_CM
bool "Bluetechnix CM-BF561" bool "Bluetechnix CM-BF561"
depends on (BF561) depends on (BF561)
...@@ -265,6 +307,7 @@ config BFIN_SHARED_FLASH_ENET ...@@ -265,6 +307,7 @@ config BFIN_SHARED_FLASH_ENET
source "arch/blackfin/mach-bf533/Kconfig" source "arch/blackfin/mach-bf533/Kconfig"
source "arch/blackfin/mach-bf561/Kconfig" source "arch/blackfin/mach-bf561/Kconfig"
source "arch/blackfin/mach-bf537/Kconfig" source "arch/blackfin/mach-bf537/Kconfig"
source "arch/blackfin/mach-bf548/Kconfig"
menu "Board customizations" menu "Board customizations"
...@@ -497,7 +540,8 @@ config IP_CHECKSUM_L1 ...@@ -497,7 +540,8 @@ config IP_CHECKSUM_L1
config CACHELINE_ALIGNED_L1 config CACHELINE_ALIGNED_L1
bool "Locate cacheline_aligned data to L1 Data Memory" bool "Locate cacheline_aligned data to L1 Data Memory"
default y default y if !BF54x
default n if BF54x
depends on !BF531 depends on !BF531
help help
If enabled cacheline_anligned data is linked If enabled cacheline_anligned data is linked
...@@ -541,9 +585,17 @@ endchoice ...@@ -541,9 +585,17 @@ endchoice
source "mm/Kconfig" source "mm/Kconfig"
config LARGE_ALLOCS
bool "Allow allocating large blocks (> 1MB) of memory"
help
Allow the slab memory allocator to keep chains for very large
memory sizes - upto 32MB. You may need this if your system has
a lot of RAM, and you need to able to allocate very large
contiguous chunks. If unsure, say N.
config BFIN_DMA_5XX config BFIN_DMA_5XX
bool "Enable DMA Support" bool "Enable DMA Support"
depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561) depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561 || BF54x)
default y default y
help help
DMA driver for BF5xx. DMA driver for BF5xx.
...@@ -686,6 +738,7 @@ config C_AMCKEN ...@@ -686,6 +738,7 @@ config C_AMCKEN
config C_CDPRIO config C_CDPRIO
bool "DMA has priority over core for ext. accesses" bool "DMA has priority over core for ext. accesses"
depends on !BF54x
default n default n
config C_B0PEN config C_B0PEN
...@@ -839,7 +892,7 @@ endchoice ...@@ -839,7 +892,7 @@ endchoice
endmenu endmenu
if (BF537 || BF533) if (BF537 || BF533 || BF54x)
menu "CPU Frequency scaling" menu "CPU Frequency scaling"
......
...@@ -24,6 +24,8 @@ machine-$(CONFIG_BF533) := bf533 ...@@ -24,6 +24,8 @@ machine-$(CONFIG_BF533) := bf533
machine-$(CONFIG_BF534) := bf537 machine-$(CONFIG_BF534) := bf537
machine-$(CONFIG_BF536) := bf537 machine-$(CONFIG_BF536) := bf537
machine-$(CONFIG_BF537) := bf537 machine-$(CONFIG_BF537) := bf537
machine-$(CONFIG_BF548) := bf548
machine-$(CONFIG_BF549) := bf548
machine-$(CONFIG_BF561) := bf561 machine-$(CONFIG_BF561) := bf561
MACHINE := $(machine-y) MACHINE := $(machine-y)
export MACHINE export MACHINE
......
...@@ -13,7 +13,8 @@ extra-y += vmlinux.bin vmlinux.gz ...@@ -13,7 +13,8 @@ extra-y += vmlinux.bin vmlinux.gz
quiet_cmd_uimage = UIMAGE $@ quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
-C gzip -a $(CONFIG_BOOT_LOAD) -e $(CONFIG_BOOT_LOAD) -n 'Linux-$(KERNELRELEASE)' \ -C gzip -n 'Linux-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
-e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
-d $< $@ -d $< $@
$(obj)/vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin: vmlinux FORCE
......
This diff is collapsed.
...@@ -6,9 +6,12 @@ extra-y := init_task.o vmlinux.lds ...@@ -6,9 +6,12 @@ extra-y := init_task.o vmlinux.lds
obj-y := \ obj-y := \
entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \ entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \
sys_bfin.o time.o traps.o irqchip.o dma-mapping.o bfin_gpio.o \ sys_bfin.o time.o traps.o irqchip.o dma-mapping.o flat.o \
flat.o fixed_code.o cplbinit.o cacheinit.o
obj-$(CONFIG_BF53x) += bfin_gpio.o
obj-$(CONFIG_BF561) += bfin_gpio.o
obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o
obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o
obj-$(CONFIG_KGDB) += kgdb.o
...@@ -32,11 +32,10 @@ ...@@ -32,11 +32,10 @@
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/thread_info.h> #include <linux/thread_info.h>
#define DEFINE(sym, val) \ #define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
int main(void) int main(void)
{ {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/param.h> #include <linux/param.h>
#include <asm/blackfin.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
...@@ -45,67 +46,6 @@ ...@@ -45,67 +46,6 @@
***************************************************************************/ ***************************************************************************/
static struct dma_channel dma_ch[MAX_BLACKFIN_DMA_CHANNEL]; static struct dma_channel dma_ch[MAX_BLACKFIN_DMA_CHANNEL];
#if defined (CONFIG_BF561)
static struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
(struct dma_register *) DMA1_0_NEXT_DESC_PTR,
(struct dma_register *) DMA1_1_NEXT_DESC_PTR,
(struct dma_register *) DMA1_2_NEXT_DESC_PTR,
(struct dma_register *) DMA1_3_NEXT_DESC_PTR,
(struct dma_register *) DMA1_4_NEXT_DESC_PTR,
(struct dma_register *) DMA1_5_NEXT_DESC_PTR,
(struct dma_register *) DMA1_6_NEXT_DESC_PTR,
(struct dma_register *) DMA1_7_NEXT_DESC_PTR,
(struct dma_register *) DMA1_8_NEXT_DESC_PTR,
(struct dma_register *) DMA1_9_NEXT_DESC_PTR,
(struct dma_register *) DMA1_10_NEXT_DESC_PTR,
(struct dma_register *) DMA1_11_NEXT_DESC_PTR,
(struct dma_register *) DMA2_0_NEXT_DESC_PTR,
(struct dma_register *) DMA2_1_NEXT_DESC_PTR,
(struct dma_register *) DMA2_2_NEXT_DESC_PTR,
(struct dma_register *) DMA2_3_NEXT_DESC_PTR,
(struct dma_register *) DMA2_4_NEXT_DESC_PTR,
(struct dma_register *) DMA2_5_NEXT_DESC_PTR,
(struct dma_register *) DMA2_6_NEXT_DESC_PTR,
(struct dma_register *) DMA2_7_NEXT_DESC_PTR,
(struct dma_register *) DMA2_8_NEXT_DESC_PTR,
(struct dma_register *) DMA2_9_NEXT_DESC_PTR,
(struct dma_register *) DMA2_10_NEXT_DESC_PTR,
(struct dma_register *) DMA2_11_NEXT_DESC_PTR,
(struct dma_register *) MDMA1_D0_NEXT_DESC_PTR,
(struct dma_register *) MDMA1_S0_NEXT_DESC_PTR,
(struct dma_register *) MDMA1_D1_NEXT_DESC_PTR,
(struct dma_register *) MDMA1_S1_NEXT_DESC_PTR,
(struct dma_register *) MDMA2_D0_NEXT_DESC_PTR,
(struct dma_register *) MDMA2_S0_NEXT_DESC_PTR,
(struct dma_register *) MDMA2_D1_NEXT_DESC_PTR,
(struct dma_register *) MDMA2_S1_NEXT_DESC_PTR,
(struct dma_register *) IMDMA_D0_NEXT_DESC_PTR,
(struct dma_register *) IMDMA_S0_NEXT_DESC_PTR,
(struct dma_register *) IMDMA_D1_NEXT_DESC_PTR,
(struct dma_register *) IMDMA_S1_NEXT_DESC_PTR,
};
#else
static struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
(struct dma_register *) DMA0_NEXT_DESC_PTR,
(struct dma_register *) DMA1_NEXT_DESC_PTR,
(struct dma_register *) DMA2_NEXT_DESC_PTR,
(struct dma_register *) DMA3_NEXT_DESC_PTR,
(struct dma_register *) DMA4_NEXT_DESC_PTR,
(struct dma_register *) DMA5_NEXT_DESC_PTR,
(struct dma_register *) DMA6_NEXT_DESC_PTR,
(struct dma_register *) DMA7_NEXT_DESC_PTR,
#if (defined(CONFIG_BF537) || defined(CONFIG_BF534) || defined(CONFIG_BF536))
(struct dma_register *) DMA8_NEXT_DESC_PTR,
(struct dma_register *) DMA9_NEXT_DESC_PTR,
(struct dma_register *) DMA10_NEXT_DESC_PTR,
(struct dma_register *) DMA11_NEXT_DESC_PTR,
#endif
(struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
(struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
(struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
(struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
};
#endif
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Set the Buffer Clear bit in the Configuration register of specific DMA * Set the Buffer Clear bit in the Configuration register of specific DMA
...@@ -138,149 +78,6 @@ static int __init blackfin_dma_init(void) ...@@ -138,149 +78,6 @@ static int __init blackfin_dma_init(void)
arch_initcall(blackfin_dma_init); arch_initcall(blackfin_dma_init);
/*
* Form the channel find the irq number for that channel.
*/
#if !defined(CONFIG_BF561)
static int bf533_channel2irq(unsigned int channel)
{
int ret_irq = -1;
switch (channel) {
case CH_PPI:
ret_irq = IRQ_PPI;
break;
#if (defined(CONFIG_BF537) || defined(CONFIG_BF534) || defined(CONFIG_BF536))
case CH_EMAC_RX:
ret_irq = IRQ_MAC_RX;
break;
case CH_EMAC_TX:
ret_irq = IRQ_MAC_TX;
break;
case CH_UART1_RX:
ret_irq = IRQ_UART1_RX;
break;
case CH_UART1_TX:
ret_irq = IRQ_UART1_TX;
break;
#endif
case CH_SPORT0_RX:
ret_irq = IRQ_SPORT0_RX;
break;
case CH_SPORT0_TX:
ret_irq = IRQ_SPORT0_TX;
break;
case CH_SPORT1_RX:
ret_irq = IRQ_SPORT1_RX;
break;
case CH_SPORT1_TX:
ret_irq = IRQ_SPORT1_TX;
break;
case CH_SPI:
ret_irq = IRQ_SPI;
break;
case CH_UART_RX:
ret_irq = IRQ_UART_RX;
break;
case CH_UART_TX:
ret_irq = IRQ_UART_TX;
break;
case CH_MEM_STREAM0_SRC:
case CH_MEM_STREAM0_DEST:
ret_irq = IRQ_MEM_DMA0;
break;
case CH_MEM_STREAM1_SRC:
case CH_MEM_STREAM1_DEST:
ret_irq = IRQ_MEM_DMA1;
break;
}
return ret_irq;
}
# define channel2irq(channel) bf533_channel2irq(channel)
#else
static int bf561_channel2irq(unsigned int channel)
{
int ret_irq = -1;
switch (channel) {
case CH_PPI0:
ret_irq = IRQ_PPI0;
break;
case CH_PPI1:
ret_irq = IRQ_PPI1;
break;
case CH_SPORT0_RX:
ret_irq = IRQ_SPORT0_RX;
break;
case CH_SPORT0_TX:
ret_irq = IRQ_SPORT0_TX;
break;
case CH_SPORT1_RX:
ret_irq = IRQ_SPORT1_RX;
break;
case CH_SPORT1_TX:
ret_irq = IRQ_SPORT1_TX;
break;
case CH_SPI:
ret_irq = IRQ_SPI;
break;
case CH_UART_RX:
ret_irq = IRQ_UART_RX;
break;
case CH_UART_TX:
ret_irq = IRQ_UART_TX;
break;
case CH_MEM_STREAM0_SRC:
case CH_MEM_STREAM0_DEST:
ret_irq = IRQ_MEM_DMA0;
break;
case CH_MEM_STREAM1_SRC:
case CH_MEM_STREAM1_DEST:
ret_irq = IRQ_MEM_DMA1;
break;
case CH_MEM_STREAM2_SRC:
case CH_MEM_STREAM2_DEST:
ret_irq = IRQ_MEM_DMA2;
break;
case CH_MEM_STREAM3_SRC:
case CH_MEM_STREAM3_DEST:
ret_irq = IRQ_MEM_DMA3;
break;
case CH_IMEM_STREAM0_SRC:
case CH_IMEM_STREAM0_DEST:
ret_irq = IRQ_IMEM_DMA0;
break;
case CH_IMEM_STREAM1_SRC:
case CH_IMEM_STREAM1_DEST:
ret_irq = IRQ_IMEM_DMA1;
break;
}
return ret_irq;
}
# define channel2irq(channel) bf561_channel2irq(channel)
#endif
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Request the specific DMA channel from the system. * Request the specific DMA channel from the system.
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
...@@ -535,7 +332,7 @@ set_bfin_dma_config(char direction, char flow_mode, ...@@ -535,7 +332,7 @@ set_bfin_dma_config(char direction, char flow_mode,
} }
EXPORT_SYMBOL(set_bfin_dma_config); EXPORT_SYMBOL(set_bfin_dma_config);
void set_dma_sg(unsigned int channel, struct dmasg * sg, int nr_sg) void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
{ {
BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
&& channel < MAX_BLACKFIN_DMA_CHANNEL)); && channel < MAX_BLACKFIN_DMA_CHANNEL));
...@@ -748,7 +545,6 @@ void *dma_memcpy(void *dest, const void *src, size_t size) ...@@ -748,7 +545,6 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
addr = __dma_memcpy(dest+bulk, src+bulk, rest); addr = __dma_memcpy(dest+bulk, src+bulk, rest);
return addr; return addr;
} }
EXPORT_SYMBOL(dma_memcpy); EXPORT_SYMBOL(dma_memcpy);
void *safe_dma_memcpy(void *dest, const void *src, size_t size) void *safe_dma_memcpy(void *dest, const void *src, size_t size)
...@@ -761,12 +557,11 @@ EXPORT_SYMBOL(safe_dma_memcpy); ...@@ -761,12 +557,11 @@ EXPORT_SYMBOL(safe_dma_memcpy);
void dma_outsb(void __iomem *addr, const void *buf, unsigned short len) void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
{ {
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len); blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
bfin_write_MDMA_D0_START_ADDR(addr); bfin_write_MDMA_D0_START_ADDR(addr);
bfin_write_MDMA_D0_X_COUNT(len); bfin_write_MDMA_D0_X_COUNT(len);
...@@ -830,7 +625,7 @@ void dma_outsw(void __iomem *addr, const void *buf, unsigned short len) ...@@ -830,7 +625,7 @@ void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
local_irq_save(flags); local_irq_save(flags);
blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len); blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
bfin_write_MDMA_D0_START_ADDR(addr); bfin_write_MDMA_D0_START_ADDR(addr);
bfin_write_MDMA_D0_X_COUNT(len); bfin_write_MDMA_D0_X_COUNT(len);
...@@ -894,7 +689,7 @@ void dma_outsl(void __iomem *addr, const void *buf, unsigned short len) ...@@ -894,7 +689,7 @@ void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
local_irq_save(flags); local_irq_save(flags);
blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len); blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
bfin_write_MDMA_D0_START_ADDR(addr); bfin_write_MDMA_D0_START_ADDR(addr);
bfin_write_MDMA_D0_X_COUNT(len); bfin_write_MDMA_D0_X_COUNT(len);
......
...@@ -162,7 +162,7 @@ static void port_setup(unsigned short gpio, unsigned short usage) ...@@ -162,7 +162,7 @@ static void port_setup(unsigned short gpio, unsigned short usage)
static void default_gpio(unsigned short gpio) static void default_gpio(unsigned short gpio)
{ {
unsigned short bank,bitmask; unsigned short bank, bitmask;
bank = gpio_bank(gpio); bank = gpio_bank(gpio);
bitmask = gpio_bit(gpio); bitmask = gpio_bit(gpio);
...@@ -183,7 +183,7 @@ static int __init bfin_gpio_init(void) ...@@ -183,7 +183,7 @@ static int __init bfin_gpio_init(void)
printk(KERN_INFO "Blackfin GPIO Controller\n"); printk(KERN_INFO "Blackfin GPIO Controller\n");
for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
reserved_map[gpio_bank(i)] = 0; reserved_map[gpio_bank(i)] = 0;
#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) #if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
...@@ -478,7 +478,7 @@ u32 gpio_pm_setup(void) ...@@ -478,7 +478,7 @@ u32 gpio_pm_setup(void)
u32 sic_iwr = 0; u32 sic_iwr = 0;
u16 bank, mask, i, gpio; u16 bank, mask, i, gpio;
for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
mask = wakeup_map[gpio_bank(i)]; mask = wakeup_map[gpio_bank(i)];
bank = gpio_bank(i); bank = gpio_bank(i);
...@@ -522,12 +522,11 @@ u32 gpio_pm_setup(void) ...@@ -522,12 +522,11 @@ u32 gpio_pm_setup(void)
return IWR_ENABLE_ALL; return IWR_ENABLE_ALL;
} }
void gpio_pm_restore(void) void gpio_pm_restore(void)
{ {
u16 bank, mask, i; u16 bank, mask, i;
for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
mask = wakeup_map[gpio_bank(i)]; mask = wakeup_map[gpio_bank(i)];
bank = gpio_bank(i); bank = gpio_bank(i);
...@@ -591,7 +590,6 @@ int gpio_request(unsigned short gpio, const char *label) ...@@ -591,7 +590,6 @@ int gpio_request(unsigned short gpio, const char *label)
} }
EXPORT_SYMBOL(gpio_request); EXPORT_SYMBOL(gpio_request);
void gpio_free(unsigned short gpio) void gpio_free(unsigned short gpio)
{ {
unsigned long flags; unsigned long flags;
...@@ -616,7 +614,6 @@ void gpio_free(unsigned short gpio) ...@@ -616,7 +614,6 @@ void gpio_free(unsigned short gpio)
} }
EXPORT_SYMBOL(gpio_free); EXPORT_SYMBOL(gpio_free);
void gpio_direction_input(unsigned short gpio) void gpio_direction_input(unsigned short gpio)
{ {
unsigned long flags; unsigned long flags;
......
...@@ -28,10 +28,11 @@ ...@@ -28,10 +28,11 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <linux/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/uaccess.h>
/* platform dependent support */ /* platform dependent support */
......
/*
* Copyright 2004-2007 Analog Devices Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see the file COPYING, or write
* to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/cpu.h>
#include <asm/cacheflush.h>
#include <asm/blackfin.h>
#include <asm/cplbinit.h>
#if defined(CONFIG_BLKFIN_CACHE)
void bfin_icache_init(void)
{
unsigned long *table = icplb_table;
unsigned long ctrl;
int i;
for (i = 0; i < MAX_CPLBS; i++) {
unsigned long addr = *table++;
unsigned long data = *table++;
if (addr == (unsigned long)-1)
break;
bfin_write32(ICPLB_ADDR0 + i * 4, addr);
bfin_write32(ICPLB_DATA0 + i * 4, data);
}
ctrl = bfin_read_IMEM_CONTROL();
ctrl |= IMC | ENICPLB;
bfin_write_IMEM_CONTROL(ctrl);
}
#endif
#if defined(CONFIG_BLKFIN_DCACHE)
void bfin_dcache_init(void)
{
unsigned long *table = dcplb_table;
unsigned long ctrl;
int i;
for (i = 0; i < MAX_CPLBS; i++) {
unsigned long addr = *table++;
unsigned long data = *table++;
if (addr == (unsigned long)-1)
break;
bfin_write32(DCPLB_ADDR0 + i * 4, addr);
bfin_write32(DCPLB_DATA0 + i * 4, data);
}
ctrl = bfin_read_DMEM_CONTROL();
ctrl |= DMEM_CNTR;
bfin_write_DMEM_CONTROL(ctrl);
}
#endif
This diff is collapsed.
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/io.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/bfin-global.h> #include <asm/bfin-global.h>
static spinlock_t dma_page_lock; static spinlock_t dma_page_lock;
...@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, ...@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
BUG_ON(direction == DMA_NONE); BUG_ON(direction == DMA_NONE);
for (i = 0; i < nents; i++) for (i = 0; i < nents; i++, sg++) {
invalidate_dcache_range(sg_dma_address(&sg[i]), sg->dma_address = page_address(sg->page) + sg->offset;
sg_dma_address(&sg[i]) +
sg_dma_len(&sg[i])); invalidate_dcache_range(sg_dma_address(sg),
sg_dma_address(sg) +
sg_dma_len(sg));
}
return nents; return nents;
} }
......
...@@ -30,19 +30,19 @@ ...@@ -30,19 +30,19 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
static int *testarg = (int*)0xfeb00000; static int *testarg = (int *)0xfeb00000;
static int test_init(void) static int test_init(void)
{ {
*testarg = 1; *testarg = 1;
printk("Dual core test module inserted: set testarg = [%d]\n @ [%p]\n", printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
*testarg, testarg); *testarg, testarg);
return 0; return 0;
} }
static void test_exit(void) static void test_exit(void)
{ {
printk("Dual core test module removed: testarg = [%d]\n", *testarg); printk(KERN_INFO "Dual core test module removed: testarg = [%d]\n", *testarg);
} }
module_init(test_init); module_init(test_init);
......
/*
* This file contains sequences of code that will be copied to a
* fixed location, defined in <asm/atomic_seq.h>. The interrupt
* handlers ensure that these sequences appear to be atomic when
* executed from userspace.
* These are aligned to 16 bytes, so that we have some space to replace
* these sequences with something else (e.g. kernel traps if we ever do
* BF561 SMP).
*/
#include <linux/linkage.h>
#include <linux/unistd.h>
#include <asm/entry.h>
.text
ENTRY(_fixed_code_start)
.align 16
ENTRY(_sigreturn_stub)
P0 = __NR_rt_sigreturn;
EXCPT 0;
/* Speculative execution paranoia. */
0: JUMP.S 0b;
ENDPROC (_sigreturn_stub)
.align 16
/*
* Atomic swap, 8 bit.
* Inputs: P0: memory address to use
* R1: value to store
* Output: R0: old contents of the memory address, zero extended.
*/
ENTRY(_atomic_xchg32)
R0 = [P0];
[P0] = R1;
rts;
ENDPROC (_atomic_xchg32)
.align 16
/*
* Compare and swap, 32 bit.
* Inputs: P0: memory address to use
* R1: compare value
* R2: new value to store
* The new value is stored if the contents of the memory
* address is equal to the compare value.
* Output: R0: old contents of the memory address.
*/
ENTRY(_atomic_cas32)
R0 = [P0];
CC = R0 == R1;
IF !CC JUMP 1f;
[P0] = R2;
1:
rts;
ENDPROC (_atomic_cas32)
.align 16
/*
* Atomic add, 32 bit.
* Inputs: P0: memory address to use
* R0: value to add
* Outputs: R0: new contents of the memory address.
* R1: previous contents of the memory address.
*/
ENTRY(_atomic_add32)
R1 = [P0];
R0 = R1 + R0;
[P0] = R0;
rts;
ENDPROC (_atomic_add32)
.align 16
/*
* Atomic sub, 32 bit.
* Inputs: P0: memory address to use
* R0: value to subtract
* Outputs: R0: new contents of the memory address.
* R1: previous contents of the memory address.
*/
ENTRY(_atomic_sub32)
R1 = [P0];
R0 = R1 - R0;
[P0] = R0;
rts;
ENDPROC (_atomic_sub32)
.align 16
/*
* Atomic ior, 32 bit.
* Inputs: P0: memory address to use
* R0: value to ior
* Outputs: R0: new contents of the memory address.
* R1: previous contents of the memory address.
*/
ENTRY(_atomic_ior32)
R1 = [P0];
R0 = R1 | R0;
[P0] = R0;
rts;
ENDPROC (_atomic_ior32)
.align 16
/*
* Atomic ior, 32 bit.
* Inputs: P0: memory address to use
* R0: value to ior
* Outputs: R0: new contents of the memory address.
* R1: previous contents of the memory address.
*/
ENTRY(_atomic_and32)
R1 = [P0];
R0 = R1 & R0;
[P0] = R0;
rts;
ENDPROC (_atomic_ior32)
.align 16
/*
* Atomic ior, 32 bit.
* Inputs: P0: memory address to use
* R0: value to ior
* Outputs: R0: new contents of the memory address.
* R1: previous contents of the memory address.
*/
ENTRY(_atomic_xor32)
R1 = [P0];
R0 = R1 ^ R0;
[P0] = R0;
rts;
ENDPROC (_atomic_ior32)
ENTRY(_fixed_code_end)
...@@ -50,9 +50,7 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr, ...@@ -50,9 +50,7 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr,
break; break;
default: default:
pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", type);
type);
return 0; return 0;
} }
...@@ -83,8 +81,7 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr, ...@@ -83,8 +81,7 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
switch (type) { switch (type) {
case FLAT_BFIN_RELOC_TYPE_16_BIT: case FLAT_BFIN_RELOC_TYPE_16_BIT:
put_unaligned(addr, usptr); put_unaligned(addr, usptr);
pr_debug("new value %x at %p", get_unaligned(usptr), pr_debug("new value %x at %p", get_unaligned(usptr), usptr);
usptr);
break; break;
case FLAT_BFIN_RELOC_TYPE_16H_BIT: case FLAT_BFIN_RELOC_TYPE_16H_BIT:
......
This diff is collapsed.
...@@ -165,7 +165,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ...@@ -165,7 +165,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
for (s = sechdrs; s < sechdrs_end; ++s) { for (s = sechdrs; s < sechdrs_end; ++s) {
if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) ||
((strcmp(".text", secstrings + s->sh_name)==0) && ((strcmp(".text", secstrings + s->sh_name) == 0) &&
(hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) { (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) {
mod->arch.text_l1 = s; mod->arch.text_l1 = s;
dest = l1_inst_sram_alloc(s->sh_size); dest = l1_inst_sram_alloc(s->sh_size);
...@@ -179,8 +179,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ...@@ -179,8 +179,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
s->sh_flags &= ~SHF_ALLOC; s->sh_flags &= ~SHF_ALLOC;
s->sh_addr = (unsigned long)dest; s->sh_addr = (unsigned long)dest;
} }
if ((strcmp(".l1.data", secstrings + s->sh_name) == 0)|| if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) ||
((strcmp(".data", secstrings + s->sh_name)==0) && ((strcmp(".data", secstrings + s->sh_name) == 0) &&
(hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
mod->arch.data_a_l1 = s; mod->arch.data_a_l1 = s;
dest = l1_data_sram_alloc(s->sh_size); dest = l1_data_sram_alloc(s->sh_size);
...@@ -195,7 +195,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, ...@@ -195,7 +195,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
s->sh_addr = (unsigned long)dest; s->sh_addr = (unsigned long)dest;
} }
if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 ||
((strcmp(".bss", secstrings + s->sh_name)==0) && ((strcmp(".bss", secstrings + s->sh_name) == 0) &&
(hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
mod->arch.bss_a_l1 = s; mod->arch.bss_a_l1 = s;
dest = l1_data_sram_alloc(s->sh_size); dest = l1_data_sram_alloc(s->sh_size);
...@@ -326,7 +326,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab, ...@@ -326,7 +326,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
pr_debug("before %x after %x\n", *location16, pr_debug("before %x after %x\n", *location16,
(value & 0xffff)); (value & 0xffff));
tmp = (value & 0xffff); tmp = (value & 0xffff);
if((unsigned long)location16 >= L1_CODE_START) { if ((unsigned long)location16 >= L1_CODE_START) {
dma_memcpy(location16, &tmp, 2); dma_memcpy(location16, &tmp, 2);
} else } else
*location16 = tmp; *location16 = tmp;
...@@ -335,7 +335,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab, ...@@ -335,7 +335,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
pr_debug("before %x after %x\n", *location16, pr_debug("before %x after %x\n", *location16,
((value >> 16) & 0xffff)); ((value >> 16) & 0xffff));
tmp = ((value >> 16) & 0xffff); tmp = ((value >> 16) & 0xffff);
if((unsigned long)location16 >= L1_CODE_START) { if ((unsigned long)location16 >= L1_CODE_START) {
dma_memcpy(location16, &tmp, 2); dma_memcpy(location16, &tmp, 2);
} else } else
*location16 = tmp; *location16 = tmp;
...@@ -404,7 +404,7 @@ module_finalize(const Elf_Ehdr * hdr, ...@@ -404,7 +404,7 @@ module_finalize(const Elf_Ehdr * hdr,
continue; continue;
if ((sechdrs[i].sh_type == SHT_RELA) && if ((sechdrs[i].sh_type == SHT_RELA) &&
((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0)|| ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) ||
((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) &&
(hdr->e_flags & FLG_CODE_IN_L1)))) { (hdr->e_flags & FLG_CODE_IN_L1)))) {
apply_relocate_add((Elf_Shdr *) sechdrs, strtab, apply_relocate_add((Elf_Shdr *) sechdrs, strtab,
...@@ -417,13 +417,13 @@ module_finalize(const Elf_Ehdr * hdr, ...@@ -417,13 +417,13 @@ module_finalize(const Elf_Ehdr * hdr,
void module_arch_cleanup(struct module *mod) void module_arch_cleanup(struct module *mod)
{ {
if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr)) if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr))
l1_inst_sram_free((void*)mod->arch.text_l1->sh_addr); l1_inst_sram_free((void *)mod->arch.text_l1->sh_addr);
if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr)) if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr))
l1_data_sram_free((void*)mod->arch.data_a_l1->sh_addr); l1_data_sram_free((void *)mod->arch.data_a_l1->sh_addr);
if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr)) if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr))
l1_data_sram_free((void*)mod->arch.bss_a_l1->sh_addr); l1_data_sram_free((void *)mod->arch.bss_a_l1->sh_addr);
if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr)) if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr))
l1_data_B_sram_free((void*)mod->arch.data_b_l1->sh_addr); l1_data_B_sram_free((void *)mod->arch.data_b_l1->sh_addr);
if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr)) if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr))
l1_data_B_sram_free((void*)mod->arch.bss_b_l1->sh_addr); l1_data_B_sram_free((void *)mod->arch.bss_b_l1->sh_addr);
} }
...@@ -32,9 +32,10 @@ ...@@ -32,9 +32,10 @@
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/user.h> #include <linux/user.h>
#include <linux/a.out.h> #include <linux/a.out.h>
#include <linux/uaccess.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/uaccess.h> #include <asm/fixed_code.h>
#define LED_ON 0 #define LED_ON 0
#define LED_OFF 1 #define LED_OFF 1
...@@ -173,8 +174,8 @@ void show_regs(struct pt_regs *regs) ...@@ -173,8 +174,8 @@ void show_regs(struct pt_regs *regs)
printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n",
regs->r4, regs->r5, regs->r6, regs->r7); regs->r4, regs->r5, regs->r6, regs->r7);
if (!(regs->ipend)) if (!regs->ipend)
printk("USP: %08lx\n", rdusp()); printk(KERN_NOTICE "USP: %08lx\n", rdusp());
} }
/* Fill in the fpu structure for a core dump. */ /* Fill in the fpu structure for a core dump. */
...@@ -350,13 +351,77 @@ unsigned long get_wchan(struct task_struct *p) ...@@ -350,13 +351,77 @@ unsigned long get_wchan(struct task_struct *p)
return 0; return 0;
} }
void finish_atomic_sections (struct pt_regs *regs)
{
if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END)
return;
switch (regs->pc) {
case ATOMIC_XCHG32 + 2:
put_user(regs->r1, (int *)regs->p0);
regs->pc += 2;
break;
case ATOMIC_CAS32 + 2:
case ATOMIC_CAS32 + 4:
if (regs->r0 == regs->r1)
put_user(regs->r2, (int *)regs->p0);
regs->pc = ATOMIC_CAS32 + 8;
break;
case ATOMIC_CAS32 + 6:
put_user(regs->r2, (int *)regs->p0);
regs->pc += 2;
break;
case ATOMIC_ADD32 + 2:
regs->r0 = regs->r1 + regs->r0;
/* fall through */
case ATOMIC_ADD32 + 4:
put_user(regs->r0, (int *)regs->p0);
regs->pc = ATOMIC_ADD32 + 6;
break;
case ATOMIC_SUB32 + 2:
regs->r0 = regs->r1 - regs->r0;
/* fall through */
case ATOMIC_SUB32 + 4:
put_user(regs->r0, (int *)regs->p0);
regs->pc = ATOMIC_SUB32 + 6;
break;
case ATOMIC_IOR32 + 2:
regs->r0 = regs->r1 | regs->r0;
/* fall through */
case ATOMIC_IOR32 + 4:
put_user(regs->r0, (int *)regs->p0);
regs->pc = ATOMIC_IOR32 + 6;
break;
case ATOMIC_AND32 + 2:
regs->r0 = regs->r1 & regs->r0;
/* fall through */
case ATOMIC_AND32 + 4:
put_user(regs->r0, (int *)regs->p0);
regs->pc = ATOMIC_AND32 + 6;
break;
case ATOMIC_XOR32 + 2:
regs->r0 = regs->r1 ^ regs->r0;
/* fall through */
case ATOMIC_XOR32 + 4:
put_user(regs->r0, (int *)regs->p0);
regs->pc = ATOMIC_XOR32 + 6;
break;
}
}
#if defined(CONFIG_ACCESS_CHECK) #if defined(CONFIG_ACCESS_CHECK)
int _access_ok(unsigned long addr, unsigned long size) int _access_ok(unsigned long addr, unsigned long size)
{ {
if (addr > (addr + size)) if (addr > (addr + size))
return 0; return 0;
if (segment_eq(get_fs(),KERNEL_DS)) if (segment_eq(get_fs(), KERNEL_DS))
return 1; return 1;
#ifdef CONFIG_MTD_UCLINUX #ifdef CONFIG_MTD_UCLINUX
if (addr >= memory_start && (addr + size) <= memory_end) if (addr >= memory_start && (addr + size) <= memory_end)
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/user.h> #include <linux/user.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/uaccess.h>
#include <asm/uaccess.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -122,7 +122,7 @@ static inline long get_reg(struct task_struct *task, int regno) ...@@ -122,7 +122,7 @@ static inline long get_reg(struct task_struct *task, int regno)
static inline int static inline int
put_reg(struct task_struct *task, int regno, unsigned long data) put_reg(struct task_struct *task, int regno, unsigned long data)
{ {
char * reg_ptr; char *reg_ptr;
struct pt_regs *regs = struct pt_regs *regs =
(struct pt_regs *)((unsigned long)task_stack_page(task) + (struct pt_regs *)((unsigned long)task_stack_page(task) +
......
This diff is collapsed.
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/binfmts.h> #include <linux/binfmts.h>
#include <linux/freezer.h> #include <linux/freezer.h>
#include <linux/uaccess.h>
#include <asm/uaccess.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/ucontext.h> #include <asm/ucontext.h>
...@@ -341,7 +341,7 @@ asmlinkage void do_signal(struct pt_regs *regs) ...@@ -341,7 +341,7 @@ asmlinkage void do_signal(struct pt_regs *regs)
return; return;
} }
no_signal: no_signal:
/* Did we come from a system call? */ /* Did we come from a system call? */
if (regs->orig_p0 >= 0) if (regs->orig_p0 >= 0)
/* Restart the system call - no handlers present */ /* Restart the system call - no handlers present */
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/uaccess.h>
#include <linux/ipc.h>
#include <linux/unistd.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/uaccess.h>
#include <asm/ipc.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/unistd.h>
/* /*
* sys_pipe() is the normal C calling standard for creating * sys_pipe() is the normal C calling standard for creating
......
...@@ -87,7 +87,7 @@ void __init init_leds(void) ...@@ -87,7 +87,7 @@ void __init init_leds(void)
static inline void do_leds(void) static inline void do_leds(void)
{ {
static unsigned int count = 50; static unsigned int count = 50;
static int flag = 0; static int flag;
unsigned short tmp = 0; unsigned short tmp = 0;
if (--count == 0) { if (--count == 0) {
...@@ -200,7 +200,7 @@ irqreturn_t timer_interrupt(int irq, void *dummy)__attribute__((l1_text)); ...@@ -200,7 +200,7 @@ irqreturn_t timer_interrupt(int irq, void *dummy)__attribute__((l1_text));
irqreturn_t timer_interrupt(int irq, void *dummy) irqreturn_t timer_interrupt(int irq, void *dummy)
{ {
/* last time the cmos clock got updated */ /* last time the cmos clock got updated */
static long last_rtc_update = 0; static long last_rtc_update;
write_seqlock(&xtime_lock); write_seqlock(&xtime_lock);
......
...@@ -27,15 +27,15 @@ ...@@ -27,15 +27,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <asm/uaccess.h> #include <linux/uaccess.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/uaccess.h>
#include <asm/irq_handler.h> #include <asm/irq_handler.h>
#include <linux/interrupt.h> #include <asm/trace.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#ifdef CONFIG_KGDB #ifdef CONFIG_KGDB
# include <linux/debugger.h> # include <linux/debugger.h>
...@@ -76,7 +76,7 @@ static int printk_address(unsigned long address) ...@@ -76,7 +76,7 @@ static int printk_address(unsigned long address)
if (!modname) if (!modname)
modname = delim = ""; modname = delim = "";
return printk("<0x%p> { %s%s%s%s + 0x%lx }", return printk("<0x%p> { %s%s%s%s + 0x%lx }",
(void*)address, delim, modname, delim, symname, (void *)address, delim, modname, delim, symname,
(unsigned long)offset); (unsigned long)offset);
} }
...@@ -119,7 +119,7 @@ static int printk_address(unsigned long address) ...@@ -119,7 +119,7 @@ static int printk_address(unsigned long address)
write_unlock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
return printk("<0x%p> [ %s + 0x%lx ]", return printk("<0x%p> [ %s + 0x%lx ]",
(void*)address, name, offset); (void *)address, name, offset);
} }
vml = vml->next; vml = vml->next;
...@@ -128,19 +128,9 @@ static int printk_address(unsigned long address) ...@@ -128,19 +128,9 @@ static int printk_address(unsigned long address)
write_unlock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
/* we were unable to find this address anywhere */ /* we were unable to find this address anywhere */
return printk("[<0x%p>]", (void*)address); return printk("[<0x%p>]", (void *)address);
} }
#define trace_buffer_save(x) \
do { \
(x) = bfin_read_TBUFCTL(); \
bfin_write_TBUFCTL((x) & ~TBUFEN); \
} while (0)
#define trace_buffer_restore(x) \
do { \
bfin_write_TBUFCTL((x)); \
} while (0)
asmlinkage void trap_c(struct pt_regs *fp) asmlinkage void trap_c(struct pt_regs *fp)
{ {
int j, sig = 0; int j, sig = 0;
...@@ -203,15 +193,14 @@ asmlinkage void trap_c(struct pt_regs *fp) ...@@ -203,15 +193,14 @@ asmlinkage void trap_c(struct pt_regs *fp)
#else #else
/* 0x02 - User Defined, Caught by default */ /* 0x02 - User Defined, Caught by default */
#endif #endif
/* 0x03 - Atomic test and set */ /* 0x03 - User Defined, userspace stack overflow */
case VEC_EXCPT03: case VEC_EXCPT03:
info.si_code = SEGV_STACKFLOW; info.si_code = SEGV_STACKFLOW;
sig = SIGSEGV; sig = SIGSEGV;
printk(KERN_EMERG EXC_0x03); printk(KERN_EMERG EXC_0x03);
CHK_DEBUGGER_TRAP(); CHK_DEBUGGER_TRAP();
break; break;
/* 0x04 - spinlock - handled by _ex_spinlock, /* 0x04 - User Defined, Caught by default */
getting here is an error */
/* 0x05 - User Defined, Caught by default */ /* 0x05 - User Defined, Caught by default */
/* 0x06 - User Defined, Caught by default */ /* 0x06 - User Defined, Caught by default */
/* 0x07 - User Defined, Caught by default */ /* 0x07 - User Defined, Caught by default */
...@@ -547,29 +536,28 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr) ...@@ -547,29 +536,28 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n"
KERN_EMERG "\n", KERN_EMERG "\n",
(void*)current->mm->start_code, (void *)current->mm->start_code,
(void*)current->mm->end_code, (void *)current->mm->end_code,
(void*)current->mm->start_data, (void *)current->mm->start_data,
(void*)current->mm->end_data, (void *)current->mm->end_data,
(void*)current->mm->end_data, (void *)current->mm->end_data,
(void*)current->mm->brk, (void *)current->mm->brk,
(void*)current->mm->start_stack); (void *)current->mm->start_stack);
} }
printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr); printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr);
if (retaddr != 0 && retaddr <= (void*)physical_mem_end if (retaddr != 0 && retaddr <= (void *)physical_mem_end
#if L1_CODE_LENGTH != 0 #if L1_CODE_LENGTH != 0
/* FIXME: Copy the code out of L1 Instruction SRAM through dma /* FIXME: Copy the code out of L1 Instruction SRAM through dma
memcpy. */ memcpy. */
&& !(retaddr >= (void*)L1_CODE_START && !(retaddr >= (void *)L1_CODE_START
&& retaddr < (void*)(L1_CODE_START + L1_CODE_LENGTH)) && retaddr < (void *)(L1_CODE_START + L1_CODE_LENGTH))
#endif #endif
) { ) {
int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32; int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32;
unsigned short x = 0; unsigned short x = 0;
for (; i < ((unsigned int)retaddr & 0xFFFFFFF0 ) + 32 ; for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) {
i += 2) { if (!(i & 0xF))
if ( !(i & 0xF) )
printk(KERN_EMERG "\n" KERN_EMERG printk(KERN_EMERG "\n" KERN_EMERG
"0x%08x: ", i); "0x%08x: ", i);
...@@ -588,7 +576,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr) ...@@ -588,7 +576,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
" The rest of this error" " The rest of this error"
" is meanless\n"); " is meanless\n");
#endif #endif
if ( i == (unsigned int)retaddr ) if (i == (unsigned int)retaddr)
printk("[%04x]", x); printk("[%04x]", x);
else else
printk(" %04x ", x); printk(" %04x ", x);
...@@ -681,8 +669,8 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp) ...@@ -681,8 +669,8 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
break; break;
} }
printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void*)bfin_read_DCPLB_FAULT_ADDR()); printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR());
printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void*)bfin_read_ICPLB_FAULT_ADDR()); printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR());
dump_bfin_regs(fp, (void *)fp->retx); dump_bfin_regs(fp, (void *)fp->retx);
dump_stack(); dump_stack();
panic("Unrecoverable event\n"); panic("Unrecoverable event\n");
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/mem_map.h> #include <asm/mem_map.h>
#include <asm/page.h>
OUTPUT_FORMAT("elf32-bfin") OUTPUT_FORMAT("elf32-bfin")
ENTRY(__start) ENTRY(__start)
...@@ -63,8 +64,8 @@ SECTIONS ...@@ -63,8 +64,8 @@ SECTIONS
.data : .data :
{ {
. = ALIGN(PAGE_SIZE);
__sdata = .; __sdata = .;
. = ALIGN(0x2000);
*(.data.init_task) *(.data.init_task)
DATA_DATA DATA_DATA
CONSTRUCTORS CONSTRUCTORS
...@@ -72,14 +73,14 @@ SECTIONS ...@@ -72,14 +73,14 @@ SECTIONS
. = ALIGN(32); . = ALIGN(32);
*(.data.cacheline_aligned) *(.data.cacheline_aligned)
. = ALIGN(0x2000); . = ALIGN(PAGE_SIZE);
__edata = .; __edata = .;
} }
. = ALIGN(PAGE_SIZE);
___init_begin = .; ___init_begin = .;
.init : .init :
{ {
. = ALIGN(4096);
__sinittext = .; __sinittext = .;
*(.init.text) *(.init.text)
__einittext = .; __einittext = .;
...@@ -152,9 +153,10 @@ SECTIONS ...@@ -152,9 +153,10 @@ SECTIONS
__ebss_b_l1 = .; __ebss_b_l1 = .;
} }
___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
___init_end = ALIGN(PAGE_SIZE);
.bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) : .bss ___init_end :
{ {
. = ALIGN(4); . = ALIGN(4);
___bss_start = .; ___bss_start = .;
......
...@@ -8,4 +8,3 @@ int strcmp(const char *dest, const char *src) ...@@ -8,4 +8,3 @@ int strcmp(const char *dest, const char *src)
{ {
return __inline_strcmp(dest, src); return __inline_strcmp(dest, src);
} }
...@@ -8,4 +8,3 @@ char *strcpy(char *dest, const char *src) ...@@ -8,4 +8,3 @@ char *strcpy(char *dest, const char *src)
{ {
return __inline_strcpy(dest, src); return __inline_strcpy(dest, src);
} }
...@@ -8,4 +8,3 @@ int strncmp(const char *cs, const char *ct, size_t count) ...@@ -8,4 +8,3 @@ int strncmp(const char *cs, const char *ct, size_t count)
{ {
return __inline_strncmp(cs, ct, count); return __inline_strncmp(cs, ct, count);
} }
...@@ -8,4 +8,3 @@ char *strncpy(char *dest, const char *src, size_t n) ...@@ -8,4 +8,3 @@ char *strncpy(char *dest, const char *src, size_t n)
{ {
return __inline_strncpy(dest, src, n); return __inline_strncpy(dest, src, n);
} }
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
extra-y := head.o extra-y := head.o
obj-y := ints-priority.o obj-y := ints-priority.o dma.o
obj-$(CONFIG_CPU_FREQ_BF533) += cpu.o obj-$(CONFIG_CPU_FREQ) += cpu.o
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
/* /*
...@@ -51,11 +51,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -51,11 +51,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -98,7 +98,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -98,7 +98,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.platform_data = &bfin_spi_flash_data, .platform_data = &bfin_spi_flash_data,
.controller_data = &spi_flash_chip_info, .controller_data = &spi_flash_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
},{ }, {
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, /* Framework bus number */ .bus_num = 1, /* Framework bus number */
...@@ -145,7 +145,7 @@ static struct resource smc91x_resources[] = { ...@@ -145,7 +145,7 @@ static struct resource smc91x_resources[] = {
.start = 0x20200300, .start = 0x20200300,
.end = 0x20200300 + 16, .end = 0x20200300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF0, .start = IRQ_PF0,
.end = IRQ_PF0, .end = IRQ_PF0,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -194,11 +194,11 @@ static struct resource isp1362_hcd_resources[] = { ...@@ -194,11 +194,11 @@ static struct resource isp1362_hcd_resources[] = {
.start = 0x20308000, .start = 0x20308000,
.end = 0x20308000, .end = 0x20308000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20308004, .start = 0x20308004,
.end = 0x20308004, .end = 0x20308004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF4, .start = IRQ_PF4,
.end = IRQ_PF4, .end = IRQ_PF4,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
/* /*
...@@ -61,7 +61,7 @@ static struct resource smc91x_resources[] = { ...@@ -61,7 +61,7 @@ static struct resource smc91x_resources[] = {
.start = 0x20310300, .start = 0x20310300,
.end = 0x20310300 + 16, .end = 0x20310300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF9, .start = IRQ_PF9,
.end = IRQ_PF9, .end = IRQ_PF9,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -85,11 +85,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -85,11 +85,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <asm/irq.h> #include <linux/irq.h>
/* /*
* Name the Board for the /proc/cpuinfo * Name the Board for the /proc/cpuinfo
...@@ -53,11 +53,11 @@ static struct resource smc91x_resources[] = { ...@@ -53,11 +53,11 @@ static struct resource smc91x_resources[] = {
.start = 0x20300300, .start = 0x20300300,
.end = 0x20300300 + 16, .end = 0x20300300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PROG_INTB, .start = IRQ_PROG_INTB,
.end = IRQ_PROG_INTB, .end = IRQ_PROG_INTB,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},{ }, {
/* /*
* denotes the flag pin and is used directly if * denotes the flag pin and is used directly if
* CONFIG_IRQCHIP_DEMUX_GPIO is defined. * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#endif #endif
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
/* /*
...@@ -62,7 +62,7 @@ static struct resource smc91x_resources[] = { ...@@ -62,7 +62,7 @@ static struct resource smc91x_resources[] = {
.start = 0x20300300, .start = 0x20300300,
.end = 0x20300300 + 16, .end = 0x20300300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -83,7 +83,7 @@ static struct resource net2272_bfin_resources[] = { ...@@ -83,7 +83,7 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20300000, .start = 0x20300000,
.end = 0x20300000 + 0x100, .end = 0x20300000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF10, .start = IRQ_PF10,
.end = IRQ_PF10, .end = IRQ_PF10,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -108,11 +108,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -108,11 +108,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -233,7 +233,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -233,7 +233,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, .bus_num = 1,
.chip_select = 3, .chip_select = 3,
.controller_data= &spi_si3xxx_chip_info, .controller_data = &spi_si3xxx_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
{ {
...@@ -241,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -241,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, .bus_num = 1,
.chip_select = 2, .chip_select = 2,
.controller_data= &spi_si3xxx_chip_info, .controller_data = &spi_si3xxx_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
......
...@@ -79,8 +79,7 @@ static int bf533_target(struct cpufreq_policy *policy, ...@@ -79,8 +79,7 @@ static int bf533_target(struct cpufreq_policy *policy,
int i; int i;
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
if (cpufreq_frequency_table_target if (cpufreq_frequency_table_target(policy, bf533_freq_table, target_freq, relation, &index))
(policy, bf533_freq_table, target_freq, relation, &index))
return -EINVAL; return -EINVAL;
cclk_mhz = bf533_freq_table[index].frequency; cclk_mhz = bf533_freq_table[index].frequency;
vco_mhz = bf533_freq_table[index].index; vco_mhz = bf533_freq_table[index].index;
......
/*
* File: arch/blackfin/mach-bf533/dma.c
* Based on:
* Author:
*
* Created:
* Description: This file contains the simple DMA Implementation for Blackfin
*
* Modified:
* Copyright 2004-2006 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see the file COPYING, or write
* to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <asm/blackfin.h>
#include <asm/dma.h>
struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
(struct dma_register *) DMA0_NEXT_DESC_PTR,
(struct dma_register *) DMA1_NEXT_DESC_PTR,
(struct dma_register *) DMA2_NEXT_DESC_PTR,
(struct dma_register *) DMA3_NEXT_DESC_PTR,
(struct dma_register *) DMA4_NEXT_DESC_PTR,
(struct dma_register *) DMA5_NEXT_DESC_PTR,
(struct dma_register *) DMA6_NEXT_DESC_PTR,
(struct dma_register *) DMA7_NEXT_DESC_PTR,
(struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
(struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
(struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
(struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
};
int channel2irq(unsigned int channel)
{
int ret_irq = -1;
switch (channel) {
case CH_PPI:
ret_irq = IRQ_PPI;
break;
case CH_SPORT0_RX:
ret_irq = IRQ_SPORT0_RX;
break;
case CH_SPORT0_TX:
ret_irq = IRQ_SPORT0_TX;
break;
case CH_SPORT1_RX:
ret_irq = IRQ_SPORT1_RX;
break;
case CH_SPORT1_TX:
ret_irq = IRQ_SPORT1_TX;
break;
case CH_SPI:
ret_irq = IRQ_SPI;
break;
case CH_UART_RX:
ret_irq = IRQ_UART_RX;
break;
case CH_UART_TX:
ret_irq = IRQ_UART_TX;
break;
case CH_MEM_STREAM0_SRC:
case CH_MEM_STREAM0_DEST:
ret_irq = IRQ_MEM_DMA0;
break;
case CH_MEM_STREAM1_SRC:
case CH_MEM_STREAM1_DEST:
ret_irq = IRQ_MEM_DMA1;
break;
}
return ret_irq;
}
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/trace.h>
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
#include <asm/mach/mem_init.h> #include <asm/mach/mem_init.h>
#endif #endif
...@@ -96,6 +97,10 @@ ENTRY(__start) ...@@ -96,6 +97,10 @@ ENTRY(__start)
M2 = r0; M2 = r0;
M3 = r0; M3 = r0;
trace_buffer_start(p0,r0);
P0 = R1;
R0 = R1;
#if CONFIG_DEBUG_KERNEL_START #if CONFIG_DEBUG_KERNEL_START
/* /*
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/irq.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/irq.h>
void program_IAR(void) void program_IAR(void)
{ {
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
extra-y := head.o extra-y := head.o
obj-y := ints-priority.o obj-y := ints-priority.o dma.o
obj-$(CONFIG_CPU_FREQ) += cpu.o obj-$(CONFIG_CPU_FREQ) += cpu.o
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
/* /*
...@@ -53,11 +53,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -53,11 +53,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -202,7 +202,7 @@ static struct resource smc91x_resources[] = { ...@@ -202,7 +202,7 @@ static struct resource smc91x_resources[] = {
.start = 0x20200300, .start = 0x20200300,
.end = 0x20200300 + 16, .end = 0x20200300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF14, .start = IRQ_PF14,
.end = IRQ_PF14, .end = IRQ_PF14,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -223,11 +223,11 @@ static struct resource isp1362_hcd_resources[] = { ...@@ -223,11 +223,11 @@ static struct resource isp1362_hcd_resources[] = {
.start = 0x20308000, .start = 0x20308000,
.end = 0x20308000, .end = 0x20308000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20308004, .start = 0x20308004,
.end = 0x20308004, .end = 0x20308004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PG15, .start = IRQ_PG15,
.end = IRQ_PG15, .end = IRQ_PG15,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -262,7 +262,7 @@ static struct resource net2272_bfin_resources[] = { ...@@ -262,7 +262,7 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20200000, .start = 0x20200000,
.end = 0x20200000 + 0x100, .end = 0x20200000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -283,7 +283,7 @@ static struct resource bfin_uart_resources[] = { ...@@ -283,7 +283,7 @@ static struct resource bfin_uart_resources[] = {
.start = 0xFFC00400, .start = 0xFFC00400,
.end = 0xFFC004FF, .end = 0xFFC004FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0xFFC02000, .start = 0xFFC02000,
.end = 0xFFC020FF, .end = 0xFFC020FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#if defined(CONFIG_GENERIC_BOARD) \ #if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP)
|| defined(CONFIG_BFIN537_STAMP)
/* /*
* Currently the MAC address is saved in Flash by U-Boot * Currently the MAC address is saved in Flash by U-Boot
...@@ -43,7 +42,7 @@ void get_bf537_ether_addr(char *addr) ...@@ -43,7 +42,7 @@ void get_bf537_ether_addr(char *addr)
*/ */
void get_bf537_ether_addr(char *addr) void get_bf537_ether_addr(char *addr)
{ {
printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n",__FILE__); printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__);
} }
#endif #endif
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h>
#include <linux/usb_sl811.h> #include <linux/usb_sl811.h>
#include <asm/bfin5xx_spi.h>
/* /*
* Name the Board for the /proc/cpuinfo * Name the Board for the /proc/cpuinfo
...@@ -54,19 +54,19 @@ static struct resource bfin_pcmcia_cf_resources[] = { ...@@ -54,19 +54,19 @@ static struct resource bfin_pcmcia_cf_resources[] = {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
.end = 0x20312000, .end = 0x20312000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20311000, /* Attribute Memory */ .start = 0x20311000, /* Attribute Memory */
.end = 0x20311FFF, .end = 0x20311FFF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PROG_INTA, .start = IRQ_PROG_INTA,
.end = IRQ_PROG_INTA, .end = IRQ_PROG_INTA,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},{ }, {
.start = IRQ_PF4, .start = IRQ_PF4,
.end = IRQ_PF4, .end = IRQ_PF4,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},{ }, {
.start = 6, /* Card Detect PF6 */ .start = 6, /* Card Detect PF6 */
.end = 6, .end = 6,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -95,11 +95,11 @@ static struct resource smc91x_resources[] = { ...@@ -95,11 +95,11 @@ static struct resource smc91x_resources[] = {
.start = 0x20300300, .start = 0x20300300,
.end = 0x20300300 + 16, .end = 0x20300300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PROG_INTB, .start = IRQ_PROG_INTB,
.end = IRQ_PROG_INTB, .end = IRQ_PROG_INTB,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},{ }, {
/* /*
* denotes the flag pin and is used directly if * denotes the flag pin and is used directly if
* CONFIG_IRQCHIP_DEMUX_GPIO is defined. * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
...@@ -123,15 +123,15 @@ static struct resource sl811_hcd_resources[] = { ...@@ -123,15 +123,15 @@ static struct resource sl811_hcd_resources[] = {
.start = 0x20340000, .start = 0x20340000,
.end = 0x20340000, .end = 0x20340000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20340004, .start = 0x20340004,
.end = 0x20340004, .end = 0x20340004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PROG_INTA, .start = IRQ_PROG_INTA,
.end = IRQ_PROG_INTA, .end = IRQ_PROG_INTA,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},{ }, {
.start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
.end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -179,15 +179,15 @@ static struct resource isp1362_hcd_resources[] = { ...@@ -179,15 +179,15 @@ static struct resource isp1362_hcd_resources[] = {
.start = 0x20360000, .start = 0x20360000,
.end = 0x20360000, .end = 0x20360000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20360004, .start = 0x20360004,
.end = 0x20360004, .end = 0x20360004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PROG_INTA, .start = IRQ_PROG_INTA,
.end = IRQ_PROG_INTA, .end = IRQ_PROG_INTA,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},{ }, {
.start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
.end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -228,7 +228,7 @@ static struct resource net2272_bfin_resources[] = { ...@@ -228,7 +228,7 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20300000, .start = 0x20300000,
.end = 0x20300000 + 0x100, .end = 0x20300000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -253,11 +253,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -253,11 +253,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -375,7 +375,7 @@ static struct resource bfin_uart_resources[] = { ...@@ -375,7 +375,7 @@ static struct resource bfin_uart_resources[] = {
.start = 0xFFC00400, .start = 0xFFC00400,
.end = 0xFFC004FF, .end = 0xFFC004FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0xFFC02000, .start = 0xFFC02000,
.end = 0xFFC020FF, .end = 0xFFC020FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#endif #endif
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
#include <linux/usb_sl811.h> #include <linux/usb_sl811.h>
...@@ -58,15 +58,15 @@ static struct resource bfin_pcmcia_cf_resources[] = { ...@@ -58,15 +58,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
.end = 0x20312000, .end = 0x20312000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20311000, /* Attribute Memory */ .start = 0x20311000, /* Attribute Memory */
.end = 0x20311FFF, .end = 0x20311FFF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF4, .start = IRQ_PF4,
.end = IRQ_PF4, .end = IRQ_PF4,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},{ }, {
.start = 6, /* Card Detect PF6 */ .start = 6, /* Card Detect PF6 */
.end = 6, .end = 6,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -95,7 +95,7 @@ static struct resource smc91x_resources[] = { ...@@ -95,7 +95,7 @@ static struct resource smc91x_resources[] = {
.start = 0x20300300, .start = 0x20300300,
.end = 0x20300300 + 16, .end = 0x20300300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
...@@ -116,11 +116,11 @@ static struct resource sl811_hcd_resources[] = { ...@@ -116,11 +116,11 @@ static struct resource sl811_hcd_resources[] = {
.start = 0x20340000, .start = 0x20340000,
.end = 0x20340000, .end = 0x20340000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20340004, .start = 0x20340004,
.end = 0x20340004, .end = 0x20340004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = CONFIG_USB_SL811_BFIN_IRQ, .start = CONFIG_USB_SL811_BFIN_IRQ,
.end = CONFIG_USB_SL811_BFIN_IRQ, .end = CONFIG_USB_SL811_BFIN_IRQ,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -167,11 +167,11 @@ static struct resource isp1362_hcd_resources[] = { ...@@ -167,11 +167,11 @@ static struct resource isp1362_hcd_resources[] = {
.start = 0x20360000, .start = 0x20360000,
.end = 0x20360000, .end = 0x20360000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20360004, .start = 0x20360004,
.end = 0x20360004, .end = 0x20360004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
.end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -212,7 +212,7 @@ static struct resource net2272_bfin_resources[] = { ...@@ -212,7 +212,7 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20300000, .start = 0x20300000,
.end = 0x20300000 + 0x100, .end = 0x20300000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -238,11 +238,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -238,11 +238,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -294,16 +294,6 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = { ...@@ -294,16 +294,6 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_PBX)
static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
.ctl_reg = 0x4, /* send zero */
.enable_dma = 0,
.bits_per_word = 8,
.cs_change_per_word = 1,
};
#endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = { static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.cs_change_per_word = 1, .cs_change_per_word = 1,
...@@ -392,24 +382,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -392,24 +382,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_PBX)
{
.modalias = "fxs-spi",
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1,
.chip_select = 3,
.controller_data= &spi_si3xxx_chip_info,
.mode = SPI_MODE_3,
},
{
.modalias = "fxo-spi",
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1,
.chip_select = 2,
.controller_data= &spi_si3xxx_chip_info,
.mode = SPI_MODE_3,
},
#endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
{ {
.modalias = "ad7877", .modalias = "ad7877",
...@@ -451,7 +423,7 @@ static struct resource bfin_uart_resources[] = { ...@@ -451,7 +423,7 @@ static struct resource bfin_uart_resources[] = {
.start = 0xFFC00400, .start = 0xFFC00400,
.end = 0xFFC004FF, .end = 0xFFC004FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0xFFC02000, .start = 0xFFC02000,
.end = 0xFFC020FF, .end = 0xFFC020FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
......
...@@ -37,12 +37,10 @@ ...@@ -37,12 +37,10 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#endif #endif
#include <asm/irq.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/bfin5xx_spi.h>
#include <linux/usb_sl811.h> #include <linux/usb_sl811.h>
#include <asm/bfin5xx_spi.h>
#include <linux/spi/ad7877.h> #include <linux/spi/ad7877.h>
/* /*
...@@ -85,7 +83,7 @@ static struct platform_device *bfin_isp1761_devices[] = { ...@@ -85,7 +83,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
int __init bfin_isp1761_init(void) int __init bfin_isp1761_init(void)
{ {
unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
...@@ -107,15 +105,15 @@ static struct resource bfin_pcmcia_cf_resources[] = { ...@@ -107,15 +105,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
.end = 0x20312000, .end = 0x20312000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20311000, /* Attribute Memory */ .start = 0x20311000, /* Attribute Memory */
.end = 0x20311FFF, .end = 0x20311FFF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF4, .start = IRQ_PF4,
.end = IRQ_PF4, .end = IRQ_PF4,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},{ }, {
.start = 6, /* Card Detect PF6 */ .start = 6, /* Card Detect PF6 */
.end = 6, .end = 6,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -144,7 +142,7 @@ static struct resource smc91x_resources[] = { ...@@ -144,7 +142,7 @@ static struct resource smc91x_resources[] = {
.start = 0x20300300, .start = 0x20300300,
.end = 0x20300300 + 16, .end = 0x20300300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
...@@ -159,17 +157,39 @@ static struct platform_device smc91x_device = { ...@@ -159,17 +157,39 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
static struct resource dm9000_resources[] = {
[0] = {
.start = 0x203FB800,
.end = 0x203FB800 + 8,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_PF9,
.end = IRQ_PF9,
.flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
},
};
static struct platform_device dm9000_device = {
.name = "dm9000",
.id = -1,
.num_resources = ARRAY_SIZE(dm9000_resources),
.resource = dm9000_resources,
};
#endif
#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
static struct resource sl811_hcd_resources[] = { static struct resource sl811_hcd_resources[] = {
{ {
.start = 0x20340000, .start = 0x20340000,
.end = 0x20340000, .end = 0x20340000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20340004, .start = 0x20340004,
.end = 0x20340004, .end = 0x20340004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = CONFIG_USB_SL811_BFIN_IRQ, .start = CONFIG_USB_SL811_BFIN_IRQ,
.end = CONFIG_USB_SL811_BFIN_IRQ, .end = CONFIG_USB_SL811_BFIN_IRQ,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -216,11 +236,11 @@ static struct resource isp1362_hcd_resources[] = { ...@@ -216,11 +236,11 @@ static struct resource isp1362_hcd_resources[] = {
.start = 0x20360000, .start = 0x20360000,
.end = 0x20360000, .end = 0x20360000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x20360004, .start = 0x20360004,
.end = 0x20360004, .end = 0x20360004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
.end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -261,7 +281,7 @@ static struct resource net2272_bfin_resources[] = { ...@@ -261,7 +281,7 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20300000, .start = 0x20300000,
.end = 0x20300000 + 0x100, .end = 0x20300000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -287,11 +307,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -287,11 +307,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -361,7 +381,6 @@ static struct bfin5xx_spi_chip ad5304_chip_info = { ...@@ -361,7 +381,6 @@ static struct bfin5xx_spi_chip ad5304_chip_info = {
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = { static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
// .cs_change_per_word = 1,
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 16, .bits_per_word = 16,
}; };
...@@ -453,7 +472,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -453,7 +472,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, .bus_num = 1,
.chip_select = 3, .chip_select = 3,
.controller_data= &spi_si3xxx_chip_info, .controller_data = &spi_si3xxx_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
{ {
...@@ -461,7 +480,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -461,7 +480,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, .bus_num = 1,
.chip_select = 2, .chip_select = 2,
.controller_data= &spi_si3xxx_chip_info, .controller_data = &spi_si3xxx_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
...@@ -516,7 +535,7 @@ static struct resource bfin_uart_resources[] = { ...@@ -516,7 +535,7 @@ static struct resource bfin_uart_resources[] = {
.start = 0xFFC00400, .start = 0xFFC00400,
.end = 0xFFC004FF, .end = 0xFFC004FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0xFFC02000, .start = 0xFFC02000,
.end = 0xFFC020FF, .end = 0xFFC020FF,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
...@@ -571,6 +590,10 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -571,6 +590,10 @@ static struct platform_device *stamp_devices[] __initdata = {
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
&dm9000_device,
#endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
&bfin_mac_device, &bfin_mac_device,
#endif #endif
......
/*
* File: arch/blackfin/mach-bf537/dma.c
* Based on:
* Author:
*
* Created:
* Description: This file contains the simple DMA Implementation for Blackfin
*
* Modified:
* Copyright 2004-2007 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see the file COPYING, or write
* to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <asm/blackfin.h>
#include <asm/dma.h>
struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
(struct dma_register *) DMA0_NEXT_DESC_PTR,
(struct dma_register *) DMA1_NEXT_DESC_PTR,
(struct dma_register *) DMA2_NEXT_DESC_PTR,
(struct dma_register *) DMA3_NEXT_DESC_PTR,
(struct dma_register *) DMA4_NEXT_DESC_PTR,
(struct dma_register *) DMA5_NEXT_DESC_PTR,
(struct dma_register *) DMA6_NEXT_DESC_PTR,
(struct dma_register *) DMA7_NEXT_DESC_PTR,
(struct dma_register *) DMA8_NEXT_DESC_PTR,
(struct dma_register *) DMA9_NEXT_DESC_PTR,
(struct dma_register *) DMA10_NEXT_DESC_PTR,
(struct dma_register *) DMA11_NEXT_DESC_PTR,
(struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
(struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
(struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
(struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
};
int channel2irq(unsigned int channel)
{
int ret_irq = -1;
switch (channel) {
case CH_PPI:
ret_irq = IRQ_PPI;
break;
case CH_EMAC_RX:
ret_irq = IRQ_MAC_RX;
break;
case CH_EMAC_TX:
ret_irq = IRQ_MAC_TX;
break;
case CH_UART1_RX:
ret_irq = IRQ_UART1_RX;
break;
case CH_UART1_TX:
ret_irq = IRQ_UART1_TX;
break;
case CH_SPORT0_RX:
ret_irq = IRQ_SPORT0_RX;
break;
case CH_SPORT0_TX:
ret_irq = IRQ_SPORT0_TX;
break;
case CH_SPORT1_RX:
ret_irq = IRQ_SPORT1_RX;
break;
case CH_SPORT1_TX:
ret_irq = IRQ_SPORT1_TX;
break;
case CH_SPI:
ret_irq = IRQ_SPI;
break;
case CH_UART_RX:
ret_irq = IRQ_UART_RX;
break;
case CH_UART_TX:
ret_irq = IRQ_UART_TX;
break;
case CH_MEM_STREAM0_SRC:
case CH_MEM_STREAM0_DEST:
ret_irq = IRQ_MEM_DMA0;
break;
case CH_MEM_STREAM1_SRC:
case CH_MEM_STREAM1_DEST:
ret_irq = IRQ_MEM_DMA1;
break;
}
return ret_irq;
}
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/trace.h>
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
#include <asm/mach/mem_init.h> #include <asm/mach/mem_init.h>
#endif #endif
...@@ -93,6 +95,10 @@ ENTRY(__start) ...@@ -93,6 +95,10 @@ ENTRY(__start)
M2 = r0; M2 = r0;
M3 = r0; M3 = r0;
trace_buffer_start(p0,r0);
P0 = R1;
R0 = R1;
/* Turn off the icache */ /* Turn off the icache */
p0.l = (IMEM_CONTROL & 0xFFFF); p0.l = (IMEM_CONTROL & 0xFFFF);
p0.h = (IMEM_CONTROL >> 16); p0.h = (IMEM_CONTROL >> 16);
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/irq.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/irq.h>
void program_IAR(void) void program_IAR(void)
{ {
......
if (BF54x)
menu "BF548 Specific Configuration"
comment "Interrupt Priority Assignment"
menu "Priority"
config IRQ_PLL_WAKEUP
int "IRQ_PLL_WAKEUP"
default 7
config IRQ_DMAC0_ERR
int "IRQ_DMAC0_ERR"
default 7
config IRQ_EPPI0_ERR
int "IRQ_EPPI0_ERR"
default 7
config IRQ_SPORT0_ERR
int "IRQ_SPORT0_ERR"
default 7
config IRQ_SPORT1_ERR
int "IRQ_SPORT1_ERR"
default 7
config IRQ_SPI0_ERR
int "IRQ_SPI0_ERR"
default 7
config IRQ_UART0_ERR
int "IRQ_UART0_ERR"
default 7
config IRQ_RTC
int "IRQ_RTC"
default 8
config IRQ_EPPI0
int "IRQ_EPPI0"
default 8
config IRQ_SPORT0_RX
int "IRQ_SPORT0_RX"
default 9
config IRQ_SPORT0_TX
int "IRQ_SPORT0_TX"
default 9
config IRQ_SPORT1_RX
int "IRQ_SPORT1_RX"
default 9
config IRQ_SPORT1_TX
int "IRQ_SPORT1_TX"
default 9
config IRQ_SPI0
int "IRQ_SPI0"
default 10
config IRQ_UART0_RX
int "IRQ_UART0_RX"
default 10
config IRQ_UART0_TX
int "IRQ_UART0_TX"
default 10
config IRQ_TIMER8
int "IRQ_TIMER8"
default 11
config IRQ_TIMER9
int "IRQ_TIMER9"
default 11
config IRQ_TIMER10
int "IRQ_TIMER10"
default 11
config IRQ_PINT0
int "IRQ_PINT0"
default 12
config IRQ_PINT1
int "IRQ_PINT0"
default 12
config IRQ_MDMAS0
int "IRQ_MDMAS0"
default 13
config IRQ_MDMAS1
int "IRQ_DMDMAS1"
default 13
config IRQ_WATCHDOG
int "IRQ_WATCHDOG"
default 13
config IRQ_DMAC1_ERR
int "IRQ_DMAC1_ERR"
default 7
config IRQ_SPORT2_ERR
int "IRQ_SPORT2_ERR"
default 7
config IRQ_SPORT3_ERR
int "IRQ_SPORT3_ERR"
default 7
config IRQ_MXVR_DATA
int "IRQ MXVR Data"
default 7
config IRQ_SPI1_ERR
int "IRQ_SPI1_ERR"
default 7
config IRQ_SPI2_ERR
int "IRQ_SPI2_ERR"
default 7
config IRQ_UART1_ERR
int "IRQ_UART1_ERR"
default 7
config IRQ_UART2_ERR
int "IRQ_UART2_ERR"
default 7
config IRQ_CAN0_ERR
int "IRQ_CAN0_ERR"
default 7
config IRQ_SPORT2_RX
int "IRQ_SPORT2_RX"
default 9
config IRQ_SPORT2_TX
int "IRQ_SPORT2_TX"
default 9
config IRQ_SPORT3_RX
int "IRQ_SPORT3_RX"
default 9
config IRQ_SPORT3_TX
int "IRQ_SPORT3_TX"
default 9
config IRQ_EPPI1
int "IRQ_EPPI1"
default 9
config IRQ_EPPI2
int "IRQ_EPPI2"
default 9
config IRQ_SPI1
int "IRQ_SPI1"
default 10
config IRQ_SPI2
int "IRQ_SPI2"
default 10
config IRQ_UART1_RX
int "IRQ_UART1_RX"
default 10
config IRQ_UART1_TX
int "IRQ_UART1_TX"
default 10
config IRQ_ATAPI_RX
int "IRQ_ATAPI_RX"
default 10
config IRQ_ATAPI_TX
int "IRQ_ATAPI_TX"
default 10
config IRQ_TWI0
int "IRQ_TWI0"
default 11
config IRQ_TWI1
int "IRQ_TWI1"
default 11
config IRQ_CAN0_RX
int "IRQ_CAN_RX"
default 11
config IRQ_CAN0_TX
int "IRQ_CAN_TX"
default 11
config IRQ_MDMAS2
int "IRQ_MDMAS2"
default 13
config IRQ_MDMAS3
int "IRQ_DMMAS3"
default 13
config IRQ_MXVR_ERR
int "IRQ_MXVR_ERR"
default 11
config IRQ_MXVR_MSG
int "IRQ_MXVR_MSG"
default 11
config IRQ_MXVR_PKT
int "IRQ_MXVR_PKT"
default 11
config IRQ_EPPI1_ERR
int "IRQ_EPPI1_ERR"
default 7
config IRQ_EPPI2_ERR
int "IRQ_EPPI2_ERR"
default 7
config IRQ_UART3_ERR
int "IRQ_UART3_ERR"
default 7
config IRQ_HOST_ERR
int "IRQ_HOST_ERR"
default 7
config IRQ_PIXC_ERR
int "IRQ_PIXC_ERR"
default 7
config IRQ_NFC_ERR
int "IRQ_NFC_ERR"
default 7
config IRQ_ATAPI_ERR
int "IRQ_ATAPI_ERR"
default 7
config IRQ_CAN1_ERR
int "IRQ_CAN1_ERR"
default 7
config IRQ_HS_DMA_ERR
int "IRQ Handshake DMA Status"
default 7
config IRQ_PIXC_IN0
int "IRQ PIXC IN0"
default 8
config IRQ_PIXC_IN1
int "IRQ PIXC IN1"
default 8
config IRQ_PIXC_OUT
int "IRQ PIXC OUT"
default 8
config IRQ_SDH
int "IRQ SDH"
default 8
config IRQ_CNT
int "IRQ CNT"
default 8
config IRQ_KEY
int "IRQ KEY"
default 8
config IRQ_CAN1_RX
int "IRQ CAN1 RX"
default 11
config IRQ_CAN1_TX
int "IRQ_CAN1_TX"
default 11
config IRQ_SDH_MASK0
int "IRQ_SDH_MASK0"
default 11
config IRQ_SDH_MASK1
int "IRQ_SDH_MASK1"
default 11
config IRQ_USB_INT0
int "IRQ USB INT0"
default 11
config IRQ_USB_INT1
int "IRQ USB INT1"
default 11
config IRQ_USB_INT2
int "IRQ USB INT2"
default 11
config IRQ_USB_DMA
int "IRQ USB DMA"
default 11
config IRQ_OTPSEC
int "IRQ OPTSEC"
default 11
config IRQ_TIMER0
int "IRQ_TIMER0"
default 11
config IRQ_TIMER1
int "IRQ_TIMER1"
default 11
config IRQ_TIMER2
int "IRQ_TIMER2"
default 11
config IRQ_TIMER3
int "IRQ_TIMER3"
default 11
config IRQ_TIMER4
int "IRQ_TIMER4"
default 11
config IRQ_TIMER5
int "IRQ_TIMER5"
default 11
config IRQ_TIMER6
int "IRQ_TIMER6"
default 11
config IRQ_TIMER7
int "IRQ_TIMER7"
default 11
config IRQ_PINT2
int "IRQ_PIN2"
default 11
config IRQ_PINT3
int "IRQ_PIN3"
default 11
help
Enter the priority numbers between 7-13 ONLY. Others are Reserved.
This applies to all the above. It is not recommended to assign the
highest priority number 7 to UART or any other device.
endmenu
comment "Pin Interrupt to Port Assignment"
menu "Assignment"
config PINTx_REASSIGN
bool "Reprogram PINT Assignment"
default n
help
The interrupt assignment registers controls the pin-to-interrupt
assignment in a byte-wide manner. Each option allows you to select
a set of pins (High/Low Byte) of an specific Port being mapped
to one of the four PIN Interrupts IRQ_PINTx.
You shouldn't change any of these unless you know exactly what you're doing.
Please consult the Blackfin BF54x Processor Hardware Reference Manual.
config PINT0_ASSIGN
hex "PINT0_ASSIGN"
depends on PINTx_REASSIGN
default 0x00000101
config PINT1_ASSIGN
hex "PINT1_ASSIGN"
depends on PINTx_REASSIGN
default 0x01010000
config PINT2_ASSIGN
hex "PINT2_ASSIGN"
depends on PINTx_REASSIGN
default 0x00000101
config PINT3_ASSIGN
hex "PINT3_ASSIGN"
depends on PINTx_REASSIGN
default 0x02020303
endmenu
endmenu
endif
#
# arch/blackfin/mach-bf537/Makefile
#
extra-y := head.o
obj-y := ints-priority.o dma.o gpio.o
obj-$(CONFIG_CPU_FREQ) += cpu.o
#
# arch/blackfin/mach-bf548/boards/Makefile
#
obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
extra-y := head.o extra-y := head.o
obj-y := ints-priority.o obj-y := ints-priority.o dma.o
obj-$(CONFIG_BF561_COREB) += coreb.o obj-$(CONFIG_BF561_COREB) += coreb.o
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#include <asm/irq.h> #include <linux/irq.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
/* /*
...@@ -52,11 +52,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -52,11 +52,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.size = 0x00020000, .size = 0x00020000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
},{ }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = 0x20000
},{ }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = 0x700000,
.offset = 0x00100000, .offset = 0x00100000,
...@@ -186,7 +186,7 @@ static struct resource smc91x_resources[] = { ...@@ -186,7 +186,7 @@ static struct resource smc91x_resources[] = {
.start = 0x28000300, .start = 0x28000300,
.end = 0x28000300 + 16, .end = 0x28000300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF0, .start = IRQ_PF0,
.end = IRQ_PF0, .end = IRQ_PF0,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
...@@ -206,11 +206,11 @@ static struct resource isp1362_hcd_resources[] = { ...@@ -206,11 +206,11 @@ static struct resource isp1362_hcd_resources[] = {
.start = 0x24008000, .start = 0x24008000,
.end = 0x24008000, .end = 0x24008000,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = 0x24008004, .start = 0x24008004,
.end = 0x24008004, .end = 0x24008004,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
},{ }, {
.start = IRQ_PF47, .start = IRQ_PF47,
.end = IRQ_PF47, .end = IRQ_PF47,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment