Daisuke Nishimura [Wed, 11 Aug 2010 01:02:59 +0000 (18:02 -0700)]
memcg: remove mem from arg of charge_common
mem_cgroup_charge_common() is always called with @mem = NULL, so it's
meaningless. This patch removes it.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daisuke Nishimura [Wed, 11 Aug 2010 01:02:59 +0000 (18:02 -0700)]
memcg: remove redundant code
- try_get_mem_cgroup_from_mm() calls rcu_read_lock/unlock by itself, so we
don't have to call them in task_in_mem_cgroup().
- *mz is not used in __mem_cgroup_uncharge_common().
- we don't have to call lookup_page_cgroup() in mem_cgroup_end_migration()
after we've cleared PCG_MIGRATION of @oldpage.
- remove empty comment.
- remove redundant empty line in mem_cgroup_cache_charge().
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KAMEZAWA Hiroyuki [Wed, 11 Aug 2010 01:02:58 +0000 (18:02 -0700)]
memcg: clean up waiting move acct
Now, for checking a memcg is under task-account-moving, we do css_tryget()
against mc.to and mc.from. But this is just complicating things. This
patch makes the check easier.
This patch adds a spinlock to move_charge_struct and guard modification of
mc.to and mc.from. By this, we don't have to think about complicated
races arount this not-critical path.
[balbir@linux.vnet.ibm.com: don't crash on a null memcg being passed]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KAMEZAWA Hiroyuki [Wed, 11 Aug 2010 01:02:57 +0000 (18:02 -0700)]
memcg: clean up try_charge main loop
mem_cgroup_try_charge() has a big loop in it and seems to be hard to read.
Most of routines are for slow path. This patch moves codes out from the
loop and make it clear what's done.
Summary:
- refactoring a function to detect a memcg is under acccount move or not.
- refactoring a function to wait for the end of moving task acct.
- refactoring a main loop('s slow path) as a function and make it clear
why we retry or quit by return code.
- add fatal_signal_pending() check for bypassing charge loops.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KAMEZAWA Hiroyuki [Wed, 11 Aug 2010 01:02:56 +0000 (18:02 -0700)]
memcg: remove experimental from swap account config
It's 11 months since we changed swap_map[] to indicates SWAP_HAS_CACHE.
Since that, memcg's swap accounting has been very stable and it seems
it can be maintained.
So, I'd like to remove EXPERIMENTAL from the config.
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Wright [Wed, 11 Aug 2010 01:02:55 +0000 (18:02 -0700)]
blkdev: cgroup whitelist permission fix
The cgroup device whitelist code gets confused when trying to grant
permission to a disk partition that is not currently open. Part of
blkdev_open() includes __blkdev_get() on the whole disk.
Basically, the only ways to reliably allow a cgroup access to a partition
on a block device when using the whitelist are to 1) also give it access
to the whole block device or 2) make sure the partition is already open in
a different context.
The patch avoids the cgroup check for the whole disk case when opening a
partition.
Addresses https://bugzilla.redhat.com/show_bug.cgi?id=589662
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Serge E. Hallyn <serue@us.ibm.com>
Reported-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Wed, 11 Aug 2010 01:02:54 +0000 (18:02 -0700)]
cgroups: save space for the terminator
The original code didn't leave enough space for a NULL terminator. These
strings are copied with strcpy() into fixed length buffers in
cgroup_root_from_opts().
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Serge E. Hallyn <serge@hallyn.com>
Reviewd-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ben Blum <bblum@andrew.cmu.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Wed, 11 Aug 2010 01:02:53 +0000 (18:02 -0700)]
Documentation/padata.txt: fix typos etc.
Fix typos & grammar.
Use CPU instead of cpu in text.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Shijie [Wed, 11 Aug 2010 01:02:52 +0000 (18:02 -0700)]
Documentation/00-INDEX: remove reference to exception.txt
The exception.txt has been removed from the Documentation directory. So
update the index file for it.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Hutchings [Wed, 11 Aug 2010 01:02:51 +0000 (18:02 -0700)]
docbook: need xmldoclinks for all doc types
$ rm -rf build
$ mkdir build
$ cp .config build
$ make O=build htmldocs
...
xmlto: linux-2.6/build/Documentation/DocBook/media.xml
does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
linux-2.6/build/Documentation/DocBook/media.xml:4:
warning: failed to load external entity
"linux-2.6/build/Documentation/DocBook/media-entities.tmpl"
We need the xmldoclinks built for any document types built from the
XML sources.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Andy Whitcroft <apw@canonical.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Wed, 11 Aug 2010 01:02:50 +0000 (18:02 -0700)]
Documentation/networking/wavelan.txt: deleted, not in tree
Commit
1d794e3b353b ("Staging: wavelan: delete the driver") removed the
source, so remove the documentation as well.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Wed, 11 Aug 2010 01:02:50 +0000 (18:02 -0700)]
mtd/nand_base: fix kernel-doc warnings & typos
Fix mtd/nand_base.c kernel-doc warnings and typos.
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'mtd'
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'ofs'
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'len'
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'invert'
Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'mtd'
Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'ofs'
Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'len'
Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'mtd'
Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'ofs'
Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'len'
Warning(drivers/mtd/nand/nand_base.c:2087): No description found for parameter 'len'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Wed, 11 Aug 2010 01:02:48 +0000 (18:02 -0700)]
fusion: fix kernel-doc warnings
Fix (delete) empty kernel-doc lines/warnings:
Warning(drivers/message/fusion/mptbase.c:6916): bad line:
Warning(drivers/message/fusion/mptbase.c:7060): bad line:
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Changli Gao [Wed, 11 Aug 2010 01:02:48 +0000 (18:02 -0700)]
reiserfs: remove unused local `wait'
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Wed, 11 Aug 2010 01:02:47 +0000 (18:02 -0700)]
drivers/video/igafb.c: make igafb_setup() and igafb_init() static
Cc: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kulikov Vasiliy [Wed, 11 Aug 2010 01:02:47 +0000 (18:02 -0700)]
drivers/video/igafb.c: introduce lost 'return'
If iga_init() fails, code releases resources and continues to use it. It
seems that after releasing resources 'return' should be.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel De Graaf [Wed, 11 Aug 2010 01:02:45 +0000 (18:02 -0700)]
fbmem: VM_IO set, but not propagated
When we setup up the VMA flags for the mmap flag and we end up using the
fallback mmap functionality we set the vma->vm_flags |= VM_IO. However we
neglect to propagate the flag to the vma->vm_page_prot.
This bug was found when Linux kernel was running under Xen. In that
scenario, any page that has VM_IO flag to it, means that it MUST be a
MMIO/VRAM backend memory , _not_ System RAM. That is what the fbmem.c
does: sets VM_IO, ioremaps the region - everything is peachy.
Well, not exactly. The vm_page_prot does not get the relevant PTE flags
set (_PAGE_IOMAP) which under Xen is a death-kneel to pages that are
referencing real physical devices but don't have that flag set.
This patch fixes this.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Tested-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maurus Cuelenaere [Wed, 11 Aug 2010 01:02:44 +0000 (18:02 -0700)]
arm: samsung: remove pixclock from several boards
Since "s3c-fb: Automatically calculate pixel clock when none is given",
there's no need for manually calculating the pixel clock anymore so remove
these lines and add the correct refresh rate where appropriately.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Cc: Pawel Osciak <p.osciak@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maurus Cuelenaere [Wed, 11 Aug 2010 01:02:44 +0000 (18:02 -0700)]
s3c-fb: automatically calculate pixel clock when none is given
Add a simple algorithm which calculates the pixel clock based on the video
mode parameters. This is only done when no pixel clock is supplied
through the platform data.
This allows drivers to omit the pixel clock data and thus share the
algorithm used for calculating it.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Cc: Pawel Osciak <p.osciak@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Tested-by: Donghwa Lee <yiffie9819@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:43 +0000 (18:02 -0700)]
s3c-fb: add support for DMA channel control on S5PV210
S5PV210 SoCs allow enabling/disabling DMA channels per window. For a
window to display data from framebuffer memory, its channel has to be
enabled.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:02:42 +0000 (18:02 -0700)]
s3c-fb: fix section mismatch
This patch fixes the following section mismatch errors:
WARNING: vmlinux.o(.data+0x20b40): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown)
The variable s3c_fb_driver_ids references
the (unknown reference) __devinitdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
WARNING: vmlinux.o(.data+0x20b58): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown)
The variable s3c_fb_driver_ids references
the (unknown reference) __devinitdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
WARNING: vmlinux.o(.data+0x20b70): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown)
The variable s3c_fb_driver_ids references
the (unknown reference) __devinitdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:41 +0000 (18:02 -0700)]
s3c-fb: protect window-specific registers during updates
Newer hardware (S3C6410, S5P) have the ability to block updates from
shadow registers during reconfiguration. Add protect calls for set_par
and clear protection when resetting.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:40 +0000 (18:02 -0700)]
s3c-fb: correct window osd size and alpha register handling
S3C64xx and S5P OSD registers for OSD size and alpha are as follows:
VIDOSDC: win 0 - size, win 1-4: alpha
VIDOSDD: win 1-2 - size; not present for windows 0, 3 and 4
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:40 +0000 (18:02 -0700)]
s3c-fb: add SHADOWCON shadow register locking support for S5PV210
S5PV210 allows per-window locking of register value updates from shadow
registers.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:39 +0000 (18:02 -0700)]
s3c-fb: window 3 of 64xx+ does not have an osd_d register
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:38 +0000 (18:02 -0700)]
s3c-fb: add wait for VSYNC ioctl
Add VSYNC interrupt support and an ioctl that allows waiting for it.
Interrupts are turned on only when needed.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:38 +0000 (18:02 -0700)]
s3c-fb: add support for display panning
Supports all bpp modes.
The PRTCON register is used to disable in-hardware updates of registers
that store start and end addresses of framebuffer memory. This prevents
display corruption in case we do not make it before VSYNC with updating
them atomically. With this feature there is no need to wait for a VSYNC
interrupt before each such update.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:37 +0000 (18:02 -0700)]
s3c-fb: add device name initialization
Add framebuffer device name initialization calls for S3C2443, S3C64xx and
S5P machines.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:36 +0000 (18:02 -0700)]
s3c-fb: separate S5PC100 and S5PV210 framebuffer driver data structures
S5PC100 and S5PV210 framebuffer devices differ slightly in terms of
available registers and their driver data structures have to be separate.
Those differences include dissimilar ways to control shadow register
updates.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:36 +0000 (18:02 -0700)]
s3c-fb: correct FRAMESEL1 bitfield defines for VIDINTCON0 register
FRAMESEL1 bitfield starts on 13th bit, not on 14th.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pawel Osciak [Wed, 11 Aug 2010 01:02:35 +0000 (18:02 -0700)]
s3c-fb: fix various null references on framebuffer memory alloc failure
The following problems were found in the above situation:
sfb->windows[win] was being assigned at the end of s3c_fb_probe_win only.
This resulted in passing a NULL to s3c_fb_release_win if probe_win
returned early and a memory leak.
dma_free_writecombine does not allow its third argument to be NULL.
fb_dealloc_cmap does not verify whether its argument is not NULL.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Wed, 11 Aug 2010 01:02:34 +0000 (18:02 -0700)]
s3c-fb: integrate palette setup code into main driver
Remove the palette setup code from the header files and put it into the
main driver.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: KyungMin Park <kyungmin.park.samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Wed, 11 Aug 2010 01:02:34 +0000 (18:02 -0700)]
s3c-fb: udpate to support s3c2416/s3c2443 style hardware
Update the variant and window variant structures with the necessary
changes to support the older style of hardware where these are not in the
same place.
Add the support for the s3c2443/s3c2416 hardware by using the
platform-device s3c2443 to cover both, and add the initialisation data for
these.
Also change to including just the v4 header files for the moment until the
last of the merging of these is sorted out.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: KyungMin Park <kyungmin.park.samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Wed, 11 Aug 2010 01:02:33 +0000 (18:02 -0700)]
s3c-fb: initial move to unifying the header files
Remove the various header files that configure this driver and use the
platform device name to select the correct configuration at probe time.
Currently this does not remove the header files, only updates the driver
and the relevant platform files.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: KyungMin Park <kyungmin.park.samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Wed, 11 Aug 2010 01:02:32 +0000 (18:02 -0700)]
s3c-fb: only init window colour key controls for windows with blending
The driver clears all windows, but also sets the windows' colour key
controls at the same time. However, the last window does not have these
registers as it is always blended into the previous window.
Move the colour key initialisation into the probe, and run it for only
nr_win-1 windows.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: KyungMin Park <kyungmin.park.samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
InKi Dae [Wed, 11 Aug 2010 01:02:32 +0000 (18:02 -0700)]
s3c-fb: fix distortedness situation for the mode more then 24bpp
It has been working fine at 16bpp but in case of pixel format more then
24bpp it would occur distortedness situation on that mode. so this patch
set the word swap control bit of WINCONx to 1 as default value. but it
should be set to 0 in case that each ENLOCAL bit of WINCON0 ~ 2 registers
is enabled. this issue would be solved with local path feature soon.
Signed-off-by: InKi Dae <inki.dae@samsung.com>
Reviewed-by: KyungMin Park <kyungmin.park.samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
InKi Dae [Wed, 11 Aug 2010 01:02:31 +0000 (18:02 -0700)]
s3c-fb: add default window feature.
s5pv210 has five window layers (window0 ~ 4), among them, window0 ~ 2
could be used for local path with fimc(capture device) and fimd writeback
feature so this patch makes default window layer for UI to be set at
machine code.
Signed-off-by: InKi Dae <inki.dae@samsung.com>
Reviewed-by: KyungMin Park <kyungmin.park.samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Wed, 11 Aug 2010 01:02:30 +0000 (18:02 -0700)]
s3c-fb: change to depending on CONFIG_S3C_FB_DEV
As suggested by Marek Szyprowski, we should make the driver depend on the
configuration currently being used to build the platform device into the
kernel.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: KyungMin Park <kyungmin.park.samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Denys Vlasenko [Wed, 11 Aug 2010 01:02:30 +0000 (18:02 -0700)]
drivers/video/fbmem.c: simplify strlen()==0 check in fb_get_options()
Replaced !strlen(str) check with !str[0]. Removed the variable which was
used solely to store strlen result.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Denys Vlasenko [Wed, 11 Aug 2010 01:02:29 +0000 (18:02 -0700)]
fbcon: uninline four foo_update_attr() functions
This patch uninlines four similar functions, foo_update_attr(), in four
fbcon-related files.
These functions contain loops, two of theam have _nested_ loops, and they
have more than one callsite each. I think they should not be inlined.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Denys Vlasenko [Wed, 11 Aug 2010 01:02:29 +0000 (18:02 -0700)]
fbcon: uninline large static function get_color()
This function's body is good two screenfuls and it has six callsites. No
apparent reason why it is marked inline.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Wed, 11 Aug 2010 01:02:28 +0000 (18:02 -0700)]
fbdev: efifb: section fixes
Remove 43 section mismatches by moving the two structures efifb_defined
and efifb_fix from .init.data to .devinit.data.
Also the two structure arrays dmi_system_table[] and dmi_list[] have been
moved from .data to .init.rodata and .init.data, which saves, if built-in,
some space.
On x86_64 'size -A' showed that these sections changed size:
efifb.o:
section size-old size-new
.data 1200 688
.init.data 7840 512
.init.rodata 0 7568
.devinit.data 0 256
Total 11927 11911
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Peter Jones <pjones@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Gregory Bean [Wed, 11 Aug 2010 01:02:27 +0000 (18:02 -0700)]
gpio: sx150x: add Semtech I2C sx150x gpio expander driver
Add support for Semtech SX150-series I2C GPIO expanders. Compatible
models include:
8 bits: sx1508q
16 bits: sx1509q
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Gl?ckner [Wed, 11 Aug 2010 01:02:26 +0000 (18:02 -0700)]
gpiolib: allow nested threaded irqs for poll(2)
The pca953x driver requires the use of threaded irqs as its irq
demultiplexer can sleep. Our irq handler can be called from any context,
so use request_any_context_irq to allow threaded irqs as well.
Signed-off-by: Daniel Gl?ckner <dg@emlix.com>
Reported-by: Ian Jeffray <ian@jeffray.co.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Gl?ckner [Wed, 11 Aug 2010 01:02:25 +0000 (18:02 -0700)]
gpiolib: get rid of struct poll_desc and worklet
As sysfs_notify_dirent has been made irq safe, there is no reason to not
call it directly from irq. With the work_struct removed, the remaining
element in poll_desc is a sysfs_dirent pointer which may not be NULL. We
can therefore store it directly in the idr and pass it as context to the
irq handler.
Most part of the patch deals with renaming defines and variables to
reflect their new use without functional change.
I also took the opportunity to initialize the idr statically.
Signed-off-by: Daniel Gl?ckner <dg@emlix.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Wed, 11 Aug 2010 01:02:24 +0000 (18:02 -0700)]
gpiolib: decouple might_sleep_if() from DEBUG
Be more consistent about runtime programming interface abuse warnings,
which can reduce some confusion and trigger bugfixes. Based on an
observation and patch from Jani Nikula.
Also update doc to highlight some sleeping-call issues and to match some
recent changes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jani Nikula <ext-jani.1.nikula@nokia.com>
Cc: "Ryan Mallon" <ryan@bluewatersys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dmitry Eremin-Solenikov [Wed, 11 Aug 2010 01:02:24 +0000 (18:02 -0700)]
pcf857x: support working w/o platform data
Provide sane defaults for pcf857x, so the driver can be used w/o providing
platform data (and thus can be simply bound via OF tree).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marc Kleine-Budde [Wed, 11 Aug 2010 01:02:23 +0000 (18:02 -0700)]
gpio: max730x: make pullups configurable via platformdata
The gpios on the max730x chips have support for internal pullups while in
input mode.
This patch adds support for configuring these pullups via platform data.
A new member ("input_pullup_active") to the platform data struct is
introduced. A set bit in this variable activates the pullups while the
respective port is in input mode. This is a compatible enhancement since
unset bits lead to disables pullups which was the default in the original
driver.
_Note_: the 4 lowest bits in "input_pullup_active" are unused because the
first 4 ports of the controller are not used, too.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Wed, 11 Aug 2010 01:02:22 +0000 (18:02 -0700)]
rtc: rp5c01: add NVRAM support
The Ricoh RP5C01 RTC contains 26 x 4 bits of NVRAM. Provide access to it
via a sysfs "nvram" attribute file.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Christian Dietrich [Wed, 11 Aug 2010 01:02:22 +0000 (18:02 -0700)]
drivers/rtc: remove unneeded ifdef CONFIG_PM
Because CONFIG_PM is a precondition to CONFIG_ACPI, the ifdef CONFIG_PM
within ifdef CONFIG_ACPI is redundant.
Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roman Fietze [Wed, 11 Aug 2010 01:02:21 +0000 (18:02 -0700)]
rtc-isl12022: properly handle military hour format
Mask out PM flag when reading the hour, always set MIL bit when
writing the hour.
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roy Zang [Wed, 11 Aug 2010 01:02:20 +0000 (18:02 -0700)]
rtc: add support for DS3232 RTC
Add a driver for the DS3232 RTC chip via the I2C bus. Alarms are not
supported in this version of the driver.
[akpm@linux-foundation.org: fix Kconfig help text]
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Jingchang Lu <b22599@freescale.com>
Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Kumar Gala <kumar.gala@freescale.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:20 +0000 (18:02 -0700)]
rtc/nuc900: fix build warning
Remove unused local variable.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:19 +0000 (18:02 -0700)]
rtc/nuc900: modify enable/disable IRQs and driver data setting location
This patch does two modifications:
(1) Adjust enable/disable IRQs location,enable it after rtc
registration and disable it prior to unregistration.
(2) Put 'platform_set_drvdata(pdev, nuc900_rtc)' in front of rtc
registration still be safety, though there is no need to do this, when
I move enable irq after rtc registration, I think still put
'platform_set_drvdata' before rtc registration that would be a good
habit.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:18 +0000 (18:02 -0700)]
rtc/nuc900: make returning time checking function valid
Make returning time checking function valid. In spite of using the
'rtc_valid_tm', nevertheless, the read time function omits its returning
value, that means the 'rtc_valid_tm' is useless here.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:17 +0000 (18:02 -0700)]
rtc/m48t86: use rtc_valid_tm() to check returned tm
Use rtc_valid_tm() to check the returned struct rtc_time *tm, to avoid
returning a wrong tm value.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:17 +0000 (18:02 -0700)]
rtc/m48t59: use rtc_valid_tm() to check returned tm
Use rtc_valid_tm to check the returned struct rtc_time *tm, to avoid
returning a wrong tm value.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:16 +0000 (18:02 -0700)]
rtc/max6900: use rtc_valid_tm() to check returning tm
Use rtc_valid_tm() to check returning tm for max6900, it can avoid
returning wrong tm value.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:15 +0000 (18:02 -0700)]
rtc/m41t80: use rtc_valid_tm() to check returned tm
Use rtc_valid_tm() to check returned struct rtc_time *tm - it can avoid
returning wrong tm value.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roman Fietze [Wed, 11 Aug 2010 01:02:14 +0000 (18:02 -0700)]
rtc: add Intersil ISL12022 RTC driver
- derived from rtc-pcf8563
- no SRAM driver
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Baruch Siach [Wed, 11 Aug 2010 01:02:13 +0000 (18:02 -0700)]
rtc: driver for the DryIce block found in i.MX25 chips
This driver is based on code from Freescale which accompanies their i.MX25
PDK board, with some cleanup.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sascha Hauer <kernel@pengutronix.de>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Weiyi [Wed, 11 Aug 2010 01:02:12 +0000 (18:02 -0700)]
drivers/rtc/rtc-pl031.c: remove unused #include <linux/version.h>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:11 +0000 (18:02 -0700)]
rtc/pxa: remove unnecessary private ops->ioctl()
We shouldn't implement private ops->ioctl() unless absolutely necessary.
pxa series RTC driver's ioctl() is unnecessary, since RTC subsystem has
implement the ioctl() very well,so we can only use the API of
'.alarm_irq_enable' and '.update_irq_enable' to do enable irq action.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sergey Matyukevich [Wed, 11 Aug 2010 01:02:10 +0000 (18:02 -0700)]
rtc: fixes and new functionality for fm3130
- add sanity check for alarm data in fm3130_probe
- fix fm3130_set_alarm.
According to the datasheet, setting match bit '0' indicates that the
corresponding alarm field will be used in the match process
- add operation alarm_irq_enable operation which is responsible for
handling RTC_AIE_ON, RTC_AIE_OFF ioctls
- remove clearing of AF bit after reading rtc/alarm control register:
according to datasheet this bit is cleared anyway when rtc/alarm control
register is read
[akpm@linux-foundation.org: make fm3130_alarm_irq_enable() static, fix comment layout]
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Sergey Lapin <slapin@ossfans.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:09 +0000 (18:02 -0700)]
rtc/rtc-mxc: remove six unused fields
Remove six unused fields from `struct rtc_plat_data'.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:09 +0000 (18:02 -0700)]
rtc/m48t59: kfree(NULL) is OK
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:08 +0000 (18:02 -0700)]
rtc/pxa: remove unused field
pxa_rtc.rtc_alarm is unused.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Graham Gower [Wed, 11 Aug 2010 01:02:08 +0000 (18:02 -0700)]
drivers/rtc/rtc-pcf8563.c: remove unused struct
Signed-off-by: Graham Gower <graham.gower@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:07 +0000 (18:02 -0700)]
rtc/nuc900: fix checking of args during time-setting
When a user application wants to set the rtc time, the RTC subsystem takes
advantage of 'rtc_valid_tm(tm)' to check 'rtc_time *tm' value validity, it
make sure the 'tm->tm_year' is larger than 70,so if '70< tm_year < 100',
the '(settm->tm_year - 100)' will be negative. ' Setting the negative
value to hardware register will be invalid, so I add the 'if' condition to
make sure set a valid value to register.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:05 +0000 (18:02 -0700)]
nuc900/rtc: change the waiting for device ready implement
- add an mdelay(1) to the polling loop to cause less frequent access to
the hardware register.
- change the return value from ENODEV to EPERM if the loop timed out. I
think the 'Operation not permitted' description is more suitable for the
meaning of 'check_rtc_access_enable()' function, it just be used to
judge rtc access operation is permitted or not.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Wed, 11 Aug 2010 01:02:04 +0000 (18:02 -0700)]
autofs4: remove unneeded null check in try_to_fill_dentry()
After
97e7449a7ad: "autofs4: fix indirect mount pending expire race" we no
longer assumed that "ino" can be null. The other null checks got removed
but this was one was missed.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kulikov Vasiliy [Wed, 11 Aug 2010 01:02:04 +0000 (18:02 -0700)]
i2o: check return code from put_user()
Check return value of put_user() and return -EFAULT if it failed.
Original comment "We did a get user...so assuming mem is ok...is this
bad?" is incorrect because memory can be read only.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kulikov Vasiliy [Wed, 11 Aug 2010 01:02:03 +0000 (18:02 -0700)]
i2o: fix overflow of copy_to_user()
If (len > reslen) we must not call copy_to_user() since kernel buffer is
smaller than we want to copy. Similar code in this file is correct, so
this bug was a typo.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Julia Lawall [Wed, 11 Aug 2010 01:02:03 +0000 (18:02 -0700)]
drivers/message/i2o/exec-osm.c: add missing mutex_unlock
Add a mutex_unlock missing on the error path.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E1;
@@
* mutex_lock(E1,...);
<+... when != E1
if (...) {
... when != E1
* return ...;
}
...+>
* mutex_unlock(E1,...);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pablo Castillo [Wed, 11 Aug 2010 01:02:01 +0000 (18:02 -0700)]
mmc: add ricoh e822 pci id
Signed-off-by: Pablo Castillo <CyberCastle@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Tested-by: Gregg Lebovitz <gregg@lebovitz.net>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roy Zang [Wed, 11 Aug 2010 01:02:01 +0000 (18:02 -0700)]
dts: add ESDHC weird voltage bits workaround
P4080 ESDHC controller does not support 1.8V and 3.0V voltage. but the
host controller capabilities register wrongly set the bits. This patch
adds the workaround to correct the weird voltage setting bits. Only 3.3V
voltage is supported for P4080 ESDHC controller.
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Cc: Jerry Huang <Chang-Ming.Huang@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roy Zang [Wed, 11 Aug 2010 01:02:00 +0000 (18:02 -0700)]
dts: add sdhci,auto-cmd12 field for p4080 device tree
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Cc: Jerry Huang <Chang-Ming.Huang@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jerry Huang [Wed, 11 Aug 2010 01:01:59 +0000 (18:01 -0700)]
sdhci: add auto CMD12 support for eSDHC driver
Add auto CMD12 command support for eSDHC driver. This is needed by P4080
and P1022 for block read/write. Manual asynchronous CMD12 abort operation
causes protocol violations on these silicons.
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:59 +0000 (18:01 -0700)]
sdhci: add regulator support
This patch adds support for regulator API to sdhci core driver.
Regulators can be used to disable power in suspended state to reduce
dissipated energy.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:58 +0000 (18:01 -0700)]
sdhci-s3c: add support for new card detection methods
On some Samsung SoCs not all SDHCI controllers have card detect (CD) line.
For some embedded designs it is not even needed, because ususally the
device (like SDIO flash memory or wifi controller) is permanently wired to
the controller. There are also systems which have a card detect line
connected to some of the external interrupt lines or the presence of the
card depends on some other actions (like enabling a power regulator).
This patch adds support for all these cases. The following card detection
methods are possible:
1. internal sdhci host card detect line
2. external event
3. external gpio interrupt
4. no card detect line, controller will poll for the card
5. no card detect line, card is permanently wired to the controller
(once detected host won't poll it any more)
By default, all existing code would use method #1, what is compatible with
the previous version of the driver.
In case of external event, two callbacks must be provided in platdata:
ext_cd_init and ext_cd_cleanup. Both of them get a callback to a function
that notifies the s3c-sdhci host contoller as their argument. That
callback function should be called from the even dispatcher to let host
notice the card insertion/removal.
In case of external gpio interrupt, a gpio pin number must be provided in
platdata (ext_cd_gpio parameter), as well as the information about the
polarity of that gpio pin (ext_cd_gpio_invert). By default
(ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed', but
this can be changed to 'card has been removed' when ext_cd_gpio_invert ==
1.
This patch adds all required changes to sdhci-s3c driver.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:57 +0000 (18:01 -0700)]
sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirk
This patch enables SDHCI_QUIRK_NO_HISPD_BIT on Samsung SDHCI driver. This
solves detection problems with some external SD cards. This change has
been tested on S5PC100 and S5PC110. It has no inpact on driver speed.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:56 +0000 (18:01 -0700)]
sdhci-s3c: add support for the non standard minimal clock value
S3C SDHCI host controller can change the source for generating mmc clock.
By default host bus clock is used, what causes some problems on machines
with 133MHz bus, because the SDHCI divider cannot be as high get proper
clock value for identification mode. This is not a problem for the
controller, because it can generate lower frequencies from other clock
sources. This patch changes sdhci driver to use get_min_clock() call if
it has been provided.
This fixes the flood of the following warnings on Samsung S5PV210 SoCs:
mmc0: Minimum clock frequency too high for identification mode
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hyuk Lee [Wed, 11 Aug 2010 01:01:55 +0000 (18:01 -0700)]
sdhci-s3c: add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk
On Samsung's SDMMC hosts the timeout clock is derivied from the SD Clock
which is set dynamically. So checked SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK
quirk and removed 'sdhci_s3c_get_timeout_clk' callback which doesn't need
any more.
Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Venkatraman S [Wed, 11 Aug 2010 01:01:54 +0000 (18:01 -0700)]
omap hsmmc: fix processing of all dma interrupts as block completion
If other informative interrupts are enabled for the DMA channel used by
hsmmc, those are incorrectly treated as block completion. This patch lets
only the block completion interrupt to be processed.
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Christian Dietrich [Wed, 11 Aug 2010 01:01:53 +0000 (18:01 -0700)]
drivers/mmc/host/msm-sdcc: remove dead config options
CONFIG_MMC_MSM7X00A_RESUME_IN_WQ and CONFIG_MMC_EMBEDDED_SDIO don't exist
in Kconfig and is never defined anywhere else, therefore removing all
references for it from the source code.
Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@codeaurora.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grazvydas Ignotas [Wed, 11 Aug 2010 01:01:52 +0000 (18:01 -0700)]
omap: pandora: pass wl1251 information to SDIO core
Pandora has TI WL1251 attached on MMC3, which is non-standard SDIO chip.
Make use MMC_QUIRK_NONSTD_SDIO to tell SDIO core about it.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Kalle Valo <kvalo@adurom.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grazvydas Ignotas [Wed, 11 Aug 2010 01:01:52 +0000 (18:01 -0700)]
omap_hsmmc: add init_card pass-through callback
This will allow us to set up special cards in machine drivers just after
they are detected by MMC core.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Kalle Valo <kvalo@adurom.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grazvydas Ignotas [Wed, 11 Aug 2010 01:01:50 +0000 (18:01 -0700)]
sdio: allow non-standard SDIO cards
There are some chips (like TI WL12xx series) that can be interfaced over
SDIO but don't support the SDIO specification, meaning that they are
missing CIA (Common I/O Area) with all it's registers. Current Linux SDIO
implementation relies on those registers to identify and configure the
card, so non-standard cards can not function and cause lots of warnings
from the core when it reads invalid data from non-existent registers.
After this patch, init_card() host callback can now set new quirk
MMC_QUIRK_NONSTD_SDIO, which means that SDIO core should not try to access
any standard SDIO registers and rely on init_card() to fill all SDIO
structures instead. As those cards are usually embedded chips, all the
required information can be obtained from machine board files by the host
driver when it's called through init_card() callback.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Kalle Valo <kvalo@adurom.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Vorontsov [Wed, 11 Aug 2010 01:01:49 +0000 (18:01 -0700)]
sdhci-pltfm: add support for CNS3xxx SoC devices
There's nothing special, just SoC-specific ops and quirks.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Richard R?jfors <richard.rojfors@pelagicore.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Vorontsov [Wed, 11 Aug 2010 01:01:49 +0000 (18:01 -0700)]
sdhci-pltfm: reorganize Makefile entries to support SoC devices
Due to build system limitations, intermediate and final objects can't have
the same names. And as we're going to start building SoC-specific
objects, let's rename the module to sdhci-platform, into which we'll link
sdhci-pltfm and SoC-specifc objects.
There should be no issue in renaming as the driver uses modalias
mechanism.
This is exactly the same approach as in sdhci-of driver.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Richard R?jfors <richard.rojfors@pelagicore.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Vorontsov [Wed, 11 Aug 2010 01:01:47 +0000 (18:01 -0700)]
sdhci-pltfm: switch to module device table matching
Sometimes want to place SoC-specific parts alongside with the generic
driver, and to do so, we have to switch the driver over to the module
device table matching.
Note that drivers/mmc/host/sdhci-pltfm.h is so far empty, but it'll hold
SoC-specific driver data handlers soon.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Richard R?jfors <richard.rojfors@pelagicore.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kishore Kadiyala [Wed, 11 Aug 2010 01:01:46 +0000 (18:01 -0700)]
mmc: omap: fix for bus width which improves SD card's peformance.
This patch improves low speeds for SD cards.
OMAP-MMC controller's can support maximum bus width of '8'. when bus
width is mentioned as "8" in controller data,the SD stack will check
whether bus width is "4" and if not it will set bus width to "1" and there
by degrading performance. This patch fixes the issue and improves the
performance of SD cards.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hanumath Prasad [Wed, 11 Aug 2010 01:01:45 +0000 (18:01 -0700)]
mmc: only set blockaddressed for > 2GiB cards
A non-zero value of SEC_COUNT does not indicate that the card is sector
addressed. According to the MMC specification, cards with a density
greater than 2GiB are sector addressed.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Hanumath Prasad <hanumath.prasad@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kyungmin Park [Wed, 11 Aug 2010 01:01:44 +0000 (18:01 -0700)]
sdhci: don't assign mmc->caps at SDHCI directly
Some host controllers can set mmc->caps before sdhci_add_host().
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kyungmin Park [Wed, 11 Aug 2010 01:01:43 +0000 (18:01 -0700)]
sdhci: 8-bit data transfer width support
Some host controllers such as s5pc110 support the WIDE8 feature.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kyungmin Park [Wed, 11 Aug 2010 01:01:43 +0000 (18:01 -0700)]
sdhci: remove useless set_clock() check
When using QUIRK_NONSTANDARD_CLOCK, it checks the set_clock() function
which is not used actually. So delete it.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maxim Levitsky [Wed, 11 Aug 2010 01:01:42 +0000 (18:01 -0700)]
mmc: make sdhci work with ricoh mmc controller
The current way of disabling it is not well tested by vendor and has all
kinds of bugs that show up on resume from ram/disk. A very good example
is a dead SDHCI controller.
Old way of disabling is still supported by continuing to use
CONFIG_MMC_RICOH_MMC.
Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html'
Therefore most of the credit for this goes to Andrew de Quincey
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Philip Langdale <philipl@overt.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maxim Levitsky [Wed, 11 Aug 2010 01:01:41 +0000 (18:01 -0700)]
mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume
If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to
suspend, the card will be removed, therefore this patch doesn't change the
behavior of this option.
However the removal will be done by pm notifier, which runs while
userspace is still not frozen and thus can freely use del_gendisk, without
the risk of deadlock which would happen otherwise.
Card detect workqueue is now disabled while userspace is frozen, Therefore
if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during
suspend, the removal will be detected as soon as userspace is unfrozen,
again at the moment it is safe to call del_gendisk.
Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate.
[akpm@linux-foundation.org: clean up function prototype]
[akpm@linux-foundation.org: fix CONFIG_PM-n linkage, small cleanups]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michal Miroslaw [Wed, 11 Aug 2010 01:01:40 +0000 (18:01 -0700)]
mmc: implement SD-combo (IO+mem) support
Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michal Miroslaw [Wed, 11 Aug 2010 01:01:40 +0000 (18:01 -0700)]
mmc: split mmc_sd_init_card()
This series adds support for SD combo cards to MMC/SD driver stack.
SD combo consists of SD memory and SDIO parts in one package. Since the
parts have a separate SD command sets, after initialization, they can be
treated as independent cards on one bus.
Changes are divided into two patches. First is just moving initialization
code around so that SD memory part init can be called from SDIO init.
Second patch is a proper change enabling SD memory along SDIO. I tried to
move as much no-op changes to the first patch so that it's easier to
follow the required changes to initialization flow for SDIO cards.
This is based on Simplified SDIO spec v.2.00. The init sequence is
slightly modified to follow current SD memory init implementation.
Command sequences, assuming SD memory and SDIO indeed ignore unknown
commands, are the same as before for both parts.
This patch:
Prepare for SD-combo (IO+mem) support by splitting SD memory
card init and related functions.
Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>