]> Pileus Git - ~andy/linux/log
~andy/linux
13 years agoFS-Cache: Add a helper to bulk uncache pages on an inode
David Howells [Thu, 7 Jul 2011 11:19:48 +0000 (12:19 +0100)]
FS-Cache: Add a helper to bulk uncache pages on an inode

Add an FS-Cache helper to bulk uncache pages on an inode.  This will
only work for the circumstance where the pages in the cache correspond
1:1 with the pages attached to an inode's page cache.

This is required for CIFS and NFS: When disabling inode cookie, we were
returning the cookie and setting cifsi->fscache to NULL but failed to
invalidate any previously mapped pages.  This resulted in "Bad page
state" errors and manifested in other kind of errors when running
fsstress.  Fix it by uncaching mapped pages when we disable the inode
cookie.

This patch should fix the following oops and "Bad page state" errors
seen during fsstress testing.

  ------------[ cut here ]------------
  kernel BUG at fs/cachefiles/namei.c:201!
  invalid opcode: 0000 [#1] SMP
  Pid: 5, comm: kworker/u:0 Not tainted 2.6.38.7-30.fc15.x86_64 #1 Bochs Bochs
  RIP: 0010: cachefiles_walk_to_object+0x436/0x745 [cachefiles]
  RSP: 0018:ffff88002ce6dd00  EFLAGS: 00010282
  RAX: ffff88002ef165f0 RBX: ffff88001811f500 RCX: 0000000000000000
  RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000282
  RBP: ffff88002ce6dda0 R08: 0000000000000100 R09: ffffffff81b3a300
  R10: 0000ffff00066c0a R11: 0000000000000003 R12: ffff88002ae54840
  R13: ffff88002ae54840 R14: ffff880029c29c00 R15: ffff88001811f4b0
  FS:  00007f394dd32720(0000) GS:ffff88002ef00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 00007fffcb62ddf8 CR3: 000000001825f000 CR4: 00000000000006e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Process kworker/u:0 (pid: 5, threadinfo ffff88002ce6c000, task ffff88002ce55cc0)
  Stack:
   0000000000000246 ffff88002ce55cc0 ffff88002ce6dd58 ffff88001815dc00
   ffff8800185246c0 ffff88001811f618 ffff880029c29d18 ffff88001811f380
   ffff88002ce6dd50 ffffffff814757e4 ffff88002ce6dda0 ffffffff8106ac56
  Call Trace:
   cachefiles_lookup_object+0x78/0xd4 [cachefiles]
   fscache_lookup_object+0x131/0x16d [fscache]
   fscache_object_work_func+0x1bc/0x669 [fscache]
   process_one_work+0x186/0x298
   worker_thread+0xda/0x15d
   kthread+0x84/0x8c
   kernel_thread_helper+0x4/0x10
  RIP  cachefiles_walk_to_object+0x436/0x745 [cachefiles]
  ---[ end trace 1d481c9af1804caa ]---

I tested the uncaching by the following means:

 (1) Create a big file on my NFS server (104857600 bytes).

 (2) Read the file into the cache with md5sum on the NFS client.  Look in
     /proc/fs/fscache/stats:

Pages  : mrk=25601 unc=0

 (3) Open the file for read/write ("bash 5<>/warthog/bigfile").  Look in proc
     again:

Pages  : mrk=25601 unc=25601

Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago[media] tuner-core.c: don't change type field in g_tuner or g_frequency
Hans Verkuil [Sun, 26 Jun 2011 08:35:34 +0000 (05:35 -0300)]
[media] tuner-core.c: don't change type field in g_tuner or g_frequency

The tuner core should not silently change the type field in g_tuner and
g_frequency. If the tuner is in a different mode than the one that was
requested, then just fill in what you can and don't attempt to read afc,
signal or rxsubchans values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoMerge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 7 Jul 2011 20:19:04 +0000 (13:19 -0700)]
Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.

13 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 7 Jul 2011 20:18:13 +0000 (13:18 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Don't use the EFI reboot method by default
  x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup
  x86, reboot: Acer Aspire One A110 reboot quirk
  x86-32, NUMA: Fix boot regression caused by NUMA init unification on highmem machines

13 years agoMerge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent...
Linus Torvalds [Thu, 7 Jul 2011 20:17:45 +0000 (13:17 -0700)]
Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  debugobjects: Fix boot crash when kmemleak and debugobjects enabled

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  jump_label: Fix jump_label update for modules
  oprofile, x86: Fix race in nmi handler while starting counters

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Disable (revert) SCHED_LOAD_SCALE increase
  sched, cgroups: Fix MIN_SHARES on 64-bit boxen

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 7 Jul 2011 20:16:21 +0000 (13:16 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits)
  sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
  net: refine {udp|tcp|sctp}_mem limits
  vmxnet3: round down # of queues to power of two
  net: sh_eth: fix the parameter for the ETHER of SH7757
  net: sh_eth: fix cannot work half-duplex mode
  net: vlan: enable soft features regardless of underlying device
  vmxnet3: fix starving rx ring whenoc_skb kb fails
  bridge: Always flood broadcast packets
  greth: greth_set_mac_add would corrupt the MAC address.
  net: bind() fix error return on wrong address family
  natsemi: silence dma-debug warnings
  net: 8139too: Initial necessary vlan_features to support vlan
  Fix call trace when interrupts are disabled while sleeping function kzalloc is called
  qlge:Version change to v1.00.00.29
  qlge: Fix printk priority so chip fatal errors are always reported.
  qlge:Fix crash caused by mailbox execution on wedged chip.
  xfrm4: Don't call icmp_send on local error
  ipv4: Don't use ufo handling on later transformed packets
  xfrm: Remove family arg from xfrm_bundle_ok
  ipv6: Don't put artificial limit on routing table size.
  ...

13 years ago[media] cx18/ivtv: fix g_tuner support
Hans Verkuil [Sat, 25 Jun 2011 13:28:21 +0000 (10:28 -0300)]
[media] cx18/ivtv: fix g_tuner support

The driver shouldn't override vt->type, and the tuner name should be
based on vt->type as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: power up tuner when called with s_power(1)
Hans Verkuil [Sat, 25 Jun 2011 13:24:49 +0000 (10:24 -0300)]
[media] tuner-core: power up tuner when called with s_power(1)

Drivers must be able to rely on s_power to power up subdevices.

Note that at this moment no driver attempts to power up tuners. This probably
isn't surprising since s_power(1) was never implemented in tuner-core.c until
now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
Hans Verkuil [Tue, 14 Jun 2011 07:03:26 +0000 (04:03 -0300)]
[media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK

Prohibit attempts to change the tuner to a type that is different
from the device node the ioctl is called from. I.e. the type must
be RADIO for a radio node and ANALOG_TV for a video/vbi node.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: simplify the standard fixup
Hans Verkuil [Mon, 13 Jun 2011 12:47:56 +0000 (09:47 -0300)]
[media] tuner-core: simplify the standard fixup

Get rid of a number of unnecessary tuner_dbg messages by simplifying
the std fixup function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core/v4l2-subdev: document that the type field has to be filled in
Hans Verkuil [Mon, 13 Jun 2011 12:35:56 +0000 (09:35 -0300)]
[media] tuner-core/v4l2-subdev: document that the type field has to be filled in

The tuner ops g_frequency, g_tuner and s_tuner require that the tuner type
field is filled in. Document this.

The tuner-core doc is based on a patch from Mauro Carvalho Chehab <mchehab@redhat.com>.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-subdev.h: remove unused s_mode tuner op
Hans Verkuil [Mon, 13 Jun 2011 12:34:56 +0000 (09:34 -0300)]
[media] v4l2-subdev.h: remove unused s_mode tuner op

s_mode is no longer used, so remove it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] feature-removal-schedule: change in how radio device nodes are handled
Hans Verkuil [Mon, 13 Jun 2011 12:38:54 +0000 (09:38 -0300)]
[media] feature-removal-schedule: change in how radio device nodes are handled

Radio devices have weird side-effects when used with combined TV/radio
tuners and the V4L2 spec is ambiguous on how it should work. This results
in inconsistent driver behavior which makes life hard for everyone.

Be more strict in when and how the switch between radio and tv mode
takes place and make sure all drivers behave the same.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] bttv: fix s_tuner for radio
Hans Verkuil [Sun, 12 Jun 2011 10:02:43 +0000 (07:02 -0300)]
[media] bttv: fix s_tuner for radio

Fix typo: g_tuner should have been s_tuner.

Tested with a bttv card.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pvrusb2: fix g/s_tuner support
Hans Verkuil [Sun, 12 Jun 2011 09:39:52 +0000 (06:39 -0300)]
[media] pvrusb2: fix g/s_tuner support

The tuner-core subdev requires that the type field of v4l2_tuner is
filled in correctly. This is done in v4l2-ioctl.c, but pvrusb2 doesn't
use that yet, so we have to do it manually based on whether the current
input is radio or not.

Tested with my pvrusb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mike Isely <isely@pobox.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
Hans Verkuil [Sun, 12 Jun 2011 09:36:41 +0000 (06:36 -0300)]
[media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner

The subdevs are supposed to receive a valid tuner type for the g_frequency
and g/s_tuner subdev ops. Some drivers do this, others don't. So prefill
this in v4l2-ioctl.c based on whether the device node from which this is
called is a radio node or not.

The spec does not require applications to fill in the type, and if they
leave it at 0 then the 'check_mode' call in tuner-core.c will return
an error and the ioctl does nothing.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: fix tuner_resume: use t->mode instead of t->type
Hans Verkuil [Mon, 13 Jun 2011 12:21:56 +0000 (09:21 -0300)]
[media] tuner-core: fix tuner_resume: use t->mode instead of t->type

set_mode is called with t->type, which is the tuner type. Instead, use
t->mode which is the actual tuner mode (i.e. radio vs tv).

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: fix s_std and s_tuner
Hans Verkuil [Tue, 14 Jun 2011 06:56:09 +0000 (03:56 -0300)]
[media] tuner-core: fix s_std and s_tuner

Both s_std and s_tuner are broken because set_mode_freq is called before the
new std (for s_std) and audmode (for s_tuner) are set.

This patch splits set_mode_freq in a set_mode and a set_freq and in s_std/s_tuner
first calls set_mode, and if that returns 0 (i.e. the mode is supported)
then they set t->std/t->audmode and call set_freq.

This fixes a bug where changing std or audmode would actually change it to
the previous value.

Discovered while testing analog TV standards for cx18 with a tda18271 tuner.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2
Kuninori Morimoto [Thu, 7 Jul 2011 00:58:56 +0000 (17:58 -0700)]
ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2

mask didn't cover update-data

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoxen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.
Konrad Rzeszutek Wilk [Wed, 6 Jul 2011 13:43:16 +0000 (09:43 -0400)]
xen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.

Previously we would check for acpi_sci_override_gsi == gsi every time
a PCI device was enabled. That works during early bootup, but later
on it could lead to triggering unnecessarily the acpi_gsi_to_irq(..) lookup.
The reason is that acpi_sci_override_gsi was declared in __initdata and
after early bootup could contain bogus values.

This patch moves the check for acpi_sci_override_gsi to the
site where the ACPI SCI is preset.

CC: stable@kernel.org
Reported-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Tested-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
[http://lists.xensource.com/archives/html/xen-devel/2011-07/msg00154.html]
Suggested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoplatform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
Axel Lin [Wed, 29 Jun 2011 03:43:30 +0000 (11:43 +0800)]
platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM

Some newly added drivers do not set backlight type, as a result
/sys/class/backlight/<backlight>/type shows incorrect backlight type.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>
Cc: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoARM: cns3xxx: Add support for L2 Cache Controller
Anton Vorontsov [Wed, 6 Jul 2011 12:45:09 +0000 (16:45 +0400)]
ARM: cns3xxx: Add support for L2 Cache Controller

CNS3xxx SOCs have L310-compatible cache controller, so let's use it.

With this patch benchmarking with 'gzip' shows that performance is
doubled, and I'm still able to boot full-fledged userland over NFS
(using PCIe NIC), so the support should be pretty robust.

p.s. While CNS3xxx reports that it has PL310, it still needs to wait
on cache line operations, so we should not select 'CACHE_PL310',
which is a micro-optimization that removes these waits for v7 CPUs.
Someday we'd better rename CACHE_PL310 Kconfig option into
NO_CACHE_WAIT or something less ambiguous.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
13 years agoARM: cns3xxx: Should select CPU_V6K
Imre Kaloz [Thu, 7 Jul 2011 10:19:09 +0000 (12:19 +0200)]
ARM: cns3xxx: Should select CPU_V6K

CNS3XXX is based on MPCore, so select the right CPU option for it.

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
13 years agothinkpad-acpi: handle HKEY 0x4010, 0x4011 events
Henrique de Moraes Holschuh [Sun, 5 Jun 2011 19:22:35 +0000 (16:22 -0300)]
thinkpad-acpi: handle HKEY 0x4010, 0x4011 events

Handle events 0x4010 and 0x4011 so that we do not pester users about them.

These events report when the thinkpad is docked/undocked to a native
hotplug dock (i.e. one that does not need ACPI handling, nor is represented
in the ACPI device tree).  Such docks are based on USB 2.0/3.0, and also
work as port replicators.

We really want a proper dock class to report these, or at least new input
EV_SW events.  Since it is not clear which one to use yet, keep reporting
them as vendor-specific ThinkPad events.

WARNING: As defined by the thinkpad-acpi sysfs ABI rules of engagement, the
vendor-specific events will be REMOVED as soon as generic events are made
available (duplicate events are a big problem), with an appropriate update
to the thinkpad-acpi sysfs/event ABI versioning.  Userspace is already
prepared to provide easy backwards compatibility for such changes when
convenient to the distro (see acpi-fakekey).

* Event 0x4010: docking to hotplug dock/port replicator
* Event 0x4011: undocking from hotplug dock/port replicator

Typical usecase would be to trigger display reconfiguration.

Reports mention T410, T510, and series 3 docks/port replicators.  Special
thanks to Robert de Rooy for his extensive report and analysis of the
situation.

http://www.thinkwiki.org/wiki/ThinkPad_Port_Replicator_Series_3
http://www.thinkwiki.org/wiki/ThinkPad_Mini_Dock_Series_3
http://www.thinkwiki.org/wiki/ThinkPad_Mini_Dock_Plus_Series_3
http://www.thinkwiki.org/wiki/ThinkPad_Mini_Dock_Plus_Series_3_for_Mobile_Workstations
http://lenovoblogs.com/insidethebox/?p=290

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Reported-by: Claudius Hubig <claudiushubig@chubig.net>
Reported-by: Doctor Bill <docbill@gmail.com>
Reported-by: Korte Noack <gbk.noack@gmx.de>
Reported-by: Robert de Rooy <robert.de.rooy@gmail.com>
Reported-by: Sebastian Will <swill@csail.mit.edu>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agodrivers/platform/x86: Fix memory leak
Andre Bartke [Fri, 3 Jun 2011 18:55:43 +0000 (20:55 +0200)]
drivers/platform/x86: Fix memory leak

data is not freed in the error case of
compal_probe().

Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: handle some new HKEY 0x60xx events
Henrique de Moraes Holschuh [Sun, 5 Jun 2011 19:22:34 +0000 (16:22 -0300)]
thinkpad-acpi: handle some new HKEY 0x60xx events

Handle some user interface events from the newer Lenovo models.  We are likely
to do something smart with these events in the future, for now, hide the ones
we are already certain about from the user and userspace both.

* Events 0x6000 and 0x6005 are key-related.  0x6005 is not properly identified
  yet.  Ignore these events, and do not report them.

* Event 0x6040 has not been properly identified yet, and we don't know if it
  is important (looks like it isn't, but still...).  Keep reporting it.

* Change the message the driver outputs on unknown 0x6xxx events, as all
  recent events are not related to thermal alarms.  Degrade log level from
  ALERT to WARNING.

Thanks to all users who reported these events or asked about them in a number
of mailing lists.  Your help is highly appreciated, even if I did took a lot of
time to act on them.  For that I apologise.

I will list those that identified the reasons for the events as "reported-by",
and I apologise in advance if I leave anyone out: it was not done on purpose, I
made the mistake of not properly tagging all event report emails separately,
and might have missed some.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reported-by: Markus Malkusch <markus@malkusch.de>
Reported-by: Peter Giles <g1l3sp@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: fix bitwise bug when set device state
Lee, Chun-Yi [Tue, 31 May 2011 06:20:11 +0000 (14:20 +0800)]
acer-wmi: fix bitwise bug when set device state

Fix a bitwise bug that was found by Joern Heissler, it must be OR
but not AND when we query current device state.

Acked-by: Joern Heissler <linux-acpi@joern.heissler.de>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: Only update rfkill status for associated hotkey events
Seth Forshee [Tue, 21 Jun 2011 17:00:33 +0000 (12:00 -0500)]
acer-wmi: Only update rfkill status for associated hotkey events

acer-wmi is indiscriminately using the device state from hotkey
events to update the various rfkill states. On the Aspire 1830 this
can result in a soft block on the wlan when the touchpad hotkey is
pressed, as it is reporting a non-zero device state that does not
reflect the wireless status. To fix this, only update rfkill states
when a wlan or bluetooth hotkey is pressed.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoARM: 6994/1: smp_twd: Fix typo in 'twd_timer_rate' printing
Vitaly Kuzmichev [Thu, 7 Jul 2011 13:56:05 +0000 (14:56 +0100)]
ARM: 6994/1: smp_twd: Fix typo in 'twd_timer_rate' printing

To get hundredths of MHz the rate needs to be divided by 10'000.
Here is an example:
 twd_timer_rate = 123456789
 Before the patch:
    twd_timer_rate / 1000000 = 123
    (twd_timer_rate / 1000000) % 100 = 23
    Result: 123.23MHz.
 After being fixed:
    twd_timer_rate / 1000000 = 123
    (twd_timer_rate / 10000) % 100 = 45
    Result: 123.45MHz.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agosctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
Wei Yongjun [Sat, 2 Jul 2011 09:28:04 +0000 (09:28 +0000)]
sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it

We forgot to send up SCTP_SENDER_DRY_EVENT notification when
user app subscribes to this event, and there is no data to be
sent or retransmit.

This is required by the Socket API and used by the DTLS/SCTP
implementation.

Reported-by: Michael Tüxen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Tested-by: Robin Seggelmann <seggelmann@fh-muenster.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox86: Don't use the EFI reboot method by default
Matthew Garrett [Wed, 6 Jul 2011 20:52:37 +0000 (16:52 -0400)]
x86: Don't use the EFI reboot method by default

Testing suggests that at least some Lenovos and some Intels will
fail to reboot via EFI, attempting to jump to an unmapped
physical address. In the long run we could handle this by
providing a page table with a 1:1 mapping of physical addresses,
but for now it's probably just easier to assume that ACPI or
legacy methods will be present and reboot via those.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Link: http://lkml.kernel.org/r/1309985557-15350-1-git-send-email-mjg@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoEnable RTC driver.
Jürgen Lambrecht [Tue, 5 Jul 2011 13:35:31 +0000 (15:35 +0200)]
Enable RTC driver.

The MC13783 MFD also contains an RTC. Enable it.
To avoid "No RTC device found, ALARM timers will not wake from suspend",
this patch is needed:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=c008ba58af24dc5d0d8e9fe6e59d876910254761

Signed-off-by: Jürgen Lambrecht <J.Lambrecht@televic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoarm: mxs: add mmc-device for mach-tx28
Wolfram Sang [Fri, 1 Jul 2011 14:54:01 +0000 (16:54 +0200)]
arm: mxs: add mmc-device for mach-tx28

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-mx5/mx53_ard: Add gpio_keys support
Daiane Angolini [Thu, 30 Jun 2011 17:41:46 +0000 (14:41 -0300)]
ARM: mach-mx5/mx53_ard: Add gpio_keys support

Signed-off-by: Daiane Angolini <daiane.angolini@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-mx5/mx53_ard: Add missing definition
Fabio Estevam [Sat, 25 Jun 2011 16:28:53 +0000 (13:28 -0300)]
ARM: mach-mx5/mx53_ard: Add missing definition

commit 9203d59 (ARM:mach-mx5/mx53_ard: Add I2C2 and I2C3 support) missed to include
the define for ARD_I2CPORTEXP_B.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Add keypad support
Fabio Estevam [Mon, 27 Jun 2011 20:12:11 +0000 (17:12 -0300)]
ARM: mx53: Add keypad support

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Add SSI suport
Fabio Estevam [Mon, 27 Jun 2011 20:12:09 +0000 (17:12 -0300)]
ARM: mx53: Add SSI suport

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Add support for missing UARTs
Fabio Estevam [Mon, 27 Jun 2011 20:12:08 +0000 (17:12 -0300)]
ARM: mx53: Add support for missing UARTs

MX53 has five UART ports.

Add support for the missing UART4 and UART5 ports.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agodmaengine: imx-sdma: pass sdma firmware name via platform data
Shawn Guo [Wed, 22 Jun 2011 14:41:31 +0000 (22:41 +0800)]
dmaengine: imx-sdma: pass sdma firmware name via platform data

It is not good to have cpu_name and to_version encoded into sdma
firmware name as variables.  For example, there are three TOs of
imx51 soc, the sdma script never changes since TO1, which means
all three TOs of imx51 uses TO1 version of sdma script.  But we
have to prepare three identical firmwares, sdma-imx51-to1.bin
sdma-imx51-to2.bin and sdma-imx51-to3.bin, to have the kernel
capable of running on all three TOs.

The patch removes cpu_name and to_version from sdma platform data,
and instead uses fw_name to pass the firmware name, so that we can
pass the TO version where it's relevant and skip it where only one
firmware exists.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: clean up imx-dma device registration
Shawn Guo [Wed, 22 Jun 2011 14:41:30 +0000 (22:41 +0800)]
ARM: mxc: clean up imx-dma device registration

The patch follows the implementation of gpio-mxc device registration
to break the concentrated imx-dma device registration into soc
specific setup function.  Then we can avoid the churn of "#ifdef"
and the cpu_is_mx checking on such a long list, which makes no sense,
considering more soc supports need to be added and we need to support
single image for multiple socs in the long run.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM:mach-mx5/mx53_ard: Add I2C2 and I2C3 support
Andre Silva [Wed, 22 Jun 2011 19:33:05 +0000 (16:33 -0300)]
ARM:mach-mx5/mx53_ard: Add I2C2 and I2C3 support

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM:mx53: Add I2C3 support
Andre Silva [Wed, 22 Jun 2011 19:33:04 +0000 (16:33 -0300)]
ARM:mx53: Add I2C3 support

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Add touchscreen support
Fabio Estevam [Wed, 22 Jun 2011 12:25:26 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Add touchscreen support

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Add LCD support
Fabio Estevam [Wed, 22 Jun 2011 12:25:25 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Add LCD support

On mx27_3ds board there is a l4f00242t03 LCD that is controlled via CSPI1.

Add support for CSPI1 and LCD.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx51: Add support for low power suspend on MX51
Dinh Nguyen [Mon, 28 Mar 2011 15:14:57 +0000 (10:14 -0500)]
ARM: mx51: Add support for low power suspend on MX51

Adds initial low power suspend functionality to MX51.
Supports "mem" and "standby" modes.

Tested on mx51-babbage.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
Tested-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: imx2: Fix GPIO iosize
Fabio Estevam [Tue, 21 Jun 2011 17:49:35 +0000 (14:49 -0300)]
ARM: imx2: Fix GPIO iosize

On MX1, MX21 and MX27 each GPIO port has an address space of 256 bytes.

Fix the iosize for these platforms.

Tested on a mx27_3ds board that can boot fine after this change.

Cc: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Add SDMA support for MX53
Fabio Estevam [Mon, 13 Jun 2011 00:33:00 +0000 (21:33 -0300)]
ARM: mx53: Add SDMA support for MX53

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Add SDMA clock
Fabio Estevam [Wed, 15 Jun 2011 12:59:35 +0000 (09:59 -0300)]
ARM: mx53: Add SDMA clock

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM:mach-mx5/mx53_ard: Add Watchdog timer support
Andre Silva [Mon, 13 Jun 2011 17:31:58 +0000 (14:31 -0300)]
ARM:mach-mx5/mx53_ard: Add Watchdog timer support

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM:mach-mx5/mx53_ard: Add ESDHC support
Andre Silva [Mon, 13 Jun 2011 17:31:57 +0000 (14:31 -0300)]
ARM:mach-mx5/mx53_ard: Add ESDHC support

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM:mach-mx5/board-mx51_babbage: Add CD and WP GPIOs
Andre Silva [Fri, 10 Jun 2011 16:15:20 +0000 (13:15 -0300)]
ARM:mach-mx5/board-mx51_babbage: Add CD and WP GPIOs

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM:mach-mx5/board-mx53_loco: Add CD and WP GPIOs
Andre Silva [Fri, 10 Jun 2011 16:15:19 +0000 (13:15 -0300)]
ARM:mach-mx5/board-mx53_loco: Add CD and WP GPIOs

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-mx5/mx53_ard: Add support for i.MX53 ARD board
Andre Silva [Fri, 10 Jun 2011 16:08:14 +0000 (13:08 -0300)]
ARM: mach-mx5/mx53_ard: Add support for i.MX53 ARD board

Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: convert tzic to use generic irq chip
Shawn Guo [Tue, 7 Jun 2011 05:59:14 +0000 (13:59 +0800)]
ARM: mxc: convert tzic to use generic irq chip

The patch converts mxc tzic interrupt controller to use generic irq
chip.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxs/mx28evk: add leds-gpio device for heartbeat
Shawn Guo [Tue, 31 May 2011 09:07:03 +0000 (17:07 +0800)]
ARM: mxs/mx28evk: add leds-gpio device for heartbeat

It adds LED2 on mx28evk board as heartbeat trigger for diagnostic
purpose.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx5/mx53_evk: Add support for LED
Fabio Estevam [Mon, 30 May 2011 15:42:26 +0000 (12:42 -0300)]
ARM: mx5/mx53_evk: Add support for LED

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx5/mx53_loco: Add support for LED
Fabio Estevam [Sat, 28 May 2011 14:51:32 +0000 (11:51 -0300)]
ARM: mx5/mx53_loco: Add support for LED

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxs_defconfig: Add mx23evk and mx28evk build
Shawn Guo [Wed, 25 May 2011 13:55:39 +0000 (21:55 +0800)]
ARM: mxs_defconfig: Add mx23evk and mx28evk build

The patch adds following configurations to enable build of mx23evk
and mx28evk in defconfig.

  CONFIG_MACH_MX23EVK
  CONFIG_MACH_MX28EVK

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoMerge remote-tracking branch 'grant/gpio/next-mx' into devel-features
Sascha Hauer [Thu, 7 Jul 2011 08:00:49 +0000 (10:00 +0200)]
Merge remote-tracking branch 'grant/gpio/next-mx' into devel-features

Conflicts:
arch/arm/mach-imx/mach-mx31_3ds.c
arch/arm/mach-imx/mach-scb9328.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX debug macro: use CONFIG_SOC_* instead of CONFIG_ARCH_*
Sascha Hauer [Thu, 19 May 2011 15:25:05 +0000 (17:25 +0200)]
ARM i.MX debug macro: use CONFIG_SOC_* instead of CONFIG_ARCH_*

CONFIG_ARCH_* are deprecated, so remove one user.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Do not annotate the chip select as internal
Fabio Estevam [Wed, 22 Jun 2011 12:25:28 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Do not annotate the chip select as internal

On the i.MX SPI driver the chipselect pins can be of the following types:

- internal: when the chipselect pin is used as a dedicated CS pin of the CSPI controller
- GPIO: a generic GPIO can be used as a chipselect funtion

On the mx27_3ds the SPI2 chip select is a GPIO, so don't annotate 'internal' in the chip select
definition.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Use the standard gpio_to_irq function
Fabio Estevam [Wed, 22 Jun 2011 12:25:27 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Use the standard gpio_to_irq function

Use the standard gpio_to_irq function instead of a dedicated IRQ_GPIOx macro.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/scb9328: Make the UART gpio setup simpler
Fabio Estevam [Tue, 21 Jun 2011 17:49:36 +0000 (14:49 -0300)]
ARM: mach-imx/scb9328: Make the UART gpio setup simpler

Place the UART gpio initialization inside the scb9328_init function as it is done on
other i.MX boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoplat-mxc/pwm.c: use resource_size()
H Hartley Sweeten [Mon, 6 Jun 2011 20:44:57 +0000 (13:44 -0700)]
plat-mxc/pwm.c: use resource_size()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: imx/mach-apf9328: Simplify UART0 registration
Fabio Estevam [Tue, 10 May 2011 14:21:00 +0000 (11:21 -0300)]
ARM: imx/mach-apf9328: Simplify UART0 registration

As no flag is passed into UART0 platform data, pass NULL argument
when registering UART0.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX: get rid of wrong MXC_INTERNAL_IRQ usage
Sascha Hauer [Wed, 11 May 2011 09:31:54 +0000 (11:31 +0200)]
ARM i.MX: get rid of wrong MXC_INTERNAL_IRQ usage

There are several occurences where MXC_INTERNAL_IRQ is
assumed to be the start of the gpio interrupts. It was never
meant this way. Replace these with gpio_to_irq.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoARM i.MX avic: do not depend on MXC_INTERNAL_IRQS
Sascha Hauer [Tue, 10 May 2011 16:16:10 +0000 (18:16 +0200)]
ARM i.MX avic: do not depend on MXC_INTERNAL_IRQS

This becomes meaningless in subsequent patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX tzic: do not depend on MXC_INTERNAL_IRQS
Sascha Hauer [Tue, 10 May 2011 16:15:25 +0000 (18:15 +0200)]
ARM i.MX tzic: do not depend on MXC_INTERNAL_IRQS

This becomes meaningless in subsequent patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX mxc.h: use CONFIG_SOC_* instead of CONFIG_ARCH_*
Sascha Hauer [Thu, 19 May 2011 15:23:44 +0000 (17:23 +0200)]
ARM i.MX mxc.h: use CONFIG_SOC_* instead of CONFIG_ARCH_*

CONFIG_ARCH_* are deprecated, so remove one user.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX: dmav1: kill SoC ifdefs
Sascha Hauer [Mon, 9 May 2011 16:41:35 +0000 (18:41 +0200)]
ARM i.MX: dmav1: kill SoC ifdefs

since we now can include all soc specific headers at once we do not
need the ifdeffery anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX: remove SoC defines around header includes
Sascha Hauer [Mon, 9 May 2011 16:38:51 +0000 (18:38 +0200)]
ARM i.MX: remove SoC defines around header includes

All soc specific header have proper namespace now and thus can
be included at once.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX: define CLOCK_TICK_RATE to bogus value
Sascha Hauer [Mon, 9 May 2011 16:30:14 +0000 (18:30 +0200)]
ARM i.MX: define CLOCK_TICK_RATE to bogus value

We have a clocksource which renders CLOCK_TICK_RATE useless. Define
it to a bogus value to get rid of some ifdeffery.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX: fix last user of iomux.h and remove it
Sascha Hauer [Mon, 9 May 2011 16:29:00 +0000 (18:29 +0200)]
ARM i.MX: fix last user of iomux.h and remove it

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxs/tx28: convert to new leds-gpio registration helper
Uwe Kleine-König [Sat, 28 May 2011 19:05:03 +0000 (21:05 +0200)]
ARM: mxs/tx28: convert to new leds-gpio registration helper

This allows to move the led definition to .init.rodata.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx5: convert to new leds-gpio registration helper
Uwe Kleine-König [Sat, 28 May 2011 19:05:02 +0000 (21:05 +0200)]
ARM: mx5: convert to new leds-gpio registration helper

This gets rid of per machine struct platform_device definitions and allows
to move the platform data and led definition to .init.rodata.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: imx: convert to new leds-gpio registration helper
Uwe Kleine-König [Sat, 28 May 2011 19:05:01 +0000 (21:05 +0200)]
ARM: imx: convert to new leds-gpio registration helper

This gets rid of per machine struct platform_device definitions and allows
to move the platform data and led definition to .init.rodata.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx5/mx51_babbage: Use gpio_request_array for USBH1 pins
Fabio Estevam [Sat, 28 May 2011 13:54:36 +0000 (10:54 -0300)]
ARM: mx5/mx51_babbage: Use gpio_request_array for USBH1 pins

Instead of using gpio_request followed by gpio_direction_output use gpio_request_array
when requesting multiple pins.

Also fixed the location of the delay for the reset and make the BABBAGE_USB_PHY_RESET to toggle.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx5/mx51_babbage: Move GPIO initialization for USB PHY Reset line to common...
Fabio Estevam [Sat, 28 May 2011 13:54:35 +0000 (10:54 -0300)]
ARM: mx5/mx51_babbage: Move GPIO initialization for USB PHY Reset line to common place

The USB PHY Reset GPIO can be configured in the same place as the other GPIOs.

While at it rename the pin as BABBAGE_USB_PHY_RESET to make clearer its purpose.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: i.MX53: Fix IOMUX type o's
Troy Kisky [Thu, 7 Jul 2011 02:56:03 +0000 (19:56 -0700)]
ARM: i.MX53: Fix IOMUX type o's

", o" was used for ", 0"

", 17" was used for ", 7 | 0x10"

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX dma: Fix burstsize settings
Sascha Hauer [Wed, 6 Jul 2011 09:18:33 +0000 (11:18 +0200)]
ARM i.MX dma: Fix burstsize settings

dmaengine expects the maxburst parameter in words, not bytes.
The imxdma driver and its users do this wrong. Fix this.

As a side note the imx-pcm-dma-mx2 driver was 'fixed' to work
with imx-dma. This broke the driver with imx-sdma support which
correctly takes the maxburst parameter in words. This patch
puts the sdma based sound back to work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agodrm/kms: allow drm_mode_group with no objects
Ben Skeggs [Mon, 4 Jul 2011 03:16:17 +0000 (03:16 +0000)]
drm/kms: allow drm_mode_group with no objects

Sometimes we could be controlling a device (such as an NVIDIA Tesla) that
has no crtcs/encoders/connectors.

One could argue that the driver should unset DRIVER_MODESET in this case,
but that changes a whole heap of the DRM's other behaviours, and it's much
easier to just be a modesetting driver without any outputs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: free ib pool on module unloading
Jerome Glisse [Wed, 6 Jul 2011 18:30:09 +0000 (18:30 +0000)]
drm/radeon/kms: free ib pool on module unloading

ib pool weren't free for various newer asic on module unload.
This doesn't cause much arm but still could be candidate for
stable.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
cc: stable@kernel.org
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix typo in evergreen disp int status register
Alex Deucher [Wed, 6 Jul 2011 19:37:47 +0000 (19:37 +0000)]
drm/radeon/kms: fix typo in evergreen disp int status register

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix typo in IH_CNTL swap bitfield
Alex Deucher [Wed, 6 Jul 2011 19:52:27 +0000 (19:52 +0000)]
drm/radeon/kms: fix typo in IH_CNTL swap bitfield

Only affects BE systems.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agonet: refine {udp|tcp|sctp}_mem limits
Eric Dumazet [Thu, 7 Jul 2011 07:27:05 +0000 (00:27 -0700)]
net: refine {udp|tcp|sctp}_mem limits

Current tcp/udp/sctp global memory limits are not taking into account
hugepages allocations, and allow 50% of ram to be used by buffers of a
single protocol [ not counting space used by sockets / inodes ...]

Lets use nr_free_buffer_pages() and allow a default of 1/8 of kernel ram
per protocol, and a minimum of 128 pages.
Heavy duty machines sysadmins probably need to tweak limits anyway.

References: https://bugzilla.stlinux.com/show_bug.cgi?id=38032
Reported-by: starlight <starlight@binnacle.cx>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: hda - Change all ADCs for dual-adc switching mode for Realtek
Takashi Iwai [Thu, 7 Jul 2011 07:25:54 +0000 (09:25 +0200)]
ALSA: hda - Change all ADCs for dual-adc switching mode for Realtek

When the dual-adc switching mode is active in Realtek auto-parser,
we need to couple all ADCs as a single capture-volume.  Currently, the
volume control changes only the first ADC, thus others may remain silent.
This patch fixes the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agovmxnet3: round down # of queues to power of two
Shreyas Bhatewara [Thu, 7 Jul 2011 07:25:52 +0000 (00:25 -0700)]
vmxnet3: round down # of queues to power of two

vmxnet3 device supports only power-of-two number of queues. The driver
therefore needs to check this and rounds down the number of queues to the
nearest power of two.

Signed-off-by: Yong Wang <yongwang@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
13 years agomach-mx5: fix the I2C clock parents
Lothar Waßmann [Mon, 4 Jul 2011 13:52:17 +0000 (15:52 +0200)]
mach-mx5: fix the I2C clock parents

The clock from which the I2C timing is derived is the ipg_perclk not ipg_clk.

I2C bus frequency was lower by a factor of ~8 due to the clock divider
calculation being based on 66.5MHz IPG clock while the bus actually
uses 8MHz ipg_perclk.

Kernel version: 3.0.0-rc2 branch 'imx-for-next' of git://git.pengutronix.de/git/imx/linux-2.6

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxs/tx28: according to the TX28's datasheet D4-D7 are not used for MMC0
Uwe Kleine-König [Tue, 5 Jul 2011 10:06:36 +0000 (12:06 +0200)]
ARM: mxs/tx28: according to the TX28's datasheet D4-D7 are not used for MMC0

The pins are actually used (not in mainline yet):

D4 -> SSP2_D0
D5 -> GPIO
D6 -> GPIO
D7 -> GPIO for owire

so their pinmapping for SSP0 is wrong.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX23/28: platform-mxsfb: Add missing include of linux/dma-mapping.h
Axel Lin [Thu, 30 Jun 2011 13:35:03 +0000 (21:35 +0800)]
ARM i.MX23/28: platform-mxsfb: Add missing include of linux/dma-mapping.h

Fix below build error:
  CC      arch/arm/mach-mxs/devices/platform-mxsfb.o
arch/arm/mach-mxs/devices/platform-mxsfb.c: In function 'mx23_add_mxsfb':
arch/arm/mach-mxs/devices/platform-mxsfb.c:27: error: implicit declaration of function 'DMA_BIT_MASK'
make[2]: *** [arch/arm/mach-mxs/devices/platform-mxsfb.o] Error 1
make[1]: *** [arch/arm/mach-mxs/devices] Error 2
make: *** [arch/arm/mach-mxs] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Fix some interrupts marked as reserved.
Fabio Estevam [Tue, 28 Jun 2011 15:58:36 +0000 (12:58 -0300)]
ARM: mx53: Fix some interrupts marked as reserved.

Mark the actual interrupt source for some interrupts currently marked as reserved.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoMXC: iomux-v3: correct NO_PAD_CTRL definition
Troy Kisky [Fri, 24 Jun 2011 17:52:56 +0000 (10:52 -0700)]
MXC: iomux-v3: correct NO_PAD_CTRL definition

iomux-v3.c uses NO_PAD_CTRL as a 32 bit value
so it should not be shifted left by MUX_PAD_CTRL_SHIFT(41)

Previously, anything requesting NO_PAD_CTRL would get
their pad control register set to 0.

Since it is a pad control mask, place it with the other mask values.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx51: Fix the address space length for SSI
Fabio Estevam [Mon, 27 Jun 2011 20:12:10 +0000 (17:12 -0300)]
ARM: mx51: Fix the address space length for SSI

On MX51 the address space length for SSI is 16KB.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: imx-dma on imx25 has no other TO version but TO1
Shawn Guo [Wed, 22 Jun 2011 14:41:29 +0000 (22:41 +0800)]
ARM: mxc: imx-dma on imx25 has no other TO version but TO1

The imx25 sdma script only gets TO1 version, so there is no need
to encode "to1" in the variable name.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: change imx-dma default to_version to 1
Shawn Guo [Wed, 22 Jun 2011 14:41:28 +0000 (22:41 +0800)]
ARM: mxc: change imx-dma default to_version to 1

The value 0 is not a valid TO version number.  With the current
code, imx-sdma driver will try to load firmware sdma-imx25-to0.bin,
which is obviously not a good name.  Instead, sdma-imx25-to1.bin
makes much more sense.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: sdma on imx25 is a V2 block
Shawn Guo [Wed, 22 Jun 2011 14:41:27 +0000 (22:41 +0800)]
ARM: mxc: sdma on imx25 is a V2 block

The sdma on soc imx25 is not a V1 but V2 block.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: imx-sdma device gets 16K iosize than 4K
Shawn Guo [Wed, 22 Jun 2011 14:41:26 +0000 (22:41 +0800)]
ARM: mxc: imx-sdma device gets 16K iosize than 4K

The sdma on all imx soc gets 16K IO space not 4K.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: iomux-v1: Fix build warning
Fabio Estevam [Wed, 22 Jun 2011 14:31:00 +0000 (11:31 -0300)]
ARM: mxc: iomux-v1: Fix build warning

Fix the following warning:

CC      arch/arm/plat-mxc/iomux-v1.o
arch/arm/plat-mxc/iomux-v1.c: In function 'mxc_gpio_setup_multiple_pins':
arch/arm/plat-mxc/iomux-v1.c:160: warning: 'ret' may be used uninitialized in this function
arch/arm/plat-mxc/iomux-v1.c:160: note: 'ret' was declared here

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Fix regulator support
Fabio Estevam [Wed, 22 Jun 2011 12:25:24 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Fix regulator support

Fix the 2.8V (VMMC1) and 1.8V (VGEN) voltage generation on mx27_3ds.

Also configure the IOMUX for the PMIC interrupt pin and for the CSPI chip select that is connected
to the MC13783 PMIC.

In order to get the voltage for the LCD (2.8V and 1.8V) it is also necessary to turn on GPO1 and GPO3
supplies because they are connected to switches that enable these two voltages.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agomxc: iomuxv1: Do not use gpio_request when setting the pin as GPIO
Fabio Estevam [Tue, 21 Jun 2011 17:49:37 +0000 (14:49 -0300)]
mxc: iomuxv1: Do not use gpio_request when setting the pin as GPIO

When setting the IOMUX of multiple pins via mxc_gpio_setup_multiple_pins, gpio_request
is called and this prevents subsequent calls of gpio_request done by drivers to succeed.

Remove gpio_request call from mxc_gpio_setup_multiple_pins function.

As gpio_request is removed from mxc_gpio_setup_multiple_pins, there is no need to have
mxc_gpio_release_multiple_pins anymore, so remove this function.

Tested on a mx27_3ds board and after applying this patch it is possible to define all the
IOMUX setup in a static array

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>