]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agofanotify: fix event filtering with FAN_ONDIR set
Suzuki K. Poulose [Thu, 12 Mar 2015 23:26:08 +0000 (16:26 -0700)]
fanotify: fix event filtering with FAN_ONDIR set

With FAN_ONDIR set, the user can end up getting events, which it hasn't
marked.  This was revealed with fanotify04 testcase failure on
Linux-4.0-rc1, and is a regression from 3.19, revealed with 66ba93c0d7fe6
("fanotify: don't set FAN_ONDIR implicitly on a marks ignored mask").

   # /opt/ltp/testcases/bin/fanotify04
   [ ... ]
  fanotify04    7  TPASS  :  event generated properly for type 100000
  fanotify04    8  TFAIL  :  fanotify04.c:147: got unexpected event 30
  fanotify04    9  TPASS  :  No event as expected

The testcase sets the adds the following marks : FAN_OPEN | FAN_ONDIR for
a fanotify on a dir.  Then does an open(), followed by close() of the
directory and expects to see an event FAN_OPEN(0x20).  However, the
fanotify returns (FAN_OPEN|FAN_CLOSE_NOWRITE(0x10)).  This happens due to
the flaw in the check for event_mask in fanotify_should_send_event() which
does:

if (event_mask & marks_mask & ~marks_ignored_mask)
return true;

where, event_mask == (FAN_ONDIR | FAN_CLOSE_NOWRITE),
       marks_mask == (FAN_ONDIR | FAN_OPEN),
       marks_ignored_mask == 0

Fix this by masking the outgoing events to the user, as we already take
care of FAN_ONDIR and FAN_EVENT_ON_CHILD.

Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Tested-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Eric Paris <eparis@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomm/nommu.c: export symbol max_mapnr
gchen gchen [Thu, 12 Mar 2015 23:26:05 +0000 (16:26 -0700)]
mm/nommu.c: export symbol max_mapnr

Several modules may need max_mapnr, so export, the related error with
allmodconfig under c6x:

  MODPOST 3327 modules
  ERROR: "max_mapnr" [fs/pstore/ramoops.ko] undefined!
  ERROR: "max_mapnr" [drivers/media/v4l2-core/videobuf2-dma-contig.ko] undefined!

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoarch/c6x/include/asm/pgtable.h: define dummy pgprot_writecombine for !MMU
Chen Gang [Thu, 12 Mar 2015 23:26:03 +0000 (16:26 -0700)]
arch/c6x/include/asm/pgtable.h: define dummy pgprot_writecombine for !MMU

When !MMU, asm-generic will not define default pgprot_writecombine, so c6x
needs to define it by itself.  The related error:

    CC [M]  fs/pstore/ram_core.o
  fs/pstore/ram_core.c: In function 'persistent_ram_vmap':
  fs/pstore/ram_core.c:399:10: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
     prot = pgprot_writecombine(PAGE_KERNEL);
            ^
  fs/pstore/ram_core.c:399:8: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
     prot = pgprot_writecombine(PAGE_KERNEL);
          ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agonilfs2: fix deadlock of segment constructor during recovery
Ryusuke Konishi [Thu, 12 Mar 2015 23:26:00 +0000 (16:26 -0700)]
nilfs2: fix deadlock of segment constructor during recovery

According to a report from Yuxuan Shui, nilfs2 in kernel 3.19 got stuck
during recovery at mount time.  The code path that caused the deadlock was
as follows:

  nilfs_fill_super()
    load_nilfs()
      nilfs_salvage_orphan_logs()
        * Do roll-forwarding, attach segment constructor for recovery,
          and kick it.

        nilfs_segctor_thread()
          nilfs_segctor_thread_construct()
           * A lock is held with nilfs_transaction_lock()
             nilfs_segctor_do_construct()
               nilfs_segctor_drop_written_files()
                 iput()
                   iput_final()
                     write_inode_now()
                       writeback_single_inode()
                         __writeback_single_inode()
                           do_writepages()
                             nilfs_writepage()
                               nilfs_construct_dsync_segment()
                                 nilfs_transaction_lock() --> deadlock

This can happen if commit 7ef3ff2fea8b ("nilfs2: fix deadlock of segment
constructor over I_SYNC flag") is applied and roll-forward recovery was
performed at mount time.  The roll-forward recovery can happen if datasync
write is done and the file system crashes immediately after that.  For
instance, we can reproduce the issue with the following steps:

 < nilfs2 is mounted on /nilfs (device: /dev/sdb1) >
 # dd if=/dev/zero of=/nilfs/test bs=4k count=1 && sync
 # dd if=/dev/zero of=/nilfs/test conv=notrunc oflag=dsync bs=4k
 count=1 && reboot -nfh
 < the system will immediately reboot >
 # mount -t nilfs2 /dev/sdb1 /nilfs

The deadlock occurs because iput() can run segment constructor through
writeback_single_inode() if MS_ACTIVE flag is not set on sb->s_flags.  The
above commit changed segment constructor so that it calls iput()
asynchronously for inodes with i_nlink == 0, but that change was
imperfect.

This fixes the another deadlock by deferring iput() in segment constructor
even for the case that mount is not finished, that is, for the case that
MS_ACTIVE flag is not set.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Reported-by: Yuxuan Shui <yshuiv7@gmail.com>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomm: cma: fix CMA aligned offset calculation
Danesh Petigara [Thu, 12 Mar 2015 23:25:57 +0000 (16:25 -0700)]
mm: cma: fix CMA aligned offset calculation

The CMA aligned offset calculation is incorrect for non-zero order_per_bit
values.

For example, if cma->order_per_bit=1, cma->base_pfn= 0x2f800000 and
align_order=12, the function returns a value of 0x17c00 instead of 0x400.

This patch fixes the CMA aligned offset calculation.

The previous calculation was wrong and would return too-large values for
the offset, so that when cma_alloc looks for free pages in the bitmap with
the requested alignment > order_per_bit, it starts too far into the bitmap
and so CMA allocations will fail despite there actually being plenty of
free pages remaining.  It will also probably have the wrong alignment.
With this change, we will get the correct offset into the bitmap.

One affected user is powerpc KVM, which has kvm_cma->order_per_bit set to
KVM_CMA_CHUNK_ORDER - PAGE_SHIFT, or 18 - 12 = 6.

[gregory.0xf0@gmail.com: changelog additions]
Signed-off-by: Danesh Petigara <dpetigara@broadcom.com>
Reviewed-by: Gregory Fong <gregory.0xf0@gmail.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomm, hugetlb: close race when setting PageTail for gigantic pages
David Rientjes [Thu, 12 Mar 2015 23:25:54 +0000 (16:25 -0700)]
mm, hugetlb: close race when setting PageTail for gigantic pages

Now that gigantic pages are dynamically allocatable, care must be taken to
ensure that p->first_page is valid before setting PageTail.

If this isn't done, then it is possible to race and have compound_head()
return NULL.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomm, oom: do not fail __GFP_NOFAIL allocation if oom killer is disabled
Michal Hocko [Thu, 12 Mar 2015 23:25:52 +0000 (16:25 -0700)]
mm, oom: do not fail __GFP_NOFAIL allocation if oom killer is disabled

Tetsuo Handa has pointed out that __GFP_NOFAIL allocations might fail
after OOM killer is disabled if the allocation is performed by a kernel
thread.  This behavior was introduced from the very beginning by
7f33d49a2ed5 ("mm, PM/Freezer: Disable OOM killer when tasks are frozen").
 This means that the basic contract for the allocation request is broken
and the context requesting such an allocation might blow up unexpectedly.

There are basically two ways forward.

1) move oom_killer_disable after kernel threads are frozen.  This has a
   risk that the OOM victim wouldn't be able to finish because it would
   depend on an already frozen kernel thread.  This would be really tricky
   to debug.

2) do not fail GFP_NOFAIL allocation no matter what and risk a
   potential Freezable kernel threads will loop and fail the suspend.
   Incidental allocations after kernel threads are frozen will at least
   dump a warning - if we are lucky and the serial console is still active
   of course...

This patch implements the later option because it is safer.  We would see
warning rather than allocation failures for the kernel threads which would
blow up otherwise and have a higher chances to identify __GFP_NOFAIL users
from deeper pm code.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@gooogle.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agodrivers/rtc/rtc-s3c.c: add .needs_src_clk to s3c6410 RTC data
Javier Martinez Canillas [Thu, 12 Mar 2015 23:25:49 +0000 (16:25 -0700)]
drivers/rtc/rtc-s3c.c: add .needs_src_clk to s3c6410 RTC data

Commit df9e26d093d3 ("rtc: s3c: add support for RTC of Exynos3250 SoC")
added an "rtc_src" DT property to specify the clock used as a source to
the S3C real-time clock.

Not all SoCs needs this so commit eaf3a659086e ("drivers/rtc/rtc-s3c.c:
fix initialization failure without rtc source clock") changed to check
the struct s3c_rtc_data .needs_src_clk to conditionally grab the clock.

But that commit didn't update the data for each IP version so the RTC
broke on the boards that needs a source clock. This is the case of at
least Exynos5250 and Exynos5440 which uses the s3c6410 RTC IP block.

This commit fixes the S3C rtc on the Exynos5250 Snow and Exynos5420
Peach Pit and Pi Chromebooks.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoocfs2: make append_dio an incompat feature
Mark Fasheh [Thu, 12 Mar 2015 23:25:46 +0000 (16:25 -0700)]
ocfs2: make append_dio an incompat feature

It turns out that making this feature ro_compat isn't quite enough to
prevent accidental corruption on mount from older kernels.  Ocfs2 (like
other file systems) will process orphaned inodes even when the user mounts
in 'ro' mode.  So for the case of a filesystem not knowing the append_dio
feature, mounting the filesystem could result in orphaned-for-dio files
being deleted, which we clearly don't want.

So instead, turn this into an incompat flag.

Btw, this is kind of my fault - initially I asked that we add a flag to
cover the feature and even suggested that we use an ro flag.  It wasn't
until I was looking through our commits for v4.0-rc1 that I realized we
actually want this to be incompat.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joseph Qi <joseph.qi@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge branch 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Thu, 12 Mar 2015 23:21:24 +0000 (09:21 +1000)]
Merge branch 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Some additional radeon fixes for 4.0

* 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: drop setting UPLL to sleep mode
  drm/radeon: fix wait to actually occur after the signaling callback

9 years agoMerge branch 'vmwgfx-fixes-4.0' of git://people.freedesktop.org/~thomash/linux into...
Dave Airlie [Thu, 12 Mar 2015 23:15:56 +0000 (09:15 +1000)]
Merge branch 'vmwgfx-fixes-4.0' of git://people.freedesktop.org/~thomash/linux into drm-fixes

A couple of fixes for vmwgfx.

* 'vmwgfx-fixes-4.0' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: Fix an issue with the device losing its irq line on module unload
  drm/vmwgfx: Correctly NULLify dma buffer pointer on failure
  drm/vmwgfx: Reorder device takedown somewhat
  drm/vmwgfx: Fix a couple of lock dependency violations

9 years agoMerge tag 'drm-intel-fixes-2015-03-12' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Thu, 12 Mar 2015 23:15:01 +0000 (09:15 +1000)]
Merge tag 'drm-intel-fixes-2015-03-12' of git://anongit.freedesktop.org/drm-intel into drm-fixes

More i915 fixes, three out of four are fixes to old bugs, cc: stable.

* tag 'drm-intel-fixes-2015-03-12' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Prevent TLB error on first execution on SNB
  drm/i915: Do both mt and gen6 style forcewake reset on ivb probe
  drm/i915: Make WAIT_IOCTL negative timeouts be indefinite again
  drm/i915: use in_interrupt() not in_irq() to check context

9 years agomm: thp: Return the correct value for change_huge_pmd
Mel Gorman [Sat, 7 Mar 2015 15:20:48 +0000 (15:20 +0000)]
mm: thp: Return the correct value for change_huge_pmd

The wrong value is being returned by change_huge_pmd since commit
10c1045f28e8 ("mm: numa: avoid unnecessary TLB flushes when setting
NUMA hinting entries") which allows a fallthrough that tries to adjust
non-existent PTEs. This patch corrects it.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoALSA: hda - Add workaround for MacBook Air 5,2 built-in mic
Takashi Iwai [Thu, 12 Mar 2015 19:47:15 +0000 (20:47 +0100)]
ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic

MacBook Air 5,2 has the same problem as MacBook Pro 8,1 where the
built-in mic records only the right channel.  Apply the same
workaround as MBP8,1 to spread the mono channel via a Cirrus codec
vendor-specific COEF setup.

Reported-and-tested-by: Vasil Zlatanov <vasil.zlatanov@gmail.com>
Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Set single_adc_amp flag for CS420x codecs
Takashi Iwai [Thu, 12 Mar 2015 19:28:04 +0000 (20:28 +0100)]
ALSA: hda - Set single_adc_amp flag for CS420x codecs

CS420x codecs seem to deal only the single amps of ADC nodes even
though the nodes receive multiple inputs.  This leads to the
inconsistent amp value after S3/S4 resume, for example.

The fix is just to set codec->single_adc_amp flag.  Then the driver
handles these ADC amps as if single connections.

Reported-and-tested-by: Vasil Zlatanov <vasil.zlatanov@gmail.com>
Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Thu, 12 Mar 2015 16:50:45 +0000 (09:50 -0700)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fix from Wolfram Sang:
 "An important bugfix for the I2C subsystem core"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  Revert "i2c: core: Dispose OF IRQ mapping at client removal time"

9 years agoMerge tag 'pci-v4.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Linus Torvalds [Thu, 12 Mar 2015 16:45:46 +0000 (09:45 -0700)]
Merge tag 'pci-v4.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "Here are a couple updates for v4.0.

  One fixes a config accessor problem on APM X-Gene that we introduced
  when switching to generic config accessors, and the other fixes an
  older read-past-end-of-buffer problem in sysfs.

  APM X-Gene host bridge driver
    - Add register offset to config space base address (Feng Kan)

  Miscellaneous
    - Don't read past the end of sysfs "driver_override" buffer (Sasha Levin)"

* tag 'pci-v4.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: xgene: Add register offset to config space base address
  PCI: Don't read past the end of sysfs "driver_override" buffer

9 years agoMerge tag 'microblaze-4.0-rc4' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Thu, 12 Mar 2015 16:34:10 +0000 (09:34 -0700)]
Merge tag 'microblaze-4.0-rc4' of git://git.monstr.eu/linux-2.6-microblaze

Pull arch/microblaze fixes from Michal Simek:
 "Fix syscall error recovery.

  Two patches - one is just preparation patch for the second which is
  fixing the problem with syscalls"

* tag 'microblaze-4.0-rc4' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Fix syscall error recovery for invalid syscall IDs
  microblaze: Coding style cleanup

9 years agoMerge tag 'nios2-fix-4.0-rc4' of git://git.rocketboards.org/linux-socfpga-next
Linus Torvalds [Thu, 12 Mar 2015 16:23:30 +0000 (09:23 -0700)]
Merge tag 'nios2-fix-4.0-rc4' of git://git.rocketboards.org/linux-socfpga-next

Pull arch/nios2 fix from Ley Foon Tan:
 "Remove pt_regs from user header and use generic ucontext.h"

* tag 'nios2-fix-4.0-rc4' of git://git.rocketboards.org/linux-socfpga-next:
  nios2: update pt_regs

9 years agovfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX
Alexey Kardashevskiy [Thu, 12 Mar 2015 03:43:12 +0000 (14:43 +1100)]
vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX

This adds a missing break statement to VFIO_DEVICE_SET_IRQS handler
without which vfio_pci_set_err_trigger() would never be called.

While we are here, add another "break" to VFIO_PCI_REQ_IRQ_INDEX case
so if we add more indexes later, we won't miss it.

Fixes: 6140a8f56238 ("vfio-pci: Add device request interface")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
9 years agomm: fix up numa read-only thread grouping logic
Linus Torvalds [Thu, 12 Mar 2015 15:45:46 +0000 (08:45 -0700)]
mm: fix up numa read-only thread grouping logic

Dave Chinner reported that commit 4d9424669946 ("mm: convert
p[te|md]_mknonnuma and remaining page table manipulations") slowed down
his xfsrepair test enormously.  In particular, it was using more system
time due to extra TLB flushing.

The ultimate reason turns out to be how the change to use the regular
page table accessor functions broke the NUMA grouping logic.  The old
special mknuma/mknonnuma code accessed the page table present bit and
the magic NUMA bit directly, while the new code just changes the page
protections using PROT_NONE and the regular vma protections.

That sounds equivalent, and from a fault standpoint it really is, but a
subtle side effect is that the *other* protection bits of the page table
entries also change.  And the code to decide how to group the NUMA
entries together used the writable bit to decide whether a particular
page was likely to be shared read-only or not.

And with the change to make the NUMA handling use the regular permission
setting functions, that writable bit was basically always cleared for
private mappings due to COW.  So even if the page actually ends up being
written to in the end, the NUMA balancing would act as if it was always
shared RO.

This code is a heuristic anyway, so the fix - at least for now - is to
instead check whether the page is dirty rather than writable.  The bit
doesn't change with protection changes.

NOTE! This also adds a FIXME comment to revisit this issue,

Not only should we probably re-visit the whole "is this a shared
read-only page" heuristic (we might want to take the vma permissions
into account and base this more on those than the per-page ones, and
also look at whether the particular access that triggers it is a write
or not), but the whole COW issue shows that we should think about the
NUMA fault handling some more.

For example, maybe we should do the early-COW thing that a regular fault
does.  Or maybe we should accept that while using the same bits as
PROTNONE was a good thing (and got rid of the specual NUMA bit), we
might still want to just preseve the other protection bits across NUMA
faulting.

Those are bigger questions, left for later.  This just fixes up the
heuristic so that it at least approximates working again.  More analysis
and work needed.

Reported-by: Dave Chinner <david@fromorbit.com>
Tested-by: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoARM: at91: pm: change at91_pm_set_standby() to static
Wenyou Yang [Wed, 4 Mar 2015 01:44:45 +0000 (09:44 +0800)]
ARM: at91: pm: change at91_pm_set_standby() to static

Since at91_pm_set_standby() will not be used out of the pm.c file,
change its attribute from extern to static, remove its declaration as well.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
9 years agoARM: at91: remove ksz8081 phy fixup registration for sama5d4ek board
Boris Brezillon [Wed, 4 Mar 2015 11:20:12 +0000 (12:20 +0100)]
ARM: at91: remove ksz8081 phy fixup registration for sama5d4ek board

Commit 2b0ba96cea60 ("net: phy: micrel: disable NAND-tree for KSZ8021,
KSZ8031, KSZ8051, KSZ8081") automated the NAND-tree mode deactivation
process, thus making this phy fixup useless.
Remove it along with the associated headers inclusion.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: remove selection of PHYLIB in at91 Kconfig]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
9 years agoMerge tag 'at91-fixes3' into at91-4.1-cleanup
Nicolas Ferre [Thu, 12 Mar 2015 14:30:03 +0000 (15:30 +0100)]
Merge tag 'at91-fixes3' into at91-4.1-cleanup

Third fixes batch for AT91 on 4.0:
- clock fixes for USB
- compatible string changes for handling USB IP differences
  (+ needed AHB matrix syscon)
- fix of a compilation error in PM code

9 years agoMerge tag 'at91-fixes2' into at91-4.1-cleanup
Nicolas Ferre [Thu, 12 Mar 2015 14:30:00 +0000 (15:30 +0100)]
Merge tag 'at91-fixes2' into at91-4.1-cleanup

Second fixes batch for AT91 on 4.0:
- little fix for !MMU debug: may also help for randconfig
- fix of 2 errors in LCD clock definitions
- in PM code, not writing the key leads to not execute the action

9 years agoMerge tag 'at91-fixes' into at91-4.1-cleanup
Nicolas Ferre [Thu, 12 Mar 2015 14:29:56 +0000 (15:29 +0100)]
Merge tag 'at91-fixes' into at91-4.1-cleanup

First fixes batch for AT91 on 4.0:
- PM slowclock fixes for DDR and timeouts
- fix some DT entries
- little defconfig updates
- the removal of a harmful watchdog option + its detailed documentation

9 years agoRevert "i2c: core: Dispose OF IRQ mapping at client removal time"
Jakub Kicinski [Wed, 11 Mar 2015 17:35:36 +0000 (18:35 +0100)]
Revert "i2c: core: Dispose OF IRQ mapping at client removal time"

This reverts commit e4df3a0b6228
("i2c: core: Dispose OF IRQ mapping at client removal time")

Calling irq_dispose_mapping() will destroy the mapping and disassociate
the IRQ from the IRQ chip to which it belongs. Keeping it is OK, because
existent mappings are reused properly.

Also, this commit breaks drivers using devm* for IRQ management on
OF-based systems because devm* cleanup happens in device code, after
bus's remove() method returns.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[wsa: updated the commit message with findings fromt the other bug report]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Fixes: e4df3a0b6228
9 years agoALSA: snd-usb: add quirks for Roland UA-22
Daniel Mack [Thu, 12 Mar 2015 08:41:32 +0000 (09:41 +0100)]
ALSA: snd-usb: add quirks for Roland UA-22

The device complies to the UAC1 standard but hides that fact with
proprietary descriptors. The autodetect quirk for Roland devices
catches the audio interface but misses the MIDI part, so a specific
quirk is needed.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reported-by: Rafa Lafuente <rafalafuente@gmail.com>
Tested-by: Raphaël Doursenaud <raphael@doursenaud.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: control: Add sanity checks for user ctl id name string
Takashi Iwai [Wed, 11 Mar 2015 17:12:49 +0000 (18:12 +0100)]
ALSA: control: Add sanity checks for user ctl id name string

There was no check about the id string of user control elements, so we
accepted even a control element with an empty string, which is
obviously bogus.  This patch adds more sanity checks of id strings.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agonios2: update pt_regs
Chung-Ling Tang [Thu, 12 Mar 2015 05:34:31 +0000 (13:34 +0800)]
nios2: update pt_regs

Remove struct pt_regs from user header and use generic ucontext.h.

Signed-off-by: Chung-Ling Tang <cltang@codesourcery.com>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agoARM: shmobile: r8a7740: Remove restart callback
Geert Uytterhoeven [Mon, 23 Feb 2015 15:59:28 +0000 (16:59 +0100)]
ARM: shmobile: r8a7740: Remove restart callback

Remove the restart handling hack from the r8a7740 generic multiplatform
case.

Restart on DT-based r8a7740 platforms is now handled through the
R-Mobile reset driver.

This reverts commit 1174c712afa2779f ("ARM: shmobile: r8a7740: Add
restart callback").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set
Geert Uytterhoeven [Mon, 26 Jan 2015 16:21:14 +0000 (17:21 +0100)]
ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set

Since commit e042681894b62d60 ("ARM: shmobile: r8a7790: Remove legacy
code"), all R-Car Gen2 SoCs are supported by multiplatform kernels only.
As CONFIG_COMMON_CLK is always set for multiplatform kernels, we can
remove related #ifdefs in code specific to R-Car Gen2 SoCs.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Remove stray closing parenthesis in debug description
Geert Uytterhoeven [Thu, 26 Feb 2015 10:29:35 +0000 (11:29 +0100)]
ARM: shmobile: Remove stray closing parenthesis in debug description

Remove the stray closing parenthesis in the config description for the
DEBUG_RCAR_GEN2_SCIF0 option.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoASoC: kirkwood: fix struct clk pointer comparing
Shawn Guo [Wed, 25 Feb 2015 14:53:38 +0000 (22:53 +0800)]
ASoC: kirkwood: fix struct clk pointer comparing

Since commit 035a61c314eb ("clk: Make clk API return per-user struct clk
instances"), clk API users can no longer check if two struct clk
pointers are pointing to the same hardware clock, i.e. struct clk_hw, by
simply comparing two pointers.  That's because with the per-user clk
change, a brand new struct clk is created whenever clients try to look
up the clock by calling clk_get() or sister functions like clk_get_sys()
and of_clk_get().  This changes the original behavior where the struct
clk is only created for once when clock driver registers the clock to
CCF in the first place.  The net change here is before commit
035a61c314eb the struct clk pointer is unique for given hardware
clock, while after the commit the pointers returned by clk lookup calls
become different for the same hardware clock.

That said, the struct clk pointer comparing in the code doesn't work any
more.  Call helper function clk_is_match() instead to fix the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agoASoC: fsl_spdif: fix struct clk pointer comparing
Shawn Guo [Wed, 25 Feb 2015 14:53:37 +0000 (22:53 +0800)]
ASoC: fsl_spdif: fix struct clk pointer comparing

Since commit 035a61c314eb ("clk: Make clk API return per-user struct clk
instances"), clk API users can no longer check if two struct clk
pointers are pointing to the same hardware clock, i.e. struct clk_hw, by
simply comparing two pointers.  That's because with the per-user clk
change, a brand new struct clk is created whenever clients try to look
up the clock by calling clk_get() or sister functions like clk_get_sys()
and of_clk_get().  This changes the original behavior where the struct
clk is only created for once when clock driver registers the clock to
CCF in the first place.  The net change here is before commit
035a61c314eb the struct clk pointer is unique for given hardware
clock, while after the commit the pointers returned by clk lookup calls
become different for the same hardware clock.

That said, the struct clk pointer comparing in the code doesn't work any
more.  Call helper function clk_is_match() instead to fix the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agoARM: imx: fix struct clk pointer comparing
Shawn Guo [Wed, 25 Feb 2015 14:53:32 +0000 (22:53 +0800)]
ARM: imx: fix struct clk pointer comparing

Since commit 035a61c314eb ("clk: Make clk API return per-user struct clk
instances"), clk API users can no longer check if two struct clk
pointers are pointing to the same hardware clock, i.e. struct clk_hw, by
simply comparing two pointers.  That's because with the per-user clk
change, a brand new struct clk is created whenever clients try to look
up the clock by calling clk_get() or sister functions like clk_get_sys()
and of_clk_get().  This changes the original behavior where the struct
clk is only created for once when clock driver registers the clock to
CCF in the first place.  The net change here is before commit
035a61c314eb the struct clk pointer is unique for given hardware
clock, while after the commit the pointers returned by clk lookup calls
become different for the same hardware clock.

That said, the struct clk pointer comparing in the code doesn't work any
more.  Call helper function clk_is_match() instead to fix the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agoclk: introduce clk_is_match
Michael Turquette [Wed, 25 Feb 2015 17:11:01 +0000 (09:11 -0800)]
clk: introduce clk_is_match

Some drivers compare struct clk pointers as a means of knowing
if the two pointers reference the same clock hardware. This behavior is
dubious (drivers must not dereference struct clk), but did not cause any
regressions until the per-user struct clk patch was merged. Now the test
for matching clk's will always fail with per-user struct clk's.

clk_is_match is introduced to fix the regression and prevent drivers
from comparing the pointers manually.

Fixes: 035a61c314eb ("clk: Make clk API return per-user struct clk instances")
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
[arnd@arndb.de: Fix COMMON_CLK=N && HAS_CLK=Y config]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[sboyd@codeaurora.org: const arguments to clk_is_match() and
remove unnecessary ternary operation]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agoclk: don't export static symbol
Julia Lawall [Wed, 11 Mar 2015 16:56:31 +0000 (17:56 +0100)]
clk: don't export static symbol

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL_GPL;
@@

-EXPORT_SYMBOL_GPL(f);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Fixes: 035a61c314eb "clk: Make clk API return per-user struct clk instances"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agoMerge branches 'next/soc', 'next/defconfig', 'next/dt', 'next/arm64', 'next/cleanup...
Arnd Bergmann [Wed, 11 Mar 2015 22:16:58 +0000 (23:16 +0100)]
Merge branches 'next/soc', 'next/defconfig', 'next/dt', 'next/arm64', 'next/cleanup', 'fixes' and 'next/multiplatform' into for-next

* next/soc:
  Documentation: arm: update supported Marvell EBU processors
  ARM: mvebu: add core support for Armada 39x
  devicetree: bindings: add new SMP enable method for Marvell Armada 39x
  devicetree: bindings: add DT binding for the Marvell Armada 39x SoC family

* next/defconfig:
  ARM: mvebu: enable Armada 39x in mvebu_v7_defconfig

* next/dt: (58 commits)
  ARM: BCM5301X: Fix default state of power LEDs on Netgear R6250
  ARM: BCM5301X: Add DT for Netgear R8000
  ARM: shmobile: ape6evm dts: Configure the custom switch as wake-up source
  ARM: shmobile: ape6evm dts: Enable pull-up for GPIO switches
  ARM: at91/dt: sama5d4: add ISI dt support
  ARM: at91/dt: sama5d4: add pwm0 device node
  ARM: at91/dt: sama5d4: add aes, sha and tdes nodes
  ARM: at91: dt: sama5d4ek: enable audio
  ARM: at91: dt: sama5d4ek: add and enable wm8904
  ARM: at91: dt: sama5d4ek: enable ssc0
  ARM: at91: dt: sama5d4: add ssc nodes
  ARM: at91/dt: sama5d4 xplained: add i2c0
  ARM: at91/dt: sama5d4: add dts for sama5d4 xplained board
  ARM: at91/dt: sama5d4: add #{address, size}_cells properties for macb0
  ARM: at91/dt: sama5d4ek: add leds in DT node
  ARM: at91/dt: add i2c1 declaration to sama5d4
  ARM: at91/dt: gpio-keys: address-cells and size-cells properties are not needed
  ARM: at91/dt: at91-sama5d3_xplained: add gpio-key pinctrl property
  ARM: at91/dt/trivial: correct file headers for SAMA5D3 SoC peripherals
  ARM: at91/dt: at91sam9n12ek: enable udp
  ...

* next/arm64:
  arm64: Add support for Spreadtrum's Sharkl64 Platform in Kconfig and defconfig
  arm64: dts: Add support for Spreadtrum SC9836 SoC in dts and Makefile
  ARM64: Add new Xilinx ZynqMP SoC

* next/cleanup:
  ARM: mvebu: add __initconst specifiers on DT_MACHINE_START dt_compat tables

* fixes: (36 commits)
  ARM: at91: pm_slowclock: fix the compilation error
  ARM: at91/dt: fix USB high-speed clock to select UTMI
  ARM: at91/dt: fix at91 udc compatible strings
  ARM: at91/dt: declare matrix node as a syscon device
  ARM: vexpress: update CONFIG_USB_ISP1760 option
  ARM: digicolor: add the machine directory to Makefile
  ARM: STi: Add STiH410 SoC support
  MAINTAINERS: add Freescale Vybrid SoC
  MAINTAINERS: Remove self as ARM mach-bcm co-maintainer
  ARM: imx6sl-evk: set swbst_reg as vbus's parent reg
  ARM: imx6qdl-sabresd: set swbst_reg as vbus's parent reg
  ARM: at91/dt: at91sam9261: fix clocks and clock-names in udc definition
  ARM: OMAP2+: Fix wl12xx on dm3730-evm with mainline u-boot
  ARM: OMAP: enable TWL4030_USB in omap2plus_defconfig
  ARM: dts: dra7x-evm: avoid possible contention while muxing on CAN lines
  ARM: dts: dra7x-evm: Don't use dcan1_rx.gpio1_15 in DCAN pinctrl
  ARM: dts: am43xx: fix SLEWCTRL_FAST pinctrl binding
  ARM: dts: am33xx: fix SLEWCTRL_FAST pinctrl binding
  ARM: dts: OMAP5: fix polling intervals for thermal zones
  ARM: dts: am335x-lxm: Use rmii-clock-ext
  ...

* next/multiplatform:
  ARM: shmobile: r8a7778: enable multiplatform target
  ARM: shmobile: bockw: add sound to DT
  ARM: shmobile: r8a7778: add sound to DT
  ARM: shmobile: bockw: add devices hooked up to i2c0 to DT
  DT: i2c: add trivial binding for OKI ML86V7667 video decoder
  ARM: shmobile: r8a7778: common clock framework CPG driver
  ARM: shmobile: bockw dts: set extal clock frequency
  ARM: shmobile: bockw dts: Move Ethernet node to BSC
  ARM: shmobile: r8a7778 dtsi: Add Bus State Controller node
  ARM: shmobile: bockw: add USB, VIN pin descriptions to DT
  ARM: shmobile: r8a7778: add internal ethernet controller to DT
  ARM: shmobile: r8a7778: add MSTP clock assignments to DT
  ARM: shmobile: r8a7778: implement SoC and board CCF support
  ARM: shmobile: r8a7778: Common clock framework DT description
  ARM: shmobile: r8a7778: add CPG register bits header
  ARM: shmobile: r8a7778: synchronize dts with reference platform

9 years agoMerge tag 'mvebu-soc-4.1' of git://git.infradead.org/linux-mvebu into next/soc
Arnd Bergmann [Wed, 11 Mar 2015 22:14:28 +0000 (23:14 +0100)]
Merge tag 'mvebu-soc-4.1' of git://git.infradead.org/linux-mvebu into next/soc

Pull "mvebu soc changes for v4.1 (part #1)" from Gregory CLEMENT:

- Add support for a new SoC: Armada 39x

* tag 'mvebu-soc-4.1' of git://git.infradead.org/linux-mvebu:
  Documentation: arm: update supported Marvell EBU processors
  ARM: mvebu: add core support for Armada 39x
  devicetree: bindings: add new SMP enable method for Marvell Armada 39x
  devicetree: bindings: add DT binding for the Marvell Armada 39x SoC family

9 years agoMerge tag 'mvebu-defconfig-4.1' of git://git.infradead.org/linux-mvebu into next...
Arnd Bergmann [Wed, 11 Mar 2015 22:09:05 +0000 (23:09 +0100)]
Merge tag 'mvebu-defconfig-4.1' of git://git.infradead.org/linux-mvebu into next/defconfig

Pull "mvebu defconfig changes for v4.1 (part #1)" from Gregory CLEMENT:

- add the new Armada 39x SoC in mvebu_v7_defconfig

* tag 'mvebu-defconfig-4.1' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: enable Armada 39x in mvebu_v7_defconfig

9 years agoMerge tag 'mvebu-cleanup-4.1' of git://git.infradead.org/linux-mvebu into next/cleanup
Arnd Bergmann [Wed, 11 Mar 2015 22:02:22 +0000 (23:02 +0100)]
Merge tag 'mvebu-cleanup-4.1' of git://git.infradead.org/linux-mvebu into next/cleanup

Pull "mvebu clean-up changes for v4.1 (part #1)" from Gregory CLEMENT:

- Constify the dt_compat table in DT_MACHINE_START

* tag 'mvebu-cleanup-4.1' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: add __initconst specifiers on DT_MACHINE_START dt_compat tables

9 years agoarm64: Add support for Spreadtrum's Sharkl64 Platform in Kconfig and defconfig
Zhizhou Zhang [Wed, 11 Mar 2015 02:27:08 +0000 (02:27 +0000)]
arm64: Add support for Spreadtrum's Sharkl64 Platform in Kconfig and defconfig

Adds support for Spreadtrum's SoC Platform in the arm64 Kconfig and
defconfig files.

Signed-off-by: Zhizhou Zhang <zhizhou.zhang@spreadtrum.com>
Signed-off-by: Orson Zhai <orson.zhai@spreadtrum.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
9 years agoarm64: dts: Add support for Spreadtrum SC9836 SoC in dts and Makefile
Zhizhou Zhang [Wed, 11 Mar 2015 02:27:08 +0000 (02:27 +0000)]
arm64: dts: Add support for Spreadtrum SC9836 SoC in dts and Makefile

Adds the device tree support for Spreadtrum SC9836 SoC which is based on
Sharkl64 platform.

Sharkl64 platform contains the common nodes of Spreadtrum's arm64-based SoCs.

Signed-off-by: Zhizhou Zhang <zhizhou.zhang@spreadtrum.com>
Signed-off-by: Orson Zhai <orson.zhai@spreadtrum.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM64: Add new Xilinx ZynqMP SoC
Michal Simek [Mon, 9 Mar 2015 08:41:04 +0000 (09:41 +0100)]
ARM64: Add new Xilinx ZynqMP SoC

Initial version of device tree for Xilinx ZynqMP SoC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'renesas-dt2-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Wed, 11 Mar 2015 21:54:57 +0000 (22:54 +0100)]
Merge tag 'renesas-dt2-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt

Pull "Second Round of Renesas ARM Based SoC DT Updates for v4.1" from Simon Horman:

* ape6evm board
  - Configure GPIO keys as wake-up source
  - Enable pull-up for GPIO switches
  - Correct polarity of LEDs
* r8a7791 SoC
  - Correct IPMMU-GP clock to device tree
* r8a7794 SoC
  - Correct ethernet controller PHY IRQ
* lager, koelsch and marzen boards
  - Add DU external pixel clock to DT
* lager board
  - Add HDMI output support to DT
* r8a7791 and r8a7790 SoCs
  - Tidy up SDHI register size in DT
  - Reference DMA channels for SDHI in DT

* tag 'renesas-dt2-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: ape6evm dts: Configure the custom switch as wake-up source
  ARM: shmobile: ape6evm dts: Enable pull-up for GPIO switches
  ARM: shmobile: r8a7791: Fix IPMMU-GP clock to device tree
  ARM: shmobile: r8a7794: alt: Fix ethernet controller PHY IRQ line
  ARM: shmobile: lager: Add DU external pixel clocks to DT
  ARM: shmobile: koelsch: Add DU external pixel clocks to DT
  ARM: shmobile: marzen: Add DU external pixel clock to DT
  ARM: shmobile: ape6evm dts: Fix polarity of LEDs
  ARM: shmobile: lager: Add DU HDMI output support
  ARM: shmobile: r8a7791: Fix HSUSB clock to hp_clk from mp_clk
  ARM: shmobile: r8a7790: Fix HSUSB clock to hp_clk from mp_clk
  ARM: shmobile: r8a7791: tidyup SDHI register size on DTSI
  ARM: shmobile: r8a7790: tidyup SDHI register size on DTSI
  ARM: shmobile: r8a7791: Reference DMA channels in SDHI DT nodes
  ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes

9 years agoMerge tag 'mvebu-dt-4.1' of git://git.infradead.org/linux-mvebu into next/dt
Arnd Bergmann [Wed, 11 Mar 2015 21:53:16 +0000 (22:53 +0100)]
Merge tag 'mvebu-dt-4.1' of git://git.infradead.org/linux-mvebu into next/dt

Pull "mvebu dt changes for v4.1 (part #1)" from Gregory CLEMENT:

- fix SDHCI nodes on Armada 38x
- add Linksys WRT1900AC (Mamba) support (including the Ethernet switch)
- add several fixes and improvement for dove
- enable GPIO fan alarm support for 2Big Network v2
- add several fixes about unit address
- add support for Armada 39x SoC and board

* tag 'mvebu-dt-4.1' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: add Device Tree files for Armada 39x SoC and board
  ARM: mvebu: fix unit address of MPIC nodes
  ARM: mvebu: use stdout-path in all armada-*.dts
  ARM: mvebu: add serial port aliases on Armada 370/375/38x/XP
  ARM: mvebu: remove aliases for Ethernet devices on Armada 370/375/38x/XP
  ARM: mvebu: add UART labels to Armada 375
  ARM: mvebu: add missing UART labels on Armada 38x
  ARM: mvebu: fix usb@ unit address on Armada 38x to match register address
  ARM: mvebu: a385-db-ap: Enable the NAND
  ARM: ARMADA XP: WRT1900AC: Add support for the Ethernet switch
  ARM: Kirkwood: enable GPIO fan alarm support for 2Big Network v2
  ARM: mvebu: Fix MPIC unit address
  ARM: dts: dove: Add some more common pinctrl settings
  ARM: dts: dove: Add node labels for PCIe ports 0 and 1
  ARM: dts: dove: Always include gpio and interrupt-controller headers
  ARM: dts: dove: Fix uart[23] reg property
  ARM: mvebu: add Linksys WRT1900AC (Mamba) support
  ARM: mvebu: Add Device Tree description of SDHCI for Armada 388 RD
  ARM: mvebu: Update the SDHCI node on Armada 38x
  ARM: mvebu: Use macros for interrupt flags on Armada 38x sdhci node

9 years agoMerge tag 'arm-soc/for-4.1/devicetree' of http://github.com/broadcom/stblinux into...
Arnd Bergmann [Wed, 11 Mar 2015 21:51:11 +0000 (22:51 +0100)]
Merge tag 'arm-soc/for-4.1/devicetree' of http://github.com/broadcom/stblinux into next/dt

Pull "Broadcom Device Tree changes for 4.1 #1" from Florian Fainelli:

This pull request contains the following Broadcom SoCs Device Tree changes:

- Jonathan adds support for the Broadcom Cygnus BCM958305K board

- Rafal adds support for Netgear R8000 and fixes the default for power LEDs
  on Netgear R6250

* tag 'arm-soc/for-4.1/devicetree' of http://github.com/broadcom/stblinux:
  ARM: BCM5301X: Fix default state of power LEDs on Netgear R6250
  ARM: BCM5301X: Add DT for Netgear R8000
  ARM: dts: Enable Broadcom Cygnus BCM958305K

9 years agoMerge tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
Arnd Bergmann [Wed, 11 Mar 2015 21:48:55 +0000 (22:48 +0100)]
Merge tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/dt

Pull "First batch of DT changes for 4.1" into next/dt:

- at91sam9x5 & EK board: ISI and camera sensors
- at91sam9n12 & EK board: USB gadget nodes
- sama5d3: typos, gpio-keys on Xplained board
- sama5d4: i2c, leds, audio, ISI, crypto, pwm missing nodes
- new sama5d4 xplained board

* tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: (31 commits)
  ARM: at91/dt: sama5d4: add ISI dt support
  ARM: at91/dt: sama5d4: add pwm0 device node
  ARM: at91/dt: sama5d4: add aes, sha and tdes nodes
  ARM: at91: dt: sama5d4ek: enable audio
  ARM: at91: dt: sama5d4ek: add and enable wm8904
  ARM: at91: dt: sama5d4ek: enable ssc0
  ARM: at91: dt: sama5d4: add ssc nodes
  ARM: at91/dt: sama5d4 xplained: add i2c0
  ARM: at91/dt: sama5d4: add dts for sama5d4 xplained board
  ARM: at91/dt: sama5d4: add #{address, size}_cells properties for macb0
  ARM: at91/dt: sama5d4ek: add leds in DT node
  ARM: at91/dt: add i2c1 declaration to sama5d4
  ARM: at91/dt: gpio-keys: address-cells and size-cells properties are not needed
  ARM: at91/dt: at91-sama5d3_xplained: add gpio-key pinctrl property
  ARM: at91/dt/trivial: correct file headers for SAMA5D3 SoC peripherals
  ARM: at91/dt: at91sam9n12ek: enable udp
  ARM: at91/dt: at91sam9n12: add udp device node
  ARM: at91: at91sam9g25ek/dts: enable ISI and ov2640
  ARM: at91: at91sam9x5ek/dts: add ov2640 support
  ARM: at91: at91sam9x5/dts: add ISI dt support, include isi node, pinctrls
  ...

9 years agoRevert "cpupower Makefile change to help run the tool without 'make install'"
Josh Boyer [Wed, 11 Mar 2015 00:26:36 +0000 (20:26 -0400)]
Revert "cpupower Makefile change to help run the tool without 'make install'"

This reverts commit 5c1de006e8e66b0be05be422416629e344c71652.

While the original commit makes it easier to run cpupower from the
local build directory, it also leaves the binary with a rather poor
rpath of './' in it after it is installed on a system via 'make install'.

This is considered bad practice and can cause cpupower to fail in
rpmbuild with the following error:

ERROR   0004: file '/usr/bin/cpupower' contains an insecure rpath './' in [./]
error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
    Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)

Developers should be able to use LD_LIBRARY_PATH to achieve the same
effect and not introduce rpath into the binary.

Signed-off-by: Josh Boyer <jwboyer@feoraproject.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
9 years agosoc: qcom: gsbi: Add support for ADM CRCI muxing
Andy Gross [Mon, 9 Feb 2015 22:01:06 +0000 (16:01 -0600)]
soc: qcom: gsbi: Add support for ADM CRCI muxing

This patch adds automatic configuration for the ADM CRCI muxing required to
support DMA operations for GSBI clients.  The GSBI mode and instance determine
the correct TCSR ADM CRCI MUX value that must be programmed so that the DMA
works properly.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agofirmware: qcom: scm: Support cpu power down through SCM
Lina Iyer [Mon, 2 Mar 2015 23:30:30 +0000 (16:30 -0700)]
firmware: qcom: scm: Support cpu power down through SCM

Support powering down the calling cpu, by trapping into SCM. This
termination function triggers the ARM cpu to execute WFI instruction,
causing the power controller to safely power the cpu down.

Caches may be flushed before powering down the cpu. If cache controller
is set to turn off when the cpu is powered down, then the flags argument
indicates to the secure mode to flush its cache lines before executing
WFI.The warm boot reset address for the cpu should be set before the
calling into this function for the cpu to resume.

The original code for the qcom_scm_call_atomic1() comes from a patch by
Stephen Boyd [1]. The function scm_call_atomic1() has been cherry picked
and renamed to match the convention used in this file. Since there are
no users of scm_call_atomic2(), the function is not included.

[1]. https://lkml.org/lkml/2014/8/4/765

Signed-off-by: Stephen Boyd <sboyd@codeauraro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agofirmware: qcom: scm: Add qcom_scm_set_warm_boot_addr function
Lina Iyer [Mon, 2 Mar 2015 23:30:29 +0000 (16:30 -0700)]
firmware: qcom: scm: Add qcom_scm_set_warm_boot_addr function

A core can be powered down for cpuidle or when it is hotplugged off. In
either case, the warmboot return address would be different. Allow
setting the warmboot address for a specific cpu, optimize and write to
the firmware, if the address is different than the previously set
address.

Export qcom_scm_set_warm_boot_addr function move the warm boot flags to
implementation.

Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agofirmware: qcom: scm: Clean cold boot entry to export only the API
Lina Iyer [Mon, 2 Mar 2015 23:30:28 +0000 (16:30 -0700)]
firmware: qcom: scm: Clean cold boot entry to export only the API

We dont need to export the SCM specific cold boot flags to the platform
code. Export only a function to set the cold boot address.

Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agoMerge tag 'renesas-r8a7778-ccf-and-multiplatform-for-v4.1' of git://git.kernel.org...
Arnd Bergmann [Wed, 11 Mar 2015 20:14:55 +0000 (21:14 +0100)]
Merge tag 'renesas-r8a7778-ccf-and-multiplatform-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/multiplatform

Pull "Renesas ARM Based SoC r8a7778 CCF and Multiplatform Updates
for v4.1" from Simon Horman:

* Add CCF and them multiplatform support to r8a7778 SoC and its
  bockw board.

* tag 'renesas-r8a7778-ccf-and-multiplatform-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (21 commits)
  ARM: shmobile: r8a7778: enable multiplatform target
  ARM: shmobile: bockw: add sound to DT
  ARM: shmobile: r8a7778: add sound to DT
  ARM: shmobile: bockw: add devices hooked up to i2c0 to DT
  DT: i2c: add trivial binding for OKI ML86V7667 video decoder
  ARM: shmobile: r8a7778: common clock framework CPG driver
  ARM: shmobile: bockw dts: set extal clock frequency
  ARM: shmobile: bockw dts: Move Ethernet node to BSC
  ARM: shmobile: r8a7778 dtsi: Add Bus State Controller node
  ARM: shmobile: bockw: add USB, VIN pin descriptions to DT
  ARM: shmobile: r8a7778: add internal ethernet controller to DT
  ARM: shmobile: r8a7778: add MSTP clock assignments to DT
  ARM: shmobile: r8a7778: implement SoC and board CCF support
  ARM: shmobile: r8a7778: Common clock framework DT description
  ARM: shmobile: r8a7778: add CPG register bits header
  ARM: shmobile: r8a7778: synchronize dts with reference platform
  drivers: bus: Add Simple Power-Managed Bus Driver
  drivers: bus: Add Renesas Bus State Controller (BSC) DT Bindings
  drivers: bus: Add Simple Power-Managed Bus DT Bindings
  drivers: bus: Sort Makefile entries alphabetically
  ...

9 years agofirmware: qcom: scm: Move the scm driver to drivers/firmware
Kumar Gala [Thu, 26 Feb 2015 21:49:09 +0000 (15:49 -0600)]
firmware: qcom: scm: Move the scm driver to drivers/firmware

Architectural changes in the ARM Linux kernel tree mandate the eventual
removal of the mach-* directories. Move the scm driver to
drivers/firmware and the scm header to include/linux to support that
removal.

Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agoARM: qcom: Prep scm code for move to drivers/firmware
Kumar Gala [Wed, 4 Feb 2015 22:30:46 +0000 (16:30 -0600)]
ARM: qcom: Prep scm code for move to drivers/firmware

Add qcom prefix to functions, etc to create a unique name space for the
scm code as it gets ready to move out of qcom specific mach dir.

Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agoARM: qcom: Cleanup scm interface to only export what is needed
Kumar Gala [Wed, 4 Feb 2015 22:10:13 +0000 (16:10 -0600)]
ARM: qcom: Cleanup scm interface to only export what is needed

Now that scom boot interface is merged we don't need export scm_call
anymore.  Some other minor cleanups related to boot interface to only
export what is needed by scm_set_boot_addr().

Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agoARM: qcom: Merge scm and scm boot code together
Kumar Gala [Wed, 4 Feb 2015 21:46:04 +0000 (15:46 -0600)]
ARM: qcom: Merge scm and scm boot code together

Put all scm related code into a single file as a first step in cleaning
up the scm interface to just expose functional behavior insteam of making
direct scm calls.

Signed-off-by: Kumar Gala <galak@codeaurora.org>
9 years agoMerge tag 'at91-fixes3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
Arnd Bergmann [Wed, 11 Mar 2015 19:46:52 +0000 (20:46 +0100)]
Merge tag 'at91-fixes3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes

Pull "Third fixes batch for AT91 on 4.0" from Nicolas Ferre:
- clock fixes for USB
- compatible string changes for handling USB IP differences
  (+ needed AHB matrix syscon)
- fix of a compilation error in PM code

* tag 'at91-fixes3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91: pm_slowclock: fix the compilation error
  ARM: at91/dt: fix USB high-speed clock to select UTMI
  ARM: at91/dt: fix at91 udc compatible strings
  ARM: at91/dt: declare matrix node as a syscon device
  ARM: at91/dt: at91sam9261: fix clocks and clock-names in udc definition

9 years agodrm/vmwgfx: Fix an issue with the device losing its irq line on module unload
Thomas Hellstrom [Tue, 10 Mar 2015 18:07:40 +0000 (11:07 -0700)]
drm/vmwgfx: Fix an issue with the device losing its irq line on module unload

Starting with commit b4b55cda5874
("x86/PCI: Refine the way to release PCI IRQ resources")

the device lost its irq resource on module unload. While that's ok and
apparently intentional, the driver never got the resource back on module load

The code apparently wants drivers to disable the pci device at pci device
driver removal, so lets do that. That fixes the issue.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agodrm/vmwgfx: Correctly NULLify dma buffer pointer on failure
Colin Ian King [Thu, 22 Jan 2015 15:17:07 +0000 (15:17 +0000)]
drm/vmwgfx: Correctly NULLify dma buffer pointer on failure

cppcheck on lines 917 and 977 show an ineffective assignment
to the dma buffer pointer:

[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:917]:
[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:977]:
  (warning) Assignment of function parameter has no effect
  outside the function. Did you forget dereferencing it?

On a successful DMA buffer lookup, the dma buffer pointer is
assigned, however, on failure it currently is left in an
undefined state.

The original intention in the error exit path was to nullify
the pointer on an error (which the original code failed to
do properly). This patch fixes this also ensures all failure
paths nullify the buffer pointer on the error return.

Fortunately the callers to vmw_translate_mob_ptr and
vmw_translate_guest_ptr are checking on a return status and not
on the dma buffer pointer, so the original code worked.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
9 years agodrm/vmwgfx: Reorder device takedown somewhat
Thomas Hellstrom [Thu, 5 Mar 2015 10:33:24 +0000 (02:33 -0800)]
drm/vmwgfx: Reorder device takedown somewhat

To take down the MOB and GMR memory types, the driver may have to issue
fence objects and thus make sure that the fence manager is taken down
after those memory types.
Reorder device init accordingly.

Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
9 years agodrm/vmwgfx: Fix a couple of lock dependency violations
Thomas Hellstrom [Mon, 9 Mar 2015 08:56:21 +0000 (01:56 -0700)]
drm/vmwgfx: Fix a couple of lock dependency violations

Experimental lockdep annotation added to the TTM lock has unveiled a
couple of lock dependency violations in the vmwgfx driver. In both
cases it turns out that the device_private::reservation_sem is not
needed so the offending code is moved out of that lock.

Cc: <stable@vger.kernel.org>
Acked-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
9 years agoselftests/exec: Check if the syscall exists and bail if not
Michael Ellerman [Tue, 3 Feb 2015 03:53:08 +0000 (14:53 +1100)]
selftests/exec: Check if the syscall exists and bail if not

On systems which don't implement sys_execveat(), this test produces a
lot of output.

Add a check at the beginning to see if the syscall is present, and if
not just note one error and return.

When we run on a system that doesn't implement the syscall we will get
ENOSYS back from the kernel, so change the logic that handles
__NR_execveat not being defined to also use ENOSYS rather than -ENOSYS.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: David Drysdale <drysdale@google.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
9 years agoALSA: hda - Fix built-in mic on Compaq Presario CQ60
Takashi Iwai [Wed, 11 Mar 2015 15:05:19 +0000 (16:05 +0100)]
ALSA: hda - Fix built-in mic on Compaq Presario CQ60

Compaq Presario CQ60 laptop with CX20561 gives a wrong pin for the
built-in mic NID 0x17 instead of NID 0x1d, and it results in the
non-working mic.  This patch just remaps the pin correctly via fixup.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=920604
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoARM: at91: pm_slowclock: fix the compilation error
Wenyou Yang [Wed, 11 Mar 2015 02:08:12 +0000 (10:08 +0800)]
ARM: at91: pm_slowclock: fix the compilation error

When compiling the kernel in thumb2 (CONFIG_THUMB2_KERNEL option activated), we
hit a compilation crash. The error message is listed below:

---8< -----
Error: cannot use register index with PC-relative addressing -- `str r0,.saved_lpr'
--->8----

Add the .arm directive in the assembly files related to power management.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
9 years agoARM: at91/dt: fix USB high-speed clock to select UTMI
Nicolas Ferre [Mon, 9 Mar 2015 15:51:13 +0000 (16:51 +0100)]
ARM: at91/dt: fix USB high-speed clock to select UTMI

The UTMI clock must be selected by any high-speed USB IP. The logic behind it
needs this particular clock.
So, correct the clock in the device tree files affected.

Reported-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: <stable@vger.kernel.org> #3.18
9 years agoARM: at91/dt: fix at91 udc compatible strings
Boris Brezillon [Wed, 3 Dec 2014 11:32:10 +0000 (12:32 +0100)]
ARM: at91/dt: fix at91 udc compatible strings

The at91rm9200, at91sam9260, at91sam9261 and at91sam9263 SoCs have slightly
different UDC IPs.
Those differences were previously handled with cpu_is_at91xx macro which
are about to be dropped for multi-platform support, thus we need to
change compatible strings.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
9 years agoARM: at91/dt: declare matrix node as a syscon device
Boris Brezillon [Wed, 3 Dec 2014 11:32:09 +0000 (12:32 +0100)]
ARM: at91/dt: declare matrix node as a syscon device

There is no specific driver handling the AHB matrix, this is a simple syscon
device. the matrix is needed by several other drivers including the USB on some
SoCs (at91sam9261 for instance).
Without this definition, the USB will not work on these SoCs.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
9 years agoMerge tag 'imx-fixes-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Arnd Bergmann [Wed, 11 Mar 2015 14:38:11 +0000 (15:38 +0100)]
Merge tag 'imx-fixes-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

Pull "The i.MX fixes for 4.0" from Shawn Guo:

It includes a couple of i.MX6 dts fixes, which set an input supply to
vbus regulator.  Without the fixes, the voltage of vbus is incorrect
after system boots up.

* tag 'imx-fixes-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx6sl-evk: set swbst_reg as vbus's parent reg
  ARM: imx6qdl-sabresd: set swbst_reg as vbus's parent reg

9 years agoARM: vexpress: update CONFIG_USB_ISP1760 option
Sudeep Holla [Mon, 9 Mar 2015 18:27:49 +0000 (18:27 +0000)]
ARM: vexpress: update CONFIG_USB_ISP1760 option

Commit 7ef077a8ad35 ("usb: isp1760: Move driver from drivers/usb/host/
to drivers/usb/isp1760/") moved the isp1760 driver and changed the
Kconfig option. This makes CONFIG_USB_ISP1760_HCD not selectable
directly anymore. This results in driver being not compiled in when
using vexpress_defconfig and the USB is non-functional.

This patch updates the CONFIG_USB_ISP1760_HCD to CONFIG_USB_ISP1760 to
get back USB functional on vexpress platforms.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM: digicolor: add the machine directory to Makefile
Baruch Siach [Mon, 9 Mar 2015 09:05:14 +0000 (11:05 +0200)]
ARM: digicolor: add the machine directory to Makefile

Make the digicolor specific DT_MACHINE_START entry visible.

Fixes: df8d742e929 (ARM: initial support for Conexant Digicolor CX92755 SoC)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'fixes-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
Arnd Bergmann [Wed, 11 Mar 2015 14:35:28 +0000 (15:35 +0100)]
Merge tag 'fixes-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Pull "omap fixes against v4.0-rc2" from Tony Lindgren:

Fixes for various omap variants, mostly minor fixes for various SoCs
with the bigger changes being for the dra7 clocks and hwmod data:

- Fix wl12xx for dm3730-evm

- Fix omap4 prm save and clea

- Fix hwmod clkdm use count

- Fix hwmod data for pcie on dra7

- Fix lockdep for hwmod

- Fix USB on most omap3 boars by enabling it in the defconfig

- Fix the bypass clock source for omap5 and dra7

- Fix the ehrpwm clock for am33xx and am43xx

- Enable AES and SHAM for BeagleBone white

- Use rmii clock for am335x-lxm

- Fix polling intervals for omap5 thermal zones

- Fix slewctrl for am33xx and am43xx

- Fix dra7-evm dcan pinctrl

* tag 'fixes-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix wl12xx on dm3730-evm with mainline u-boot
  ARM: OMAP: enable TWL4030_USB in omap2plus_defconfig
  ARM: dts: dra7x-evm: avoid possible contention while muxing on CAN lines
  ARM: dts: dra7x-evm: Don't use dcan1_rx.gpio1_15 in DCAN pinctrl
  ARM: dts: am43xx: fix SLEWCTRL_FAST pinctrl binding
  ARM: dts: am33xx: fix SLEWCTRL_FAST pinctrl binding
  ARM: dts: OMAP5: fix polling intervals for thermal zones
  ARM: dts: am335x-lxm: Use rmii-clock-ext
  ARM: dts: am335x-bone-common: enable aes and sham
  ARM: dts: am43xx-clocks: Fix ehrpwm tbclk data on am43xx
  ARM: dts: am33xx-clocks: Fix ehrpwm tbclk data on am33xx
  ARM: dts: OMAP5: Fix the bypass clock source for dpll_iva and others
  ARM: dts: DRA7x: Fix the bypass clock source for dpll_iva and others
  ARM: OMAP4+: PRM: fix omap4 version of prm_save_and_clear_irqen
  ARM: OMAP2+: hwmod: fix deassert hardreset clkdm usecounting
  ARM: DRA7: hwmod_data: Fix hwmod data for pcie
  ARM: omap2+: omap_hwmod: Set unique lock_class_key per hwmod

9 years agoARM: STi: Add STiH410 SoC support
Fabrice GASNIER [Thu, 5 Mar 2015 15:53:54 +0000 (16:53 +0100)]
ARM: STi: Add STiH410 SoC support

This patch adds support to STiH410 SoC.

Please note "st,stih410" is already present in device tree.
The problem is that it is missing the entry in the match table,
and so the L2 cache and other cpus than 0 don't get initialized.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Tested-by: Maxime Coquelin <maxime.coquelin@st.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoxen-pciback: limit guest control of command register
Jan Beulich [Wed, 11 Mar 2015 13:51:17 +0000 (13:51 +0000)]
xen-pciback: limit guest control of command register

Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal to the
host.

Note that to alter any of the bits collected together as
PCI_COMMAND_GUEST permissive mode is now required to be enabled
globally or on the specific device.

This is CVE-2015-2150 / XSA-120.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
9 years agoMerge tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
Arnd Bergmann [Wed, 11 Mar 2015 14:33:41 +0000 (15:33 +0100)]
Merge tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes

Pull "Second fixes batch for AT91 on 4.0" from Nicolas Ferre:

- little fix for !MMU debug: may also help for randconfig
- fix of 2 errors in LCD clock definitions
- in PM code, not writing the key leads to not execute the action

* tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91/pm: MOR register KEY was missing
  ARM: at91/dt: sama5d4: fix lcdck clock definition
  ARM: at91/dt: sama5d4: rename lcd_clk into lcdc_clk
  ARM: at91: debug: fix non MMU debug

9 years agoMerge tag 'socfpga_fixes_for_v4.0' of git://git.rocketboards.org/linux-socfpga-next...
Arnd Bergmann [Wed, 11 Mar 2015 14:31:27 +0000 (15:31 +0100)]
Merge tag 'socfpga_fixes_for_v4.0' of git://git.rocketboards.org/linux-socfpga-next into fixes

Pull "Fixes for v4.0 on the SoCFPGA platform" from Dinh Nguyen:

- Fix the SCU virtual mapping
- Add misssing DMA channels for UART nodes
- Fix a sporadic SMP error where CPU1 was not seeing its start address

* tag 'socfpga_fixes_for_v4.0' of git://git.rocketboards.org/linux-socfpga-next:
  ARM: socfpga: make sure socfpga_cpu1start_addr is properly flushed
  ARM: socfpga: fix uart DMA binding error
  ARM: socfpga: Correct SCU virtual mapping in socfpga

9 years agoMAINTAINERS: add Freescale Vybrid SoC
Stefan Agner [Sun, 1 Mar 2015 23:09:02 +0000 (00:09 +0100)]
MAINTAINERS: add Freescale Vybrid SoC

Add Freescale Vybrid family as a own entry, along with an entry for
the so far orphan Vybrid device tree files. Also add myself as
a designated reviewer.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMAINTAINERS: Remove self as ARM mach-bcm co-maintainer
Matt Porter [Tue, 17 Feb 2015 17:17:57 +0000 (12:17 -0500)]
MAINTAINERS: Remove self as ARM mach-bcm co-maintainer

Removing myself as a co-maintainer.

Signed-off-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agodrm/radeon: drop setting UPLL to sleep mode
Christian König [Thu, 19 Feb 2015 08:40:28 +0000 (09:40 +0100)]
drm/radeon: drop setting UPLL to sleep mode

Just keep it working, seems to fix some PLL problems.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73378

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
9 years agodrm/radeon: fix wait to actually occur after the signaling callback
Maarten Lankhorst [Tue, 3 Mar 2015 08:56:42 +0000 (09:56 +0100)]
drm/radeon: fix wait to actually occur after the signaling callback

A normal wait adds to the front of the tail. By doing something
similar to fence_default_wait the fence code can run without racing.

This is a complete fix for "panic on suspend from KDE with radeon",
and a partial fix for "Radeon: System pauses on TAHITI". On tahiti
si_irq_set needs to be fixed too, to completely flush the writes
before radeon_fence_activity is called in radeon_fence_enable_signaling.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=90741
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=90861
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Reported-by: Jon Arne Jørgensen <jonjon.arnearne@gmail.com>
Reported-and-tested-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Cc: stable@vger.kernel.org (v3.18+)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoARM: imx6sl-evk: set swbst_reg as vbus's parent reg
Peter Chen [Fri, 6 Mar 2015 08:04:21 +0000 (16:04 +0800)]
ARM: imx6sl-evk: set swbst_reg as vbus's parent reg

USB vbus 5V is from PMIC SWBST, so set swbst_reg as vbus's
parent reg, it fixed a bug that the voltage of vbus is incorrect
due to swbst_reg is disabled after boots up.

Cc: stable@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
9 years agoARM: imx6qdl-sabresd: set swbst_reg as vbus's parent reg
Peter Chen [Fri, 6 Mar 2015 08:04:20 +0000 (16:04 +0800)]
ARM: imx6qdl-sabresd: set swbst_reg as vbus's parent reg

USB vbus 5V is from PMIC SWBST, so set swbst_reg as vbus's
parent reg, it fixed a bug that the voltage of vbus is incorrect
due to swbst_reg is disabled after boots up.

Cc: stable@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
9 years agoARM: shmobile: lager: Add da9063 PMIC device node for system restart
Geert Uytterhoeven [Mon, 9 Mar 2015 20:06:57 +0000 (21:06 +0100)]
ARM: shmobile: lager: Add da9063 PMIC device node for system restart

Add a device node for the da9063 PMIC, with subnodes for rtc and wdt.
Regulator support is not yet included.

This allows the system to be restarted when the watchdog timer times
out, or when a system restart is requested.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager dts: Add da9210 regulator interrupt
Geert Uytterhoeven [Mon, 9 Mar 2015 20:06:56 +0000 (21:06 +0100)]
ARM: shmobile: lager dts: Add da9210 regulator interrupt

The da9210 regulator is connected to IRQ2. Reflect this in its device
node, so the driver can use it when it gains interrupt support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Add da9063 PMIC device node for system restart
Geert Uytterhoeven [Mon, 9 Mar 2015 20:06:55 +0000 (21:06 +0100)]
ARM: shmobile: koelsch: Add da9063 PMIC device node for system restart

Add a device node for the da9063 PMIC, with subnodes for rtc and wdt.
Regulator support is not yet included.

This allows the system to be restarted when the watchdog timer times
out, or when a system restart is requested.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch dts: Add da9210 regulator interrupt
Geert Uytterhoeven [Mon, 9 Mar 2015 20:06:54 +0000 (21:06 +0100)]
ARM: shmobile: koelsch dts: Add da9210 regulator interrupt

The da9210 regulator is connected to IRQ2. Reflect this in its device
node, so the driver can use it when it gains interrupt support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: R-Car Gen2: Add da9063/da9210 regulator quirk
Geert Uytterhoeven [Mon, 9 Mar 2015 19:50:40 +0000 (20:50 +0100)]
ARM: shmobile: R-Car Gen2: Add da9063/da9210 regulator quirk

The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
da9210 regulators.  Both regulators have their interrupt request lines
tied to the same interrupt pin (IRQ2) on the SoC.

After cold boot or da9063-induced restart, both the da9063 and da9210
seem to assert their interrupt request lines.  Hence as soon as one
driver requests this irq, it gets stuck in an interrupt storm, as it
only manages to deassert its own interrupt request line, and the other
driver hasn't installed an interrupt handler yet.

To handle this, install a quirk that masks the interrupts in both the
da9063 and da9210.  This quirk has to run after the i2c master driver
has been initialized, but before the i2c slave drivers are initialized.
As it depends on i2c, select I2C if one of the affected platforms is
enabled in the kernel config.

On koelsch, the following happens:

  - Cold boot or reboot using the da9063 restart handler:

IRQ2 is asserted, installing da9063/da9210 regulator quirk
...
i2c i2c-6: regulator_quirk_notify: 1, IRQC_MONITOR = 0x3fb
i2c 6-0058: regulator_quirk_notify: 1, IRQC_MONITOR = 0x3fb
i2c 6-0058: Detected da9063
i2c 6-0058: Masking da9063 interrupt sources
i2c 6-0068: regulator_quirk_notify: 1, IRQC_MONITOR = 0x3fb
i2c 6-0068: Detected da9210
i2c 6-0068: Masking da9210 interrupt sources
i2c 6-0068: IRQ2 is not asserted, removing quirk

  - Warm boot (reset button):

rcar_gen2_regulator_quirk: IRQ2 is not asserted, not installing quirk

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoMerge tag 'for-linus-20150310' of git://git.infradead.org/linux-mtd
Linus Torvalds [Wed, 11 Mar 2015 00:44:34 +0000 (17:44 -0700)]
Merge tag 'for-linus-20150310' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:

 * pxa3xx_nand
   - fix timeout issues when draining the FIFO (BCH only)
   - don't crash when no chip-selects are used

 * hisi504_nand
   - depend on HAS_DMA, to fix compile errors

* tag 'for-linus-20150310' of git://git.infradead.org/linux-mtd:
  mtd: nand: MTD_NAND_HISI504 should depend on HAS_DMA
  mtd: pxa3xx_nand: fix driver when num_cs is 0
  mtd: nand: pxa3xx: Fix PIO FIFO draining

9 years agoMerge tag 'iommu-fixes-v4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 11 Mar 2015 00:36:19 +0000 (17:36 -0700)]
Merge tag 'iommu-fixes-v4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
 "The patches contain:

   - fix multiple ARM IOMMU drivers to behave well when the hardware is
     not present

   - mark MSM driver as broken

   - fix build errors with the new ARM generic io-page-table code"

* tag 'iommu-fixes-v4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/io-pgtable-arm: Add built time dependency
  iommu/msm: Mark driver BROKEN
  iommu/rockchip: Play nice in multi-platform builds
  iommu/omap: Play nice in multi-platform builds
  iommu/exynos: Play nice in multi-platform builds
  iommu/io-pgtable-arm: Fix self-test WARNs on i386

9 years agoARM: dts: cygnus: enable GPIO based hook detection
Ray Jui [Mon, 9 Mar 2015 20:45:02 +0000 (13:45 -0700)]
ARM: dts: cygnus: enable GPIO based hook detection

This enables GPIO based phone hook detection for Broadcom BCM911360
phone factor board (bcm911360_entphn)

Signed-off-by: Ray Jui <rjui@broadcom.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
9 years agoARM: dts: enable GPIO for Broadcom Cygnus
Ray Jui [Mon, 9 Mar 2015 20:45:01 +0000 (13:45 -0700)]
ARM: dts: enable GPIO for Broadcom Cygnus

This enables all 3 GPIO controllers including the ASIU GPIO, the
chipcommonG GPIO, and the ALWAYS-ON GPIO, for Broadcom Cygnus SoC

Signed-off-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
Tested-by: Dmitry Torokhov <dtor@chromium.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
9 years agoARM: dts: enable IOMUX for Broadcom Cygnus
Ray Jui [Mon, 9 Mar 2015 20:44:58 +0000 (13:44 -0700)]
ARM: dts: enable IOMUX for Broadcom Cygnus

This enables the IOMUX support for Broadcom Cygnus SoC

Signed-off-by: Ray Jui <rjui@broadcom.com>
Tested-by: Dmitry Torokhov <dtor@chromium.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
9 years agoof: unittest: Add options string testcase variants
Peter Hurley [Fri, 6 Mar 2015 18:59:59 +0000 (13:59 -0500)]
of: unittest: Add options string testcase variants

Add testcase variants with '/' in the options string to test for
scan beyond end path name terminated by ':'.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agoof: fix handling of '/' in options for of_find_node_by_path()
Leif Lindholm [Fri, 6 Mar 2015 16:52:53 +0000 (16:52 +0000)]
of: fix handling of '/' in options for of_find_node_by_path()

Ensure proper handling of paths with appended options (after ':'),
where those options may contain a '/'.

Fixes: 7914a7c5651a ("of: support passing console options with stdout-path")
Reported-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Cc: <stable@vger.kernel.org> # 3.19
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agoof/unittest: Fix the wrong expected value in of_selftest_property_string
Wang Long [Tue, 3 Mar 2015 03:50:38 +0000 (03:50 +0000)]
of/unittest: Fix the wrong expected value in of_selftest_property_string

This patch fix the wrong expected value of of_property_match_string
in of_selftest_property_string.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agoof/unittest: remove the duplicate of_changeset_init
Wang Long [Mon, 2 Mar 2015 06:49:21 +0000 (06:49 +0000)]
of/unittest: remove the duplicate of_changeset_init

Remove the duplicate of_changeset_init. In of_selftest_changeset
testcase, the "struct of_changeset chgset" is initialized twice,
but only once is enough. so, drop the first initializtion code.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agodt: submitting-patches: clarify that DT maintainers are to be cced on bindings
Matt Porter [Thu, 5 Mar 2015 15:53:11 +0000 (10:53 -0500)]
dt: submitting-patches: clarify that DT maintainers are to be cced on bindings

The exact steps provided for submitting binding patches can be read
as requiring the bindings to be sent only to the devicetree@vger.kernel.org
list. Since the DT maintainers would like to be Cced on any binding
submissions, make this requirement explicit in step 2.

Signed-off-by: Matt Porter <mporter@konsulko.com>
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agoof: unittest: fix I2C dependency
Arnd Bergmann [Wed, 4 Mar 2015 19:49:47 +0000 (20:49 +0100)]
of: unittest: fix I2C dependency

The unittest fails to link if I2C or I2C_MUX is a loadable module:

  drivers/built-in.o: In function `selftest_i2c_mux_remove':
  unittest.c:(.text+0xb0ce4): undefined reference to `i2c_del_mux_adapter'

This changes the newly added IS_ENABLED() checks to use IS_BUILTIN()
instead, which evaluates to false if the other driver is a module.

Reported-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d5e75500ca401 ("of: unitest: Add I2C overlay unit tests.")
Signed-off-by: Rob Herring <robh@kernel.org>