platform/adaptation/renesas_rcar/renesas_kernel.git
9 years agoUSB: ssu100: fix overrun-error reporting
Johan Hovold [Tue, 18 Nov 2014 10:25:21 +0000 (11:25 +0100)]
USB: ssu100: fix overrun-error reporting

commit 75bcbf29c284dd0154c3e895a0bd1ef0e796160e upstream.

Fix reporting of overrun errors, which should only be reported once
using the inserted null character.

Fixes: 6b8f1ca5581b ("USB: ssu100: set tty_flags in ssu100_process_packet")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8188eu: Add new device ID for DLink GO-USB-N150
Larry Finger [Thu, 27 Nov 2014 16:10:21 +0000 (10:10 -0600)]
staging: r8188eu: Add new device ID for DLink GO-USB-N150

commit 6d4556fc0309608f760f1d329df56d77fdd0c31a upstream.

The DLink GO-USB-N150 with revision B1 uses this driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoiio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
Cristina Ciocan [Tue, 11 Nov 2014 14:07:42 +0000 (16:07 +0200)]
iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask

commit ccf54555da9a5e91e454b909ca6a5303c7d6b910 upstream.

The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
in order to retrieve it, that is 0x7F, not 0xCF as it is now.

Fixes: ade7ef7ba (staging:iio: Differential channel handling)
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agopowerpc/pseries: Fix endiannes issue in RTAS call from xmon
Laurent Dufour [Mon, 24 Nov 2014 14:07:53 +0000 (15:07 +0100)]
powerpc/pseries: Fix endiannes issue in RTAS call from xmon

commit 3b8a3c01096925a824ed3272601082289d9c23a5 upstream.

On pseries system (LPAR) xmon failed to enter when running in LE mode,
system is hunging. Inititating xmon will lead to such an output on the
console:

SysRq : Entering xmon
cpu 0x15: Vector: 0  at [c0000003f39ffb10]
    pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
    lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
    sp: c0000003f39ffc70
   msr: 8000000000009033
  current = 0xc0000003fafa7180
  paca    = 0xc000000007d75e80  softe: 0  irq_happened: 0x01
    pid   = 14617, comm = bash
Bad kernel stack pointer fafb4b0 at eca7cc4
cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
    pc: 000000000eca7cc4
    lr: 000000000eca7c44
    sp: fafb4b0
   msr: 8000000000001000
   dar: 10000000
 dsisr: 42000000
  current = 0xc0000003fafa7180
  paca    = 0xc000000007d75e80  softe: 0  irq_happened: 0x01
    pid   = 14617, comm = bash
cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
xmon: WARNING: bad recursive fault on cpu 0x15

The root cause is that xmon is calling RTAS to turn off the surveillance
when entering xmon, and RTAS is requiring big endian parameters.

This patch is byte swapping the RTAS arguments when running in LE mode.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agopowerpc/pseries: Honor the generic "no_64bit_msi" flag
Benjamin Herrenschmidt [Tue, 7 Oct 2014 05:12:55 +0000 (16:12 +1100)]
powerpc/pseries: Honor the generic "no_64bit_msi" flag

commit 415072a041bf50dbd6d56934ffc0cbbe14c97be8 upstream.

Instead of the arch specific quirk which we are deprecating

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoof/base: Fix PowerPC address parsing hack
Benjamin Herrenschmidt [Fri, 14 Nov 2014 06:55:03 +0000 (17:55 +1100)]
of/base: Fix PowerPC address parsing hack

commit 746c9e9f92dde2789908e51a354ba90a1962a2eb upstream.

We have a historical hack that treats missing ranges properties as the
equivalent of an empty one. This is needed for ancient PowerMac "bad"
device-trees, and shouldn't be enabled for any other PowerPC platform,
otherwise we get some nasty layout of devices in sysfs or even
duplication when a set of otherwise identically named devices is
created multiple times under a different parent node with no ranges
property.

This fix is needed for the PowerNV i2c busses to be exposed properly
and will fix a number of other embedded cases.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoath9k: Fix RTC_DERIVED_CLK usage
Miaoqing Pan [Thu, 6 Nov 2014 05:22:23 +0000 (10:52 +0530)]
ath9k: Fix RTC_DERIVED_CLK usage

commit 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9 upstream.

Based on the reference clock, which could be 25MHz or 40MHz,
AR_RTC_DERIVED_CLK is programmed differently for AR9340 and AR9550.
But, when a chip reset is done, processing the initvals
sets the register back to the default value.

Fix this by moving the code in ath9k_hw_init_pll() to
ar9003_hw_override_ini(). Also, do this override for AR9531.

Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: dpcm: Fix race between FE/BE updates and trigger
Takashi Iwai [Tue, 4 Nov 2014 15:52:28 +0000 (16:52 +0100)]
ASoC: dpcm: Fix race between FE/BE updates and trigger

commit ea9d0d771fcd32cd56070819749477d511ec9117 upstream.

DPCM can update the FE/BE connection states totally asynchronously
from the FE's PCM state.  Most of FE/BE state changes are protected by
mutex, so that they won't race, but there are still some actions that
are uncovered.  For example, suppose to switch a BE while a FE's
stream is running.  This would call soc_dpcm_runtime_update(), which
sets FE's runtime_update flag, then sets up and starts BEs, and clears
FE's runtime_update flag again.

When a device emits XRUN during this operation, the PCM core triggers
snd_pcm_stop(XRUN).  Since the trigger action is an atomic ops, this
isn't blocked by the mutex, thus it kicks off DPCM's trigger action.
It eventually updates and clears FE's runtime_update flag while
soc_dpcm_runtime_update() is running concurrently, and it results in
confusion.

Usually, for avoiding such a race, we take a lock.  There is a PCM
stream lock for that purpose.  However, as already mentioned, the
trigger action is atomic, and we can't take the lock for the whole
soc_dpcm_runtime_update() or other operations that include the lengthy
jobs like hw_params or prepare.

This patch provides an alternative solution.  This adds a way to defer
the conflicting trigger callback to be executed at the end of FE/BE
state changes.  For doing it, two things are introduced:

- Each runtime_update state change of FEs is protected via PCM stream
  lock.
- The FE's trigger callback checks the runtime_update flag.  If it's
  not set, the trigger action is executed there.  If set, mark the
  pending trigger action and returns immediately.
- At the exit of runtime_update state change, it checks whether the
  pending trigger is present.  If yes, it executes the trigger action
  at this point.

Reported-and-tested-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm_adsp: Avoid attempt to free buffers that might still be in use
Charles Keepax [Mon, 17 Nov 2014 10:48:21 +0000 (10:48 +0000)]
ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use

commit 9da7a5a9fdeeb76b2243f6b473363a7e6147ab6f upstream.

We should not free any buffers associated with writing out coefficients
to the DSP until all the async writes have completed. This patch updates
the out of memory path when allocating a new buffer to include a call to
regmap_async_complete.

Reported-by: JS Park <aitdark.park@samsung.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: sgtl5000: Fix SMALL_POP bit definition
Fabio Estevam [Fri, 14 Nov 2014 04:14:47 +0000 (02:14 -0200)]
ASoC: sgtl5000: Fix SMALL_POP bit definition

commit c251ea7bd7a04f1f2575467e0de76e803cf59149 upstream.

On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound  to happen
5 seconds after the end of a playback.

The SMALL_POP bit should fix this, but its definition is incorrect:
according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
bit 1.

Fix the definition accordingly and enable the bit as intended per the code
comment.

After applying this change, no loud 'click' sound is heard after playback

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: fsi: remove unsupported PAUSE flag
Kuninori Morimoto [Wed, 29 Oct 2014 04:01:53 +0000 (21:01 -0700)]
ASoC: fsi: remove unsupported PAUSE flag

commit c1b9b9b1ad2df6144ca3fbe6989f7bd9ea5c5562 upstream.

FSI doesn't support PAUSE.
Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: rsnd: remove unsupported PAUSE flag
Kuninori Morimoto [Wed, 29 Oct 2014 04:02:03 +0000 (21:02 -0700)]
ASoC: rsnd: remove unsupported PAUSE flag

commit 706c66213e5e623e23f521b1acbd8171af7a3549 upstream.

R-Car sound doesn't support PAUSE.
Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoib_isert: Add max_send_sge=2 minimum for control PDU responses
Or Gerlitz [Wed, 22 Oct 2014 21:55:49 +0000 (14:55 -0700)]
ib_isert: Add max_send_sge=2 minimum for control PDU responses

commit f57915cfa5b2b14c1cffa2e83c034f55e3f0e70d upstream.

This patch adds a max_send_sge=2 minimum in isert_conn_setup_qp()
to ensure outgoing control PDU responses with tx_desc->num_sge=2
are able to function correctly.

This addresses a bug with RDMA hardware using dev_attr.max_sge=3,
that in the original code with the ConnectX-2 work-around would
result in isert_conn->max_sge=1 being negotiated.

Originally reported by Chris with ocrdma driver.

Reported-by: Chris Moore <Chris.Moore@emulex.com>
Tested-by: Chris Moore <Chris.Moore@emulex.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoIB/isert: Adjust CQ size to HW limits
Chris Moore [Tue, 4 Nov 2014 16:28:29 +0000 (16:28 +0000)]
IB/isert: Adjust CQ size to HW limits

commit b1a5ad006b34ded9dc7ec64988deba1b3ecad367 upstream.

isert has an issue of trying to create a CQ with more CQEs than are
supported by the hardware, that currently results in failures during
isert_device creation during first session login.

This is the isert version of the patch that Minh Tran submitted for
iser, and is simple a workaround required to function with existing
ocrdma hardware.

Signed-off-by: Chris Moore <chris.moore@emulex.com>
Reviewied-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoclockevent: sun4i: Fix race condition in the probe code
Maxime Ripard [Tue, 18 Nov 2014 22:59:33 +0000 (23:59 +0100)]
clockevent: sun4i: Fix race condition in the probe code

commit 6bab4a8a1888729f17f4923cc5867e4674f66333 upstream.

The interrupts were activated and the handler registered before the clockevent
was registered in the probe function.

The interrupt handler, however, was making the assumption that the clockevent
device was registered.

That could cause a null pointer dereference if the timer interrupt was firing
during this narrow window.

Fix that by moving the clockevent registration before the interrupt is enabled.

Reported-by: Roman Byshko <rbyshko@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoPCI/MSI: Add device flag indicating that 64-bit MSIs don't work
Benjamin Herrenschmidt [Fri, 3 Oct 2014 05:13:24 +0000 (15:13 +1000)]
PCI/MSI: Add device flag indicating that 64-bit MSIs don't work

commit f144d1496b47e7450f41b767d0d91c724c2198bc upstream.

This can be set by quirks/drivers to be used by the architecture code
that assigns the MSI addresses.

We additionally add verification in the core MSI code that the values
assigned by the architecture do satisfy the limitation in order to fail
gracefully if they don't (ie. the arch hasn't been updated to deal with
that quirk yet).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoPCI: Support 64-bit bridge windows if we have 64-bit dma_addr_t
Yinghai Lu [Wed, 19 Nov 2014 21:30:32 +0000 (14:30 -0700)]
PCI: Support 64-bit bridge windows if we have 64-bit dma_addr_t

commit 7fc986d8a9727e5d40da3c2c1c343da6142e82a9 upstream.

Aaron reported that a 32-bit x86 kernel with Physical Address Extension
(PAE) support complains about bridge prefetchable memory windows above 4GB:

  pci_bus 0000:00: root bus resource [mem 0x380000000000-0x383fffffffff]
  ...
  pci 0000:03:00.0: reg 0x10: [mem 0x383fffc00000-0x383fffdfffff 64bit pref]
  pci 0000:03:00.0: reg 0x20: [mem 0x383fffe04000-0x383fffe07fff 64bit pref]
  pci 0000:03:00.1: reg 0x10: [mem 0x383fffa00000-0x383fffbfffff 64bit pref]
  pci 0000:03:00.1: reg 0x20: [mem 0x383fffe00000-0x383fffe03fff 64bit pref]
  pci 0000:00:02.2: PCI bridge to [bus 03-04]
  pci 0000:00:02.2:   bridge window [io  0x1000-0x1fff]
  pci 0000:00:02.2:   bridge window [mem 0x91900000-0x91cfffff]
  pci 0000:00:02.2: can't handle 64-bit address space for bridge

In this kernel, unsigned long is 32 bits and dma_addr_t is 64 bits.
Previously we used "unsigned long" to hold the bridge window address.  But
this is a bus address, so we should use dma_addr_t instead.

Use dma_addr_t to hold the bridge window base and limit.

The question of whether the CPU can actually *address* the window is
separate and depends on what the physical address space of the CPU is and
whether the host bridge does any address translation.

[bhelgaas: fix "shift count > width of type", changelog, stable tag]
Fixes: d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=88131
Reported-by: Aaron Ma <mapengyu@gmail.com>
Tested-by: Aaron Ma <mapengyu@gmail.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoipx: fix locking regression in ipx_sendmsg and ipx_recvmsg
Jiri Bohac [Wed, 19 Nov 2014 22:05:49 +0000 (23:05 +0100)]
ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg

[ Upstream commit 01462405f0c093b2f8dfddafcadcda6c9e4c5cdf ]

This fixes an old regression introduced by commit
b0d0d915 (ipx: remove the BKL).

When a recvmsg syscall blocks waiting for new data, no data can be sent on the
same socket with sendmsg because ipx_recvmsg() sleeps with the socket locked.

This breaks mars-nwe (NetWare emulator):
- the ncpserv process reads the request using recvmsg
- ncpserv forks and spawns nwconn
- ncpserv calls a (blocking) recvmsg and waits for new requests
- nwconn deadlocks in sendmsg on the same socket

Commit b0d0d915 has simply replaced BKL locking with
lock_sock/release_sock. Unlike now, BKL got unlocked while
sleeping, so a blocking recvmsg did not block a concurrent
sendmsg.

Only keep the socket locked while actually working with the socket data and
release it prior to calling skb_recv_datagram().

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agopptp: fix stack info leak in pptp_getname()
Mathias Krause [Wed, 19 Nov 2014 17:05:26 +0000 (18:05 +0100)]
pptp: fix stack info leak in pptp_getname()

[ Upstream commit a5f6fc28d6e6cc379c6839f21820e62262419584 ]

pptp_getname() only partially initializes the stack variable sa,
particularly only fills the pptp part of the sa_addr union. The code
thereby discloses 16 bytes of kernel stack memory via getsockname().

Fix this by memset(0)'ing the union before.

Cc: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agobonding: fix curr_active_slave/carrier with loadbalance arp monitoring
Nikolay Aleksandrov [Tue, 18 Nov 2014 14:14:44 +0000 (15:14 +0100)]
bonding: fix curr_active_slave/carrier with loadbalance arp monitoring

[ Upstream commit b8e4500f42fe4464a33a887579147050bed8fcef ]

Since commit 6fde8f037e60 ("bonding: fix locking in
bond_loadbalance_arp_mon()") we can have a stale bond carrier state and
stale curr_active_slave when using arp monitoring in loadbalance modes. The
reason is that in bond_loadbalance_arp_mon() we can't have
do_failover == true but slave_state_changed == false, whenever do_failover
is true then slave_state_changed is also true. Then the following piece
from bond_loadbalance_arp_mon():
                if (slave_state_changed) {
                        bond_slave_state_change(bond);
                        if (BOND_MODE(bond) == BOND_MODE_XOR)
                                bond_update_slave_arr(bond, NULL);
                } else if (do_failover) {
                        block_netpoll_tx();
                        bond_select_active_slave(bond);
                        unblock_netpoll_tx();
                }

will execute only the first branch, always and regardless of do_failover.
Since these two events aren't related in such way, we need to decouple and
consider them separately.

For example this issue could lead to the following result:
Bonding Mode: load balancing (round-robin)
*MII Status: down*
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 100
ARP IP target/s (n.n.n.n form): 192.168.9.2

Slave Interface: ens12
*MII Status: up*
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: 00:0f:53:01:42:2c
Slave queue ID: 0

Slave Interface: eth1
*MII Status: up*
Speed: Unknown
Duplex: Unknown
Link Failure Count: 70
Permanent HW addr: 52:54:00:2f:0f:8e
Slave queue ID: 0

Since some interfaces are up, then the status of the bond should also be
up, but it will never change unless something invokes bond_set_carrier()
(i.e. enslave, bond_select_active_slave etc). Now, if I force the
calling of bond_select_active_slave via for example changing
primary_reselect (it can change in any mode), then the MII status goes to
"up" because it calls bond_select_active_slave() which should've been done
from bond_loadbalance_arp_mon() itself.

CC: Veaceslav Falico <vfalico@gmail.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Ding Tianhong <dingtianhong@huawei.com>
Fixes: 6fde8f037e60 ("bonding: fix locking in bond_loadbalance_arp_mon()")
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Acked-by: Veaceslav Falico <vfalico@gmail.com>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Acked-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoqmi_wwan: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
Martin Hauke [Sun, 16 Nov 2014 18:55:25 +0000 (19:55 +0100)]
qmi_wwan: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem

[ Upstream commit bb2bdeb83fb125c95e47fc7eca2a3e8f868e2a74 ]

Added the USB VID/PID for the HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e)

Signed-off-by: Martin Hauke <mardnh@gmx.de>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoieee802154: fix error handling in ieee802154fake_probe()
Alexey Khoroshilov [Fri, 14 Nov 2014 23:11:59 +0000 (02:11 +0300)]
ieee802154: fix error handling in ieee802154fake_probe()

[ Upstream commit 8c2dd54485ccee7fc4086611e188478584758c8d ]

In case of any failure ieee802154fake_probe() just calls unregister_netdev().
But it does not look safe to unregister netdevice before it was registered.

The patch implements straightforward resource deallocation in case of
failure in ieee802154fake_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoipv4: Fix incorrect error code when adding an unreachable route
Panu Matilainen [Fri, 14 Nov 2014 11:14:32 +0000 (13:14 +0200)]
ipv4: Fix incorrect error code when adding an unreachable route

[ Upstream commit 49dd18ba4615eaa72f15c9087dea1c2ab4744cf5 ]

Trying to add an unreachable route incorrectly returns -ESRCH if
if custom FIB rules are present:

[root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
RTNETLINK answers: Network is unreachable
[root@localhost ~]# ip rule add to 55.66.77.88 table 200
[root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
RTNETLINK answers: No such process
[root@localhost ~]#

Commit 83886b6b636173b206f475929e58fac75c6f2446 ("[NET]: Change "not found"
return value for rule lookup") changed fib_rules_lookup()
to use -ESRCH as a "not found" code internally, but for user space it
should be translated into -ENETUNREACH. Handle the translation centrally in
ipv4-specific fib_lookup(), leaving the DECnet case alone.

On a related note, commit b7a71b51ee37d919e4098cd961d59a883fd272d8
("ipv4: removed redundant conditional") removed a similar translation from
ip_route_input_slow() prematurely AIUI.

Fixes: b7a71b51ee37 ("ipv4: removed redundant conditional")
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoinetdevice: fixed signed integer overflow
Vincent BENAYOUN [Thu, 13 Nov 2014 12:47:26 +0000 (13:47 +0100)]
inetdevice: fixed signed integer overflow

[ Upstream commit 84bc88688e3f6ef843aa8803dbcd90168bb89faf ]

There could be a signed overflow in the following code.

The expression, (32-logmask) is comprised between 0 and 31 included.
It may be equal to 31.
In such a case the left shift will produce a signed integer overflow.
According to the C99 Standard, this is an undefined behavior.
A simple fix is to replace the signed int 1 with the unsigned int 1U.

Signed-off-by: Vincent BENAYOUN <vincent.benayoun@trust-in-soft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agosparc64: Fix constraints on swab helpers.
David S. Miller [Sun, 16 Nov 2014 21:19:32 +0000 (13:19 -0800)]
sparc64: Fix constraints on swab helpers.

[ Upstream commit 5a2b59d3993e8ca4f7788a48a23e5cb303f26954 ]

We are reading the memory location, so we have to have a memory
constraint in there purely for the sake of showing the data flow
to the compiler.

Reported-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agouprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME
Andy Lutomirski [Fri, 21 Nov 2014 21:26:07 +0000 (13:26 -0800)]
uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME

commit 82975bc6a6df743b9a01810fb32cb65d0ec5d60b upstream.

x86 call do_notify_resume on paranoid returns if TIF_UPROBE is set but
not on non-paranoid returns.  I suspect that this is a mistake and that
the code only works because int3 is paranoid.

Setting _TIF_NOTIFY_RESUME in the uprobe code was probably a workaround
for the x86 bug.  With that bug fixed, we can remove _TIF_NOTIFY_RESUME
from the uprobes code.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agox86, kaslr: Handle Gold linker for finding bss/brk
Kees Cook [Tue, 18 Nov 2014 00:16:04 +0000 (16:16 -0800)]
x86, kaslr: Handle Gold linker for finding bss/brk

commit 70b61e362187b5fccac206506d402f3424e3e749 upstream.

When building with the Gold linker, the .bss and .brk areas of vmlinux
are shown as consecutive instead of having the same file offset. Allow
for either state, as long as things add up correctly.

Fixes: e6023367d779 ("x86, kaslr: Prevent .bss from overlaping initrd")
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Junjie Mao <eternal.n08@gmail.com>
Link: http://lkml.kernel.org/r/20141118001604.GA25045@www.outflux.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agox86, mm: Set NX across entire PMD at boot
Kees Cook [Fri, 14 Nov 2014 19:47:37 +0000 (11:47 -0800)]
x86, mm: Set NX across entire PMD at boot

commit 45e2a9d4701d8c624d4a4bcdd1084eae31e92f58 upstream.

When setting up permissions on kernel memory at boot, the end of the
PMD that was split from bss remained executable. It should be NX like
the rest. This performs a PMD alignment instead of a PAGE alignment to
get the correct span of memory.

Before:
---[ High Kernel Mapping ]---
...
0xffffffff8202d000-0xffffffff82200000  1868K     RW       GLB NX pte
0xffffffff82200000-0xffffffff82c00000    10M     RW   PSE GLB NX pmd
0xffffffff82c00000-0xffffffff82df5000  2004K     RW       GLB NX pte
0xffffffff82df5000-0xffffffff82e00000    44K     RW       GLB x  pte
0xffffffff82e00000-0xffffffffc0000000   978M                     pmd

After:
---[ High Kernel Mapping ]---
...
0xffffffff8202d000-0xffffffff82200000  1868K     RW       GLB NX pte
0xffffffff82200000-0xffffffff82e00000    12M     RW   PSE GLB NX pmd
0xffffffff82e00000-0xffffffffc0000000   978M                     pmd

[ tglx: Changed it to roundup(_brk_end, PMD_SIZE) and added a comment.
        We really should unmap the reminder along with the holes
        caused by init,initdata etc. but thats a different issue ]

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/20141114194737.GA3091@www.outflux.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agox86: Require exact match for 'noxsave' command line option
Dave Hansen [Tue, 11 Nov 2014 22:01:33 +0000 (14:01 -0800)]
x86: Require exact match for 'noxsave' command line option

commit 2cd3949f702692cf4c5d05b463f19cd706a92dd3 upstream.

We have some very similarly named command-line options:

arch/x86/kernel/cpu/common.c:__setup("noxsave", x86_xsave_setup);
arch/x86/kernel/cpu/common.c:__setup("noxsaveopt", x86_xsaveopt_setup);
arch/x86/kernel/cpu/common.c:__setup("noxsaves", x86_xsaves_setup);

__setup() is designed to match options that take arguments, like
"foo=bar" where you would have:

__setup("foo", x86_foo_func...);

The problem is that "noxsave" actually _matches_ "noxsaves" in
the same way that "foo" matches "foo=bar".  If you boot an old
kernel that does not know about "noxsaves" with "noxsaves" on the
command line, it will interpret the argument as "noxsave", which
is not what you want at all.

This makes the "noxsave" handler only return success when it finds
an *exact* match.

[ tglx: We really need to make __setup() more robust. ]

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/20141111220133.FE053984@viggo.jf.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agox86_64, traps: Rework bad_iret
Andy Lutomirski [Sun, 23 Nov 2014 02:00:33 +0000 (18:00 -0800)]
x86_64, traps: Rework bad_iret

commit b645af2d5905c4e32399005b867987919cbfc3ae upstream.

It's possible for iretq to userspace to fail.  This can happen because
of a bad CS, SS, or RIP.

Historically, we've handled it by fixing up an exception from iretq to
land at bad_iret, which pretends that the failed iret frame was really
the hardware part of #GP(0) from userspace.  To make this work, there's
an extra fixup to fudge the gs base into a usable state.

This is suboptimal because it loses the original exception.  It's also
buggy because there's no guarantee that we were on the kernel stack to
begin with.  For example, if the failing iret happened on return from an
NMI, then we'll end up executing general_protection on the NMI stack.
This is bad for several reasons, the most immediate of which is that
general_protection, as a non-paranoid idtentry, will try to deliver
signals and/or schedule from the wrong stack.

This patch throws out bad_iret entirely.  As a replacement, it augments
the existing swapgs fudge into a full-blown iret fixup, mostly written
in C.  It's should be clearer and more correct.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agox86_64, traps: Stop using IST for #SS
Andy Lutomirski [Sun, 23 Nov 2014 02:00:32 +0000 (18:00 -0800)]
x86_64, traps: Stop using IST for #SS

commit 6f442be2fb22be02cafa606f1769fa1e6f894441 upstream.

On a 32-bit kernel, this has no effect, since there are no IST stacks.

On a 64-bit kernel, #SS can only happen in user code, on a failed iret
to user space, a canonical violation on access via RSP or RBP, or a
genuine stack segment violation in 32-bit kernel code.  The first two
cases don't need IST, and the latter two cases are unlikely fatal bugs,
and promoting them to double faults would be fine.

This fixes a bug in which the espfix64 code mishandles a stack segment
violation.

This saves 4k of memory per CPU and a tiny bit of code.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agox86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C
Andy Lutomirski [Sun, 23 Nov 2014 02:00:31 +0000 (18:00 -0800)]
x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C

commit af726f21ed8af2cdaa4e93098dc211521218ae65 upstream.

There's nothing special enough about the espfix64 double fault fixup to
justify writing it in assembly.  Move it to C.

This also fixes a bug: if the double fault came from an IST stack, the
old asm code would return to a partially uninitialized stack frame.

Fixes: 3891a04aafd668686239349ea58f3314ea2af86b
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMIPS: Loongson: Make platform serial setup always built-in.
Aaro Koskinen [Wed, 19 Nov 2014 23:05:38 +0000 (01:05 +0200)]
MIPS: Loongson: Make platform serial setup always built-in.

commit 26927f76499849e095714452b8a4e09350f6a3b9 upstream.

If SERIAL_8250 is compiled as a module, the platform specific setup
for Loongson will be a module too, and it will not work very well.
At least on Loongson 3 it will trigger a build failure,
since loongson_sysconf is not exported to modules.

Fix by making the platform specific serial code always built-in.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reported-by: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Markos Chandras <Markos.Chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/8533/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMIPS: oprofile: Fix backtrace on 64-bit kernel
Aaro Koskinen [Fri, 17 Oct 2014 15:10:24 +0000 (18:10 +0300)]
MIPS: oprofile: Fix backtrace on 64-bit kernel

commit bbaf113a481b6ce32444c125807ad3618643ce57 upstream.

Fix incorrect cast that always results in wrong address for the new
frame on 64-bit kernels.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8110/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/mach-shmobile-to-renesas-next-20141119-v3.18...
Simon Horman [Fri, 5 Dec 2014 08:49:11 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/mach-shmobile-to-renesas-next-20141119-v3.18-rc1' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/sh-drivers-fixes-20141126' into backport/v3...
Simon Horman [Fri, 5 Dec 2014 08:49:11 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/sh-drivers-fixes-20141126' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/rcar-snd-to-next-20141121' into backport/v3...
Simon Horman [Fri, 5 Dec 2014 08:49:10 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/rcar-snd-to-next-20141121' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/rcar-snd-to-v3.18-rc6' into backport/v3.14...
Simon Horman [Fri, 5 Dec 2014 08:49:10 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/rcar-snd-to-v3.18-rc6' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/gpio-20141117' into backport/v3.14.24-ltsi...
Simon Horman [Fri, 5 Dec 2014 08:49:09 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/gpio-20141117' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/irq-renesas-intc-irqpin-to-v3.18-rc1' into...
Simon Horman [Fri, 5 Dec 2014 08:49:09 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/irq-renesas-intc-irqpin-to-v3.18-rc1' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/codecs-20141124' into backport/v3.14.24-ltsi...
Simon Horman [Fri, 5 Dec 2014 08:49:08 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/codecs-20141124' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/sata-rcar-to-v3.18-rc5' into backport/v3.14...
Simon Horman [Fri, 5 Dec 2014 08:49:04 +0000 (17:49 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/sata-rcar-to-v3.18-rc5' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

Conflicts:
Documentation/devicetree/bindings/ata/sata_rcar.txt

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/phy-rcar-gen2-to-v3.18-rc1' into backport/v3...
Simon Horman [Fri, 5 Dec 2014 08:48:58 +0000 (17:48 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/phy-rcar-gen2-to-v3.18-rc1' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/phy-rcar-gen2-usb-to-v3.15' into backport/v3...
Simon Horman [Fri, 5 Dec 2014 08:48:57 +0000 (17:48 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/phy-rcar-gen2-usb-to-v3.15' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/usb-20141113' into backport/v3.14.24-ltsi-rc1...
Simon Horman [Fri, 5 Dec 2014 08:48:57 +0000 (17:48 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/usb-20141113' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/pci-rcar-gen2-to-v3.16' into backport/v3.14...
Simon Horman [Fri, 5 Dec 2014 08:48:56 +0000 (17:48 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/pci-rcar-gen2-to-v3.16' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

9 years agoMerge tag 'v3.14.25' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip
Simon Horman [Fri, 5 Dec 2014 08:48:48 +0000 (17:48 +0900)]
Merge tag 'v3.14.25' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip

This is the 3.14.25 stable release

Conflicts:
Makefile

9 years agoMerge tag 'backport/v3.14.24-ltsi-rc1/pm-domains-20141126' into backport/v3.14.24...
Simon Horman [Fri, 5 Dec 2014 08:43:19 +0000 (17:43 +0900)]
Merge tag 'backport/v3.14.24-ltsi-rc1/pm-domains-20141126' into backport/v3.14.24-ltsi-rc1/sh-drivers

9 years agoARM: shmobile: r8a7791: add USBDMAC{0,1} clocks to device tree
Yoshihiro Shimoda [Mon, 17 Nov 2014 09:25:25 +0000 (18:25 +0900)]
ARM: shmobile: r8a7791: add USBDMAC{0,1} clocks to device tree

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b9473d9f621b68327776b66d4b9a8ba5e0b8b4cb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add USBDMAC{0,1} clocks to device tree
Yoshihiro Shimoda [Mon, 17 Nov 2014 09:25:13 +0000 (18:25 +0900)]
ARM: shmobile: r8a7790: add USBDMAC{0,1} clocks to device tree

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b02ce79fbd5cb822a557e401cfc80d9ce813331e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7794: Add MMP and VSP1 clocks to device tree
Yoshifumi Hosoya [Wed, 12 Nov 2014 08:55:57 +0000 (17:55 +0900)]
ARM: shmobile: r8a7794: Add MMP and VSP1 clocks to device tree

Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit dc3cf93d89c525dcaebf4460109196fd9752c706)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7794: Add SGX clock to device tree
Kouei Abe [Wed, 12 Nov 2014 08:55:56 +0000 (17:55 +0900)]
ARM: shmobile: r8a7794: Add SGX clock to device tree

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 3e58a5424c8325df8b62f1de175dc95c7373bfe1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: add Volume Ramp usage on comment
Kuninori Morimoto [Tue, 11 Nov 2014 04:37:05 +0000 (04:37 +0000)]
ARM: shmobile: koelsch: add Volume Ramp usage on comment

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ce47481652106e955296651a1b76c0dd4561cfbc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: add Volume Ramp usage on comment
Kuninori Morimoto [Tue, 11 Nov 2014 04:36:47 +0000 (04:36 +0000)]
ARM: shmobile: lager: add Volume Ramp usage on comment

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit bd2e4a62ef68b3c5a8542026533bd87c631c544d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: add DMA nodes for IIC
Wolfram Sang [Fri, 7 Nov 2014 10:11:44 +0000 (11:11 +0100)]
ARM: shmobile: r8a7791: add DMA nodes for IIC

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 3f58c54bd027b42099d59e5ea0521f7b39d82e15)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add DMA nodes for IIC
Wolfram Sang [Fri, 7 Nov 2014 10:11:43 +0000 (11:11 +0100)]
ARM: shmobile: r8a7790: add DMA nodes for IIC

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0d73ca41e8bb3b06c6c1a3a9a5d2aba908929d44)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Add labels for the LEDs
Geert Uytterhoeven [Thu, 6 Nov 2014 12:49:59 +0000 (13:49 +0100)]
ARM: shmobile: kzm9g-reference dts: Add labels for the LEDs

The LEDs on the kzm9g board are labeled using upper-case characters.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 8ee63b3a9fcad86d7485b03bbea5bc5d2d072568)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch dts: Add labels for the LEDs
Geert Uytterhoeven [Thu, 6 Nov 2014 12:49:58 +0000 (13:49 +0100)]
ARM: shmobile: koelsch dts: Add labels for the LEDs

The LEDs on the koelsch board are labeled using upper-case characters.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 352faa5fedbc9f84faa849ce612ab2633c4db0ec)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0 dtsi: Add SoC-specific IIC compatible properties
Geert Uytterhoeven [Thu, 6 Nov 2014 11:52:09 +0000 (12:52 +0100)]
ARM: shmobile: sh73a0 dtsi: Add SoC-specific IIC compatible properties

The IIC nodes used the generic compatible properties only.
This causes the driver to fail when using Standard Speed, as the
operational clock is driven by the 104 MHz HP clock:

    i2c-sh_mobile e6820000.i2c: timing values out of range: L/H=0x208/0x1bf
    i2c-sh_mobile: probe of e6820000.i2c failed with error -22

Add the SoC-specific compatible property to fix this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit dd4dc874d16b87944e6803f41dc9477c3c6f09d6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4 dtsi: Add SoC-specific IIC compatible properties
Geert Uytterhoeven [Thu, 6 Nov 2014 11:52:10 +0000 (12:52 +0100)]
ARM: shmobile: r8a73a4 dtsi: Add SoC-specific IIC compatible properties

The IIC nodes used the generic compatible properties only.
This may cause the driver to fail when using Standard Speed on IIC
masters where the operational clock is driven by the 130 MHz HP clock.

Add the SoC-specific compatible property to fix this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7e9ad4d09d31ac696aa9baf4ff5c06cc015f7528)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Sound DMA support via DVC on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:49:45 +0000 (17:49 -0800)]
ARM: shmobile: koelsch: Sound DMA support via DVC on DTS

DMA transfer uses DVC

     DMA               DMApp
[MEM] -> [SRC] -> [DVC] -> [SSIU] -> [SSI]

     DMA               DMApp
[MEM] <- [DVC] <- [SRC] <- [SSIU] <- [SSI]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5c6d4b947aeca23e10f7d4ddf2041eda51b0ded2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Sound DMA support via SRC on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:49:33 +0000 (17:49 -0800)]
ARM: shmobile: koelsch: Sound DMA support via SRC on DTS

DMA transfer to/from SRC

     DMA      DMApp
[MEM] -> [SRC] -> [SSIU] -> [SSI]

     DMA      DMApp
[MEM] <- [SRC] <- [SSIU] <- [SSI]

Current sound driver is supporting
SSI/SRC random connection.
So, this patch is tring
SSI0 -> SRC2
SSI1 <- SRC3

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 664de6feea5978b9518a0bc4f8185e1f607be344)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Sound DMA support via BUSIF on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:49:22 +0000 (17:49 -0800)]
ARM: shmobile: koelsch: Sound DMA support via BUSIF on DTS

DMA transfer to/from SSIU

     DMA
[MEM] -> [SSIU] -> [SSI]

     DMA
[MEM] <- [SSIU] <- [SSI]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit e975bb333e670f548986478eb24e498b95eb3e85)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Sound DMA support on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:49:12 +0000 (17:49 -0800)]
ARM: shmobile: koelsch: Sound DMA support on DTS

DMA transfer to/from SSI

     DMA
[MEM] -> [SSI]

     DMA
[MEM] <- [SSI]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 54153c26d206b9168a37704ca8b17f986f047d70)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Sound PIO support on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:49:00 +0000 (17:49 -0800)]
ARM: shmobile: koelsch: Sound PIO support on DTS

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b160f61516b9b93325b8bf0028ce53cbea8225d1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: fixup I2C2 clock frequency
Kuninori Morimoto [Tue, 4 Nov 2014 01:48:49 +0000 (17:48 -0800)]
ARM: shmobile: koelsch: fixup I2C2 clock frequency

Current Koelsch I2C2 has 400kHz settings,
but, ak4643 audio codec chip which is connected to I2C2 can't
work such frequency.
Fixup I2C2 clock frequency to 100kHz.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit a8d943ed902bdbef05b64b7ad7ed8878a967a286)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: Sound DMA support via DVC on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:48:38 +0000 (17:48 -0800)]
ARM: shmobile: lager: Sound DMA support via DVC on DTS

DMA transfer uses DVC

     DMA               DMApp
[MEM] -> [SRC] -> [DVC] -> [SSIU] -> [SSI]

     DMA               DMApp
[MEM] <- [DVC] <- [SRC] <- [SSIU] <- [SSI]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit e110c54107d9095c507645f8d95ec85ca250bc37)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: Sound DMA support via SRC on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:48:27 +0000 (17:48 -0800)]
ARM: shmobile: lager: Sound DMA support via SRC on DTS

DMA transfer to/from SRC

     DMA      DMApp
[MEM] -> [SRC] -> [SSIU] -> [SSI]

     DMA      DMApp
[MEM] <- [SRC] <- [SSIU] <- [SSI]

Current sound driver is supporting
SSI/SRC random connection.
So, this patch is tring
SSI0 -> SRC2
SSI1 <- SRC3

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7e78eb69a1cd79dfde9fef5256333cddb98b8f7a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: Sound DMA support via BUSIF on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:48:16 +0000 (17:48 -0800)]
ARM: shmobile: lager: Sound DMA support via BUSIF on DTS

DMA transfer to/from SSIU

     DMA
[MEM] -> [SSIU] -> [SSI]

     DMA
[MEM] <- [SSIU] <- [SSI]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 1d42e9041cf09c585f4f3844dbc68ec7c2bbe9f6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: Sound DMA support on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:48:06 +0000 (17:48 -0800)]
ARM: shmobile: lager: Sound DMA support on DTS

DMA transfer to/from SSI

     DMA
[MEM] -> [SSI]

     DMA
[MEM] <- [SSI]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 67e8877d52e73e4cc73ebc84c41c73717d391da0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: Sound PIO support on DTS
Kuninori Morimoto [Tue, 4 Nov 2014 01:47:56 +0000 (17:47 -0800)]
ARM: shmobile: lager: Sound PIO support on DTS

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 8ea7a44a98d6c992ffc0013f7a83d9829121292d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: fixup IIC2 clock frequency
Kuninori Morimoto [Tue, 4 Nov 2014 01:47:46 +0000 (17:47 -0800)]
ARM: shmobile: lager: fixup IIC2 clock frequency

Current Lager IIC2 is using default clock frequency,
but, ak4643 audio codec chip needs 100kHz
This patch clarifies IIC2 clock frequency as 100kHz.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 177d8bea33899cef3989a2d0b4ea7213b5f34d0a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/
Geert Uytterhoeven [Fri, 14 Nov 2014 16:07:05 +0000 (17:07 +0100)]
ARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 3e940958ed3625187704f41129801800f70c2169)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/
Geert Uytterhoeven [Fri, 14 Nov 2014 16:07:06 +0000 (17:07 +0100)]
ARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 44091c118849811fadde5ce30a7518249b797668)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/
Geert Uytterhoeven [Fri, 14 Nov 2014 16:07:07 +0000 (17:07 +0100)]
ARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 178a2b07ee4cdf6868464bb8d40bf3364b51e498)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Add early debugging support using SCIF(A)
Geert Uytterhoeven [Fri, 14 Nov 2014 15:49:47 +0000 (16:49 +0100)]
ARM: shmobile: Add early debugging support using SCIF(A)

Add serial port debug macros for the SCIF(A) serial ports.
This includes all supported shmobile SoCs, except for EMEV2.

The configuration logic (both Kconfig and #ifdef) is more complicated than
one would expect, for several reasons:
  1. Not all SoCs have the same serial devices, and they're not always
     at the same addresses.
  2. There are two different types: SCIF and SCIFA. Fortunately they can
     easily be distinguished by physical address.
  3. Not all boards use the same serial port for the console.
     The defaults correspond to the boards that are supported in
     mainline. If you want to use a different serial port, just change
     the value of CONFIG_DEBUG_UART_PHYS, and the rest will auto-adapt.
  4. debug_ll_io_init() maps the SCIF(A) registers to a fixed virtual
     address. 0xfdxxxxxx was chosen, as it should lie below VMALLOC_END
     = 0xff000000, and must not conflict with the 2 MiB reserved region
     at PCI_IO_VIRT_BASE = 0xfee00000.
       - On SoCs not using the legacy machine_desc.map_io(),
 debug_ll_io_init() is called by the ARM core code.
       - On SoCs using the legacy machine_desc.map_io(),
 debug_ll_io_init() must be called explicitly. Calls are added
 for r8a7740, r8a7779, sh7372, and sh73a0.

This was derived from the r8a7790 version by Laurent Pinchart.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7a2071c58f36450fbf44a27d2e5d371c18534a25)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/Kconfig.debug

9 years agoARM: shmobile: kzm9g-reference: Use keyboard as gpio-keys node name
Simon Horman [Wed, 12 Nov 2014 08:59:37 +0000 (17:59 +0900)]
ARM: shmobile: kzm9g-reference: Use keyboard as gpio-keys node name

This appears to be the best match for ePAPR.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 61f1fb47bdbcf145dd539d29cfa7f3294bd5e958)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Use keyboard as gpio-keys node name
Simon Horman [Wed, 12 Nov 2014 08:59:36 +0000 (17:59 +0900)]
ARM: shmobile: koelsch: Use keyboard as gpio-keys node name

This appears to be the best match for ePAPR.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit d3aaec8365c72925645260d3a474140a06a267f4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: Use keyboard as gpio-keys node name
Simon Horman [Wed, 12 Nov 2014 08:59:35 +0000 (17:59 +0900)]
ARM: shmobile: lager: Use keyboard as gpio-keys node name

This appears to be the best match for ePAPR.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 54caf6810327451ea814fd728c45c99755252237)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: armadillo800eva: Use keyboard as gpio-keys node name
Simon Horman [Wed, 12 Nov 2014 08:59:34 +0000 (17:59 +0900)]
ARM: shmobile: armadillo800eva: Use keyboard as gpio-keys node name

This appears to be the best match for ePAPR.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 04a5656fbcc960a519674f05d5458e6013d67467)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: always build rcar setup for armv7
Arnd Bergmann [Tue, 11 Nov 2014 15:36:50 +0000 (16:36 +0100)]
ARM: shmobile: always build rcar setup for armv7

In a combined ARMv6/v7 kernel, the setup-rcar-gen2.c cannot
currently be compiled correctly because it uses the isb
instruction that is not available on ARMv6. Adding the
-march=armv7-a flag lets the compiler know that it is safe
to build this file for ARMv7.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit e3d163329753b3b473f40c9be71561ed8eb98aea)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Add restart callback
Geert Uytterhoeven [Fri, 7 Nov 2014 13:46:33 +0000 (14:46 +0100)]
ARM: shmobile: sh73a0: Add restart callback

Port the sh73a0 restart handling from the kzm9g-legacy board code to the
generic sh73a0 code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit cad900819fba01760833c6c6ed89f464f9c93690)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2
Geert Uytterhoeven [Thu, 6 Nov 2014 11:52:06 +0000 (12:52 +0100)]
ARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2

On sh73a0/kzm9g-legacy, probing of the i2c masters fails with:

    i2c-sh_mobile i2c-sh_mobile.0: timing values out of range: L/H=0x208/0x1bf
    sh_mobile: probe of i2c-sh_mobile.0 failed with error -22

According to the datasheet, the transfer rate is derived from the HP
clock (which runs at 104 MHz) divided by two. Hence
i2c_sh_mobile_platform_data.clks_per_count should be set to two.

Now probing succeeds, and i2c works:

    i2c-sh_mobile i2c-sh_mobile.0: I2C adapter 0 with bus speed 100000 Hz (L/H=0x104/0xe0)

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b207422bb92f17f4f892a9b8737d44b37fece25b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference: Add restart callback
Geert Uytterhoeven [Fri, 7 Nov 2014 13:46:32 +0000 (14:46 +0100)]
ARM: shmobile: kzm9g-reference: Add restart callback

Port the sh73a0 restart handling from the kzm9g-legacy board code to the
kzm9g-reference board code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 534547c036afad3f23d49d8352896f5d05709685)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Add Audio DMAC peri peri devices to DT
Kuninori Morimoto [Tue, 4 Nov 2014 01:46:28 +0000 (17:46 -0800)]
ARM: shmobile: r8a7791: Add Audio DMAC peri peri devices to DT

Instantiate the Audio DMAC peri peri controllers
in the r8a7791 device tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 40c6d9f0e7745012c9e19c955e22d4809104359c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add Audio DMAC peri peri devices to DT
Kuninori Morimoto [Tue, 4 Nov 2014 01:45:58 +0000 (17:45 -0800)]
ARM: shmobile: r8a7790: Add Audio DMAC peri peri devices to DT

Instantiate the Audio DMAC peri peri controllers
in the r8a7790 device tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit e416b66a6c62cd935c6959448aba46ae8fd25625)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Add Audio DMAC devices to DT
Kuninori Morimoto [Tue, 4 Nov 2014 01:45:37 +0000 (17:45 -0800)]
ARM: shmobile: r8a7791: Add Audio DMAC devices to DT

Instantiate the two Audio DMA controllers in the r8a7791 device tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[geert: corrected spelling of audmac1]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 8994fff677610e2e0aacb25c39b49739444844b0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add Audio DMAC devices to DT
Kuninori Morimoto [Tue, 4 Nov 2014 01:44:51 +0000 (17:44 -0800)]
ARM: shmobile: r8a7790: Add Audio DMAC devices to DT

Instantiate the two Audio DMA controllers in the r8a7790 device tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[geert: corrected spelling of audmac1]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ba3240beae340bc84dad16f2b67590f32d25d5a6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740 dtsi: Correct IIC0 parent clock
Geert Uytterhoeven [Wed, 5 Nov 2014 10:04:34 +0000 (11:04 +0100)]
ARM: shmobile: r8a7740 dtsi: Correct IIC0 parent clock

According to the datasheet, the operating clock for IIC0 is the HPP
(RT Peri) clock, not the SUB (Peri) clock. Both clocks run at the same
speed (50 Mhz).

This is consistent with IIC0 being located in the A4R PM domain, and
IIC1 in the A3SP PM domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b89ff7c3c2dee189489a5f45eb8d72e106179299)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Fix SD3CKCR address to device tree
Shinobu Uehara [Thu, 30 Oct 2014 05:57:57 +0000 (14:57 +0900)]
ARM: shmobile: r8a7790: Fix SD3CKCR address to device tree

Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit edd7b938637701567a54306adb27cfb4345fedc5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740 legacy: Correct IIC0 parent clock
Geert Uytterhoeven [Wed, 5 Nov 2014 10:04:33 +0000 (11:04 +0100)]
ARM: shmobile: r8a7740 legacy: Correct IIC0 parent clock

According to the datasheet, the operating clock for IIC0 is the HPP
(RT Peri) clock, not the SUB (Peri) clock. Both clocks run at the same
speed (50 Mhz).

This is consistent with IIC0 being located in the A4R PM domain, and
IIC1 in the A3SP PM domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 4f37828d4d69a46830e0525a065da9847fc7a819)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740 legacy: Add missing INTCA clock for irqpin module
Geert Uytterhoeven [Wed, 5 Nov 2014 20:59:34 +0000 (21:59 +0100)]
ARM: shmobile: r8a7740 legacy: Add missing INTCA clock for irqpin module

This clock drives the irqpin controller modules.
Before, it was assumed enabled by the bootloader or reset state.
By making it available to the driver, we make sure it gets enabled when
needed, and allow it to be managed by system or runtime PM.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 85eb968e84686faa507daa3c5cfdfbfefc7eda95)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Fix SD3CKCR address
Shinobu Uehara [Thu, 30 Oct 2014 05:57:56 +0000 (14:57 +0900)]
ARM: shmobile: r8a7790: Fix SD3CKCR address

Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit a926a12b5f11007d0ba9eb2e083d86054fb29a06)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: alt dts: Drop console= bootargs parameter
Simon Horman [Tue, 4 Nov 2014 04:23:38 +0000 (13:23 +0900)]
ARM: shmobile: alt dts: Drop console= bootargs parameter

Alt is booted from DT, so chosen/stdout-path is
always used, and we can drop the "console=" parameter from chosen/bootargs.

This change has a side-effect of changing the console speed from 38400
to 115200. This is intentional as 115200 is consistently used on
all other shmobile boards.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 89aeff9989e87bb2d9d652994010bc18c68675d9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4: fix scifb* naming
Ulrich Hecht [Tue, 4 Nov 2014 16:21:24 +0000 (17:21 +0100)]
ARM: shmobile: r8a73a4: fix scifb* naming

Ports are named scifb0-3, not scifb2-5.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0b3a0ef613538cae4b8b8f41315ef1fd3c957b12)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Enable PCI domains for R-Car Gen2 devices
Phil Edworthy [Tue, 4 Nov 2014 17:38:28 +0000 (17:38 +0000)]
ARM: shmobile: Enable PCI domains for R-Car Gen2 devices

The PCI core will soon automatically handle the PCI domain number,
allowing the internal PCI and external PCIe bridges work at the same time.
In order for that to work, we need to enable PCI_DOMAINS.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 950a3f0e7dd32c372c9957d5c050b08de7ec9e56)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: multiplatform: add AK4642 support on defconfig
Kuninori Morimoto [Tue, 4 Nov 2014 01:50:24 +0000 (17:50 -0800)]
ARM: shmobile: multiplatform: add AK4642 support on defconfig

AK4642 is well used audio codec on Renesas reference board

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ccde0fbd4fe88151c8d3a93a3e3a939a0a1753b2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: multiplatform: add Audo DMAC peri peri support on defconfig
Kuninori Morimoto [Tue, 4 Nov 2014 01:50:13 +0000 (17:50 -0800)]
ARM: shmobile: multiplatform: add Audo DMAC peri peri support on defconfig

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2315f9fce4da7df9362e4baeb5250d14ea48bf63)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: multiplatform: add R-Car DMAC support on defconfig
Kuninori Morimoto [Tue, 4 Nov 2014 01:50:00 +0000 (17:50 -0800)]
ARM: shmobile: multiplatform: add R-Car DMAC support on defconfig

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit eeaeb4b58b31ddc56eff757b5a71ea664726ef60)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Correct number of CPU cores
Hisashi Nakamura [Fri, 24 Oct 2014 08:33:09 +0000 (17:33 +0900)]
ARM: shmobile: r8a7791: Correct number of CPU cores

The r8a7791 only has 2 CPU CA15 cores, not 4 CA15 and 4  CA7 cores.

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7466c52e1706d98392b6a4650b04e94f39f3a794)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>