Archived
14
0
Fork 0
Commit graph

220 commits

Author SHA1 Message Date
Robin Getz
0004952242 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>
2009-03-05 18:18:49 +08:00
Sonic Zhang
d7ff1a90b2 Blackfin arch: Fix bug - KGDB single step into the middle of a 4 bytes instruction on bf561 after soft bp is hit
Run IFLUSH twice to avoid loading wrong instruction
after invalidating icache and following sequence is met.

1) The one instruction address is cached in the icache.
2) This instruction in SDRAM is changed.
3) IFLASH[P0] is executed only once in lackfin_icache_flush_range().
4) This instruction is executed again, but not the changed new one.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-03-05 18:26:59 +08:00
Mike Frysinger
f7e989ab64 Blackfin arch: make sure people do not set the kernel load address too high
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-03-05 17:33:36 +08:00
Enrik Berkhan
7acab7a9ca Blackfin arch: fix bug - The SPORT_HYS bit is not set for BF561 0.5
IMHO the setting should depend on ANOMALY_05000305 which is about the
availability of the bit, not ANOMALY_05000265 which only describes the
SPORT sensitivity to noise (checked for BF561 only, though).

If that's not true for other BF variants, maybe the definition of
ANOMALY_05000265 for BF561 should be changed to '(1)' instead.

Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-03-05 14:42:30 +08:00
Sonic Zhang
0bf3d93308 Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561-ezkit kernel with smp patch
Free spinlock before call IPI handlers.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>


Header from folded patch 'blackfin_arch__fix_bug_-_kgdb_fails_to_continue_after_setting_breakpoint_on_bf561-ezkit_kernel_with_smp_patch-1':

Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561-ezkit kernel with smp patch

Don't test l1 code in SMP kernel.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-03-05 16:44:53 +08:00
Philippe Gerum
9bd50df6aa Blackfin arch: Update adeos blackfin arch patch to 1.9-00
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-03-04 16:52:38 +08:00
Jie Zhang
3aee91bafe Blackfin arch: fix 2 bugs related to debug
- unable to single step over emuexcpt instruction
 - gdbproxy goes into infinite loop when doing gdb does "next" over
   "emuexcpt"

Don't decrement PC after software breakpoint.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-02-04 16:49:45 +08:00
Graf Yang
9960aa6a07 Blackfin arch: Fix bug - 561 SMP kernel can't boot from jffs2
bss_l2 section is garbage when the data in this section is used by
_bfin_relocate_l1_mem, so move the zero out function ahead.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-02-04 16:49:45 +08:00
Mike Frysinger
be1d8543a8 Blackfin arch: base SIC_IWR# programming on whether the MMR exists
base SIC_IWR# programming on whether the MMR exists
rather than having to maintain another list of processors

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-02-04 16:49:45 +08:00
Robin Getz
e48df47c1a Blackfin arch: Fix URL
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-02-04 16:49:45 +08:00
Michael Hennerich
331693129d Blackfin arch: Fix Bug - Kernel does not boot if re-program clocks
On BF561 EBIU_SDGCTL bit 31 controls the SDRAM external data
path width, typically set 0 for a 32-bit bus width. On other
Blackfin derivatives this bit should be set by default.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-02-04 16:49:45 +08:00
Graf Yang
172e65e778 Blackfin arch: remove hardware PM code, oprofile not use it
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Yi Li
6a01f23033 Blackfin arch: merge adeos blackfin part to arch/blackfin/
[Mike Frysinger <vapier.adi@gmail.com>:
 - handle bf531/bf532/bf534/bf536 variants in ipipe.h
 - cleanup IPIPE logic for bfin_set_irq_handler()
 - cleanup ipipe asm code a bit and add missing ENDPROC()
 - simplify IPIPE code in trap_c
 - unify some of the IPIPE code and fix style
 - simplify DO_IRQ_L1 handling with ipipe code
 - revert IRQ_SW_INT# addition from ipipe merge
 - remove duplicate get_{c,s}clk() prototypes
]

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Bernd Schmidt
dbdf20db53 Blackfin arch: Faster C implementation of no-MPU CPLB handler
This is a mixture ofcMichael McTernan's patch and the existing cplb-mpu code.

We ditch the old cplb-nompu implementation, which is a good example of
why a good algorithm in a HLL is preferrable to a bad algorithm written in
assembly.  Rather than try to construct a table of all posible CPLBs and
search it, we just create a (smaller) table of memory regions and
their attributes.  Some of the data structures are now unified for both
the mpu and nompu cases.  A lot of needless complexity in cplbinit.c is
removed.

Further optimizations:
  * compile cplbmgr.c with a lot of -ffixed-reg options, and omit saving
    these registers on the stack when entering a CPLB exception.
  * lose cli/nop/nop/sti sequences for some workarounds - these don't
  * make
    sense in an exception context

Additional code unification should be possible after this.

[Mike Frysinger <vapier.adi@gmail.com>:
 - convert CPP if statements to C if statements
 - remove redundant statements
 - use a do...while loop rather than a for loop to get slightly better
   optimization and to avoid gcc "may be used uninitialized" warnings ...
   we know that the [id]cplb_nr_bounds variables will never be 0, so this
   is OK
 - the no-mpu code was the last user of MAX_MEM_SIZE and with that rewritten,
   we can punt it
 - add some BUG_ON() checks to make sure we dont overflow the small
   cplb_bounds array
 - add i/d cplb entries for the bootrom because there is functions/data in
   there we want to access
 - we do not need a NULL trailing entry as any time we access the bounds
   arrays, we use the nr_bounds variable
]

Signed-off-by: Michael McTernan <mmcternan@airvana.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:38 +08:00
Nick Andrew
bc39ac6680 Blackfin arch: Fix incorrect use of loose in cpufreq.c
It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Mike Frysinger
211daf9d72 Blackfin arch: rename MAX_BLACKFIN_DMA_CHANNEL to MAX_DMA_CHANNELS to match everyone else
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Graf Yang
f994607a2e 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>
2009-01-07 23:14:39 +08:00
Michael Hennerich
73feb5c09d 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>
2009-01-07 23:14:39 +08:00
Graf Yang
9570ff4af6 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>
2009-01-07 23:14:38 +08:00
Graf Yang
8eb3e3bfd5 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>
2008-11-18 17:48:22 +08:00
Graf Yang
30af6d4904 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>
2008-11-18 17:48:21 +08:00
Mike Frysinger
b7e11293a4 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
9b78442fad 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
33c8691f45 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
4005978424 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
7beb7439ac 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
3c1fbd5184 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>
2008-11-18 17:48:22 +08:00
Graf Yang
6b3087c64a 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>
2009-01-07 23:14:39 +08:00
Michael Hennerich
8d0223744f 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
c6db04a78a 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>
2008-11-18 17:48:22 +08:00
Bryan Wu
397861cd80 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
9f20cf2527 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
c2414bd0b1 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
2cf851137b 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>
2008-10-28 16:34:42 +08:00
Bryan Wu
2f6f4bcdd6 Blackfin arch: add support for Blackfin latest processor family BF51x
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18 17:48:21 +08:00
Graf Yang
efe065a1b3 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>
2008-10-28 14:00:52 +08:00
Mike Frysinger
6ad2b84cf0 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>
2008-10-28 11:03:09 +08:00
Mike Frysinger
fe8015ce25 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>
2008-10-28 11:07:15 +08:00
Michael Hennerich
dc26aec25d 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger
f940260a98 Blackfin arch: unify duplicated bss init code
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-27 18:17:41 +08:00
Graf Yang
4213cb6400 Blackfin arch: fix bug - Turn on DEBUG_DOUBLEFAULT, booting SMP kernel crash
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18 17:48:22 +08:00
Michael Hennerich
a10101d5ff Blackfin arch: fix bug - Cpufreq assumes clocks in kHz and not Hz.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 14:18:29 +08:00
Mike Frysinger
7f6b2e7b1f Blackfin arch: fix bug - kernel build with write back policy fails to be booted up
Make sure IFLUSH is not the last instruction in the hardware loop to avoid
infinite core stall.

The dcache/icache function that only gets used in writeback mode was putting
IFLUSH as the last instruction in the hardware loop ... we know from design
that this may often lead to inifite core stalling, so switch the FLUSH/IFLUSH
order.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 12:29:26 +08:00
Mike Frysinger
39e96c8835 Blackfin arch: fix bug - dmacopy test case fail on all platform
The cache code I added flushes 1 line too little if the start address is
not aligned to the cache size. Cache align the start address so that when
we straddle cache aligns, we get the right count.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18 17:48:22 +08:00
Linus Torvalds
1b821bfb03 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us
  Blackfin arch: disable CONFIG_HW_RANDOM and CONFIG_DAB in defconfig files
  Blackfin arch: update cache flush prototypes with argument names to make them less mysterious
  Blackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header where it belongs
  Blackfin arch: use the new bfin_addr_dcachable() function
  Blackfin arch: fix bug - build kernel failed at head.S when reprogram clock on all platforms
  Blackfin arch: unify/cleanup cache code
  Blackfin arch: update AD7879 platform resources in board file
  Blackfin arch: Zero out bss region in L1/L2 memory.
  Blackfin arch: add read/write IO accessor functions to Blackfin
  Blackfin arch: fix bug - some serial header files set RTS to an input when they should all be outputs
2008-10-16 12:45:08 -07:00
Mike Frysinger
ded963a486 Blackfin arch: unify/cleanup cache code
- to be correct wrt to end ranges
 - to be optimal with a one-instruction hardware loop

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:01:24 +08:00
Graf Yang
b4f5c58fd1 Blackfin arch: Zero out bss region in L1/L2 memory.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 22:50:46 +08:00
Dominik Brodowski
459fc208ab cpufreq: remove policy->governor setting in drivers initialization
As policy->governor is already set to CPUFREQ_DEFAULT_GOVERNOR in the
(always built-in) cpufreq core, we do not need to set it in the drivers.
This fixes the sparc64 allmodconfig build failure.

Also, remove a totally useles setting of ->policy in cpufreq-pxa3xx.c.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-15 16:42:47 -07:00
Robin Getz
1d5ff7e27d Blackfin arch: Fix bug - HW Errors never recover on BF548
The kernel does not properly clear the EBIU Error Master (EBIU_ERRMST) Register
on BF548, which causes the kernel to panic.

We need to make sure that we clear the EBIU_ERRMST (necessary on BF54x)

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 17:06:32 +08:00
Mike Frysinger
47664c1f86 Blackfin arch: give sys_strace proper entry markings
a global _sys_trace will cause the assembler to fail, it should be fixed in toolchain side firstly.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 15:32:18 +08:00
Michael Hennerich
5e9e7687cb Blackfin arch: Fix BUG -- BF533 + 0.5 silicon + MPU + UART PIO -> crash
Apply ANOMALY_05000283 & ANOMALY_05000315
Workaround also to the EXCEPTION path.

Cover evt_ivhw also with ANOMALY_05000315
The Workaround needs to be prior to accesses (either read or write) to
any system MMR.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 12:31:03 +08:00
Graf Yang
bfd15117ae Blackfin arch: Not call generic set_irq_handler() in bfin_gpio_irq_type() due to spinlock recursion
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 18:02:44 +08:00
Robin Getz
9df10281e1 Blackfin arch: Use DTEST rather than DMA to poke at L1 SRAM during exception context
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 18:03:33 +08:00
Graf Yang
5b04f271fe Blackfin arch: Modify some funtion names to more genernal ones
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 17:32:57 +08:00
Graf Yang
763e63c640 Blackfin arch: add a meaningful name for each irqchip
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 17:08:15 +08:00
Sonic Zhang
a5ac012924 Blackfin arch: add supporting for kgdb
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 14:07:19 +08:00
Robin Getz
0c7a6b2135 Blackfin arch: add supporting for double fault debug handling
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 16:27:12 +08:00
Michael Hennerich
d310fb4bb7 Blackfin arch: Fix PM building on BF52x: No ROTWE on BF52x, add USBWE
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-28 17:32:01 +08:00
Bryan Wu
639f657145 Blackfin arch: move include/asm-blackfin header files to arch/blackfin
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-27 10:51:02 +08:00
Mike Frysinger
d70536ec3a Blackfin arch: dont actually need to muck with EMAC_SYSTAT for BF52x for demuxing
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-25 17:37:35 +08:00
Bryan Wu
a4b7b6d7d3 Blackfin arch: hook up some missing new system calls
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 15:40:19 +08:00
Mike Frysinger
7e1e7aed0c Blackfin arch: do not muck with the UART during boot -- let the serial driver worry about it
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 15:15:43 +08:00
Mike Frysinger
95a86b5e51 Blackfin arch: clear EMAC_SYSTAT during IRQ init rather than early head.S as we dont need it setup that early
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 15:05:01 +08:00
Robin Getz
cd8fb8df14 Blackfin arch: Print out doublefault addresses, so debug can occur
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 14:44:33 +08:00
Mike Frysinger
0e06b50dda Blackfin arch: cleanup cache lock code
- remove cheesy read_iloc() function
 - move invalidate_entire_icache function to lock.S
 - export proper prototypes for functions in lock.S
 - only build lock.S when BFIN_ICACHE_LOCK is enabled

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 14:29:57 +08:00
Michael Hennerich
55546ac45d Blackfin arch: workaround SIC_IWR1 reset bug, by keeping MDMA0/1 always enabled in SIC_IWR1.
This way we ensure that reboot succeeds.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-13 17:41:13 +08:00
Michael Hennerich
56f5f59052 Blackfin arch: Fix Bug - System with EMAC driver enabled - Core not idling
- Disable all bits in SIC_IWR unless we are going into a real (DPMC)
   power saving mode. Any Interrupt can wake the core form it's idle state.

 - Remove deep sleep mode as it is not going to be used anywhere:
   We support sleep, sleep deeper and hibernate.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:55:32 +08:00
Mike Frysinger
15b0753689 Blackfin arch: delete unused cache functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-13 16:19:36 +08:00
Mike Frysinger
17e89bcfa1 Blackfin arch: unify the duplicated portions of __start and split mach-specific pieces into _mach_early_start where they will be easier to trim over time
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:23:50 +08:00
Mike Frysinger
67618fd874 Blackfin arch: add asm/thread_info.h for THREAD_SIZE define
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:18:31 +08:00
Mike Frysinger
1375204611 Blackfin arch: make sure the BSS and kernel load address are 4 byte aligned
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:10:57 +08:00
Mike Frysinger
09e1f70e31 Blackfin arch: unify the duplicated _real_start functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:15:27 +08:00
Mike Frysinger
778307d372 Blackfin arch: remove support for Anomaly 05000125 as it doesnt exist on any supported processor/silicon
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:05:20 +08:00
Sonic Zhang
d6a2989136 Blackfin arch: Fix bugs - Make kgdb code apparent to app debugging.
- Skip single step if global interrupt disable bit is set.
 - Extend bernds' patch r4673 to skip single step in any interrupt entry
   that interrupts the code which is under single stepping. Bernds' patch
   only allow user space single stepping.

Singed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 18:28:26 +08:00
Michael Hennerich
4a88d0ce49 Blackfin arch: Functional power management support
Merge VR Regulator Hibernate wakeups into set_irq_wake for internal
interrupts.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 17:38:41 +08:00
Jie Zhang
5400c5aa2d Blackfin arch: Fix bug - This change eliminates impact on application debugging
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 17:33:38 +08:00
Sonic Zhang
0d1cdd7ab6 Blackfin arch: Fix bug - skip single step in high priority interrupt handler instead of disabling all interrupts in single step debugging.
Skip single step if event priority of current instruction is higher than
that of the first instruction, from which gdb starts single step.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 18:54:38 +08:00
Mike Frysinger
1a8caeebe3 Blackfin arch: use local labels and ENDPROC() markings
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-16 17:07:26 +08:00
Michael Hennerich
1efc80b53e Blackfin arch: Functional power management support
Enable: PM_SUSPEND_MEM -> Blackfin Hibernate to SDRAM
This feature requires a special bootloader (u-boot)
supporting return from hibernate.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-19 16:57:32 +08:00
Michael Hennerich
99d95bbd48 Blackfin arch: Remove redundant kernel option
use kernel command line mem and max_mem bootargs to limit
availabe memory instead.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-14 17:04:14 +08:00
Michael Hennerich
1f2d18690f Blackfin arch: Fix Bug - GPIO interrupts not disabled; edge sensitive interrupt hang system.
- Implement irq_chip.enable and irq_chip.disable

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-14 16:31:22 +08:00
Bernd Schmidt
0893f1250f [Blackfin] arch: fix gdb testing regression
When transferring to IRQ5 from an exception, save SYSCFG in memory across the
transfer and clear the trace bit.

When we get a single step exception, check whether we can safely clear the
trace bit in SYSCFG.  We can (and should) clear it after the first instruction
of the interrupt handler; the first insn saves SYSCFG to the stack in all
handlers.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-07 11:41:26 +08:00
Bernd Schmidt
ddb3f00ca0 [Blackfin] arch: In the double fault handler, set up the PT_RETI slot
In the double fault handler, set up the PT_RETI slot so that
we print out the correct return address in the dumping code.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-07 11:41:26 +08:00
Vitja Makarov
1bfb4b21c7 [Blackfin] arch: Support for CPU_FREQ and NOHZ
Singed-off-by: Vitja Makarov <vitja.makarov@gmail.com>
2008-05-07 11:41:26 +08:00
Michael Hennerich
14b03204c8 [Blackfin] arch: Functional power management support: Add CPU and platform voltage scaling support
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-07 11:41:26 +08:00
Michael Hennerich
67dea022d8 [Blackfin] arch: Cleanup Kconfig, fix comment and make sure we exclude CCLK=SCLK for some configurations
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-07 11:41:26 +08:00
Michael Hennerich
e6c91b64dd [Blackfin] arch: Functional power management support: Add support for cpu frequency scaling
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-25 04:58:29 +08:00
Bernd Schmidt
5d750b9e4f [Blackfin] arch: Remove the circular buffering mechanism for exceptions
Remove the circular buffering mechanism for exceptions.  Instead, point RETX
at a safe location from which to fetch three NOPs.

This safe location is now in the fixed code area, and also used for certain
anomaly workarounds, to ensure that user space can find a valid ICPLB when
things are built with CONFIG_MPU.

Also, save I/DCPLB_FAULT_ADDRESS when lowering to level 5, since the hardware
reg is valid only at exception level.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-25 05:02:33 +08:00
Michael Hennerich
affee2b261 [Blackfin] arch: Allow concurrent use of GPIO and GPIO IRQ
The irq setup code no longer calls gpio request and free.
This patch also changes the default gpio_free behavior on Blackfin.
A freed GPIO keeps it's last state, and is not defaulted back to
an input. This is also what all other architectures do.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-24 08:10:10 +08:00
Mike Frysinger
a086ee2268 [Blackfin] arch: detect the memory available in the system on the fly by default
detect the memory available in the system on the fly by default
rather than forcing people to set this manually in the kconfig

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-25 02:04:05 +08:00
Mike Frysinger
16428a4fa9 [Blackfin] arch: make the mask explicit rather than writing a negative number in hex
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-24 05:56:07 +08:00
Harvey Harrison
b85d858b40 [Blackfin] arch: __FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-23 09:39:01 +08:00
Bernd Schmidt
2a0c4fdb66 [Blackfin] arch: fix bug - when using trace buffer with CONFIG_MPU enabled.
There were a couple of problems with the way the trace buffer state
is saved/restored in assembly.  The DEBUG_HWTRACE_SAVE/RESTORE macros
save a value to the stack, which is not immediately obvious; the CPLB
exception code needed changes to load the correct value of the stack
pointer.  The other problem is that the SAVE/RESTORE macros weren't
pushing and popping the value downwards on the stack, but rather moving
it _upwards_, which is of course completely broken.

We also need to make sure there's a matching DEBUG_HWTRACE_RESTORE in
the error case of the CPLB handler.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-23 07:17:34 +08:00
Bryan Wu
2f775dbaa5 [Blackfin] arch: to kill syscalls missing warning by adding new timerfd syscalls
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-06 16:04:58 -07:00
Michael Hennerich
3927819d51 [Blackfin] arch: Fix CONFIG_PM support for BF561
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 14:39:50 +08:00
Michael Hennerich
9253d02041 [Blackfin] arch: Remove DPMC char driver option
Remove redundant/obsolete/dead code from DPMC driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 14:27:28 +08:00
Michael Hennerich
464abc5de6 [Blackfin] arch: Cleanup abd Simplify:
- Simplify init_arch_irq
 - Make code more readable
 - Remove useless SSYNCs
 - Fix comments

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 13:50:20 +08:00
Michael Hennerich
ce3b7bb61c [Blackfin] arch: fix bug - linux-2.6.24 (delayed) disable IRQ feature not functional for handle_simple_irq
Bypass delayed disable feature by implementing chip->disable and
chip->enable.

http://lkml.org/lkml/2008/2/19/115

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 13:48:47 +08:00
Michael Hennerich
fe9ec9b969 [Blackfin] arch: fix bug - Move IWR Enable All to the end of init_arch_irq otherwise it fails
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 12:04:57 +08:00
Michael Hennerich
f1bceb47b3 [Blackfin] arch:Fix BUG [#3876] pfbutton test for BTN3 on bf533 don't show complete info
- Buttons on the BF533-STAMP board are not inverted
 - Fix spurious GPIO Interrupt caused during set irq_type for edge triggered interrupts

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 16:17:52 +08:00