Commit Graph

1570 Commits

Author SHA1 Message Date
Mike Frysinger
faf3d9ed2b Blackfin: bfin_can.h: add missing VERSION/VERSION2 MMRs
Also document the mailbox (channel) data array layout.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:03 -04:00
Mike Frysinger
5d868212c4 Blackfin: bf538: add missing SIC_RVECT define
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:02 -04:00
Mike Frysinger
39c999697b Blackfin: bf561: rewrite SICA_xxx to just SIC_xxx
This matches all the other Blackfin ports and keep us from having to write
bf561-specific code in many places.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:02 -04:00
Mike Frysinger
9ebcaa47ba Blackfin: bf54x: add missing SIC_RVECT definition
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:01 -04:00
Mike Frysinger
49e00edbb7 Blackfin: H8606: move 8250 irqflags to platform resources
Now that the common 8250 serial driver supports an "irqflags" field,
we don't need to patch in a custom define into the code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:01 -04:00
Mike Frysinger
56b4f07a08 Blackfin: glue XIP/ROM kernel kconfigs
Different arches use different names, so make sure we define both so
common code (like MTD_XIP) "just works".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:00 -04:00
Mike Frysinger
245322082a Blackfin: update sparse flags for latest upstream changes
Mainline version of git merged support for Blackfin parts, but we now
need to propagate the gcc arch define to make it work.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:30:00 -04:00
Mike Frysinger
7696eecf14 Blackfin: coreb: update ioctl numbers
We have to use ioctl numbers that don't collide with common code.
Otherwise, these ones never even get called because the common fs
code swalled all invocations.

Reported-by: Kay Duenzer <kduenzer@maku.eu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:29:59 -04:00
Mike Frysinger
6cf4d0fadc Blackfin: coreb: add gpl module license
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:29:59 -04:00
Bob Liu
97dd505cd6 Blackfin: bf518-ezkit: add ssm2603 codec resources
This board has a SSM2603 codec, so make sure we have the right resources
declared for it.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:29:59 -04:00
Bob Liu
c5b77b450a Blackfin: bf51x/bf52x: fix 16/32bit SPORT MMR helpers
The RX/TX address is always the same regardless of the size of the access.
That means there is no dedicated "16bit" or "32bit" MMR.  Trying to use
these currently leads to compile errors.  So change everything to use the
right MMR define.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:29:58 -04:00
Ashish Gupta
e5c1721894 Blackfin: tll6527m: new board port
Signed-off-by: Ashish Gupta <asg@thelearninglabs.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 16:29:58 -04:00
Mike Frysinger
5cc1c567c1 Blackfin: bf526-ezbrd/bf527-ezkit: add NAND partition for u-boot
Since these boards can boot out of NAND, make sure we give u-boot its
own partition by default to avoid clobbering it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 04:02:02 -04:00
Sonic Zhang
46284cd6bf Blackfin: merge kernel init memory back into main memory region
If the kernel's init section is merged back into the main memory region
during boot (which it should since that is how we've laid out the kernel
linker map), we want to make sure that these aren't counted as independent
regions.  Otherwise, if a large mapping is attempted which starts in the
init region and extends into the main memory region, the access_ok func
will deny it.  This leads to weird messages during runtime like "unable
to map xxx library" from the ldso but upon running the application again,
everything works fine.

So if the address of the end of the init region is the same as the start
of the main memory region, simply enlarge the memory region to include
the init region.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 04:02:01 -04:00
steven miao
05bbec38db Blackfin: gpio: add peripheral group check
Many Blackfin parts group sets of pins into a single functional unit.
This means you cannot use different pins within a group for different
peripherals.  Our resource conflict checking thus far has been limited
to individual pins, so if someone tried to grab a different pin from
the same group, it would be allowed while silently changing the other
pins in the same group.

One common example is the pin set PG12 - PG15 on BF51x parts.  They
may either be used with SPI0 (1st function), or they may be used with
PTP/PWM/AMS3 (3rd function).  Ideally, we'd like to use PG12 - PG14
for SPI0 while using PG15 with AMS3, but the hardware does not permit
this.  In the past, the software would allow the pins to be requested
this way, but ultimately things like the Blackfin SPI driver would
stop working when the hardware rerouted to a different peripheral.

Signed-off-by: steven miao <realmz6@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 04:02:01 -04:00
Mike Frysinger
a71159b96a Blackfin: dma: bf54x: add missing break for SPORT1 TX IRQ
Reported-by: D Binderman <dcb314@hotmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:49:00 -04:00
Sonic Zhang
99a5b2878b Blackfin: add new cacheflush syscall
Flushing caches sometimes requires anomaly workarounds which require
supervisor-only insns.  Normally we don't need to flush caches from
userspace so this isn't a problem, but when gcc generates trampolines
on the stack, we do.

So add a new syscall for gcc to use modeled after the mips version.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:59 -04:00
Mike Frysinger
73775b892e Blackfin: bf548-ezkit: increase u-boot partition size
The BF54x processor has a ton of on-chip peripherals and in order to
support them all, the u-boot image is quite large.  So give it 512KiB
in all bootable flashes to make our lives easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:58 -04:00
steven miao
39d3c1ca1f Blackfin: boards: add example i2c resources for ad525x devices
Signed-off-by: steven miao <realmz6@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:58 -04:00
Michael Hennerich
bedeea6e3b Blackfin: SIC: fix off-by-one error in loop
Make sure we include EMAC_SYSTAT when showing errors.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:57 -04:00
Sonic Zhang
948ca1a788 Blackfin: bf537-stamp: tweak i2c address for ad5280 add-on tftlcd board
The predefined i2c address 0x2c doesn't match the configuration of the
ad5280 PINs AD0 and AD1 on the tftlcd add-on board.  Both AD0 and AD1
are of voltage 3.3V, which means the i2c address should be 0x2F.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:57 -04:00
Mike Frysinger
8060bb6f59 Blackfin: bf51x: enable support for 0.2 silicon
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:56 -04:00
Barry Song
33ded95b1c Blackfin: initial preempt support while returning from interrupt
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:55 -04:00
Robin Getz
c0ab938745 Blackfin: workaround anomaly 05000481 (corruption with ITEST MMRs)
Nothing actually needs to use these MMRs (as direct cache manipulation
is done with the DTEST MMRs), so simply hide the read funcs behind the
anomaly define.  They're generally unusable anyways when this anomaly
is in effect.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:55 -04:00
Mike Frysinger
3d7dc8836a Blackfin: i2c-gpio boards: use GPIO_PF# defines
Rather than use raw numbers for the GPIO pins, use proper GPIO defines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:54 -04:00
Barry Song
41c3e3346a Blackfin: access_ok: permit L1 stack
When apps run with their stack in L1, some system calls might be made
where a buffer is in the stack as an argument.  So make sure the core
Blackfin access code does not reject this memory location.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:54 -04:00
Barry Song
027285e86f Blackfin: bf561-ezkit: add AD1836 codec resources
This board has an AD1836 codec, so make sure we have the right resources
declared for it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:53 -04:00
Barry Song
175671e75c Blackfin: ptrace: enable access to L1 stacks
If an app is placing its stack in L1 scratchpad SRAM, make sure ptrace
is granted access to it so that gdb can do its thing.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:52 -04:00
Mike Frysinger
c5af5451fc Blackfin: boards: fix num_chipselect values for on-chip SPI buses
The num_chipselect field for on-chip Blackfin SPI buses is supposed to
be 1 larger than the number of actual CSs available.  This is because
the hardware starts counting at 1 and not 0.  There is a field for "CS0",
but it is marked as "reserved" everywhere.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:52 -04:00
Michael Hennerich
8effc4a68b Blackfin: ad7160eval: new board port
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:51 -04:00
Sonic Zhang
27e9f0b436 Blackfin: bf537-stamp: re-use regulator framework with ad5398 parts
We don't need our own header and structure to hook up the ad5398 part,
so drop the custom resources for it.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:51 -04:00
Sonic Zhang
1b04cbeabd Blackfin: bf537-stamp: re-use the fixed regulator voltage driver
Rather than write our own ADP switch driver, use the existing fixed
regulator driver and rewrite the platform resources accordingly.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:50 -04:00
Michael Hennerich
2adcf194cb Blackfin: SIC: BF537: change default data/error relative priorities
Some peripherals might generate an error interrupt shortly after the
data interrupt due to the fact that the peripheral isn't serviced fast
enough.  In most cases this isn't a problem and is expected behavior.
This hasn't been a problem on most parts since you simply don't request
the error interrupt (or you leave it disabled while there is an expected
state) and do the peripheral status checking in the data interrupt.

The Blackfin SIC allows people to prioritize data and error interrupts,
and the Blackfin CEC allows interrupts of equal or higher priority to
nest.  The current default settings gives error interrupts a higher
priority than data interrupts.  So if an error occurs while processing
the data interrupt, it will be serviced immediately.

However, the error interrupt on the BF537 SIC cannot be enabled on a
per-peripheral basis.  Once the error interrupt is enabled for one
peripheral, it is automatically enabled for all peripherals.

Therefore lower the default multiplexed error interrupt priority so
most people need not worry themselves with this issue.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:49 -04:00
Michael Hennerich
0891baef7d Blackfin: bf537-stamp: add example IIO resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:49 -04:00
Barry Song
6fbfa0c418 Blackfin: bf537-stamp: use correct spi mode with ad2s90 parts
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:48 -04:00
Cliff Cai
3cbcb1616c Blackfin: bf537-stamp: add example adau1373 i2c resources
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:48 -04:00
Yi Li
a65912ca57 Blackfin: bf537-stamp: add example adav801/3 resources
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:47 -04:00
Barry Song
92b20f7fb2 Blackfin: bf537-stamp: add example ad1937 i2c resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:46 -04:00
Mike Frysinger
67d9963bd7 Blackfin: bf537-stamp: fix NAND resources
The NAND platform driver expects the registers to have a "mem"
resource type rather than "io".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:46 -04:00
Michael Hennerich
9e75894c50 Blackfin: boards: use proper irq flags with isp1362-hcd
With the recent kernel update the isp1362-hcd driver evaluates the
IORESOURCE_IRQ resource flags and requests the irq with the given
polarity/edge settings.  However the ISP1362 config requires low
level/edge interrupts.  Most of the Blackfin boards use some random
flag or no flag at all.  Make all boards use a know good flag
IORESOURCE_IRQ_LOWEDGE.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:45 -04:00
Valentin Yakovenkov
657bb918d9 Blackfin: bf561-acvilon: fix NAND resources
The NAND platform driver expects the registers to have a "mem"
resource type rather than "io".

Signed-off-by: Valentin Yakovenkov <yakovenkov@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:45 -04:00
Michael Hennerich
bf80caf4f1 Blackfin: cm-bf548: add support for Socket CAN
Add platform resources for the on-chip CAN peripheral so we can use it.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:44 -04:00
Barry Song
7ba80063e9 Blackfin: boards: update AD183x resources
Make sure we use the right Kconfig names and platform strings.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:43 -04:00
Barry Song
f9f0e3b1f7 Blackfin: bf537-stamp: update GPIO CS devices
Now that we've rewritten the GPIO CS handling in the Blackfin SPI
peripheral, we need to update the platform resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:43 -04:00
Mike Frysinger
3d6437b35d Blackfin: punt short SPI MMR bit names
Now that the common header defines everything and the SPI drivers are
using it, we can drop these duplicated global namespace polluters.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22 03:48:27 -04:00
Linus Torvalds
e36f561a2c Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-irqflags
* git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-irqflags:
  Fix IRQ flag handling naming
  MIPS: Add missing #inclusions of <linux/irq.h>
  smc91x: Add missing #inclusion of <linux/irq.h>
  Drop a couple of unnecessary asm/system.h inclusions
  SH: Add missing consts to sys_execve() declaration
  Blackfin: Rename IRQ flags handling functions
  Blackfin: Add missing dep to asm/irqflags.h
  Blackfin: Rename DES PC2() symbol to avoid collision
  Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own header
  Blackfin: Split PLL code from mach-specific cdef headers
2010-10-21 14:37:27 -07:00
Mike Frysinger
5e8592dca3 spi/bfin_spi: combine duplicate SPI_CTL read/write logic
While combining things, also switch to the proper SPI bit define names.
This lets us punt the rarely used SPI defines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18 02:49:39 -04:00
Barry Song
d3cc71f71a spi/bfin_spi: redo GPIO CS handling
The common SPI layers take care of detecting CS conflicts and preventing
two devices from claiming the same CS.  This causes problems for the GPIO
CS support we currently have as we are using CS0 to mean "GPIO CS".  But
if we have multiple devices using a GPIO CS, the common SPI layers see
multiple devices using the virtual "CS0" and reject any such attempts.

To make both work, we introduce an offset define.  This represents the
max number of hardware CS values that the SPI peripheral supports.  If
the CS is below this limit, we know we can use the hardware CS.  If it's
above, we treat it as a GPIO CS.  This keeps the CS unique as seen by
the common code and prevents conflicts.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18 02:49:36 -04:00
Mike Frysinger
0d2c6de225 Blackfin: SPI: expand SPI bitmasks
Expand the BIT_CTL defines to use the naming convention of the hardware,
and expand the masks to cover all documented bits.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18 02:49:35 -04:00
Mike Frysinger
201bbc6fd8 spi/bfin_spi: drop custom cs_change_per_word support
As David points out, the cs_change_per_word option isn't standard, nor is
anyone actually using it.  So punt all of the dead code considering it
makes up ~10% of the code size.

Reported-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18 02:49:30 -04:00