openwrt/staging/blogic.git
15 years agoBlackfin arch: Modify bfin_sir device configuration to board file
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Modify bfin_sir device configuration to board file

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: update header to match new location
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: update header to match new location

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix typo (channel)
Jean Delvare [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Fix typo (channel)

Channnel -> Channel

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Replace C version of 64 bit multiply with hand optimized assembly
Bernd Schmidt [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Replace C version of 64 bit multiply with hand optimized assembly

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove unused members of dma_channel struct
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: remove unused members of dma_channel struct

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Update some inline assembly, tweak some register constraints
Robin Getz [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Update some inline assembly, tweak some register constraints

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: stub out pgprot_noncached() like other people seem to do on nommu
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: stub out pgprot_noncached() like other people seem to do on nommu

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix incorrect use of loose in cpufreq.c
Nick Andrew [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
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>
15 years agoBlackfin arch: add __must_check markings to our user functions like other arches
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: add __must_check markings to our user functions like other arches

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: dma code: cannot simply OR the ndsize
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: dma code: cannot simply OR the ndsize

cannot simply OR the ndsize ... need to clear out the old value first

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add bfin_read_MDMA_S0_CONFIG compat for dma_memcpy
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: add bfin_read_MDMA_S0_CONFIG compat for dma_memcpy

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bug - crashes in tcp_v4_send_reset
Bernd Schmidt [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: fix bug - crashes in tcp_v4_send_reset

Michael says that some bugs are crashes in tcp_v4_send_reset.
There's a missing clobber of "CC" in our checksum assembly
statement; fixing this makes the generated code look much saner.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: push cache flushing up to dma_memcpy
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: push cache flushing up to dma_memcpy

push cache flushing up to dma_memcpy() so that we call the flush
functions just once

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: request_dma() returns 0 on success, not channel
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: request_dma() returns 0 on success, not channel

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: desc_ptr is a pointer, so declare it as such
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: desc_ptr is a pointer, so declare it as such

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: move most dma functions into static inlines
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: move most dma functions into static inlines

move most dma functions into static inlines since they are vastly 1
liners that get/set a value in a structure

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: dma header file: strip down includes to only necessary ones
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: dma header file: strip down includes to only necessary ones

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: set_dma_callback: do not store .irq
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: set_dma_callback: do not store .irq

set_dma_callback: do not store .irq if request_irq() failed so we dont
turn around and attempt to free_irq() it later on in free_dma()

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: drop irq_callback from struct dma_channel
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: drop irq_callback from struct dma_channel

the irq member already serves the same purpose

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: drop custom dma_interrupt_t and just use irq_handler_t
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: drop custom dma_interrupt_t and just use irq_handler_t

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: include linux/mm.h since we use PAGE_ALIGN and such
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: include linux/mm.h since we use PAGE_ALIGN and such

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: enable DEBUG_KERNEL for ADI boards
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: enable DEBUG_KERNEL for ADI boards

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rewrite dma_memcpy() and dma in/out functions
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: rewrite dma_memcpy() and dma in/out functions

- unify all dma in/out functions (takes ~35 lines of code now)
- unify dma_memcpy with dma in/out functions (1 place that touches MDMA0
  registers)
- add support for 32bit transfers
- cleanup dma_memcpy code to be much more readable
- irqs are disabled only while programming MDMA registers rather than
  the entire transaction

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: check pointers in safe_dma_memcpy
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: check pointers in safe_dma_memcpy

Check pointers in safe_dma_memcpy as this is the entry point for user-space code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: push bf561 PERIPHERAL_MAP oddity into bf561-specific code
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: push bf561 PERIPHERAL_MAP oddity into bf561-specific code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: ADP5588 QWERTY I2C Keyboard Input device driver
Michael Hennerich [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch:  ADP5588 QWERTY I2C Keyboard Input device driver

Add BF537-STAMP platform Support

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: cleanup - use scm for changelog, not file headers
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: cleanup - use scm for changelog, not file headers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Add basic irq stack checking for Blackfin
Robin Getz [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: Add basic irq stack checking for Blackfin

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Set TWI/I2C Clock to 100kHz
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Set TWI/I2C Clock to 100kHz

All slaves I'm aware of should support at least 100kHz

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: dma_memcpy() - do not return NULL when transferring a multiple of 65k
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: dma_memcpy() - do not return NULL when transferring a multiple of 65k

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Add BF537-STAMP platform support for ENC28J60 SPI Ethernet MAC
Michael Hennerich [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: Add BF537-STAMP platform support for ENC28J60 SPI Ethernet MAC

This device shouldn't be considered as an alternative to a Memory Mapped
or built-in Ethernet MAC. Throughput is slow (~460kByte/s) while generating
a very high system load (~60%).

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove #if check on L2_LENGTH
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: remove #if check on L2_LENGTH

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Retire old spi_mmc driver
Yi Li [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Retire old spi_mmc driver

Turn to use the mmc_spi driver in mainline kernel.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add mmc_spi support to BF537-STAMP
Yi Li [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: add mmc_spi support to BF537-STAMP

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rename MAX_BLACKFIN_DMA_CHANNEL to MAX_DMA_CHANNELS to match everyone...
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
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>
15 years agoBlackfin arch: fix bug - kernel build fails with undefined reference to pm_overflow_h...
Michael Hennerich [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: fix bug - kernel build fails with undefined reference to pm_overflow_handler

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Use reads/writes instead of ins/outs directly
Sonic Zhang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Use reads/writes instead of ins/outs directly

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add const to some function prototype and struct dma_channel
Michael McTernan [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: add const to some function prototype and struct dma_channel

Signed-off-by: Michael McTernan <mmcternan@airvana.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: implement support for /proc/dma
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: implement support for /proc/dma

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: smp patch cleanup from LKML review
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: smp patch cleanup from LKML review

1. Use inline get_l1_... functions instead of macro
2. Fix compile issue about smp barrier functions

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: get oprofile work for user space
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
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>
15 years agoBlackfin arch: fix bugs in linker script when using upstream binutils
Bernd Schmidt [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: fix bugs in linker script when using upstream binutils

Fix a few problems I discovered when building a kernel with upstream CVS
binutils.

We have to add the NOTES macro to our linker script, since a kernel
built with --build-id is otherwise unable to boot.  Last time NOTES was
added, it broke things, but the definition of the macro has changed not
to rely on parts of the linker script that aren't present on Blackfin.

I also noticed that _l2_lma_start does not point into the kernel image,
but rather somewhere in L1/L2 space, which seems unintended.  Also, when
the L2 section was added to the linker script, the part following it which
computes then length of the init section was not updated.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Add document about bfin-gpio
Graf Yang [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: Add document about bfin-gpio

Add document about bfin-gpio when requesting a pin
both as gpio and gpio interrupt.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Remove all traces of the relocation stack
Bernd Schmidt [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: Remove all traces of the relocation stack

Remove all traces of the relocation stack.  It's been removed from
binutils for years now.

Add a sanity overflow check to pcrel24 relocations to catch modules that
were built without -mlong-calls.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: tweak the BUG_ON() check to allow for equal values
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: tweak the BUG_ON() check to allow for equal values

Tweak the BUG_ON() check to allow for equal values since the way pos is
handled ... it is always indexed and post incremented

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: gpio.h split into machine subfolders like already done for BF54x
Michael Hennerich [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: gpio.h split into machine subfolders like already done for BF54x

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: cleanup the header file comments
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: cleanup the header file comments

use scm changelog rather than comment blocks in files

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: rewrite cplbinfo to use seq files
Mike Frysinger [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: rewrite cplbinfo to use seq files

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bugs and unify BFIN_KERNEL_CLOCK option
Michael Hennerich [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
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>
15 years agoBlackfin arch: add simple-gpio resources to all adi/tinyboards
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: add simple-gpio resources to all adi/tinyboards

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Allow a gpio pin be requested both as gpio and irq.
Graf Yang [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
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>
15 years agoBlackfin arch: do not allow L2 to be cached on BF561 SMP
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: do not allow L2 to be cached on BF561 SMP

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: delete now unused "cclk" member of blackfin_cpudata
Mike Frysinger [Wed, 7 Jan 2009 15:14:38 +0000 (23:14 +0800)]
Blackfin arch: delete now unused "cclk" member of blackfin_cpudata

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Fix bug - change cpufreq doesn't take effect on bf537 now
Michael Hennerich [Tue, 18 Nov 2008 10:04:31 +0000 (18:04 +0800)]
Blackfin arch: Fix bug - change cpufreq doesn't take effect on bf537 now

CCLK is variable: get current CCLK in show_cpuinfo

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Request the gpio resource when making it as an irq pin, avoiding overr...
Graf Yang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: Add code to free gpio when shutdown irq
Graf Yang [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: fix bug - reboot fails on BF527
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: add ANOMALY_05000435 to our headers
Mike Frysinger [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add ANOMALY_05000435 to our headers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: only define HI/LO macros for assembly files
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: only define HI/LO macros for assembly files

Only define HI/LO macros for assembly files since some common C files
use HI/LO as variable names

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: add BUG_ON() checks to make sure we dont overflow the cplb tables
Mike Frysinger [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add BUG_ON() checks to make sure we dont overflow the cplb tables

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: make ROM_BASE depend on ROMKERNEL
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: make ROM_BASE depend on ROMKERNEL

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: noMMU CPLB lookup tables can be in L1 SRAM
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: noMMU CPLB lookup tables can be in L1 SRAM

 - unify duplicate page_size_table definitions
 - make sure it is placed alongside the other cplb switching code

Pointed-out-by: Michael McTernan <mmcternan@airvana.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: do not include init sections in the kernel lock down as it gets releas...
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: do not include init sections in the kernel lock down as it gets released afterwards

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: change return value
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: change return value

change return of close_cplbtab() and fill_cplbtab() to void since we
always return 0 and nowhere do we check this

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: remove pointless define IN_KERNEL
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove pointless define IN_KERNEL

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: unify cplbinfo files
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: unify cplbinfo files

Merge MPU and noMPU version of CPLB info code to one common version.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: define BASE_BAUD like everyone else
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: define BASE_BAUD like everyone else

define BASE_BAUD like everyone else, althought it is only used by 8250

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: remove BFIN_DMA_5XX option
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove BFIN_DMA_5XX option

Do not make BFIN_DMA_5XX optional since a large portion of our code
relies on dma functions existing

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: add mmiowb() as some drivers expect
Mike Frysinger [Tue, 18 Nov 2008 09:48:21 +0000 (17:48 +0800)]
Blackfin arch: add mmiowb() as some drivers expect

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Fix BUG - Kernel does not link when CONFIG_CPU_FREQ_STAT=m
Michael Hennerich [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Fix BUG - Kernel does not link when CONFIG_CPU_FREQ_STAT=m

to reproduce:
$ make BF537-STAMP_defconfig
$ make menuconfig
  CPU Frequency scaling  --->
    [*] CPU Frequency scaling
    <M>   CPU frequency translation statistics
$ make

arch/blackfin/mach-common/built-in.o: In function `bfin_target':
arch/blackfin/mach-common/cpufreq.c:(.text+0xf1e): undefined reference to
`cpufreq_frequency_table_target'
arch/blackfin/mach-common/built-in.o: In function `bfin_verify_speed':
arch/blackfin/mach-common/cpufreq.c:(.text+0x1056): undefined reference to
`cpufreq_frequency_table_verify'
arch/blackfin/mach-common/built-in.o: In function `__bfin_cpu_init':
arch/blackfin/mach-common/cpufreq.c:(.init.text+0x554): undefined reference to
`cpufreq_frequency_table_get_attr'
arch/blackfin/mach-common/cpufreq.c:(.init.text+0x56a): undefined reference to
`cpufreq_frequency_table_cpuinfo'
arch/blackfin/mach-common/built-in.o: In function `sys_call_table':
(.data+0x83c): undefined reference to
`cpufreq_freq_attr_scaling_available_freqs'
make: *** [.tmp_vmlinux1] Error 1

Blackfin wants CPU_FREQ_TABLE

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: rename cache_lock() to bfin_cache_lock()
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: use generic xor.h
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: use generic xor.h

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: cleanup the time.c code
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: cleanup the time.c code

 - make the code a bit more readable
 - kill of warnings/ifdef mess a bit

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: fix building with CONFIG_DEBUG_DOUBLEFAULT
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: do not define decode_instruction if hwtrace is turned off
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: do not define decode_instruction if hwtrace is turned off

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: rename irq_flags to bfin_irq_flags
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: move out irq related functions
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move out irq related functions

move irq related functions into asm/irq.h and out of the mondo asm/system.h

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: move the PORT registers down
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move the PORT registers down

Move the PORT registers down as well since they may utilize
asm/system.h code

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: introduce an IM_MEM macro to kgdb
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: introduce an IM_MEM macro to kgdb

create an IN_MEM() macro to simplify comparing an address in an on-chip
region of memory and make things readable

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: fix off-by-one errors on end of memory range
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix off-by-one errors on end of memory range

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: delete unused vars and add parenthesis to fixup warnings
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: delete unused vars and add parenthesis to fixup warnings

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: move fixed code into init section
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move fixed code into init section

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: remove superficial check on blackfin watchdog
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove superficial check on blackfin watchdog

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: set PM_WAKEUP_GPIO_NUMBER default to 2 for everyone
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: set PM_WAKEUP_GPIO_NUMBER default to 2 for everyone

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: delay PLL_CTL/VR_CTL wrappers
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: delay PLL_CTL/VR_CTL wrappers

Delay PLL_CTL/VR_CTL wrappers as much as possible to avoid
the inter-dependency problems with cdef and common headers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: dont export ack_bad_irq as no one else does
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: dont export ack_bad_irq as no one else does

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: move SIC_SYSIRQ() to the one file that actually uses it
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: move ack_bad_irq() prototype to hardirq.h to match other arches
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: move ack_bad_irq() prototype to hardirq.h to match other arches

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: delete old comments and NO_IRQ define
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: delete old comments and NO_IRQ define

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: overlay thread.usp over PT_USP
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: overlay thread.usp over PT_USP

overlay thread.usp over PT_USP when getting the whole regfile to
match PT_USP behavior

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: rewrite blackfin_invalidate_entire_dcache function
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
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>
16 years agoBlackfin arch: make ADI board names consistent
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: make ADI board names consistent

Cc: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Fix bug - hardware breakpoint doesn't always work in kgdb
Sonic Zhang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Fix bug - hardware breakpoint doesn't always work in kgdb

Hardware breakpoint doesn't always work in kgdb. It works at the first
two times, but if you repeatedly trigger that hardware breakpoint, it
would slip over that point once in two times.

Fix it by always setting hw bp skip to 0. gdb does skip after hw bp trap.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: fix unused warning for some blackfin derivatives
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix unused warning for some blackfin derivatives

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Use GPIO_BANKSIZE macro to replace const number 16 for GPIO_BANK_NUM...
Bryan Wu [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Use GPIO_BANKSIZE macro to replace const number 16 for GPIO_BANK_NUM macro caculating

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: some other misc code
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: SMP supporting patchset: some other misc 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 some other misc code

Singed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: SMP supporting patchset: Blackfin kernel and memory management code
Graf Yang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: SMP supporting patchset: Blackfin kernel and memory management 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 kernel and memory management code

Singed-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>
16 years agoBlackfin arch: SMP supporting patchset: Blackfin CPLB related code
Graf Yang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: SMP supporting patchset: Blackfin CPLB related 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 CPLB related code

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: SMP supporting patchset: Blackfin header files and machine common...
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
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>
15 years agoBlackfin arch: SMP supporting patchset: BF561 related code
Graf Yang [Wed, 7 Jan 2009 15:14:39 +0000 (23:14 +0800)]
Blackfin arch: SMP supporting patchset: BF561 related 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 BF561 kernel code

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>