Commit graph android_kernel_sony_sdm845/arch/blackfin/kernel/setup.c
Message SHA1
blackfin: fix build after add bf60x mach/pm.h
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>

Steven Miao   authored and   Bob Liu   commited 2012-05-21 14:55:07 +08:00
672552adb3
blackfin: bf60x: Rename the DDR controller macro
Rename the DDR controller macro from DDR0 to DMC0 to avoid confustion for
bf60x.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>

Sonic Zhang   authored and   Bob Liu   commited 2012-05-21 14:54:57 +08:00
8bf7135fff
blackfin: bf60x: cleanup get clock code
Remove redundance code for get clock.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>

Sonic Zhang   authored and   Bob Liu   commited 2012-05-21 14:54:53 +08:00
1d3dbda6ed
blackfin: bf60x: make clock changeable in kernel menuconfig
Add clock changeable support in kernel menuconfig for bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>

Bob Liu   commited 2012-05-21 14:54:49 +08:00
7c141c1c5c
Blackfin: fix unused clk var warning
This is only used on BF60x code (so this patch should get squashed into
the original one that added it).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bob Liu <lliubbo@gmail.com>

Mike Frysinger   authored and   Bob Liu   commited 2012-05-21 14:54:37 +08:00
592b8785b9
blackfin: add bf60x to current framework
This patch added bf60x to current blackfin kernel framework.

Signed-off-by: Bob Liu <lliubbo@gmail.com>

Bob Liu   commited 2012-05-21 14:54:12 +08:00
b5affb0147
new helper: ext2_image_size()
... implemented that way since the next commit will leave it
almost alone in ext2_fs.h - most of the file (including
struct ext2_super_block) is going to move to fs/ext2/ext2.h.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-03-31 16:03:16 -04:00
39429c5e4a
Disintegrate asm/system.h for Blackfin [ver #2]
Disintegrate asm/system.h for Blackfin.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: uclinux-dist-devel@blackfin.uclinux.org
Signed-off-by: Bob Liu <lliubbo@gmail.com>

David Howells   authored and   Bob Liu   commited 2012-03-21 11:00:08 +08:00
3bed8d6746
bf54x: get mem size: missing break in switch
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>

Steven Miao   authored and   Bob Liu   commited 2012-01-09 10:26:15 +08:00
4dbeccdf7b
Blackfin: optimize double fault boot checking
This moves the double fault data used at boot time into a single struct
which can then easily be addressed with indexed loads rather than having
to explicitly load multiple addresses.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-07-23 01:10:43 -04:00
fb1d9be596
Blackfin: convert old cpumask API to new one
old cpu_xxx() APIs is planned to removed later. then, converted.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

KOSAKI Motohiro   authored and   Mike Frysinger   commited 2011-05-25 08:24:11 -04:00
fecedc8071
Blackfin: optimize MMR reads during startup a bit
Since the value of these MMRs aren't changing, store the value in a local
variable and work off of that.  This avoids multiple MMR reads which are
implicitly forced by the volatile markings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-05-25 08:13:43 -04:00
00b5c50e47
Blackfin: move internal irq prototypes out of global namespace
These are only used in a few internal Blackfin places, so move the irq
prototypes out of the global header and into the internal irq one.  No
functional changes other than shuffling locales.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-05-25 08:13:43 -04:00
6327a574f9
Blackfin: bf51x/bf52x: fix typo in hysteresis MMR names
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-05-25 08:13:42 -04:00
3086fd2768
Blackfin: SMP: drop unused blackfin_cpudata.idle pointer
Not sure when we stopped using this field, but nothing in the tree uses
this now, so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-05-25 08:13:42 -04:00
2951acba85
Blackfin: SMP: fix cpudata cache setup
After some cache setup reordering changesets, the blackfin_cpudata init
was left behind.  While cpu0's data was correct, cpu1's data was not.
Not that big of a deal as these are only used in the cpuinfo output, but
should still be fixed.  So move the setup of these fields to the common
cache setup function to avoid this happening again in the future.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-05-25 08:13:42 -04:00
44491fbc5a
Blackfin: clean up /proc/cpuinfo output
The smp flush lines are too long and have too many newlines, so scale
them back to match the other lines.

The %p modifier shows "(null)" for 0, so use %08x instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2011-05-25 08:13:42 -04:00
8d011f70b0
Blackfin: SMP: work around anomaly 05000491
In order to safely work around anomaly 05000491, we have to execute IFLUSH
from L1 instruction sram.  The trouble with multi-core systems is that all
L1 sram is visible only to the active core.  So we can't just place the
functions into L1 and call it directly.  We need to setup a jump table and
place the entry point in external memory.  This will call the right func
based on the active core.

In the process, convert from the manual relocation of a small bit of code
into Core B's L1 to the more general framework we already have in place
for loading arbitrary pieces of code into L1.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Sonic Zhang   authored and   Mike Frysinger   commited 2011-03-18 04:01:04 -04:00
c6345ab1a3
Blackfin: BF51x/BF52x: support GPIO Hysteresis/Schmitt Trigger options
Newer parts have optional Hysteresis/Schmitt Trigger options to help with
dirty signals.  So add some kconfig options for tuning this and enable it
by default for people.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Michael Hennerich   authored and   Mike Frysinger   commited 2010-08-06 12:55:52 -04:00
7a4a207e74
Blackfin: another year of changes (update copyright in boot log)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2010-05-22 14:19:11 -04:00
be1577e378
Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu data
This functions are implicitly called by core functions like cpu_relax(),
and since those functions may be called early on before common code has
initialized the per-cpu data area, we need to tweak the stats gathering.
Now the statistics are maintained in common bss which makes these funcs
safe to use as soon as the C runtime env is setup.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Graf Yang   authored and   Mike Frysinger   commited 2010-03-09 00:30:50 -05:00
718340f629
Blackfin: initial XIP support
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Barry Song   authored and   Mike Frysinger   commited 2010-03-09 00:30:48 -05:00
d86bfb1600
Blackfin: replace harcoded define with proper THREAD_SIZE macro
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Barry Song   authored and   Mike Frysinger   commited 2010-03-09 00:30:48 -05:00
6feda3a653
Blackfin: fix MPU page permission masks overflow when dealing with async memory
Attempting to use the MPU while doing XIP out of parallel flash hooked up
to the async memory bus would often result in random crashes as the MPU
slowly corrupted memory.

The fallout here is that the async banks gain MPU protection from user
space too.  So any accesses have to go through the mmap() interface rather
than just using hardcoded pointers.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Barry Song   authored and   Mike Frysinger   commited 2010-03-09 00:30:46 -05:00
e18e7dd334
Blackfin: allow boards to register early devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Sonic Zhang   authored and   Mike Frysinger   commited 2010-03-09 00:30:45 -05:00
b635f1912d
Blackfin: drop 4KB reserve at end of memory
The point of this small chunk was to avoid anomaly 05000310.  This never
really seemed to do what it was intended though -- no valid CPLBs exist
over the reserved memory, and there is often memory before it anyways (due
to the uClinux MTD and/or reserved DMA region).  Plus, it doesn't address
the L1 instruction case.

So drop this chunk as it wastes memory and is affront to humanity.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Barry Song   authored and   Mike Frysinger   commited 2009-12-15 00:15:50 -05:00
d45e8db1b2
Blackfin: announce current cpu rev when booting
User reports rarely include full information, so include this important
tidbit up front.  It's also good to know at a glance in general.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-12-15 00:15:01 -05:00
7a1a8cc190
Blackfin: calculate on-chip lengths at link time rather than run time
Since the link sizes never change at runtime, push the calculation out to
the linker script to save some useless calculation costs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2009-12-15 00:13:55 -05:00
5cd82a6d58
Blackfin: mass clean up of copyright/licensing info
Bill Gatliff & David Brownell pointed out we were missing some
copyrights, and licensing terms in some of the files in
./arch/blackfin, so this fixes things, and cleans them up.

It also removes:
 - verbose GPL text(refer to the top level ./COPYING file)
 - file names (you are looking at the file)
 - bug url (it's in the ./MAINTAINERS file)
 - "or later" on GPL-2, when we did not have that right

It also allows some Blackfin-specific assembly files to be under a BSD
like license (for people to use them outside of Linux).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-10-07 04:36:26 -04:00
96f1050d3d
Blackfin: fix spelling in a few comments
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Michael Hennerich   authored and   Mike Frysinger   commited 2009-09-16 22:10:33 -04:00
05d17dfaab
Blackfin: punt dead cache locking code
No one uses these functions, and some are duplicate of existing C code.  So
just punt the whole thing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2009-09-16 22:10:25 -04:00
3aa670419a
Blackfin: catch hardware errors earlier during booting
Allow hardware errors to be caught during early portions of booting, and
leave something in the shadow console that people can use to debug their
system with (to be printed out by the bootloader on next reset).

This enables the hardare error interrupts in head.S, allowing us to find
hardware errors when they happen (well, as much as you can with a hardware
error) and prints out the trace if it is enabled.  This will catch errors
(like booting the wrong image on a 533) which previously resulted in a
infinite loop/hang, as well as random hardware errors before before
setup_arch().

To disable this debug only feature - turn off EARLY_PRINTK.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-09-16 21:31:44 -04:00
837ec2d56c
Blackfin: add an early shadow console
Add a memory based shadow console to keep a copy of the printk buffer in a
location which can be found externally.  This allows bootloaders to locate
and utilize the log buffer in case of silent (early/resume/etc...) crashes.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-09-16 21:31:43 -04:00
3f871feaf3
Blackfin: clean up early memory setup code
Remove code duplication, and only print out memory warnings when they are
an actual problem.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-09-16 21:28:54 -04:00
2f812c0bd5
Blackfin: drop per-cpu loops_per_jiffy tracking
On Blackfin SMP, a per-cpu loops_per_jiffy is pointless since both cores
always run at the same CCLK.  In addition, the current implementation has
flaws since the main consumer for loops_per_jiffy (asm/delay.h) uses the
global kernel loops_per_jiffy and not the per_cpu one.  So punt all of the
per-cpu handling and go back to the global shared one.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Michael Hennerich   authored and   Mike Frysinger   commited 2009-07-16 01:52:44 -04:00
c70c754ff9
Blackfin: drop duplicate runtime checking of anomaly 05000448
We already catch this anomaly at compile time, and the runtime version is
such that it ends up checking on all parts rather than just the ones that
might actually have it.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-07-16 01:52:34 -04:00
3a920accbb
Blackfin: fix silent crash when no uClinux MTD filesystem exists
Since we need to relocate the attached filesystem with the uClinux MTD map
(to handle some anomalies), we need to know its real filesize.  If we boot
a kernel without a filesystem actually attached, we end up blindly reading
and copying garbage (since there is no magic value to detect validity).
Often times this results in an early crash and no output.  So add a few
basic sanity checks before operating on things to catch the majority of
cases.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-07-16 01:52:21 -04:00
dc437b1b59
Blackfin: drop dead flash_probe call
There are no CONFIG_{BLK,CHR}_DEV_FLASH Kconfig options, and there is no
flash_probe() function, so not really sure what this code is all about.
Seems to be dead code that stretches way back to the start of the Blackfin
port.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2009-07-16 01:39:45 -04:00
b2dc0a0884
Remove multiple KERN_ prefixes from printk formats
Commit 5fd29d6ccb ("printk: clean up
handling of log-levels and newlines") changed printk semantics.  printk
lines with multiple KERN_<level> prefixes are no longer emitted as
before the patch.

<level> is now included in the output on each additional use.

Remove all uses of multiple KERN_<level>s in formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Joe Perches   authored and   Linus Torvalds   commited 2009-07-08 10:30:03 -07:00
ad361c9884
Blackfin: fix early crash when booting on wrong cpu
Make sure we process the kernel command line before poking the hardware,
so that we can process early printk.  This helps ensure that if you boot
a kernel configured for a different processor, something will be left in
the log buffer.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-06-22 21:16:17 -04:00
bd854c077e
Blackfin: decouple unrelated cache settings to get exact behavior
The current cache options don't really represent the hardware features.
They end up setting different aspects of the hardware so that the end
result is to turn on/off the cache.  Unfortunately, when we hit cache
problems with the hardware, it's difficult to test different settings to
root cause the problem.  The current settings also don't cleanly allow for
different caching behaviors with different regions of memory.

So split the configure options such that they properly reflect the settings
that are applied to the hardware.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Jie Zhang   authored and   Mike Frysinger   commited 2009-06-22 21:15:59 -04:00
41ba653f24
Blackfin: fix accidental reset in some boot modes
We read the SWRST (Software Reset) register to get at the last reset
state, and then we may configure the DOUBLE_FAULT bit to control behavior
when a double fault occurs.  But if the lower bits of the register is
already set (like UART boot mode on a BF54x), we inadvertently make the
system reset by writing to the SYSTEM_RESET field at the same time.  So
make sure the lower 4 bits are always cleared.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Sonic Zhang   authored and   Mike Frysinger   commited 2009-06-22 21:15:48 -04:00
0de4adfb8c
Blackfin: add blackfin_invalidate_entire_icache for SMP systems
The KGDB code uses this when switching processors to make sure the icache
is in a valid state.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Sonic Zhang   authored and   Mike Frysinger   commited 2009-06-13 07:20:07 -04:00
47e9dedb72
Blackfin: include the cpu compiled version in /proc/cpuinfo
Since the compiled-for cpu revision can be significant, include it in the
cpuinfo output along side the cpu revision we're currently running on.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-06-13 07:20:07 -04:00
2466ac6556
Blackfin: override default uClinux MTD addr/size
Due to a processor anomaly (05000263 to be exact), most Blackfin parts
cannot keep the embedded filesystem image directly after the kernel in
RAM.  Instead, the filesystem needs to be relocated to the end of memory.
As such, we need to tweak the map addr/size during boot for Blackfin
systems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2009-06-12 06:11:53 -04:00
79df1b6947
Blackfin: detect anomaly 05000274
Detect and reject operating conditions for anomaly 05000274 since the
problem cannot be worked around in software.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Sonic Zhang   authored and   Mike Frysinger   commited 2009-06-12 06:11:35 -04:00
7f3aee3c18
Blackfin: do not append newlines to panic() messages
The panic() function already handles newlines for us.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Mike Frysinger   commited 2009-06-12 06:11:34 -04:00
d8804adf52
Blackfin: fix early L1 relocation crash
Our early L1 relocate code may implicitly call code which lives in L1
memory.  This is due to the dma_memcpy() rewrite that made the DMA code
lockless and safe to be used by multiple processes.  If we start the
early DMA memcpy to relocate things into L1 instruction but then our
DMA memcpy code calls a function that lives in L1, things fall apart.
As such, create a small dedicated DMA memcpy routine that we can assume
sanity at boot time.

Reported-by: Filip Van Rillaer <filip.vanrillaer@oneaccess-net.com>
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Robin Getz   authored and   Mike Frysinger   commited 2009-06-12 06:11:27 -04:00
fecbd7366b
Blackfin arch: remove spurious dash when dcache is off
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>

Mike Frysinger   authored and   Bryan Wu   commited 2009-03-05 18:47:20 +08:00
27276ba21f
Blackfin arch: Random read/write errors are a bad thing
Random read/write errors are a bad thing - so don't let anyone
(including the test bench) run on something we know is bad.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>

Robin Getz   authored and   Bryan Wu   commited 2009-03-05 18:18:49 +08:00
0004952242