H Hartley Sweeten [Tue, 22 Sep 2009 23:48:02 +0000 (16:48 -0700)]
jbd.h: bitfields should be unsigned
bitfields should be unsigned.
This fixes sparse noise:
error: dubious one-bit signed bitfield
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Heiko Carstens [Tue, 22 Sep 2009 23:48:01 +0000 (16:48 -0700)]
ext2: fix format string compile warning (ino_t)
Unlike on most other architectures ino_t is an unsigned int on s390. So
add an explicit cast to avoid this compile warning:
fs/ext2/namei.c: In function 'ext2_lookup':
fs/ext2/namei.c:73: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t'
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Doug Graham [Tue, 22 Sep 2009 23:48:00 +0000 (16:48 -0700)]
V3 minixfs: add missing directory type checking
There are a few places in the Minix FS code where the "inode" field of a
minix_dir_entry is used without checking first to see if the dirent is
really a minix3_dir_entry. The inode number in a V1/V2 dirent is 16 bits,
whereas that in a V3 dirent is 32 bits.
Accessing it as a 16 bit field when it really should be accessed as a 32
bit field probably kinda sorta works on a little-endian machine, but leads
to some rather odd behaviour on big-endian machines.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Doug Graham <dgraham@nortel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Aaro Koskinen [Tue, 22 Sep 2009 23:47:58 +0000 (16:47 -0700)]
sisfb: change SiS_DDC_Port type to SISIOADDRESS
The patch enables the driver to be used on platforms such as ARM where an
I/O address is a 32-bit memory address.
The patch avoids the following kernel oops:
debian:~# modprobe sisfb
[ 73.070000] sisfb: Video ROM found
[ 73.080000] sisfb: Video RAM at 0x80000000, mapped to 0xe0a00000, size 1024k
[ 73.090000] sisfb: MMIO at 0x84080000, mapped to 0xe0b80000, size 256k
[ 73.090000] sisfb: Memory heap starting at 800K, size 32K
[ 73.360000] Unable to handle kernel paging request at virtual address
6e000844
[ 73.380000] pgd =
df230000
[ 73.380000] [
6e000844] *pgd=
00000000
[ 73.380000] Internal error: Oops: 8f5 [#1]
[ 73.380000] Modules linked in: sisfb(+) fb cfbcopyarea cfbimgblt cfbfillrect
[ 73.380000] CPU: 0 Not tainted (2.6.31-iop32x #1)
[ 73.380000] PC is at SiS_SetRegANDOR+0x10/0x38 [sisfb]
[ 73.380000] LR is at SiS_SetSCLKHigh+0x38/0x94 [sisfb]
[ 73.380000] pc : [<
bf01dc00>] lr : [<
bf0238f8>] psr:
60000013
[ 73.380000] sp :
df38fd00 ip :
6e000000 fp :
00000002
[ 73.380000] r10:
00000108 r9 :
00000000 r8 :
00000108
[ 73.380000] r7 :
df064258 r6 :
00000110 r5 :
6e000844 r4 :
0000010a
[ 73.380000] r3 :
00000001 r2 :
0000000e r1 :
00000011 r0 :
00000844
[ 73.380000] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 73.380000] Control:
0000397f Table:
bf230000 DAC:
00000015
[ 73.380000] Process modprobe (pid: 1849, stack limit = 0xdf38e270)
[ 73.380000] Stack: (0xdf38fd00 to 0xdf390000)
[ 73.380000] fd00:
0000010a 00000108 df064258 df064258 df064258 00000000 00000000 bf02c4e0
[ 73.380000] fd20:
00000114 bf02c50c 00000013 00000114 0000010a df064258 00000000 bf02c980
[ 73.380000] fd40:
00009c66 00000004 00000001 df064250 a0010000 a6a2a0a0 df064250 00000003
[ 73.380000] fd60:
df064250 00000000 df064258 0000fffd 00000000 00000000 00000000 bf033948
[ 73.380000] fd80:
00000000 00000000 00000000 bf019e2c 00000000 df064a70 bf03b470 00010000
[ 73.380000] fda0:
00000000 df064250 00000000 df831c00 00000012 bf039f70 00000000 c00abed8
[ 73.380000] fdc0:
000008a6 000008a4 df0649b0 df064878 df064258 df064000 00000000 00000000
[ 73.380000] fde0:
00000001 00008000 00000001 00030000 df81c930 bf049f88 df831c00 00000000
[ 73.380000] fe00:
bf049f58 df3952a0 c0447708 bf049f88 bf049fe0 c0191980 df831c00 c0191b10
[ 73.380000] fe20:
df831c58 bf049f58 df831c00 bf04aca8 df3952a0 df831c58 df831c58 bf049f88
[ 73.380000] fe40:
c01ba1b4 c01ba0a0 df831c58 df831c8c bf049f88 c01ba1b4 df3952a0 00000000
[ 73.380000] fe60:
c03e265c c01ba240 00000000 df38fe78 bf049f88 c01b990c df812938 df81b8d0
[ 73.380000] fe80:
df3952a0 df807780 00000000 00000060 bf049f88 c01b9224 bf0429c8 00000000
[ 73.380000] fea0:
bf049f58 00000000 bf049f88 00000000 00000000 bf04aea8 00000000 c01ba4e4
[ 73.380000] fec0:
e09861a0 bf049f58 00000000 bf049f88 00000000 c0191f20 00000000 00000000
[ 73.380000] fee0:
c03f7bac bf04d418 0000fff2 0000fff1 bf04ad08 0002f260 0002f260 e0986038
[ 73.380000] ff00:
e0986150 e098568b df143340 e0990280 00000036 c03d8b00 fffffffd 00000000
[ 73.380000] ff20:
bf04acfc 00000000 fffffffc 0003cf4b 00018098 c03f7bac 00000000 bf04d000
[ 73.380000] ff40:
df38e000 00000000 bedc0984 c00272a4 ffffffff c005bc88 00000000 00000000
[ 73.380000] ff60:
0003cf4b 0003cf4b 00018098 bf04acfc 00000000 c0027fe8 df38e000 00000000
[ 73.380000] ff80:
bedc0984 c006882c 00001000 00000003 00000000 00009064 00000000 00008edc
[ 73.380000] ffa0:
00000080 c0027e20 00009064 00000000 4014e000 0003cf4b 00018098 0003cf4b
[ 73.380000] ffc0:
00009064 00000000 00008edc 00000080 00000000 00000000 40025000 bedc0984
[ 73.380000] ffe0:
00000000 bedc08fc 0000b6b0 400e8f34 60000010 4014e000 00000000 00000000
[ 73.380000] [<
bf01dc00>] (SiS_SetRegANDOR+0x10/0x38 [sisfb]) from [<
df064258>] (0xdf064258)
[ 73.380000] Code:
e92d0030 e20110ff e280546e e3a0c46e (
e5c51000)
[ 73.680000] ---[ end trace
62a93e01df37a5f2 ]---
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Peter Korsgaard [Tue, 22 Sep 2009 23:47:55 +0000 (16:47 -0700)]
video: s3c_fb.c: fix build with CONFIG_HOTPLUG=n
Fixes `s3c_fb_remove' referenced in section `.data' of
drivers/built-in.o: defined in discarded section `.devexit.text' of
drivers/built-in.o
With CONFIG_HOTPLUG=n, functions marked with __devexit gets removed,
so make sure we use __devexit_p when referencing pointers to them.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Tue, 22 Sep 2009 23:47:54 +0000 (16:47 -0700)]
drivers/video/tmiofb.c: fix uninitialised return value
drivers/video/tmiofb.c: In function 'tmiofb_resume':
drivers/video/tmiofb.c:977: warning: 'retval' may be used uninitialized in this function
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Francisco Jerez [Tue, 22 Sep 2009 23:47:53 +0000 (16:47 -0700)]
vgacon: prevent vgacon_deinit from touching the hardware for inactive consoles.
fbcon makes the (reasonable) assumption that it only needs to program the
hardware once, when fbcon_init() is called for the foreground console.
This doesn't always play well with vgacon because vgacon_deinit() is only
doing its job when the last console it owns is closed (when switching from
vgacon to fbcon, that's usually *after* fbcon_init() has set the new
mode).
Depending on the hardware this can cause the wrong framebuffer location to
be scanned out (e.g. reproduced on nv05 with the nouveau framebuffer
driver).
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Armstrong [Tue, 22 Sep 2009 23:47:52 +0000 (16:47 -0700)]
fbcon: only unbind from console if successfully registered
Attempting to unload a framebuffer module calls unregister_framebuffer()
which in turn gets fbcon to release it. If fbcon has no framebuffers
linked to a console, it will also unbind itself from the console driver.
However, if fbcon never registered itself as a console driver, the unbind
will fail causing the framebuffer device entry to persist. In most cases
this failure will result in an oops when attempting to access the now
non-existent device.
This patch ensures that the fbcon unbind request will succeed even if a
bind was never done. It tracks if a successful bind ever occurred & will
only attempt to unbind if needed. If there never was a bind, it simply
returns with no error.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Tue, 22 Sep 2009 23:47:50 +0000 (16:47 -0700)]
matroxfb: get rid of CONFIG_FB_MATROX_32MB
CONFIG_FB_MATROX_32MB is always enabled, so there is no point in having
ifdefs all around. And it is bad practice to use CONFIG_* as a name for
something which is not a Kconfig option.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Tue, 22 Sep 2009 23:47:50 +0000 (16:47 -0700)]
matroxfb: get rid of unneeded macro MINFO_FROM
With multihead support always enabled, macros MINFO_FROM and
MINFO_FROM_INFO are no longer needed and make the code harder to read.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Tue, 22 Sep 2009 23:47:49 +0000 (16:47 -0700)]
matroxfb: get rid of unneeded macros WPMINFO and friends
With multihead support always enabled, these macros are no longer needed
and make the code harder to read.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Tue, 22 Sep 2009 23:47:48 +0000 (16:47 -0700)]
matroxfb: get rid of unneeded macros ACCESS_FBINFO and MINFO
With multihead support always enabled, these macros are no longer needed
and make the code harder to read.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Tue, 22 Sep 2009 23:47:47 +0000 (16:47 -0700)]
matroxfb: make CONFIG_FB_MATROX_MULTIHEAD=y mandatory
I would like to get rid of option CONFIG_FB_MATROX_MULTIHEAD and just
always enable it. There are many reasons for doing this:
* CONFIG_FB_MATROX_MULTIHEAD=y is what all x86 distributions do, so it
definitely works or we would know by now.
* Building the matroxfb driver with CONFIG_FB_MATROX_MULTIHEAD not set
results in the following build warning:
drivers/video/matrox/matroxfb_crtc2.c: In function 'matroxfb_dh_open':
drivers/video/matrox/matroxfb_crtc2.c:265: warning: the address of 'matroxfb_global_mxinfo' will always evaluate as 'true'
drivers/video/matrox/matroxfb_crtc2.c: In function 'matroxfb_dh_release':
drivers/video/matrox/matroxfb_crtc2.c:285: warning: the address of 'matroxfb_global_mxinfo' will always evaluate as 'true'
This is nothing to be worried about, the driver will work fine, but build
warnings are still annoying.
* The trick to get multihead support without CONFIG_FB_MATROX_MULTIHEAD,
which is described in the config help text, no longer works: you can't
load the same kernel module more than once.
* I fail to see how CONFIG_FB_MATROX_MULTIHEAD=y would make the code
significantly slower, contrary to what the help text says. A few extra
parameters on the stack here and there can't really slow things down in
comaprison to the rest of the code, and register access.
* The driver built without CONFIG_FB_MATROX_MULTIHEAD is larger than the
driver build with CONFIG_FB_MATROX_MULTIHEAD=y by 8%.
* One less configuration option makes things simpler. We add options
all the time, being able to remove one for once is nice. It improves
testing coverage. And I don't think the Matrox adapters are still
popular enough to warrant overdetailed configuration settings.
* We should be able to unobfuscate the driver code quite a bit after
this change (patches follow.)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:44 +0000 (16:47 -0700)]
fb: do not ignore fb_set_par errors
At the moment about half of the framebuffer drivers can return an error
code in fb_set_par. Until now it would be silently ignored by fbmem.c
and fbcon.c. This patch fixes fbmem.c to return the error code and
restore var on error.
But it is not clear in which video mode the device is when fb_set_par
fails. It would be good and reasonable if it were in the old state but
there is no guarantee that this is true for all existing drivers.
Additionally print a message if a failing fb_set_par is detected in
fbmem.c or fbcon.c.
Although most errors should be caught by the previous fb_check_var some
errors can't as they are dynamic (memory allocations, ...) and can only be
detected while performing the operations which is forbidden in
fb_check_var.
This patch shouldn't have a negative impact on normal operation as all
drivers return 0 on success. The impact in case of error depends heavily
on the driver and caller but it's expected to be better than before.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Tue, 22 Sep 2009 23:47:43 +0000 (16:47 -0700)]
s3c2410fb: fix clockrate calculation
In the final part of the calculation for the tft display clockrate we
divide the output pf s3c2410fb_calc_pixclk() by 2 which leaves us with a
rounding error if the result is odd.
Change to using DIV_ROUND_UP() to ensure that we always choose a higher
divisor and thus a lower frequency.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Tue, 22 Sep 2009 23:47:41 +0000 (16:47 -0700)]
video: console, use DIV_ROUND_UP
Use DIV_ROUND_UP explicitly instead of manual shifts and adds. It makes
the code more readable and consistent (sometimes there were shifts,
sometimes divs).
There is no change on the assembly level (compilers should do the right
job).
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:41 +0000 (16:47 -0700)]
fb: fix fb_pan_display range check
Fix the range check for panning. The current code fails to detect some
invalid values (very high ones that can occur if an app tries to move
further up/left than 0,0) as the check uses the unknown values for
calculation so that an overflow can occur.
To fix this it is sufficient to move the calculation to the right side to
use only trusted values.
Kai Jiang detected this problem and proposed an initial patch.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Kai Jiang <b18973@freescale.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Julia Lawall [Tue, 22 Sep 2009 23:47:39 +0000 (16:47 -0700)]
drivers/video: add kmalloc NULL tests
Check that the result of kmalloc is not NULL before passing it to other
functions.
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression *x;
identifier f;
constant char *C;
@@
x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
when != x != NULL
when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x->f
)
// </smpl>
[akpm@linux-foundation.org: convert to kstrdup() as well]
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roel Kluin [Tue, 22 Sep 2009 23:47:38 +0000 (16:47 -0700)]
drivers/video/console/newport_con.c: fix read outside array bounds
It reads linetable[] before checking bounds of index, and ARRAY_SIZE is
required because linetable[] are unsigned shorts.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harald Welte [Tue, 22 Sep 2009 23:47:38 +0000 (16:47 -0700)]
viafb: pass reference to pci device when calling framebuffer_alloc()
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harald Welte [Tue, 22 Sep 2009 23:47:37 +0000 (16:47 -0700)]
viafb: make viafb a first-class citizen using pci_driver
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:36 +0000 (16:47 -0700)]
viafb: choose acceleration engine for VX855
Enable 2D hardware acceleration on VX855 for copyarea, imageblit and
fillrect by selecting the correct engine which is the same as in VX800.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harald Welte [Tue, 22 Sep 2009 23:47:35 +0000 (16:47 -0700)]
viafb: add support for the VX855 chipset
Add support for a new VIA integrated graphics chipset, the VX855.
Signed-off-by: HaraldWelte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:34 +0000 (16:47 -0700)]
viafb: use read-only mode parsing
viafb: use read-only mode parsing
The previous method of mode parsing wrote to the strings resulting in
truncated mode strings in the sysfs.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harald Welte [Tue, 22 Sep 2009 23:47:33 +0000 (16:47 -0700)]
viafb: remove unused structure member
Remove a structure member 'on_slot' in the chip_info structure which is
completely unused.
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harald Welte [Tue, 22 Sep 2009 23:47:32 +0000 (16:47 -0700)]
viafb: make module parameters visible in sysfs
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:31 +0000 (16:47 -0700)]
viafb: hardware acceleration initialization cleanup
The main motivation of this patch was to merge the three initialization
functions in one and clean it up. However as some changes in other code
areas where needed to do it right some small other changes were made.
Changes to viafb_par:
io_virt renamed as engine_mmio and moved to shared
VQ_start renamed as vq_vram_addr and moved to shared
VQ_end removed as it is easily recalculatable
vq_vram_addr is not strictly needed but keep it to track where we
allocated video memory. The memory allocated for the virtual queue was
shrunk to VQ_SIZE as VQ_SIZE+CURSOR_SIZE looked like a bug to me. But to
be honest I don't have the faintest idea what virtual queues are for in
the graphic hardware and whether the driver needs them in any way. I only
know that they aren't directly accessed by the driver and so the only
potential current use would be as hardware internal buffers. For now keep
them to avoid regressions and only remove the double cursor allocation.
The most changes were caused by renames and the mentioned structure
changes so the chance of regressions is pretty low. The meaning of
viafb_accel changed slightly as previously it was changed back and forth
in the code and allowed to enable the hardware acceleration by software if
previously disabled. The new behaviour is that viafb_accel=0 always
prevents hardware acceleration. With viafb_accel!=0 the acceleration can
be freely choosen by set_var. This means viafb_accel is a diagnostic tool
and if someone has to use viafb_accel=0 the driver needs to be fixed.
As this is mostly a code cleanup no regressions beside the slightly change
of viafb_accel is expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:29 +0000 (16:47 -0700)]
viafb: improve pitch handling
Split the pitch handling up and replaces the calculation from virtual xres
and bpp with fix.line_length which already contains the pitch and does not
add any constrains for the virtual resolution.
Also add a bit to the second pitch which the documentation mentions but
which was ignored by the driver.
Although it is a bit unclear what the right pitch for some LCD modes is
this patch should have no negative runtime impact.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:28 +0000 (16:47 -0700)]
viafb: cleanup viafb_cursor
Clean the hardware cursor handling up.
The most notable change is that it no longer buffers the values in
viacursor but uses the ones in cursor instead as they are guaranteed to be
always valid.
Furthermore it uses local instead global variables where possible, moves
the cursor variable in shared as only one hardware cursor is supported and
returns an error if memory allocation fails. Last but not least it fixes
a too small buffer (as u32 has only 4 and not 32 bytes) but this did not
produce any known problems.
This is mostly a code cleanup, no negative runtime changes are expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alexey Dobriyan [Tue, 22 Sep 2009 23:47:27 +0000 (16:47 -0700)]
viafb: switch to seq_file
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:26 +0000 (16:47 -0700)]
viafb: 2D engine rewrite
This patch is a completly rewritten 2D engine. The engine is no longer in
a default state but reinitialized every time to allow usage for both
framebuffers regardless of their settings.
The whole engine handling is concentrated in a big function which takes 16
parameters. Although the number of parameters is worryingly it is good to
have a single funtion to deal with this stuff as it allows to easily
support different engines and avoids some code duplication.
On the way support for the new 2D engine in VX800 was added. As the with
less code duplication but it is probably better to duplicate the code as
this way is easier to walk if VIA ever decides to release a new engine
which changes anything the driver touches.
The engine support for VX800 gives a notable boost in speed. There are no
known regressions but as this patch changes paths I do neither have the
hardware nor documentation to check and has the possibility to put the
system in a critical state heavy testing is appreciated.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:24 +0000 (16:47 -0700)]
viafb: improve viafb_par
This patch introduces viafb_shared and is the beginning of a smooth
transition to use it.
viafb_shared should contain all general, non-surface specific data that
should be shared along all viafb framebuffers while viafb_par should only
contain things that are specific to each surface or in other words extend
fb_info. This change is intended to clean the dual/multi framebuffer
handling up.
This removes the annoyance that viafbinfo1->par points to a different
structure than viaparinfo1.
As the last change is fundamental it is difficult to ensure that all parts
of the driver do not depend on the previous brokenness but the chance of
regressions is very low.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:23 +0000 (16:47 -0700)]
viafb: another small cleanup of viafb_par
This removes the completly useless io variable as well as the temporary
used variables mmio_base and mmio_len in favor to use directly the fb_info
variables.
This is a code cleanup only, no runtime change expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:22 +0000 (16:47 -0700)]
viafb: remove LVDS initialization
At least for VX800 this initialization is not very good as some parts of
the register are written with reserved values. This makes the display go
white in some configurations and not usable until the framebuffer is
removed. It's better to not initialize it as it allows to use a
previously (by BIOS) correctly configured display.
This patch makes some displays work but might cause problems on others.
This is bad but can not be easily avoided. If this causes some
regressions it's probably the best to fix it in the 'active' display setup
code.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:21 +0000 (16:47 -0700)]
viafb: remove unused video device stuff
Remove everything related to video devices from the driver as it did not
influence the driver operation. This patch does change the userspace
behaviour as it removes two IOCTLs and one module parameter. But this is
good as it removes useless stuff and helps the user to figure out the
options that do affect the driver behaviour (which are still too many).
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:20 +0000 (16:47 -0700)]
viafb: clean up virtual memory handling
Clean the handling of ioremapped video memory up. The following changes
were made:
info->screen_base - viafb_FB_MM
(VRAM offset calculation) was replaced by
info->fix.smem_start - viafbinfo->fix.smem_start
which is essentially the same calculation but done with physical instead
virtual addresses.
*->fbmem_virt
was replaced by
viafbinfo->screen_base
This is true for viafbinfo and viafbinfo1 as the par pointers are equal.
An early initialization of viafbinfo1->fix.smem* was removed as done later
in viafb_setup_fixinfo.
This patch highlights that the only usage of the ioremapped video memory
in the driver is for hardware cursor handling. Even if it has to hold the
used virtual screen mapped for old-fashioned read/write calls (vs.
mmap'ed) a lot virtual memory could be saved by only ioremapping on
demand.
Code cleanup, no runtime changes expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:18 +0000 (16:47 -0700)]
viafb: clean up duoview
Clean the duoview handling up by replacing the varible with the funtion in
the only place where it is used. This is a code cleanup only, no runtime
change expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:17 +0000 (16:47 -0700)]
viafb: remove duplicated mode information
Remove the mode information from viafbdev.c and uses the one of viamode.c
instead. This is possible because horizontal and vertical address are the
same as horizontal and vertical resolution. The reduced blanking modes in
the table are no problem because they have a higher index than the normal
modes and therefore always the normal modes are selected just as the old
behaviour.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:16 +0000 (16:47 -0700)]
viafb: clean up viamode.h
Remove unneeeded declarations from the header and makes it more
maintainable by evaluating the array size in the file the array exist in
and exporting it via variables. This removes the need to keep the array
size in the header in sync with the real array size.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:15 +0000 (16:47 -0700)]
viafb: fix ioremap_nocache error handling
Correct the returned error code for remapping the video framebuffer.
Introduce error handling for remapping MMIO register address space to
avoid a NULL pointer dereference. Disable hardware acceleration if
remapping MMIO register address space failed as those registers are only
used for hardware acceleration.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:14 +0000 (16:47 -0700)]
viafb: split viafb_set_start_addr up
Move individual start address setting to viafb_set_primary_address and
viafb_set_secondary_address and make it more flexible to reuse it for
panning. Using central functions makes it easier to follow HW
manipulations.
Remove crt locking as it should be only needed for timing manipulation.
Move iga_path manipulation to via_pci_probe.
Remove memset for screen cleaning as it is currently done only for the
second screen. This is not needed for normal operation but has a little
chance of causing unwanted display artifacts. This can be fixed later
more consistent and more efficient (using viafb_fillrect) if needed.
This is a code clenup, no notable runtime changes expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:13 +0000 (16:47 -0700)]
viafb: merge viafb_update_viafb_par in viafb_update_fix
Shrink and merge viafb_update_viafb_par. This removes a lot of duplicated
data in viafb_par. Use the relevant data of fb_info instead. On the way
it removes an inconsistency in handling a second framebuffer which only
worked because viafbinfo1->par is modified to point to the same viafb_par
as viafbinfo->par.
Code cleanup only, no runtime change expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:12 +0000 (16:47 -0700)]
viafb: remove temporary start address setting
Currently the start address is set to an initial value every time
viafb_setmode is called.
This is not done consistently along graphic cores and not even the whole
address but often only parts of it. On top of that it seems useless as
the real/final address will be set by viafb_set_start_addr a few lines
later.
Remove this superfluous initalization to shrink register initalization and
as a start to decouple primary and secondary display. Code cleanup, no
notable runtime change expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Tobias Schandinat [Tue, 22 Sep 2009 23:47:10 +0000 (16:47 -0700)]
viafb: remove duplicated CX700 register init
The current code initializes the register for CX700 chips 2 times due to a
missing break as discovered by Harald Welte.
As CX700 and VX800 have exactly the same register initialization we can
use one for both to avoid duplicated code.
As this is a pure code cleanup no measurable runtime effects are expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ryan Mallon [Tue, 22 Sep 2009 23:47:09 +0000 (16:47 -0700)]
ep93xx video driver
EP93xx video driver plus documentation.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Daniele Venzano <linux@brownhat.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ryan Mallon [Tue, 22 Sep 2009 23:47:09 +0000 (16:47 -0700)]
ep93xx video driver platform support
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Daniele Venzano <linux@brownhat.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roel Kluin [Tue, 22 Sep 2009 23:47:07 +0000 (16:47 -0700)]
sisfb: read buffer overflow
If called with mode_idx = 1, rate = 68, a read occurs from
sisfb_vrate[-1].refresh.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sudhakar Rajashekhara [Tue, 22 Sep 2009 23:47:06 +0000 (16:47 -0700)]
davinci-fb-frame-buffer-driver-for-ti-da8xx-omap-l1xx-v4
Since the previous version, return values in ioctl() function have been
modified.
[akpm@linux-foundation.org: simplify lcd_disable_raster()]
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: Steve Chen <schen@mvista.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sudhakar Rajashekhara [Tue, 22 Sep 2009 23:47:06 +0000 (16:47 -0700)]
davinci: fb: Frame Buffer driver for TI DA8xx/OMAP-L1xx
Add LCD controller (LCDC) driver for TI's DA8xx/OMAP-L1xx architecture.
LCDC specifications can be found at http://www.ti.com/litv/pdf/sprufm0a.
LCDC on DA8xx consists of two independent controllers, the Raster
Controller and the LCD Interface Display Driver (LIDD) controller. LIDD
further supports character and graphic displays.
This patch adds support for the graphic display (Sharp LQ035Q3DG01) found
on the DA830 based EVM. The EVM details can be found at:
http://support.spectrumdigital.com/boards/dskda830/revc/.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: Steve Chen <schen@mvista.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
DESC
davinci-fb-frame-buffer-driver-for-ti-da8xx-omap-l1xx-fix
EDESC
From: Andrew Morton <akpm@linux-foundation.org>
fix kconfig indenting
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Cc: Steve Chen <schen@mvista.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roel Kluin [Tue, 22 Sep 2009 23:47:04 +0000 (16:47 -0700)]
platinumfb: fix misplaced parenthesis
Since `+' has a higher precedence than the trinary operator `?', this
added `hres * (1 << color_mode)' to the boolean testing videomode and
depth.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pavel Machek [Tue, 22 Sep 2009 23:47:03 +0000 (16:47 -0700)]
fbdev: framebuffer support for HTC Dream
Add a framebuffer driver for Qualcomm MSM/QSD SoCs, tested on HTC Dream
smartphone (aka T-Mobile G1, aka ADP1).
Brian said:
I did the original quick and dirty version for bringup. Rebecca took
over and (re)wrote the bulk of the driver, getting things stable for
production ship of Dream and Sapphire, and Dima is currently adding
support for later Qualcomm chipsets (QSD8x50, etc).
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: Brian Swetland <swetland@google.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Rebecca Schultz Zavin <rebecca@android.com>
Cc: Dima Zavin <dima@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ville Syrjala [Tue, 22 Sep 2009 23:47:01 +0000 (16:47 -0700)]
atyfb: coding style cleanup
Fix a bunch of coding style problems in atyfb_base.c.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Cc: "H Hartley Sweeten" <hartleys@visionengravers.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Imre Deak [Tue, 22 Sep 2009 23:47:00 +0000 (16:47 -0700)]
omapfb: HWA742: fix pointer to be const
Fixes the following:
warning: assignment discards qualifiers from pointer target type
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Imre Deak [Tue, 22 Sep 2009 23:47:00 +0000 (16:47 -0700)]
omapfb: add FB manual update option to Kconfig
Also move the controller specific options up in the menu, to a more
logical spot.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arun c [Tue, 22 Sep 2009 23:46:59 +0000 (16:46 -0700)]
omapfb: fix coding style / remove dead line
- use __iomem type attribute where appropriate
- expand (a ? : b) to (a ? a : b)
As suggested by Russel King <linux@arm.linux.org.uk>
- remove a dead line from omapfb_main.c
Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jouni Hogander [Tue, 22 Sep 2009 23:46:58 +0000 (16:46 -0700)]
omapfb: suspend/resume only if FB device is already initialized
Check wether fbdev is NULL in suspend / resume functions. Fbdev is
NULL, if there is no lcd or it is not enabled in configuration.
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Stone [Tue, 22 Sep 2009 23:46:57 +0000 (16:46 -0700)]
omapfb: dispc: allow multiple external IRQ handlers
Previously, the only external (to dispc.c) IRQ handler was RFBI's frame
done handler. dispc's IRQ framework was very dumb: you could only have
one handler, and the semantics of {request,free}_irq were odd, to say the
least.
The new framework allows multiple consumers to register arbitrary IRQ
masks.
Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jouni Hogander [Tue, 22 Sep 2009 23:46:56 +0000 (16:46 -0700)]
omapfb: dispc: enable wake up capability
Without wakeup enable omap doesn't wake up on dispc interrupts. This
causes problems in a case where mpu is in sleep state and dispc interrupt
fires.
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jouni Hogander [Tue, 22 Sep 2009 23:46:55 +0000 (16:46 -0700)]
omapfb: dispc: disable iface clocks along with func clocks
Leaving interface clocks enabled causes dss pwrdm to stay in active state
when mpu is in active state. This fix puts dss to sleep state when it is
not needed.
Earlier version broke framebuffer on 24xx. This is fixed by enabling
clocks before trying to access DISPC_IRQSTATUS register.
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Imre Deak [Tue, 22 Sep 2009 23:46:54 +0000 (16:46 -0700)]
omapfb: dispc: various typo fixes
- value and register offset was swapped in a dispc write
- DISPC_CONTROL register was used instead of DISPC_SYSCONFIG
- FIFO size bit field had incorrect length for OMAP3
Fixed-by: arun <arunedarath@mistralsolutions.com>
Fixed-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Fixed-by: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Imre Deak [Tue, 22 Sep 2009 23:46:54 +0000 (16:46 -0700)]
N770: enable LCD MIPI-DCS in Kconfig
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rodrigo Vivi [Tue, 22 Sep 2009 23:46:53 +0000 (16:46 -0700)]
omapfb: add support for rotation on the Blizzard LCD ctrl
The LCD controller (EPSON S1D13744) supports rotation (0, 90, 180 and 270
degrees) on hardware just setting the bits 0 and 1 of 0x28 register (LCD
Panel Configuration Register). Now it is possible to use this caps only
setting the angle degree on var rotate of fb_var_screeninfo using the
FBIOPUT_VSCREENINFO ioctl.
Fixed-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@openbossa.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stanley.Miao [Tue, 22 Sep 2009 23:46:52 +0000 (16:46 -0700)]
omapfb: add support for the ZOOM MDK LCD
Add glue to control the OMAP_LDP LCD as a frame buffer device using the
existing dispc.c driver under omapfb.
Patch updated for mainline kernel. Note that the drivers/video/omap
should be updated to pass omap_lcd_config in platform_data. The patch
should also be updated to compile if twl4030 is not selected, and
eventually to use the regulator framework.
Fixed-by: Jarkko Nikula <jarkko.nikula@gmail.com>
Fixed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Steve Sakoman [Tue, 22 Sep 2009 23:46:51 +0000 (16:46 -0700)]
omapfb: add support for the Gumstix Overo LCD
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Koen Kooi [Tue, 22 Sep 2009 23:46:50 +0000 (16:46 -0700)]
omapfb: add support for the OMAP3 Beagle DVI output
The default resolution is 1024x768@24bit
This version addresses the comments from Felipe Balbi adn Arun Edarath
Fixed-by: Felipe Contreras <felipe.contreras@gmail.com>
Fixed-by: Steve Sakoman <steve@sakoman.com>
Fixed-by: Jarkko Nikula <jarkko.nikula@gmail.com>
Fixed-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Koen Kooi <koen@openembedded.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Steve Sakoman [Tue, 22 Sep 2009 23:46:49 +0000 (16:46 -0700)]
omapfb: add support for the OMAP3 EVM LCD
Add LCD support for OMAP3 EVM
Backlight support by Arun C <arunedarath@mistralsolutions.com>
Fixed-by: Jarkko Nikula <jarkko.nikula@gmail.com>
Fixed-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Syed Mohammed Khasim <khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kevin Hilman [Tue, 22 Sep 2009 23:46:48 +0000 (16:46 -0700)]
omapfb: add support for the 3430SDP LCD
The 3430SDP uses the same panel as the 2430SDP. The main difference are
in the GPIO lines used for panel enable and backlight, and the VAUX
register/commands sent to the TWL4030 power subsystem.
Also, some misc. whitespace cleanups.
Fixed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@mvsita.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arun c [Tue, 22 Sep 2009 23:46:47 +0000 (16:46 -0700)]
omapfb: add support for the OMAP2EVM LCD
omap2evm LCD supports VGA and QVGA resolution, by default its in VGA mode.
Fixed-by: Jarkko Nikula <jarkko.nikula@gmail.com>
Fixed-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hunyue Yau [Tue, 22 Sep 2009 23:46:45 +0000 (16:46 -0700)]
omapfb: add support for the 2430SDP LCD
Add glue to control the 2430SDP LCD as a frame buffer device using the
existing dispc.c driver under omapfb.
Fixed-by: Kevin Hilman <khilman@mvista.com>
Fixed-by: Sergio Aguirre <saaguirre@ti.com>
Fixed-by: Francisco Alecrim <francisco.alecrim@indt.org.br>
Fixed-by: Tony Lindgren <tony@atomide.com>
Fixed-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Hunyue Yau <hyau@mvista.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jonathan McDowell [Tue, 22 Sep 2009 23:46:44 +0000 (16:46 -0700)]
omapfb: add support for the Amstrad Delta LCD
This is an updated version of the LCD driver for the Amstrad Delta to take
into account the recent changes to the omapfb infrastructure. The Delta
features a 480x320 12 bit DSTN panel.
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Imre Deak [Tue, 22 Sep 2009 23:46:41 +0000 (16:46 -0700)]
omapfb: add support for MIPI-DCS compatible LCDs
Fixed-by: Mike Wege <ext-mike.wege@nokia.com>
Fixed-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Fixed-by: Timo Savola <tsavola@movial.fi>
Fixed-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Fixed-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kyungmin Park [Tue, 22 Sep 2009 23:46:40 +0000 (16:46 -0700)]
omapfb: add support for the Apollon LCD
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Hennerich [Tue, 22 Sep 2009 23:46:39 +0000 (16:46 -0700)]
gpio: gpio support for ADP5520/ADP5501 MFD PMICs
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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 [Tue, 22 Sep 2009 23:46:38 +0000 (16:46 -0700)]
gpiolib: allow poll() on value
Many gpio chips allow to generate interrupts when the value of a pin
changes. This patch gives usermode application the opportunity to make
use of this feature by calling poll(2) on the /sys/class/gpio/gpioN/value
sysfs file. The edge to trigger can be set in the edge file in the same
directory. Possible values are "none", "rising", "falling", and "both".
Using level triggers is not possible with current sysfs since nothing
changes the GPIO value (and the IRQ keeps triggering). Edge triggering
will "just work". Note that if there was an event between read() and
poll(), the poll() returns immediately.
Also note that this version only supports true GPIO interrupts. Some
later patch might be able to synthesize this behavior by timer-driven
polling; some systems seem to need that.
[dbrownell@users.sourceforge.net: align ids to 16 bit ids; whitespace]
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H Hartley Sweeten [Tue, 22 Sep 2009 23:46:37 +0000 (16:46 -0700)]
gpio: include <linux/gpio.h> not <asm/gpio.h>
Drivers should be including <linux/gpio.h> not <asm/gpio.h>.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.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>
Alek Du [Tue, 22 Sep 2009 23:46:36 +0000 (16:46 -0700)]
gpio: pca953x: add support for MAX7315
MAX7315 is pin and software compatible with PCA9534, so add it to the I2C
device ID table of pca953x driver.
http://www.datasheetcatalog.org/datasheet/maxim/MAX7315.pdf
Signed-off-by: Alek Du <alek.du@intel.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alek Du [Tue, 22 Sep 2009 23:46:36 +0000 (16:46 -0700)]
gpio: add Intel Moorestown Platform Langwell chip gpio driver
The Langwell chip is the IO hub for Intel Moorestown platform which has a
64-pin gpio block device inside. It is exposed as a dedicated PCI device.
We use it to control outside peripheral as well as to do IRQ demuxing.
The gpio block uses MSI to send level type interrupt to IOAPIC.
Signed-off-by: Alek Du <alek.du@intel.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>
Marek Vasut [Tue, 22 Sep 2009 23:46:35 +0000 (16:46 -0700)]
mfd/gpio: add a GPIO interface to the UCB1400 MFD chip driver via gpiolib
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Cc: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Richard Röjfors [Tue, 22 Sep 2009 23:46:34 +0000 (16:46 -0700)]
gpio: add MC33880 driver
A GPIO driver for the Freescale MC33880 High/Low side switch
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.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>
Jani Nikula [Tue, 22 Sep 2009 23:46:33 +0000 (16:46 -0700)]
gpiolib: allow exported GPIO nodes to be named using sysfs links
Commit
926b663ce8215ba448960e1ff6e58b67a2c3b99b (gpiolib: allow GPIOs to
be named) already provides naming on the chip level. This patch provides
more flexibility by allowing multiple names where ever in sysfs on a per
GPIO basis.
Adapted from David Brownell's comments on a similar concept:
http://lkml.org/lkml/2009/4/20/203.
[randy.dunlap@oracle.com: fix build for CONFIG_GENERIC_GPIO=n]
Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Daniel Silverstone <dsilvers@simtec.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Matthew Garrett [Tue, 22 Sep 2009 23:46:32 +0000 (16:46 -0700)]
rtc: add boot_timesource sysfs attribute
CONFIG_RTC_HCTOSYS allows the kernel to read the system time from the RTC
at boot and resume, avoiding the need for userspace to do so.
Unfortunately userspace currently has no way to know whether this
configuration option is enabled and thus cannot sensibly choose whether to
run hwclock itself or not. Add a hctosys sysfs attribute which indicates
whether a given RTC set the system clock.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.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>
Matthew Garrett [Tue, 22 Sep 2009 23:46:31 +0000 (16:46 -0700)]
rtc: document the sysfs interface
The sysfs interface to the RTC class drivers is currently undocumented.
Add some basic documentation defining the semantics of the fields.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
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 [Tue, 22 Sep 2009 23:46:31 +0000 (16:46 -0700)]
rtc: at91rm9200 fixes
Fix two new-ish runtime warnings in the at91rm9200 (etc) RTC:
Platform driver 'at91_rtc' needs updating - please use dev_pm_ops
... by just switching
IRQ 1/at91_rtc: IRQF_DISABLED is not guaranteed on shared IRQs
... no longer needed now that rtc_update_irq() changed
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Julia Lawall [Tue, 22 Sep 2009 23:46:30 +0000 (16:46 -0700)]
drivers/rtc: introduce missing kfree
Error handling code following a kzalloc should free the allocated data.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: David Brownell <david-b@pacbell.net>
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>
Julia Lawall [Tue, 22 Sep 2009 23:46:29 +0000 (16:46 -0700)]
drivers/rtc: correct error-handling code
This code is not executed before ds1307->rtc has been successfully
initialized to the result of calling rtc_device_register. Thus the test
that ds1307->rtc is not NULL is always true.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@
x = rtc_device_register(...)
... when != x = E
(
* if (x == NULL || ...) S1 else S2
|
* if (x == NULL && ...) S1 else S2
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-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>
Daniel Ribeiro [Tue, 22 Sep 2009 23:46:27 +0000 (16:46 -0700)]
rtc: driver for PCAP2 PMIC
[ospite@studenti.unina.it: get pcap data from the parent device]
Signed-off-by: guiming zhuo <gmzhuo@gmail.com>
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alessandro Zummo [Tue, 22 Sep 2009 23:46:26 +0000 (16:46 -0700)]
rtc: reorder Makefile
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dmitry pervushin [Tue, 22 Sep 2009 23:46:26 +0000 (16:46 -0700)]
rtc: add Freescale stmp37xx/378x driver
Add support for RTC on the Freescale STMP37xx/378x platform.
Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Hennerich [Tue, 22 Sep 2009 23:46:25 +0000 (16:46 -0700)]
rtc-bfin: do not share RTC IRQ
The Blackfin RTC IRQ is an internal interrupt, so it makes no sense to
have it be shared.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Tue, 22 Sep 2009 23:46:24 +0000 (16:46 -0700)]
rtc: update documentation wrt RTC_PIE/irq_set_state
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Walleij [Tue, 22 Sep 2009 23:46:24 +0000 (16:46 -0700)]
rtc: U300 COH 901 331 RTC driver v3
This adds a driver for the RTC COH 901 331 found in the ST-Ericsson U300
series mobile platforms to the RTC subsystem. It integrates to the ARM
kernel support recently added to RMKs ARM tree and will be enabled in the
U300 defconfig in due time.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Mack [Tue, 22 Sep 2009 23:46:23 +0000 (16:46 -0700)]
rtc: add driver for MXC's internal RTC module
This adds a driver for Freescale's MXC internal real time clock modules.
The code is taken from Freescale's BSPs, but modified to fit the current
kernel coding mechanisms. Also, the PMIC external clock function was
removed for now to not add dead bits and keep the code as simple as
possible.
[akpm@linux-foundation.org: make PIE_BIT_DEF[] static]
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Verges [Tue, 22 Sep 2009 23:46:22 +0000 (16:46 -0700)]
rtc-philips-pcf2123-rtc-spi-driver-updates
Signed-off: Chris Verges <chrisv@cyberswitching.com>
Cc: Christian Pellegrin <chripell@fsfe.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
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>
Chris Verges [Tue, 22 Sep 2009 23:46:20 +0000 (16:46 -0700)]
rtc: Philips PCF2123 RTC SPI driver
Add support for the Philips/NXP PCF2123 RTC.
Signed-off: Chris Verges <chrisv@cyberswitching.com>
Tested-by: Chris Verges <chrisv@cyberswitching.com>
Signed-off: Christian Pellegrin <chripell@fsfe.org>
Tested-by: Christian Pellegrin <chripell@fsfe.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
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 [Tue, 22 Sep 2009 23:46:18 +0000 (16:46 -0700)]
spi: handle TX-only/RX-only
Support two new half-duplex SPI implementation restrictions, for links
that talk to TX-only or RX-only devices. (Existing half-duplex flavors
support both transfer directions, just not at the same time.)
Move spi_async() into the spi.c core, and stop inlining it. Then make
that function perform error checks and reject messages that demand more
than the underlying controller can support.
Based on a patch from Marek Szyprowski which did this only for the
bitbanged GPIO driver.
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Syed Rafiuddin [Tue, 22 Sep 2009 23:46:18 +0000 (16:46 -0700)]
spi: McSPI support for OMAP4
tAdd adds McSPI support for OMAP4430 SDP platform. All the base addresses
are changed between OMAP1/2/3 and OMAP4. The fields of the resource
structures are filled at runtime to have McSPI support on OMAP4.
Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tero Kristo [Tue, 22 Sep 2009 23:46:17 +0000 (16:46 -0700)]
spi: McSPI saves CHCONFx too
Previous restore was lazy and only restored CHxCONF when it was needed by
a specific chip select. This could cause occasional errors on an SPI bus
where multiple chip selects are in use.
Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hemanth V [Tue, 22 Sep 2009 23:46:16 +0000 (16:46 -0700)]
spi: McSPI off-mode support
Add context save/restore feature to McSPI driver.
Signed-off-by: Hemanth V <hemanthv@ti.com>
Reviewed-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dmitry pervushin [Tue, 22 Sep 2009 23:46:15 +0000 (16:46 -0700)]
spi: Freescale STMP driver
Add SPI driver for Freescale STMP 3xxx-based boards
[dbrownell@users.sourceforge.net: cleanup sequence, spi_unregister_master]
Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Tue, 22 Sep 2009 23:46:14 +0000 (16:46 -0700)]
spi_s3c24xx: cache device setup data
With the update to the spi_bitbang driver, the transfer setup code is
being called more often, and thus is often re-doing calculations that have
been done before. The SPI layer allows our driver to add its own data to
each device so add a result cache to each device.
This should also remove the problem where we where directly setting up
registers in the setup call which meant we might overwrite the state of an
extant transfer.,
Signed-off-by: Ben Dooks <ben@simtec.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>