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>
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>
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>
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>
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>
- 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>
[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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>