ARM: SoC: platform support for v4.2
Our SoC branch usually contains expanded support for new SoCs and other core platform code. Some highlights from this round: - sunxi: SMP support for A23 SoC - socpga: big-endian support - pxa: conversion to common clock framework - bcm: SMP support for BCM63138 - imx: support new I.MX7D SoC - zte: basic support for ZX296702 SoC Conflicts: arch/arm/mach-socfpga/core.h Trivial remove/remove conflict with our cleanup branch. Resolution: remove both sides -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVi4RMAAoJEFk3GJrT+8Zl6/kP/1Rv9O++1Kxua6R54Og6AF1J 0miFr2fnUrUWUYg/NVbseRH5bBe6N6ir3SQMfde8W2/QibEjOoEwSwrle+mC/eiq CE0x0gtyRvXMrMU/FWkOvbmmw9uv5oz1z3IHZV6AiecNuSMLUBPfamryikQ8C+d1 O/QZtX543tJQJDOBihO5cuhoVVM37UX0unNmqGsyswlyqTPF8FxcIJAYVNtnxjmj AFaOB0nDJKLKFTiX2Ype2wOxxJX1lrLatNo4W4T+YaaK+i1uCOhgTdSN+n49K7YA KNDFEgZFQqT8VMJyG+eJVeYF+cI7yWQ7lBzIftPUjPk/7+dIHBjWPz2QdjVz3U38 kxncf4S9xGAF5G2rcKe4mFrfT3Y8QLWQpA/jFs06yLwW1O3Hlfq3DzMdGNcF7hth 17LOP8namn9+NepZEp/vAlFzRRypxWWtbkPNBIItkImC6zn0IiGjBy50DE1io27W hmQcnMb7d+0wWl2Y8OmR2lZSB97JiRZkRYMCVHVt+0zGJzp4prLvl9wbjh1VXkPv ERCDJ9nCmZsl7ZVmIXMI7KNXYuPNp7R/QAzCvuSUueswF0qxTAQ0VSSBwRMqvQsQ UUNC6p63VnjUeMUdn2EBsUQZ0Uqw3t2U5TtvooHNt9FkiGsSpwjWrvVD+LItaPoJ GPeeJrJaYQsDvTrO8wjU =ZtPK -----END PGP SIGNATURE----- Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform support updates from Kevin Hilman: "Our SoC branch usually contains expanded support for new SoCs and other core platform code. Some highlights from this round: - sunxi: SMP support for A23 SoC - socpga: big-endian support - pxa: conversion to common clock framework - bcm: SMP support for BCM63138 - imx: support new I.MX7D SoC - zte: basic support for ZX296702 SoC" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (134 commits) ARM: zx: Add basic defconfig support for ZX296702 ARM: dts: zx: add an initial zx296702 dts and doc clk: zx: add clock support to zx296702 dt-bindings: Add #defines for ZTE ZX296702 clocks ARM: socfpga: fix build error due to secondary_startup MAINTAINERS: ARM64: EXYNOS: Extend entry for ARM64 DTS ARM: ep93xx: simone: support for SPI-based MMC/SD cards MAINTAINERS: update Shawn's email to use kernel.org one ARM: socfpga: support suspend to ram ARM: socfpga: add CPU_METHOD_OF_DECLARE for Arria 10 ARM: socfpga: use CPU_METHOD_OF_DECLARE for socfpga_cyclone5 ARM: EXYNOS: register power domain driver from core_initcall ARM: EXYNOS: use PS_HOLD based poweroff for all supported SoCs ARM: SAMSUNG: Constify platform_device_id ARM: EXYNOS: Constify irq_domain_ops ARM: EXYNOS: add coupled cpuidle support for Exynos3250 ARM: EXYNOS: add exynos_get_boot_addr() helper ARM: EXYNOS: add exynos_set_boot_addr() helper ARM: EXYNOS: make exynos_core_restart() less verbose ARM: EXYNOS: fix exynos_boot_secondary() return value on timeout ...
This commit is contained in:
commit
4aa705b18b
217 changed files with 6574 additions and 2063 deletions
88
include/linux/reset/bcm63xx_pmb.h
Normal file
88
include/linux/reset/bcm63xx_pmb.h
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Broadcom BCM63xx Processor Monitor Bus shared routines (SMP and reset)
|
||||
*
|
||||
* Copyright (C) 2015, Broadcom Corporation
|
||||
* Author: Florian Fainelli <f.fainelli@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation version 2.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
||||
* kind, whether express or implied; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#ifndef __BCM63XX_PMB_H
|
||||
#define __BCM63XX_PMB_H
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
/* PMB Master controller register */
|
||||
#define PMB_CTRL 0x00
|
||||
#define PMC_PMBM_START (1 << 31)
|
||||
#define PMC_PMBM_TIMEOUT (1 << 30)
|
||||
#define PMC_PMBM_SLAVE_ERR (1 << 29)
|
||||
#define PMC_PMBM_BUSY (1 << 28)
|
||||
#define PMC_PMBM_READ (0 << 20)
|
||||
#define PMC_PMBM_WRITE (1 << 20)
|
||||
#define PMB_WR_DATA 0x04
|
||||
#define PMB_TIMEOUT 0x08
|
||||
#define PMB_RD_DATA 0x0C
|
||||
|
||||
#define PMB_BUS_ID_SHIFT 8
|
||||
|
||||
/* Perform the low-level PMB master operation, shared between reads and
|
||||
* writes.
|
||||
*/
|
||||
static inline int __bpcm_do_op(void __iomem *master, unsigned int addr,
|
||||
u32 off, u32 op)
|
||||
{
|
||||
unsigned int timeout = 1000;
|
||||
u32 cmd;
|
||||
|
||||
cmd = (PMC_PMBM_START | op | (addr & 0xff) << 12 | off);
|
||||
writel(cmd, master + PMB_CTRL);
|
||||
do {
|
||||
cmd = readl(master + PMB_CTRL);
|
||||
if (!(cmd & PMC_PMBM_START))
|
||||
return 0;
|
||||
|
||||
if (cmd & PMC_PMBM_SLAVE_ERR)
|
||||
return -EIO;
|
||||
|
||||
if (cmd & PMC_PMBM_TIMEOUT)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
udelay(1);
|
||||
} while (timeout-- > 0);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static inline int bpcm_rd(void __iomem *master, unsigned int addr,
|
||||
u32 off, u32 *val)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ret = __bpcm_do_op(master, addr, off >> 2, PMC_PMBM_READ);
|
||||
*val = readl(master + PMB_RD_DATA);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int bpcm_wr(void __iomem *master, unsigned int addr,
|
||||
u32 off, u32 val)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
writel(val, master + PMB_WR_DATA);
|
||||
ret = __bpcm_do_op(master, addr, off >> 2, PMC_PMBM_WRITE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* __BCM63XX_PMB_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue