Commit Graph

1026 Commits (6941c3a0aabb6ad4167827360f384e9daed7dd7f)

Author SHA1 Message Date
Sonic Zhang cc92b870a7 Blackfin arch: disable pthread stack check for SMP at runtime
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:38 +08:00
Mike Frysinger 459249aa2d Blackfin arch: merge kgdb test code using common CONFIG_KGDB_TESTS
[Grace Pan <grace.pan@analog.com>: Add case for kgdb test in l1 and l2]

Signed-off-by: Grace Pan <grace.pan@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
Mike Frysinger 6651ece9e2 Blackfin arch: update anomaly headers to match latest sheets
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 a0dcfb16e6 Blackfin arch: Fix bug - IrDA SIR build failed for BF533.
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
Robin Getz 7419a327f6 Blackfin arch: panic when running on a chip rev below what we are compiled for
If we are running on a chip revision below what we are compiled for,
there will be missing anomaly workarounds, and a panic is inevitable. Do
is sooner, rather than later, so people don't look for bugs that already
have workarounds (that they turned off).

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Bryan Wu fea05dacda Blackfin arch: Fix bug - wrong endpoint number and dma channels of USB
Blackfin MUSB has 8 endpoints including ep0 and 8 dma channels not 7

Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Mike Frysinger 508808cda6 Blackfin arch: do not allow people to pass in a diff clkin_hz value
do not allow people to pass in a diff clkin_hz value when
reprogramming clocks -- it is too late currently

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
Mike Frysinger 7f1e2f98bd Blackfin arch: allow clkin_hz to be specified on the command line
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
Mike Frysinger 275123e8ab Blackfin arch: show_cpuinfo - consolidate ugly casts
rather than use *(unsigned int *)v everywhere, do this once with a local
cpu_num variable

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 a1ee74ca09 Blackfin arch: add __init markings to Blackfin timer init functions
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
Mike Frysinger 71f5ca35d5 Blackfin arch: add get_dma_config() func to match set_dma_config()
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
Mike Frysinger 4ce1873634 Blackfin arch: add volatile markings to DMA MMRs
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
Michael Hennerich 6a6be3d188 Blackfin arch: Make the interrupt edge and polarity type configurable based on IORESOURCE_BITS
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Graf Yang 3d7c603ed4 Blackfin arch: Remove wasted SIR header files
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
Graf Yang 42bd8bcb2f 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>
2009-01-07 23:14:39 +08:00
Graf Yang c0948d3316 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>
2009-01-07 23:14:39 +08:00
Jean Delvare 90fdc13568 Blackfin arch: Fix typo (channel)
Channnel -> Channel

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:39 +08:00
Bernd Schmidt 71ae92f51a 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 36478585d9 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>
2009-01-07 23:14:39 +08:00
Robin Getz 26fe19f760 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 2377feb4ce 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>
2009-01-07 23:14:39 +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 75aca61b1f 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger d41e800999 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger b649839192 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>
2009-01-07 23:14:38 +08:00
Bernd Schmidt b13120d23b 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 7ad883a94d 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 596b565bd1 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 6ab729d82f 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger 9c417a4329 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 4c1ed6a57b 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger 8f1cc23388 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 9b011407d6 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger 68532bdac3 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger 259fea42e6 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 98946574a4 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger dd3dd384df 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 49946e7329 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger c9e0020d49 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>
2009-01-07 23:14:39 +08:00
Michael Hennerich 51ed9ad7d2 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger b03f203986 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>
2009-01-07 23:14:38 +08:00
Robin Getz a45d575f53 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger f768a0eb90 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger bdc17a1bf2 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>
2009-01-07 23:14:38 +08:00
Michael Hennerich 85a192e92d 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger 8f362f8d7b 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>
2009-01-07 23:14:39 +08:00
Yi Li 0c720da35c 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>
2009-01-07 23:14:39 +08:00
Yi Li f79ea4cba0 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>
2009-01-07 23:14:38 +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
Michael Hennerich 3e706cfcce 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>
2009-01-07 23:14:39 +08:00
Sonic Zhang 55e247e715 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>
2009-01-07 23:14:39 +08:00
Michael McTernan 99532fd2a0 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>
2009-01-07 23:14:38 +08:00
Graf Yang d642a8ad55 Blackfin arch: implement support for /proc/dma
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
Graf Yang dbc895f955 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>
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
Bernd Schmidt 6f985294f7 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>
2009-01-07 23:14:39 +08:00
Bernd Schmidt d1a853057a 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 2eddbadaeb 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>
2009-01-07 23:14:39 +08:00
Michael Hennerich 983e101605 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 16daaf59c9 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>
2009-01-07 23:14:38 +08:00
Mike Frysinger a024d41bfe 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>
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
Mike Frysinger c97618d3b7 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>
2009-01-07 23:14:38 +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
Mike Frysinger 94106e0fb6 Blackfin arch: do not allow L2 to be cached on BF561 SMP
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07 23:14:38 +08:00
Mike Frysinger 1ea9925553 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>
2009-01-07 23:14:38 +08:00
Harvey Harrison cfcac2f7dd blackfin: introduce asm/swab.h
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 18:10:28 -08:00
Matthew Wilcox ea43546750 atomic_t: unify all arch definitions
The atomic_t type cannot currently be used in some header files because it
would create an include loop with asm/atomic.h.  Move the type definition
to linux/types.h to break the loop.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:10 -08:00
Frederik Schwarzer 025dfdafe7 trivial: fix then -> than typos in comments and documentation
- (better, more, bigger ...) then -> (...) than

Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-06 11:28:06 +01:00
Linus Torvalds 7d3b56ba37 Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
  x86: setup_per_cpu_areas() cleanup
  cpumask: fix compile error when CONFIG_NR_CPUS is not defined
  cpumask: use alloc_cpumask_var_node where appropriate
  cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
  x86: use cpumask_var_t in acpi/boot.c
  x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
  sched: put back some stack hog changes that were undone in kernel/sched.c
  x86: enable cpus display of kernel_max and offlined cpus
  ia64: cpumask fix for is_affinity_mask_valid()
  cpumask: convert RCU implementations, fix
  xtensa: define __fls
  mn10300: define __fls
  m32r: define __fls
  h8300: define __fls
  frv: define __fls
  cris: define __fls
  cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
  cpumask: zero extra bits in alloc_cpumask_var_node
  cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
  cpumask: convert mm/
  ...
2009-01-03 12:04:39 -08:00
Linus Torvalds b840d79631 Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
  x86: export vector_used_by_percpu_irq
  x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  sched: nominate preferred wakeup cpu, fix
  x86: fix lguest used_vectors breakage, -v2
  x86: fix warning in arch/x86/kernel/io_apic.c
  sched: fix warning in kernel/sched.c
  sched: move test_sd_parent() to an SMP section of sched.h
  sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
  sched: activate active load balancing in new idle cpus
  sched: bias task wakeups to preferred semi-idle packages
  sched: nominate preferred wakeup cpu
  sched: favour lower logical cpu number for sched_mc balance
  sched: framework for sched_mc/smt_power_savings=N
  sched: convert BALANCE_FOR_xx_POWER to inline functions
  x86: use possible_cpus=NUM to extend the possible cpus allowed
  x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
  x86: update io_apic.c to the new cpumask code
  x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
  x86: xen: use smp_call_function_many()
  x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
  ...

Fixed up trivial conflict in kernel/time/tick-sched.c manually
2009-01-02 11:44:09 -08:00
Rusty Russell ccec25ff69 blackfin: define __fls
Like fls, but can't be handed 0 and returns the bit number.

(I broke this arch in linux-next by using __fls in generic code).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2009-01-01 10:12:17 +10:30
Al Viro 18d8fda7c3 take init_fs to saner place
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-31 18:07:42 -05:00
Rusty Russell 33edcf133b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-12-30 08:02:35 +10:30
Rusty Russell 320ab2b0b1 cpumask: convert struct clock_event_device to cpumask pointers.
Impact: change calling convention of existing clock_event APIs

struct clock_event_timer's cpumask field gets changed to take pointer,
as does the ->broadcast function.

Another single-patch change.  For safety, we BUG_ON() in
clockevents_register_device() if it's not set.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
2008-12-13 21:20:26 +10:30
Mike Frysinger fd54f50284 kbuild: use KECHO convenience echo
Convert a few echos in the build system to new $(kecho) so we get correct
output according to build verbosity.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[sam: added kecho in a few more places for O=... builds]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03 21:32:01 +01:00
Michael Hennerich a5f0717e51 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>
2008-11-18 18:04:31 +08:00
Mike Frysinger 62273eeb6a Blackfin arch: fix a broken define in dma-mapping
dma_mapping_error is an actual function, so fix broken define with a
real inline stub

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 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 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
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 94b28211d8 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>
2008-11-18 17:48:21 +08:00
Mike Frysinger b5e986c468 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger dce783c5e4 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>
2008-11-18 17:48:21 +08:00
Mike Frysinger 8624991187 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger cb15e57cc7 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 05a717fbc8 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 3831638260 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 4c5b8a648f Blackfin arch: remove pointless define IN_KERNEL
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 ff4c02e4be 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 4db557d4ae 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 55e359a825 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger ecdbfc1ac1 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>
2008-11-18 17:48:21 +08:00
Michael Hennerich 5ad2ca5fbb 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>
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 a3765e0cd5 Blackfin arch: use generic xor.h
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 1b047d8cc5 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>
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 36f649a55a 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>
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 b60705765a 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger b1271d31a5 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 31fba6e752 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 89c6c139a5 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 09c1db922d 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger bda07aac9d 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger f8c1b3909c 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger d1a3336e2f 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 53442e1cbd 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger b94919e2da 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>
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 a638735b3d 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 34616c8bbd 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 8a86176c4a 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>
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
Mike Frysinger fe85cad25e 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>
2008-11-18 17:48:22 +08:00
Sonic Zhang 8a0e9acfd1 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>
2008-11-18 17:48:22 +08:00
Mike Frysinger 0b82e27444 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>
2008-11-18 17:48:22 +08:00
Bryan Wu 2e8ca59147 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>
2008-11-18 17:48:22 +08:00
Graf Yang 46fa5eecec 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>
2009-01-07 23:14:39 +08:00
Graf Yang 8f65873e47 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>
2008-11-18 17:48:22 +08:00
Graf Yang b8a989893c 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>
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
Graf Yang c51b4488cd 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>
2009-01-07 23:14:39 +08:00
Mike Frysinger 2de73e71c2 Blackfin arch: use physmap in board resources rather than legacy config method
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
Michael Hennerich a4f0b32c33 Blackfin arch: Convert Blackfin GPIO driver to use common gpiolib/gpiochip infrastructure
- This patch adds support for ARCH_WANT_OPTIONAL_GPIOLIB.
 - It may be changed in future to ARCH_REQUIRE_GPIOLIB.
 - Change GPIO_BANK_NUM use DIV_ROUND_UP( , ) macro

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
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
Yi Li 4989dbc17f Blackfin arch: workaround bug: spi_mmc driver working in dma mode may hang the system
Disable spi_mmc DMA by default.

Signed-off-by: Yi Li <yi.li@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 10a88a2be5 Blackfin arch: enable i2c_bfin_twi0_device in cm_bf548 board
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
Michael Hennerich 3f37569044 Blackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code.
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 5ff294fa00 Blackfin arch: fixup get_user() macros
- to avoid uninitialized errors
 - make invalid sizes a build error

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 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
Michael Hennerich 88a8078b3b Blackfin arch: don't assume a specific SPI flash part - take whatever you probe
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 57a55077dd Blackfin arch: update defconfig file for all boards
- do not bother generating deprecated /sys files by default now since
   mdev does not need it
 - Don't built-in char sport driver and build it as a module in defconfig
 - disable CONFIG_DEVKMEM by default
 - enable spi flash driver on boards that have one
 - switch config to the NAND platfrom driver rather than the bfin async one
 - 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>
2008-11-18 17:48:22 +08:00
Michael Hennerich abeb21efb1 Blackfin arch: remove most BUG_ON channel checks
keep BUG_ON in DMA request, free and set_dma_callback.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-29 11:06:03 +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
Michael Hennerich e04f9f427b Blackfin arch: Remove useless SSYNCs in DMA code
Tons of SSYNC operation will impact the DMA performance

Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 18:18:47 +08:00
Michael Hennerich a2ba8b1998 Blackfin arch: lookup channel2irq() only once
Add irq to struct dma_channel lookup channel2irq() only once,
since channel2irq() is fairly large on some Blackfin derivatives.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 18:19:29 +08:00
Mike Frysinger 3529e0414b Blackfin arch: update anomaly lists to match latest sheets
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 16:22:41 +08:00
Mike Frysinger 6a87d29bc6 Blackfin arch: refine the gpio check
refine the gpio check in peripheral_request() so that it only
checks pins that can be used as both GPIO and a peripheral

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 16:16:29 +08:00
Jie Zhang b2c2f30388 Blackfin arch: fix bug - shared lib function in L2 failed be called
Allow user space to access L2 SRAM.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 15:57:49 +08:00
Mike Frysinger a2d03a1d8e Blackfin arch: unify port_setup() to reduce arch differences
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 15:53:37 +08:00
Mike Frysinger 6c7ec0ec93 Blackfin arch: unify peripheral_request() to reduce arch differences
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 15:49:59 +08:00
Mike Frysinger 1f7d373f47 Blackfin arch: fix cmp_label() so it doesnt incorrectly accept partial leading matches
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 15:47:11 +08:00
Mike Frysinger 27228b2e4c Blackfin arch: unify check_gpio() to reduce arch differences
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 15:45:42 +08:00
Mike Frysinger 72edff8dd4 Blackfin arch: fix incorrect limit check for bf54x check_gpio
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 15:42:13 +08:00
Mike Frysinger 588ba8199e Blackfin arch: remove unused local define
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 14:38:51 +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
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 2563265bdb Blackfin arch: put quotes around error to silence a ton of warnings from gcc-4.3
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 14:11:45 +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 da986b9fff Blackfin arch: dont warn when running a kernel on the oldest supported silicon
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 13:58:15 +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
Robin Getz 4ee1c45337 Blackfin arch: Fix typo when adding CONFIG_DEBUG_VERBOSE
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 11:36:11 +08:00
Mike Frysinger d292b00031 Blackfin arch: drop redundant BFIN_DMA_5XX depends
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 11:15:36 +08:00
Mike Frysinger 0f8befa1d1 Blackfin arch: drop unused exports and comment remaining exports
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-28 11:12:17 +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 3b1f26a50a Blackfin arch: don't copy bss when copying L1
when copying L1 regions, go to the start of bss rather
than end since we have code to zero it out already

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-27 18:21:43 +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 6776cf4476 Blackfin arch: fix bug - Fail to boot jffs2 kernel for BF561 with SMP patch
only if the cplb block overlapped with kernel area, this cplb need be locked

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-27 18:12:53 +08:00
Tim Pepper 6a0bfff44e Blackfin arch: handle case of d_path() returning error in decode_address()
d_path() can return an error.  Most of its callers do something or other to
make up something sane in that case.  Do similar for blackfin's
decode_address() call to d_path().

Signed-off-by: Tim Pepper <lnxninja@linux.vnet.ibm.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-27 12:18:36 +08:00
Matt Helsley dc52ddc0e6 container freezer: implement freezer cgroup subsystem
This patch implements a new freezer subsystem in the control groups
framework.  It provides a way to stop and resume execution of all tasks in
a cgroup by writing in the cgroup filesystem.

The freezer subsystem in the container filesystem defines a file named
freezer.state.  Writing "FROZEN" to the state file will freeze all tasks
in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
the cgroup.  Reading will return the current state.

* Examples of usage :

   # mkdir /containers/freezer
   # mount -t cgroup -ofreezer freezer  /containers
   # mkdir /containers/0
   # echo $some_pid > /containers/0/tasks

to get status of the freezer subsystem :

   # cat /containers/0/freezer.state
   RUNNING

to freeze all tasks in the container :

   # echo FROZEN > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   FREEZING
   # cat /containers/0/freezer.state
   FROZEN

to unfreeze all tasks in the container :

   # echo RUNNING > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   RUNNING

This is the basic mechanism which should do the right thing for user space
task in a simple scenario.

It's important to note that freezing can be incomplete.  In that case we
return EBUSY.  This means that some tasks in the cgroup are busy doing
something that prevents us from completely freezing the cgroup at this
time.  After EBUSY, the cgroup will remain partially frozen -- reflected
by freezer.state reporting "FREEZING" when read.  The state will remain
"FREEZING" until one of these things happens:

	1) Userspace cancels the freezing operation by writing "RUNNING" to
		the freezer.state file
	2) Userspace retries the freezing operation by writing "FROZEN" to
		the freezer.state file (writing "FREEZING" is not legal
		and returns EIO)
	3) The tasks that blocked the cgroup from entering the "FROZEN"
		state disappear from the cgroup's set of tasks.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: export thaw_process]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:34 -07: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
Linus Torvalds e4856a70cf Merge branch 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY
2008-10-16 12:32:52 -07:00
Mike Frysinger 1390da4ee7 Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:55:41 +08:00
Mike Frysinger ed061b7ac8 Blackfin arch: disable CONFIG_HW_RANDOM and CONFIG_DAB in defconfig files
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:54:43 +08:00
Mike Frysinger 8fb4f8f056 Blackfin arch: update cache flush prototypes with argument names to make them less mysterious
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:39:12 +08:00
Mike Frysinger 04be80ef0b Blackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header where it belongs
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:33:53 +08:00
Mike Frysinger a92946bc6a Blackfin arch: use the new bfin_addr_dcachable() function
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:25:34 +08:00
Robin Getz 9bebeff98e Blackfin arch: fix bug - build kernel failed at head.S when reprogram clock on all platforms
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:05:28 +08: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
Michael Hennerich f51501551e Blackfin arch: update AD7879 platform resources in board file
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 23:23:18 +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
Bryan Wu 121e598f5d Blackfin arch: add read/write IO accessor functions to Blackfin
This is to kill some compiling warning on DM9000 netdev driver.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-16 22:31:56 +08:00
Martin Schwidefsky 0b59268285 [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY
The SET_PERSONALITY macro is always called with a second argument of 0.
Remove the ibcs argument and the various tests to set the PER_SVR4
personality.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-10-16 15:40:05 +02: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
Linus Torvalds 54cebc68c8 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: (60 commits)
  Blackfin arch: make sure we include the fix for SPORT hysteresis when reprogramming clocks
  Blackfin arch: Fix bogus str_ident check in gpio code
  Blackfin arch: AD7879 Touchscreen driver
  Blackfin arch: introducing bfin_addr_dcachable
  Blackfin arch: fix a typo in comments
  Blackfin arch: Remove useless head file
  Blackfin arch: make sure L2 start and length are always defined (fixes building on BF542)
  Blackfin arch: use the Blackfin on-chip ROM to do software reset when possible
  Blackfin arch: update anomaly headers to match the latest sheet
  Blackfin arch: bfin_reset() is an internal reboot function ... everyone should go through machine_restart()
  Blackfin arch: print out error/warning if you are running on the incorrect CPU type
  Blackfin arch: remove non-bf54x ifdef logic since this file is only compiled on bf54x parts
  Blackfin arch: update board defconfigs
  Blackfin arch: Add optional verbose debug
  Blackfin arch: emulate a TTY over the EMUDAT/JTAG interface
  Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)
  Blackfin arch: ptrace - fix off-by-one check on end of memory regions
  Blackfin arch: Enable framebuffer support for the BF526-EZkit TFT LCD display
  Blackfin arch: flash memory map and dm9000 resources updating
  Blackfin arch: early prink code still use uart core console functions to parse and set configure option string
  ...
2008-10-13 10:08:43 -07:00
Linus Torvalds 244dc4e54b Merge git://git.infradead.org/users/dwmw2/random-2.6
* git://git.infradead.org/users/dwmw2/random-2.6:
  Fix autoloading of MacBook Pro backlight driver.
  Automatic MODULE_ALIAS() for DMI match tables.
  Remove asm/a.out.h files for all architectures without a.out support.
  Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT
  Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
  S390: Update comments about why we don't use <asm-generic/statfs.h>
  SPARC: Use <asm-generic/statfs.h>
  PowerPC: Use <asm-generic/statfs.h>
  PARISC: Use <asm-generic/statfs.h>
  x86_64: Use <asm-generic/statfs.h>
  IA64: Use <asm-generic/statfs.h>
  ARM: Use <asm-generic/statfs.h>
  Make <asm-generic/statfs.h> suitable for 64-bit platforms.
  Define and use PCI_DEVICE_ID_MARVELL_88ALP01_CCIC for CAFÉ camera driver
  [MTD] [NAND] Define and use PCI_DEVICE_ID_MARVELL_88ALP01_NAND for CAFÉ
  Use PCI_DEVICE_ID_88ALP01 for CAFÉ chip, rather than PCI_DEVICE_ID_CAFE.
  EFS: Don't set f_fsid in statfs().
2008-10-13 09:59:14 -07:00
Sonic Zhang ab2375f2fe Blackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped interrupts in PIO mode
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13 09:51:38 -07:00
Graf Yang b3ef5aba64 Blackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UART
We now use the sir_dev/irtty_sir/uart/bfin_serial drivers framework
to monitor the TX status.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13 09:51:38 -07:00
Mike Frysinger c9607ecc6e Blackfin Serial Driver: move common variables out of serial headers and into the serial driver
move common variables out of serial headers and into the serial driver and
rename "nr_ports" to "nr_active_ports" so as to easily differentiate
between BFIN_UART_NR_PORTS (the # of available) and nr_ports (the # of enabled)

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13 09:51:38 -07:00
Sonic Zhang deffc6edac Blackfin arch: fix bug - some serial header files set RTS to an input when they should all be outputs
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 17:42:12 +08:00
Robin Getz 71de1f8a63 Blackfin arch: make sure we include the fix for SPORT hysteresis when reprogramming clocks
As pointed out by Appalayagari Sreedhar, make sure we include the fix
for SPORT hysteresis when reprogramming clocks.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 11:37:34 +08:00
Michael Hennerich e9fae189ca Blackfin arch: Fix bogus str_ident check in gpio code
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 11:35:22 +08:00
Michael Hennerich 46aa04f9b6 Blackfin arch: AD7879 Touchscreen driver
Add AD7879 Touchscreen driver to the device structures

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 11:30:17 +08:00
Vitja Makarov 58c35bd31f Blackfin arch: introducing bfin_addr_dcachable
This patch introduces bfin_addr_dcachable() predicate, that simply tests is
address in cachable region or not.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 15:23:56 +08:00
Bryan Wu 3094c981f2 Blackfin arch: fix a typo in comments
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 21:22:01 +08:00
Graf Yang fecc8d6d56 Blackfin arch: Remove useless head file
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 21:23:29 +08:00
Mike Frysinger ad5dd97743 Blackfin arch: make sure L2 start and length are always defined (fixes building on BF542)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 21:17:11 +08:00
Mike Frysinger cdbf4c3c5f Blackfin arch: use the Blackfin on-chip ROM to do software reset when possible
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 11:33:43 +08:00
Mike Frysinger 4e8086d65b Blackfin arch: update anomaly headers to match the latest sheet
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 21:07:55 +08:00
Mike Frysinger 9a6f5ae1f1 Blackfin arch: bfin_reset() is an internal reboot function ... everyone should go through machine_restart()
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 18:57:21 +08:00
Robin Getz e482cad241 Blackfin arch: print out error/warning if you are running on the incorrect CPU type
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 18:21:45 +08:00
Mike Frysinger 6d0b8c993d Blackfin arch: remove non-bf54x ifdef logic since this file is only compiled on bf54x parts
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 18:05:02 +08:00
Mike Frysinger f5623a3cf2 Blackfin arch: update board defconfigs
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 17:51:15 +08:00
Robin Getz 9f06c38fb2 Blackfin arch: Add optional verbose debug
Add optional verbose debug - which when turned off, quiets down
userspace errors. Saves ~8k of code/data for production systems

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 18:13:21 +08:00
Mike Frysinger a88c71e436 Blackfin arch: emulate a TTY over the EMUDAT/JTAG interface
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 17:37:52 +08:00
Mike Frysinger 3c08f1d122 Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 17:12:51 +08:00
Mike Frysinger d207a8c768 Blackfin arch: ptrace - fix off-by-one check on end of memory regions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-10 17:26:57 +08:00
Michael Hennerich 2043f3f731 Blackfin arch: Enable framebuffer support for the BF526-EZkit TFT LCD display
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 14:46:30 +08:00
Javier Herrero 45138439e1 Blackfin arch: flash memory map and dm9000 resources updating
Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 18:06:47 +08:00
Sonic Zhang 0cfbb3234c Blackfin arch: early prink code still use uart core console functions to parse and set configure option string
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 17:39:37 +08:00
Mike Frysinger 0c0497c257 Blackfin arch: Move all the silicon rev handling to one place
Move all the silicon rev handling to one place (Kconfig) and
make sure we warn if you are running on silicon that has not been tested on

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 17:32:28 +08:00
Mike Frysinger 664d0403f9 Blackfin arch: fix end address for parallel flash and increase kernel partition size to 4meg
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 17:28:36 +08:00
Mike Frysinger 6c3fc69a17 Blackfin arch: avoid using actual config name in comment
avoid using actual config name in comment as a text search
is done to see what files need to be rebuilt

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 17:13:39 +08: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
Graf Yang 55f2feae3a Blackfin arch: correct icache size in show_cpuinfo(), let c_start() return proper pointer
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 15:37:47 +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
Mike Frysinger f5a817e3f7 Blackfin arch: ptrace - make sure PT_ORIG_R0 and PT_ORIG_P0 offsets are declared
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 15:22:56 +08:00
Mike Frysinger cb4c173d94 Blackfin arch: use existing ptrace_disable() func to clear TRACE_BITS and create the opposite ptrace_enable()
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 15:21:05 +08:00
Mike Frysinger d3ab3a62f5 Blackfin arch: ptrace - cleanup debug messages and style
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 15:19:50 +08:00
Mike Frysinger dabaad5b90 Blackfin arch: fix bug -- PTRACE_PEEKDATA does not seem to work which breaks umoven() in strace
Don't add arbitrary offset when peeking at data

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 15:17:36 +08:00
Graf Yang dd4354fa51 Blackfin arch: fix define error in BF561 memory map macros
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 14:17:47 +08:00
Sonic Zhang f099f39acf Blackfin arch: Make L2 SRAM cacheable
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 14:11:57 +08:00
Sonic Zhang 8606801b03 Blackfin arch: flags of UART3 mem resource is missing
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 13:55:33 +08:00
Sonic Zhang 27707d3e43 Blackfin arch: Fix bug - kernel build with config kernel debugging with remote gdb fails
Add some comment and fix duplicated VEC_EXCPT02

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 14:04:41 +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
Mike Frysinger 49f7253cc9 Blackfin arch: add support for BF52x-0.2, BF533-0.6, and BF54x-0.2
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 12:06:27 +08:00
Mike Frysinger 46ce0d9a36 Blackfin arch: fix default silicon rev selection so it works for all supported parts
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 12:05:31 +08:00
Mike Frysinger cd88b4dca8 Blackfin arch: BF561 is supported, no longer a work in progress
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 12:03:22 +08:00
Robin Getz 202d7bd95c Blackfin arch: Make sure we program the correct values in only when necessary for MUSB driver
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 11:59:46 +08:00
Michael Hennerich 3343c1d448 Blackfin arch: Fix BUG: anomaly_threshold is used with ANOMALY_05000363
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-09 11:11:11 +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
Mike Frysinger 7eb2c23f60 Blackfin arch: fix merge errors during 2.6.26 upgrade
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 17:39:02 +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
Robin Getz 5e95320f9f Blackfin arch: rename blackfin_sram.c to sram-alloc.c
rename blackfin_sram.c to sram-alloc.c (we know it is a blackfin file,
since it is in arch/blackfin) - and there is no "driver" code in there,
it is just an allocator/deallocator for L1 and L2 sram.

Also fix a problem that checkpatch pointed out

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 17:22:49 +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
Graf Yang ca87b7ad00 Blackfin arch: add CONFIG_APP_STACKS_L1 to enable or disable putting kernel stacks in L1
use CONFIG_APP_STACKS_L1 to enable or disable putting kernel stacks in L1,
default is enabled, SMP kernel need turn it off

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 17:30:01 +08:00
Robin Getz 7d98c881ee Blackfin arch: Make sure we protect except 2 properly, and print out memory properly
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 16:29:01 +08:00
Mike Frysinger 74c04503d7 Blackfin arch: mark local gpio_error() as static
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 16:13:17 +08:00
Mike Frysinger fffe53bee7 Blackfin arch: fix bug - sometimes there is no response to the hitting key in uboot for bf561-ezkit when running with 50mhz SCLK
use 10 delays rather than 7

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 14:46:09 +08:00
Robin Getz 5c64e0d510 Blackfin arch: Better error handling of unknown exceptions
Better error handling of unknown exceptions, allows userspace to do a
EXCPT n instruction for a not installed exception handler, and the
kernel doesn't crash (like it use to before this).

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 14:43:47 +08:00
Michael Hennerich aca5e4aac8 Blackfin arch: add BF54x / BF52x Rotary Input device driver platform resource to board file
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 14:27:59 +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
Bernd Schmidt 5d2e321306 Blackfin arch: fixing bug - under IRQ stress, running applications may wrongly trigger an ICPLB miss and be killed
Disable IRQs while frobbing the CPLB registers, to avoid accessing the
data in current_rwx_mask while it isn't covered by CPLBs.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-07 16:27:01 +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
Mike Frysinger f4585a0847 Blackfin arch: only include asm/cplb.h when it is truly used
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 14:45:21 +08:00
Mike Frysinger 1ffb9bef23 Blackfin arch: add note about newer ezkits using PB4 for AD7877 instead of PJ11
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-07 16:06:27 +08:00
Michael Hennerich 8cc7117e7c Blackfin arch: Add new board support for ADZS-BF526-EZ-BRD
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-13 14:45:06 +08:00
Bryan Wu 31f3d4a317 Blackfin arch: add dma mapping stub for musb driver port
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-09-22 20:23:55 +08:00
Bryan Wu 50041acbe4 Blackfin arch: use new platform data interface of musb to replace old one
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-10-08 13:39:40 +08:00
Adrian Bunk 9d5a9e7465 Remove asm/a.out.h files for all architectures without a.out support.
This patch also includes the required removal of (unused) inclusion of
<asm/a.out.h> <linux/a.out.h>'s in the arch/ code for these
architectures.

[dwmw2: updated for 2.6.27-rc]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-06 19:30:24 +01: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
Vegard Nossum 226a6ec311 Blackfin arch: sram: use 'unsigned long' for irqflags
Using just 'unsigned' will make flags an unsigned int. While this is
arguably not an error on blackfin where sizeof(int) == sizeof(long),
the patch is still justified on the grounds of principle.

The patch was generated using the Coccinelle semantic patch framework.

Cc: Julia Lawall <julia@diku.dk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-28 17:28:46 +08:00
Adrian Bunk a95ca3b2b9 Blackfin arch: let PCI depend on BROKEN
AFAIR there exists blackfin hardware with PCI support, but the support
currently in the kernel fails to build starting with:

...
  CC      drivers/pci/probe.o
probe.c: In function 'pci_scan_slot':
probe.c:1056: error: implicit declaration of function 'pcibios_scan_all_fns'
make[3]: *** [drivers/pci/probe.o] Error 1

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-27 10:55:05 +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
Sonic Zhang 225f7e1eb5 Blackfin arch: Fix bug - when to rmmod the L1_module, it stucks and then reboot the board.
Fix this by correcting the wrong pointer

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-25 18:00:45 +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
Michael Hennerich ceac2651e9 Blackfin arch: Add MTD Partitions for MTD_DATAFLASH, increase max SPI SCLK
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-25 17:39:11 +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
Mike Frysinger c991dd92ab Blackfin arch: use %pF when printing out the double fault address so we get symbol names
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 14:57:26 +08:00
Benjamin Matthews 130de7cebe Blackfin arch: add support for the BlackStamp board
Signed-off-by: Benjamin Matthews <bmat@lle.rochester.edu>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 14:55:54 +08:00
Robin Getz 251383c7c5 Blackfin arch: Allow ins functions to have a low latency version
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 15:12:55 +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 9216bbc838 Blackfin arch: mark some functions as __init as they are only called from __init functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-14 14:35:20 +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
Robin Getz d3d0ac23a3 Blackfin arch: Fix bug - when expanding the trace buffer, it does not print out the decoded instruction.
as pointed out by Michael McTernan in the forums, when expanding
the trace buffer, it does not print out the decoded instruction.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:49:27 +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 07aa7be570 Blackfin arch: convert L2 defines to be the same as the L1 defines
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-13 16:16:11 +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 7e64acabfd Blackfin arch: move async memory programming into common setup_arch() as the banks dont really need to be setup fully as early as head.S
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-06 17:17:10 +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
Mike Frysinger fe5aeb9302 Blackfin arch: use symbolic IRQ_PF define rather than hardcoded
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 18:29:56 +08:00
Mike Frysinger 908089118d Blackfin arch: remove pata resources from generic board
these are highly board specific, so putting into generic doesnt make much sense

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 18:41:20 +08:00
Mike Frysinger b9da3b9240 Blackfin arch: add support for board tcm-bf537
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-13 15:49:35 +08:00
Mike Frysinger 8ea8949733 Blackfin arch: add board resources for parallel flash on cm-bf537
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 18:14:44 +08:00
Robin Getz aa58297763 Blackfin arch: be consistant with parition names, and ensure the bus is identified
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-05 17:47:29 +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
Linus Torvalds 7f268a2ba7 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: (30 commits)
  Blackfin arch: If we double fault, rather than hang forever, reset
  Blackfin arch: When icache is off, make sure people know it
  Blackfin arch: Fix bug - skip single step in high priority interrupt handler instead of disabling all interrupts in single step debugging.
  Blackfin arch: cache the values of vco/sclk/cclk as the overhead of doing so (~24 bytes) is worth avoiding the software mult/div routines
  Blackfin arch: fix bug - IMDMA is not type struct dma_register
  Blackfin arch: check the EXTBANKS field of the DDRCTL1 register to see if we are using both memory banks
  Blackfin arch: Apply Bluetechnix CM-BF527 board support patch
  Blackfin arch: Add unwinding for stack info, and a little more detail on trace buffer
  Blackfin arch: Add ISP1760 board resources to BF548-EZKIT
  Blackfin arch: fix bug - detect 0.1 silicon revision BF527-EZKIT as 0.0 version
  Blackfin arch: add missing IORESOURCE_MEM flags to UART3
  Blackfin arch: Add return value check in bfin_sir_probe(), remove SSYNC().
  Blackfin arch:  Extend sram malloc to handle L2 SRAM.
  Blackfin arch: Remove useless config option.
  Blackfin arch:  change L1 malloc to base on slab cache and lists.
  Blackfin arch: use local labels and ENDPROC() markings
  Blackfin arch: Do not need this dualcore test module in kernel.
  Blackfin arch: Allow ptrace to peek and poke application data in L1 data SRAM.
  Blackfin arch: Add ANOMALY_05000368 workaround
  Blackfin arch: Functional power management support
  ...
2008-07-26 13:23:17 -07:00
Johannes Weiner a2e9c44337 blackfin: use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version.

This also removes the following redundant information display:

	- free pages, printed by show_free_areas()
	- pages in swapcache, printed by show_swap_cache_info()

where show_mem() calls show_free_areas(), which calls
show_swap_cache_info().

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26 12:00:10 -07:00
Robin Getz 2d2009806d Blackfin arch: If we double fault, rather than hang forever, reset
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 19:41:40 +08:00
Robin Getz 9de3a0b697 Blackfin arch: When icache is off, make sure people know it
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 19:39:19 +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 3a2521fa75 Blackfin arch: cache the values of vco/sclk/cclk as the overhead of doing so (~24 bytes) is worth avoiding the software mult/div routines
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 18:52:56 +08:00
Michael Hennerich 377d43e7d0 Blackfin arch: fix bug - IMDMA is not type struct dma_register
TEMP Workaround - avoid access to PERIPHERAL_MAP

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 18:28:03 +08:00
Mike Frysinger b1b154e503 Blackfin arch: check the EXTBANKS field of the DDRCTL1 register to see if we are using both memory banks
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 18:02:05 +08:00
Linus Torvalds ecc8b655b3 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  nohz: adjust tick_nohz_stop_sched_tick() call of s390 as well
  nohz: prevent tick stop outside of the idle loop
2008-07-24 12:55:01 -07:00
Johannes Berg a81792f668 remove mention of CONFIG_KMOD from documentation
Also includes a few Kconfig files (xtensa, blackfin)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
2008-07-22 19:24:29 +10:00
Michael Hennerich 9db144fe89 Blackfin arch: Apply Bluetechnix CM-BF527 board support patch
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-19 17:16:07 +08:00
Robin Getz f09630bff5 Blackfin arch: Add unwinding for stack info, and a little more detail on trace buffer
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 19:45:46 +08:00
Michael Hennerich 0a6304a951 Blackfin arch: Add ISP1760 board resources to BF548-EZKIT
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-26 16:14:57 +08:00
Mike Frysinger cc2e16bd35 Blackfin arch: add missing IORESOURCE_MEM flags to UART3
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-07-19 16:43:51 +08:00