Commit Graph

168131 Commits

Author SHA1 Message Date
Cong Ding 82f8c35f86 tty: cleanup the panic message
the "\n" in panic message is excess, so we remove it in tty/pty.c as what it
is used in other places.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:49:36 -08:00
Greg Kroah-Hartman 4e18585d51 Revert "n_gsm.c: add tx_lock in gsm_send"
This reverts commit f96f7f7f39, at the
request of Jin.

Cc: xiaojin <jin.xiao@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:48:15 -08:00
Greg Kroah-Hartman d73dfc6a41 serial: 8250_pci: remove __devexit usage
Some __devexit markings came in from an older patch, this removes them.

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:44:48 -08:00
Jiri Slaby fa47ba75ec TTY: nozomi, remove dead code
We test for !dc twice, remove the second test. Coverity found this.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:43:16 -08:00
Jiri Slaby cc5ab61086 TTY: synclink, remove unneeded tests
info in synclink bottom-halves cannot be NULL because it is taken from
work_struct using container_of. Remove the tests.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:43:15 -08:00
Jiri Slaby dabe2c1385 cyclades: push down tty_port_tty_get
Now, the tty is not needed at all places in the ISR. So we can just
request in on demand when really needed.

This cleans TX and RX paths a bit as the indentation level can be
dropped by two now when we also invert the char_count if condition.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:43:15 -08:00
Jiri Slaby 6732c8bb86 TTY: switch tty_schedule_flip
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

This is the last one: tty_schedule_flip

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:43:15 -08:00
Jiri Slaby 2e124b4a39 TTY: switch tty_flip_buffer_push
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:30:15 -08:00
Jiri Slaby d6c53c0e9b TTY: move low_latency to tty_port
One point is to have less places where we actually need tty pointer.
The other is that low_latency is bound to buffer processing and
buffers are now in tty_port. So it makes sense to move low_latency to
tty_port too.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:23:16 -08:00
Jiri Slaby 05c7cd3990 TTY: switch tty_insert_flip_string
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

tty_insert_flip_string this time.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:22:35 -08:00
Jiri Slaby 92a19f9cec TTY: switch tty_insert_flip_char
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

tty_insert_flip_char is the next one to proceed. This one is used all
over the code, so the patch is huge.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:21:36 -08:00
Jiri Slaby 2f69335710 TTY: convert more flipping functions
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.

Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flags

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:17:29 -08:00
Jiri Slaby 227434f898 TTY: switch tty_buffer_request_room to tty_port
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.

Here we start with tty_buffer_request_room.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:17:28 -08:00
Vineet Gupta ea28fd56fc serial/arc-uart: switch to devicetree based probing
* DT binding for arc-uart
* With alll the bits in place we can now use DT probing.

Note that there's a bit of kludge right now because earlyprintk portion
of driver can't use the DT infrastrcuture to get resoures/plat_data.
This requires some infrastructre changes to of_flat_ framework

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@linux.intel.com>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:16:05 -08:00
Vineet Gupta d6c0d06b34 serial/arc-uart: platform_data order changed
* is_emulated is now 1st element, rather than last
* also tucked all platform data refs together

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:15:48 -08:00
Vineet Gupta e163d1f42b serial/arc-uart: split probe from probe_earlyprintk
This is in preparation for devicetree based probing, where earlyprintk
won't have access to DT serial aliases which the normal probe would
absolutely rely on.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:15:17 -08:00
Vineet Gupta 026bb292c4 serial/arc-uart: Don't index with -ve platform_device->id
probe routine could index into port[] with -ve index. The check in
arc_uart_init_one() was too late.

This came to light when trying to port driver to CONFIG_OF, where
bydefault of-core code sets -ve platform dev id and in absence of
DT serial aliases, driver would use the -ve index.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:15:17 -08:00
Laxman Dewangan e9ea096dd2 serial: tegra: add serial driver
NVIDIA's Tegra has multiple UART controller which supports:
- APB DMA based controller fifo read/write.
- End Of Data interrupt in incoming data to know whether end
  of frame achieve or not.
- HW controlled RTS and CTS flow control to reduce SW overhead.

Add serial driver to use all above feature.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:15:17 -08:00
Sachin Kamat 42d3419154 serial: imx: Use devm_* APIs
devm_* APIs are device managed and make cleanup and exit code simpler
and easier.

Cc: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:02:52 -08:00
Sachin Kamat 50bbdba3dd serial: imx: Use pr_info instead of printk
Silences checkpatch warnings.

Cc: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:02:52 -08:00
Sachin Kamat 699cbd6726 serial: imx: Fix coding style issue
Silences the following checkpatch error:
ERROR: that open brace { should be on the previous line

Cc: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:02:51 -08:00
Sachin Kamat e32a9f8f34 serial: imx: Use <linux/io.h> instead of <asm/io.h>
Silences the following checkpatch warning:
WARNING: Use #include <linux/io.h> instead of <asm/io.h>

Cc: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:02:51 -08:00
Sachin Kamat 82313e66b1 serial: imx: Fix checkpatch errors related to spacing
Fixed checkpatch errors and warnings related to incorrect spacing.

Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 22:02:51 -08:00
Sachin Kamat 905f4ba252 serial: Samsung: Use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:57:44 -08:00
Thomas Abraham 41147bfdc5 serial: samsung: remove the use of statically remapped controller address
The address S3C_VA_UART is a statically ioremapped address. The driver
should not be using this. Instead, the driver should setup a mapping
during probe.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:57:44 -08:00
Thomas Jarosch 81a7d77749 serial: mxs-auart: Fix typo in sanity check
Detected by cppcheck:
[others/linux/drivers/tty/serial/mxs-auart.c:553]: (style) Same expression on both sides of '||'.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:57:44 -08:00
Kevin Cernekee ef4f527c48 tty: Fix comments that reference BKL, eventd, old paths
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:57:44 -08:00
Ralf Baechle a205a56dc2 serial: Remove RM9000 series serial driver.
Now that support for RM9000 and platforms based on it has been removed,
remove the serial driver for it as well.  It's really only been a quirk
for an almost 8250 compatible UART anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/tty/serial/8250/8250.c  | 70 +----------------------------------------
 drivers/tty/serial/8250/Kconfig |  9 ------
 include/linux/serial_core.h     |  1 -
 3 files changed, 1 insertion(+), 79 deletions(-)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:54:41 -08:00
Chen Gang 6d8df4b6a3 serial: avoid double free after call ioc4_serial_remove_one
before goto out5,  soft, control, serial are all assigned to idd
  after finish call ioc4_serial_remove_one, all resources are released
  we need return instead of go on, or double free

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:54:41 -08:00
xiaojin f96f7f7f39 n_gsm.c: add tx_lock in gsm_send
All the call to gsm->output should be in the tx_lock,
that could avoid potential race from MUX level. But
we have no tx_lock in gsm_send.

This patch is to add tx_lock in gsm_send.

Signed-off-by: xiaojin <jin.xiao@intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:54:41 -08:00
Barry Song 5425e03f97 serial: sirf: add support for new SiRFmarco SMP SoC
CSR SiRFmarco's UART IP is same with SiRFprimaII except that
it has two more uart ports.
this patch makes the old driver support new SiRFmarco as well:
1. add .compatible = "sirf,marco-uart" to OF match table
2. add two ports in the port table
3. take spin_lock in isr to avoid the conflict of threads opening
uart on CPU1 and isr running on CPU0.
For 3, we did see some problems on SiRFmarco as SiRFmarco is a
SMP SoC but the old SiRFprimaII is UP.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:54:40 -08:00
Cong Ding 92b336f6af tty: vt/Makefile: set the variables to static
tty: vt/Makefile: set the variables to static

In the file drivers/tty/vt/defkeymap.c generated by command
loadkeys --mktable defkeymap.map > defkeymap.c
the 6 variables: shift_map, altgr_map, ctrl_map, shift_ctrl_map, alt_map,
and ctrl_alt_map should be static because they are used only in this file.
There is no reason to remove the static by sed command.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:52:24 -08:00
Linus Walleij 6f538fe31c tty: serial core: decouple pm states from ACPI
The serial core is using power states lifted from ACPI for no
good reason. Remove this reference from the documentation and
alter all users to use an enum specific to the serial core
instead, and define it in <linux/serial_core.h>.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:52:23 -08:00
Enric Balletbo i Serra fdbc7353e4 serial: omap: add the functionality of a 9-bit UART with userspaces CMSPAR
Some systems require the additional communication functionality of a
9-bit UART. For that we could use the "stick" (mark/space) parity
bit supported on omap serial device. When is set, if PARODD is set the
parity bit is always 1; if PARODD is not set, then the parity bit is
always 0.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:52:23 -08:00
Paul Fulghum a6b68a69fa synclink fix ldisc buffer argument
Fix call to line discipline receive_buf by synclink drivers.
Dummy flag buffer argument is ignored by N_HDLC line discipline but might
be of insufficient size if accessed by a different line discipline
selected by mistake. flag buffer allocation now matches max size of data
buffer. Unused char_buf buffers are removed.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:52:23 -08:00
Alan Cox 55c7c0fdc5 serial: quatech: add the other serial identifiers and preliminary control code
Jonathan Woithe posted an out of tree enabler/control module for these
cards.  Lift the relevant identifiers and put them in the 8250_pci driver
along with code used to control custom registers on these cards.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 21:44:39 -08:00
Linus Torvalds 57a0c1e2d6 Two error path fixes causing a crash and a Kconfig fix for an issue
which spilled all EDAC suboptions into the 'Device Drivers' menu.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ7D0jAAoJEBLB8Bhh3lVKtcgP/3uzBjETQ7KzKG9R+zHxkBom
 7pl6UYqgquqpoqP3tGsn0+oaVyEvY3D11NMp/vhGxUjqJjDnIE3T/TvBMIwaRaq1
 /bPrZ+hE5d2mHWP/TULEVVYMziHhR9UO1SpB+E7vX7FqKcLwzeiS7CMlm4qjq0qC
 duXCG/6gyEKIecT3KPuXFzpojV6pSpSIYvLu03hdS3e8w7Wb6jvomWV282TpaSim
 aFyL909M/f4kexWD0827VnBxogwBWPl1hIGfFVprYGrabgUTtfb/OFhnZut8U1FV
 giDtDgIC7nATp1LzTK+fPE5kx9yZvrE1SV8ZTNF6r0dYH14fnR3YgbQqbVgbLUYF
 icQqCHpyZKD+s/ajymq8lg+ltVtROqCLWdT6YFZlaBlObP0sYltpSj1JRcoC5O6c
 Lx252LQQmxMQZKGnNlBooI6QN73GXlsngTgHD9z3DpFgvRilhA8EmbK2ZFFesdkk
 R4s25yH8fno6ClhxlwyA3+0vwU9B19Ul00cx4/5ZXPdK56Fq7slM/ORTE5SQFrHH
 6QG/pYDz09WXhKvOtX4ZRh2bBudMsY7mgsrxFelGYtsqHikLtYVUzkkyFkccjZMj
 UWcHUHsdSx+gr4DK/jclW1tDgwzh2G17d3FJobujGSgJJIqM2qOo/izON/g4+ojA
 RlKqYTCkAh3fX6DZX1vX
 =Qh4Y
 -----END PGP SIGNATURE-----

Merge tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull EDAC fixes from Borislav Petkov:
 "Two error path fixes causing a crash and a Kconfig fix for an issue
  which spilled all EDAC suboptions into the 'Device Drivers' menu."

* tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC: Cleanup device deregistering path
  EDAC: Fix EDAC Kconfig menu
  EDAC: Fix kernel panic on module unloading
2013-01-09 08:43:56 -08:00
Linus Torvalds 974b33586b ARM: arm-soc fixes for 3.8-rc
People are back from the holiday breaks, and it shows. Here are a bunch of
 fixes for a number of platforms:
  - A couple of small fixes for Nomadik
  - A larger set of changes for kirkwood/mvebu
    - uart driver selection, dt clocks, gpio-poweroff fixups,
      a few __init annotation fixes and some error handling improvement
      in their xor dma driver.
  - i.MX had a couple of minor fixes (and a critical one for flexcan2
    clock setup)
  - MXS has a small board fix and a framebuffer bugfix
  - A set of fixes for Samsung Exynos, fixing default bootargs and some
    Exynos5440 clock issues
  - A set of OMAP changes including PM fixes and a few sparse warning
    fixups
 
 All in all a bit more positive code delta than we'd ideally want to see
 here, mostly from the OMAP PM changes, but nothing overly crazy.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ7GYhAAoJEIwa5zzehBx31HMP/jqBBdEAKBoQrVPXgCISTkGp
 WzpPbFnt17R9uxVZFjsmlcTgBOURSkbDwENVnyJ4ZkVFOAQHOSCriyQFrsgeBAEj
 WU2FK3E6/V4BHob8hSqmbCjwRUyzOM6z4+oMZQgpBS2y0sgVWFySOE3Fe7cf1IJr
 11D5/mzOqRYu8fkXar2ksK752N7O5m9sZoJ4A8cJs1DBL8/a0c6ASZGkaKql0WFn
 hel6nFznTe/qZwGqjIOaWrFhUe9pmqRlRtTDT5hlmMzC4+O12TEBaFIrJHlq8SkZ
 nxSdZcD9ERAgp58zMEMzDI0ZNkdXTV3xRtkehTvaJheCpeAGq0J63fEd/Yn4T/V3
 fUeNrUqNLl59dZEvFS1Xm/2dpYLrUDCkNWQoTAjLAfEmJ1v9vjcP22seXD9tzXtl
 XdcjEIOnAb+d3J6D3vW1EvgPiTrS0EId5Mkv/LSIAyR0OAjqJr3L/keUUG2OVH1q
 UW7V052KEW0P0jDQnmhxNkkl8fnZCQtLRH9ukVs2qIbH28QBaH3irdFv+S74P2l2
 MWBqh21dm//PBJQqg1ujf0nl7IuCqDVaUYt6VYholGaRoyMaCSVsazJwC0/kzTNz
 EYVI8kAUIWQnAxXL5uN3oiqoSASKOfwtHGOJB7CB2FgdEVNWhdUpLk0xDi5ssF8o
 Iatq6W91y3xCkLhIP+77
 =s9fE
 -----END PGP SIGNATURE-----

Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "People are back from the holiday breaks, and it shows.  Here are a
  bunch of fixes for a number of platforms:
   - A couple of small fixes for Nomadik
   - A larger set of changes for kirkwood/mvebu
     - uart driver selection, dt clocks, gpio-poweroff fixups, a few
       __init annotation fixes and some error handling improvement in
       their xor dma driver.
   - i.MX had a couple of minor fixes (and a critical one for flexcan2
     clock setup)
   - MXS has a small board fix and a framebuffer bugfix
   - A set of fixes for Samsung Exynos, fixing default bootargs and some
     Exynos5440 clock issues
   - A set of OMAP changes including PM fixes and a few sparse warning
     fixups

  All in all a bit more positive code delta than we'd ideally want to
  see here, mostly from the OMAP PM changes, but nothing overly crazy."

* tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits)
  ARM: clps711x: Fix bad merge of clockevents setup
  ARM: highbank: save and restore L2 cache and GIC on suspend
  ARM: highbank: add a power request clear
  ARM: highbank: fix secondary boot and hotplug
  ARM: highbank: fix typos with hignbank in power request functions
  ARM: dts: fix highbank cpu mpidr values
  ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
  ARM: mx5: Fix MX53 flexcan2 clock
  ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
  pinctrl: mvebu: make pdma clock on dove mandatory
  ARM: Dove: Add pinctrl clock to DT
  dma: mv_xor: fix error handling for clocks
  dma: mv_xor: fix error handling of mv_xor_channel_add()
  arm: mvebu: Add missing ; for cpu node.
  arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces
  arm: mvebu: Armada XP MV78230 has two cores, not one
  clk: mvebu: Remove inappropriate __init tagging
  ARM: Kirkwood: Use fixed-regulator instead of board gpio call
  ARM: Kirkwood: Fix missing sdio clock
  ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers
  ...
2013-01-08 18:53:56 -08:00
Linus Torvalds ca5c8a4c2a Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm update from Dave Airlie:
 "Exynos and Radeon mostly, with a dma-buf and ttm fix thrown in.

  It's a bit big but its mostly exynos license fix ups and I'd rather
  not hold those up since its legally stuff.

  Radeon has a couple of fixes from dma engine work, TTM is just a
  locking fix, and dma-buf fix has been hanging around and I finally got
  a chance to review it."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (30 commits)
  drm/ttm: fix fence locking in ttm_buffer_object_transfer
  drm/prime: drop reference on imported dma-buf come from gem
  drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
  drm/exynos: move finish page flip to a common place
  drm/exynos: fimd: modify condition in fimd resume
  drm/radeon: fix DMA CS parser for r6xx linear copy packet
  drm/radeon: split r6xx and r7xx copy_dma functions
  drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
  drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c
  drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c
  drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
  drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
  drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c
  drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
  drm/exynos: Remove redundant NULL check
  drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c
  drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
  drm/exynos: fix gem buffer allocation type checking
  drm/exynos: remove needless parenthesis.
  drm/exynos: fix incorrect interrupt induced by m2m operation.
  ...
2013-01-08 16:08:10 -08:00
Olof Johansson 5595e755b6 I have to send one critical mxsfb fix through arm-soc, as FB maintainer
is unresponsive for quite a while.  People start complaining the missing
 of such an important fix.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJQ7DwYAAoJEFBXWFqHsHzOHnUH/2V7EKzq8g6FH5DyOf3+9x9f
 I+KyjVusIFdbLIJZhswbTnd2f1k5FQnQ+djd6fERi/wZ8IcG70vPRscKIYrLX6po
 gd0z684ORsBwNrHMfcKSY6DwZF2cLtP5BpyvtQzKHpP3nTYBgE7ePSFlfsAdJ5OG
 C77/tj61B/bUe0Mm8ygjMCwYsdqaR2+MTdEcStvOmwd4x+PBT3uSd56TFhXW2kt5
 Py2d48wowncNM5CVIW7vvH4kaaCW4h6mxnc3gyc8YS8h1JFItdYFSNUzT9Mb5ene
 aM3He/pp82OoXm84Swhi5Ah5566WVor+bgnvJ1TmV4Q/yd6Cn+MA2nIOevTnJvo=
 =Tjtj
 -----END PGP SIGNATURE-----

Merge tag 'mxs-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

From Shawn Guo:
I have to send one critical mxsfb fix through arm-soc, as FB maintainer
is unresponsive for quite a while.  People start complaining the missing
of such an important fix.

* tag 'mxs-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6:
  video: mxsfb: fix crash when unblanking the display
  ARM: dts: imx23-olinuxino: Fix IOMUX settings
2013-01-08 08:39:27 -08:00
Linus Torvalds 5c33d9b248 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) New sysctl ndisc_notify needs some documentation, from Hanns
    Frederic Sowa.

 2) Netfilter REJECT target doesn't set transport header of SKB
    correctly, from Mukund Jampala.

 3) Forcedeth driver needs to check for DMA mapping failures, from Larry
    Finger.

 4) brcmsmac driver can't use usleep_range while holding locks, use
    udelay instead.  From Niels Ole Salscheider.

 5) Fix unregister of netlink bridge multicast database handlers, from
    Vlad Yasevich and Rami Rosen.

 6) Fix checksum calculations in netfilter's ipv6 network prefix
    translation module.

 7) Fix high order page allocation failures in netfilter xt_recent, from
    Eric Dumazet.

 8) mac802154 needs to use netif_rx_ni() instead of netif_rx() because
    mac802154_process_data() can execute in process rather than
    interrupt context.  From Alexander Aring.

 9) Fix splice handling of MSG_SENDPAGE_NOTLAST, otherwise we elide one
    tcp_push() too many.  From Eric Dumazet and Willy Tarreau.

10) Fix skb->truesize tracking in XEN netfront driver, from Ian
    Campbell.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
  xen/netfront: improve truesize tracking
  ipv4: fix NULL checking in devinet_ioctl()
  tcp: fix MSG_SENDPAGE_NOTLAST logic
  net/ipv4/ipconfig: really display the BOOTP/DHCP server's address.
  ip-sysctl: fix spelling errors
  mac802154: fix NOHZ local_softirq_pending 08 warning
  ipv6: document ndisc_notify in networking/ip-sysctl.txt
  ath9k: Fix Kconfig for ATH9K_HTC
  netfilter: xt_recent: avoid high order page allocations
  netfilter: fix missing dependencies for the NOTRACK target
  netfilter: ip6t_NPT: fix IPv6 NTP checksum calculation
  bridge: add empty br_mdb_init() and br_mdb_uninit() definitions.
  vxlan: allow live mac address change
  bridge: Correctly unregister MDB rtnetlink handlers
  brcmfmac: fix parsing rsn ie for ap mode.
  brcmsmac: add copyright information for Canonical
  rtlwifi: rtl8723ae: Fix warning for unchecked pci_map_single() call
  rtlwifi: rtl8192se: Fix warning for unchecked pci_map_single() call
  rtlwifi: rtl8192de: Fix warning for unchecked pci_map_single() call
  rtlwifi: rtl8192ce: Fix warning for unchecked pci_map_single() call
  ...
2013-01-08 07:31:49 -08:00
Daniel Vetter e8e89622ed drm/ttm: fix fence locking in ttm_buffer_object_transfer
Noticed while reviewing the fence locking in the radeon pageflip
handler.

v2: Instead of grabbing the bdev->fence_lock in object_transfer just
move the single callsite of that function a few lines, so that it is
protected by the fence_lock. Suggested by Jerome Glisse.

v3: Fix typo in commit message.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-01-08 18:35:31 +10:00
Dave Airlie c75be2592c Merge branch 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux into drm-next
Alex writes:
 A few more fixes for DMA and a mac quirk.

* 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
  drm/radeon: fix DMA CS parser for r6xx linear copy packet
  drm/radeon: split r6xx and r7xx copy_dma functions
2013-01-08 14:52:52 +10:00
Seung-Woo Kim be8a42ae60 drm/prime: drop reference on imported dma-buf come from gem
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem
makes memory leak. release function of dma-buf cannot be called because f_count
of dma-buf increased by importing gem and gem ref count cannot be decrease
because of exported dma-buf.

So I add dma_buf_put() for imported gem come from its own gem into each drivers
having prime_import and prime_export capabilities. With this, only gem ref
count is increased if importing gem exported from gem of same driver.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <rob.clark@linaro.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-01-08 14:41:53 +10:00
Ian Campbell d9a58a782e xen/netfront: improve truesize tracking
Using RX_COPY_THRESHOLD is incorrect if the SKB is actually smaller
than that. We have already accounted for this in
NETFRONT_SKB_CB(skb)->pull_to so use that instead.

Fixes WARN_ON from skb_try_coalesce.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: annie li <annie.li@oracle.com>
Cc: xen-devel@lists.xen.org
Cc: netdev@vger.kernel.org
Cc: stable@kernel.org # 3.7.x only
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-07 19:51:19 -08:00
Linus Torvalds 2a893f91f5 ACPI and power management fixes for 3.8-rc3
* Removal of some ACPICA code that the kernel will never use from Lv Zheng.
 
 * APEI fix from Adrian Huang.
 
 * Removal of unnecessary ACPI memory hotplug driver code from Liu Jinsong.
 
 * Minor ACPI power management fixes.
 
 * ACPI debug code fix from Joe Perches.
 
 * ACPI fix to make system bus device nodes get the right names.
 
 * PNP resources handling fixes from Witold Szczeponik.
 
 * cpuidle fix for a recent regression stalling boot on systems with great
   numbers of CPUs from Daniel Lezcano.
 
 * cpuidle fixes from Sivaram Nair.
 
 * intel_idle debug message fix from Youquan Song.
 
 * cpufreq build regression fix from Larry Finger.
 
 * cpufreq fix for an obscure initialization race related to statistics from
   Konstantin Khlebnikov.
 
 * cpufreq change disabling the Longhaul driver by default from Rafał Bilski.
 
 * PM core fix preventing device suspend errors from happening during system
   suspend due to obscure race conditions.
 
 * PM QoS local variable name cleanup.
 
 --
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ61zgAAoJEKhOf7ml8uNsaYsQAK6EXORIIIvHtudjkcxcOxPp
 pQaHQ1/YHjxoO3N/dZpjgbozwSnkrf5iJs6BaN+LpbqLS3eRJDEJm3Hx8YAkt+bx
 ZcMUlPqr90W5AXvjlbJjyHIrupOX7TChgyyC0a8uTvDSylJMimWtEGn/VeYVRaCs
 GLfyVmDwMlMmC85vK+x27IoUxNuGzPiGx2s//thHv4HRL7d+5xn2Da0AHPSeZTZe
 ZuNCyWKwVzpJ8mjclAOTtwMUHGYys0x+T+7wa5IZq4yH0gEQZoKfLGW3uOg+h4R5
 wp8XhipORQh5A1AMGpC3bDhsplGggL1ImN2k50h4lKIAtpY8t1m++63i7hHiHX1I
 mfvNyinMJsnud80AZN5MgMAqykYDvgwO562LmaSBc+zNq2B1cfHuex9iA7CC+WAY
 5IKxN3EGPyQomkBRSYGnAEKw5jvktPMRT6JuLjLiwaz7NcWN72lWv66Xq34RLEld
 zZavCmo+fS7PWk5ofNh4RDrH+Zi02XixsgycmeKFxG+U1i/aM6tO3t9fcetUzIlJ
 JqCHAjyA8AyCApbm4GgVQBkw1MP8SsXeJ3FnYynx8n23EmHvh7gIUiG/Hk1vOEpF
 0ExwJMOOTXcv5BcfoCoF0VBJNBGq1wzipwN43Nj55LLUfJ4Ovp/T+ySXOc6seb3C
 nqx2e4VzVs0Gu2Cdt+wy
 =k35e
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-for-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:

 - Removal of some ACPICA code that the kernel will never use from Lv
   Zheng.

 - APEI fix from Adrian Huang.

 - Removal of unnecessary ACPI memory hotplug driver code from Liu
   Jinsong.

 - Minor ACPI power management fixes.

 - ACPI debug code fix from Joe Perches.

 - ACPI fix to make system bus device nodes get the right names.

 - PNP resources handling fixes from Witold Szczeponik.

 - cpuidle fix for a recent regression stalling boot on systems with
   great numbers of CPUs from Daniel Lezcano.

 - cpuidle fixes from Sivaram Nair.

 - intel_idle debug message fix from Youquan Song.

 - cpufreq build regression fix from Larry Finger.

 - cpufreq fix for an obscure initialization race related to statistics
   from Konstantin Khlebnikov.

 - cpufreq change disabling the Longhaul driver by default from Rafał
   Bilski.

 - PM core fix preventing device suspend errors from happening during
   system suspend due to obscure race conditions.

 - PM QoS local variable name cleanup.

* tag 'pm+acpi-for-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM: Move disabling/enabling runtime PM to late suspend/early resume
  PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
  ACPI / scan: Do not use dummy HID for system bus ACPI nodes
  cpufreq / governor: Fix problem with cpufreq_ondemand or cpufreq_conservative
  cpufreq / Longhaul: Disable driver by default
  cpufreq / stats: fix race between stats allocation and first usage
  cpuidle: fix lock contention in the idle path
  intel_idle: pr_debug information need separated
  cpuidle / coupled: fix ready counter decrement
  cpuidle: Fix finding state with min power_usage
  PNP: Handle IORESOURCE_BITS in resource allocation
  PNP: Simplify setting of resources
  ACPI / power: Remove useless message from device registering routine
  ACPI / glue: Update DBG macro to include KERN_DEBUG
  ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
  ACPI / memhotplug: remove redundant logic of acpi memory hotadd
  ACPI / APEI: Fix the returned value in erst_dbg_read
  ACPICA: Remove useless mini-C library.
2013-01-07 16:17:18 -08:00
Lans Zhang 44d22e2404 EDAC: Cleanup device deregistering path
Use device_unregister to replace put_device + device_del for
cleanup, and fix the potential use after free.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Signed-off-by: Borislav Petkov <bp@alien8.de>
2013-01-07 17:43:00 +01:00
Borislav Petkov 5445166384 EDAC: Fix EDAC Kconfig menu
After f65aad41772f("MIPS: Cavium: Add EDAC support."), when entering
the "Device Drivers" toplevel menu in menuconfig, the suboptions behind
EDAC appeared merged with the rest of the device drivers types. This was
because the menuconfig option EDAC is querying an EDAC_SUPPORT Kconfig
bool which was defined after the menu definition.

When pushing EDAC_SUPPORT up, before the menu definition, the variable
is defined earlier and the above menuconfig artifact doesn't happen.

Drop a useless menuconfig comment while at it.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Borislav Petkov <bp@alien8.de>
2013-01-07 17:42:59 +01:00
Konstantin Khlebnikov 311bd84247 EDAC: Fix kernel panic on module unloading
This patch fixes use-after-free and double-free bugs in
edac_mc_sysfs_exit(). mci_pdev has single reference and put_device()
calls mc_attr_release() which calls kfree(). The following
device_del() works with already released memory. An another kfree() in
edac_mc_sysfs_exit() releses the same memory again. Great.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: stable@vger.kernel.org # 3.[67]
Cc: Denis Kirjanov <kirjanov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Link: http://lkml.kernel.org/r/20121214110310.11019.21098.stgit@zurg
Signed-off-by: Borislav Petkov <bp@alien8.de>
2013-01-07 17:42:58 +01:00
Sebastian Hesselbarth ba607b6238 pinctrl: mvebu: make pdma clock on dove mandatory
With the ability to pass clocks through DT, now make the pdma
clock of dove pinctrl mandatory. Otherwise, pinctrl will hang
the system when accessing some registers.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-01-07 16:19:02 +00:00
Maarten Lankhorst d1f9809ed1 drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
vga-switcheroo with apple-gmux does not switch correctly on my system. The PCI
configuration space is not restored correctly, resulting in MSI not working after switch.

Only useful item in dmesg is:

[   33.922807] radeon 0000:01:00.0: Refused to change power state, currently in D3

I did some testing, dumping the difference in ms between first succesful switch
from D3 to D0, and it seems that there is slightly more than 20 ms difference when
the device is re-enabled through vga-switcheroo.

So bump the re-enable d3 delay to 20 ms to handle this, which fixes msi not working
on my system after switcheroo-ing. Default d3_delay value is PCI_PM_D3_WAIT, 10 ms.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-01-07 10:13:36 -05:00
Rahul Sharma 663d876670 drm/exynos: move finish page flip to a common place
This patch implements the exynos_drm_crtc_finish_pageflip in
exynos_drm_crtc.c. This avoids the duplication of same code
in mixer, fimd and vidi.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Stephane Marchesin <marcheu@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-07 13:58:37 +09:00
Prathyush K 28998afa13 drm/exynos: fimd: modify condition in fimd resume
If fimd is runtime suspended (by DPMS OFF), fimd_suspend does not
call fimd_activate(false) and just returns. Similarily the check in
fimd_resume should not resume if previously runtime_suspended.
Instead the existing check does the opposite. So if fimd was not
runtime suspended, suspend will turn off fimd but resume will not turn
it on.  This patch fixes this issue by reversing the condition.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-07 13:49:02 +09:00
Thomas Petazzoni dab9206445 dma: mv_xor: fix error handling for clocks
When a channel fails to initialize, we release all ressources,
including clocks. However, a XOR unit is not necessarily associated to
a clock (some variants of Marvell SoCs have a clock for XOR units,
some don't), so we shouldn't unconditionally be releasing the clock.

Instead, just like we do in the mv_xor_remove() function, we should
check if one clock was found before releasing it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-01-06 17:53:28 +00:00
Thomas Petazzoni ab6e439fd0 dma: mv_xor: fix error handling of mv_xor_channel_add()
When mv_xor_channel_add() fails for one XOR channel, we jump to the
err_channel_add label to clean up all previous channels that had been
initialized correctly. Unfortunately, while handling this error
condition, we were disposing the IRQ mapping before calling
mv_xor_channel_remove() (which does the free_irq()), which is
incorrect.

Instead, do things properly in the reverse order of the
initialization: first remove the XOR channel (so that free_irq() is
done), and then dispose the IRQ mapping.

This avoids ugly warnings when for some reason one of the XOR channel
fails to initialize.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-01-06 17:53:25 +00:00
Joshua Coombs 3810e63041 clk: mvebu: Remove inappropriate __init tagging
If the Orion WDT driver is built as a module, an opps occurs during
clk lookup when calling mvebu_clk_gating_get_src().  Remove the
inappropriate __init tag so the function is available for modules
after kernel init.

Signed-off-by: Joshua Coombs <josh.coombs@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-01-06 17:53:13 +00:00
Andrew Lunn 5343527bbf Power: gpio-poweroff: Fix documentation and gpio_is_valid
Improve the documentation to clarify level vs edge triggered power off.
Improve the comments for level vs edge triggered power off.
Make use of gpio_is_valid().

Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-01-06 17:53:00 +00:00
Rafael J. Wysocki f67ffa9583 Merge branch 'pm-sleep'
* pm-sleep:
  PM: Move disabling/enabling runtime PM to late suspend/early resume
2013-01-06 00:36:17 +01:00
Rafael J. Wysocki 9f6d8f6ab2 PM: Move disabling/enabling runtime PM to late suspend/early resume
Currently, the PM core disables runtime PM for all devices right
after executing subsystem/driver .suspend() callbacks for them
and re-enables it right before executing subsystem/driver .resume()
callbacks for them.  This may lead to problems when there are
two devices such that the .suspend() callback executed for one of
them depends on runtime PM working for the other.  In that case,
if runtime PM has already been disabled for the second device,
the first one's .suspend() won't work correctly (and analogously
for resume).

To make those issues go away, make the PM core disable runtime PM
for devices right before executing subsystem/driver .suspend_late()
callbacks for them and enable runtime PM for them right after
executing subsystem/driver .resume_early() callbacks for them.  This
way the potential conflitcs between .suspend_late()/.resume_early()
and their runtime PM counterparts are still prevented from happening,
but the subtle ordering issues related to disabling/enabling runtime
PM for devices during system suspend/resume are much easier to avoid.

Reported-and-tested-by: Jan-Matthias Braun <jan_braun@gmx.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: 3.4+ <stable@vger.kernel.org>
2013-01-06 00:35:55 +01:00
Rafael J. Wysocki 868b093505 Merge branch 'pm-qos'
* pm-qos:
  PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
2013-01-06 00:33:22 +01:00
Rafael J. Wysocki 4ce4780270 PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
Local variable 'error' in dev_pm_qos_add_ancestor_request() need
not contain error codes only, so rename it to 'ret'.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-06 00:32:51 +01:00
Tony Prisk 2f90b68309 drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_time
tm_mon is 0..11, whereas vt8500 expects 1..12 for the month field,
causing invalid date errors for January, and causing the day field to
roll over incorrectly.

The century flag is only handled in vt8500_rtc_read_time, but not set in
vt8500_rtc_set_time.  This patch corrects the behaviour of the century
flag.

Signed-off-by: Edgar Toernig <froese@gmx.de>
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-01-04 16:11:48 -08:00
Tony Prisk 532db570e5 drivers/rtc/rtc-vt8500.c: correct handling of CR_24H bitfield
Control register bitfield for 12H/24H mode is handled incorrectly.
Setting CR_24H actually enables 12H mode.  This patch renames the define
and changes the initialization code to correctly set 24H mode.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Cc: Edgar Toernig <froese@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-01-04 16:11:48 -08:00
Laxman Dewangan dc59ed3865 rtc: add RTC driver for TPS6586x
Add an RTC driver for TPS6586X chips by TI.  This driver supports:

- Setting and getting time and date.
- Setting and reading alarm time.
- Alarm and interrupt functionlity.

[akpm@linux-foundation.org: remove stray semicolons]
[akpm@linux-foundation.org: start epoch in 2009]
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-01-04 16:11:48 -08:00
Joseph Lo 2d79cf8a9d drivers/rtc/rtc-tegra.c: convert to DT driver
After Kernel 3.7, the Tegra device will only support booting with DT.
The legacy Tegra RTC platform driver will not work anymore.  This patch
converts the driver to support DT.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-01-04 16:11:45 -08:00
Rafael J. Wysocki f3ea36aa87 Merge branch 'pm-cpufreq'
* pm-cpufreq:
  cpufreq / governor: Fix problem with cpufreq_ondemand or cpufreq_conservative
  cpufreq / Longhaul: Disable driver by default
  cpufreq / stats: fix race between stats allocation and first usage
2013-01-04 23:10:47 +01:00
Rafael J. Wysocki 3eef2455f3 Merge branch 'pm-cpuidle'
By Sivaram Nair (2) and others
* pm-cpuidle:
  cpuidle: fix lock contention in the idle path
  intel_idle: pr_debug information need separated
  cpuidle / coupled: fix ready counter decrement
  cpuidle: Fix finding state with min power_usage
2013-01-04 23:10:38 +01:00
Rafael J. Wysocki f3fe8bd7b1 Merge branch 'acpi-assorted'
* acpi-assorted:
  ACPI / scan: Do not use dummy HID for system bus ACPI nodes
  ACPI / power: Remove useless message from device registering routine
  ACPI / glue: Update DBG macro to include KERN_DEBUG
  ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
  ACPI / memhotplug: remove redundant logic of acpi memory hotadd
  ACPI / APEI: Fix the returned value in erst_dbg_read
2013-01-04 23:10:29 +01:00
Rafael J. Wysocki c49d874baf Merge branch 'acpica'
* acpica:
  ACPICA: Remove useless mini-C library.
2013-01-04 23:10:21 +01:00
Rafael J. Wysocki 4f5f64cf0c ACPI / scan: Do not use dummy HID for system bus ACPI nodes
At one point acpi_device_set_id() checks if acpi_device_hid(device)
returns NULL, but that never happens, so system bus devices with an
empty list of PNP IDs are given the dummy HID ("device") instead of
the "system bus HID" ("LNXSYBUS").  Fix the code to use the right
check.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: <stable@vger.kernel.org>
2013-01-04 23:00:54 +01:00
John W. Linville 7b87e57341 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2013-01-04 15:22:52 -05:00
Vladimir Kondratiev 9a6f7347f5 ath9k: Fix Kconfig for ATH9K_HTC
Ath9k consists of 2 different sub-modules: ATH9K and ATH9K_HTC.
Both uses common Atheros code from ath.ko and need ATH_COMMON.

However, while ATH9K selects ATH_COMMON, ATH9K_HTC does not.
As result, if ATH9K_HTC is the only Atheros card selected, compilation fails with
unresolved symbols.

This patch moves ATH_COMMON selection to the common part for both
ATH9K and ATH9K_HTC

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04 14:34:27 -05:00
Linus Torvalds 6ed1914982 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input update from Dmitry Torokhov:
 "Updates for the input subsystem.  Just a couple of driver fixes this
  time."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: gpio_keys - defer probing if GPIO probing is deferred
  Input: gpio_keys_polled - defer probing if GPIO probing is deferred
  Input: sentelic - only report position of first finger as ST coordinates
2013-01-04 10:30:11 -08:00
Linus Torvalds 256601421f Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull radeon and minor nouveau fixes from Dave Airlie:
 "Just a radeon pull from Alex, fixes a few regressions since 3.7 and
  reworks some of the reset handling, and two minor nouveau fixes I
  found on the list, Ben will be back next week to take care of the
  couple of larger nouveau patches that I see outstanding."

* 'drm-next' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: fix init with agpgart-uninorth
  drm: nouveau: Fix build warning seen if HWMON is undefined
  drm/radeon: switch to a finer grained reset for SI (v2)
  drm/radeon: switch to a finer grained reset for cayman/TN
  drm/radeon: switch to a finer grained reset for evergreen
  drm/radeon: switch to a finer grained reset for r6xx/7xx
  drm/radeon: add GPU reset flags
  drm/radeon: fix typo in evergreen dma fence
  drm/radeon: Properly handle DDC probe for DP bridges
  drm/radeon: reset dma engine on gpu reset (v2)
  drm/radeon: print dma status reg on lockup (v2)
  drm/radeon: improve ring debugfs printing
  drm/radeon: add debugfs file for dma rings
  drm/radeon/r6xx: fix DMA engine for ttm bo transfers
  drm/radeon: add connector table for Mac G4 Silver
2013-01-04 10:29:01 -08:00
Alex Deucher a10fbb4224 drm/radeon: fix DMA CS parser for r6xx linear copy packet
Was using the r7xx format.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-01-04 12:25:46 -05:00
Alex Deucher 43fb778754 drm/radeon: split r6xx and r7xx copy_dma functions
- r6xx actually uses a slightly different packet format,
although both formats seem to work ok.
- r7xx doesn't have the count multiple of 2 limitation.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-01-04 09:29:54 -05:00
Lothar Waßmann 6c1ecba8d8 video: mxsfb: fix crash when unblanking the display
The VDCTRL4 register does not provide the MXS SET/CLR/TOGGLE feature.
The write in mxsfb_disable_controller() sets the data_cnt for the LCD
DMA to 0 which obviously means the max. count for the LCD DMA and
leads to overwriting arbitrary memory when the display is unblanked.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Lauri Hintsala <lauri.hintsala@bluegiga.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-01-04 19:52:53 +08:00
Sachin Kamat 5cbd419cc5 drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
This eliminates the need for explicit clk_put and makes the
cleanup and exit path code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:35 +09:00
Sachin Kamat a8527cf5c3 drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c
devm_request_and_ioremap API checks for NULL. Hence explicit
NULL check is not necessary. Saves some code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:35 +09:00
Sachin Kamat cfdee8f421 drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c
devm_* APIs are device managed and get freed automatically when the
device detaches. Thus explicit freeing is not needed. This saves some
code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:35 +09:00
Sachin Kamat af8cd94613 drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
This eliminates the need for explicit clk_put and makes the
cleanup and exit path code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:35 +09:00
Sachin Kamat df257a8db4 drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
devm_request_and_ioremap API checks for NULL. Hence explicit
NULL check is not necessary. Saves some code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:35 +09:00
Sachin Kamat 6eac74d1b1 drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c
devm_* APIs are device managed and get freed automatically when the
device detaches. Thus explicit freeing is not needed. This saves some
code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:34 +09:00
Sachin Kamat 15b3263eb3 drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
This eliminates the need for explicit clk_put and makes the
cleanup and exit path code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:34 +09:00
Sachin Kamat 3fb6922eae drm/exynos: Remove redundant NULL check
devm_request_and_ioremap API checks for NULL. Hence explicit
NULL check is not necessary. Saves some code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:34 +09:00
Sachin Kamat 87acdde56d drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c
devm_* APIs are device managed and get freed automatically when the
device detaches. Thus explicit freeing is not needed. This saves some
code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:34 +09:00
Sachin Kamat bfb6ed2600 drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
devm_kzalloc makes the code simpler by eliminating the need for
explicit freeing.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:34 +09:00
Inki Dae 1dcfe2382a drm/exynos: fix gem buffer allocation type checking
This patch fixes gem buffer allocation type checking.
EXYNOS_BO_CONTIG has 0 so the checking should be fixed
to 'if (!(flags & EXYNOS_BO_NONCONTIG))'

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-01-04 15:54:34 +09:00
Eunchul Kim 13a32eb08d drm/exynos: remove needless parenthesis.
This patch removes needless parenthesis.
This was pointed out but in case of fimc side. we missed it.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:34 +09:00
Jinyoung Jeon e39d5ce132 drm/exynos: fix incorrect interrupt induced by m2m operation.
This patch fixes incorrect interrupt induced by m2m operation.
the m2m operation calls s/w reset every frame but there is the case that
the interrupt to m2m operation occures after s/w reset sometimes.
So this patch makes dma and capture operations stop at s/w reset
to avoid incorrect interrupt.

Signed-off-by: Jinyoung Jeon <jy0.jeon@samsung.com>
Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
JoongMock Shin b5c0b5526a drm/exynos: remove color bar pattern operation.
This patch removes color bar pattern register because we don't use the register anymore.
because it doesn't support color bar feature for writeback operation.
camera driver only supports color bar feature. but IPP doesn't support camera driver.

Signed-off-by: JoongMock Shin <jmock.shin@samsung.com>
Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
Eunchul Kim 6fe891f669 drm/exynos: correct some comments to abbreviation.
This patch cleanup corrects some comments to abbreviation.
We would like to prevent it stands misunderstood.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
Eunchul Kim 5bbea0c41c drm/exynos: fix build warning.
This patch fixes erroneous register read.
reall function needs register base address + offset but
exynos_drm_gsc module used only offset to read a register.
so this patch uses gsc_read function instead of readl.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
Eunchul Kim 4f21877cb8 drm/exynos: consider both case of vflip and hflip.
This patch considers both case of vflip and hflip.
If we want that the contents in buffer to be rotated to 180 degree,
then we can use h,vflip or 180 degree.

Changelog v2:
- added EXYNOS_DRM_FLIP_BOTH enum value to avoid build warnning.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
Eunchul Kim 0ca824c7df drm/exynos: remove needless error handling to property.
This patch removes property error handling. because property couldn't be NULL.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
Eunchul Kim 7259c3d6aa drm/exynos: change member variable name.
This patch change current command name from cmd to c_node.
because we are using the member name, 'cmd', for command control ioctl in another structure.
so, this patch changes it to c_node to avoid such confusing.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:33 +09:00
Inki Dae 694be45879 drm/exynos: consider buffer allocation without iommu
This patch fixes the issue that when buffer allocation is requested
without iommu, the allocation is failed.

Without iommu, dma_alloc_attrs function allocates some memory region
and returns cpu address so this patch makes the cpu address to be set
to buf->kvaddr correctly.

Changelog v2:
- fix buffer free
  . Without iommu, dma_free_attrs function requires kernel space address
    as argument. So it changes the argument, buf->pages to buf->kvaddr.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-01-04 15:54:32 +09:00
Inki Dae d81aecb5e6 drm/exynos: change file license to GPL
This patch changes file license to GPL

Most of exynos files had been copied from some random
file and not updated correctly. So this patch corrects
the file license.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-01-04 15:54:32 +09:00
Inki Dae c704f1b47d drm/exynos: consider no iommu support to console framebuffer
This patch considers no iommu support to kernel space mapping
of console framebuffer.

Without iommu, we get physical address instead of device address
after dma_alloc_attrs function is called. So we should consider
the case without iommu when it maps console framebuffer with
kernel space.

Changelog v2:
- calll vunmap function only with iommu support.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-01-04 15:54:32 +09:00
Seung-Woo Kim f4fd9bd486 drm/exynos: fix flags in dma buf exporting
This patch fixes flags passed to dma buf exporting.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-04 15:54:32 +09:00