platform/adaptation/renesas_rcar/renesas_kernel.git
9 years agodrm: rcar-du: fix error return code
Julia Lawall [Sun, 23 Nov 2014 13:11:17 +0000 (14:11 +0100)]
drm: rcar-du: fix error return code

Propagate the error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
(cherry picked from commit 6512f5fb0a28e26f473085b890ada519e0f37d70)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm/rcar: gem: dumb: pitch is an output
Thierry Reding [Mon, 3 Nov 2014 11:08:24 +0000 (12:08 +0100)]
drm/rcar: gem: dumb: pitch is an output

When creating a dumb buffer object using the DRM_IOCTL_MODE_CREATE_DUMB
IOCTL, only the width, height, bpp and flags fields are inputs. The
caller is not guaranteed to zero out or set handle, pitch and size.
Drivers must not treat these values as possible inputs, otherwise they
may use uninitialized memory during the computation of the framebuffer
size.

The R-Car DU driver treats the pitch passed in from userspace as minimum
and will only overwrite it when the driver-computed pitch is larger,
allowing userspace to, intentionally or not, overallocate framebuffers.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 7e295a36b3af5d588e585e2300febbb191463939)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agogpu: drm: rcar-du: drop owner assignment from platform_drivers
Wolfram Sang [Mon, 20 Oct 2014 14:20:34 +0000 (16:20 +0200)]
gpu: drm: rcar-du: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 8749393d361fa003a6b09152972043f6d6cd2b74)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: add register and unregister functions for connectors
Thomas Wood [Thu, 29 May 2014 15:57:41 +0000 (16:57 +0100)]
drm: add register and unregister functions for connectors

Introduce generic functions to register and unregister connectors. This
provides a common place to add and remove associated user space
interfaces.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 34ea3d386347cd6de4c2fa2491dd85c9e753e7e4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
drivers/gpu/drm/bridge/ptn3460.c
drivers/gpu/drm/exynos/exynos_dp_core.c
drivers/gpu/drm/exynos/exynos_drm_dpi.c
drivers/gpu/drm/exynos/exynos_drm_dsi.c
drivers/gpu/drm/exynos/exynos_drm_vidi.c
drivers/gpu/drm/exynos/exynos_hdmi.c
drivers/gpu/drm/gma500/cdv_intel_lvds.c
drivers/gpu/drm/gma500/oaktrail_lvds.c
drivers/gpu/drm/gma500/psb_intel_lvds.c
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/staging/imx-drm/imx-drm-core.c

9 years agodrm: kerneldoc polish for drm_crtc.c
Daniel Vetter [Mon, 10 Mar 2014 20:33:02 +0000 (21:33 +0100)]
drm: kerneldoc polish for drm_crtc.c

- Standardized on "Returns:" Block.
- Sprinkle missing kerneldoc over all exported functions and all
  ioctls.
- Add a stern warning that driver's really shouldn't use
  drm_mode_group_init_legacy_group.
- Usual attempt at more consistency.
- Add warnings that drm_mode_object_get/put don't do refcounting,
  despite what the names might lead to believe.
- Try to clarify the framebuffer setup/cleanup functions wrt driver
  private framebuffers - I've fallen recently over this when reviewing
  i915 fbdev patches.
- Align function parameters where the kerneldoc has been updated.
- Most of the drm_get_*_name functions aren't thread safe. Add stern
  warnings where this is the case.

Since a lot of the functions in drm_crtc.c are boilerplate to handle
properties and create default sets of them it might be useful to
extract all that code into a new file drm_property.c. Especially since
properties will be used a lot more in the future.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit c8e32cc1219fc15135b696b726421571f68bd97e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
drivers/gpu/drm/drm_crtc.c

9 years agodrm: add pseudo filesystem for shared inodes
David Herrmann [Fri, 3 Jan 2014 13:09:47 +0000 (14:09 +0100)]
drm: add pseudo filesystem for shared inodes

Our current DRM design uses a single address_space for all users of the
same DRM device. However, there is no way to create an anonymous
address_space without an underlying inode. Therefore, we wait for the
first ->open() callback on a registered char-dev and take-over the inode
of the char-dev. This worked well so far, but has several drawbacks:
 - We screw with FS internals and rely on some non-obvious invariants like
   inode->i_mapping being the same as inode->i_data for char-devs.
 - We don't have any address_space prior to the first ->open() from
   user-space. This leads to ugly fallback code and we cannot allocate
   global objects early.

As pointed out by Al-Viro, fs/anon_inode.c is *not* supposed to be used by
drivers for anonymous inode-allocation. Therefore, this patch follows the
proposed alternative solution and adds a pseudo filesystem mount-point to
DRM. We can then allocate private inodes including a private address_space
for each DRM device at initialization time.

Note that we could use:
  sysfs_get_inode(sysfs_mnt->mnt_sb, drm_device->dev->kobj.sd);
to get access to the underlying sysfs-inode of a "struct device" object.
However, most of this information is currently hidden and it's not clear
whether this address_space is suitable for driver access. Thus, unless
linux allows anonymous address_space objects or driver-core provides a
public inode per device, we're left with our own private internal mount
point.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit 31bbe16f6d88622d6731fa2cb4ab38d57d844ac1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: provide device-refcount
David Herrmann [Wed, 29 Jan 2014 09:21:36 +0000 (10:21 +0100)]
drm: provide device-refcount

Lets not trick ourselves into thinking "drm_device" objects are not
ref-counted. That's just utterly stupid. We manage "drm_minor" objects on
each drm-device and each minor can have an unlimited number of open
handles. Each of these handles has the drm_minor (and thus the drm_device)
as private-data in the file-handle. Therefore, we may not destroy
"drm_device" until all these handles are closed.

It is *not* possible to reset all these pointers atomically and restrict
access to them, and this is *not* how this is done! Instead, we use
ref-counts to make sure the object is valid and not freed.

Note that we currently use "dev->open_count" for that, which is *exactly*
the same as a reference-count, just open coded. So this patch doesn't
change any semantics on DRM devices (well, this patch just introduces the
ref-count, anyway. Follow-up patches will replace open_count by it).

Also note that generic VFS revoke support could allow us to drop this
ref-count again. We could then just synchronously disable any fops->xy()
calls. However, this is not the case, yet, and no such patches are
in sight (and I seriously question the idea of dropping the ref-cnt
again).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit 099d1c290e2ebc3b798961a6c177c3aef5f0b789)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: Introduce drm_dev_set_unique()
Thierry Reding [Fri, 11 Apr 2014 13:23:00 +0000 (15:23 +0200)]
drm: Introduce drm_dev_set_unique()

Add a helper function that allows drivers to statically set the unique
name of the device. This will allow platform and USB drivers to get rid
of their DRM bus implementations and directly use drm_dev_alloc() and
drm_dev_register().

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit ca8e2ad71013049bc88a10b11d83712bfe56cdd4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: group dev-lifetime related members
David Herrmann [Tue, 28 Jan 2014 15:00:35 +0000 (16:00 +0100)]
drm: group dev-lifetime related members

These members are all managed by DRM-core, lets group them together so
they're not split across the whole device.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 45e212d20fdccaf958b194e95a23ad264188c59e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
include/drm/drmP.h

9 years agodrm: rip out dev->devname
Daniel Vetter [Sun, 3 Nov 2013 20:48:48 +0000 (21:48 +0100)]
drm: rip out dev->devname

This was only ever used to pretty-print the irq driver name. And on
kms systems due to set_version bonghits we never set up the prettier
name, ever. Which make this a bit pointless.

Also, we can always dig out the driver-instance/irq relationship
through other means, so this isn't that useful. So just rip it out to
simplify the set_version/set_busid insanity a bit.

Also delete the temporary busname from drm_pci_set_busid, it's now
unused.

v2: Rebase on top of the new host1x drm_bus for tegra.

Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 5829d1834e5486e83547f36576b160023c9609c2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
drivers/gpu/drm/drm_stub.c

9 years agodrm: Protect the master management with a drm_device::master_mutex v3
Thomas Hellstrom [Tue, 25 Feb 2014 18:57:44 +0000 (19:57 +0100)]
drm: Protect the master management with a drm_device::master_mutex v3

The master management was previously protected by the drm_device::struct_mutex.
In order to avoid locking order violations in a reworked dropped master
security check in the vmwgfx driver, break it out into a separate master_mutex.
Locking order is master_mutex -> struct_mutex.

Also remove drm_master::blocked since it's not used.

v2: Add an inline comment about what drm_device::master_mutex is protecting.
v3: Remove unneeded struct_mutex locks. Fix error returns in
    drm_setmaster_ioctl().

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
(cherry picked from commit c996fd0b956450563454e7ccc97a82ca31f9d043)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
drivers/gpu/drm/drm_stub.c

9 years agodrm: Remove the minor master list
Thomas Hellstrom [Wed, 19 Feb 2014 13:37:44 +0000 (14:37 +0100)]
drm: Remove the minor master list

It doesn't appear to be used anywhere.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit a12cd0025cdc0b4d43b79249dbd8c266af284032)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: allocate minors early
David Herrmann [Wed, 29 Jan 2014 11:43:56 +0000 (12:43 +0100)]
drm: allocate minors early

Instead of waiting for device-registration, we now allocate minor-objects
during device allocation. The minors are not registered or assigned an ID.
This is still postponed to device-registration.

While at it, remove the superfluous output-parameter in drm_get_minor().

The reason for this early allocation is to make
dev->primary/control/render available atomically. So once the device is
alive, all of them are already set and we never have the situation where
one of them is set after another (they're either NULL or set, but never
changed). This will eventually allow us to reduce minor-ID allocation to
one base-ID instead of a single ID for each.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 05b701f6f60201c9906167351cce50db2e9db7ae)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
drivers/gpu/drm/drm_stub.c

9 years agodrm: Improve on minor type helpers v3
Thomas Hellstrom [Thu, 13 Mar 2014 10:07:44 +0000 (11:07 +0100)]
drm: Improve on minor type helpers v3

Add a drm_is_legacy() helper, constify argument to drm_is_render_client(),
and use / change helpers where appropriate.

v2: s/drm_is_legacy/drm_is_legacy_client/ and adapt to new code context.
v3: s/legacy_client/primary_client/

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 436830571eb9045d563979dc6185b1d5145ca4b6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: Have the crtc code only reference master from legacy nodes v2
Thomas Hellstrom [Thu, 13 Mar 2014 09:00:42 +0000 (10:00 +0100)]
drm: Have the crtc code only reference master from legacy nodes v2

control- and render nodes are intended to be master-less.

v2: Replace tests for !legacy with tests for !mode_group for readability.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit 09f308f7b675b692d1c0a451ff02f0fff7846c96)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: Make control nodes master-less v3
Thomas Hellstrom [Wed, 19 Feb 2014 13:21:48 +0000 (14:21 +0100)]
drm: Make control nodes master-less v3

Like for render-nodes, there is no point in maintaining the master concept
for control nodes, so set the struct drm_file::master pointer to NULL.

At the same time, make sure DRM_MASTER | DRM_CONTROL_ALLOW ioctls are always
allowed when called through the control node. Previously the caller also
needed to be master.

v2: Adapt to refactoring of ioctl permission check.
v3: Formatting of logical expression. Use drm_is_control_client() instead of
    drm_is_control().

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit ac05dbc57ef2b8709bf48693bb25e16a63e8e71f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: Break out ioctl permission check to a separate function v2
Thomas Hellstrom [Thu, 13 Mar 2014 09:30:25 +0000 (10:30 +0100)]
drm: Break out ioctl permission check to a separate function v2

Helps reviewing and understanding these checks.
v2: Remove misplaced newlines.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit c2667355619572c9324916b62b4f6608a56de031)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm/irq: track the irq installed in drm_irq_install in dev->irq
Daniel Vetter [Mon, 16 Dec 2013 10:21:15 +0000 (11:21 +0100)]
drm/irq: track the irq installed in drm_irq_install in dev->irq

To get rid of the dev->bus->get_irq callback we need to pass in the
desired irq explicitly into drm_irq_install. To avoid having to do the
same for drm_irq_unistall just track it internally. That leaves
drivers with less room to botch things up.

v2: Add the hunk lost in an earlier patch to this one (Thierry).

v3: Fix up the totally fumbled logic in drm_irq_install and use the
local variable consistently. Spotted by both Thierry and Laurent.
Shame on me for failing to properly test the rebase version of this
patch ...

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 7c1a38e391745cca72627979e5e02924bed5b43d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: skip redundant minor-lookup in open path
David Herrmann [Wed, 29 Jan 2014 09:18:02 +0000 (10:18 +0100)]
drm: skip redundant minor-lookup in open path

The drm_open_helper() function is only used internally for drm_open() so
we can safely pass in the minor-object directly instead of the minor-id.
This way, we avoid the additional minor IDR lookup, which we already do
twice in drm_stub_open() and drm_open().

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit f4aede2e3291896e7cb42755ecc5b6815b6cac97)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: use anon-inode instead of relying on cdevs
David Herrmann [Fri, 3 Jan 2014 13:24:19 +0000 (14:24 +0100)]
drm: use anon-inode instead of relying on cdevs

DRM drivers share a common address_space across all character-devices of a
single DRM device. This allows simple buffer eviction and mapping-control.
However, DRM core currently waits for the first ->open() on any char-dev
to mark the underlying inode as backing inode of the device. This delayed
initialization causes ugly conditions all over the place:
  if (dev->dev_mapping)
    do_sth();

To avoid delayed initialization and to stop reusing the inode of the
char-dev, we allocate an anonymous inode for each DRM device and reset
filp->f_mapping to it on ->open().

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit 6796cb16c088905bf3af40548fda68c09e6f6ee5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm: add minor-lookup/release helpers
David Herrmann [Wed, 29 Jan 2014 09:49:19 +0000 (10:49 +0100)]
drm: add minor-lookup/release helpers

Instead of accessing drm_minors_idr directly, this adds a small helper to
hide the internals. This will help us later to remove the drm_global_mutex
requirement for minor-lookup.

Furthermore, this also makes sure that minor->dev is always valid and
takes a reference-count to the device as long as the minor is used in an
open-file. This way, "struct file*"->private_data->dev is guaranteed to be
valid (which it has to, as we cannot reset it).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 1616c525b98deb34b8f4b02eccf0ae3a1310fa27)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm/rcar-du: Add OF support
Laurent Pinchart [Tue, 21 Jan 2014 14:57:26 +0000 (15:57 +0100)]
drm/rcar-du: Add OF support

Implement support for the R-Car DU DT bindings in the rcar-du DRM
driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
(cherry picked from commit 96c026911890ceacee238da00a0b140ad634cc43)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm/rcar-du: Use struct videomode in platform data
Laurent Pinchart [Tue, 26 Aug 2014 22:42:56 +0000 (00:42 +0200)]
drm/rcar-du: Use struct videomode in platform data

In preparation for DT support where panel timings will be described by a
DRM-agnostic video mode, replace the struct drm_mode_modeinfo instance
in the panel platform data with a struct videomode.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
(cherry picked from commit 1d46fea7d091f9dc2d4fd3fcb9f0117ca288f9a5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrm/rcar-du: Update copyright notice
Laurent Pinchart [Thu, 6 Feb 2014 17:13:52 +0000 (18:13 +0100)]
drm/rcar-du: Update copyright notice

The "Renesas Corporation" listed in the copyright notice doesn't exist.
Replace it with "Renesas Electronics Corporation" and update the
copyright years.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
(cherry picked from commit 36d50464e05f498fa4024270e091b306af5de898)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years ago[media] of: move common endpoint parsing to drivers/of
Philipp Zabel [Fri, 14 Feb 2014 10:53:56 +0000 (11:53 +0100)]
[media] of: move common endpoint parsing to drivers/of

This patch adds a new struct of_endpoint which is then embedded in struct
v4l2_of_endpoint and contains the endpoint properties that are not V4L2
(or even media) specific: the port number, endpoint id, local device tree
node and remote endpoint phandle. of_graph_parse_endpoint parses those
properties and is used by v4l2_of_parse_endpoint, which just adds the
V4L2 MBUS information to the containing v4l2_of_endpoint structure.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
(cherry picked from commit f2a575f67695dcba9062acd666ae5aab2380b95c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agowatchdog: iTCO_wdt: Fix the parent device
Jean Delvare [Wed, 5 Nov 2014 01:39:21 +0000 (09:39 +0800)]
watchdog: iTCO_wdt: Fix the parent device

The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich
(the PCI device.) Setting the parent right makes it much easier for
the user to figure out which driver/module is handling the watchdog
device node.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit c90789baa8cec363093c5ec292c989b6f22d8f32)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agowatchdog: fix checkpatch warnings and error
Jingoo Han [Wed, 5 Nov 2014 01:39:20 +0000 (09:39 +0800)]
watchdog: fix checkpatch warnings and error

Fix the following checkpatch warnings and error:
  WARNING: quoted string split across lines
  WARNING: braces {} are not necessary for single statement blocks
  WARNING: __initdata should be placed after ibmasr_id_table[]
  WARNING: please, no space before tabs
  ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit 5f5e19093b2fa592720810154f15ffe51aa9277f)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agowatchdog: iTCO_wdt: Add support for v3 silicon
Peter Tyser [Wed, 5 Nov 2014 01:39:19 +0000 (09:39 +0800)]
watchdog: iTCO_wdt: Add support for v3 silicon

Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO
functionality:
- The watchdog timer ticks at 1 second instead of .6 seconds

- Some 8 and 16-bit registers were combined into 32-bit registers

- Some registers were removed (DAT_IN, DAT_OUT, MESSAGE)

- The BOOT_STS field in TCO_STS was removed

- The NO_REBOOT bit is in the PMC area instead of GCS

Update the driver to support the above changes and bump the version to
1.11.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 24b3a1670b47e75be633ae0b5c07945c446f9d29)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add Device IDs for Intel 9 Series PCH
James Ralston [Wed, 5 Nov 2014 01:39:18 +0000 (09:39 +0800)]
mfd: lpc_ich: Add Device IDs for Intel 9 Series PCH

This patch adds the LPC Device IDs for the Intel 9 Series PCH.

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit fea31042ff613145c7784e2ce454bf3c151b97ba)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add PCI ID for Intel Braswell
Alan Cox [Wed, 5 Nov 2014 01:39:17 +0000 (09:39 +0800)]
mfd: lpc_ich: Add PCI ID for Intel Braswell

This is the same as used in Baytrail so add the new PCI ID to the driver's
list of supported IDs.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit ff0c9da013d2c9f1ec232926a54e536ab48c6678)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Enable GPIO for Panther Point
Guenter Roeck [Wed, 5 Nov 2014 01:39:16 +0000 (09:39 +0800)]
mfd: lpc_ich: Enable GPIO for Panther Point

Panther Point PCH GPIO configuration is similar to V5 PCHs.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 62cf2cdb99c7e870ab857bdd617e728790f8c43c)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for Intel Bay Trail SoC
Peter Tyser [Wed, 5 Nov 2014 01:39:15 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for Intel Bay Trail SoC

This patch adds the LPC Controller Device IDs for Watchdog and GPIO for
the Intel Bay Trail Atom SoC.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 6111ec70357022ccd037399c13f69900431850b4)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for NM10 GPIO
Peter Tyser [Wed, 5 Nov 2014 01:39:14 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for NM10 GPIO

The NM10's GPIO is compatible with ICH v7 GPIO.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Dan Weinlader <danw@vs-networks.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 117bbfe25cfc2e968be1f7976ac460a5cd3d734e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Change Avoton to iTCO v3
Peter Tyser [Wed, 5 Nov 2014 01:39:13 +0000 (09:39 +0800)]
mfd: lpc_ich: Change Avoton to iTCO v3

The register layout of the Avoton is compatible with the iTCO v3
register layout.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit c48cf59878685cc06b71bb2a3ca17b61103c8de7)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for iTCO v3
Peter Tyser [Wed, 5 Nov 2014 01:39:12 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for iTCO v3

Some newer Atom CPUs, eg Avoton and Bay Trail, use slightly different
register layouts for the iTCO than the current v1 and v2 iTCO.
Differences from previous iTCO versions include:
- The ACPI space is enabled in the "ACPI base address" register instead
  of the "ACPI control register"

- The "no reboot" functionality is set in the "Power Management
  Configuration" register instead of the "General Control and Status"
  (GCS) register or PCI configuration space.

- The "ACPI Control Register" is not present on v3.  The "Power
  Management Configuration Base Address" register resides at the same
  address is Avoton/Bay Trail.

To differentiate these newer chipsets create a new v3 iTCO version and
update the MFD driver to support them.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit eb71d4dec4a5e010e34b9d7afdb5af41884c388e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Remove lpc_ich_cfg struct use
Peter Tyser [Wed, 5 Nov 2014 01:39:11 +0000 (09:39 +0800)]
mfd: lpc_ich: Remove lpc_ich_cfg struct use

Future chipsets will use different register layouts that don't map
cleanly to the lpc_ich_cfg fields.  Remove the lpc_ich_cfg struct and
add explicit fields to the higher level lpc_ich_priv structure.

This change should have no functional impact.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 429b941abd503c8936e116c819362323aafdbd50)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Only configure watchdog or GPIO when present
Peter Tyser [Wed, 5 Nov 2014 01:39:10 +0000 (09:39 +0800)]
mfd: lpc_ich: Only configure watchdog or GPIO when present

Some chipsets don't currently have GPIO support enabled.  For these
chipsets don't go through the process of initializing the GPIO region.

Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit f0776b8ce03ceb638c51b62f324844c71c446600)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Fix ACPI enable bitmask
Peter Tyser [Wed, 5 Nov 2014 01:39:09 +0000 (09:39 +0800)]
mfd: lpc_ich: Fix ACPI enable bitmask

The original bitmask of 0x10 was incorrect and would result in a write
to a reserved read-only bit instead of enabling the ACPI I/O
region.  Update it to the proper value of 0x80.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit f5dccb15877b82a40950c6f752d5345c86189fc9)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for Intel Avoton GPIOs
Vincent Donnefort [Wed, 5 Nov 2014 01:39:08 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for Intel Avoton GPIOs

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit facd9939403cb5769190054a600474399e776e3a)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Convert ICH GPIOs IDs to enum
Vincent Donnefort [Wed, 5 Nov 2014 01:39:07 +0000 (09:39 +0800)]
mfd: lpc_ich: Convert ICH GPIOs IDs to enum

All those IDs are arbitrary and so can be encapsulated into an enumeration.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 6cec365e3eba3dd8c864056d8d3fd9e73ab8dd7a)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: Delete non-required instances of include <linux/init.h>
Paul Gortmaker [Wed, 5 Nov 2014 01:39:06 +0000 (09:39 +0800)]
mfd: Delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 3c699105d0376c14940ce7cf561754a94cdff8dd)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: i801: Add PCI ID for Intel Braswell
Alan Cox [Tue, 4 Nov 2014 08:55:25 +0000 (16:55 +0800)]
i2c: i801: Add PCI ID for Intel Braswell

The SMBus host controller is the same as used in Baytrail so add the new
PCI ID to the driver's list of supported IDs.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 39e8e30ee544a62c148033d64a979028b958ca05)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: i801: Add device ID for Intel Wildcat Point PCH
Jean Delvare [Tue, 4 Nov 2014 08:55:24 +0000 (16:55 +0800)]
i2c: i801: Add device ID for Intel Wildcat Point PCH

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit b299de839157852c563b9f133c8b7e630545a9c3)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: i801: Fix the alignment of the device table
Jean Delvare [Tue, 4 Nov 2014 08:55:23 +0000 (16:55 +0800)]
i2c: i801: Fix the alignment of the device table

A long name broke the alignment, shift the columns a bit to fix it and
make the table look nice again. While we're here, switch to the
standard comment style to make checkpatch happy, and use tabs instead
of spaces for column alignment.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit ce3161106ab57afbfbe1c33d95bf4a569405983a)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: remove DEFINE_PCI_DEVICE_TABLE macro
Jingoo Han [Tue, 4 Nov 2014 08:55:22 +0000 (16:55 +0800)]
i2c: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 392debf11656dedd79da44416747d5b2b1747f5e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: use c99 initializers in structures
Julia Lawall [Wed, 29 Oct 2014 00:52:58 +0000 (08:52 +0800)]
pwm: lpss: use c99 initializers in structures

Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

struct i1 i2 = { is,
+ .fld = e
- e
 ,...};
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[thierry.reding: rebased and applied same fix for Braswell]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit b2b7adeb21745266326d453b95e5d0b1b9cb1d4e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Fix build failure on PowerPC
Thierry Reding [Wed, 29 Oct 2014 00:52:57 +0000 (08:52 +0800)]
pwm: lpss: Fix build failure on PowerPC

An x86 build seems to pull in the linux/io.h include indirectly. On
PowerPC that doesn't happen and the build breaks due to the readl() and
writel() functions not being declared. Fix this by explicitly including
linux/io.h.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit e0c86a3b63e948e51a47d17382c7cd8711d19750)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Properly split driver to parts
Andy Shevchenko [Wed, 29 Oct 2014 00:52:56 +0000 (08:52 +0800)]
pwm: lpss: Properly split driver to parts

The driver consists of core, PCI, and platform parts. It would be better
to split them into separate files.

The platform driver is now called pwm-lpss-platform. Thus, previously
set CONFIG_PWM_LPSS=m is not enough to build it. But we are on the safe
side since it seems no one from outside Intel is using it for now.

While here, move to use macros module_pci_driver() and
module_platform_driver().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
[thierry.reding: change select to depends on PWM_LPSS, cleanup]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit c558e39e14c2372394f49e07fbe94e9708b615cb)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Add ACPI and PCI IDs for Intel Braswell
Alan Cox [Wed, 29 Oct 2014 00:52:55 +0000 (08:52 +0800)]
pwm: lpss: Add ACPI and PCI IDs for Intel Braswell

This is pretty much the same as Baytrail PWM. Only difference is that the
input clock runs on different frequency.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 373c57829a3f9da1405b1fbd3d17e50f8e1f476e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: remove dependency on clk framework
Heikki Krogerus [Wed, 29 Oct 2014 00:52:54 +0000 (08:52 +0800)]
pwm: lpss: remove dependency on clk framework

Unlike other Intel LPSS devices, the PWM does not have the
clock dividers or the gate. All we get from the clock is the
rate. Since PCI case uses the driver data to get the rate,
we can drop the clk and use the same data also in case of
ACPI. The frequency is the same.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 65accd87381ed96bf8893124b149bae08edd2740)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Fix const qualifier and sparse warnings
Thierry Reding [Wed, 29 Oct 2014 00:52:53 +0000 (08:52 +0800)]
pwm: lpss: Fix const qualifier and sparse warnings

Fixes the following warnings reported by the 0-DAY kernel build testing
backend:

   drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
>> drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
     lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
     ^
   drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
    static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
                                 ^
>> drivers/pwm/pwm-lpss.c:143:28: sparse: incorrect type in return expression (different address spaces)
   drivers/pwm/pwm-lpss.c:143:28:    expected struct pwm_lpss_chip *
   drivers/pwm/pwm-lpss.c:143:28:    got void [noderef] <asn:2>*regs
>> drivers/pwm/pwm-lpss.c:192:63: sparse: incorrect type in argument 3 (different modifiers)
   drivers/pwm/pwm-lpss.c:192:63:    expected struct pwm_lpss_boardinfo *info
   drivers/pwm/pwm-lpss.c:192:63:    got struct pwm_lpss_boardinfo const *[assigned] info
   drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
   drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
     lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
     ^
   drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
    static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
                                 ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 89c0339e0aa097384b3efed894b23820814c21d3)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Add support for PCI devices
Alan Cox [Wed, 29 Oct 2014 00:52:52 +0000 (08:52 +0800)]
pwm: lpss: Add support for PCI devices

Not all systems enumerate the PWM devices via ACPI. They can also be
exposed via the PCI interface.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 093e00bb3f82f3c67e2d1682e316fc012bcd0d92)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: add support for Intel Low Power Subsystem PWM
Mika Westerberg [Wed, 29 Oct 2014 00:52:51 +0000 (08:52 +0800)]
pwm: add support for Intel Low Power Subsystem PWM

Add support for Intel Low Power I/O subsystem PWM controllers found on
Intel BayTrail SoC.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Chew, Kean Ho <kean.ho.chew@intel.com>
Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit d16a5aa9e821633a3095d7a88cd1d2cd108bf966)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoof/fdt: update of_get_flat_dt_prop in prep for libfdt
Rob Herring [Wed, 2 Apr 2014 04:49:03 +0000 (23:49 -0500)]
of/fdt: update of_get_flat_dt_prop in prep for libfdt

Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop
call in preparation to convert FDT code to use libfdt. Make the return
value const and the property length ptr type an int.

Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Stephen Chivers <schivers@csc.com>
(cherry picked from commit 9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/plat-samsung/s5p-dev-mfc.c
arch/powerpc/platforms/powernv/opal.c
drivers/of/fdt.c
drivers/of/of_reserved_mem.c

9 years agoclk: add clock-indices support
Ben Dooks [Thu, 13 Feb 2014 18:02:49 +0000 (18:02 +0000)]
clk: add clock-indices support

Add a property called clock-indices to allow clock-output-names
to be used where the index used to lookup a clock is not a 1:1
mapping to the array position in the clock-output-names

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit 7a0fc1a3df82d29e00b4c9f88a6b37450d6711f1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoi2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
Sergei Shtylyov [Fri, 5 Sep 2014 23:34:32 +0000 (03:34 +0400)]
i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}

Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
1's in bits 8-31, thus going against the manuals, so fix them.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 938916fbb8e8cb67eacb784f4eda17e2950c16c5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: fix the usb_pkt_pop()
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:28 +0000 (20:14 +0900)]
usb: renesas_usbhs: fix the usb_pkt_pop()

This patch fixes the usb_pkt_pop(). If a gadget driver calls
usb_ep_dequeue(), this driver will call the usb_pkt_pop().
So, the usb_pkt_pop() should cancel the transaction.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 2743e7f90dc08282d027dbc2f6486f5cb85aa493)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_done
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:10 +0000 (20:14 +0900)]
usb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_done

This patch fixes the condition of is_done in usbhsf_dma_push_done().
This function will be called after a transmission finished by DMAC.
So, the function should check if the transmission packet is short packet
or not. Also the function should call try_run to send the zero packet
by the pio handler if the "*is_done" is not set. Otherwize, the
transaction will not finish if a gadget driver sets the "zero" flag
in a transmission.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c0ed8b23b257a84d103764cdbd490ee5e2749da3)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:00 +0000 (20:14 +0900)]
usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock

This patch protects the mod->irq_bempsts and mod->irq_brdysts by
spin lock in the usbhs_status_get_each_irq() because other functions
will write them during spin lock. Otherwise, the driver will clears
the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not
finish.
Also since the driver should use the INTSTS0 and BRDYSTS and BEMPSTS
as the same timing, the patch protects them.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c4d8199ba1a7aa390b06db23f4532e2c1875aefb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:13:50 +0000 (20:13 +0900)]
usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle

Some gadget drivers will call usb_ep_queue() more than once before
the first queue doesn't finish. However, this driver didn't handle
it correctly. So, this patch fixes the behavior of some
usbhs_pkt_handle using the "running" flag. Otherwise, the oops below
happens if we use g_ncm driver and when the "iperf -u -c host -b 200M"
is running.

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 80000007 [#1] SMP ARM
Modules linked in: usb_f_ncm g_ncm libcomposite u_ether
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W      3.17.0-rc1-00008-g8b2be8a-dirty #20
task: c051c7e0 ti: c0512000 task.ti: c0512000
PC is at 0x0
LR is at usbhsf_pkt_handler+0xa8/0x114
pc : [<00000000>]    lr : [<c0278fb4>]    psr: 60000193
sp : c0513ce8  ip : c0513c58  fp : c0513d24
r10: 00000001  r9 : 00000193  r8 : eebec4a0
r7 : eebec410  r6 : eebe0c6c  r5 : 00000000  r4 : ee4a2774
r3 : 00000000  r2 : ee251e00  r1 : c0513cf4  r0 : ee4a2774

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 8355b2b3082d302091506703d2e4e239f7deed7f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agonet: sh_eth: fix driver dependencies
Bartlomiej Zolnierkiewicz [Mon, 1 Sep 2014 14:25:35 +0000 (16:25 +0200)]
net: sh_eth: fix driver dependencies

Renesas SuperH Ethernet support should be available only on
Renesas ARM SoCs and SuperH architecture.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f6ec9c335b502d8011971d07508589d212cb3c93)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoASoC: rcar: Use && instead of & for boolean expressions
Lars-Peter Clausen [Sun, 17 Aug 2014 14:18:19 +0000 (16:18 +0200)]
ASoC: rcar: Use && instead of & for boolean expressions

Sparse spits out the following warning:
sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y

It does this because sometimes mixing boolean and bit-wise logic has not the
intended result. In this case we are fine, but replacing the bit-wise '&' with
the boolean '&&' silences the sparse warning. The generated code for both cases
is the same.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit c8e6e960733f4a5835265c15429fced4d2f1595e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoRevert "i2c: rcar: remove spinlock"
Sergei Shtylyov [Sat, 23 Aug 2014 20:44:09 +0000 (00:44 +0400)]
Revert "i2c: rcar: remove spinlock"

This reverts commit 150b8be3cda54412ad7b54f5392b513b25c0aaa7.

The I2C core's per-adapter locks can't protect from IRQs, so the driver still
needs a spinlock to protect the register accesses.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 91bfe2989af02e709ca01ccf518c4fbda3efc70f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoi2c: rcar: fix MNR interrupt handling
Sergei Shtylyov [Mon, 1 Sep 2014 21:15:26 +0000 (01:15 +0400)]
i2c: rcar: fix MNR interrupt handling

Sometimes the MNR and MST interrupts happen simultaneously  (stop  automatically
follows NACK, according to the manuals) and in such case the ID_NACK flag  isn't
set since the MST interrupt handling precedes MNR and all interrupts are cleared
and disabled then, so that MNR interrupt is never noticed -- this causes NACK'ed
transfers to be falsely reported as successful. Exchanging MNR and  MST handlers
fixes this issue, however the MNR bit  somehow  gets set again even after  being
explicitly cleared, so I decided to completely suppress handling of all disabled
interrupts (which is a good thing anyway)...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit dd318b0df27c582ac0d72a346fd6e693700be23c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoASoC: ak4642: Make of_device_id array const
Kiran Padwal [Mon, 28 Jul 2014 06:11:04 +0000 (11:41 +0530)]
ASoC: ak4642: Make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const

Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 27204ca8b981160c3b65cdc226c9070f76cbbd36)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers
Yoshihiro Shimoda [Wed, 9 Jul 2014 01:08:52 +0000 (10:08 +0900)]
usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers

The R-Car H2 and M2 SoCs come with an xHCI controller that requires
some specific initializations related to the firmware downloading and
some specific registers. This patch adds the support for this special
configuration as an xHCI quirk executed during probe and start.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: "mathias.nyman@intel.com" <mathias.nyman@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4ac8918f3a737c21d81e250e4194c12ea2b7eb04)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: host: xhci-plat: use devm_functions
Himangi Saraogi [Fri, 20 Jun 2014 17:41:23 +0000 (23:11 +0530)]
usb: host: xhci-plat: use devm_functions

This patch introduces the use of managed interface devm_ioremap_resource
for ioremap_nocache and request_mem_region and removes the corresponding
free functions in the probe and remove functions.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit fd666348c51f6ab66410c98a149e0418b9a258f0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoxhci: Platform: Set xhci lpm support quirk based on platform data
Pratyush Anand [Fri, 4 Jul 2014 14:01:25 +0000 (17:01 +0300)]
xhci: Platform: Set xhci lpm support quirk based on platform data

If an xhci platform supports USB3 LPM capability then enable
XHCI_LPM_SUPPORT quirk flag.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 20f6fdd01c2c0de9cc1109083222edded24c5350)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoxhci: Platform: Add (en/dis)able_usb3_lpm_timeout
Pratyush Anand [Fri, 4 Jul 2014 14:01:24 +0000 (17:01 +0300)]
xhci: Platform: Add (en/dis)able_usb3_lpm_timeout

To use auto U0-U1/U2 transition by xhci platform device add
(en/dis)able_usb3_lpm_timeout function to the xhci_plat_xhci_driver struct.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Tested-by: Aymen Bouattay <aymen.bouattay@st.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 94ef3d50426240a5402688e8d43a079df5ae21be)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Remove non-existent i2c6 pinmux
Geert Uytterhoeven [Thu, 14 Aug 2014 22:19:10 +0000 (07:19 +0900)]
ARM: shmobile: koelsch: Remove non-existent i2c6 pinmux

On r8a7791, i2c6 (aka iic3) doesn't need pinmux, but the koelsch dts
refers to non-existent pinmux configuration data:

pinmux core: sh-pfc does not support function i2c6
sh-pfc e6060000.pfc: invalid function i2c6 in map table

Remove it to fix this.

Fixes: commit 1d41f36a68c0f4e9b01d563ce33bab5201858b54 ("ARM: shmobile:
       koelsch dts: Add VDD MPU regulator for DVFS")

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Olof Johansson <olof@lixom.net>
(cherry picked from commit 12266db732ff3845eaa9ba9354c4938249787aaf)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
Kuninori Morimoto [Wed, 6 Aug 2014 01:24:51 +0000 (18:24 -0700)]
ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR

4bfb358b1d6cdeff8c6a13677f01ed78e9696b98
(ARM: shmobile: Add r8a7791 legacy SDHI clocks)
added r8a7791 SDHI clock support.

But, it is missing
"0x0100: x 1/8" division ratio.
This patch fixes hidden bug.
It is based on R-Car H2 v0.7, R-Car M2 v0.9.

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 58b80ad6472c0fa12926dfa1f9103d3a326bdf18)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
Kuninori Morimoto [Wed, 6 Aug 2014 01:24:30 +0000 (18:24 -0700)]
ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR

9f13ee6f83c52065112d3e396e42e3780911ef53
(ARM: shmobile: r8a7790: add div4 clocks)
added r8a7790 DIV4 clock support.

But, it is missing
"0x0100: x 1/8" division ratio.
This patch fixes hidden bug.
It is based on R-Car H2 v0.7, R-Car M2 v0.9.

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 4fb12fe9c34928c1d2bed817e144aec3f44540e9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: defconfig: Remove MACH_GENMAI
Laurent Pinchart [Wed, 16 Jul 2014 12:02:56 +0000 (14:02 +0200)]
ARM: shmobile: defconfig: Remove MACH_GENMAI

The CONFIG_MACH_GENMAI is scheduled for removal so remove it from
shmobile_defconfig.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: revised changelog for updated commit order]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 92db2b7af591d3c3212183a34856b4cb190b6999)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name
Simon Horman [Wed, 16 Jul 2014 00:11:21 +0000 (09:11 +0900)]
ARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name

A stray '0x' crept into a0f7e7496d56ac2d ("ARM: shmobile: sh73a0: add CMT1
clock support for DT"). This  patch removes it.

This change should not have any run-time affect at this time as
the clock in question is used by a SCIF device that is not enabled by
default.

Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2c3758b01aa6f11382d2b018614b5d48ecf30350)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: genmai: remove defconfig
Simon Horman [Tue, 15 Jul 2014 07:29:24 +0000 (16:29 +0900)]
ARM: shmobile: genmai: remove defconfig

The genmai board code is scheduled for removal and once
that occurs the defconfig will be of no use. Remove it.

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 3ed27bd90d6d0c8b4d686a2468b6d50cc1ef74e4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: add CMT1 clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:53 +0000 (09:54 +0200)]
ARM: shmobile: sh73a0: add CMT1 clock support for DT

This will be used when initialising CMT1 device using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit a0f7e7496d56ac2da7c684e2035815318c17973a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740: add CMT1 clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:46 +0000 (09:54 +0200)]
ARM: shmobile: r8a7740: add CMT1 clock support for DT

This will be used when initialising CMT1 device using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2e11179da78a56c2a44fc3fe097f2af8dc18f9d6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4: add CMT1 clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:35 +0000 (09:54 +0200)]
ARM: shmobile: r8a73a4: add CMT1 clock support for DT

This will be used when initialising CMT1 device using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit aad64dc31954dbbb84cd8fcfaf1bc028f3bc2616)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740: add TMU clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:43 +0000 (09:54 +0200)]
ARM: shmobile: r8a7740: add TMU clock support for DT

This will be used when initialising TMU devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ef9cb75ca70c8d31b2493d1fd6cbf8b3dd1dec95)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: add TMU clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:29 +0000 (09:54 +0200)]
ARM: shmobile: r8a7778: add TMU clock support for DT

This will be used when initialising TMU devices using DT
until common clock framework support is added.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0985f38d1379291c8701572e761c809f0d5f6476)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
Simon Horman [Mon, 7 Jul 2014 07:54:52 +0000 (09:54 +0200)]
ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT

Initialise SCIF device using DT when booting armadillo800eva
using DT reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 700ce7c2bb2a4963472d95eba1436d6b0945918e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Add SCIF nodes
Simon Horman [Mon, 7 Jul 2014 07:54:51 +0000 (09:54 +0200)]
ARM: shmobile: sh73a0: Add SCIF nodes

This describes all of the SCIF hardware of the sh73a0.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2131421b85c9f25082a2b0ec371c7ad0c47cc943)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT
Simon Horman [Mon, 7 Jul 2014 07:54:42 +0000 (09:54 +0200)]
ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT

Initialise SCIF device using DT when booting armadillo800eva
using DT reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit c4fac6f2f92331fa5788811357f8b8c3352e5ad8)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740: Add SCIF nodes
Simon Horman [Mon, 7 Jul 2014 07:54:41 +0000 (09:54 +0200)]
ARM: shmobile: r8a7740: Add SCIF nodes

This describes all of the SCIF hardware of the r8a7740.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit fa12355b24a430729f34c349473b9c0a3d125679)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
Simon Horman [Mon, 7 Jul 2014 07:54:34 +0000 (09:54 +0200)]
ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT

Initialise SCIF device using DT when booting ape6evm
using DT reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 27bc82353a3f214a383d7f3b1ccaefdb70d6c94f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4: Add SCIF nodes
Simon Horman [Mon, 7 Jul 2014 07:54:33 +0000 (09:54 +0200)]
ARM: shmobile: r8a73a4: Add SCIF nodes

This describes all of the SCIF hardware of the r8a73a4.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 94f1a03db6988c64601dc84eaf6c8ef1b956d9e7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw-reference: Initialise SCIF device using DT
Simon Horman [Mon, 7 Jul 2014 07:54:28 +0000 (09:54 +0200)]
ARM: shmobile: bockw-reference: Initialise SCIF device using DT

Initialise SCIF device using DT when booting bockw
using DT reference.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5be97ca4a4f6e11c4a839ec3c08dea25589dfeb4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: Add SCIF nodes
Simon Horman [Mon, 7 Jul 2014 07:54:27 +0000 (09:54 +0200)]
ARM: shmobile: r8a7778: Add SCIF nodes

This describes all of the SCIF hardware of the r8a7778.
Each node is disabled and may be enabled as necessary
by board DTS files.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 9930dc8ee1f59271a54ed4b4922c9c944625a8d6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: add SCI clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:50 +0000 (09:54 +0200)]
ARM: shmobile: sh73a0: add SCI clock support for DT

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ff4ce48e1f163d945c037c1c90ce12950961d91d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740: correct SCI clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:40 +0000 (09:54 +0200)]
ARM: shmobile: r8a7740: correct SCI clock support for DT

When initialising SCI devices their names will be .serial
not .sci.

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit d1ec90f2875471df2c954f7cbd45b2389ff86aa2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4: add SCI clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:32 +0000 (09:54 +0200)]
ARM: shmobile: r8a73a4: add SCI clock support for DT

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 9947efaac0545fd833b0ff5147578aba79d297bc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: add SCI clock support for DT
Simon Horman [Mon, 7 Jul 2014 07:54:26 +0000 (09:54 +0200)]
ARM: shmobile: r8a7778: add SCI clock support for DT

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7a0c99478dca80f862912be02bf8ec240a9098d1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: lager: use iic cores instead of i2c
Wolfram Sang [Thu, 10 Jul 2014 10:50:56 +0000 (12:50 +0200)]
ARM: shmobile: r8a7790: lager: use iic cores instead of i2c

On Lager board, i2c and iic cores can be interchanged since they can be
muxed to the same wires. Commit e489c2a9bc82713167d9f721ca764f4b0d37e543
("ARM: shmobile: lager: enable i2c devices") activated the i2c cores,
yet the iic cores should be default since they have the more interesting
features for generic use cases, i.e. SMBUS_QUICK and DMA (yet to be
supported).

Reported-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit cb9a2b12e0cb524022c9a81d8ed29f2453ec240d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Lager: Correct I2C bus for VDD MPU regulator
Khiem Nguyen [Fri, 4 Jul 2014 00:19:51 +0000 (09:19 +0900)]
ARM: shmobile: Lager: Correct I2C bus for VDD MPU regulator

I2C bus for VDD MPU regulator is IIC3, not I2C3.

Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5179ffd099446e65a1e094b9cb17cc7edab45583)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Remove opps table check for cpufreq
Gaku Inami [Wed, 25 Jun 2014 07:58:40 +0000 (16:58 +0900)]
ARM: shmobile: Remove opps table check for cpufreq

This patch is based on feedback from Viresh Kumar.
Since cpufreq-cpu0 driver has already check opp table, there is no
need to same check in mach-shmobile.

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit e423d12cbcb9576785e891617888f627f1f57bf4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Enable R-Car Gen 2 PCIe in shmobile_defconfig
Simon Horman [Mon, 7 Jul 2014 13:23:52 +0000 (15:23 +0200)]
ARM: shmobile: Enable R-Car Gen 2 PCIe in shmobile_defconfig

The R-Car Gen 2 PCIe driver provides PCIe host support for
Renesas R-Car Gen2 platforms. To increase hardware support enable
the driver in the shmobile_defconfig multiplatform configuration.

Cc: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 8cbf869a0a278c4d39e50daa4f4101b394a72a93)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: marzen: Consistently use tabs for indentation
Simon Horman [Mon, 7 Jul 2014 06:47:37 +0000 (08:47 +0200)]
ARM: shmobile: marzen: Consistently use tabs for indentation

Unify white space usage by consistently using tabs for indentation.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 08af64097d4c5cb17f9df4dadf80ed5f508db743)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference: Remove early_printk from command line
Simon Horman [Mon, 7 Jul 2014 06:50:09 +0000 (08:50 +0200)]
ARM: shmobile: kzm9g-reference: Remove early_printk from command line

As early printk is not supported when devices are initialised
using DT, so remove it from the command line.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0b7324706ea24489a0ddcbd9d472e232520aad80)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: armadillo800eva-reference: Remove early_printk from command line
Simon Horman [Mon, 7 Jul 2014 06:50:08 +0000 (08:50 +0200)]
ARM: shmobile: armadillo800eva-reference: Remove early_printk from command line

As early printk is not supported when devices are initialised
using DT, so remove it from the command line.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b2386fa51696ffcae82f27ebbdc667b037be5048)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7779: Consistently use tabs for indentation
Simon Horman [Mon, 7 Jul 2014 06:47:38 +0000 (08:47 +0200)]
ARM: shmobile: r8a7779: Consistently use tabs for indentation

Unify white space usage by consistently using tabs for indentation.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit cc703a59c0f8769456a7eb0d53a8d709e5c19387)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>