From ddf9ddacef0989fdeb22e182212a232488f0f3ad Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 13 Jun 2009 07:42:58 -0400 Subject: Blackfin: convert to generic checksum code The Blackfin port only implemented an optimized version of the csum_tcpudp_nofold function, so convert everything else to the new generic code. Signed-off-by: Mike Frysinger --- arch/blackfin/Kconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/blackfin/Kconfig') diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index ae6a60f1012..c0d44453561 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -28,6 +28,9 @@ config BLACKFIN select HAVE_OPROFILE select ARCH_WANT_OPTIONAL_GPIOLIB +config GENERIC_CSUM + def_bool y + config GENERIC_BUG def_bool y depends on BUG -- cgit v1.2.3-70-g09d2 From 872d024b40550fcbd3327386e4c891e815d3922a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 6 Oct 2009 04:49:07 +0000 Subject: Blackfin: pull in firmware Kconfig Signed-off-by: Mike Frysinger --- arch/blackfin/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/blackfin/Kconfig') diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index c0d44453561..af44a06e07c 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -1277,6 +1277,8 @@ source "net/Kconfig" source "drivers/Kconfig" +source "drivers/firmware/Kconfig" + source "fs/Kconfig" source "arch/blackfin/Kconfig.debug" -- cgit v1.2.3-70-g09d2 From 5df326aca48b8631c9e3c90c76d7e9f0b466a721 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Nov 2009 23:49:41 +0000 Subject: Blackfin: push BF5Xx configs down into mach-specific Kconfigs While we're moving the BF54x code, have the BF54xM variants select the normal BF54x values so that the rest of the Kconfig tree doesn't need to check the BF54xM variant everytime it wants to check the BF54x. Signed-off-by: Mike Frysinger --- arch/blackfin/Kconfig | 30 +++++---------------------- arch/blackfin/mach-bf518/Kconfig | 4 ++++ arch/blackfin/mach-bf527/Kconfig | 4 ++++ arch/blackfin/mach-bf548/Kconfig | 24 +++++++++++++++++++++ arch/blackfin/mach-bf548/include/mach/bf548.h | 12 ----------- 5 files changed, 37 insertions(+), 37 deletions(-) (limited to 'arch/blackfin/Kconfig') diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index af44a06e07c..d703247caf2 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -176,7 +176,7 @@ config BF539 help BF539 Processor Support. -config BF542 +config BF542_std bool "BF542" help BF542 Processor Support. @@ -186,7 +186,7 @@ config BF542M help BF542 Processor Support. -config BF544 +config BF544_std bool "BF544" help BF544 Processor Support. @@ -196,7 +196,7 @@ config BF544M help BF544 Processor Support. -config BF547 +config BF547_std bool "BF547" help BF547 Processor Support. @@ -206,7 +206,7 @@ config BF547M help BF547 Processor Support. -config BF548 +config BF548_std bool "BF548" help BF548 Processor Support. @@ -216,7 +216,7 @@ config BF548M help BF548 Processor Support. -config BF549 +config BF549_std bool "BF549" help BF549 Processor Support. @@ -310,31 +310,11 @@ config BF_REV_NONE endchoice -config BF51x - bool - depends on (BF512 || BF514 || BF516 || BF518) - default y - -config BF52x - bool - depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527) - default y - config BF53x bool depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537) default y -config BF54xM - bool - depends on (BF542M || BF544M || BF547M || BF548M || BF549M) - default y - -config BF54x - bool - depends on (BF542 || BF544 || BF547 || BF548 || BF549 || BF54xM) - default y - config MEM_GENERIC_BOARD bool depends on GENERIC_BOARD diff --git a/arch/blackfin/mach-bf518/Kconfig b/arch/blackfin/mach-bf518/Kconfig index 4c76fefb7a3..4ab2d166c83 100644 --- a/arch/blackfin/mach-bf518/Kconfig +++ b/arch/blackfin/mach-bf518/Kconfig @@ -1,3 +1,7 @@ +config BF51x + def_bool y + depends on (BF512 || BF514 || BF516 || BF518) + if (BF51x) source "arch/blackfin/mach-bf518/boards/Kconfig" diff --git a/arch/blackfin/mach-bf527/Kconfig b/arch/blackfin/mach-bf527/Kconfig index 848ac6f8682..1f8cbe9d6b9 100644 --- a/arch/blackfin/mach-bf527/Kconfig +++ b/arch/blackfin/mach-bf527/Kconfig @@ -1,3 +1,7 @@ +config BF52x + def_bool y + depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527) + if (BF52x) source "arch/blackfin/mach-bf527/boards/Kconfig" diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig index a09623dfd55..70189a0d1a1 100644 --- a/arch/blackfin/mach-bf548/Kconfig +++ b/arch/blackfin/mach-bf548/Kconfig @@ -1,3 +1,27 @@ +config BF542 + def_bool y + depends on BF542_std || BF542M +config BF544 + def_bool y + depends on BF544_std || BF544M +config BF547 + def_bool y + depends on BF547_std || BF547M +config BF548 + def_bool y + depends on BF548_std || BF548M +config BF549 + def_bool y + depends on BF549_std || BF549M + +config BF54xM + def_bool y + depends on (BF542M || BF544M || BF547M || BF548M || BF549M) + +config BF54x + def_bool y + depends on (BF542 || BF544 || BF547 || BF548 || BF549) + if (BF54x) source "arch/blackfin/mach-bf548/boards/Kconfig" diff --git a/arch/blackfin/mach-bf548/include/mach/bf548.h b/arch/blackfin/mach-bf548/include/mach/bf548.h index 7bead5ce0f3..751e5e11ecf 100644 --- a/arch/blackfin/mach-bf548/include/mach/bf548.h +++ b/arch/blackfin/mach-bf548/include/mach/bf548.h @@ -81,18 +81,6 @@ #define AMGCTLVAL (V_AMBEN | V_AMCKEN) -#if defined(CONFIG_BF542M) -# define CONFIG_BF542 -#elif defined(CONFIG_BF544M) -# define CONFIG_BF544 -#elif defined(CONFIG_BF547M) -# define CONFIG_BF547 -#elif defined(CONFIG_BF548M) -# define CONFIG_BF548 -#elif defined(CONFIG_BF549M) -# define CONFIG_BF549 -#endif - #if defined(CONFIG_BF542) # define CPU "BF542" # define CPUID 0x27de -- cgit v1.2.3-70-g09d2 From c45c06596e0d45125d25beb0fe24a68aef1f1046 Mon Sep 17 00:00:00 2001 From: Barry Song Date: Wed, 2 Dec 2009 09:13:36 +0000 Subject: Blackfin: support smaller uncached DMA chunks for memory constrained systems When working with 8 meg systems, forcing a 1 meg DMA chunk heavily cuts into the available resources. So support smaller chunks to better cover needs for these systems. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- arch/blackfin/Kconfig | 6 ++++++ arch/blackfin/include/asm/bfin-global.h | 6 ++++++ arch/blackfin/kernel/cplb-nompu/cplbinit.c | 20 +++++++++++++------- 3 files changed, 25 insertions(+), 7 deletions(-) (limited to 'arch/blackfin/Kconfig') diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index d703247caf2..8141b1e8292 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -896,6 +896,12 @@ config DMA_UNCACHED_2M bool "Enable 2M DMA region" config DMA_UNCACHED_1M bool "Enable 1M DMA region" +config DMA_UNCACHED_512K + bool "Enable 512K DMA region" +config DMA_UNCACHED_256K + bool "Enable 256K DMA region" +config DMA_UNCACHED_128K + bool "Enable 128K DMA region" config DMA_UNCACHED_NONE bool "Disable DMA region" endchoice diff --git a/arch/blackfin/include/asm/bfin-global.h b/arch/blackfin/include/asm/bfin-global.h index 741c02112c0..e6485c305ea 100644 --- a/arch/blackfin/include/asm/bfin-global.h +++ b/arch/blackfin/include/asm/bfin-global.h @@ -20,6 +20,12 @@ # define DMA_UNCACHED_REGION (2 * 1024 * 1024) #elif defined(CONFIG_DMA_UNCACHED_1M) # define DMA_UNCACHED_REGION (1024 * 1024) +#elif defined(CONFIG_DMA_UNCACHED_512K) +# define DMA_UNCACHED_REGION (512 * 1024) +#elif defined(CONFIG_DMA_UNCACHED_256K) +# define DMA_UNCACHED_REGION (256 * 1024) +#elif defined(CONFIG_DMA_UNCACHED_128K) +# define DMA_UNCACHED_REGION (128 * 1024) #else # define DMA_UNCACHED_REGION (0) #endif diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index fd9a2f31e68..c9b0a4d53dc 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c @@ -89,15 +89,25 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) void __init generate_cplb_tables_all(void) { + unsigned long uncached_end; int i_d, i_i; i_d = 0; /* Normal RAM, including MTD FS. */ #ifdef CONFIG_MTD_UCLINUX - dcplb_bounds[i_d].eaddr = memory_mtd_start + mtd_size; + uncached_end = memory_mtd_start + mtd_size; #else - dcplb_bounds[i_d].eaddr = memory_end; + uncached_end = memory_end; #endif + /* + * if DMA uncached is less than 1MB, mark the 1MB chunk as uncached + * so that we don't have to use 4kB pages and cause CPLB thrashing + */ + if ((DMA_UNCACHED_REGION >= 1 * 1024 * 1024) || !DMA_UNCACHED_REGION || + ((_ramend - uncached_end) >= 1 * 1024 * 1024)) + dcplb_bounds[i_d].eaddr = uncached_end; + else + dcplb_bounds[i_d].eaddr = uncached_end & ~(1 * 1024 * 1024); dcplb_bounds[i_d++].data = SDRAM_DGENERIC; /* DMA uncached region. */ if (DMA_UNCACHED_REGION) { @@ -135,11 +145,7 @@ void __init generate_cplb_tables_all(void) i_i = 0; /* Normal RAM, including MTD FS. */ -#ifdef CONFIG_MTD_UCLINUX - icplb_bounds[i_i].eaddr = memory_mtd_start + mtd_size; -#else - icplb_bounds[i_i].eaddr = memory_end; -#endif + icplb_bounds[i_i].eaddr = uncached_end; icplb_bounds[i_i++].data = SDRAM_IGENERIC; /* DMA uncached region. */ if (DMA_UNCACHED_REGION) { -- cgit v1.2.3-70-g09d2