Blackfin arch bug fixing
Hi Linus,
Please pull from 'for-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6.git for-linus
to receive the following updates:
arch/blackfin/Kconfig | 15 +- arch/blackfin/configs/BF527-EZKIT_defconfig | 2 +- arch/blackfin/configs/BF533-EZKIT_defconfig | 2 +- arch/blackfin/configs/BF533-STAMP_defconfig | 2 +- arch/blackfin/configs/BF537-STAMP_defconfig | 2 +- arch/blackfin/configs/BF548-EZKIT_defconfig | 279 ++++++++++++++++--- arch/blackfin/configs/BF561-EZKIT_defconfig | 2 +- arch/blackfin/configs/PNAV-10_defconfig | 2 +- arch/blackfin/kernel/entry.S | 6 +- arch/blackfin/kernel/fixed_code.S | 14 + arch/blackfin/kernel/gptimers.c | 47 +++- arch/blackfin/kernel/setup.c | 13 +- arch/blackfin/kernel/traps.c | 340 +++++++++++++---------- arch/blackfin/kernel/vmlinux.lds.S | 11 +- arch/blackfin/mach-bf527/boards/ezkit.c | 53 ++++ arch/blackfin/mach-bf533/boards/H8606.c | 345 +++++++++++++++++++++++ arch/blackfin/mach-bf533/boards/Makefile | 1 + arch/blackfin/mach-bf533/boards/cm_bf533.c | 42 +++- arch/blackfin/mach-bf533/boards/stamp.c | 4 +- arch/blackfin/mach-bf537/boards/cm_bf537.c | 4 +- arch/blackfin/mach-bf537/boards/stamp.c | 6 +- arch/blackfin/mach-common/entry.S | 2 +- include/asm-blackfin/bfin-global.h | 1 + include/asm-blackfin/fixed_code.h | 4 +- include/asm-blackfin/gptimers.h | 2 + include/asm-blackfin/mach-bf527/defBF52x_base.h | 86 +++--- include/asm-blackfin/mach-bf527/dma.h | 7 +- include/asm-blackfin/mach-bf548/defBF549.h | 2 +- include/asm-blackfin/mach-bf548/defBF54x_base.h | 7 + include/asm-blackfin/mach-bf548/portmux.h | 14 + include/asm-blackfin/mach-bf561/defBF561.h | 3 + 31 files changed, 1052 insertions(+), 268 deletions(-) create mode 100644 arch/blackfin/mach-bf533/boards/H8606.c
Bryan Wu (1):
Blackfin arch: update board defconfig files according to latest information from ADI datasheet
Javier Herrero (1):
Blackfin arch: Added support for HV Sistemas H8606 board
Michael Hennerich (4):
Blackfin arch: add NFC driver support in BF527-EZKIT board
Blackfin arch: fix bug BlueTechnix CM-BF537 board config uses wrong IRQ for net2272 driver Blackfin arch: Apply Bluetchnix vendor patch provided by Harald Krapfenbauer Blackfin arch: Do not pollute name space used in linux-2.6.x/sound
Mike Frysinger (5):
Blackfin arch: add support for checking/clearing overruns in generic purpose Timer API Blackfin arch: fix libata data struct member from irq_type to irq_flags Blackfin arch: reclaim a few bytes from the end of our init section Blackfin arch: Add missing definitions for BF561
Blackfin arch: use a less common define name in BF549
Robin Getz (6):
Blackfin arch: fix bug: kernel prints out error message twice
Blackfin arch: cleanup arch/blackfin/kernel/traps.c handling code.
Blackfin arch: fix bug: tell users if the kernel is recovering from a fault condition Blackfin arch: Fix random crash issue found by Michael.
Blackfin arch: Add missing definitions of BF54x
Blackfin arch: ensure that speculative loads of bad pointers don't cause us to do bad things.
Sonic Zhang (1):
Blackfin arch: Fix bug set correct baud for spi mmc and enable SPI after DMA.
arch/blackfin/Kconfig +13 -2
@@ -295,6 +295,12 @@ config PNAV10 help PNAV 1.0 board Support. +config H8606_HVSISTEMAS + bool "HV Sistemas H8606" + depends on (BF532) + help + HV Sistemas H8606 board support. + config GENERIC_BOARD bool "Custom" depends on (BF537 || BF536 \
@@ -317,7 +323,8 @@ config MEM_MT48LC64M4A2FB_7E config MEM_MT48LC16M16A2TG_75 bool depends on (BFIN533_EZKIT || BFIN561_EZKIT \ - || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM) + || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM \ + || H8606_HVSISTEMAS) default y config MEM_MT48LC32M8A2_75
@@ -366,7 +373,7 @@ config CLKIN_HZ int "Crystal Frequency in Hz" default "11059200" if BFIN533_STAMP default "27000000" if BFIN533_EZKIT - default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT) + default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT || H8606_HVSISTEMAS) default "30000000" if BFIN561_EZKIT default "24576000" if PNAV10 help
@@ -404,6 +411,7 @@ config VCO_MULT default "20" if BFIN537_BLUETECHNIX_CM default "20" if BFIN561_BLUETECHNIX_CM default "20" if BFIN561_EZKIT + default "16" if H8606_HVSISTEMAS help This controls the frequency of the on-chip PLL. This can be between 1 and 64. PLL Frequency = (Crystal Frequency) * (this setting)
@@ -440,6 +448,7 @@ config SCLK_DIV default 4 if BFIN537_BLUETECHNIX_CM default 4 if BFIN561_BLUETECHNIX_CM default 5 if BFIN561_EZKIT + default 3 if H8606_HVSISTEMAS help This sets the frequency of the system clock (including SDRAM or DDR). This can be between 1 and 15
@@ -492,11 +501,13 @@ config MEM_SIZE default 64 if BFIN561_EZKIT default 128 if BFIN533_STAMP default 64 if PNAV10 + default 32 if H8606_HVSISTEMAS config MEM_ADD_WIDTH int "SDRAM Memory Address Width" default 9 if BFIN533_EZKIT default 9 if BFIN561_EZKIT + default 9 if H8606_HVSISTEMAS default 10 if BFIN527_EZKIT default 10 if BFIN537_STAMP default 11 if BFIN533_STAMP
arch/blackfin/configs/BF527-EZKIT_defconfig +1 -1
@@ -244,7 +244,7 @@ CONFIG_CLKIN_HZ=25000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 #
arch/blackfin/configs/BF533-EZKIT_defconfig +1 -1
@@ -198,7 +198,7 @@ CONFIG_CLKIN_HZ=27000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=750000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 #
arch/blackfin/configs/BF533-STAMP_defconfig +1 -1
@@ -199,7 +199,7 @@ CONFIG_CLKIN_HZ=11059200 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=750000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 #
arch/blackfin/configs/BF537-STAMP_defconfig +1 -1
@@ -206,7 +206,7 @@ CONFIG_CLKIN_HZ=25000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 #
arch/blackfin/configs/BF548-EZKIT_defconfig +236 -43
428 lines not on this page · raw message
arch/blackfin/configs/BF561-EZKIT_defconfig +1 -1
@@ -243,7 +243,7 @@ CONFIG_CLKIN_HZ=30000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 #
arch/blackfin/configs/PNAV-10_defconfig +1 -1
@@ -204,7 +204,7 @@ CONFIG_CLKIN_HZ=24576000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 #
arch/blackfin/kernel/entry.S +4 -2
@@ -54,9 +54,11 @@ ENTRY(_ret_from_fork) [sp + PT_IPEND] = r0; /* do a 'fake' RTI by jumping to [RETI] * to avoid clearing supervisor mode in child - */ + */ + r0 = [sp + PT_PC]; + [sp + PT_P0] = r0; + RESTORE_ALL_SYS - p0 = reti; jump (p0); ENDPROC(_ret_from_fork)
arch/blackfin/kernel/fixed_code.S +14 -0
@@ -129,4 +129,18 @@ ENTRY(_atomic_xor32) rts; ENDPROC (_atomic_ior32) +.align 16 + /* + * safe_user_instruction + * Four NOPS are enough to allow the pipeline to speculativily load + * execute anything it wants. After that, things have gone bad, and + * we are stuck - so panic. Since we might be in user space, we can't + * call panic, so just cause a unhandled exception, this should cause + * a dump of the trace buffer so we can tell were we are, and a reboot + */ +ENTRY(_safe_user_instruction) + NOP; NOP; NOP; NOP; + EXCPT 0x4; +ENDPROC(_safe_user_instruction) + ENTRY(_fixed_code_end)
arch/blackfin/kernel/gptimers.c +40 -7
86 lines not on this page · raw message
arch/blackfin/kernel/setup.c +11 -2
@@ -316,6 +316,15 @@ void __init setup_arch(char **cmdline_p)init_leds (); + _bfin_swrst =bfin_read_SWRST (); + +if (_bfin_swrst &RESET_DOUBLE ) +printk (KERN_INFO "Recovering from Double Fault event\n" ); +else if (_bfin_swrst &RESET_WDOG ) +printk (KERN_INFO "Recovering from Watchdog event\n" ); +else if (_bfin_swrst &RESET_SOFTWARE ) +printk (KERN_NOTICE "Reset caused by Software reset\n" ); +printk (KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n" );if (bfin_compiled_revid () ==0xffff )printk (KERN_INFO "Compiled for ADSP-%s Rev any\n" ,CPU );
@@ -402,8 +411,6 @@ void __init setup_arch(char **cmdline_p)if (l1_length >L1_DATA_A_LENGTH )panic ("L1 data memory overflow\n" ); - _bfin_swrst =bfin_read_SWRST (); -/* Copy atomic sequences to their fixed location, and sanity check that these locations are the ones that we advertise to userspace. */ memcpy((void *)FIXED_CODE_START, &fixed_code_start,
@@ -424,6 +431,8 @@ void __init setup_arch(char **cmdline_p) != ATOMIC_AND32 - FIXED_CODE_START);BUG_ON ((char *)&atomic_xor32 - (char *)&fixed_code_start !=ATOMIC_XOR32 -FIXED_CODE_START ); +BUG_ON ((char *)&safe_user_instruction - (char *)&fixed_code_start + !=SAFE_USER_INSTRUCTION -FIXED_CODE_START );init_exception_vectors ();bf53x_cache_init ();
arch/blackfin/kernel/traps.c +193 -147
615 lines not on this page · raw message
arch/blackfin/kernel/vmlinux.lds.S +8 -3
@@ -172,9 +172,14 @@ SECTIONS __ebss_b_l1 = .; } - ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); - - .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) : + /* Force trailing alignment of our init section so that when we + * free our init memory, we don't leave behind a partial page. + */ + . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); + . = ALIGN(PAGE_SIZE); + ___init_end = .; + + .bss : { . = ALIGN(4); ___bss_start = .;
arch/blackfin/mach-bf527/boards/ezkit.c +53 -0
74 lines not on this page · raw message
arch/blackfin/mach-bf533/boards/H8606.c new file +345 -0
346 lines not on this page · raw message
arch/blackfin/mach-bf533/boards/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_GENERIC_BOARD) += generic_board.o obj-$(CONFIG_BFIN533_STAMP) += stamp.o obj-$(CONFIG_BFIN533_EZKIT) += ezkit.o obj-$(CONFIG_BFIN533_BLUETECHNIX_CM) += cm_bf533.o +obj-$(CONFIG_H8606_HVSISTEMAS) += H8606.o
arch/blackfin/mach-bf533/boards/cm_bf533.c +40 -2
85 lines not on this page · raw message
arch/blackfin/mach-bf533/boards/stamp.c +2 -2
@@ -218,7 +218,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {#if defined(CONFIG_SPI_MMC ) || defined(CONFIG_SPI_MMC_MODULE ) { .modalias = "spi_mmc_dummy", - .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, .chip_select = 0, .platform_data = NULL,
@@ -227,7 +227,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, { .modalias = "spi_mmc", - .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, .chip_select = CONFIG_SPI_MMC_CS_CHAN, .platform_data = NULL,
arch/blackfin/mach-bf537/boards/cm_bf537.c +2 -2
@@ -281,8 +281,8 @@ static struct resource net2272_bfin_resources[] = { .end = 0x20200000 + 0x100, .flags = IORESOURCE_MEM, }, { - .start = IRQ_PF7, - .end = IRQ_PF7, + .start = IRQ_PH14, + .end = IRQ_PH14, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, }, };
arch/blackfin/mach-bf537/boards/stamp.c +3 -3
@@ -450,7 +450,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {#if defined(CONFIG_SPI_MMC ) || defined(CONFIG_SPI_MMC_MODULE ) { .modalias = "spi_mmc_dummy", - .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, .chip_select = 0, .platform_data = NULL,
@@ -459,7 +459,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, { .modalias = "spi_mmc", - .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, .chip_select = CONFIG_SPI_MMC_CS_CHAN, .platform_data = NULL,
@@ -612,7 +612,7 @@ static struct platform_device bfin_sport1_uart_device = {static struct pata_platform_info bfin_pata_platform_data = { .ioport_shift =1 , - .irq_type =IRQF_TRIGGER_HIGH |IRQF_DISABLED , + .irq_flags =IRQF_TRIGGER_HIGH |IRQF_DISABLED , };static struct resource bfin_pata_resources[] = {
arch/blackfin/mach-common/entry.S +1 -1
@@ -917,7 +917,7 @@ ENTRY(_ex_table) .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */ .long _ex_replaceable /* 0x02 - User Defined */ .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */ - .long _ex_replaceable /* 0x04 - User Defined */ + .long _ex_trap_c /* 0x04 - User Defined - dump trace buffer */ .long _ex_replaceable /* 0x05 - User Defined */ .long _ex_replaceable /* 0x06 - User Defined */ .long _ex_replaceable /* 0x07 - User Defined */
include/asm-blackfin/bfin-global.h +1 -0
@@ -80,6 +80,7 @@ extern int atomic_sub32(void);extern int atomic_ior32 (void );extern int atomic_and32 (void );extern int atomic_xor32 (void ); +extern void safe_user_instruction (void );extern void sigreturn_stub (void );extern void *l1_data_A_sram_alloc (size_t );
include/asm-blackfin/fixed_code.h +3 -1
@@ -17,4 +17,6 @@#define ATOMIC_SEQS_END 0x480 -#define FIXED_CODE_END 0x480 +#define SAFE_USER_INSTRUCTION 0x480 + +#define FIXED_CODE_END 0x490
include/asm-blackfin/gptimers.h +2 -0
@@ -197,6 +197,8 @@ uint32_t get_gptimer_period (int timer_id);uint32_t get_gptimer_count (int timer_id);uint16_t get_gptimer_intr (int timer_id);void clear_gptimer_intr (int timer_id); +uint16_t get_gptimer_over (int timer_id); +void clear_gptimer_over (int timer_id);void set_gptimer_config (int timer_id,uint16_t config);uint16_t get_gptimer_config (int timer_id);void set_gptimer_pulse_hi (int timer_id);
include/asm-blackfin/mach-bf527/defBF52x_base.h +43 -43
98 lines not on this page · raw message
include/asm-blackfin/mach-bf527/dma.h +6 -1
@@ -35,7 +35,6 @@#define MAX_BLACKFIN_DMA_CHANNEL 16#define CH_PPI 0/* PPI receive/transmit or NFC */ -#define CH_NFC 0/* PPI receive/transmit or NFC */ #define CH_EMAC_RX 1/* Ethernet MAC receive or HOSTDP */ #define CH_EMAC_HOSTDP 1/* Ethernet MAC receive or HOSTDP */ #define CH_EMAC_TX 2/* Ethernet MAC transmit or NFC */
@@ -54,6 +53,12 @@#define CH_MEM_STREAM1_DEST 14/* TX */ #define CH_MEM_STREAM1_SRC 15/* RX */ +#if defined(CONFIG_BF527_NAND_D_PORTF ) +#define CH_NFC CH_PPI/* PPI receive/transmit or NFC */ +#elif defined(CONFIG_BF527_NAND_D_PORTH ) +#define CH_NFC CH_EMAC_TX/* PPI receive/transmit or NFC */ +#endif +extern int channel2irq (unsigned int channel);extern struct dma_register *base_addr[];
include/asm-blackfin/mach-bf548/defBF549.h +1 -1
@@ -1671,7 +1671,7 @@/* Bit masks for MXVR_DMAx_CONFIG */ #define MDMAEN 0x1/* DMA Channel Enable */ -#define DD 0x2/* DMA Channel Direction */ +#define DMADD 0x2/* DMA Channel Direction */ #define BY4SWAPEN 0x20/* DMA Channel Four Byte Swap Enable */ #define LCHAN 0x3c0/* DMA Channel Logical Channel */ #define BITSWAPEN 0x400/* DMA Channel Bit Swap Enable */
include/asm-blackfin/mach-bf548/defBF54x_base.h +7 -0
@@ -2252,6 +2252,13 @@#define PLL_OFF 0x2/* Disable PLL */ #define DF 0x1/* Divide Frequency */ +/* SWRST Masks */ +#define SYSTEM_RESET 0x0007/* Initiates A System Software Reset */ +#define DOUBLE_FAULT 0x0008/* Core Double Fault Causes Reset */ +#define RESET_DOUBLE 0x2000/* SW Reset Generated By Core Double-Fault */ +#define RESET_WDOG 0x4000/* SW Reset Generated By Watchdog Timer */ +#define RESET_SOFTWARE 0x8000/* SW Reset Occurred Since Last Read Of SWRST */ +/* Bit masks for PLL_STAT */ #define PLL_LOCKED 0x20/* PLL Locked Status */
include/asm-blackfin/mach-bf548/portmux.h +14 -0
@@ -267,4 +267,18 @@#define P_AMC_BG (P_DEFINED | P_IDENT(GPIO_PJ12) | P_FUNCT(0))#define P_AMC_BGH (P_DEFINED | P_IDENT(GPIO_PJ13) | P_FUNCT(0)) + +#define P_NAND_D0 (P_DONTCARE) +#define P_NAND_D1 (P_DONTCARE) +#define P_NAND_D2 (P_DONTCARE) +#define P_NAND_D3 (P_DONTCARE) +#define P_NAND_D4 (P_DONTCARE) +#define P_NAND_D5 (P_DONTCARE) +#define P_NAND_D6 (P_DONTCARE) +#define P_NAND_D7 (P_DONTCARE) +#define P_NAND_WE (P_DONTCARE) +#define P_NAND_RE (P_DONTCARE) +#define P_NAND_CLE (P_DONTCARE) +#define P_NAND_ALE (P_DONTCARE) +#endif /* _MACH_PORTMUX_H_ */
include/asm-blackfin/mach-bf561/defBF561.h +3 -0
@@ -55,6 +55,9 @@/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ #define SWRST SICA_SWRST#define SYSCR SICA_SYSCR +#define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A) +#define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A) +#define RESET_SOFTWARE (SWRST_OCCURRED)/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ #define SICA_SWRST 0xFFC00100/* Software Reset register */