Archived
14
0
Fork 0
Commit graph

39173 commits

Author SHA1 Message Date
Wu Zhangjin
92d1b63dba MIPS: Loongson: RTC: Enable legacy RTC driver on fulong
RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC
driver is disabled. but fortunately, RTC_LIB not works on fulong, so,
enabling the legcy RTC driver is needed, otherwise, the tools like
hwclock will not work.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:47 +02:00
Wu Zhangjin
f7face03c6 MIPS: Loongson: PCI: Clean up pcimap setup
Fixup the wrong original comment of pcimap, and make the source code more
understandable. and also, some new extra consideration is added in.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:46 +02:00
Wu Zhangjin
5e983ff654 MIPS: Loongson: clean up the coding style
With the help of script/checkpatch.pl, i have cleaned up the coding
style.

1. remove un-needed header files and tune some comments.
2. remove some un-needed { }

add a new header file loongson.h:

3. move some common header files to loongson.h
4. move some common extern declartions to loongson.h

and this new header file is needed for future loongson2f support.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:46 +02:00
Wu Zhangjin
bd92aa013e MIPS: Loongson: Split the implementation of prom and setup parts
This patch split the old initilization and setup implementation to
several file, one file one logic function.

the other main changes include:

	1. as the script/checkpatch.pl suggests, use strict_strtol instead
	of simple_strtol in arch/mips/lemote/lm2e/cmdline.c

	2. use the existed macros in asm/mips-boards/bonito64.h as the
	arguments of set_io_port_base() and remove the un-needed ones in
	asm/mach-lemote/pci.h

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:46 +02:00
Wu Zhangjin
f54a40ee6b MIPS: Loongson: PCI: use existing mips_io_port_base
mips_io_port_base is initialized via set_io_port_base() in
arch/mips/lemote/lm2e/setup.c, we can use it directly here.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:46 +02:00
Wu Zhangjin
f256a5775a MIPS: Loongson: pm: clean up the reboot support
Several magic numbers have been replaced by relative macros, which will be
more readable and understandable.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:45 +02:00
Wu Zhangjin
8f0de87fa9 MIPS: Loongson: pm: Remove redundant source code
The implmentation of loongson2e_power_off and loongson2e_halt is almostly
the same, just preserve one of them.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:45 +02:00
Wu Zhangjin
f6a2740d0c MIPS: Loongson: Add new early_printk implmentation
This patch is based on the implementation in the lm2e-fixes branch of
Philippe's git://git.linux-cisco.org/linux-mips.git and the
malta-specific early_printk implementation.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:45 +02:00
Wu Zhangjin
95ff7c9553 MIPS: Loongson: Remove out-of-date board-specific kgdb source code
Since the re-implementation of kgdb by commit
8854700115 the platform-specific version
has become superfluous, remove it.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:44 +02:00
Wu Zhangjin
efc49ef556 MIPS: Loongson: Remove existing early_printk implementation
Removes the existing implementation of early_printk for fulong.  The old
implementation was based on the outdated board-specific dbg_io.c.

Since commit 8d60a903d9 dbg_io.c is not longer
needed; it will be removed by the next patch, and a new implementation of
early_printk will be added later.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:44 +02:00
Ralf Baechle
eb42306b7a MIPS: IP22, IP28: Build with -Werror
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:44 +02:00
Ralf Baechle
03bf6ad9d8 MIPS: FW: Build with -Werror
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:44 +02:00
Ralf Baechle
38c9fb743f MIPS: Fulong: Convert reset initialization to initcall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:43 +02:00
Ralf Baechle
1f320d053c MIPS: Malta: Convert reset initialization to initcall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:43 +02:00
Ralf Baechle
7e17615c45 MIPS: Get rid of duplicate cpu_idle() prototype.
Since 2.6.11-rc1 there is a prototype in <linux/smp.h>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:43 +02:00
Julia Lawall
70ebadc8e3 MIPS: TXx9: Fix error handling.
Error handling code following a kzalloc should free the allocated data.
Error handling code following an ioremap should iounmap the allocated data.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:43 +02:00
Atsushi Nemoto
13680ade4e MIPS: TXx9: Disable PM capability of TX493[89] internal ether
Some TC35815 variants (i.e. TX493[89] internal ether) report existance of
PM registers though they are not supported.  Disable PM features by
clearing pdev->pm_cap.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:43 +02:00
Nelson Elhage
99502d94c3 MIPS: make page.h constants available to assembly.
page.h includes ifndef __ASSEMBLY__ guards, but PAGE_SIZE and some other
constants are defined using "1UL", which the assembler does not support.
Use the _AC macro from const.h to make them available to assembly (and
linker scripts).

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:42 +02:00
Manuel Lauss
75f4531641 MIPS: Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n
Some drivers use gpio_request/gpio_free regardless of whether
gpiolib is actually built;  add stubs to work around the ensuing
compile failures.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:42 +02:00
Alexey Dobriyan
6de4c6f9c8 MIPS: Lasat: Fix compilation
Header needed for current_cpu_data which expands to smp_processor_id().
However, linux/smp.h can't be included into asm/cpu-info.h due to horrible
circular dependencies, so plug it here.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:42 +02:00
David Daney
2608441164 MIPS: Octeon: Check all CCAs in cvmx_write_csr.
The current code only checks CCA of 0 when deciding if a dummy read is
needed.  Since the kernel can (and does) use other CCAs we need to
mask out the CCA bits from the address.  Since the address constant
now fits in 16 bits, there is an added benefit that smaller code is
generated.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:41 +02:00
Ralf Baechle
e3bf887d73 MIPS: Fix potencial build error in <asm/delay.h>
<asm/delay.h> will break if HZ isn't defined.  In 2.6.26 and later we're
usually lucky ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17 20:07:41 +02:00
Linus Torvalds
de55a8958f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: check NB MCE bank enable on the current node properly
  amd64_edac: Rewrite unganged mode code of f10_early_channel_count
  amd64_edac: cleanup amd64_check_ecc_enabled
  x86, EDAC: Provide function to return NodeId of a CPU
  amd64_edac: build driver only on AMD hardware
2009-09-17 09:55:52 -07:00
Linus Torvalds
abf5940dad Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (75 commits)
  Blackfin: update ftrace for latest toolchain
  Blackfin: fix elf_fpregset_t definition
  Blackfin: unify cache init functions
  Blackfin: swap clocksource ratings for gptimer/cycles
  Blackfin: update ftrace_push_return_trace() breakage
  Blackfin: update cm board resources
  Blackfin: cm-bf537u: split board from cm-bf537e
  Blackfin: bf538-ezkit: add SPI IRQ resources
  Blackfin: increase default async timings for parallel flashes
  Blackfin: add ICPLB coverage for async banks
  Blackfin: use KERN_ALERT in all kgdb_test output
  Blackfin: fix BF54x SPI CS resources
  Blackfin: fix typo in isram_write()
  Blackfin: bf537-stamp: add adp5588 gpio resources
  Blackfin: add some isram-driver self tests
  Blackfin: workaround anomaly 05000283
  Blackfin: fix spelling in a few comments
  Blackfin: use raw_smp_processor_id() in exception code
  Blackfin: remove useless duplicated assignment in gpio code
  Blackfin: Fix link errors with binutils 2.19 and GCC 4.3
  ...
2009-09-17 09:53:04 -07:00
Linus Torvalds
66bc4a6f34 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (53 commits)
  m68knommu: Make PAGE_SIZE available to assembly files.
  m68knommu: fix ColdFire definition of CLOCK_TICK_RATE
  m68knommu: set multi-function pins for ethernet when enabled
  m68knommu: remove special interrupt handling code for ne2k support
  m68knommu: relax IO_SPACE_LIMIT setting
  m68knommu: remove ColdFire direct interrupt register access
  m68knommu: create a speciailized ColdFire 5272 interrupt controller
  m68knommu: add support for second interrupt controller of ColdFire 5249
  m68knommu: clean up old ColdFire timer irq setup
  m68knommu: map ColdFire interrupts to correct masking bits
  m68knommu: clean up ColdFire 532x CPU timer setup
  m68knommu: simplify ColdFire "timers" clock initialization
  m68knommu: support code to mask external interrupts on old ColdFire CPU's
  m68knommu: merge old ColdFire interrupt controller masking macros
  m68knommu: remove duplicate ColdFire mcf_autovector() code
  m68knommu: move ColdFire INTC definitions to new include file
  m68knommu: mask off all interrupts in ColdFire intc-simr controller
  m68knommu: remove timer device interrupt setup for ColdFire 532x
  m68knommu: remove interrupt masking from ColdFire pit timer
  m68knommu: remove unecessary interrupt level setting in ColdFire 520x setup
  ...
2009-09-17 09:52:43 -07:00
Amit Kucheria
9312fffbad mfd: OMAP: Board-specifc twl4030 DPS scripts for RX51 board
Add support for Dynamic Power Switching (DPS) for the RX51 board.

These scripts are still a work-in-progress. I'll keep sending patches to
update the scripts as they are optimised.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17 09:47:23 +02:00
Kuninori Morimoto
064a16dc41 sh: mach-ecovec24: Add user debug switch support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-17 15:07:00 +09:00
Chen Liqin
9973affe9b score: add TIF_NOTIFY_RESUME define in asm/thread_info.h 2009-09-17 12:05:56 +08:00
Yi Li
5bf9cbef99 Blackfin: update ftrace for latest toolchain
The mcount support that was finally added to the Blackfin gcc port isn't
exactly the same as what ftrace was developed against.  Now that the final
gcc version is in place, update the ftrace code to match.

While updating this, fix the swapped arguments to the tracer (signature is
(ip, parent_ip) while we were passing (parent_ip, ip)).

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:52 -04:00
Mike Frysinger
3b67d91b3e Blackfin: fix elf_fpregset_t definition
The elf_fpregset_t type relied on an empty struct in the asm/user.h, but
the transition to asm-generic/user.h dropped that empty struct.  Rather
than restore this useless struct, define the only user (elf_fpregset_t)
as an empty struct itself.  This fixes building when ELF dump support is
enabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:51 -04:00
Mike Frysinger
ea426e6c62 Blackfin: unify cache init functions
The CPLB implementations (mpu/nompu) had exact copies of the cacheinit
code.  Even the i/d cache functions are largely the same.  So unify them
both in the common kernel cache code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:49 -04:00
Graf Yang
e78feaaeeb Blackfin: swap clocksource ratings for gptimer/cycles
The cycles clocksource is a higher resolution than the gptimer one, so
make sure the ratings field reflects this.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:48 -04:00
Mike Frysinger
3289651a97 Blackfin: update ftrace_push_return_trace() breakage
Commit 71e308a239 updated ftrace_push_return_trace() prototype but didn't
update the Blackfin ftrace code, so things broke.  Since we don't support
the new stuff yet, call it with stub values.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:47 -04:00
Harald Krapfenbauer
9c21453e37 Blackfin: update cm board resources
Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:46 -04:00
Harald Krapfenbauer
6058434468 Blackfin: cm-bf537u: split board from cm-bf537e
The cm-bf537u module, while similar to the cm-bf537e, is different enough
to warrant its own resources.  It has a USB controller but no PHY.

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:45 -04:00
Barry Song
769cfc0d08 Blackfin: bf538-ezkit: add SPI IRQ resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:43 -04:00
Sonic Zhang
88c28b2df9 Blackfin: increase default async timings for parallel flashes
The default async timings are a little too fast for the parallel flash
that is attached by default to the async banks.  So slow things down a bit
so accessing the hardware is stable.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:42 -04:00
Bernd Schmidt
4663f6ef25 Blackfin: add ICPLB coverage for async banks
When doing XIP, we need to execute out of the async banks, so we need
ICPLBs to allow this.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:42 -04:00
Mingquan Pan
4a3e53c1c4 Blackfin: use KERN_ALERT in all kgdb_test output
Most messages are already using KERN_ALERT, so be consistent to make
things easier to check with test scripts.

Signed-off-by: Mingquan Pan <grace.pan@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:40 -04:00
Yi Li
4e4d496ee3 Blackfin: fix BF54x SPI CS resources
The BF54x has three slave select signals for SPI0/SPI1, not eight.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:39 -04:00
Robin Getz
774b80229f Blackfin: fix typo in isram_write()
The DTEST write bit is 2, not 1.  Improve comments in the related macro
while we're here.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:38 -04:00
Michael Hennerich
ba877d4491 Blackfin: bf537-stamp: add adp5588 gpio resources
For the adp5588 GPIO daughter card.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:37 -04:00
Mike Frysinger
c40cdb2cbd Blackfin: add some isram-driver self tests
Make it easy to figure out if code changes here are correct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:36 -04:00
Robin Getz
dedfd5d7f2 Blackfin: workaround anomaly 05000283
Make sure our interrupt entry code with exact hardware errors handles
anomaly 05000283 (infinite stall in system MMR kill) so we don't stall
while under load.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:34 -04:00
Michael Hennerich
05d17dfaab Blackfin: fix spelling in a few comments
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:33 -04:00
Yi Li
b6dbde27dd Blackfin: use raw_smp_processor_id() in exception code
When preempt debugging is enabled, smp_processor_id() may utilize the
"current" structure.  This may not be safe to access under all exceptions
due to it being in dynamically allocated memory.  So in exception code,
make sure we use raw_smp_processor_id() instead to get at the real value
directly.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:32 -04:00
Michael Hennerich
00dd66d012 Blackfin: remove useless duplicated assignment in gpio code
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:31 -04:00
Ingo Molnar
8d7ac69ffa Blackfin: Fix link errors with binutils 2.19 and GCC 4.3
Not sure whether this has been reported/fixed before.

Today I built a Blackfin tool-chain from scratch for -tip testing,
and it triggers:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.data_a_l1' referenced in expression

and:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.text_data_l1'
referenced in expression

Now i dont have any way to test this linker script, but it now at
least builds fine after fixing what appears to be typos in those
assert statements.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:30 -04:00
Graf Yang
1794131471 Blackfin: handle the core timer interrupt with handle_percpu_irq on SMP
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:29 -04:00
Mike Frysinger
926494943b Blackfin: optimize fixed code handling for the most common case
The majority of the time we are returning to user space, it is not in the
fixed atomic code region.  So rather than branch to a function where we
check the PC and return, do the check inline and branch only when needed.

Also, tweak some of the fixed code handling based on assumptions we are
aware of but cannot be expressed in C.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:28 -04:00
Barry Song
dac981740f Blackfin: delete '-spi' suffix in ad1836/ad1938 driver name
The ASoC drivers have dropped the redundant "-spi" suffix in the driver
name, so update the board resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:27 -04:00
Mike Frysinger
3aa670419a 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>
2009-09-16 22:10:25 -04:00
Mike Frysinger
0198b3bcae Blackfin: drop board resources for dead devices (pbx/ad9960)
These hardware devices are dead and the drivers never cleaned up/merged,
so punt the useless board resource info.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:24 -04:00
Yi Li
c4baebf268 Blackfin: do not trace the exception handler
Since the exception handler cannot cause exceptions, we cannot trace it
without easily causing double faults and crashing the system.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:23 -04:00
Mike Frysinger
7b06263bd7 Blackfin: fix BF522/BF523 max VCO mixup
The BF522 and BF523 had their real max VCO values swapped.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:22 -04:00
Graf Yang
ad46163ac2 Blackfin: SMP port does not yet support cpu frequency scaling
We have an item to get this fixed, but in the mean time, disable selection
via Kconfig dependencies.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:21 -04:00
Yi Li
eb7bd9c461 Blackfin: cleanup sync handling when enabling/disabling cplbs
The handling of updating the [DI]MEM_CONTROL MMRs does not follow proper
sync procedures as laid out in the Blackfin programming manual.  So rather
than audit/fix every call location, create helper functions that do the
right things in order to safely update these MMRs.  Then convert all call
sites to use these new helper functions.

While we're fixing the code, drop the workaround for anomaly 05000125 as
that anomaly applies to old versions of silicon that we do not support.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:19 -04:00
Barry Song
8312440e05 Blackfin: bf537-stamp: update ad1836 resources
Update the ad1836 resources for the new ASoC driver.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:18 -04:00
Yi Li
bd411b15cc Blackfin: update anomaly lists
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:16 -04:00
Barry Song
f1cb64625c Blackfin: bf538-ezkit: add resources for parallel flash
The board has some parallel flash hooked up to the async banks, so add
appropriate physmap resources for it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:15 -04:00
Roel Kluin
ac860751eb Blackfin: fix read buffer overflow
Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:13 -04:00
Stefan Pledl
0e101ec12e Blackfin: bf548-ezkit: fix incorrect LCD size parameters
I think we have to use the physical dimensions [mm] of the display for
.width and .heigth in struct bfin_bf54xfb_mach_info bf54x_lq043_data which
are copied to fbinfo->var.height/.width in bf54x-lq043fb.c.

linux/fb.h describes this values as 'height/weight of picture in mm'

Otherwise QT calcs the wrong dpi value and the displayed fonts are very
small.

Signed-off-by: Stefan Pledl <stefan.pledl@mesutronic.de>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:12 -04:00
Barry Song
b3dec4a4ff Blackfin: cm-bf527/bf537-stamp: fix dm9000 resources
The dm9000 driver expects two IORESOURCE_MEM to get at the device, so make
sure we declare things properly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:10 -04:00
Mike Frysinger
8d71e07596 Blackfin: drop unused MMR defines that only cause bad code to be written
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:09:55 -04:00
Michael Hennerich
61f09b5a09 Blackfin: convert boards to use platform data with smc91x
Latest smc91x driver allows you to specify settings in board resources
rather than needing CONFIG_BLACKFIN in the drivers/net/smc91x.h header.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:32:00 -04:00
Barry Song
2fff7f8800 Blackfin: bf537-stamp: drop ATA interrupt probe workaround
The interrupt probe workaround doesn't work without hacks to common code,
and the add-on card only needs a simple resistor to fix the problem, so
drop the board-specific hack.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:58 -04:00
Graf Yang
01b9f4b0ed Blackfin: improve double fault debug handling
Since the hardware only provides reporting for the last exception handled,
and the values are valid only when executing the exception handler, we
need to save the context for reporting at a later point.  While we do this
for one exception, it doesn't work properly when handling a second one as
the original exception is clobbered by the double fault.  So when double
fault debugging is enabled, create a dedicated shadow of these values and
save/restore out of there.  Now the crash report properly displays the
first exception as well as the second one.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:57 -04:00
Cliff Cai
858c5e9abc Blackfin: bf533-stamp: fix typo in SPI frequency for ad1836 codec
One too many zeros means we run way faster than the codec can handle.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:56 -04:00
Graf Yang
36b8412886 Blackfin: fix MPU handling of invalid memory accesses
The protect_page() function was incorrectly setting up the hardware tables
based on possible access capabilities rather than the actual requested
values.  This means we would grant more access to mmap-ed pages than we
should have.  Once we fix this, we need to tweak the signal generated by
such accesses to aline ourselves with other ports.  This allows the LTP
mmap0{5,6,7} cases to run properly.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:55 -04:00
Jean Delvare
8fc4dd9e87 Blackfin: clean up duplicate I2C device type definitions
I2C_BOARD_INFO() already sets .type, no need to set it again.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:53 -04:00
Barry Song
427f277e5f Blackfin: bf537-stamp: update AD714x resources
Push the device table to the board resources as data interpretation can be
changed on a per-board basis.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:51 -04:00
Sonic Zhang
407505dc01 Blackfin: do not try displaying the end of the stack
The end of the stack may not be valid (and that could be OK), so do not
attempt to parse it.  If we do, we might use a bad pointer in kernel space
which makes things panic().

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:50 -04:00
Yi Li
2120b68f31 Blackfin: bf533-stamp: add resources for mmc_spi card
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:49 -04:00
Barry Song
f41e2fded0 Blackfin: bf538: add bfin_clear_PPI_STATUS() helper
Add the bf538 version of bfin_clear_PPI_STATUS() to match all other ports.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:47 -04:00
Stefan Pledl
a2f78cfc65 Blackfin: fix BF548 UART0 DMA IRQ translation
The initial BF54x port included some defines to keep code simple across
different processors, but it just ended up causing the UART0 DMA IRQs to
be set to the UART1 channels.

Signed-off-by: Stefan Pledl <stefan.pledl@mesutronic.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:46 -04:00
Robin Getz
837ec2d56c 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>
2009-09-16 21:31:44 -04:00
Robin Getz
3f871feaf3 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>
2009-09-16 21:31:43 -04:00
Mike Frysinger
53e18df745 Blackfin: add support for common FDPIC ptrace requests
The FDPIC arches support a standard set of ptrace requests so rather than
define our own custom API, hook up those requests for common code to
leverage.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:42 -04:00
Mike Frysinger
81c969a8bc Blackfin: push SRAM locks down into related ifdefs
Rather than defining the locks and initializing them all the time, only do
so when we actually need them (i.e. the SRAM regions exist).  This avoids
dead data and code bloat during runtime.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:41 -04:00
Sonic Zhang
9c954f8941 Blackfin: unify duplicated SMP checks in L2 cache kconfig
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:59 -04:00
Michael Hennerich
204844ebd0 Blackfin: rename PCF8574 driver config
The "TWI_KEYPAD" driver was renamed to "INPUT_PCF8574", so update the
defines in the board resources accordingly.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:57 -04:00
Robin Getz
2f812c0bd5 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>
2009-09-16 21:28:54 -04:00
Mike Frysinger
a769094061 Blackfin: fix module reloc handling for all memory regions
The current module relocation code has spotty handling wrt different
memory regions (like L1 instruction).  Rather than try to fix each
little spot, use the new common memory functions to greatly simplify
everything and make sure it is always correct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:52 -04:00
Mike Frysinger
459fec9073 Blackfin: cleanup module section checking
The current module section handling code has a lot of verbose statements
copied and pasted throughout which makes it pretty hard to digest at a
glance.  By unifying all of these up front, it is a lot easier to quickly
get an idea of what is actually going on.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:51 -04:00
Mike Frysinger
70deca9f9c Blackfin: convert malloc()/memset() to zalloc() in module code
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:49 -04:00
Mike Frysinger
dc6b1ac984 Blackfin: cleanup printk() usage in module code
Convert all printk() statements to use the common pr_xxx() funcs and use
the new pr_fmt() function to standardize all of the output.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:48 -04:00
Robin Getz
22532578ee Blackfin: reject outdated/unused/wrong relocation types
All kernel modules are required to be built with -mlong-calls and thus
should not generate any of these relocations.  If they do, it means the
module has not been compiled properly, so rather than trying to handle
them (and running into random run time errors) just error out on module
load to force the module to be compiled correctly.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:46 -04:00
Mike Frysinger
c014e15a2f Blackfin: convert ptrace to new memory functions
Now that we have a Blackfin memory function to figure out how to properly
access the different regions, drop the custom memory range checks in our
ptrace code and use that.  It makes the code nicer and fixes bugs where
the ptrace logic wasn't handling all the different regions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:45 -04:00
Mike Frysinger
18070dd669 Blackfin: cleanup traps decode_address() a bit
Unify the address display to shrink the code, and add missing decoding of
a few special Blackfin-specific regions (L1 ROM and MMRs).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:43 -04:00
Philippe Gerum
f4e129399c Blackfin: inline I-pipe bypass code in ret_from_exception
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:42 -04:00
Philippe Gerum
9ea7770fdb Blackfin: sanitize manual control of IPEND[4]
Cleanup is performed in two ways:

- remove extraneous updates of IPEND[4] w/ CONFIG_IPIPE,
  and document remaining use.

- substitute pop-reg-from-stack instructions with plain SP fixups in
  all save-RETI-then-discard patterns.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:40 -04:00
Philippe Gerum
7a7967dc1b Blackfin: document __ipipe_call_irqtail
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:38 -04:00
Philippe Gerum
70f4720232 Blackfin: allow EVT5 to preempt irqtail prologue (CONFIG_DEBUG_HWERR)
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:37 -04:00
Philippe Gerum
fc9afb997f Blackfin: reuse evt_evt14 handler to perform irqtail epilogue
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:36 -04:00
Philippe Gerum
9703a73c98 Blackfin: use generic name for EVT14 handler
The purpose of the EVT14 handler may depend on whether CONFIG_IPIPE is
enabled, albeit its implementation can be the same in both cases. When
the interrupt pipeline is enabled, EVT14 can be used to raise the core
priority level for the running code; when CONFIG_IPIPE is off, EVT14
can be used to lower this level before running softirq handlers.

Rename evt14_softirq to evt_evt14 to pick an identifier that fits
both, which allows to reuse the same vector setup code as well.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:34 -04:00
Philippe Gerum
6b8019c85e Blackfin: allow high priority domains to preempt schedule_tail()
ret_from_fork is always entered with hw interrupts off, which prevents
real-time domains to preempt the Linux kernel during part of the
initial context switch to the new task, which could in turn raise the
worst-case latency figures.

To avoid this, stall the root domain stage in the interrupt pipeline
to keep the scheduling tail code free from Linux-handled IRQs, then
enable hardware interrupts again.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:33 -04:00
Philippe Gerum
bc569f1a77 Blackfin: export show_stack() to modules
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:32 -04:00
Philippe Gerum
b9c7eb498d Blackfin: fix misnomer of some I-pipe helpers
__ipipe_{stall, unstall}_root_raw() identifiers may leave the reader
under the impression that only the virtual state is affected by these
operations, which is wrong. Pick names following the convention used
throughout the interrupt pipeline code.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:30 -04:00
Philippe Gerum
d8ca63955a Blackfin: checkpatch --file arch/blackfin/kernel/ipipe.c
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:29 -04:00
Robin Getz
ae4f073c40 Blackfin: make EVT3->EVT5 lowering more robust wrt IPEND[4]
We handle many exceptions at EVT5 (hardware error level) so that we can
catch exceptions in our exception handling code.  Today - if the global
interrupt enable bit (IPEND[4]) is set (interrupts disabled) our trap
handling code goes into a infinite loop, since we need interrupts to be
on to defer things to EVT5.

Normal kernel code should not trigger this for any reason as IPEND[4] gets
cleared early (when doing an interrupt context save) and the kernel stack
there should be sane (or something much worse is happening in the system).
But there have been a few times where this has happened, so this change
makes sure we dump a proper crash message even when things have gone south.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:28:28 -04:00