Commit 754cdd4a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin SPORTS UART Driver: converting BFIN->BLACKFIN
  Blackfin serial driver: add extra IRQ flag for 8250 serial driver
  8250 Serial Driver: Added support for 8250-class UARTs in HV Sistemas H8606 board
  Blackfin arch: Fix bug - USB fails to build for BF524/BF526
  Blackfin arch: update boards defconfig files
  Blackfin arch: IO Port functions to read/write unalligned memory
  Blackfin arch: enable a choice to provide 4M DMA memory
  Blackfin arch: cleanup the icplb/dcplb multiple hit checks
  Blackfin arch: Add workaround to read edge triggered GPIOs
  Blackfin arch: Sync channel defines with struct dma_register dma_io_base_addr.
  Blackfin arch: Check for Anomaly 05000182
  [Blackfin] arch: rename bf5xx-flash to bfin-async-flash
  [Blackfin] arch: Blackfin checksum annotations
parents db07b023 460ed2ea
......@@ -479,16 +479,6 @@ comment "Memory Setup"
comment "Misc"
config ENET_FLASH_PIN
int "PF port/pin used for flash and ethernet sharing"
depends on (BFIN533_STAMP)
default 0
help
PF port/pin used for flash and ethernet sharing to allow other PF
pins to be used on other platforms without having to touch common
code.
For example: PF0 --> 0,PF1 --> 1,PF2 --> 2, etc.
choice
prompt "Blackfin Exception Scratch Register"
default BFIN_SCRATCH_REG_RETN
......@@ -695,6 +685,8 @@ choice
prompt "Uncached SDRAM region"
default DMA_UNCACHED_1M
depends on BFIN_DMA_5XX
config DMA_UNCACHED_4M
bool "Enable 4M DMA region"
config DMA_UNCACHED_2M
bool "Enable 2M DMA region"
config DMA_UNCACHED_1M
......
This diff is collapsed.
This diff is collapsed.
......@@ -212,7 +212,7 @@ CONFIG_HZ=250
#
# Memory Setup
#
CONFIG_MEM_SIZE=64
CONFIG_MAX_MEM_SIZE=64
CONFIG_MEM_ADD_WIDTH=10
#
......
......@@ -90,6 +90,17 @@ int request_dma(unsigned int channel, char *device_id)
{
pr_debug("request_dma() : BEGIN \n");
#if defined(CONFIG_BF561) && ANOMALY_05000182
if (channel >= CH_IMEM_STREAM0_DEST && channel <= CH_IMEM_STREAM1_DEST) {
if (get_cclk() > 500000000) {
printk(KERN_WARNING
"Request IMDMA failed due to ANOMALY 05000182\n");
return -EFAULT;
}
}
#endif
mutex_lock(&(dma_ch[channel].dmalock));
if ((dma_ch[channel].chan_status == DMA_CHANNEL_REQUESTED)
......
......@@ -1130,6 +1130,25 @@ void bfin_gpio_irq_prepare(unsigned gpio)
#else
int gpio_get_value(unsigned gpio)
{
unsigned long flags;
int ret;
if (unlikely(get_gpio_edge(gpio))) {
local_irq_save(flags);
set_gpio_edge(gpio, 0);
ret = get_gpio_data(gpio);
set_gpio_edge(gpio, 1);
local_irq_restore(flags);
return ret;
} else
return get_gpio_data(gpio);
}
EXPORT_SYMBOL(gpio_get_value);
int gpio_direction_input(unsigned gpio)
{
unsigned long flags;
......
......@@ -90,7 +90,9 @@ EXPORT_SYMBOL(__umodsi3);
EXPORT_SYMBOL(outsb);
EXPORT_SYMBOL(insb);
EXPORT_SYMBOL(outsw);
EXPORT_SYMBOL(outsw_8);
EXPORT_SYMBOL(insw);
EXPORT_SYMBOL(insw_8);
EXPORT_SYMBOL(outsl);
EXPORT_SYMBOL(insl);
EXPORT_SYMBOL(insl_16);
......
......@@ -364,13 +364,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
/* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */
case VEC_CPLB_MHIT:
info.si_code = ILL_CPLB_MULHIT;
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
sig = SIGSEGV;
printk(KERN_NOTICE "NULL pointer access (probably)\n");
#else
sig = SIGILL;
printk(KERN_NOTICE EXC_0x27(KERN_NOTICE));
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START)
printk(KERN_NOTICE "NULL pointer access\n");
else
#endif
printk(KERN_NOTICE EXC_0x27(KERN_NOTICE));
CHK_DEBUGGER_TRAP();
break;
/* 0x28 - Emulation Watchpoint, handled here */
......@@ -419,13 +419,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
/* 0x2D - Instruction CPLB Multiple Hits, handled here */
case VEC_CPLB_I_MHIT:
info.si_code = ILL_CPLB_MULHIT;
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
sig = SIGSEGV;
printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n");
#else
sig = SIGILL;
printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE));
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
if (saved_icplb_fault_addr < (void *)FIXED_CODE_START)
printk(KERN_NOTICE "Jump to NULL address\n");
else
#endif
printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE));
CHK_DEBUGGER_TRAP();
break;
/* 0x2E - Illegal use of Supervisor Resource, handled here */
......
......@@ -72,9 +72,9 @@ static unsigned short do_csum(const unsigned char *buff, int len)
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
*/
unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl)
__sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl)
{
return ~do_csum(iph, ihl * 4);
return (__force __sum16)~do_csum(iph, ihl * 4);
}
/*
......@@ -89,7 +89,7 @@ unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl)
*
* it's best to have buff aligned on a 32-bit boundary
*/
unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum)
__wsum csum_partial(const void *buff, int len, __wsum sum)
{
/*
* Just in case we get nasty checksum data...
......@@ -109,22 +109,22 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum)
* this routine is used for miscellaneous IP-like checksums, mainly
* in icmp.c
*/
unsigned short ip_compute_csum(const unsigned char *buff, int len)
__sum16 ip_compute_csum(const void *buff, int len)
{
return ~do_csum(buff, len);
return (__force __sum16)~do_csum(buff, len);
}
/*
* copy from fs while checksumming, otherwise like csum_partial
*/
unsigned int
csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
int len, int sum, int *csum_err)
__wsum
csum_partial_copy_from_user(const void __user *src, void *dst,
int len, __wsum sum, int *csum_err)
{
if (csum_err)
*csum_err = 0;
memcpy(dst, src, len);
memcpy(dst, (__force void *)src, len);
return csum_partial(dst, len, sum);
}
......@@ -132,8 +132,7 @@ csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
* copy from ds while checksumming, otherwise like csum_partial
*/
unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
int len, int sum)
__wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum)
{
memcpy(dst, src, len);
return csum_partial(dst, len, sum);
......
......@@ -7,7 +7,7 @@
* Description: Implementation of ins{bwl} for BlackFin processors using zero overhead loops.
*
* Modified:
* Copyright 2004-2006 Analog Devices Inc.
* Copyright 2004-2008 Analog Devices Inc.
* Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl>
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
......@@ -63,6 +63,23 @@ ENTRY(_insw)
RTS;
ENDPROC(_insw)
ENTRY(_insw_8)
P0 = R0; /* P0 = port */
cli R3;
P1 = R1; /* P1 = address */
P2 = R2; /* P2 = count */
SSYNC;
LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2;
.Lword8_loop_s: R0 = W[P0];
B[P1++] = R0;
R0 = R0 >> 8;
B[P1++] = R0;
NOP;
.Lword8_loop_e: NOP;
sti R3;
RTS;
ENDPROC(_insw_8)
ENTRY(_insb)
P0 = R0; /* P0 = port */
cli R3;
......@@ -78,8 +95,6 @@ ENTRY(_insb)
RTS;
ENDPROC(_insb)
ENTRY(_insl_16)
P0 = R0; /* P0 = port */
cli R3;
......
......@@ -7,7 +7,7 @@
* Description: Implementation of outs{bwl} for BlackFin processors using zero overhead loops.
*
* Modified: Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl>
* Copyright 2004-2006 Analog Devices Inc.
* Copyright 2004-2008 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
*
......@@ -63,3 +63,17 @@ ENTRY(_outsb)
.Lbyte_loop_e: B[P0] = R0;
RTS;
ENDPROC(_outsb)
ENTRY(_outsw_8)
P0 = R0; /* P0 = port */
P1 = R1; /* P1 = address */
P2 = R2; /* P2 = count */
LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2;
.Lword8_loop_s: R1 = B[P1++];
R0 = B[P1++];
R0 = R0 << 8;
R0 = R0 + R1;
.Lword8_loop_e: W[P0] = R0;
RTS;
ENDPROC(_outsw)
......@@ -111,7 +111,7 @@ static struct platform_device net2272_bfin_device = {
};
#endif
#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE)
#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
static struct mtd_partition stamp_partitions[] = {
{
.name = "Bootloader",
......@@ -141,13 +141,17 @@ static struct resource stamp_flash_resource[] = {
.end = 0x203fffff,
.flags = IORESOURCE_MEM,
}, {
.start = CONFIG_ENET_FLASH_PIN,
.start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */
.end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */
.flags = IORESOURCE_MEM,
}, {
.start = GPIO_PF0,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device stamp_flash_device = {
.name = "BF5xx-Flash",
.name = "bfin-async-flash",
.id = 0,
.dev = {
.platform_data = &stamp_flash_data,
......@@ -595,7 +599,7 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_gpios_device,
#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE)
#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
&stamp_flash_device,
#endif
};
......@@ -617,8 +621,8 @@ static int __init stamp_init(void)
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
/* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN));
bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN);
bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
bfin_write_FIO_FLAG_S(PF0);
SSYNC();
#endif
......@@ -636,8 +640,8 @@ arch_initcall(stamp_init);
void native_machine_restart(char *cmd)
{
#define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN)
bfin_write_FIO_INEN(~BIT_TO_SET);
bfin_write_FIO_DIR(BIT_TO_SET);
bfin_write_FIO_FLAG_C(BIT_TO_SET);
/* workaround pull up on cpld / flash pin not being strong enough */
bfin_write_FIO_INEN(~PF0);
bfin_write_FIO_DIR(PF0);
bfin_write_FIO_FLAG_C(PF0);
}
......@@ -43,6 +43,7 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/serial.h>
#include "8250.h"
......@@ -92,8 +93,6 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
*/
#define CONFIG_HUB6 1
#include <asm/serial.h>
/*
* SERIAL_PORT_DFNS tells us about built-in ports that have no
* standard enumeration mechanism. Platforms that can find all
......@@ -1548,6 +1547,8 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
i->head = &up->list;
spin_unlock_irq(&i->lock);
irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
ret = request_irq(up->port.irq, serial8250_interrupt,
irq_flags, "serial", i);
if (ret < 0)
......
......@@ -78,3 +78,8 @@ struct serial8250_config {
#else
#define ALPHA_KLUDGE_MCR 0
#endif
#ifndef SERIAL_EXTRA_IRQ_FLAGS
#define SERIAL_EXTRA_IRQ_FLAGS 0
#endif
......@@ -1361,7 +1361,7 @@ config SERIAL_SC26XX_CONSOLE
config SERIAL_BFIN_SPORT
tristate "Blackfin SPORT emulate UART (EXPERIMENTAL)"
depends on BFIN && EXPERIMENTAL
depends on BLACKFIN && EXPERIMENTAL
select SERIAL_CORE
help
Enble support SPORT emulate UART on Blackfin series.
......
......@@ -37,7 +37,9 @@
#include <linux/linkage.h>
#include <linux/types.h>
#if defined(CONFIG_DMA_UNCACHED_2M)
#if defined(CONFIG_DMA_UNCACHED_4M)
# define DMA_UNCACHED_REGION (4 * 1024 * 1024)
#elif defined(CONFIG_DMA_UNCACHED_2M)
# define DMA_UNCACHED_REGION (2 * 1024 * 1024)
#elif defined(CONFIG_DMA_UNCACHED_1M)
# define DMA_UNCACHED_REGION (1024 * 1024)
......
......@@ -15,7 +15,7 @@
*
* it's best to have buff aligned on a 32-bit boundary
*/
unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum);
__wsum csum_partial(const void *buff, int len, __wsum sum);
/*
* the same as csum_partial, but copies from src while it
......@@ -25,8 +25,8 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum);
* better 64-bit) boundary
*/
unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
int len, int sum);
__wsum csum_partial_copy(const void *src, void *dst,
int len, __wsum sum);
/*
* the same as csum_partial_copy, but copies from user space.
......@@ -35,20 +35,19 @@ unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
* better 64-bit) boundary
*/
extern unsigned int csum_partial_copy_from_user(const unsigned char *src,
unsigned char *dst, int len,
int sum, int *csum_err);
extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
int len, __wsum sum, int *csum_err);
#define csum_partial_copy_nocheck(src, dst, len, sum) \
csum_partial_copy((src), (dst), (len), (sum))
unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);
__sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl);
/*
* Fold a partial checksum
*/
static inline unsigned int csum_fold(unsigned int sum)
static inline __sum16 csum_fold(__wsum sum)
{
while (sum >> 16)
sum = (sum & 0xffff) + (sum >> 16);
......@@ -60,9 +59,9 @@ static inline unsigned int csum_fold(unsigned int sum)
* returns a 16-bit checksum, already complemented
*/
static inline unsigned int
csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
unsigned short proto, unsigned int sum)
static inline __wsum
csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
unsigned short proto, __wsum sum)
{
__asm__ ("%0 = %0 + %1;\n\t"
......@@ -84,9 +83,9 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
return (sum);
}
static inline unsigned short int
csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
unsigned short proto, unsigned int sum)
static inline __sum16
csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
unsigned short proto, __wsum sum)
{
return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
}
......@@ -96,6 +95,6 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
* in icmp.c
*/
extern unsigned short ip_compute_csum(const unsigned char *buff, int len);
extern __sum16 ip_compute_csum(const void *buff, int len);
#endif /* _BFIN_CHECKSUM_H */
......@@ -437,7 +437,6 @@ void gpio_set_value(unsigned gpio, int arg);
int gpio_get_value(unsigned gpio);
#ifndef BF548_FAMILY
#define gpio_get_value(gpio) get_gpio_data(gpio)
#define gpio_set_value(gpio, value) set_gpio_data(gpio, value)
#endif
......
......@@ -117,10 +117,12 @@ static inline unsigned int readl(const volatile void __iomem *addr)
extern void outsb(unsigned long port, const void *addr, unsigned long count);
extern void outsw(unsigned long port, const void *addr, unsigned long count);
extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
extern void outsl(unsigned long port, const void *addr, unsigned long count);
extern void insb(unsigned long port, void *addr, unsigned long count);
extern void insw(unsigned long port, void *addr, unsigned long count);
extern void insw_8(unsigned long port, void *addr, unsigned long count);
extern void insl(unsigned long port, void *addr, unsigned long count);
extern void insl_16(unsigned long port, void *addr, unsigned long count);
......
......@@ -39,22 +39,22 @@
#include "defBF522.h"
#include "anomaly.h"
#if defined(CONFIG_BF527)
#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
#include "defBF527.h"
#endif
#if defined(CONFIG_BF525)
#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
#include "defBF525.h"
#endif
#if !defined(__ASSEMBLY__)
#include "cdefBF522.h"
#if defined(CONFIG_BF527)
#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
#include "cdefBF527.h"
#endif
#if defined(CONFIG_BF525)
#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
#include "cdefBF525.h"
#endif
#endif
......
......@@ -25,11 +25,11 @@
#define CH_MEM_STREAM1_SRC 27 /* RX */
#define CH_MEM_STREAM2_DEST 28
#define CH_MEM_STREAM2_SRC 29
#define CH_MEM_STREAM3_SRC 30
#define CH_MEM_STREAM3_DEST 31
#define CH_MEM_STREAM3_DEST 30
#define CH_MEM_STREAM3_SRC 31
#define CH_IMEM_STREAM0_DEST 32
#define CH_IMEM_STREAM0_SRC 33
#define CH_IMEM_STREAM1_SRC 34
#define CH_IMEM_STREAM1_DEST 35
#define CH_IMEM_STREAM1_DEST 34
#define CH_IMEM_STREAM1_SRC 35
#endif
/*
* include/asm-blackfin/serial.h
*/
#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH
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