Commit graph

567 commits

Author SHA1 Message Date
Anson Huang
715f5f92aa soc: imx: gpc: restrict register range for regmap access
[ Upstream commit de2d9b5284 ]

GPC registers are NOT continuous, some registers are
reserved and accessing them from userspace will trigger
external abort, add regmap register access table to
avoid below abort:

root@imx6slevk:~# cat /sys/kernel/debug/regmap/20dc000.gpc/registers
[  108.480477] Unhandled fault: imprecise external abort (0x1406) at 0xb6db5004
[  108.487985] pgd = 42b54bfd
[  108.490741] [b6db5004] *pgd=ba1b7831
[  108.494386] Internal error: : 1406 [#1] SMP ARM
[  108.498943] Modules linked in:
[  108.502043] CPU: 0 PID: 389 Comm: cat Not tainted 4.18.0-rc1-00074-gc9f1f60-dirty #482
[  108.509982] Hardware name: Freescale i.MX6 SoloLite (Device Tree)
[  108.516123] PC is at regmap_mmio_read32le+0x20/0x24
[  108.521031] LR is at regmap_mmio_read+0x40/0x60
[  108.525586] pc : [<c059cf74>]    lr : [<c059d1ac>]    psr: 20060093
[  108.531875] sp : eccf1d98  ip : eccf1da8  fp : eccf1da4
[  108.537122] r10: ec2d3800  r9 : eccf1f60  r8 : ecfc0000
[  108.542370] r7 : eccf1e2c  r6 : eccf1e2c  r5 : 00000028  r4 : ec338e00
[  108.548920] r3 : 00000000  r2 : eccf1e2c  r1 : f0980028  r0 : 00000000
[  108.555474] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  108.562720] Control: 10c5387d  Table: acf4004a  DAC: 00000051
[  108.568491] Process cat (pid: 389, stack limit = 0xd4318a65)
[  108.574174] Stack: (0xeccf1d98 to 0xeccf2000)

Fixes: 721cabf6c6 ("soc: imx: move PGC handling to a new GPC driver")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24 13:09:19 +02:00
Anson Huang
bf3bb8b549 soc: imx: gpcv2: correct PGC offset
[ Upstream commit 3637f12faf ]

Correct MIPI/PCIe/USB_HSIC's PGC offset based on
design RTL, the values in the Reference Manual
(Rev. 1, 01/2018 and the older ones) are incorrect.

The correct offset values should be as below:

0x800 ~ 0x83F: PGC for core0 of A7 platform;
0x840 ~ 0x87F: PGC for core1 of A7 platform;
0x880 ~ 0x8BF: PGC for SCU of A7 platform;
0xA00 ~ 0xA3F: PGC for fastmix/megamix;
0xC00 ~ 0xC3F: PGC for MIPI PHY;
0xC40 ~ 0xC7F: PGC for PCIe_PHY;
0xC80 ~ 0xCBF: PGC for USB OTG1 PHY;
0xCC0 ~ 0xCFF: PGC for USB OTG2 PHY;
0xD00 ~ 0xD3F: PGC for USB HSIC PHY;

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Fixes: 03aa12629f ("soc: imx: Add GPCv2 power gating driver")
Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24 13:08:56 +02:00
Andrey Smirnov
6cfd0d3c62 soc: imx: gpcv2: Do not pass static memory as platform data
[ Upstream commit 050f810e23 ]

Platform device core assumes the ownership of dev.platform_data as
well as that it is dynamically allocated and it will try to kfree it
as a part of platform_device_release(). Change the code to use
platform_device_add_data() n instead of a pointer to a static memory
to avoid causing a BUG() when calling platform_device_put().

The problem can be reproduced by artificially enabling the error path
of platform_device_add() call (around line 357).

Note that this change also allows us to constify imx7_pgc_domains,
since we no longer need to be able to modify it.

Cc: Stefan Agner <stefan@agner.ch>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-03 07:50:40 +02:00
Finley Xiao
971a55574b soc: rockchip: power-domain: Fix wrong value when power up pd with writemask
commit 9e59c5f66c upstream.

Solve the pd could only ever turn off but never turn them on again,
if the pd registers have the writemask bits.

So far this affects the rk3328 only.

Fixes: 79bb17ce8e ("soc: rockchip: power-domain: Support domain control in hiword-registers")
Cc: stable@vger.kernel.org
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:24:51 +02:00
Florian Fainelli
3050437392 soc: bcm: raspberrypi-power: Fix use of __packed
[ Upstream commit 0a12e80ce4 ]

Commit a09cd35658 ("ARM: bcm2835: add rpi power domain driver")
attempted to annotate the structure rpi_power_domain_packet with
__packed but introduced a typo and made it named __packet instead. Just
drop the annotation since the structure is naturally aligned already.

Fixes: a09cd35658 ("ARM: bcm2835: add rpi power domain driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:42 +09:00
Mathias Kresin
ed5bd13bec MIPS: lantiq: gphy: Drop reboot/remove reset asserts
commit 32795631e6 upstream.

While doing a global software reset, these bits are not cleared and let
some bootloader fail to initialise the GPHYs. The bootloader don't
expect the GPHYs in reset, as they aren't during power on.

The asserts were a workaround for a wrong syscon-reboot mask. With a
mask set which includes the GPHY resets, these resets aren't required
any more.

Fixes: 126534141b ("MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd")
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.14+
Patchwork: https://patchwork.linux-mips.org/patch/19003/
[jhogan@kernel.org: Fix build warnings]
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-05 11:41:58 +02:00
Bjorn Andersson
c1dab7872b soc: qcom: wcnss_ctrl: Fix increment in NV upload
[ Upstream commit 90c29ed762 ]

hdr.len includes both the size of the header and the fragment, so using
this when stepping through the firmware causes us to skip 16 bytes every
chunk of 3072 bytes; causing only the first fragment to actually be
valid data.

Instead use fragment size steps through the firmware blob.

Fixes: ea7a1f275c ("soc: qcom: Introduce WCNSS_CTRL SMD client")
Reported-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:52:35 +02:00
Stefan Agner
e1bb3673ae soc: imx: gpc: de-register power domains only if initialized
[ Upstream commit 7801c545e7 ]

If power domain information are missing in the device tree, no
power domains get initialized. However, imx_gpc_remove tries to
remove power domains always in the old DT binding case. Only
remove power domains when imx_gpc_probe initialized them in
first place.

Fixes: 721cabf6c6 ("soc: imx: move PGC handling to a new GPC driver")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:52:00 +02:00
Sean Wang
1b3d2e7a34 soc: mediatek: fix the mistaken pointer accessed when subdomains are added
commit 73ce2ce129 upstream.

Fix the pointer to struct scp_subdomian not being moved forward
when each sub-domain is expected to be iteratively added through
pm_genpd_add_subdomain call.

Cc: stable@vger.kernel.org
Fixes: 53fddb1a66 ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs")
Reported-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:36:28 +02:00
Madalin Bucur
29cd9c2d1f soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
[ Upstream commit 96f413f476 ]

The wait_for_completion() call in qman_delete_cgr_safe()
was triggering a scheduling while atomic bug, replacing the
kthread with a smp_call_function_single() call to fix it.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-31 18:10:42 +02:00
Johan Hovold
6f4649f3be soc: qcom: smsm: fix child-node lookup
[ Upstream commit 8804517e9f ]

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

Note that the original premature free of the parent node has already
been fixed separately.

Also note that this pattern of looking up the first child node with a
given property is rare enough that a generic helper is probably not
warranted.

Fixes: c97c4090ff ("soc: qcom: smsm: Add driver for Qualcomm SMSM")
Fixes: 3e8b554114 ("soc: qcom: smsm: fix of_node refcnting problem")
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 11:01:27 +01:00
Arnaud Patard
2117bba3cf meson-gx-socinfo: Fix package id parsing
[ Upstream commit 044d71bc6c ]

I've noticed the following message while booting a S905X based board:

soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected

The S905D string is obviously wrong. The vendor code does:
...
        ver = (readl(assist_hw_rev) >> 8) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
        ver =  (readl(assist_hw_rev) >> 16) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
...

while the current code does:
...
...

This means that the current mainline code has package id and minor
version reversed.

Fixes: a9daaba296 ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:07:56 +01:00
Matthias Brugger
48185ffb6d soc: mediatek: pwrap: fix compiler errors
[ Upstream commit fb2c1934f3 ]

When compiling using sparse, we got the following error:
drivers/soc/mediatek/mtk-pmic-wrap.c:686:25: error: dubious one-bit signed bitfield

Changing the data type to unsigned fixes this.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:10:34 +01:00
Greg Kroah-Hartman
b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
Linus Torvalds
7318413077 Merge branch '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for 4.14 for MIPS; below a summary of
  the non-merge commits:

  CM:
   - Rename mips_cm_base to mips_gcr_base
   - Specify register size when generating accessors
   - Use BIT/GENMASK for register fields, order & drop shifts
   - Add cluster & block args to mips_cm_lock_other()

  CPC:
   - Use common CPS accessor generation macros
   - Use BIT/GENMASK for register fields, order & drop shifts
   - Introduce register modify (set/clear/change) accessors
   - Use change_*, set_* & clear_* where appropriate
   - Add CM/CPC 3.5 register definitions
   - Use GlobalNumber macros rather than magic numbers
   - Have asm/mips-cps.h include CM & CPC headers
   - Cluster support for topology functions
   - Detect CPUs in secondary clusters

  CPS:
   - Read GIC_VL_IDENT directly, not via irqchip driver

  DMA:
   - Consolidate coherent and non-coherent dma_alloc code
   - Don't use dma_cache_sync to implement fd_cacheflush

  FPU emulation / FP assist code:
   - Another series of 14 commits fixing corner cases such as NaN
     propgagation and other special input values.
   - Zero bits 32-63 of the result for a CLASS.D instruction.
   - Enhanced statics via debugfs
   - Do not use bools for arithmetic. GCC 7.1 moans about this.
   - Correct user fault_addr type

  Generic MIPS:
   - Enhancement of stack backtraces
   - Cleanup from non-existing options
   - Handle non word sized instructions when examining frame
   - Fix detection and decoding of ADDIUSP instruction
   - Fix decoding of SWSP16 instruction
   - Refactor handling of stack pointer in get_frame_info
   - Remove unreachable code from force_fcr31_sig()
   - Convert to using %pOF instead of full_name
   - Remove the R6000 support.
   - Move FP code from *_switch.S to *_fpu.S
   - Remove unused ST_OFF from r2300_switch.S
   - Allow platform to specify multiple its.S files
   - Add #includes to various files to ensure code builds reliable and
     without warning..
   - Remove __invalidate_kernel_vmap_range
   - Remove plat_timer_setup
   - Declare various variables & functions static
   - Abstract CPU core & VP(E) ID access through accessor functions
   - Store core & VP IDs in GlobalNumber-style variable
   - Unify checks for sibling CPUs
   - Add CPU cluster number accessors
   - Prevent direct use of generic_defconfig
   - Make CONFIG_MIPS_MT_SMP default y
   - Add __ioread64_copy
   - Remove unnecessary inclusions of linux/irqchip/mips-gic.h

  GIC:
   - Introduce asm/mips-gic.h with accessor functions
   - Use new GIC accessor functions in mips-gic-timer
   - Remove counter access functions from irq-mips-gic.c
   - Remove gic_read_local_vp_id() from irq-mips-gic.c
   - Simplify shared interrupt pending/mask reads in irq-mips-gic.c
   - Simplify gic_local_irq_domain_map() in irq-mips-gic.c
   - Drop gic_(re)set_mask() functions in irq-mips-gic.c
   - Remove gic_set_polarity(), gic_set_trigger(), gic_set_dual_edge(),
     gic_map_to_pin() and gic_map_to_vpe() from irq-mips-gic.c.
   - Convert remaining shared reg access, local int mask access and
     remaining local reg access to new accessors
   - Move GIC_LOCAL_INT_* to asm/mips-gic.h
   - Remove GIC_CPU_INT* macros from irq-mips-gic.c
   - Move various definitions to the driver
   - Remove gic_get_usm_range()
   - Remove __gic_irq_dispatch() forward declaration
   - Remove gic_init()
   - Use mips_gic_present() in place of gic_present and remove
     gic_present
   - Move gic_get_c0_*_int() to asm/mips-gic.h
   - Remove linux/irqchip/mips-gic.h
   - Inline __gic_init()
   - Inline gic_basic_init()
   - Make pcpu_masks a per-cpu variable
   - Use pcpu_masks to avoid reading GIC_SH_MASK*
   - Clean up mti, reserved-cpu-vectors handling
   - Use cpumask_first_and() in gic_set_affinity()
   - Let the core set struct irq_common_data affinity

  microMIPS:
   - Fix microMIPS stack unwinding on big endian systems

  MIPS-GIC:
   - SYNC after enabling GIC region

  NUMA:
   - Remove the unused parent_node() macro

  R6:
   - Constify r2_decoder_tables
   - Add accessor & bit definitions for GlobalNumber

  SMP:
   - Constify smp ops
   - Allow boot_secondary SMP op to return errors

  VDSO:
   - Drop gic_get_usm_range() usage
   - Avoid use of linux/irqchip/mips-gic.h

  Platform changes:

  Alchemy:
   - Add devboard machine type to cpuinfo
   - update cpu feature overrides
   - Threaded carddetect irqs for devboards

  AR7:
   - allow NULL clock for clk_get_rate

  BCM63xx:
   - Fix ENETDMA_6345_MAXBURST_REG offset
   - Allow NULL clock for clk_get_rate

  CI20:
   - Enable GPIO and RTC drivers in defconfig
   - Add ethernet and fixed-regulator nodes to DTS

  Generic platform:
   - Move Boston and NI 169445 FIT image source to their own files
   - Include asm/bootinfo.h for plat_fdt_relocated()
   - Include asm/time.h for get_c0_*_int()
   - Include asm/bootinfo.h for plat_fdt_relocated()
   - Include asm/time.h for get_c0_*_int()
   - Allow filtering enabled boards by requirements
   - Don't explicitly disable CONFIG_USB_SUPPORT
   - Bump default NR_CPUS to 16

  JZ4700:
   - Probe the jz4740-rtc driver from devicetree

  Lantiq:
   - Drop check of boot select from the spi-falcon driver.
   - Drop check of boot select from the lantiq-flash MTD driver.
   - Access boot cause register in the watchdog driver through regmap
   - Add device tree binding documentation for the watchdog driver
   - Add docs for the RCU DT bindings.
   - Convert the fpi bus driver to a platform_driver
   - Remove ltq_reset_cause() and ltq_boot_select(
   - Switch to a proper reset driver
   - Switch to a new drivers/soc GPHY driver
   - Add an USB PHY driver for the Lantiq SoCs using the RCU module
   - Use of_platform_default_populate instead of __dt_register_buses
   - Enable MFD_SYSCON to be able to use it for the RCU MFD
   - Replace ltq_boot_select() with dummy implementation.

  Loongson 2F:
   - Allow NULL clock for clk_get_rate

  Malta:
   - Use new GIC accessor functions

  NI 169445:
   - Add support for NI 169445 board.
   - Only include in 32r2el kernels

  Octeon:
   - Add support for watchdog of 78XX SOCs.
   - Add support for watchdog of CN68XX SOCs.
   - Expose support for mips32r1, mips32r2 and mips64r1
   - Enable more drivers in config file
   - Add support for accessing the boot vector.
   - Remove old boot vector code from watchdog driver
   - Define watchdog registers for 70xx, 73xx, 78xx, F75xx.
   - Make CSR functions node aware.
   - Allow access to CIU3 IRQ domains.
   - Misc cleanups in the watchdog driver

  Omega2+:
   - New board, add support and defconfig

  Pistachio:
   - Enable Root FS on NFS in defconfig

  Ralink:
   - Add Mediatek MT7628A SoC
   - Allow NULL clock for clk_get_rate
   - Explicitly request exclusive reset control in the pci-mt7620 PCI driver.

  SEAD3:
   - Only include in 32 bit kernels by default

  VoCore:
   - Add VoCore as a vendor t0 dt-bindings
   - Add defconfig file"

* '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (167 commits)
  MIPS: Refactor handling of stack pointer in get_frame_info
  MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems
  MIPS: microMIPS: Fix decoding of swsp16 instruction
  MIPS: microMIPS: Fix decoding of addiusp instruction
  MIPS: microMIPS: Fix detection of addiusp instruction
  MIPS: Handle non word sized instructions when examining frame
  MIPS: ralink: allow NULL clock for clk_get_rate
  MIPS: Loongson 2F: allow NULL clock for clk_get_rate
  MIPS: BCM63XX: allow NULL clock for clk_get_rate
  MIPS: AR7: allow NULL clock for clk_get_rate
  MIPS: BCM63XX: fix ENETDMA_6345_MAXBURST_REG offset
  mips: Save all registers when saving the frame
  MIPS: Add DWARF unwinding to assembly
  MIPS: Make SAVE_SOME more standard
  MIPS: Fix issues in backtraces
  MIPS: jz4780: DTS: Probe the jz4740-rtc driver from devicetree
  MIPS: Ci20: Enable RTC driver
  watchdog: octeon-wdt: Add support for 78XX SOCs.
  watchdog: octeon-wdt: Add support for cn68XX SOCs.
  watchdog: octeon-wdt: File cleaning.
  ...
2017-09-15 20:43:33 -07:00
Linus Torvalds
ae46654bcf ARM: SoC driver updates for v4.14
This branch contains platform-related driver updates for ARM and ARM64.
 
 Among them:
 
  - Reset driver updates:
   + New API for dealing with arrays of resets
   + Make unimplemented {de,}assert return success on shared resets
   + MSDKv1 driver
   + Removal of obsolete Gemini reset driver
   + Misc updates for sunxi and Uniphier
 
  - SoC drivers:
   + Platform SoC driver registration on Tegra
   + Shuffle of Qualcomm drivers into a submenu
   + Allwinner A64 support for SRAM
   + Renesas R-Car R3 support
   + Power domains for Rockchip RK3366
 
  - Misc updates and smaller fixes for TEE and memory driver subsystems
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZtdt7AAoJEIwa5zzehBx3EboP/jR2T9lrMavXR1zL48L14yJb
 S+fiJlrX1Kr42UF4PQvsfs+uTqOLmycrPVFkMb6IwoUPzQ9UCOSoiMzYm2b7ZPvt
 uIesHhdM3/xun6wKfieN8GmNA1yDVynTxo0TTYDw5ha7I6s2GHgw0GSFzy3wm0Qg
 KzerAO3gzf3L5XsKR0cai3IXNjHO9ubpFG1ReR09da28nPElP8ggWg0KnqdO76Ch
 BGpFj78EC875ZNqwHgnspUqgGDJnBjig3m/uA4FWA0G9Jl38tCyKTZfUR7cEraoV
 kyCgBlR/UrI8eXVTyEy5k5iTsQ3A1VhX4rGjyH+5NZHTs1yWr4+RDND/qeGl9tSo
 VASuOtH6Rc3vdUDpHPBNAFNQH8fwwDoKf96dvN1tiffsx6LSKb//NyOfkXzKOtR6
 CP5raYfX4YktLtHq0XVTZ/6r3XmLcTHzElR/dCFpQOFcTOYii0pWtfcWouahbZ1w
 dhoBX/dbNq37MfzrxtHN2VTIEHpn2GU7u+ZGkp2ArokD58BAft/M3Xee1cDnF75g
 ZDwe5eNFT8aBZKaY7zwG8cdxiw9kACAivDRwW+zgpfUr39c+d0+QmVfnfJh4EGXK
 Ri6yr2EfBWK6jw3cwkdSyyt7iSzIkB+RiuuD1MjpYhWzAvoDpzqkXYukFGbpXnuy
 vUFHNuP1ocUsRtCs8mm1
 =yBzS
 -----END PGP SIGNATURE-----

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

Pull ARM SoC driver updates from Olof Johansson:
 "This branch contains platform-related driver updates for ARM and ARM64.

  Among them:

   - Reset driver updates:
     + New API for dealing with arrays of resets
     + Make unimplemented {de,}assert return success on shared resets
     + MSDKv1 driver
     + Removal of obsolete Gemini reset driver
     + Misc updates for sunxi and Uniphier

   - SoC drivers:
     + Platform SoC driver registration on Tegra
     + Shuffle of Qualcomm drivers into a submenu
     + Allwinner A64 support for SRAM
     + Renesas R-Car R3 support
     + Power domains for Rockchip RK3366

   - Misc updates and smaller fixes for TEE and memory driver
     subsystems"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
  firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set
  soc/tegra: fuse: Add missing semi-colon
  soc/tegra: Restrict SoC device registration to Tegra
  drivers: soc: sunxi: add support for A64 and its SRAM C
  drivers: soc: sunxi: add support for remapping func value to reg value
  drivers: soc: sunxi: fix error processing on base address when claiming
  dt-bindings: add binding for Allwinner A64 SRAM controller and SRAM C
  bus: sunxi-rsb: Enable by default for ARM64
  soc/tegra: Register SoC device
  firmware: tegra: set drvdata earlier
  memory: Convert to using %pOF instead of full_name
  soc: Convert to using %pOF instead of full_name
  bus: Convert to using %pOF instead of full_name
  firmware: Convert to using %pOF instead of full_name
  soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
  soc: mediatek: add header files required for MT7622 SCPSYS dt-binding
  soc: mediatek: reduce code duplication of scpsys_probe across all SoCs
  dt-bindings: soc: update the binding document for SCPSYS on MediaTek MT7622 SoC
  reset: uniphier: add analog amplifiers reset control
  reset: uniphier: add video input subsystem reset control
  ...
2017-09-10 20:40:00 -07:00
Linus Torvalds
7f1b9be13a ARM/arm64: SoC platform updates for v4.14
This branch contains platform updates for 32- and 64-bit ARM,
 including defconfig updates to enable new options, drivers and
 platforms. There are also a few fixes and cleanups for some existing vendors.
 
 Some of the things worth highlighting here are:
 
  - Enabling new crypt drivers on arm64 defconfig
  - QCOM IPQ8074 clocks and pinctrl drivers on arm64 defconfig
  - Debug support enabled for Renesas r8a7743
  - Various config updates for Renesas platforms (sound, USB, other drivers)
  - Platform support (including SMP) for TI dra762
  - OMAP cleanups: Move to use generic 8250 debug_ll, removal of stale DMA code
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZtdXjAAoJEIwa5zzehBx3ExIQAJQ6anSZlkGysXqptA4c1HuL
 vgGq/U5xZ1Wa4Z/YX7//wuCMwRClc1j/zSJ5PP+wP0YsaviN7iF/8H1P/HQtCiTT
 DcEQPSI770829wzW4oMNW0PyU/ZnWMtuiMB+FAjdPVjbS8bT4PIK72D8PYKrT7f8
 8bU51+QezjSLamQaA8S2RyX+kYI/4znTa/9Aco4AlCtioV8h9gQanFYd2EI/EMhU
 1uvR3xUFf/YK49+M5J6m3DvtFffllHU9TKV/EAQD1Bhl1s5VPfem+a8JbVh1m7M+
 NzQOOoPJ9jYOGfjlaQQVmZ/1E4iKac1oK4x44Djk/i+RFjl+AT/2co3RcaEq9Npw
 5HNsK8ujnjzWB3xHu5wK5CbrjLNYco9hOpJaGkSeClo4ElDJVSKxyqWkZuhhnSA8
 bXXV5VraMX67tjG7Ou8+NtdbMkGdOUqnNbuBlCxkxpWxhtaUQG1YHHQDofUXNguy
 rtVhKRZRSkNYrp4lDCKCXVFFO077FGzP2Boq6JVzLv+U1l6JlZkkr3EWKYMY45HC
 o2rVcAB4lMR/k6tqE5MAmQC53jCNlFZt2xtf1WRVKf+0TfBVIGX3MxvFxl4E9wA+
 9pdJ9ujZWsPjTcZcktA6AsaK7uevRxcB2YZYv4pXVjR1RcZ/SfiEf4UW+md3j4QB
 igKej5WsRiCPwnkMFKs0
 =g8cF
 -----END PGP SIGNATURE-----

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

Pull ARM/arm64 SoC platform updates from Olof Johansson: "This branch
  contains platform updates for 32- and 64-bit ARM, including defconfig
  updates to enable new options, drivers and platforms. There are also a
  few fixes and cleanups for some existing vendors.

  Some of the things worth highlighting here are:

   - Enabling new crypt drivers on arm64 defconfig

   - QCOM IPQ8074 clocks and pinctrl drivers on arm64 defconfig

   - Debug support enabled for Renesas r8a7743

   - Various config updates for Renesas platforms (sound, USB, other
     drivers)

   - Platform support (including SMP) for TI dra762

   - OMAP cleanups: Move to use generic 8250 debug_ll, removal of stale
     DMA code"

* tag 'armsoc-platforms' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (109 commits)
  ARM: multi_v7_defconfig: make eSDHC driver built-in
  arm64: defconfig: enable rockchip graphics
  MAINTAINERS: Update Cavium ThunderX2 entry
  ARM: config: aspeed: Add I2C, VUART, LPC Snoop
  ARM: configs: aspeed: Update Aspeed G4 with VMSPLIT_2G
  ARM: s3c24xx: Fix NAND ECC mode for mini2440 board
  ARM: davinci_all_defconfig: enable tinydrm and ST7586
  arm64: defconfig: Enable QCOM IPQ8074 clock and pinctrl
  ARM: defconfig: tegra: Enable ChipIdea UDC driver
  ARM: configs: Add Tegra I2S interfaces to multi_v7_defconfig
  ARM: tegra: Add Tegra I2S interfaces to defconfig
  ARM: tegra: Update default configuration for v4.13-rc1
  MAINTAINERS: update ARM/ZTE entry
  soc: versatile: remove unnecessary static in realview_soc_probe()
  ARM: Convert to using %pOF instead of full_name
  ARM: hisi: Fix typo in comment
  ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL
  arm64: defconfig: add CONFIG_BRCMSTB_THERMAL
  arm64: defconfig: add recently added crypto drivers as modules
  arm64: defconfig: enable CONFIG_UNIPHIER_WATCHDOG
  ...
2017-09-10 20:35:46 -07:00
Linus Torvalds
d7efc352ab remoteproc updates for v4.14
This adds and improves remoteproc support for TI DA8xx/OMAP-L13x DSP, TI
 Keystone 66AK2G DSP and iMX6SX/7D Cortex M4 coprocessors. It introduces the
 Qualcomm restart notifier and a few fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZswmrAAoJEAsfOT8Nma3FVAwP/1SEQkDsfrx9HIVtm9zSy7h5
 DJ2dAUVMATJkTiDU8djz/KttL9bOLIcG5u0hiNbtPELm/5t3qAHiN8axO0w5Oxrv
 0xO2yIwzxyhOU4cI8k+RWReTcihSqBYs5nHDXXhbhO5IKiaIfAQWljL6H1rL41gH
 SnKEuQuXfD6j/cvRyHEh10EWfDrVMnaim9aK3OiSz6i6YRyRC3r2VT+KiRnbaLq0
 XIk1HATM6xEd6YfAeiuPZh6SbKuEibsBoPVQpAl9HjZvKY+n1dC11solohAEMYFC
 r222I6LYPRy5eteLnSqhTYof5l+pd9/eECIuXCdvxGfbkPhyPf7/K3WI3iV9sD8a
 h+QM22IpiwSzxnJPNJzmYtPnhqfOHZQTb64Fp2xiTTYa/ILbSH7VCAohxofEaheS
 8rtIJqGhxT1WINvcBaoxwhL/CMMnBL+TlrqlAc5Qjd9zKFhJu4rcv1oQFNGMBMrN
 WY4R4x//oYgfmagIBEkmxMEcVMoJeI34AsbtSvazmcIQdvpcJ3Y0AMa+Ly0eyzBf
 RoTJY9y/Q3Y2DjcJoK+6iFeGRo0qI8/ytkKC6wb3RpaTnbDQ39X3GfCICwhsDCh7
 uv19AmG5M26VRHxjlNnLpJp8jG3Up335TYQhkXV/CZYZcOxTmfJjGe3ItxOK/tTz
 YMv+IR72T/M+feeAS4Ge
 =R9dP
 -----END PGP SIGNATURE-----

Merge tag 'rproc-v4.14' of git://github.com/andersson/remoteproc

Pull remoteproc updates from Bjorn Andersson:
 "This adds and improves remoteproc support for TI DA8xx/OMAP-L13x DSP,
  TI Keystone 66AK2G DSP and iMX6SX/7D Cortex M4 coprocessors. It
  introduces the Qualcomm restart notifier and a few fixes"

* tag 'rproc-v4.14' of git://github.com/andersson/remoteproc:
  remoteproc: Introduce rproc handle accessor for children
  remoteproc: qcom: Make ssr_notifiers local
  remoteproc: Stop subdevices in reverse order
  remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver
  remoteproc: dt: Provide bindings for iMX6SX/7D Remote Processor Controller driver
  remoteproc: qcom: Use PTR_ERR_OR_ZERO
  remoteproc: st: explicitly request exclusive reset control
  remoteproc: qcom: explicitly request exclusive reset control
  remoteproc/keystone: explicitly request exclusive reset control
  remoteproc/keystone: Add support for Keystone 66AK2G SOCs
  remoteproc/davinci: Add device tree support for OMAP-L138 DSP
  dt-bindings: remoteproc: Add bindings for Davinci DSP processors
  remoteproc/davinci: Add support to parse internal memories
  remoteproc/davinci: Switch to platform_get_resource_byname()
  remoteproc: make device_type const
  soc: qcom: GLINK SSR notifier
  remoteproc: qcom: Add support for SSR notifications
  remoteproc: Merge __rproc_boot() with rproc_boot()
2017-09-09 14:30:50 -07:00
Martin Blumenstingl
126534141b MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd
Compared to the old xrx200_phy_fw driver the new version has multiple
enhancements. The name of the firmware files does not have to be added
to all .dts files anymore - one now configures the GPHY mode (FE or GE)
instead. Each GPHY can now also boot separate firmware (thus mixing of
GE and FE GPHYs is now possible).
The new implementation is based on the RCU syscon-mfd and uses the
reeset_controller framework instead of raw RCU register reads/writes.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Cc: john@phrozen.org
Cc: p.zabel@pengutronix.de
Cc: kishon@ti.com
Cc: mark.rutland@arm.com
Cc: linux-mips@linux-mips.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-watchdog@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-spi@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17128/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-09-04 21:19:02 +02:00
Hauke Mehrtens
c20b3b8019 MIPS: lantiq: Convert the fpi bus driver to a platform_driver
Instead of hacking the configuration of the FPI bus into the arch code
add an own bus driver for this internal bus. The FPI bus is the main
bus of the SoC. This bus driver makes sure the bus is configured
correctly before the child drivers are getting initialized. This driver
will probably also be used on different SoCs later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: john@phrozen.org
Cc: p.zabel@pengutronix.de
Cc: kishon@ti.com
Cc: mark.rutland@arm.com
Cc: linux-mips@linux-mips.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-watchdog@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-spi@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17122/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-09-04 21:19:02 +02:00
Arnd Bergmann
3889e85100 Samsung soc drivers changes for v4.14
Conversion to kbasename from Rob Herring.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJZna2cAAoJEME3ZuaGi4PXOoAQAIH92exb/UrUjnwOPfXgq9NT
 pz0HGBxe8gYzHHSu8jry1GWCnACxdZBZEMzli8NyXELzIwb2OmVSdTCQI1DbJ7ot
 gIsO+xl+1LhXrzTi11oRJhMSpTYnRZy3tRRJ9ABwUthO5h058tvd5hSlfIa+XDt7
 rpzDhquyI8BRE+8eLgGDu07g+9a2DeMnEIaM+wE3vm9R/YmxB4Whi92kAkbPwKCy
 ADEV964DZge4unSyOjxV27FjDqSSOF7vovDp6/R7YSNmEb0uqchvcREBCtwSJjVj
 HdDxxjxU1eN+okLv6NB9bWqPK9bUvuyst5wjvt5e1YIiisXN4UMMGZYeEnqmODJd
 ZWnKWk4prP1PWAm0hBKZ6GXlmwhNDsUaUNUtt9jN/SBIn+SXgANv+xU1H/xeZf9c
 xELAUXMkc3P5bg+ewGkUIsj8qcRN0gs0fx9peu8thofcC0wo3xLMa5AnEJJ3gB4Z
 yXLePcFse/z8uQHrcUp+PGC8Wtc7krlAEuPkNGa/KDf4A4NPlBtUF2A2aY3Kh+/X
 5ZK5FtK3vh4Uyk1JFWXw06bnYvT6tYEsJRuxNfbVD8JNrl6oFKodkNb+5FC3tXKg
 bi9CQ+hc+hR8PEPKzMw0UsEVna2MzC0l3GH+PmhnHJHMW+BBQbv8D4R7WPhjEl78
 Hu8C1qlg88w2+jjdZSd2
 =gwbs
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers

Pull "Samsung soc drivers changes for v4.14" from Krzysztof Kozłowski:

Conversion to kbasename from Rob Herring.

* tag 'samsung-drivers-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  soc: samsung: Use kbasename instead of open coding
2017-08-23 21:46:12 +02:00
Thierry Reding
9261b43e70 soc/tegra: fuse: Add missing semi-colon
Commit 8a46828e623c ("soc/tegra: Register SoC device") added a new
initcall, but forgot to terminate the line with a semi-colon. Some
recent versions of GCC seem to report this as an error.

Fixes: 8a46828e623c ("soc/tegra: Register SoC device")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-23 11:54:27 +02:00
Thierry Reding
226cff485c soc/tegra: Restrict SoC device registration to Tegra
Commit 8a46828e623c ("soc/tegra: Register SoC device") added an initcall
to register the SoC device on Tegra. However, that code is unrestricted
and will run on all platforms, causing unwanted warnings.

Fix this by first checking that we're running on hardware that supports
the fuses block that we use to provide SoC information.

Fixes: 8a46828e623c ("soc/tegra: Register SoC device")
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-23 11:54:10 +02:00
Arnd Bergmann
2e9a41dca3 Allwinner driver changes for 4.14
Usual driver changes:
 
   - SUNXI_RSB bus driver enabled by default for ARM64
 
   - Support for SRAM controller and SRAM C block on the A64 added
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCgAsFiEE2nN1m/hhnkhOWjtHOJpUIZwPJDAFAlmXuVkOHHdlbnNAY3Np
 ZS5vcmcACgkQOJpUIZwPJDABghAAynR1zup2Fk1O3vC/49/oqojoFDoMar9ZOEpe
 Aw/kMphhVUSyedVpNjef1bfu2TYfXxl/bD56T3oQbNLIHM7A7sW2Ay/blt+5/tOz
 v0QiCY+y3nGpP49TOp6NSgoFb8H75xh09HDzey+ETWA34NV8ywz7dCry1XJ4Taln
 IIULlsWJJkfefJB0fcWULG/omGArqM9SiZnXnwPaf+3D1wZTFh3X/vjkVq5tewOf
 To/kLZNE4C5mubcXqurDRNiomzQpnbGD54ZYfnK+F1W/PdJoOrwsMRwEAGe0+zOI
 wehMKvd2cOgt1lnLt5fsEESNGr8T/5gdPB1JNP437+DP1uou0KBdmZKTwTx0eYI/
 YADxSqGVVpF9UVrMYDGK2sBTfhcKFCo8I6Xw9yfLraVY4Gs3uzAAe2MtDgTYITrO
 H3jHsmt6bqDrWgYDG3kzbFvKDyn5+uB6UgZ67Reg5eP+XcubAj7UEQEu8oliRz1V
 qOu4YbO0tkqnYCeotq3yEGEVbSr9KQ+M2MUR/5pdyRgjqg7ZueppmDh9DqD9Ene+
 v/hiI4M+TpdpOLuywYsctDRYWEjnUSeIrxy3HJSRXqH+LMzhxm9KL2jHQy6EcICv
 ALaGhyEtnstDrI61hgG/di/jq7TjL8LHL9lubxrbt8Eiq+52hJy5EmPexq5YQM/1
 raOLKkQ=
 =i+D6
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-drivers-for-4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/drivers

Pull "Allwinner driver changes for 4.14" from Chen-Yu Tsai:

Usual driver changes:

  - SUNXI_RSB bus driver enabled by default for ARM64

  - Support for SRAM controller and SRAM C block on the A64 added

* tag 'sunxi-drivers-for-4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  drivers: soc: sunxi: add support for A64 and its SRAM C
  drivers: soc: sunxi: add support for remapping func value to reg value
  drivers: soc: sunxi: fix error processing on base address when claiming
  dt-bindings: add binding for Allwinner A64 SRAM controller and SRAM C
  bus: sunxi-rsb: Enable by default for ARM64
2017-08-21 09:25:22 +02:00
Keerthy
4459398b6d soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
knav_pool_create is an exported function. In the event of a call
before knav_queue_probe, we encounter a NULL pointer dereference
in the following line. Hence return -EPROBE_DEFER to the caller till
the kdev pointer is non-NULL.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-21 09:19:50 +02:00
Arnd Bergmann
f2970be50a soc/tegra: Changes for v4.14-rc1
Contains a fix for unbalanced reference counting of device tree nodes in
 the PMC-based generic power domains code.
 
 A second change moves the SoC device registration code from its old
 location in arch/arm/mach-tegra to drivers/soc/tegra so that it can be
 shared between 32-bit and 64-bit ARM Tegra SoCs.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlmW+3ITHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zocmaEACeb9YuHAXaLz4ujzE8JiDmjIIKTtbd
 16d75z/d29vVfxCzKAV7yzqugJjPsvc1J6IsWA5g9m+0O36chgpqaQq6AOmTP4us
 zE9WRXG922aGu3++9YQVFA3I+ew/9SKBMDJ53JptP8oQsHNERolgNgV5OAeX1SQ7
 XBrGLvsnLWtYIj4QjtkbTQhRy8/O7r4kl/mNWuh5LP+dmYA5dfd8v2d2w2xBGKua
 4w9f1iLK8fJnBoRXNZj+e/d4LFsYuZcElsqQ46fHN0APAjg9TBuTvYGTAmWeAP8b
 VEKjTR1Jaix8XLxyjjIivEUT591BnO15NLfZ3yC8/1wY64daRtE3oFuH3VLM5fgt
 E1mrIAd3SJSt2zD/ubh1+Dm21e7bXehajsb+AL6t6wheHbVlM4jf0rjszzGGZof6
 s76IY1WcuSYQYx0u0S3upPGBcjPqw+JEf/4hJQ8H/RXpx70v1KDP4dUW6PR58jxk
 cPZeOtcqLGWvCfg04/U20OjWn2mpVDU1Gbr7nO5J0xyam/IG7fiDgU4hFLC7HqoE
 q67QI7/kssGRmYuWQMBu+cqLj6saOXTUDLvGCrN508r04HbuVwhK4t42P+tmaK8G
 ujDNcsdcekjvWn7tgxm5LV7m0puCWbblBwV2WTaFaR5Jv/EKRBQisBByDndNxy8h
 lFV8tbUTL8tvNw==
 =Qbm4
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.14-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers

Pull "soc/tegra: Changes for v4.14-rc1" from Thierry Reding:

Contains a fix for unbalanced reference counting of device tree nodes in
the PMC-based generic power domains code.

A second change moves the SoC device registration code from its old
location in arch/arm/mach-tegra to drivers/soc/tegra so that it can be
shared between 32-bit and 64-bit ARM Tegra SoCs.

* tag 'tegra-for-4.14-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: Register SoC device
  soc/tegra: Fix bad of_node_put() in powergate init
2017-08-18 23:29:52 +02:00
Arnd Bergmann
9da95d8f5b - add mt7623a smp support
- scpsys: reduce code duplication
 - scpsys: add mt7622 support
 - pmic wrapper: make of_device_ids constant
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEiUuSfQSYnG8EMsBltDliWyzx00MFAlmVfMEXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQtDliWyzx00MGyw//b1Ax9tAl+eX1phkU5r/sdyd6
 KS72i4pMo4yyyuoPCLKhpwH2rL1UrgY/T6f6bEyVf6KNhzgUvx1P4Y5PSpo2R+Jv
 AJ9lIypXCxUvmrQL5FOuQ+8SY694SSm1IBsoJ70pNA+/m7//Yfk0eiueUa7epNI0
 dhrHOvNaZPQbnCUjFa+qdkK8x04MoAKUQcq9sp1vpcvYTL7V6OrW2V6kc0iqwaN1
 G91QW2r+XAgO1KA1PIMqC8E9v06dhYWuaPI3SMCIqp/NFnNZA8j58KySzW7+nB/B
 7IlDARYDyzokw/JTUuWSlOOPh425xVSExidkTbCgb7m0Lt8i3CvW89yXsqKSL/+U
 Ezek9w/rJNGb5OoLhT1xQfy6XrXFCW78gl9HKZhbrM1eBiEeJctLlmQula57nyJH
 qIlCMjuueKYHUKTGT5LXidNbGesfx4vLt6v803XouF4D3NCIqPahdFqtBnEfsOEO
 l1xwbTSq44VSFtUKSdRrgt6e8Uxa25ftOkbKlS8vIPcsYJ7gnK7r2/ERWNJF8F+f
 x4toGOKhOVRTRwAZIx9ncKnQp08g6jegiRHW4JrJNmPnUwwC00I06+Jiltg5KJIP
 ZqgfjXesdjD660pWl70YGMRtdUNLuNgZRnyXg1CM94CfOimUBZi2PXhoK1Wm/7sj
 Db0QrPV4DQHti15Q0ig=
 =IW3o
 -----END PGP SIGNATURE-----

Merge tag 'v4.13-next-soc' of https://github.com/mbgg/linux-mediatek into next/drivers

Pull "arm: mediatek: soc updates for v4.14" from Matthias Brugger:

- add mt7623a smp support
- scpsys: reduce code duplication
- scpsys: add mt7622 support
- pmic wrapper: make of_device_ids constant

* tag 'v4.13-next-soc' of https://github.com/mbgg/linux-mediatek:
  soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
  soc: mediatek: add header files required for MT7622 SCPSYS dt-binding
  soc: mediatek: reduce code duplication of scpsys_probe across all SoCs
  dt-bindings: soc: update the binding document for SCPSYS on MediaTek MT7622 SoC
  soc: mtk-pmic-wrap: make of_device_ids const.
  ARM: mediatek: add MT7623a smp bringup code
2017-08-18 23:27:22 +02:00
Dave Gerlach
4dd6a9973b soc: ti: ti_sci_pm_domains: Populate name for genpd
Commit b6a1d093f9 ("PM / Domains: Extend generic power domain
debugfs") now creates a debugfs directory for each genpd based on the
name of the genpd. Currently no name is given to the genpd created by
ti_sci_pm_domains driver so because of this we see a NULL pointer
dereferences when it is accessed on boot when the debugfs entry creation
is attempted.

Give the genpd a name before registering it to avoid this.

Fixes: 52835d59fc ("soc: ti: Add ti_sci_pm_domains driver")
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-18 11:59:53 +02:00
Icenowy Zheng
5e4fb64297 drivers: soc: sunxi: add support for A64 and its SRAM C
Allwinner A64's display engine claims the SRAM C section to work.

Add support for the A64 SRAM controller and the SRAM C section of it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-18 14:30:21 +08:00
Icenowy Zheng
8fed2ce98e drivers: soc: sunxi: add support for remapping func value to reg value
On some Allwinner SoCs, sometimes the value needed to write into the
register to claim SRAM is not equal to the value specified in the
device tree.

The device tree binding defines 0 as "mapped to CPU" and 1 as "mapped
to X device". This matches the value written to the configuration
register for the SRAM blocks currently supported. However, the not yet
supported VE SRAM block is claimed for the device by writing 0x7fffffff,
which is vastly different from the other blocks. On the A64, SRAM C is
claimed by the device by writing a 0, which is the opposite of the
current design.

Add a value remapping in sunxi_sram_func structure, and let the
sunxi_sram_of_parse function set the remapped register value.
This allows us to keep the convention currently used in the device tree
binding.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
[wens@csie.org: Clarified commit message]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-18 14:30:20 +08:00
Icenowy Zheng
2262a65f0b drivers: soc: sunxi: fix error processing on base address when claiming
When claiming SRAM, if the base is set to an error, it means that the
SRAM controller has been probed, but failed to remap the controller
memory zone. If the base is zero, thus the SRAM controller should be not
probed at all, and it should return -EPROBE_DEFER. However, currently we
returned -EPROBE_DEFER in the former situation, and ignored the latter
situation (which will lead to the kernel to panic).

Fix the behavior on abnormal base address processing when claiming.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Fixes: 4af34b572a ("drivers: soc: sunxi: Introduce SoC driver to map
		      SRAMs")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-18 14:30:19 +08:00
Thierry Reding
27a0342ac1 soc/tegra: Register SoC device
Move this code from arch/arm/mach-tegra and make it common among 32-bit
and 64-bit Tegra SoCs. This is slightly complicated by the fact that on
32-bit Tegra, the SoC device is used as the parent for all devices that
are instantiated from device tree.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-08-17 16:43:13 +02:00
Arnd Bergmann
87a1cb5b2f Amlogic driver updates for v4.14
- add SoC info driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJZlRc+AAoJEFk3GJrT+8ZleCwQAJUo268engY6X31m/DI6EUfM
 QypaVnu3gKaXfM02UXBS9/Cu2r0SQcdCALvfhrcejhMqUf+7jmRmclE87mbFxMaj
 nzzlhwJk+jGnLWzyhKfRoD4DS5Y+oC6WjKx6cjssG0El4g6Ha1wTate3ZI37N+No
 s4Ph+4o1MwuxpP/20YByUfvg78KySyhnqmZTLqQohj+gYsmMKH2AJIBHqf7Qi4NT
 f8TQXziGHes2flhvZLN29rnlOVWD2Xhi/z7b3e4XFeklwDhOrQBolkK2RKaY46qw
 63fypDobgsBQ/TRutcTESFh00tP9cND4A+KbvxsUflEH8bGQVCWIuTMqEEHU1G/w
 KYTIgvjm6ZzpQHcAv0rBnw9YoEi38VNUdwCK27KqXL/Y8ORwZXYoE+es78m56xWC
 GLBC4rwTmMdNlX/rCb4kXz2nqNLG+u3RF/2tn8dbNxgTYVsmzicECKFq0oX9X/Lv
 /2kZSIy6d78H91UaDXvkWm7u/hyIW/kGEzpAyhjXp3XvNh5b1DbVCHnuPjUgmyCD
 xs6SC+vI3qTeeBdSyiZaCSUg5gEqaGvQi1CZxVYEiu8izybwXKk1JK3xRjQh0BCV
 IaZtXuPyGsLXRhlX7cH6cK6zf0/SeVMma9+8IPHuHL+I7Hu2f5gTz8q0/A6WV4Fm
 QUA5k63cc+idv9Cvzq+e
 =J+R9
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers

Pull "Amlogic driver updates for v4.14" from Kevin Hilman:

- add SoC info driver

* tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  soc: Add Amlogic SoC Information driver
  dt-bindings: arm: amlogic: Add SoC information bindings
2017-08-17 11:04:58 +02:00
Gustavo A. R. Silva
db86ab0616 soc: versatile: remove unnecessary static in realview_soc_probe()
Remove unnecessary static on local variables syscon_regmap.
Such variables are initialized before being used, on every
execution path throughout the functions. The static has no
benefit and, removing it reduces the object file size.

This issue was detected using Coccinelle and the following
semantic patch:

@bad exists@
position p;
identifier x;
type T;
@@

static T x@p;
...
x = <+...x...+>

@@
identifier x;
expression e;
type T;
position p != bad.p;
@@

-static
 T x@p;
 ... when != x
     when strict
?x = e;

In the following log you can see the difference in the object file size.
This log is the output of the size command, before and after the code
change:

before:
   text    data     bss     dec     hex filename
   3339    2104     128    5571    15c3 drivers/soc/versatile/soc-realview.o

after:
   text    data     bss     dec     hex filename
   3321    2048      64    5433    1539 drivers/soc/versatile/soc-realview.o

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-16 22:28:27 +02:00
Arnd Bergmann
f822e60085 Renesas ARM Based SoC Drivers Updates for v4.14
Add R-Car D3 (r8a77995) support to the Renesas-specific SoC drivers
 - SoC identification
 - System controller
 - Reset controller
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZf0DrAAoJENfPZGlqN0++LacP/jcymVeUMDpkkPTcoM6b37Qq
 ADSDdiR+1Szu29wtfNDTFUoAlh4UvlpAN93GGJLZ/iYsMDyZYIhcUhnE4l119fdy
 6iMwDhctXHlQ8VNhY0Z9MUXZyyN2Fu/9L2ZDJ2briM2xoNiMgdUYvMlsZI8ZaN1/
 JRmfP+lzCM25Rkdi9sLYolj8szaxbW9RgLBgvXD7ERJ5bsJRKGs6aDrJ2AXMZpwn
 BVOeughlPTxvv+NVFA1qZXWh63/7RjW5t6OMgHw3eNOABKv+o5YfdqOZAa8PHgn9
 LhNAkR90Il9hsGesWwHMKPuCgGHE0R/2nQppWM0xBWO/HfMRnpx8DEt+em/Kjpep
 uxex+bqMOJB0GksVWPM73ci1CQmQxKS6xrTXeTE9kiN+6WD+b0Fsntoz2XN62uJO
 df0z46N6T3I4jFc00vOBnXxCdgDCBCJLxtU8NFg8jzmGP+NkKxxYiwCEs1auKlLF
 CUVX+o8H4V9FKnD3h0/mNsNyw/gCw6TWXlyr/Ba6AjBuZ8TghhMjQ+zbY+xCN9sb
 IFONbr69pVBJ9N2ssGWdf2iLfa+JNcaJdEPZUkumgUlZ9M5RgS+yg3YoTFtlAO6R
 JN2uP1E20qBLlrvAu7pv9HQEim80RyDT2DU2a1qFNx32vhqfl6g3sccJJvGpzodj
 7y7per6KkpvUGrck0kAI
 =AO//
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Pull "Renesas ARM Based SoC Drivers Updates for v4.14" from Simon Horman:

Add R-Car D3 (r8a77995) support to the Renesas-specific SoC drivers
- SoC identification
- System controller
- Reset controller

* tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: rcar-rst: Add support for R-Car D3
  soc: renesas: rcar-sysc: Add support for R-Car D3 power areas
  soc: renesas: Add r8a77995 SYSC PM Domain Binding Definitions
  soc: renesas: Identify R-Car D3
2017-08-16 21:55:03 +02:00
Arnd Bergmann
900452f304 Qualcomm ARM Based Driver Updates for v4.14
* Minor fixes for SMSM and WCNSS_CTRL
 * Move Qcom SoC drivers to submenu
 * Fix mdt_loader to use request_firmware_into_buf()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZk7qeAAoJEFKiBbHx2RXVR8MQAMeo4ESQT2+puYg1VQKXVS4l
 MPf+rBDkBUD+NiX8LBWa4xo9M8oyfB5oKI+X8u/PV5RXTVHcgcWBbycdR4BeasWg
 G1mAPS7o0/zqZkDsw/nPPhr8V/QkO22h/XjziWlU6/aqTxNw4AXNi/raRAV/Koi9
 /0WM8tQ3zPaqYagOoTeaSpNhVOJ931NEUIFxzvbkz5ul8vY0OQBNac/g/FcJoqUo
 RN9baKkX81z+HyxtYndQ1Js+cZMLjKo/ZfD++6aJNZg6N9zcBb5GVPJlwMxpHM0E
 4InbQWTmnEUtTGx5Pc5C9VghnElwFLSx7KcYkmnPFxJQGEnSdsfzXkeJ6lDBeIdh
 w7BCIVU97xbHTMMolYSDdwx9iPH0C96NcSPkSFFViOHNuWtBQSzaoSDQymwFDoXD
 fN2I8L8guyOMMe/mZG/I3LdHgaNZODuGB744Cc6/NxnEZKL6hBpu6MreMvJRSlvm
 kvktkS/WylAf1ucvTV/kcI1Y2x5bupymYLbyb8irqs5VSt2XGK8cUN9pgPycepyq
 5EX2NHWfUZAUyJHNZvxya8wXkaARXHZvV6TLJAXYsI97qg/ctzM+u0YZMXTzpkXB
 pMMKOB+8MoC8tIJoMwcT8LfjjjtS8ZiVfpSgGlRzDdt35EBWznxTE1RR7w9PtDqW
 YPbRR7ytQsVhnUDkG7OP
 =gnby
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers

Pull "Qualcomm ARM Based Driver Updates for v4.14" from Andy Gross:

* Minor fixes for SMSM and WCNSS_CTRL
* Move Qcom SoC drivers to submenu
* Fix mdt_loader to use request_firmware_into_buf()

* tag 'qcom-drivers-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  soc: qcom: mdt_loader: Use request_firmware_into_buf()
  soc: qcom: bring all qcom drivers into a submenu
  soc: qcom: wcnss_ctrl: add missing MODULE_DEVICE_TABLE()
  soc: qcom: smsm: fix of_node refcnting problem
2017-08-16 21:49:26 +02:00
Arnd Bergmann
526ca89ebe Powerdomain support for rk3366 and disabling of the automatic
jtag/sdmmc switching for rk3328.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAlmEP/AQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgf/lCACcJnVGr9PB9ibmTo7LASmljN+OP2G+9o3i
 sOlxlkh5eM5sh9Tbg0NPVBziPmTYhBoPrFQjGEvt01m62gAOf7wugPRStKAivL7h
 /pAUhkL1f4yIR0AnplLgy4+9wNJ7zK5DCj4dDCwd0+vX+aZbgDACPLdqn0afwuu2
 g8pA3C5fRvThVjNpXzwHQSicUOmsvHPWpOWzx1YiKnXxXGKO0Xev+jDseWGqTMXR
 8BXtb62G0QMHGgnrEu2TFex+SzdTumv9r4NpxP3+uytSQogbWUwCUAWpLxxxvgEJ
 dAX9VcTaaJU3CMUwKot1mqmec0wElbwogx961An9bi4EoE+ru4Lt
 =YgWd
 -----END PGP SIGNATURE-----

Merge tag 'v4.14-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers

Pull "Rockchip driver changes for 4.14" from Heiko Stübner:

Powerdomain support for rk3366 and disabling of the automatic
jtag/sdmmc switching for rk3328.

* tag 'v4.14-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: power-domain: add power domain support for rk3366
  dt-bindings: add binding for rk3366 power domains
  dt-bindings: power: add RK3366 SoCs header for power-domain
  soc: rockchip: disable jtag switching for RK3328 Soc
2017-08-16 21:47:09 +02:00
Rob Herring
37c342cba5 soc: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Scott Wood <oss@buserror.net>
Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-16 21:32:36 +02:00
Arnd Bergmann
64c2c372db i.MX fixes for 4.13, round 2:
- Add missing 'ranges' property for i.MX25 device tree TSCADC node, so
    that it's child nodes ADC and TSC device can be probed by kernel.
  - Fix i.MX GPCv2 power domain driver to request regulator after power
    domain initialization, since regulator could defer probing and
    therefore cause power domain initialized twice.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJZhcIQAAoJEFBXWFqHsHzO6N8H/1Uyq0u3a6T29U3BeI6CBKuD
 ACYVHKv+eZCk4uMjmVknWTsMKaoGtho52TThd7GYwLxCSB4lmjurXnOpnSbMmgVX
 Tl1XfCrmZECf4M0e5eTPbHbfMAI+EJXzNc8echgiLpJwA8rqQ/u9tJ0hxJjviDaI
 KtUL01MT5ZfkLD6gXZnBvWA2BvU5ibatgLq1gX2WYONkGwp1aombzcYgM7ADw9NY
 xEvJHLb5uVoQRUECW25evQ54leBj0YeoOWFgvjMvFrR9kr/H/LSCG0cKQidCcv1C
 v85d6GcYZq/GWtlZn8ThbeQJS044S8KnLS9/z3cqXXjllN5tBB6wEM1s1XcwxKY=
 =u055
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

Pull "i.MX fixes for 4.13, round 2" from Shawn Guo:

 - Add missing 'ranges' property for i.MX25 device tree TSCADC node, so
   that it's child nodes ADC and TSC device can be probed by kernel.
 - Fix i.MX GPCv2 power domain driver to request regulator after power
   domain initialization, since regulator could defer probing and
   therefore cause power domain initialized twice.

* tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: i.MX25: add ranges to tscadc
  soc: imx: gpcv2: fix regulator deferred probe
2017-08-15 17:34:52 +02:00
Sean Wang
52510ee934 soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
Add SCPSYS power domain driver for MT7622 SoC having four power domains
which are respectively ETHSYS for Ethernet including embedded switch,
WBSYS for WIFI and Bluetooth, HIF0SYS for PCI-E and SATA, and HIF1SYS for
USB. Those functions could be selectively powered gated when the
corresponding function is no longer to use in order to reach more minimal
power dissipation.

Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2017-08-14 17:28:40 +02:00
Sean Wang
53fddb1a66 soc: mediatek: reduce code duplication of scpsys_probe across all SoCs
Reduce code duplication of scpsys_probe_mtXXXX across all SoCs using
the more generic scpsys_probe all covering all cases to avoid starting
to bloat the driver when more MediaTek SoCs supported are added.

Suggested-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2017-08-14 17:28:27 +02:00
Bjorn Andersson
445c2410a4 soc: qcom: mdt_loader: Use request_firmware_into_buf()
By switching to the request_firmware_into_buf() we load the segment data
straight into the preallocated buffers, reducing the need for allocating
scratch buffers for these. In particular the modem firmware consists of
multiple segments in the range 5-15MB, making this worth while.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-08 17:41:23 -05:00
Srinivas Kandagatla
2a464815d3 soc: qcom: bring all qcom drivers into a submenu
As the number of qcom drivers increase, entries in SOC menu looks
scattered with other SOC drivers. Make a submenu for Qcom drivers
to make it visibly clear while selecting qcom SOC specific drivers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-08 14:39:17 -05:00
Rob Clark
b833990901 soc: qcom: wcnss_ctrl: add missing MODULE_DEVICE_TABLE()
This fixes a problem of wifi module not loading on db410c.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-08 14:37:42 -05:00
Rob Clark
3e8b554114 soc: qcom: smsm: fix of_node refcnting problem
of_find_node_with_property() drops the reference to the 'from' node,
which eventually (after enough -EPROBE_DEFERs) drops the last reference
to the node causing all sorts of fun problems, and this nice splat.

  BUG: sleeping function called from invalid context at ../kernel/locking/mutex.c:747
  in_atomic(): 1, irqs_disabled(): 128, pid: 33, name: kworker/0:1
  4 locks held by kworker/0:1/33:
   #0:  ("events"){.+.+.+}, at: [<ffff0000080fa91c>] process_one_work+0x1a4/0x728
   #1:  (deferred_probe_work){+.+.+.}, at: [<ffff0000080fa91c>] process_one_work+0x1a4/0x728
   #2:  (&dev->mutex){......}, at: [<ffff000008676078>] __device_attach+0x30/0x168
   #3:  (devtree_lock){......}, at: [<ffff000008828fd0>] of_find_node_with_property+0x30/0xe0
  irq event stamp: 18976
  hardirqs last  enabled at (18975): [<ffff00000815794c>] __down_trylock_console_sem+0x74/0xb8
  hardirqs last disabled at (18976): [<ffff0000089e26d4>] _raw_spin_lock_irqsave+0x2c/0x78
  softirqs last  enabled at (16880): [<ffff0000080e0f00>] __do_softirq+0x580/0x640
  softirqs last disabled at (16871): [<ffff0000080e13a4>] irq_exit+0xe4/0x138
  CPU: 0 PID: 33 Comm: kworker/0:1 Tainted: G            E   4.12.0-rc5+ #1455
  Hardware name: qualcomm dragonboard410c/dragonboard410c, BIOS 2017.07-rc1-00234-g22fa70a-dirty 06/26/2017
  Workqueue: events deferred_probe_work_func
  Call trace:
  [<ffff000008089ee0>] dump_backtrace+0x0/0x230
  [<ffff00000808a134>] show_stack+0x24/0x30
  [<ffff0000084e1944>] dump_stack+0xac/0xe8
  [<ffff00000810d7e0>] ___might_sleep+0x150/0x230
  [<ffff00000810d918>] __might_sleep+0x58/0x90
  [<ffff0000089dde18>] __mutex_lock+0x50/0x870
  [<ffff0000089de674>] mutex_lock_nested+0x3c/0x50
  [<ffff000008388ae0>] kernfs_remove+0x30/0x50
  [<ffff00000838b720>] sysfs_remove_dir+0x58/0x70
  [<ffff0000084e393c>] kobject_del+0x1c/0x58
  [<ffff0000084e374c>] kobject_put+0xb4/0x208
  [<ffff00000882c364>] of_node_put+0x24/0x30
  [<ffff000008829018>] of_find_node_with_property+0x78/0xe0
  [<ffff000000aff5f4>] qcom_smsm_probe+0x194/0x720 [smsm]
  [<ffff0000086793b4>] platform_drv_probe+0x74/0x110
  [<ffff0000086765bc>] driver_probe_device+0x2b4/0x420
  [<ffff000008676920>] __device_attach_driver+0xd0/0x150
  [<ffff000008673e78>] bus_for_each_drv+0x68/0xa8
  [<ffff00000867611c>] __device_attach+0xd4/0x168
  [<ffff000008676a1c>] device_initial_probe+0x24/0x30
  [<ffff000008675380>] bus_probe_device+0xa0/0xa8
  [<ffff000008675948>] deferred_probe_work_func+0xb8/0xf8
  [<ffff0000080fa9d4>] process_one_work+0x25c/0x728
  [<ffff0000080faef4>] worker_thread+0x54/0x3d8
  [<ffff0000081031d8>] kthread+0x110/0x140
  [<ffff000008082d90>] ret_from_fork+0x10/0x40
  OF: ERROR: Bad of_node_put() on /smsm
  CPU: 0 PID: 33 Comm: kworker/0:1 Tainted: G        W   E   4.12.0-rc5+ #1455
  Hardware name: qualcomm dragonboard410c/dragonboard410c, BIOS 2017.07-rc1-00234-g22fa70a-dirty 06/26/2017
  Workqueue: events deferred_probe_work_func

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-08 14:37:42 -05:00
Stefan Agner
9e01e2d56d soc: imx: gpcv2: fix regulator deferred probe
If a regulator requests a deferred probe, the power domain gets
initialized twice. This leads to a list double add (without
list debugging the kernel hangs due to the double add later):

  WARNING: CPU: 0 PID: 19 at lib/list_debug.c:31 __list_add_valid+0xbc/0xc4
  list_add double add: new=c1229754, prev=c12383b4, next=c1229754.

Initialize the power domain after we get the regulator. Also do
not print an error in case the regulator defers probing.

Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Fixes: 03aa12629f ("soc: imx: Add GPCv2 power gating driver")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-08-05 11:12:20 +08:00
Bjorn Andersson
c4d77d5fcd soc: qcom: GLINK SSR notifier
This driver register as a subsystem restart notifier and will send out
notifications to remote processors that has opened the "glink_ssr" GLINK
channel.

This mechanism is used to signal any GLINK participants that a 3rd party
is gone and that the communication state has to be reset; i.e. that read
and write pointers of the GLINK FIFOs are stale.

Acked-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-08-02 12:43:29 -07:00
Arvind Yadav
2ae24fb16c soc: mtk-pmic-wrap: make of_device_ids const.
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Chen Zhong <chen.zhong@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2017-08-02 12:38:53 +02:00
Tuomas Tynkkynen
0c106e57de soc/tegra: Fix bad of_node_put() in powergate init
The for_each_child_of_node macro itself maintains the correct reference
count of the nodes so the explicit of_node_put() call causes a warning:

[    0.098960] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusba
[    0.098981] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.3 #1-NixOS
[    0.098996] Hardware name: NVIDIA Jetson TX1 Developer Kit (DT)
[    0.099011] Call trace:
[    0.099034] [<ffff00000808a048>] dump_backtrace+0x0/0x2a0
[    0.099051] [<ffff00000808a30c>] show_stack+0x24/0x30
[    0.099069] [<ffff0000084a6494>] dump_stack+0x9c/0xc0
[    0.099090] [<ffff000008992214>] of_node_release+0xa4/0xa8
[    0.099107] [<ffff0000084a9270>] kobject_put+0x90/0x1f8
[    0.099124] [<ffff0000089914ac>] of_node_put+0x24/0x30
[    0.099140] [<ffff00000898cec4>] __of_get_next_child+0x4c/0x70
[    0.099155] [<ffff00000898cf28>] of_get_next_child+0x40/0x68
[    0.099173] [<ffff0000090a099c>] tegra_pmc_early_init+0x4e8/0x5ac
[    0.099189] [<ffff00000808399c>] do_one_initcall+0x5c/0x168
[    0.099206] [<ffff000009050c98>] kernel_init_freeable+0xd4/0x240
[    0.099224] [<ffff000008b2d658>] kernel_init+0x18/0x108
[    0.099238] [<ffff0000080836c0>] ret_from_fork+0x10/0x50

(It's not very apparent from the OF documentation that of_node_put() is
not needed; the macro itself has no docstring and of_get_next_child()
used in the implementation begins with "Returns a node pointer with
refcount incremented" but then only at the very end of the docstring
the crucial part "Decrements the refcount of prev" is mentioned.)

Fixes: a38045121b ("soc/tegra: pmc: Add generic PM domain support")
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-07-31 12:08:55 +02:00
Neil Armstrong
a9daaba296 soc: Add Amlogic SoC Information driver
Amlogic SoCs have a SoC information register for SoC type, package type and
revision information.
This patchs adds support for this register decoding and exposing with the
SoC bus infrastructure.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-07-28 09:25:07 -07:00