dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

143 Commits

Author SHA1 Message Date
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