Commit graph

5513 commits

Author SHA1 Message Date
Marek Vasut fc9c1b6fc8 [ARM] pxa/palm: Palm TX, T5, LD suspend-to-mem rework
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:43:29 +08:00
Marek Vasut 37330efd4a [ARM] pxa/palm: Add Palm27x aSoC driver to PalmTE2
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:54 +08:00
Marek Vasut 8768dc9b75 [ARM] pxa/palm: Switch PalmT5, TX, TE2 to GPIO VBUS
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:48 +08:00
Dmitry Eremin-Solenikov 96a9fcaf5d [ARM] pxa/csb726: register ac97 controller
Add a call to pxa_set_ac97_info() to enable the audio support.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:23 +08:00
Dmitry Eremin-Solenikov b860171500 [ARM] pxa/csb726: switch to use smsc911x driver
csb726 used obsolete and not working out-of-tree driver smc911x.
Switch it to use new smsc911x driver.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:17 +08:00
Philipp Zabel dd045445f8 [ARM] pxa: magician_defconfig enable hx4700, asic3 and w100fb
I'm not going to maintain separate defconfigs for magician and hx4700.
This should probably be renamed to htcpxa_defconfig.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:40:43 +08:00
Philipp Zabel d3ca1952e6 [ARM] pxa: add basic support for HP iPAQ hx4700 PDAs
This includes
- IrDA (pxafixp_ir),
- Buttons (gpio-keys),
- ASIC3 IRQ/GPIOs (asic3),
- EGPIOs (htc-egpio),
- ATI Imageon w3220 framebuffer (w100fb),
- Backlight (pwm-backlight),
- StrataFlash (physmap),
- Battery monitor (ds1wm,w1_ds2760,ds2760_battery)
- USB gadget support (pxa27x_udc,gpio_vbus).
- bq24022 battery charger (pda_power,bq24022)
- TSC2046 touchscreen (ads7846)

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:40:31 +08:00
Philipp Zabel 2f1a5bf707 [ARM] pxa/magician: use ARRAY_AND_SIZE for platform_add_devices
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:39:39 +08:00
Philipp Zabel f8f9d5ecff [ARM] pxa/magician: use I2C fast mode
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:39:16 +08:00
Robert Jarzmik 3dbeef231e [ARM] pxa: add vcc_core regulation for cpufreq on pxa2xx
Add voltage regulation capability to pxa2xx cpufreq
driver. The cpufreq will ask for a "vcc_core" regulator to
the regulator framework.

If a regulator is found at probe time, it will be used with
values specified in PXA270 Electrical, Mechanical, and
Thermal Specifications.

If not, it will be assumed for now that frequency change
will work without voltage control. This assumes that the
IPL/SPL installs sane values to an existing voltage
regulator (ie. voltage high enough to support the full
range).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:33:07 +08:00
Jürgen Schindele dd5b94aba7 [ARM] pxa: add additional mfp definitions for pxa320
Signed-off-by: Jürgen Schindele <linux@schindele.name>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-06-05 10:32:55 +08:00
Mike Rapoport d082d36ea8 [ARM] pxa: add ability to set suspend mode
PXA processors have several low-power modes. Currently kernel supports
only one of these modes for PM_SUSPEND_MEM.

This patch adds ability to set desired suspend mode for PXA27x based
machines.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Reviewed-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:48 +08:00
Robert Jarzmik 94c35a6b51 [ARM] pxa: add udc support for pxa3xx
As reported by Aric Blumer, the pxa27x_udc driver does work
with pxa3xx devices. Add support into device files.

Reported-by: Aric Blumer <aric@sdgsystems.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Matt Reimer <mattjreimer@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:34 +08:00
Philipp Zabel a01bd58449 [ARM] pxa: allow IRQ_BOARD_END to be customized and make zylonite to use it
The default value is 16 IRQs. Zylonite needs 32, ASIC3 based boards need 70.

My problem is still that due to the way IRQ_GPIO is hardcoded, ASIC3 based boards
need 70 IRQs starting at IRQ_BOARD_START. If I define ASIC3 IRQs similar to LoCoMo
or SA1111, things break as soon as something selects PXA_HAVE_BOARD_IRQS.
Increasing the default number of board IRQs to 70 instead doesn't seem very nice.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:20 +08:00
Mike Rapoport 46580c0306 [ARM] pxa: update pxa2xx_spi_chip initialization to use .gpio_cs field
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:06 +08:00
Eric Miao a27ba768a1 [ARM] pxa: add PWM devices support for pxa168/910
Signed-off-by: Mingwei Wang <mingwei.wang@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:06 +08:00
Eric Miao 2a55b910e0 [ARM] pxa: add missing IRQ_PXA910_NONE to irqs.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:05 +08:00
Eric Miao 3852ac7113 [ARM] pxa: move pwm.c to common plat-pxa directory
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:04 +08:00
Eric Miao a71ef16327 [ARM] pxa: build pwm.c according to HAVE_PWM instead of PXA_PWM
The PXA_PWM config option is really redundant since the introduction
of HAVE_PWM, replace that with HAVE_PWM to avoid confusion.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:04 +08:00
Eric Miao a757ad8b39 [ARM] pxa: allow PWM ID base number to be specified in pwm_id_table
PWMs on PXA168/910 start at number 1 instead of 0, (i.e. PWM1/2/3/4 instead
of PWM0/1/2/3 on PXA25x/PXA27x/PXA3xx). Allow this number to be specified
in pwm_id_table.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:03 +08:00
Eric Miao 3d2a98cd5e [ARM] pxa: simplify secondary PWM handling and use platform_device_id table
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:02 +08:00
Eric Miao 1a77920e4c [ARM] pxa: add I2C (TWSI) devices to pxa168/pxa910
Signed-off-by: Paul Shen <paul.shen@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:02 +08:00
Eric Miao f0a8370139 [ARM] pxa: move mach/i2c.h to plat/i2c.h
Signed-off-by: Paul Shen <paul.shen@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:01 +08:00
Eric Miao f23d491131 [ARM] pxa: add platform device ID table to pxa i2c driver
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:21:42 +08:00
Linus Walleij 7666c17e2b [ARM] 5535/1: U300 Makefile.boot
The Makefile.boot file for the U300 port. This will compile the
kernel for different ZRELADDR depending on the location of
physical RAM in the chosen configuration.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-04 17:47:36 +01:00
Tony Lindgren c068303920 [ARM] 5536/1: Move clk_add_alias() to arch/arm/common/clkdev.c
This can be used for other arm platforms too as discussed
on the linux-arm-kernel list.

Also check the return value with IS_ERR and return PTR_ERR
as suggested by Russell King.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-04 17:45:43 +01:00
Russell King 754c0f9a95 Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-06-04 17:02:58 +01:00
dmitry pervushin c11c22177a [ARM] 5539/1: Freescale STMP: onboard devices declaration
Define onboard devices for Freescale STMP3xxx boards

Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-04 14:16:45 +01:00
dmitry pervushin a50808b6c4 [ARM] 5538/1: Freescale STMP: 378n registers definition
Add register definitions for Freescale STMP 378n boards

Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-04 14:16:44 +01:00
dmitry pervushin fc3fdfd632 [ARM] 5537/1: Freescale STMP: 37nn registers definition
Add register definitions for Freescale STMP 37nn boards

Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-04 14:16:43 +01:00
Russell King 947ca2e983 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 2009-06-04 12:27:18 +01:00
Daniel Schaeffer 8c032ec337 mxc: Add i.MX27LITE board support
Sascha Hauer wrote:
> On Tue, Jun 02, 2009 at 04:18:42PM -0400, Daniel Schaeffer wrote:
>> Add basic support for the Logic i.MX27LITE board.
>>
>> Signed-off-by: Daniel Schaeffer <daniel.schaeffer@timesys.com>
>
> Besides the comment made by Fabio this looks ok to me.
>
> Sascha
>
>

Fixed issues pointed out by Fabio and Magnus, and rebased to mxc-master head.

Signed-off-by: Daniel Schaeffer <daniel.schaeffer@timesys.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-06-04 09:34:23 +02:00
Philipp Zabel 1257629b07 [ARM] pxa: fix pxa27x_udc default pullup GPIO
Currently, pxa27x_udc tries to use GPIO 0 as D+ pullup if not
explicitly configured. Default to an invalid GPIO (-1) instead.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-04 11:06:25 +08:00
Jonathan Cameron d81e77f041 [ARM] pxa/imote2: fix UCAM sensor board ADC model number
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-04 11:06:25 +08:00
Alexander Clouter a914d4309c [ARM] orion: add hwrng timeriomem hook to TS-78xx
Add hook so that the HW RNG source on the TS-78xx is available.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-06-03 15:29:40 -04:00
Johannes Berg 19d337dff9 rfkill: rewrite
This patch completely rewrites the rfkill core to address
the following deficiencies:

 * all rfkill drivers need to implement polling where necessary
   rather than having one central implementation

 * updating the rfkill state cannot be done from arbitrary
   contexts, forcing drivers to use schedule_work and requiring
   lots of code

 * rfkill drivers need to keep track of soft/hard blocked
   internally -- the core should do this

 * the rfkill API has many unexpected quirks, for example being
   asymmetric wrt. alloc/free and register/unregister

 * rfkill can call back into a driver from within a function the
   driver called -- this is prone to deadlocks and generally
   should be avoided

 * rfkill-input pointlessly is a separate module

 * drivers need to #ifdef rfkill functions (unless they want to
   depend on or select RFKILL) -- rfkill should provide inlines
   that do nothing if it isn't compiled in

 * the rfkill structure is not opaque -- drivers need to initialise
   it correctly (lots of sanity checking code required) -- instead
   force drivers to pass the right variables to rfkill_alloc()

 * the documentation is hard to read because it always assumes the
   reader is completely clueless and contains way TOO MANY CAPS

 * the rfkill code needlessly uses a lot of locks and atomic
   operations in locked sections

 * fix LED trigger to actually change the LED when the radio state
   changes -- this wasn't done before

Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:13 -04:00
Rabin Vincent 6b4bfb87b6 mx[23]: don't put clock lookups in __initdata
Remove the __initdata annotation for the clock lookups, since they will
be needed when loading modules which use clk_get().

Tested-by: Agustín Ferrín Pozuelo <gatoguan-os@yahoo.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-06-03 11:51:06 +02:00
Fabio Estevam aefa1c6e7b MX35: Add basic support for MX35PDK board
Add basic support for MX35PDK board (www.freescale.com/imx35pdk).

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-06-03 11:44:50 +02:00
Russell King 1946d6ef9d [ARM] ARMv7 errata: only apply fixes when running on applicable CPU
Currently, whenever an erratum workaround is enabled, it will be
applied whether or not the erratum is relevent for the CPU.  This
patch changes this - we check the variant and revision fields in the
main ID register to determine which errata to apply.

We also avoid re-applying erratum 460075 if it has already been applied.
Applying this fix in non-secure mode results in the kernel failing to
boot (or even do anything.)

This fixes booting on some ARMv7 based platforms which otherwise
silently fail.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-02 22:36:20 +01:00
Martin Fuzzey eb5f4ca953 [ARM] 5534/1: kmalloc must return a cache line aligned buffer
Define ARCH_KMALLOC_MINALIGN in asm/cache.h
At the request of Russell also move ARCH_SLAB_MINALIGN to this file.

Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-02 22:36:15 +01:00
Daniel Mack 8d9fb9bb89 Support for lilly-1131 modules and baseboards [v2]
On Thu, May 28, 2009 at 08:42:23PM +0200, Sascha Hauer wrote:
> > > Mail-Followup-To: Daniel Mack <daniel@caiaq.de>,
> > > 	linux-arm-kernel@lists.arm.linux.org.uk
> >
> > ... which causes my mutt to only reply to the list.
>
> Ah, ok. /me hacking in muttrc... Does it work now?

Yep :)

> >  	mxc_register_device(&mxc_uart_device0, &uart_pdata);
> > +	mxc_register_device(&mxc_uart_device1, &uart_pdata);
> > +	mxc_register_device(&mxc_uart_device2, &uart_pdata);
>
> What about the RXD3/TXD3 pins?

You're right - I got the IOMUX tables wrong and thought UART0 pins are
selected unconditionally. But as it turns out TXD1/RXD1 is for UART0
(mxc_uart_device0), TXD2/RXD2 for UART1 (mxc_uart_device1) etc.

Below is a new patch.

Thanks,
Daniel

From e7eb5fa0fed09d667a4b2f168fe466e2cc645abb Mon Sep 17 00:00:00 2001
From: Daniel Mack <daniel@caiaq.de>
Date: Wed, 27 May 2009 12:22:51 +0200
Subject: [PATCH] ARM: MX3: add two more UARTs to lilly-1131-db

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-06-02 19:28:36 +02:00
Ingo Molnar 3d58f48ba0 Merge branch 'linus' into irq/numa
Conflicts:
	arch/mips/sibyte/bcm1480/irq.c
	arch/mips/sibyte/sb1250/irq.c

Merge reason: we gathered a few conflicts plus update to latest upstream fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-06-01 21:06:21 +02:00
Russell King c7f7ff179c Merge branch 'smp' into devel 2009-06-01 18:35:26 +01:00
Linus Walleij eb366d4c95 [ARM] 5533/1: Add U300 series defconfig
This adds a defconfig for the U300 series ST-Ericsson mobile
platforms. It will be maintained to enable the maximum set of
drivers so as to provide a good regression testing target for
these platforms.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-01 10:03:10 +01:00
Russell King a22f277bba [ARM] Kconfig: remove 'default n'
Kconfig entries default to n, so there's no need for this to be
explicitly specified.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 15:12:25 +01:00
Russell King ed31b2dfad [ARM] make U300 clk_set_rate() return a _real_ errno
Another stupid instance of "return -1"-ism.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 15:08:11 +01:00
Marek Vašut 5a9d25150c [ARM] 5522/1: PalmLD: IDE support
Support for Palm LifeDrive's internal harddrive.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 14:50:40 +01:00
dmitry pervushin 98f420b23a [ARM] 5532/1: Freescale STMP: register definitions [3/3]
Replace HW_zzz register access macros by regular __raw_readl/__raw_writel calls

Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 13:55:56 +01:00
dmitry pervushin 3f52326a85 [ARM] 5531/1: Freescale STMP: get rid of HW_zzz macros [2/3]
Replace HW_zzz register access macros by regular __raw_readl/__raw_writel calls

Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 13:55:54 +01:00
dmitry pervushin e0421bbe64 [ARM] 5530/1: Freescale STMP: get rid of HW_zzz macros [1/3]
Replace HW_zzz register access macros by regular __raw_readl/__raw_writel calls

Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 13:55:49 +01:00
Nelson Castillo fb6ea32587 [MTD] [NAND] S3C2410: Small colon cleanup
checkpatch would complain with "disable_ecc : 1".

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
[ben-linux@fluff.org: subject cleanup]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-30 17:54:40 +01:00
Catalin Marinas 85d6943af5 Fix the VFP handling on the Feroceon CPU
This CPU generates synchronous VFP exceptions in a non-standard way -
the FPEXC.EX bit set but without the FPSCR.IXE bit being set like in the
VFP subarchitecture 1 or just the FPEXC.DEX bit like in VFP
subarchitecture 2. The main problem is that the faulty instruction
(which needs to be emulated in software) will be restarted several times
(normally until a context switch disables the VFP). This patch ensures
that the VFP exception is treated as synchronous.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Nicolas Pitre <nico@cam.org>
2009-05-30 14:00:18 +01:00
Catalin Marinas 26584853a4 Add core support for ARMv6/v7 big-endian
Starting with ARMv6, the CPUs support the BE-8 variant of big-endian
(byte-invariant). This patch adds the core support:

- setting of the BE-8 mode via the CPSR.E register for both kernel and
  user threads
- big-endian page table walking
- REV used to rotate instructions read from memory during fault
  processing as they are still little-endian format
- Kconfig and Makefile support for BE-8. The --be8 option must be passed
  to the final linking stage to convert the instructions to
  little-endian

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:18 +01:00
Catalin Marinas ee8c957119 RealView: Move the IRQ_* definitions out of the board-*.h files
The IRQ_* macros need to be made visible via the mach/irqs.h file but
without the additional macros defined in the board-*.h files.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:17 +01:00
Catalin Marinas 8c7e65742f arm: Provide _sdata and __bss_stop in the vmlinux.lds.S file
_sdata and __bss_stop are common symbols defined by many architectures
and made available to the kernel via asm-generic/sections.h. Kmemleak
uses these symbols when scanning the data sections.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:17 +01:00
Catalin Marinas 23d1c515d8 ARMv7: Document the PRRR and NMRR registers setting
This patch adds a comment to the proc-v7.S file for the setting of the
PRRR and NMRR registers. It also sets the PRRR[13:12] bits to 0
(corresponding to the reserved TEX[0]CB encoding 110) to be consistent
with the documentation.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:16 +01:00
Catalin Marinas 213fb2a8ee ARMv7: Enable the SWP instruction
The SWP instruction has been deprecated starting with the ARMv6
architecture. On ARMv7 processors with the multiprocessor extensions
(like Cortex-A9), this instruction is disabled by default but it can be
enabled by setting bit 10 in the System Control register. Note that
setting this bit is safe even if the ARMv7 processor has the SWP
instruction enabled by default.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:16 +01:00
Catalin Marinas d71e1352e2 Clear the IT state when invoking a Thumb-2 signal handler
If a process is interrupted during an If-Then block and a signal is
invoked, the ITSTATE bits must be cleared otherwise the handler would
not run correctly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Joseph S. Myers <joseph@codesourcery.com>
2009-05-30 14:00:15 +01:00
Tony Thompson ba3c02636a ARMv7: Mark the PTWs inner WBWA on SMP and WB on UP
There are additional bits to set for the ARMv7 SMP extensions in the
TTBR registers. The IRGN bits order is counter-intuitive but it allows
software built for the ARMv7 base architecture to run on an
implementation with the MP extensions.

Signed-off-by: Tony Thompson <Anthony.Thompson@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:15 +01:00
Catalin Marinas faa7bc51c1 Check whether the TLB operations need broadcasting on SMP systems
ARMv7 SMP hardware can handle the TLB maintenance operations
broadcasting in hardware so that the software can avoid the costly IPIs.
This patch adds the necessary checks (the MMFR3 CPUID register) to avoid
the broadcasting if already supported by the hardware.

(this patch is based on the work done by Tony Thompson @ ARM)

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 14:00:14 +01:00
Catalin Marinas da055eb52e RealView: Toggle one LED per CPU
If CONFIG_LEDS is enabled, it makes more sense to toggle one LED per CPU
in SMP systems rather than a single LED for all the CPUs.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 13:56:16 +01:00
Colin Tuckley ff3042fb6f RealView: Allow CONFIG_LEDS on this platform
Signed-off-by: Colin Tuckley <Colin.Tuckley@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 13:56:13 +01:00
Catalin Marinas af607747de RealView: Allow access to the secure flash memory block on PB1176
This patch adds a Kconfig option for specifying whether Linux will only
be run in secure mode on the RealView PB1176 platform. Enabling it will
make the secure flash memory block (64MB @ 0x3c000000) available to
Linux.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 13:56:13 +01:00
Colin Tuckley 1b504bbe7a RealView: Add support for the RealView/PBX platform
This is a RealView platform supporting core tiles with ARM11MPCore,
Cortex-A8 or Cortex-A9 (multicore) processors. It has support for MMC,
CompactFlash, PCI-E.

Signed-off-by: Colin Tuckley <colin.tuckley@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 13:56:12 +01:00
Catalin Marinas 412b400278 RealView: Allow SMP when the Cortex-A9 tile is enabled for EB
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-05-30 13:56:12 +01:00
Nicolas Pitre c626e3f5ca [ARM] alternative copy_to_user: more precise fallback threshold
Previous size thresholds were guessed from various user space benchmarks
using a kernel with and without the alternative uaccess option.  This
is however not as precise as a kernel based test to measure the real
speed of each method.

This adds a simple test bench to show the time needed for each method.
With this, the optimal size treshold for the alternative implementation
can be determined with more confidence.  It appears that the optimal
threshold for both copy_to_user and clear_user is around 64 bytes. This
is not a surprise knowing that the memcpy and memset implementations
need at least 64 bytes to achieve maximum throughput.

One might suggest that such test be used to determine the optimal
threshold at run time instead, but results are near enough to 64 on
tested targets concerned by this alternative copy_to_user implementation,
so adding some overhead associated with a variable threshold is probably
not worth it for now.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-30 01:10:15 -04:00
Nicolas Pitre cb9dc92c0a [ARM] lower overhead with alternative copy_to_user for small copies
Because the alternate copy_to_user implementation has a higher setup cost
than the standard implementation, the size of the memory area to copy
is tested and the standard implementation invoked instead when that size
is too small.  Still, that test is made after the processor has preserved
a bunch of registers on the stack which have to be reloaded right away
needlessly in that case, causing a measurable performance regression
compared to plain usage of the standard implementation only.

To make the size test overhead negligible, let's factorize it out of
the alternate copy_to_user function where it is clear to the compiler
that no stack frame is needed.  Thanks to CONFIG_ARM_UNWIND allowing
for frame pointers to be disabled and tail call optimization to kick in,
the overhead in the small copy case becomes only 3 assembly instructions.

A similar trick is applied to clear_user as well.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-29 22:38:33 -04:00
Lennert Buytenhek 39ec58f3fe [ARM] alternative copy_to_user/clear_user implementation
This implements {copy_to,clear}_user() by faulting in the userland
pages and then using the regular kernel mem{cpy,set}() to copy the
data (while holding the page table lock).  This is a win if the regular
mem{cpy,set}() implementations are faster than the user copy functions,
which is the case e.g. on Feroceon, where 8-word STMs (which memcpy()
uses under the right conditions) give significantly higher memory write
throughput than a sequence of individual 32bit stores.

Here are numbers for page sized buffers on some Feroceon cores:

 - copy_to_user on Orion5x goes from 51 MB/s to 83 MB/s
 - clear_user on Orion5x goes from 89MB/s to 314MB/s
 - copy_to_user on Kirkwood goes from 240 MB/s to 356 MB/s
 - clear_user on Kirkwood goes from 367 MB/s to 1108 MB/s
 - copy_to_user on Disco-Duo goes from 248 MB/s to 398 MB/s
 - clear_user on Disco-Duo goes from 328 MB/s to 1741 MB/s

Because the setup cost is non negligible, this is worthwhile only if
the amount of data to copy is large enough.  The operation falls back
to the standard implementation when the amount of data is below a certain
threshold. This threshold was determined empirically, however some targets
could benefit from a lower runtime determined value for optimal results
eventually.

In the copy_from_user() case, this technique does not provide any
worthwhile performance gain due to the fact that any kind of read access
allocates the cache and subsequent 32bit loads are just as fast as the
equivalent 8-word LDM.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
2009-05-29 22:36:45 -04:00
Nicolas Pitre a1f98849fd [ARM] allow for alternative __copy_to_user/__clear_user implementations
This allows for optional alternative implementations of __copy_to_user
and __clear_user, with a possible runtime fallback to the standard
version when the alternative provides no gain over that standard
version. This is done by making the standard __copy_to_user into a weak
alias for the symbol __copy_to_user_std.  Same thing for __clear_user.

Those two functions are particularly good candidates to have alternative
implementations for, since they rely on the STRT instruction which has
lower performances than STM instructions on some CPU cores such as
the ARM1176 and Marvell Feroceon.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-29 22:34:45 -04:00
Linus Torvalds 78b170f45b Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] update mach-types
  [ARM] Add cmpxchg support for ARMv6+ systems (v5)
  [ARM] barriers: improve xchg, bitops and atomic SMP barriers
  Gemini: Fix SRAM/ROM location after memory swap
  MAINTAINER: Add F: entries for Gemini and FA526
  [ARM] disable NX support for OABI-supporting kernels
  [ARM] add coherent DMA mask for mv643xx_eth
  [ARM] pxa/palm: fix PalmLD/T5/TX AC97 MFP
  [ARM] pxa: add parameter to clksrc_read() for pxa168/910
  [ARM] pxa: fix the incorrectly defined drive strength macros for pxa{168,910}
  [ARM] Orion: Remove explicit name for platform device resources
  [ARM] Kirkwood: Correct MPP for SATA activity/presence LEDs of QNAP TS-119/TS-219.
  [ARM] pxa/ezx: fix pin configuration for low power mode
  [ARM] pxa/spitz: provide spitz_ohci_exit() that unregisters USB_HOST GPIO
  [ARM] pxa: enable GPIO receivers after configuring pins
  [ARM] pxa: allow gpio_reset drive high during normal work
  [ARM] pxa: save/restore PGSR on suspend/resume.
2009-05-29 16:07:39 -07:00
Sergey Lapin 6d36110e1c [ARM] 5525/1: AFEB9260: fix for MMC support
Proper pin configuration for MMC.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 20:17:40 +01:00
Dmitry Baryshkov 6953e47e11 [ARM] 5524/1: at91sam9g20ek: add i2c eeprom info
Add board information about on-board I2C eeprom AT24C512N at 0x50.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 20:17:39 +01:00
Hartley Sweeten 4070243250 [ARM] 5528/1: ep93xx: add defines for dma clock magic numbers
Update the dma clocks so that the magic numbers are named.

All the dma clocks have an enable bit to turn them on/off as
needed.  Currently these bits are in the code as "magic"
numbers.  This changes all of them to named defines to
improve code readability.

Also, the EP93XX_SYSCON_CLOCK_CONTROL register is improperly
named.  In the EP93xx User's Guide this register is called
PwrCnt (Power Control).  All of the uses of this register
are associated with the clock support so this patch also
modifies the names to match the User's Guide.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 20:16:31 +01:00
Hartley Sweeten 68ee3d83b2 [ARM] 5527/1: ep93xx: core.c: trivial spelling error
Fix trivial spelling error in arch/arm/mach-ep93xx/core.c

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 20:16:30 +01:00
Hartley Sweeten e3a6d01932 [ARM] 5526/1: ep93xx: usb driver cleanup
Cleanup the ohci-ep93xx driver.

1) Use the usb.h dbg() macro instead of pr_debug() so that
   the source filename is prefixed to the message and it is
   terminated with a linefeed.

2) Add error handling for the clk_get() call.

3) Update clkdev support so that the usb clock is matched by
   the dev_id instead of the con_id.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 20:16:29 +01:00
Russell King 949abd84cd Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
Conflicts:
	arch/arm/Makefile
2009-05-29 20:03:43 +01:00
Kevin Hilman b0958aed1e [ARM] 5529/1: davinci: MMC platform support: DMA_32BIT_MASK --> DMA_BIT_MASK(32)
Some DMA_32BIT_MASK usage snuck in with the MMC platform support.
Convert these to the new preferred DMA_BIT_MASK(32).

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 19:59:13 +01:00
Oskar Schirmer c3dc5bec05 flat: fix data sections alignment
The flat loader uses an architecture's flat_stack_align() to align the
stack but assumes word-alignment is enough for the data sections.

However, on the Xtensa S6000 we have registers up to 128bit width
which can be used from userspace and therefor need userspace stack and
data-section alignment of at least this size.

This patch drops flat_stack_align() and uses the same alignment that
is required for slab caches, ARCH_SLAB_MINALIGN, or wordsize if it's
not defined by the architecture.

It also fixes m32r which was obviously kaput, aligning an
uninitialized stack entry instead of the stack pointer.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Oskar Schirmer <os@emlix.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Johannes Weiner <jw@emlix.com>
Acked-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-29 08:40:02 -07:00
Russell King a35197a8be Merge branch 'for-rmk' of git://gitorious.org/linux-gemini/mainline 2009-05-29 10:19:22 +01:00
Russell King 6daad5c6c5 [ARM] update mach-types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 10:15:08 +01:00
Russell King 42f1d2e06a Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci into devel 2009-05-29 10:04:24 +01:00
Tony Lindgren cd07ecc828 Merge branch 'omap4' into for-next 2009-05-28 15:45:14 -07:00
Tony Lindgren 4c50d22a0c Merge branch 'omap3-boards' into for-next 2009-05-28 15:45:07 -07:00
Tony Lindgren 970a724d91 Merge branch 'omap3-upstream' into for-next
Conflicts:
	arch/arm/mach-omap2/serial.c
2009-05-28 15:44:54 -07:00
Tony Lindgren c81592ba1b Merge branch 'omap-upstream' into for-next
Conflicts:
	arch/arm/mach-omap2/Makefile
2009-05-28 15:41:03 -07:00
Kevin Hilman 77bbca138c davinci: defconfig update: add EMAC
DaVinci EMAC driver is now upstream.  Enable it in default defconfig.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:29:37 -07:00
David Brownell 20e9969b3a davinci: add SRAM allocator
Provide a generic SRAM allocator using genalloc, and vaguely
modeled after what AVR32 uses.  This builds on top of the
static CPU mapping set up in the previous patch, and returns
DMA mappings as requested (if possible).

Compared to its OMAP cousin, there's no current support for
(currently non-existent) DaVinci power management code running
in SRAM; and this has ways to deallocate, instead of being
allocate-only.

The initial user of this should probably be the audio code,
because EDMA from DDR is subject to various dropouts on at
least DM355 and DM6446 chips.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:18:13 -07:00
David Brownell 0d04eb4705 davinci: soc-specific SRAM setup
Package on-chip SRAM.  It's always accessible from the ARM, so
set up a standardized virtual address mapping into a 128 KiB
area that's reserved for platform use.

In some cases (dm6467) the physical addresses used for EDMA are
not the same as the ones used by the ARM ... so record that info
separately in the SOC data, for chips (unlike the OMAP-L137)
where SRAM may be used with EDMA.

Other blocks of SRAM, such as the ETB buffer or DSP L1/L2 RAM,
may be unused/available on some system.  They are ignored here.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:18:12 -07:00
David Brownell b79dbdefd2 davinci: remove remnants of IRAM allocator
Remove remnants of dm6446-specific SRAM allocator, as preparation for
a more generic replacement.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:18:12 -07:00
Kevin Hilman 96ed299fdb davinci: cleanup: move dm355 UART2 define to dm355.c
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:49 -07:00
Mark A. Greer 5570078c0e davinci: Move PINMUX defines to SoC files
Different SoC have different numbers of pinmux registers and other
resources that overlap with each other.  To clean up the code and
eliminate defines that overlap with each other, move the PINMUX
defines to the SoC specific files.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:48 -07:00
Mark A. Greer 3abd5acfff davinci: Add compare register support to timer code
The Timer64p timer has 8 compare registers that can
be used to generate interrupts when the timer value
matches the compare reg's value.  They do not disturb
the timer itself.  This can be useful when there is
only one timer available for both clock events and
clocksource.

When enabled, the clocksource remains a continuous
32-bit counter but the clock event will no longer
support periodic interrupts.  Instead only oneshot
timers will be supported and implemented by setting
the compare register to the current timer value plus
the period that the clock event subsystem is requesting.

Compare registers support is enabled automatically
when the following conditions are met:
1) The same timer is being used for clock events
   and clocksource.
2) The timer is the bottom half (32 bits) of the
   64-bit timer (hardware limitation).
3) The the compare register offset and irq are
   not zero.

Since the timer is always running, there is a hardware
race in timer32_config() between reading the current
timer value, and adding the period to the current
timer value and writing the compare register.
Testing on a da830 evm board with the timer clocked
at 24 MHz and the processor clocked at 300 MHz,
showed the number of counter ticks to do this ranged
from 20-53 (~1-2.2 usecs) but usually around 41 ticks.
This includes some artifacts from collecting the
information.  So, the minimum period should be
at least 5 usecs to be safe.

There is also an non-critical lower limit that
the period should be since there is no point in
setting an event that is much shorter than the
time it takes to set the event, and get & handle
the timer interrupt for that event.  There can
also be all sorts of delays from activities
occuring elsewhere in the system (including
hardware activitis like cache & TLB management).
These are virtually impossible to quantify so a
minimum period of 50 usecs was chosen.  That will
certianly be enough to avoid the actual hardware
race but hopefully not large enough to cause
unreasonably course-grained timers.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:48 -07:00
Mark A. Greer 0b0c4c2a69 davinci: Integrate cp_intc support into low-level irq code
Integrate the Common Platform Interrupt Controller (cp_intc)
support into the low-level irq handling for davinci and similar
platforms.  Do it such that support for cp_intc and the original
aintc can coexist in the same kernel binary.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:47 -07:00
Mark A. Greer b14dc0f994 davinci: Factor out emac mac address handling
Factor out the code to extract that mac address from
i2c eeprom.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:47 -07:00
Mark A. Greer c97909fcf1 davinci: Remove unused i2c eeprom_read/write routines
The dm644x and dm646x board files have i2c eeprom read and
write routines but they are not used so remove them.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:46 -07:00
Mark A. Greer 972412b648 davinci: Move emac platform_data to SoC-specific files
Since most of the emac platform_data is really SoC specific
and not board specific, move it to the SoC-specific files.
Put a pointer to the platform_data in the soc_info structure
so the board-specific code can set some of the platform_data
if it needs to.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:45 -07:00
Mark A. Greer 65e866a974 davinci: Move serial platform_device into SoC-specific files
Currently, there is one set of platform_device and platform_data
structures for all DaVinci SoCs.  The differences in the data
between the various SoCs is handled by davinci_serial_init()
by checking the SoC type.  However, as new SoCs appear, this
routine will become more & more cluttered.

To clean up the routine and make it easier to add support for new
SoCs, move the platform_device and platform_data structures into the
SoC-specific code and use the SoC infrastructure to provide access
to the data.

In the process, fix a bug where the wrong irq is used for uart2
of the dm646x.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:17:41 -07:00
Mark A. Greer a994955cc0 davinci: Make GPIO code more generic
The current gpio code needs to know the number of
gpio irqs there are and what the bank irq number is.
To determine those values, it checks the SoC type.

It also assumes that the base address and the number
of irqs the interrupt controller uses is fixed.

To clean up the SoC checks and make it support
different base addresses and interrupt controllers,
have the SoC-specific code set those values in
the soc_info structure and have the gpio code
reference them there.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 15:16:30 -07:00
Santosh Shilimkar b04e8975e7 ARM: OMAP4: Add defconfig for 4430 SDP
This patch adds the defconfig for OMAP4430 SDP platform.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:16:05 -07:00
Santosh Shilimkar 46ba0abfe1 ARM: OMAP4: Add support for 4430 SDP
This patch updates the Makefile and Kconfig entries for OMAP4. The OMAP4430 SDP
board file supports only minimal set of drivers.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:16:05 -07:00
Santosh Shilimkar 748303850d ARM: OMAP4: Clock stubs since CLKDEV not in yet.
This patch update the common clock.c file for OMAP4. The clk_get() and
clk_put() functions are moved to  common place in arch/arm/common/clkdev.c
Since on current OMAP4 platform clk management is still not supported, the
platform file is stubbed with those functions.

Once the framework is ready, this WILL be replaced with a full
clkdev implementation.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:16:04 -07:00
Santosh Shilimkar 44169075e6 ARM: OMAP4: Add minimal support for omap4
This patch adds the support for OMAP4. The platform and machine specific
headers and sources updated for OMAP4430 SDP platform.

OMAP4430 is Texas Instrument's SOC based on ARM Cortex-A9 SMP architecture.
It's a dual core SOC with GIC used for interrupt handling and SCU for cache
coherency.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:16:04 -07:00
Grazvydas Ignotas 7419045016 ARM: OMAP3: pandora: add support for mode devices
Add support for keypad, GPIO keys and LEDs. Also enable hardware
debounce feature for GPIO keys.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:15:44 -07:00
Syed Mohammed Khasim 1bfc3738c4 ARM: OMAP3: Add omap3 EVM defconfig
Add omap3 EVM defconfig

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:15:44 -07:00
Syed Mohammed Khasim 53c5ec31e7 ARM: OMAP3: Add omap3 EVM support
Add omap3 EVM support

Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:13:28 -07:00
Vikram Pandita b969a2873d ARM: OMAP3: Defconfig for Zoom2 board
This patch adds OMAP3 Zoom2 board defconfig.

Signed-off-by: Mikkel Christensen <mlc@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:08:58 -07:00
Vikram Pandita 577145f454 ARM: OMAP3: Add support for OMAP3 Zoom2 board
This patch creates the minimal OMAP3 Zoom2 board support.

Signed-off-by: Mikkel Christensen <mlc@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:04 -07:00
Adrian Hunter f52eeee83d ARM: OMAP3: RX51: Connect VAUX3 to MMC2
Connect VAUX3 to MMC2

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:04 -07:00
Grazvydas Ignotas 64f535a87c ARM: OMAP3: pandora: setup regulator framework for MMC
Setup regulators for MMC1 and MMC2 to get those SD slots
working again.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
CC: David Brownell <david-b@pacbell.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:04 -07:00
David Brownell bb3b9d8eb9 ARM: OMAP3: Initialize regulators for Beagle and Overo
Initialize regulators for Beagle and Overo.

Patch is based on earlier patches posted to linux-omap mailing
list.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:03 -07:00
David Brownell b583f26d51 ARM: OMAP3: mmc-twl4030 uses regulator framework
Decouple the HSMMC glue from the twl4030 as the only
regulator provider, using the regulator framework instead.
This makes the glue's "mmc-twl4030" name become a complete
misnomer ... this code could probably all migrate into the
HSMMC driver now.

Tested on 3430SDP (SD and low-voltage MMC) and Beagle (SD),
plus some other boards (including Overo) after they were
converted to set up MMC regulators properly.

Eventually all boards should just associate a regulator with
each MMC controller they use.  In some cases (Overo MMC2 and
Pandora MMC3, at least) that would be a fixed-voltage regulator
with no real software control.  As a temporary hack (pending
regulator-next updates to make the "fixed.c" regulator become
usable) there's a new ocr_mask field for those boards.

Patch updated with a fix for disabling vcc_aux by
Adrian Hunter <adrian.hunter@nokia.com>

Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:03 -07:00
Tony Lindgren 4a899d5e93 ARM: OMAP3: Initialize more devices for LDP
Based on an earlier patches by Stanley.Miao <stanley.miao@windriver.com>
and Nishant Kamat <nskamat@ti.com>.

Note that at the ads7846 support still needs support for vaux_control
for the touchscreen to work.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:00 -07:00
Imre Deak 49adf465d2 ARM: OMAP3: ZOOM MDK: Add FB support to board file
Based on an earlier patch by Stanley.Miao <stanley.miao@windriver.com>
with board-*.c changes split to avoid conflicts with other device updates.

Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:04:00 -07:00
Paul Walmsley 17a722caae ARM: OMAP3: SDRC: add timing data for Qimonda HYB18M512160AF-6
Add timing data for the Qimonda HYB18M512160AF-6 SDRAM chip, used on
the OMAP3430SDP boards.

Thanks to Rajendra Nayak <rnayak@ti.com> for his help identifying
the chip used on 3430SDP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:03:59 -07:00
Paul Walmsley 2e12bd7ef1 ARM: OMAP3: SDRC: add timing data for Micron MT46H32M32LF-6, v2
Add timing data for the Micron MT46H32M32LF-6 SDRAM chip, used on the
OMAP3 Beagle and EVM boards.  Original timing data is from the Micron
datasheet PDF downloaded from:

http://download.micron.com/pdf/datasheets/dram/mobile/1gb_ddr_mobile_sdram_t48m.pdf

Thanks to Rajendra Nayak <rnayak@ti.com> for his help identifying
the chips used on Beagle & OMAP3EVM.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:03:59 -07:00
Vikram Pandita 2aa57be2d9 ARM: OMAP2/3: Serial: Remove arch_initcall dependency
Move platform_device_register() for serial device to
omap_serial_init()

There is no need to have arch_initcall() dependency in serial
as already board files call the function omap_serial_init()

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:03:59 -07:00
Tony Lindgren f247de346f ARM: OMAP2/3: Remove L4_WK_OMAP_BASE, L4_PER_OMAP_BASE, L4_EMU_BASE, L3_OMAP_BASE
These are not being used right now, and the processor specific
defines should be used instead by any code accessing these registers.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 14:03:58 -07:00
Andrew de Quincey 088962c243 ARM: OMAP1: Make 770 LCD work
Make 770 LCD work by adding clk_add_alias().
Also remove the old unused functions.

Note that the clk_add_alias() could probably be moved
to arch/arm/clkdev.c later on.

Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com
2009-05-28 14:03:31 -07:00
Imre Deak 7d8e967f88 ARM: OMAP2: 2430SDP: Add FB support to board file
Based on an earlier patch by Hunyue Yau <hyau@mvista.com> with
board-*.c changes split to avoid conflicts with other device updates.

Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Hunyue Yau <hyau@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 13:23:53 -07:00
Tony Lindgren 1a48e15751 ARM: OMAP2/3: Add generic smc91x support when connected to GPMC
Convert the board-rx51 smc91x code to be generic and make
the boards to use it. This allows future recalculation of the
timings when the source clock gets scaled.

Also correct the rx51 interrupt to be IORESOURCE_IRQ_HIGHLEVEL.

Thanks to Paul Walmsley <paul@pwsan.com> for better GPMC timing
calculations.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 13:23:52 -07:00
Juha Yrjola aa62e90fe0 ARM: OMAP2/3: Add generic onenand support when connected to GPMC
Add generic onenand support when connected to GPMC and make the
boards to use it.

The patch has been modified to make it more generic to support all
the boards with GPMC. The patch also remove unused prototype for
omap2_onenand_rephase(void).

Note that board-apollon.c is currently using the MTD_ONENAND_GENERIC
and setting the GPMC timings in the bootloader. Setting the GPMC
timings in the bootloader will not allow supporting frequency
scaling for the onenand source clock.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 13:23:52 -07:00
Santosh Shilimkar 279b918d72 ARM: OMAP2/3: sDMA: Correct omap_request_dma_chain(), v2
Original OMAP DMA chaining design had chain_id as one of the callback
parameters. Patch 538528de0c changed it
to use logical channel instead.

Correct the naming for callback to also use logical channel number
instead of the chain_id.

More details are on this email thread:

http://marc.info/?l=linux-omap&m=122961071931459&w=2

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 13:23:52 -07:00
Tomi Valkeinen 0815f8eaae ARM: OMAP2/3: DMA: implement trans copy and const fill
Implement transparent copy and constant fill features for OMAP2/3.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-28 13:23:51 -07:00
Mathieu Desnoyers ecd322c9b3 [ARM] Add cmpxchg support for ARMv6+ systems (v5)
Add cmpxchg/cmpxchg64 support for ARMv6K and ARMv7 systems
(original patch from Catalin Marinas <catalin.marinas@arm.com>)

The cmpxchg and cmpxchg64 functions can be implemented using the
LDREX*/STREX* instructions. Since operand lengths other than 32bit are
required, the full implementations are only available if the ARMv6K
extensions are present (for the LDREXB, LDREXH and LDREXD instructions).

For ARMv6, only 32-bits cmpxchg is available.

Mathieu :

Make cmpxchg_local always available with best implementation for all type sizes (1, 2, 4 bytes).
Make cmpxchg64_local always available.

Use "Ir" constraint for "old" operand, like atomic.h atomic_cmpxchg does.

Change since v3 :
- Add "memory" clobbers (thanks to Nicolas Pitre)
- removed __asmeq(), only needed for old compilers, very unlikely on ARMv6+.

Note : ARMv7-M should eventually be ifdefed-out of cmpxchg64. But it's not
supported by the Linux kernel currently.

Put back arm < v6 cmpxchg support.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-28 21:10:31 +01:00
Russell King bac4e960b5 [ARM] barriers: improve xchg, bitops and atomic SMP barriers
Mathieu Desnoyers pointed out that the ARM barriers were lacking:

- cmpxchg, xchg and atomic add return need memory barriers on
  architectures which can reorder the relative order in which memory
  read/writes can be seen between CPUs, which seems to include recent
  ARM architectures. Those barriers are currently missing on ARM.

- test_and_xxx_bit were missing SMP barriers.

So put these barriers in.  Provide separate atomic_add/atomic_sub
operations which do not require barriers.

Reported-Reviewed-and-Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-28 19:39:27 +01:00
Kevin Hilman c912f7e1ea OMAP1: PM: update and decouple from OMAP2/3 PM core
Update OMAP1-specific PM infrastructure.  This is a sync of what is in
linux-omap for OMAP1.

This mostly de-couples OMAP1 PM from OMAP2/3 PM and renames things
accordingly, and removes omap2/3 specific code from OMAP1 specific
headers.

Original OMAP1 decoupling patch for OMAP PM branch by Paul Walmsley.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:11 -07:00
Kevin Hilman d3fd3290c4 OMAP3: PM: prevent module wakeups from waking IVA2
By default, prevent functional wakeups from inside a module from
waking up the IVA2.  Let DSP Bridge code handle this when loaded.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:10 -07:00
Kevin Hilman b1340d17d2 OMAP3: PM: Clear pending PRCM reset flags on init
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:10 -07:00
Kevin Hilman 014c46db1c OMAP3: PM: Ensure PRCM interrupts are cleared at boot
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:09 -07:00
Peter 'p2' De Schrijver 94a3ef6f28 OMAP3: PM: Ensure MUSB block can idle when driver not loaded
Otherwise, bootloaders may leave MUSB in a state which prevents
retention.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:09 -07:00
Kevin Hilman 01cbd4d115 OMAP3: PM: D2D clockdomain supports SW supervised transitions
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:08 -07:00
Kevin Hilman 8111b221a2 OMAP3: PM: Add D2D clocks and auto-idle setup to PRCM init
Add D2D clocks (modem_fck, sad2d_ick, mad2d_ick) to clock framework
and ensure that auto-idle bits are set for these clocks during PRCM
init.

Also add omap3_d2d_idle() function called durint PRCM setup which
ensures D2D pins are MUX'd correctly to enable retention for
standalone (no-modem) devices.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:07 -07:00
Jouni Hogander ba87a9beae OMAP: UART: Add sysfs interface for adjusting UART sleep timeout
This patch makes it possible to change uart sleep timeout. New sysfs
entry is added (/sys/devices/platform/serial8250.<uart>/sleep_timeout)
Writing zero will disable the timeout feature and prevent UART clocks
from being disabled.

Also default timeout is increased to 5 second to make serial console
more usable.

Original patch was written by Tero Kristo.

Cc: Tero Kristo <Tero.Kristo@nokia.com>
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:07 -07:00
Kevin Hilman 4af4016c53 OMAP3: PM: UART: disable clocks when idle and off-mode support
This patch allows the UART clocks to be disabled when the OMAP UARTs
are inactive, thus permitting the chip to hit retention in idle.
After the expiration of an activity timer, each UART is allowed to
disable its clocks so the system can enter retention.  The activity
timer is (re)activated on any UART interrupt, UART wake event or any
IO pad wakeup.  The actual disable of the UART clocks is done in the
'prepare_idle' hook called from the OMAP idle loop.

While the activity timer is active, the smart-idle mode of the UART is
also disabled.  This is due to a "feature" of the UART module that
after a UART wakeup, the smart-idle mode may be entered before the
UART has communicated the interrupt, or upon TX, an idle mode may be
entered before the TX FIFOs are emptied.

Upon suspend, the 'prepare_suspend' hook cancels any pending activity
timers and allows the clocks to be disabled immediately.

In addition, upon disabling clocks the UART state is saved in case
of an off-mode transition while clocks are off.

Special thanks to Tero Kristo for the initial ideas and first versions
of UART idle support, and to Jouni Hogander for extra testing and
bugfixes.

Tested on OMAP3 (Beagle, RX51, SDP, EVM) and OMAP2 (n810)

Cc: Tero Kristo <tero.kristo@nokia.com>
Cc: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:06 -07:00
Kevin Hilman 5a1a5abdb2 OMAP3: PM: Add wake-up bit defintiions for CONTROL_PADCONF_X
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:06 -07:00
Kevin Hilman 1155e426b7 OMAP3: PM: Force IVA2 into idle during bootup
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:05 -07:00
Jouni Hogander 94434535bd OMAP: Add new function to check wether there is irq pending
Add common omap2/3 function to check wether there is irq pending.
Switch to use it in omap2 pm code instead of its own.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:04 -07:00
Kevin Hilman 8bd2294922 OMAP2/3: PM: push core PM code from linux-omap
This patch is to sync the core linux-omap PM code with mainline.  This
code has evolved and been used for a while the linux-omap tree, but
the attempt here is to finally get this into mainline.

Following this will be a series of patches from the 'PM branch' of the
linux-omap tree to add full PM hardware support from the linux-omap
tree.

Much of this PM core code was written by Jouni Hogander with
significant contributions from Paul Walmsley as well as many others
from Nokia, Texas Instruments and linux-omap community.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:58:50 -07:00
Valentin Longchamp 0573cb5f45 mx31: correct csi_clk parent (v2)
changes since v1: we now check if the parent configuration bit was
changed since reset and change the parent when needed.

csi_clk parent was defined with ahb_clk. However, according to the
m31 reference manual, it should be serial_pll_clk.

Guennadi always used a 20 MHz clock that was by chance changed to
a 45 MHz that fits in the mt9t031 spec. Now the clocks are computed
and output correctly (measured on oscillo).

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-28 17:20:53 +02:00
Fabio Estevam 0b0ef44295 MX3: Add missing entry in devices.h
Add missing mxc_rnga_device entry in devices.h (mxc-master tree).

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-28 17:19:23 +02:00
Paulius Zaleckas 67a433ce27 Gemini: Fix SRAM/ROM location after memory swap
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
2009-05-28 16:42:25 +03:00
Russell King e03cdade0c [ARM] smp: use new cpumask functions
Convert cpu_*_mask bit twiddling to the new set_cpu_*() API.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-28 14:16:52 +01:00
Catalin Marinas af73110d23 [ARM] 5516/1: Flush the D-cache after initialising the SCU
On MP systems, the data loaded by CPU0 before the SCU was initialised
may not be visible to the other CPUs.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

This also includes the following compile fix:

This patch includes 'asm/cacheflush.h' which is needed to use
'flush_cache_all()' function.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-28 13:52:05 +01:00
Kevin Hilman a330bd4750 Revert "ARM: OMAP: Mask interrupts when disabling interrupts, v2"
This reverts commit 5461af5af5.

Adding a disable hook to the irq_chip is not the way to fix the
problem being addressed by this patch.  Instead, we need to fix
support for [enable|disable]_irq_wake().

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 15:56:55 -07:00
Tony Lindgren 88b6f7eb9b Merge branch 'omap-clock-upstream' of git://git.pwsan.com/linux-2.6 into for-next 2009-05-26 14:41:35 -07:00
Mark A. Greer 951d6f6d70 davinci: Add watchdog base address flexibility
The watchdog code currently hardcodes the base address
of the timer its using.  To support new SoCs, make it
support timers at any address.  Use the soc_info structure
to do this.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:20:31 -07:00
Mark A. Greer f64691b3ab davinci: Add base address and timer flexibility
The davinci timer code currently hardcodes the timer register
base addresses, the timer irq numbers, and the timers to use
for clock events and clocksource.  This won't work for some
a new SoC so put those values into the soc_info structure
and set them up in the SoC-specific files.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:19:04 -07:00
Mark A. Greer 673dd36f0d davinci: Move interrupt ctlr info to SoC infrastructure
Use the SoC infrastructure to hold the interrupt controller
information (i.e., base address, default priorities,
interrupt controller type, and the number of IRQs).

The interrupt controller base, although initially put
in the soc_info structure's intc_base field, is eventually
put in the global 'davinci_intc_base' so the low-level
interrupt code can access it without a dereference.

These changes enable the SoC default irq priorities to be
put in the SoC-specific files, and the interrupt controller
to be at any base address.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:18:09 -07:00
Mark A. Greer 0e585952ac davinci: Move pinmux setup info to SoC infrastructure
The pinmux register base and setup can be different for different
SoCs so move the pinmux reg base, pinmux table (and its size) to
the SoC infrastructure.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:17:16 -07:00
Mark A. Greer d81d188caf davinci: Add support for multiple PSCs
The current code to support the DaVinci Power and Sleep Controller (PSC)
assumes that there is only one controller.  This assumption is no longer
valid so expand the support to allow greater than one PSC.

To accomplish this, put the base addresses for the PSCs in the SoC
infrastructure so it can be referenced by the PSC code.  This also
requires adding an extra parameter to davinci_psc_config() to specify
the PSC that is to be enabled/disabled.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:16:46 -07:00
Mark A. Greer 66e0c3991c davinci: Add clock init call to common init routine
All of the davinci SoCs need to call davinci_clk_init() so
put the call in the common init routine.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:14:59 -07:00
Mark A. Greer b9ab12797e davinci: Support JTAG ID register at any address
The Davinci cpu_is_davinci_*() macros use the SoC part number
and variant retrieved from the JTAG ID register to determine the
type of cpu that the kernel is running on.  Currently, the code to
read the JTAG ID register assumes that the register is always at
the same base address.  This isn't true on some newer SoCs.

To solve this, have the SoC-specific code set the JTAG ID register
base address in soc_info structure and add a 'cpu_id' member to it.
'cpu_id' will be used by the cpu_is_davinci_*() macros to match
the cpu id.  Also move the info used to identify the cpu type into
the SoC-specific code to keep all SoC-specific code together.

The common code will read the JTAG ID register, search through
an array of davinci_id structures to identify the cpu type.
Once identified, it will set the 'cpu_id' member of the soc_info
structure to the proper value and the cpu_is_davinci_*() macros
will now work.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:14:56 -07:00
Mark A. Greer 79c3c0b729 davinci: Encapsulate SoC-specific data in a structure
Create a structure to encapsulate SoC-specific information.
This will assist in generalizing code so it can be used by
different SoCs that have similar hardware but with minor
differences such as having a different base address.

The idea is that the code for each SoC fills out a structure
with the correct information.  The board-specific code then
calls the SoC init routine which in turn will call a common
init routine that makes a copy of the structure, maps in I/O
regions, etc.

After initialization, code can get a pointer to the structure
by calling davinci_get_soc_info().  Eventually, the common
init routine will make a copy of all of the data pointed to
by the structure so the original data can be made __init_data.
That way the data for SoC's that aren't being used won't consume
memory for the entire life of the kernel.

The structure will be extended in subsequent patches but
initially, it holds the map_desc structure for any I/O
regions the SoC/board wants statically mapped.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 08:14:04 -07:00
Kevin Hilman ac7b75b5bb davinci: EMAC platform support
Add SoC and platform-specific data and init for DaVinci EMAC network
driver.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:16 -07:00
Kevin Hilman 2dbf56aeb7 davinci: MMC platform support
Add SoC and platform-specific data and init for MMC driver.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:16 -07:00
Kevin Hilman 35652fe185 davinci: update davinci_all_defconfig for dm355, dm6467
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:15 -07:00
Kevin Hilman e38d92fdcd davinci: DM646x: add base SoC and board support
Add support for DM646x SoC (a.k.a DaVinci HD) and its Evalution
Module (EVM.)

Original support done by Sudhakar Rajashekhara.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:15 -07:00
Kevin Hilman 95a3477fe5 davinci: DM355: add base SoC and board support
In addition, add board support for the DM355 Evaluation Module (EVM)
and the DM355 Leopard board.

Original DM355 EVM support done by Sandeep Paulraj, with significant
updates and improvements by David Brownell.  DM355 Leopord support
done by Koen Kooi.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Koen Kooi <koen@beagleboard.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:15 -07:00
Hugo Villeneuve f5ce6a67a7 davinci: DM644x: add support for SFFSDR board
Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:15 -07:00
Kevin Hilman fb6313879c davinci: add platform support for watchdog timer
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:15 -07:00
Sergei Shtylyov 0521444d49 davinci: INTC: add support for TI cp_intc
Add support for Texas Instuments Common Platform Interrupt Controller
(cp_intc) used on DA830/OMAP-L137.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Mark Greer <mgreer@mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:14 -07:00
Mark A. Greer 27428e39da davinci: support different UART bases for zImage uncompress
The davinci pre-kernel boot code assumes that all platforms use the
same UART base address for the console.  That assumption is not longer
valid with some newer SoCs so determine the console UART base address
from the machine number passed in from bootloader.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:14 -07:00
Troy Kisky ce8ccaf0ef davinci: interrupts: get_irqnr_and_base: save an instruction
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:14 -07:00
Chaithrika U S 17eb157041 davinci: use 32-bit accesses for low-level debug macros
This patch defines debug macros for low-level debugging for Davinci
based platforms

Tested on :
        - DM644x DaVinci EVM
        - DM646X DaVinciHD EVM
	- DM355 EVM

This patch attempts to solve the low-level debug issue in DM646x. The
UART on DM646x SoC allows only 32-bit access. The existing
debug-macro.S uses the macros from debug-8250.S file. This led to
garbage serial out in the case of DM646x.

The inclusion of debug-8250.S does not allow for run time fix for this
issue.  There are compile time errors due to multiple definitions of
the macros.  Also when building a single image for multiple DaVinci
Platforms, the ifdefs cannot be relied upon.

The solution below does not include the debug-8250.S file and defines
the necessary macros. This solution was arrived at after observing
that word access does not affect the low-level debug messages on
DM644x/DM355.

The other approach to this issue is to use the UART module information
available in the peripheral registers to decide the access
mechanism. But this will have to be done for every access of UART
specifically for DM646x. Also this calls for a modification of the
debug-8250.S file.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:18:14 -07:00
Kevin Hilman dc75602628 davinci: fixups for banked GPIO interrupt handling
This patch seems to get me much more reliable performance using the
GPIO banked interrupts on dm355 for the dm9000 driver.

Changes include:

- init GPIO handling along with normal GPIO init
- mask the level-sensitive bank IRQ during handling

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:17:54 -07:00
David Brownell df4aab46a8 davinci: gpio irq enable tweaks
Fix two IRQ triggering bugs affecting GPIO IRQs:

 - Make sure enabling with IRQ_TYPE_NONE ("default, unspecified")
   isn't a NOP ... default to both edges, at least one must work.

 - As noted by Kevin Hilman, setting the irq trigger type for a
   banked gpio interrupt shouldn't enable irqs that are disabled.

Since GPIO IRQs haven't been used much yet, it's not clear these
bugs could have affected anything.  The few current users don't
seem to have been obviously suffering from these issues.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-26 07:17:54 -07:00
Alberto Panizzo 4e0f088106 ARM MXC: Atmark Armadillo 500 board support.
On Mon, 25 May 2009 18:33:28 +0200
Valentin Longchamp <valentin.longchamp@epfl.ch> wrote:

> Hello,
>
> I have updated my mxc git tree and given a compilation spin to your
> board support and I have comments. See below.
>

>
> What's the point of declaring this new function, if all it does is
> calling the already existing one ? Furthermore, in the current
> mxc-master tree, mxc_map_io() does not exist anymore, it should be
> mx31_map_io (this breaks compilation for your board).
>

This patch solve those two issues. Until now i based my patches to
vanilla tree. This evening I cloned the mxc-master tree so i could
update the armadillo 500 support within recent platform changes.

The patch:

From e986a8dc262e5292350d95bf65ead75baf3272d7 Mon Sep 17 00:00:00 2001
From: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Date: Mon, 25 May 2009 22:24:03 +0200
Subject: [PATCH] Armadillo 500 removing useless function armadillo5x0_map_io
and use machine specific io mapping

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:34:11 +02:00
Daniel Mack 4193d2d2d7 ARM: MX3: add I2C support for lilly-1131
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:31:55 +02:00
Daniel Mack 38160e0b01 ARM: MX3: add NOR flash support for lilly-1131
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:31:37 +02:00
Daniel Mack b99238721b ARM: MX3: add framebuffer support for lilly1131-db
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:31:28 +02:00
Daniel Mack d0b1eabc7b ARM: MX3: add MMC suuport for lilly1131-db
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:31:19 +02:00
Daniel Mack cbaa6ca1f5 ARM: MX3: add lilly-1131 ethernet support
This adds support for the SMSC911x chip found on the lilly-1131 module.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:31:13 +02:00
Daniel Mack 1bc34f7964 ARM: MX3: add skeleton for lilly-1131 development board
Support code for lilly-1131 is implemented in a module/baseboard
fashion. All code specific to peripherals found on the development board
will go to this file.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:30:40 +02:00
Daniel Mack 65b1aa13f2 ARM: MX3: basic support for lilly-1131 board
This patch adds basic support for INCO startec's LILLY-1131 iMX31 based
modules. The module needs a baseboard support to work which will be
added in the next patch.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-26 12:30:32 +02:00
Santosh Shilimkar 8f9ccfeeb2 ARM: OMAP: Remove unnecessary omap2_globals.
This patch removes unnecessary omap2_globals and pass the global structures
directly as function argument.

The proposed cleanup was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:48 -07:00
Santosh Shilimkar da7a0649bc ARM: OMAP: Remove useless omap_sram_error function.
This patch removes fixes omap_sram_error() function and replace the
error paths with BUG_ON.

The proposed fix was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:48 -07:00
Santosh Shilimkar ce8a17fd3f ARM: OMAP: Remove unwanted type casts and fix the compiler warning.
This patch fixes the compiler warning "assignment from incompatible
pointer type"  in dmtimer.c and removes the tye casts. These warnings
were suppressed by type catsing.

The proposed fix was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:47 -07:00
Tony Lindgren d76076636b ARM: OMAP2/3: Reorganize Makefile to add omap4 support
We don't necessarily want to compile in irq.o and sdrc.o for omap4.
Also, clock and prcm may not be implemented initially.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:47 -07:00
Tony Lindgren ef6685a6de ARM: OMAP2/3: Remove OMAP_CM_REGADDR
Processor specific macros should be used instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:46 -07:00
Tony Lindgren 07b95d000d ARM: OMAP2/3: Remove OMAP2_PRCM_BASE
It's currently unused, and processor specific defines should
be used instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:46 -07:00
Tony Lindgren 2e693f841f ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S
Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:45 -07:00
Tony Lindgren 8e3bd351d1 ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE
Remove OMAP_PRM_REGADDR and use processor specific defines instead.

Also fold in a patch from Kevin Hilman to add _OFFSET #defines
for the PRCM registers to be used with the prm_[read|write]_* macros.
These are used extensively in the forthcoming OMAP PM support.

Also remove now unused OMAP2_PRM_BASE.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:42 -07:00
Tony Lindgren a4ab0d836b ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE
Use processor specific defines instead.

As an extra bonus, this patch fixes the problem of CONFIG_DEBUG_SPINLOCK
calling sched_clock before we have things initialized:

http://patchwork.kernel.org/patch/15810/

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:26:41 -07:00
Tony Lindgren ebe3b0e787 ARM: OMAP1: Misc clean-up
Remove unnecessary Kconfig line and allow compile of MBOX_FWK.
Also allow building USB on Nokia 770.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:44 -07:00
Jarkko Nikula ddf25dfe3a ARM: OMAP: Update contact address of I2C registration helper
This email address is going to expire soon so update it.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:43 -07:00
Eero Nurkkala d6d834b010 ARM: OMAP: McBSP: Fix legacy interrupts to clear their status
If XSYNCERR or RSYNCERR interrupts are enabled, they are never
cleared causing the IRQ handler to be continuously called.
This patch clears the IRQs in question in the event they are
enabled and taken.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:42 -07:00
Mans Rullgard e85c205ac1 ARM: OMAP: Increase VMALLOC_END to allow 256MB RAM
This increases VMALLOC_END to 0x18000000, making room for 256MB
RAM with the default 128MB vmalloc region.

Note that after this patch there's no longer a hole between vmalloc
space and the beginning of IO space on omap2 as the first virtual
mapping starts at 0xd8000000.

Also fold in a related change from Paul Walmsley <paul@pwsan.com>
to change the OMAP2_SRAM addresses accordingly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:41 -07:00
Santosh Shilimkar 00aeeffffa ARM: OMAP: Remove unnecessary omap2_globals.
This patch removes unnecessary omap2_globals and pass the global structures
directly as function argument.

The proposed cleanup was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:37 -07:00
Santosh Shilimkar af5703f2be ARM: OMAP: Remove useless omap_sram_error function.
This patch removes fixes omap_sram_error() function and replace the
error paths with BUG_ON.

The proposed fix was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:37 -07:00
Santosh Shilimkar aea2a5b03c ARM: OMAP: Remove unwanted type casts and fix the compiler warning.
This patch fixes the compiler warning "assignment from incompatible
pointer type"  in dmtimer.c and removes the tye casts. These warnings
were suppressed by type catsing.

The proposed fix was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:36 -07:00
Tony Lindgren a9a418d455 ARM: OMAP2/3: Reorganize Makefile to add omap4 support
We don't necessarily want to compile in irq.o and sdrc.o for omap4.
Also, clock and prcm may not be implemented initially.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:36 -07:00
Tony Lindgren eb0d0ee1c2 ARM: OMAP2/3: Remove OMAP_CM_REGADDR
Processor specific macros should be used instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:36 -07:00
Tony Lindgren c28150ee68 ARM: OMAP2/3: Remove OMAP2_PRCM_BASE
It's currently unused, and processor specific defines should
be used instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:35 -07:00
Tony Lindgren 8a424bb3c9 ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S
Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:35 -07:00
Tony Lindgren 23b7dd3166 ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE
Remove OMAP_PRM_REGADDR and use processor specific defines instead.

Also fold in a patch from Kevin Hilman to add _OFFSET #defines
for the PRCM registers to be used with the prm_[read|write]_* macros.
These are used extensively in the forthcoming OMAP PM support.

Also remove now unused OMAP2_PRM_BASE.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:34 -07:00
Tony Lindgren bed8b97d88 ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE
Use processor specific defines instead.

As an extra bonus, this patch fixes the problem of CONFIG_DEBUG_SPINLOCK
calling sched_clock before we have things initialized:

http://patchwork.kernel.org/patch/15810/

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-05-25 11:08:33 -07:00
Russell King 9af5324a07 Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 into devel 2009-05-25 13:35:46 +01:00
Krzysztof Hałasa 9733bb8e9c IXP4xx: Change QMgr function names to qmgr_stat_*_watermark and clean the comments.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-05-25 13:25:34 +02:00
Russell King 56a459314a Merge branch 'iommu' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git into devel 2009-05-25 10:20:21 +01:00
Ryan Mallon 6b5ca05d95 [ARM] 5523/2: Updated ep93xx defconfig
Updated defconfig for ep93xx. By default, support for all boards which
boot from 0x00000000 (SDCE3/SyncBoot) is included. Also updated the
defconfig to use EABI for building the kernel.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-24 19:21:33 +01:00