safe/jmp/linux-2.6
15 years agoBlackfin arch: smp patch cleanup from LKML review
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: smp patch cleanup from LKML review

1. Use inline get_l1_... functions instead of macro
2. Fix compile issue about smp barrier functions

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: get oprofile work for user space
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: get oprofile work for user space

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bugs in linker script when using upstream binutils
Bernd Schmidt [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: fix bugs in linker script when using upstream binutils

Fix a few problems I discovered when building a kernel with upstream CVS
binutils.

We have to add the NOTES macro to our linker script, since a kernel
built with --build-id is otherwise unable to boot.  Last time NOTES was
added, it broke things, but the definition of the macro has changed not
to rely on parts of the linker script that aren't present on Blackfin.

I also noticed that _l2_lma_start does not point into the kernel image,
but rather somewhere in L1/L2 space, which seems unintended.  Also, when
the L2 section was added to the linker script, the part following it which
computes then length of the init section was not updated.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Add document about bfin-gpio
Graf Yang [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: Add document about bfin-gpio

Add document about bfin-gpio when requesting a pin
both as gpio and gpio interrupt.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Remove all traces of the relocation stack
Bernd Schmidt [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Remove all traces of the relocation stack

Remove all traces of the relocation stack.  It's been removed from
binutils for years now.

Add a sanity overflow check to pcrel24 relocations to catch modules that
were built without -mlong-calls.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: tweak the BUG_ON() check to allow for equal values
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: tweak the BUG_ON() check to allow for equal values

Tweak the BUG_ON() check to allow for equal values since the way pos is
handled ... it is always indexed and post incremented

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: gpio.h split into machine subfolders like already done for BF54x
Michael Hennerich [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: gpio.h split into machine subfolders like already done for BF54x

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: cleanup the header file comments
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: cleanup the header file comments

use scm changelog rather than comment blocks in files

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rewrite cplbinfo to use seq files
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: rewrite cplbinfo to use seq files

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bugs and unify BFIN_KERNEL_CLOCK option
Michael Hennerich [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: fix bugs and unify BFIN_KERNEL_CLOCK option

 - remove duplicated code and headers
 - add option allowing arbitrary SDRAM/DDR Timing parameters.
 - mark automatically calculated timings as EXPERIMENTAL
 - fix comment header block

Related to BUGs:
 - kernel boot up fails with CONFIG_BFIN_KERNEL_CLOCK item on.
 - kernel does not boot if re-program clocks

[ Mike Frysinger <vapier.adi@gmail.com>
 - fix comment header
 - mark do_sync static
 - document the DMA shutdown
 - simplify SIC_IWR handling
 - fix ANOMALY_05000265 handling to work as intended ]

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add simple-gpio resources to all adi/tinyboards
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: add simple-gpio resources to all adi/tinyboards

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Allow a gpio pin be requested both as gpio and irq.
Graf Yang [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: Allow a gpio pin be requested both as gpio and irq.

[Mike Frysinger <vapier.adi@gmail.com>:
 - use KERN_NOTICE when using gpios as both irq and non
   rather than KERN_ERR
 - embedded newlines in printk() does not fly]

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: do not allow L2 to be cached on BF561 SMP
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: do not allow L2 to be cached on BF561 SMP

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: delete now unused "cclk" member of blackfin_cpudata
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: delete now unused "cclk" member of blackfin_cpudata

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix bug - change cpufreq doesn't take effect on bf537 now
Michael Hennerich [Tue, 18 Nov 2008 10:04:31 +0000 (18:04 +0800)]
Blackfin arch: Fix bug - change cpufreq doesn't take effect on bf537 now

CCLK is variable: get current CCLK in show_cpuinfo

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Request the gpio resource when making it as an irq pin, avoiding overr...
Graf Yang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Request the gpio resource when making it as an irq pin, avoiding override it.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Add code to free gpio when shutdown irq
Graf Yang [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: Add code to free gpio when shutdown irq

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bug - reboot fails on BF527
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix bug - reboot fails on BF527

add ANOMALY_05000435 to handle SIC_IWR1 workaround for rebooting

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add ANOMALY_05000435 to our headers
Mike Frysinger [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add ANOMALY_05000435 to our headers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: only define HI/LO macros for assembly files
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: only define HI/LO macros for assembly files

Only define HI/LO macros for assembly files since some common C files
use HI/LO as variable names

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add BUG_ON() checks to make sure we dont overflow the cplb tables
Mike Frysinger [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add BUG_ON() checks to make sure we dont overflow the cplb tables

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: make ROM_BASE depend on ROMKERNEL
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: make ROM_BASE depend on ROMKERNEL

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: noMMU CPLB lookup tables can be in L1 SRAM
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: noMMU CPLB lookup tables can be in L1 SRAM

 - unify duplicate page_size_table definitions
 - make sure it is placed alongside the other cplb switching code

Pointed-out-by: Michael McTernan <mmcternan@airvana.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: do not include init sections in the kernel lock down as it gets releas...
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: do not include init sections in the kernel lock down as it gets released afterwards

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: change return value
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: change return value

change return of close_cplbtab() and fill_cplbtab() to void since we
always return 0 and nowhere do we check this

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove pointless define IN_KERNEL
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove pointless define IN_KERNEL

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: unify cplbinfo files
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: unify cplbinfo files

Merge MPU and noMPU version of CPLB info code to one common version.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: define BASE_BAUD like everyone else
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: define BASE_BAUD like everyone else

define BASE_BAUD like everyone else, althought it is only used by 8250

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove BFIN_DMA_5XX option
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove BFIN_DMA_5XX option

Do not make BFIN_DMA_5XX optional since a large portion of our code
relies on dma functions existing

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add mmiowb() as some drivers expect
Mike Frysinger [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add mmiowb() as some drivers expect

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix BUG - Kernel does not link when CONFIG_CPU_FREQ_STAT=m
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Fix BUG - Kernel does not link when CONFIG_CPU_FREQ_STAT=m

to reproduce:
$ make BF537-STAMP_defconfig
$ make menuconfig
  CPU Frequency scaling  --->
    [*] CPU Frequency scaling
    <M>   CPU frequency translation statistics
$ make

arch/blackfin/mach-common/built-in.o: In function `bfin_target':
arch/blackfin/mach-common/cpufreq.c:(.text+0xf1e): undefined reference to
`cpufreq_frequency_table_target'
arch/blackfin/mach-common/built-in.o: In function `bfin_verify_speed':
arch/blackfin/mach-common/cpufreq.c:(.text+0x1056): undefined reference to
`cpufreq_frequency_table_verify'
arch/blackfin/mach-common/built-in.o: In function `__bfin_cpu_init':
arch/blackfin/mach-common/cpufreq.c:(.init.text+0x554): undefined reference to
`cpufreq_frequency_table_get_attr'
arch/blackfin/mach-common/cpufreq.c:(.init.text+0x56a): undefined reference to
`cpufreq_frequency_table_cpuinfo'
arch/blackfin/mach-common/built-in.o: In function `sys_call_table':
(.data+0x83c): undefined reference to
`cpufreq_freq_attr_scaling_available_freqs'
make: *** [.tmp_vmlinux1] Error 1

Blackfin wants CPU_FREQ_TABLE

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rename cache_lock() to bfin_cache_lock()
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: rename cache_lock() to bfin_cache_lock()

rename cache_lock() to bfin_cache_lock() to avoid namespace collision
with common code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: use generic xor.h
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: use generic xor.h

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: cleanup the time.c code
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: cleanup the time.c code

 - make the code a bit more readable
 - kill of warnings/ifdef mess a bit

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix building with CONFIG_DEBUG_DOUBLEFAULT
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix building with CONFIG_DEBUG_DOUBLEFAULT

arch/blackfin/mach-common/entry.S:465: Error: pcrel too far
BFD_RELOC_BFIN_10

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: do not define decode_instruction if hwtrace is turned off
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: do not define decode_instruction if hwtrace is turned off

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rename irq_flags to bfin_irq_flags
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: rename irq_flags to bfin_irq_flags

rename irq_flags to bfin_irq_flags to avoid namespace
collision with common code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move out irq related functions
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move out irq related functions

move irq related functions into asm/irq.h and out of the mondo asm/system.h

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move the PORT registers down
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move the PORT registers down

Move the PORT registers down as well since they may utilize
asm/system.h code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: introduce an IM_MEM macro to kgdb
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: introduce an IM_MEM macro to kgdb

create an IN_MEM() macro to simplify comparing an address in an on-chip
region of memory and make things readable

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix off-by-one errors on end of memory range
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix off-by-one errors on end of memory range

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: delete unused vars and add parenthesis to fixup warnings
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: delete unused vars and add parenthesis to fixup warnings

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move fixed code into init section
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move fixed code into init section

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove superficial check on blackfin watchdog
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove superficial check on blackfin watchdog

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: set PM_WAKEUP_GPIO_NUMBER default to 2 for everyone
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: set PM_WAKEUP_GPIO_NUMBER default to 2 for everyone

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: delay PLL_CTL/VR_CTL wrappers
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: delay PLL_CTL/VR_CTL wrappers

Delay PLL_CTL/VR_CTL wrappers as much as possible to avoid
the inter-dependency problems with cdef and common headers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: dont export ack_bad_irq as no one else does
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: dont export ack_bad_irq as no one else does

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move SIC_SYSIRQ() to the one file that actually uses it
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move SIC_SYSIRQ() to the one file that actually uses it

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move ack_bad_irq() prototype to hardirq.h to match other arches
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move ack_bad_irq() prototype to hardirq.h to match other arches

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: delete old comments and NO_IRQ define
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: delete old comments and NO_IRQ define

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: overlay thread.usp over PT_USP
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: overlay thread.usp over PT_USP

overlay thread.usp over PT_USP when getting the whole regfile to
match PT_USP behavior

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rewrite blackfin_invalidate_entire_dcache function
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: rewrite blackfin_invalidate_entire_dcache function

rewrite blackfin_invalidate_entire_dcache() in C for easier management,
better optimization, and so we take all SSYNC anomalies into account

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: make ADI board names consistent
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: make ADI board names consistent

Cc: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix bug - hardware breakpoint doesn't always work in kgdb
Sonic Zhang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Fix bug - hardware breakpoint doesn't always work in kgdb

Hardware breakpoint doesn't always work in kgdb. It works at the first
two times, but if you repeatedly trigger that hardware breakpoint, it
would slip over that point once in two times.

Fix it by always setting hw bp skip to 0. gdb does skip after hw bp trap.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix unused warning for some blackfin derivatives
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix unused warning for some blackfin derivatives

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Use GPIO_BANKSIZE macro to replace const number 16 for GPIO_BANK_NUM...
Bryan Wu [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Use GPIO_BANKSIZE macro to replace const number 16 for GPIO_BANK_NUM macro caculating

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: some other misc code
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: SMP supporting patchset: some other misc code

Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

In this patch, we provide SMP extend to some other misc code

Singed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: Blackfin kernel and memory management code
Graf Yang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: SMP supporting patchset: Blackfin kernel and memory management code

Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

In this patch, we provide SMP extend to Blackfin kernel and memory management code

Singed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: Blackfin CPLB related code
Graf Yang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: SMP supporting patchset: Blackfin CPLB related code

Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

In this patch, we provide SMP extend to Blackfin CPLB related code

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: Blackfin header files and machine common...
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code

Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

In this patch, we provide SMP extend to Blackfin header files
and machine common code

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: BF561 related code
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: SMP supporting patchset: BF561 related code

Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

In this patch, we provide SMP extend to BF561 kernel code

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: use physmap in board resources rather than legacy config method
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: use physmap in board resources rather than legacy config method

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Convert Blackfin GPIO driver to use common gpiolib/gpiochip infrastructure
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Convert Blackfin GPIO driver to use common gpiolib/gpiochip infrastructure

 - This patch adds support for ARCH_WANT_OPTIONAL_GPIOLIB.
 - It may be changed in future to ARCH_REQUIRE_GPIOLIB.
 - Change GPIO_BANK_NUM use DIV_ROUND_UP( , ) macro

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Cleanup and unify Blackfin IRQ and GPIO IRQ handling
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Cleanup and unify Blackfin IRQ and GPIO IRQ handling

 - Remove SSYNC()
 - Use irq_to_gpio where applicable
 - Remove gpio_edge_triggered bitfield, check irq_desc fields instead.
 - Remove gpio_both_edge_triggeredb bitfield, check irq_desc fields
   instead.
 - Use BITMAP and bitops on gpio_enabled
 - Preferably use 32-bit
 - Looking at the disassembly this indeed saves quite a few instructions.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: workaround bug: spi_mmc driver working in dma mode may hang the system
Yi Li [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: workaround bug: spi_mmc driver working in dma mode may hang the system

Disable spi_mmc DMA by default.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove useless SSYNC() in irq priority code
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove useless SSYNC() in irq priority code

 - remove SSYNC() left over from irq init split
 - do not force SSYNC() when masking/unmasking IRQs in the SIC
   as any order enforced by the hardware should already be enforced
   by software

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with...
Bryan Wu [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpio

The whole story:

Before BF51x merged, all the MAX_BLACKFIN_GPIOS are integral multiple of GPIO_BANKSIZE (= 16).
But BF51x provides MAX_BLACKFIN_GPIOS = 40 which includes 3 banks and the 3rd bank has only 8
GPIO pins.

Therefore, gpio_bank() macros is correct when you try to find a GPIO in which bank (GPIO_35 is
in bank 2). But on BF51x gpio_bank(MAX_BLACKFIN_GPIOS) only gives out 2 banks instead of 3
banks for some static array initialization.

This patch add a new macros gpio_bank_n() and GPIO_BANK_NUM to do bank number caculating and
remain the gpio_bank() macros for positioning a gpio in which bank.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: enable i2c_bfin_twi0_device in cm_bf548 board
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: enable i2c_bfin_twi0_device in cm_bf548 board

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code.
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fixup get_user() macros
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fixup get_user() macros

 - to avoid uninitialized errors
 - make invalid sizes a build error

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: do not bother initializing the first 4k
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: do not bother initializing the first 4k

our kernel should be sane now, and we want to catch NULL bugs,
not ignore them

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: use sti to set the mask rather than banging on imask
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: use sti to set the mask rather than banging on imask

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: don't assume a specific SPI flash part - take whatever you probe
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: don't assume a specific SPI flash part - take whatever you probe

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: update defconfig file for all boards
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: update defconfig file for all boards

 - do not bother generating deprecated /sys files by default now since
   mdev does not need it
 - Don't built-in char sport driver and build it as a module in defconfig
 - disable CONFIG_DEVKMEM by default
 - enable spi flash driver on boards that have one
 - switch config to the NAND platfrom driver rather than the bfin async one
 - do not make BFIN_DMA_5XX optional since a large portion of our code relies
   on dma functions existing

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove most BUG_ON channel checks
Michael Hennerich [Wed, 29 Oct 2008 03:06:03 +0000 (11:06 +0800)]
Blackfin arch: remove most BUG_ON channel checks

keep BUG_ON in DMA request, free and set_dma_callback.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: only add IFLUSH nop padding when anomaly 443 is enabled
Mike Frysinger [Tue, 28 Oct 2008 08:34:42 +0000 (16:34 +0800)]
Blackfin arch: only add IFLUSH nop padding when anomaly 443 is enabled

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Remove useless SSYNCs in DMA code
Michael Hennerich [Tue, 28 Oct 2008 10:18:47 +0000 (18:18 +0800)]
Blackfin arch: Remove useless SSYNCs in DMA code

Tons of SSYNC operation will impact the DMA performance

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: lookup channel2irq() only once
Michael Hennerich [Tue, 28 Oct 2008 10:19:29 +0000 (18:19 +0800)]
Blackfin arch: lookup channel2irq() only once

Add irq to struct dma_channel lookup channel2irq() only once,
since channel2irq() is fairly large on some Blackfin derivatives.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: update anomaly lists to match latest sheets
Mike Frysinger [Tue, 28 Oct 2008 08:22:41 +0000 (16:22 +0800)]
Blackfin arch: update anomaly lists to match latest sheets

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: refine the gpio check
Mike Frysinger [Tue, 28 Oct 2008 08:16:29 +0000 (16:16 +0800)]
Blackfin arch: refine the gpio check

refine the gpio check in peripheral_request() so that it only
checks pins that can be used as both GPIO and a peripheral

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: unify port_setup() to reduce arch differences
Mike Frysinger [Tue, 28 Oct 2008 07:53:37 +0000 (15:53 +0800)]
Blackfin arch: unify port_setup() to reduce arch differences

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: unify peripheral_request() to reduce arch differences
Mike Frysinger [Tue, 28 Oct 2008 07:49:59 +0000 (15:49 +0800)]
Blackfin arch: unify peripheral_request() to reduce arch differences

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix cmp_label() so it doesnt incorrectly accept partial leading matches
Mike Frysinger [Tue, 28 Oct 2008 07:47:11 +0000 (15:47 +0800)]
Blackfin arch: fix cmp_label() so it doesnt incorrectly accept partial leading matches

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: unify check_gpio() to reduce arch differences
Mike Frysinger [Tue, 28 Oct 2008 07:45:42 +0000 (15:45 +0800)]
Blackfin arch: unify check_gpio() to reduce arch differences

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove unused local define
Mike Frysinger [Tue, 28 Oct 2008 06:38:51 +0000 (14:38 +0800)]
Blackfin arch: remove unused local define

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add support for Blackfin latest processor family BF51x
Bryan Wu [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add support for Blackfin latest processor family BF51x

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: put quotes around error to silence a ton of warnings from gcc-4.3
Mike Frysinger [Tue, 28 Oct 2008 06:11:45 +0000 (14:11 +0800)]
Blackfin arch: put quotes around error to silence a ton of warnings from gcc-4.3

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bug - kernel with SMP patch can not bootup
Graf Yang [Tue, 28 Oct 2008 06:00:52 +0000 (14:00 +0800)]
Blackfin arch: fix bug - kernel with SMP patch can not bootup

The original code defined _exception_stack but not alloc space for the exception
stack. In exception, this area is over written by exception stack. Common kernel
luckly boot up, but SMP kernel stuck.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: drop redundant BFIN_DMA_5XX depends
Mike Frysinger [Tue, 28 Oct 2008 03:15:36 +0000 (11:15 +0800)]
Blackfin arch: drop redundant BFIN_DMA_5XX depends

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: drop unused exports and comment remaining exports
Mike Frysinger [Tue, 28 Oct 2008 03:12:17 +0000 (11:12 +0800)]
Blackfin arch: drop unused exports and comment remaining exports

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add an option to allow people to stick exception stack into L1 scratch
Mike Frysinger [Tue, 28 Oct 2008 03:03:09 +0000 (11:03 +0800)]
Blackfin arch: add an option to allow people to stick exception stack into L1 scratch

allow people to stick exception stack into L1 scratch
and make sure it gets placed into .bss sections rather than .data

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move EXPORT_SYMBOL to the place where it is actually defined
Mike Frysinger [Tue, 28 Oct 2008 03:07:15 +0000 (11:07 +0800)]
Blackfin arch: move EXPORT_SYMBOL to the place where it is actually defined

 - kernel_thread
 - irq_flags
 - checksum

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: BF538/9 Linux kernel Support
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: BF538/9 Linux kernel Support

Add supporing for Blackfin BF538 and BF539 processors.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: unify duplicated bss init code
Mike Frysinger [Mon, 27 Oct 2008 10:17:41 +0000 (18:17 +0800)]
Blackfin arch: unify duplicated bss init code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoFix up 64-bit byte swaps for most 32-bit architectures
Linus Torvalds [Wed, 7 Jan 2009 05:17:57 +0000 (21:17 -0800)]
Fix up 64-bit byte swaps for most 32-bit architectures

The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores).  We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.

Reported-and-tested-by: Nicolas Pitre <nico@cam.org>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobyteorder: remove the now unused byteorder.h
Harvey Harrison [Tue, 6 Jan 2009 21:30:58 +0000 (13:30 -0800)]
byteorder: remove the now unused byteorder.h

This implementation caused problems in userspace which can, and does
define _both_ __LITTLE_ENDIAN and __BIG_ENDIAN.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomn10300: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:34 +0000 (14:56 -0800)]
mn10300: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:33 +0000 (14:56 -0800)]
frv: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom32r: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:33 +0000 (14:56 -0800)]
m32r: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom68knommu: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:32 +0000 (14:56 -0800)]
m68knommu: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>