Commit Graph

132224 Commits (1d0f98709347c4babac08dd933466674e089f188)

Author SHA1 Message Date
Sascha Hauer 1d0f987093 imxfb: add mx27 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:23 +01:00
Valentin Longchamp ca489f8e4a mx31: add dma and fb devices
This adds the dma (ipu_dma) and fb devices for the mx31 for which drivers now are
available.

v2: merge the ipu and fb device in the same patch as suggested by Sascha

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:22 +01:00
Valentin Longchamp e00f0b4a93 mx31moboard: initial support for various baseboards
This enables our mx31moboard to be used on the different baseboards that
we are developping according to the application needs. There are not
many differences between the boards for now, but when other peripherals
are available for mx31 the differences are going to grow.

v2: takes Sascha's comments into account

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:21 +01:00
Valentin Longchamp e180a5c26f mx31: add pin definition for LCD
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:20 +01:00
Guennadi Liakhovetski 999981d943 mxc: first set GPIO level, then switch direction to output
Make sure not to create spurious pulses on GPIOs, when configuring them as
output: first set required level, then switch direction.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:19 +01:00
Holger Schurig 6bbdbf2f95 arm/imx: Kconfig beautification
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:18 +01:00
Sascha Hauer 87bbb19721 [ARM] mxc: add missing include
include devices.h from devices.c to avoid inconsistencies and to fix
sparse warnings

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:17 +01:00
Sascha Hauer 2420563227 [ARM] Add Synertronixx scb9328 board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:16 +01:00
Sascha Hauer 792067507b [ARM] PCM037 Board: Add I2C support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:15 +01:00
Sascha Hauer c2aaac70cd [ARM] iommux mx3: Add pin definitions for I2C
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:14 +01:00
Sascha Hauer b8b19b0d1c [ARM] mx1ads: add I2C support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:13 +01:00
Sascha Hauer a4e9a65a1f [ARM] PCM038 board: Add I2C support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:12 +01:00
Sascha Hauer c5d4dbff96 [ARM] MX2: Add I2C devices / resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:12 +01:00
Sascha Hauer 824b16e66b [ARM] MX2: add pwm device/resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:11 +01:00
Sascha Hauer 166091b189 [ARM] MXC: add pwm driver for i.MX SoCs
This driver has been tested on MX27/MX31. It should work on MX1/MX1
aswell, but the actual setting of the PWM is missing so far.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:10 +01:00
Sascha Hauer 1512222b10 imxfb: add 18 bit support
v2: As pointed out by Hans J. Koch we have to claim we can do 24bit to
    make software like X work. We are lucky on i.MX that 18bit support
    has the necessary gaps in the fields to do so.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:09 +01:00
Sascha Hauer 9db973a59b [ARM] pcm038: Add framebuffer support
Add framebuffer support for PCM038

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:08 +01:00
Sascha Hauer c0b90a31ef imxfb: add platform specific init/exit functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:07 +01:00
Sascha Hauer 879fea1b48 [ARM] MX2: Add FEC platform device
The in kernel FEC driver has recently been ported to a platform driver.
Add a platform_device for it and register it for pcm038 and mx27ads.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:06 +01:00
Mark Brown fe7316bff1 mx31ads: Initial support for Wolfson Microelectronics 1133-EV1 module
The i.MX31ADS supports pluggable PMU modules, including the WM835x based
Wolfson Microelectronics 1133-EV1. These boards provide power, audio,
RTC and watchdiog services to the system. This patch adds initial support
for those boards in I2C mode.

Currently support is limited by the available support for the features
of the i.MX31 in the mainline kernel.  Some further work will be needed
once other PMU modules are supported and once there is SPI support.
Many of the regulator constraints will be sharable with other PMU
boards.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:05 +01:00
Valentin Longchamp bab389c875 pcm037: use of new iomux implementation
This was only compilation tested.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:04 +01:00
Valentin Longchamp 63d976672e mx31pdk: use of new iomux implementation
This was only compilation tested.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:03 +01:00
Valentin Longchamp 945c10b87c mx31ads: use of new iomux implementation
This was only compilation tested.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:02 +01:00
Valentin Longchamp bfbc6a1fc1 mx31moboard: use of new iomux implementation
This example takes advantage of the possibility to use tables of iomux
configs.
This is inspired from mx1-mx2 iomux code. It allows a better code
readability.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:01 +01:00
Valentin Longchamp b7222631c3 mx31: rework of iomux support
This new implemenatation avoids that two physical pins are claimed by
the same driver (also with the the gpr hardware modes).
The gpio kernel lib is also called when a capable gpio pin is assigned
its gpio function.
The mxc_iomux_mode function is still here for backward compatibility but
should not be used anymore.

V2:

In the precendent revision, the iomux code was claiming a pin when its
hardware mode was changed. This was uncorrect: when the hardware mode is
changed, the pin must still be claimed through the iomux.

In order to have a pin working in mode hw2, we must fist issue the
mxc_iomux_set_gpr call and then the corresponding mxc_iomux_mode calls
with the FUNC mode (usually done with mxc_iomux_setup_multiple_pins).
The reverse calls must be done to fee the pins.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:00 +01:00
Uwe Kleine-König 41a1d91e7e remove unused static function gpio_fec_inactive
... from both mx27ads.c and pcm038.c

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Martin Fuzzey <mfuzzey@gmail.com>
2009-03-13 10:33:59 +01:00
Uwe Kleine-König e600eb6b0d fix warning "control reaches end of non-void function"
Add a return 0 analogous to uart_mxc_port[0-2]_exit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Martin Fuzzey <mfuzzey@gmail.com>
2009-03-13 10:33:58 +01:00
Mark Brown 8b785b9dfb mx31ads: Make unexported data static
Keeps sparse happy.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:57 +01:00
Mark Brown 4d5f9cdacb mx31ads: Fix build for missing mx31.h
Several of the macros in mx31ads.h depend on mx31.h which is no longer
included in quite so many standard headers as it once was. Include it
directly so we can build.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:57 +01:00
Mark Brown 39d1dc068b mx31: Add device definitions for the i.MX3x I2C controllers
The i.MX I2C driver has not yet been merged into mainline but it is
near to that and the device defintions don't depend directly on it
so we can add the devices now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:56 +01:00
Holger Schurig e48135519b arm/imx21: Framebuffer support for i.MX21
This patch mimicks what Martin wrote on the mailing list:

* move arch/arm/mach-imx/include/mach/imxfb.h into
  arch/arm/mach-mxc/include/mach/imxfb.h
* changes Kconfig so that CONFIG_FB_IMX is selectable
* adds a platform device (copied from some pengutronix
  patches)

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:55 +01:00
Holger Schurig aa3b0a6f57 arm/imx21: clock support for i.MX21
Based on code from "Martin Fuzzey" <mfuzzey@gmail.com>

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:54 +01:00
Holger Schurig 260a1fd26c arm/imx2x: split i.MX21/i.MX27 register definitions
* define new CONFIG_ARCH_MX21 (this one is currently mutually exclusive to
  CONFIG_ARCH_MX27, but this might change)
* splits one header file. Memory definitions, interrupt sources,
  DMA channels are split into common part, i.MX27 specific and i.MX21
  specific.
* guard access to UART5/UART6, which don't exist on i.MX21

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:53 +01:00
Holger Schurig 058b7a6f46 arm/imx2x: removes a bunch of sparse-warnings
Here are some of the warnings that get fixed by this:

> 200 times: warning: cast adds address space to expression (<asn:2>)
twelve times: warning: symbol 'xxx' was not declared. Should it be static
two times: warning: symbol 'clock' shadows an earlier one
five times: warning: incorrect type in initializer (different address spaces)

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:52 +01:00
Sascha Hauer edfcea80eb [ARM] MX27 Clock rework
This changes MX27 to use common clkdev. It also cleans up MX27 clock
support to be more readable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:51 +01:00
Sascha Hauer d1755e3592 [ARM] MXC: add clkdev support
This patch only adds general clkdev support without actually switching
any MXC architecture to clkdev.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:50 +01:00
Sascha Hauer e65fb0099f [ARM] MXC: remove _clk suffix from clock names
The context makes it clear already that these are clocks, so there's
no need for such a suffix. This patch only changes the clocks actually
used in the tree. The remaining clocks are renamed in the subsequent
architecture specific patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:48 +01:00
Sascha Hauer 30c730f8f9 [ARM] MXC: rework timer/clock initialisation
- rename mxc_clocks_init to architecture specific versions. This
  allows us to have more than one architecture compiled in.
- call mxc_timer_init from clock initialisation instead from board
  code

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:47 +01:00
Sascha Hauer a2865197a5 [ARM] MXC: Use a single function for decoding a PLL
We had 3 versions of this function in clock support for MX1/2/3
Use a single one instead. I picked the one from the MX3 as it seems
to calculate more accurate as the other ones. Also, on MX27 and MX31 mfn
can be negative, this hasn't been handled correctly on MX27 since now.

This patch has been tested on MX27 and MX31 and produces the same clock
frequencies for me.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:46 +01:00
Holger Schurig 5512e88f3a arm/imx21: add kbuild support for the Freescale i.MX21
* adds Kconfig variables
* specifies different physical address for i.MX21 because of the
  different memory layouts
* disables support for UART5/UART6 in the i.MX serial driver
  (the i.MX21 doesn't have those modules)

Based on code from "Martin Fuzzey" <mfuzzey@gmail.com>

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:45 +01:00
Holger Schurig ccfe30a7c8 arm/imx2x: new IOMUX definitions
* removed iomux-mx1-mx2.h completely
* distributes the former contents to four different files (iomux-mx1.h,
  iomux-mx21.h, iomux-mx27.h and the file iomux-mx2x.h, which is common to
  both i.MX21 and i.MX27).
* adds all documented IOMUX definitions for i.MX21 and i.MX27
* fixes a few that were wrong (PD14_AOUT_FEC_CLR, PE16_AF_RTCK).
* don't silenly include <linux/io.h>
* and fixes all collateral damage from above

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:44 +01:00
Samuel CUELLA 16b71fdf97 i810: fix kernel crash fix when struct fb_var_screeninfo is supplied
Prevent the kernel from being crashed by a divide-by-zero operation when
supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

Previously i810_main.c:1005 (i810_check_params) was using the global
'yres' symbol previously defined at i810_main.c:145 as a module parameter
value holder (i810_main.c:2174).  If i810fb is compiled-in or if this
param doesn't get a default value, this direct usage leads to a
divide-by-zero at i810_main.c:1005 (i810_check_params).  The patch simply
replace the 'yres' global, perhaps undefined symbol usage by a given
parameter structure lookup.

This problem occurs with directfb, mplayer -vo fbdev, SDL library.
It was also reported ( but non solved ) at:

	http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.html

Signed-off-by: Samuel CUELLA <samuel.cuella@supinfo.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:12 -07:00
Steven King 9233ecc5c4 m68knommu: m528x build fix
There isn't any mcfqspi.h in the tree, and without it everything inside the
#ifdef CONFIG_SPI is uncompilable.

Signed-off-by: Steven King <sfking@fdwdc.com>
Acked-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:12 -07:00
Steven King 9333d82681 m68knommu: m5206e build fix
Signed-off-by: Steven King <sfking@fdwdc.com>
Acked-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:12 -07:00
Paul E. McKenney 0612ea00a0 rcu: documentation 1Q09 update
Update the RCU documentation to call out the need for callers of
primitives like call_rcu() and synchronize_rcu() to prevent subsequent RCU
readers from hazard.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00
Dhaval Giani be50b8342d kernel/user.c: fix a memory leak when freeing up non-init usernamespaces users
We were returning early in the sysfs directory cleanup function if the
user belonged to a non init usernamespace.  Due to this a lot of the
cleanup was not done and we were left with a leak.  Fix the leak.

Reported-by: Serge Hallyn <serue@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Tested-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00
Atsushi Nemoto d58ab5cf09 mtd: physmap: fix NULL pointer dereference in error path
commit e480814f13 ("[MTD] [MAPS] physmap:
fix wrong free and del_mtd_{partition,device}") introduces a NULL pointer
dereference in physmap_flash_remove when called from the error path in
physmap_flash_probe (if map_probe failed).

Call del_mtd_{partition,device} only if info->cmtd was not NULL.

Reported-by: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00
Lubomir Rintel 9c1e8a4ebc intel-agp: fix a panic with 1M of shared memory, no GTT entries
When GTT size is equal to amount of video memory, the amount of GTT
entries is computed lower than zero, which is invalid and leads to
off-by-one error in intel_i915_configure()

Originally posted here:
http://bugzilla.kernel.org/show_bug.cgi?id=12539
http://bugzilla.redhat.com/show_bug.cgi?id=445592

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Dave Airlie <airlied@linux.ie>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00
Will Newton 229cc58ba2 mtd_dataflash: fix probing of AT45DB321C chips.
Commit 771999b65f ("[MTD] DataFlash: bugfix,
binary page sizes now handled") broke support for probing AT45DB321C flash
chips.  These chips do not support the "page size" status bit, so if we
match the JEDEC id return early.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Will Newton <will.newton@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00
Paul E. McKenney 1b23336ad9 idr: make idr_remove_all() do removal -before- free_layer()
Fix a problem in the IDR system, where an idr_remove_all() hands a data
element to call_rcu() (via free_layer()) before making that data element
inaccessible to new readers.  This is very bad, and results in readers
still having a reference to this data element at the end of the grace
period.

Tests on large machines that concurrently map and unmap user-space memory
within the same multithreaded process result in crashes within about five
minutes.  Applying this patch increases the kernel's longevity to the
three-to-eight-hour range.

There appear to be other similar problems in idr_get_empty_slot() and
sub_remove(), but I fixed the easy one in idr_remove_all() first.  It is
therefore no surprise that failures still occur.

Located-by: Milton Miller II <miltonm@austin.ibm.com>
Tested-by: Milton Miller II <miltonm@austin.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00