Commit Graph

161 Commits

Author SHA1 Message Date
Hauke Mehrtens
f4ce7effe2 ARM: BCM5310X: activate erratas needed for SoC
The BCM4708 I have, which is probably the first generation which got
to the consumer market, is using a ARM Cortex-A9 rev r3p0 and a
L2C-310 rev r3p2 L2 cache controller. There are 3 workarounds for known
erratas in the Linux kernel which could be activated and will be in
this patch. There are currently no workarounds which have to be
activated for the L2C-310 rev r3p2 in Linux.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-11-24 16:02:23 -08:00
Lucas Stach
937b12306e ARM: BCM5301X: remove workaround imprecise abort fault handler
This is not needed anymore. Handling a potentially pending imprecise external
abort left behind by the bootloader is now done in a slightly safer way inside
the common ARM startup code.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-11-24 16:00:26 -08:00
Linus Torvalds
56e0464980 ARM: SoC platform updates for v4.4
New and/or improved SoC support for this release:
 
  - Marvell Berlin:
    * Enable standard DT-based cpufreq
    * Add CPU hotplug support
  - Freescale:
    * Ethernet init for i.MX7D
    * Suspend/resume support for i.MX6UL
  - Allwinner:
    * Support for R8 chipset (used on NTC's $9 C.H.I.P board)
  - Mediatek:
    * SMP support for some platforms
  - Uniphier:
    * L2 support
    * Cleaned up SMP support, etc.
 
 + A handful of other patches around above functionality, and a few other
 smaller changes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWQCmaAAoJEIwa5zzehBx3F/0QAKIYmvmJM3sUanNEEwhRilx+
 3xhSgld7e25suLGwrNapTkd8VzVB4b8GnJhNShNk+l5WqfqICHCB4Aru2NmJHY8V
 yPj5vBrgJTVMnIiH7CRDPz9IlwAkWM4MmWi4PgFuhrk1T/0wPKPNMc40OWOloTeD
 gA5YmbbX1hNOqKoI/z+DK7CEdp1lHrEjeYIbnQ0SldFzkY9NKhrI784gtcz3si6E
 19pFQ9LA7EtEv7aRcFOA0sazeooa2wiJ9P9L31Mn5APZBJj5H8HjyKdvOmJ8neQn
 +b77Tya11Q70U57uDq69l0rl58fpy650uTwYaLNGWmUdTgOiGMWN05lvIVNrQd/R
 gP+VEQDGsTH6kqOCy9gyLCmn9q9I7l0t9lwcu5TP52Xy9vqVq9rb388MkcPcsWk8
 cYPvD8RcSaywZUV3YJgbYozBfVuf5rLVus6D54pMXe3N12KGaNBt8kk4co4jBwvh
 b//1urA82cdlEAZ/kiqHXjRMq/ht+dxtb6sSVOJ9frxPLuc7g1z4ORC+Z0PTS5WC
 zB0hMzPnTwXeqHcYpV4wP/vGtgZGpLevBkK7pKVdqKZykV8BS4FiT4HFp6Rghxs3
 dxAz7JjQUle6KOX7YfuHdpLnyZFWQvLYyTn946xGKpw2QH/iWLwECpet2I87QzVs
 QkEkGygPhK4QcGccxz9N
 =h5xk
 -----END PGP SIGNATURE-----

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

Pull ARM SoC platform updates from Olof Johansson:
 "New and/or improved SoC support for this release:

  Marvell Berlin:
     - Enable standard DT-based cpufreq
     - Add CPU hotplug support

  Freescale:
     - Ethernet init for i.MX7D
     - Suspend/resume support for i.MX6UL

  Allwinner:
     - Support for R8 chipset (used on NTC's $9 C.H.I.P board)

  Mediatek:
     - SMP support for some platforms

  Uniphier:
     - L2 support
     - Cleaned up SMP support, etc.

  plus a handful of other patches around above functionality, and a few
  other smaller changes"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (42 commits)
  ARM: uniphier: rework SMP operations to use trampoline code
  ARM: uniphier: add outer cache support
  Documentation: EXYNOS: Update bootloader interface on exynos542x
  ARM: mvebu: add broken-idle option
  ARM: orion5x: use mac_pton() helper
  ARM: at91: pm: at91_pm_suspend_in_sram() must be 8-byte aligned
  ARM: sunxi: Add R8 support
  ARM: digicolor: select pinctrl/gpio driver
  arm: berlin: add CPU hotplug support
  arm: berlin: use non-self-cleared reset register to reset cpu
  ARM: mediatek: add smp bringup code
  ARM: mediatek: enable gpt6 on boot up to make arch timer working
  soc: mediatek: Fix random hang up issue while kernel init
  soc: ti: qmss: make acc queue support optional in the driver
  soc: ti: add firmware file name as part of the driver
  Documentation: dt: soc: Add description for knav qmss driver
  ARM: S3C64XX: Use PWM lookup table for mach-smartq
  ARM: S3C64XX: Use PWM lookup table for mach-hmt
  ARM: S3C64XX: Use PWM lookup table for mach-crag6410
  ARM: S3C64XX: Use PWM lookup table for smdk6410
  ...
2015-11-10 14:56:23 -08:00
Arnd Bergmann
1e9bc9d636 ARM: cygnus: fix link failures when CONFIG_COMMON_CLK_IPROC is disabled
When CONFIG_CYGNUS is set but CONFIG_COMMON_CLK_IPROC is disabled, the
following link failures are caused:

drivers/built-in.o: In function `cygnus_armpll_init':
:(.init.text+0x1d290): undefined reference to `iproc_armpll_setup'
drivers/built-in.o: In function `cygnus_genpll_clk_init':
:(.init.text+0x1d2c4): undefined reference to `iproc_pll_clk_setup'
drivers/built-in.o: In function `cygnus_lcpll0_clk_init':
:(.init.text+0x1d304): undefined reference to `iproc_pll_clk_setup'
drivers/built-in.o: In function `cygnus_mipipll_clk_init':
:(.init.text+0x1d344): undefined reference to `iproc_pll_clk_setup'
drivers/built-in.o: In function `cygnus_asiu_init':
:(.init.text+0x1d370): undefined reference to `iproc_asiu_setup'

It is fixed it by always selecting COMMON_CLK_IPROC from
ARCH_BCM_IPROC, and making COMMON_CLK_IPROC a silent option (thus
preventing it from being erroneously disabled by a user).

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jon Mason <jonmason@broadcom.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-10-21 16:52:57 -07:00
Florian Fainelli
c4a8ea9e06 ARM: brcmstb: Setup BIU control registers during boot
Call brcmstb_biuctrl_init() in brcmstb's init_irq machine descriptor
callback since we need to setup the Bus Interface Unit before SMP in
particular, but we also need to be able to remap registers.

Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-10-09 13:42:18 -07:00
Brian Norris
d52fad2620 soc: add stubs for brcmstb SoC's
Used on BCM7xxx Set-Top Box chips (e.g., BCM7445).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-09-14 15:44:18 -07:00
Jon Mason
1f3e9a6eda ARM: NSP: Add basic support for Broadcom Northstar Plus SoC
Broadcom Northstar Plus family of SoCs are used for switching
control and management applications as well as residential
router/gateway applications. The SoC features dual core Cortex
A9 ARM CPUs, integrating several peripheral interfaces including
multiple Gigabit Ethernet PHYs, DDR3 memory, PCIE Gen-2, USB 2.0
and USB 3.0, serial and NAND flash, SATA and several other IO
controllers.

Signed-off-by: Kapil Hali <kapilh@broadcom.com>
Signed-off-by: Jon Mason <jonmason@broadcom.com>
Acked-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-09-14 15:44:18 -07:00
Linus Torvalds
50686e8a3a ARM: SoC platform updates for v4.3
New or improved SoC support:
 
 - Addition of support for Atmel's SAMA5D2 SoC
 - Addition of Freescale i.MX6UL
 - Improved support of TI's DM814x platform
 - Misc fixes and improvements for RockChip platforms
 - Marvell MVEBU suspend/resume support
 
 A few driver changes that ideally would belong in the drivers branch are
 also here (acked by appropriate maintainers):
 
 - Power key input driver for Freescale platforms (svns)
 - RTC driver updates for Freescale platforms (svns/mxc)
 - Clk fixes for TI DM814/816X
 
 + a bunch of other changes for various platforms
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV5Mo6AAoJEIwa5zzehBx3VnMP/28LFJVUjIbd2xjJBo2gbSwV
 jN7uGlTkKU+1kHjZqnUPuirlBxBzsXKgRfBvCoeu0cPOggwmFcaF915/HHPz7xuz
 vTP7k98+Y5nSXScIohWkWCdZTpKKjve4sn74rXmiNakTUiuaHf5lKut/m7ldVrWd
 hN1o9W4LN+5O1mOYbc9ZD98v3bkDb6eu+a22oK7qemXiEiQi+NIMoDx+IR2bd4pA
 FeDaW7sOFWTEYU/p+M5nZNvI3n53P0/mlB5rPRiAYRjhQf9DrWHm5G7HdnMkUkgo
 /s8/QlVjBkJwhkY0TqpwtHY23JjSSB6UtCnXzb1eVAkX1nJN6PJQpcpCz1zJhd9q
 +sJ2k1zEvrfomJCK7/iZ1ubQE09KlJLEeb8xi5xCwD0MBOBAYC31bovDVAswCitV
 8NHnfltEG+wCMyX955eqqGkVxkcw8sJMJUK5A95aK6w+vKqjd7gUgLJjXFC1u4eN
 ECuVVUf1hVmUEmM799CDayTlfGDt4oGLmHGao+SiSCVc1XbG9HkWr7Lcgr6u9UHr
 lNv3RIe6Axb85xxIU0/9hqLHrtB85uEQjjlbnQx3o7u8RsSOeaiZvCz4BzcjP9E1
 VGyD6zkRWhuDiMFlPVXiAX0qIH5xSjIWkC0wPNJNy8eWFH9tkfGL0mOlLbl09oGR
 gtuvOrjbF/BhILkPw38y
 =8T5Z
 -----END PGP SIGNATURE-----

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

Pull ARM SoC platform updates from Olof Johansson:
 "New or improved SoC support:

   - add support for Atmel's SAMA5D2 SoC
   - add support for Freescale i.MX6UL
   - improved support for TI's DM814x platform
   - misc fixes and improvements for RockChip platforms
   - Marvell MVEBU suspend/resume support

  A few driver changes that ideally would belong in the drivers branch
  are also here (acked by appropriate maintainers):

   - power key input driver for Freescale platforms (svns)
   - RTC driver updates for Freescale platforms (svns/mxc)
   - clk fixes for TI DM814/816X

  + a bunch of other changes for various platforms"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (83 commits)
  ARM: rockchip: pm: Fix PTR_ERR() argument
  ARM: imx: mach-imx6ul: Fix allmodconfig build
  clk: ti: fix for definition movement
  ARM: uniphier: drop v7_invalidate_l1 call at secondary entry
  memory: kill off set_irq_flags usage
  rtc: snvs: select option REGMAP_MMIO
  ARM: brcmstb: select ARCH_DMA_ADDR_T_64BIT for LPAE
  ARM: BCM: Enable ARM erratum 798181 for BRCMSTB
  ARM: OMAP2+: Fix power domain operations regression caused by 81xx
  ARM: rockchip: enable PMU_GPIOINT_WAKEUP_EN when entering shallow suspend
  ARM: rockchip: set correct stabilization thresholds in suspend
  ARM: rockchip: rename osc_switch_to_32k variable
  ARM: imx6ul: add fec MAC refrence clock and phy fixup init
  ARM: imx6ul: add fec bits to GPR syscon definition
  rtc: mxc: add support of device tree
  dt-binding: document the binding for mxc rtc
  rtc: mxc: use a second rtc clock
  ARM: davinci: cp_intc: use IRQCHIP_SKIP_SET_WAKE instead of irq_set_wake callback
  soc: mediatek: Fix SCPSYS compilation
  ARM: at91/soc: add basic support for new sama5d2 SoC
  ...
2015-09-01 12:18:40 -07:00
Gregory Fong
b78bda5fd8 ARM: brcmstb: select ARCH_DMA_ADDR_T_64BIT for LPAE
Broadcom STB (BRCMSTB) has some 64-bit capable DMA and therefore needs
dma_addr_t to be a 64-bit size.  One user is the Broadcom SATA3 AHCI
controller driver.

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-08-11 15:18:29 +02:00
Gregory Fong
aeaeba1b6f ARM: BCM: Enable ARM erratum 798181 for BRCMSTB
Commit 04fcab32d3 ("ARM: 8111/1: Enable
erratum 798181 for Broadcom Brahma-B15") enables this erratum for
affected Broadcom Brahma-B15 CPUs when CONFIG_ARM_ERRATA_798181=y.
Let's make sure that config option is actually set.

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-08-11 15:18:28 +02:00
Nicolas Pitre
19c233b79d ARM: appropriate __init annotation for const data
Init data marked const should be annotated with __initconst for
correctness and not __initdata.  In some cases the array gathering
references to that data has to be marked const as well. This fixes
LTO builds that otherwise fail with section mismatch errors.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-07-28 13:55:27 +02:00
Florian Fainelli
ffb910d7b8 ARM: BCM63xx: Remove custom secondary_startup function
With commit 02b4e2756e ("ARM: v7 setup
function should invalidate L1 cache"), the default secondary_startup
function for ARMv7 CPUs does invalidate the L1 cache, which was the sole
reason why BCM63xx had to have its own secondary_startup implementation.

Now that the secondary_startup takes care of this, we can completely
remove that code.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-07-11 18:33:51 -07:00
Sudeep Holla
a6b4b25bd1 ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary
of_get_cpu_node provides the device node associated with the given
logical CPU and cpu_logical_map contains the physical id for each CPU
in the logical ordering. Passing cpu_logical_map(cpu) to of_get_cpu_node
is incorrect.

This patch fixes the issue by passing the logical CPU number to
of_get_cpu_node

Fixes: ed5cd8163d ("ARM: BCM63xx: Add SMP support for BCM63138")
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-07-11 18:33:44 -07:00
Florian Fainelli
d80d942bcc ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
This reverts 7dc95b40f5 ("ARM: BCM: Enable
NAND support for iProc SoCs") since it creates an unmet dependency for
MTD_NAND_BRCMNAND which depends on MTD and MTD_NAND, this results in the
following build failure for brcmnand:

 LD      init/built-in.o
drivers/built-in.o: In function `brcmnand_remove':
/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:2234:
undefined reference to `nand_release'
drivers/built-in.o: In function `brcmnand_init_cs':
/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:1933:
undefined reference to `nand_scan_ident'
/home/fainelli/dev/linux/drivers/mtd/nand/brcmnand/brcmnand.c:1958:
undefined reference to `nand_scan_tail'
Makefile:931: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

Instead, select this driver an all dependencies on the
multi_v7_defconfig.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-07-01 13:04:13 -07:00
Kevin Hilman
03fa626774 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' into test-merge

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

# gpg: Signature made Wed Jun 24 21:32:12 2015 PDT using RSA key ID D3FBC665
# gpg: Good signature from "Kevin Hilman <khilman@deeprootsystems.com>"
# gpg:                 aka "Kevin Hilman <khilman@linaro.org>"
# gpg:                 aka "Kevin Hilman <khilman@kernel.org>"

# Conflicts:
#	arch/arm/mach-socfpga/core.h
2015-06-24 21:32:13 -07:00
Arnd Bergmann
c9531b4f15 Merge tag 'arm-soc/for-4.2/soc-part2' of http://github.com/broadcom/stblinux into next/soc
Merge "changes for Broadcom SoCs":

- Dan fixes an error path in the BCM63xx SMP code

- Ray adds the relevant Kconfig selects to enable the Broadcom NAND driver on Cygnus

- Kevin provides a change to the Broadcom GISB arbiter driver to make it work with
  MIPS-based big-endian STB SoCs (this was a long-standing change that had dependencies on
  code in drivers/of/*)

- Gregory enables the use of GPIOLIB for brcmstb SoCs and bumps the number of GPIOs for
  these platforms

* tag 'arm-soc/for-4.2/soc-part2' of http://github.com/broadcom/stblinux:
  ARM: brcmstb: Add default gpio number
  ARM: brcmstb: Select ARCH_WANT_OPTIONAL_GPIOLIB
  bus: brcmstb_gisb: Honor the "big-endian" and "native-endian" DT properties
  ARM: BCM: Enable NAND support for iProc SoCs
  ARM: BCM63xx: fix an error path in bcm63xx_pmb_power_on_cpu()
2015-06-01 17:54:31 +02:00
Russell King
02b4e2756e ARM: v7 setup function should invalidate L1 cache
All ARMv5 and older CPUs invalidate their caches in the early assembly
setup function, prior to enabling the MMU.  This is because the L1
cache should not contain any data relevant to the execution of the
kernel at this point; all data should have been flushed out to memory.

This requirement should also be true for ARMv6 and ARMv7 CPUs - indeed,
these typically do not search their caches when caching is disabled (as
it needs to be when the MMU is disabled) so this change should be safe.

ARMv7 allows there to be CPUs which search their caches while caching is
disabled, and it's permitted that the cache is uninitialised at boot;
for these, the architecture reference manual requires that an
implementation specific code sequence is used immediately after reset
to ensure that the cache is placed into a sane state.  Such
functionality is definitely outside the remit of the Linux kernel, and
must be done by the SoC's firmware before _any_ CPU gets to the Linux
kernel.

Changing the data cache clean+invalidate to a mere invalidate allows us
to get rid of a lot of platform specific hacks around this issue for
their secondary CPU bringup paths - some of which were buggy.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 11:30:26 +01:00
Gregory Fong
8820949d21 ARM: brcmstb: Select ARCH_WANT_OPTIONAL_GPIOLIB
Select ARCH_WANT_OPTIONAL_GPIOLIB from BRCMSTB to allow GPIOLIB and
GPIO_BRCMSTB to be enabled.

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-05-29 14:43:05 -07:00
Ray Jui
7dc95b40f5 ARM: BCM: Enable NAND support for iProc SoCs
Select CONFIG_MTD_NAND_BRCMNAND for all iProc SoCs

Signed-off-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-05-28 21:00:08 -07:00
Dan Carpenter
3cc630564e ARM: BCM63xx: fix an error path in bcm63xx_pmb_power_on_cpu()
We need to unlock and unmap some resourses before returning.

Fixes: 3f2a43c98d ('ARM: BCM63xx: Add secondary CPU PMB initialization sequence')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-05-27 10:31:52 -07:00
Arnd Bergmann
a4526915b6 Merge tag 'arm-soc/for-4.2/soc-take2' of http://github.com/broadcom/stblinux into next/soc
Merge mach-bcm changes from Florian Fainelli:

This pull request contains the following changes:

- Rafal adds an additional fault code to be ignored by the kernel on BCM5301X SoC

- BCM63138 SMP support which:
	* common code to control the PMB bus, to be shared with a reset
	  controller driver in drivers/reset
	* secondary CPU initialization sequence using PMB helpers
	* small changes suggested by Russell King to allow platforms to disable VFP

* tag 'arm-soc/for-4.2/soc-take2' of http://github.com/broadcom/stblinux:
  ARM: BCM63xx: Add SMP support for BCM63138
  ARM: vfp: Add vfp_disable for problematic platforms
  ARM: vfp: Add include guards
  ARM: BCM63xx: Add secondary CPU PMB initialization sequence
  ARM: BCM63xx: Add Broadcom BCM63xx PMB controller helpers
  ARM: BCM5301X: Ignore another (BCM4709 specific) fault code
2015-05-22 16:32:02 +02:00
Florian Fainelli
ed5cd8163d ARM: BCM63xx: Add SMP support for BCM63138
Add support for booting the secondary CPU on BCM63138, this involves:

- locating the bootlut to write the reset vector
- powering up the second CPU when we need to using the DT-supplied PMB
  references
- disabling VFP when enabled such that we can keep having SMP

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-05-20 15:08:44 -07:00
Florian Fainelli
3f2a43c98d ARM: BCM63xx: Add secondary CPU PMB initialization sequence
The sequence to initialize a secondary CPU using the BCM63138 PMB is
extremely specific and represents much more code than any other on-chip
peripheral (AHCI, USB 3.0 or integrated Ethernet switch), as such we
keep that code local and utilize Device Tree to lookup all the resources
we need from the CPU device tree node.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-05-20 15:06:58 -07:00
Rafał Miłecki
7eb68a2a05 ARM: BCM5301X: Ignore another (BCM4709 specific) fault code
Broadcom ARM devices seem to generate some fault once per boot. We
already have an ignoring handler for BCM4707/BCM4708, but BCM4709
generates different code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-05-20 14:07:16 -07:00
Eric Anholt
33a9f5bc15 ARM: bcm2835: Move the restart/power_off handling to the WDT driver
Since the WDT is what's used to drive restart and power off, it makes
more sense to keep it there, where the regs are already mapped and
definitions for them provided.  Note that this means you may need to
add CONFIG_BCM2835_WDT to retain functionality of your kernel.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-05-14 10:04:19 +01:00
Eric Anholt
ba9acf9c0f ARM: bcm2835: Drop the init_irq() hook
This is the default function that gets called if the hook is NULL.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-05-14 10:04:18 +01:00
Eric Anholt
2383321183 ARM: bcm2835: Skip doing our own iotable_init() initialization
The only thing we were using this 16MB mapping of IO peripherals for
was the uart's early debug mapping.  If we just drop the map_io hook,
the kernel will call debug_ll_io_init() for us, which maps the single
page needed for the device.

Signed-off-by: Eric Anholt <eric@anholt.net>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-05-14 10:04:17 +01:00
Stefan Agner
3213e674ca ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
The const declaration for char* is actually duplicated, however
the array of strings is currently not constant. However, typically
the dt_compat array is declared as const char *const. Follow
that convention and also add the __initconst macro for constant
initialization data.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Scott Branden <sbranden@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Tested-by: Ray Jui <rjui@broadcom.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-03-24 15:13:23 -07:00
Uwe Kleine-König
543c5040f5 ARM: make arrays containing machine compatible strings const
The definition

	static const char *axxia_dt_match[] __initconst = {
		...

defines a changable array of constant strings. That is you must not do:

	*axxia_dt_match[0] = 'k';

but

	axxia_dt_match[0] = "different string";

is fine. So the annotation __initconst is wrong and yields a compiler
error when other really const variables are added with __initconst.

As the struct machine_desc member dt_compat is declared as

	const char *const *dt_compat;

making the arrays const is the better alternative over changing all
annotations to __initdata.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-02-19 09:44:17 +01:00
Arnd Bergmann
ff34cae5b4 ARM: BCM: put back ARCH_MULTI_V7 dependency for mobile
A recent cleanup rearranged the Kconfig file for mach-bcm and
accidentally dropped the dependency on ARCH_MULTI_V7, which
makes it possible to now build the two mobile SoC platforms
on an ARMv6-only kernel, resulting in a log of Kconfig
warnings like

warning: ARCH_BCM_MOBILE selects ARM_ERRATA_775420 which has unmet direct dependencies (CPU_V7)

and which of course cannot work on any machine.

This puts back the dependencies as before.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 64e74aa788 ("ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig")
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Scott Branden <sbranden@broadcom.com>
2015-02-18 12:20:08 +01:00
Brian Norris
a1ad3b94a7 ARM: brcmstb: update CPU power management sequence
The automatic CPU power state machine for B15 CPUs does not work
reliably as-is. This patch implements a manual sequence in software to
replace it.

This was tested successfully with over 10,000 hotplug cycles of
something like this:

  echo 0 > /sys/devices/system/cpu/cpu1/online
  echo 1 > /sys/devices/system/cpu/cpu1/online

whereas the existing sequence often locks up after a few hundred cycles.

Fixes: 62639c2f53 ("ARM: brcmstb: reintroduce SMP support")
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-01-12 14:59:29 -08:00
Linus Torvalds
ecb50f0afd Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq core updates from Thomas Gleixner:
 "This is the first (boring) part of irq updates:

   - support for big endian I/O accessors in the generic irq chip

   - cleanup of brcmstb/bcm7120 drivers so they can be reused for non
     ARM SoCs

   - the usual pile of fixes and updates for the various ARM irq chips"

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
  irqchip: dw-apb-ictl: Add PM support
  irqchip: dw-apb-ictl: Enable IRQ_GC_MASK_CACHE_PER_TYPE
  irqchip: dw-apb-ictl: Always use use {readl|writel}_relaxed
  ARM: orion: convert the irq_reg_{readl,writel} calls to the new API
  irqchip: atmel-aic: Add missing entry for rm9200 irq fixups
  irqchip: atmel-aic: Rename at91sam9_aic_irq_fixup for naming consistency
  irqchip: atmel-aic: Add specific irq fixup function for sam9g45 and sam9rl
  irqchip: atmel-aic: Add irq fixups for at91sam926x SoCs
  irqchip: atmel-aic: Add irq fixup for RTT block
  irqchip: brcmstb-l2: Convert driver to use irq_reg_{readl,writel}
  irqchip: bcm7120-l2: Convert driver to use irq_reg_{readl,writel}
  irqchip: bcm7120-l2: Decouple driver from brcmstb-l2
  irqchip: bcm7120-l2: Extend driver to support 64+ bit controllers
  irqchip: bcm7120-l2: Use gc->mask_cache to simplify suspend/resume functions
  irqchip: bcm7120-l2: Fix missing nibble in gc->unused mask
  irqchip: bcm7120-l2: Make sure all register accesses use base+offset
  irqchip: bcm7120-l2, brcmstb-l2: Remove ARM Kconfig dependency
  irqchip: bcm7120-l2: Eliminate bad IRQ check
  irqchip: brcmstb-l2: Eliminate dependency on ARM code
  genirq: Generic chip: Add big endian I/O accessors
  ...
2014-12-10 08:38:57 -08:00
Arnd Bergmann
950e619a98 Merge tag 'arm-soc/for-3.19/cygnus-platform-v2' of http://github.com/brcm/linux into next/soc
Pull "Broadcom Cygnus SoC platform support" from Florian Fainelli:

This pull request contains the platform code to support the Broadcom Cygnus SoC
using the iProc architecture:

- add support for the Broadcom Cygnus SoC
- consolidate the BCM5301X Kconfig options under the iProc menuconfig entry
- remove one level of menu in menuconfig

* tag 'arm-soc/for-3.19/cygnus-platform-v2' of http://github.com/brcm/linux:
  ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig
  ARM: mach-bcm: Consolidate currently supported IPROC SoCs
  ARM: cygnus: Initial support for Broadcom Cygnus SoC

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-20 13:05:39 +01:00
Scott Branden
64e74aa788 ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig
remove menu "Broadcom Mobile SoC Selection"
This requires:
- selecting ARCH_BCM_MOBILE based on SoC selections
- fixup bcm_defconfig and multi_v7_defconfig to work with new menu levels.

Signed-off-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2014-11-11 22:35:45 -08:00
Scott Branden
d318987ecd ARM: mach-bcm: Consolidate currently supported IPROC SoCs
Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture.
Additional IPROC chipsets that share a lot of commonality should be
added under ARCH_IPROC as well.

Signed-off-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2014-11-11 22:35:41 -08:00
Jonathan Richardson
1b475f8d02 ARM: cygnus: Initial support for Broadcom Cygnus SoC
Adds initial support for the Cygnus SoC based on Broadcom’s iProc series.

Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Desmond Liu <desmondl@broadcom.com>
Reviewed-by: JD (Jiandong) Zheng <jdzheng@broadcom.com>
Tested-by: Jonathan Richardson <jonathar@broadcom.com>
Signed-off-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2014-11-11 22:35:35 -08:00
Kevin Cernekee
a4fcbb8614 irqchip: bcm7120-l2: Decouple driver from brcmstb-l2
Some chips, such as BCM6328, only require bcm7120-l2.  Some BCM7xxx STB
configurations only require brcmstb-l2.  Treat them as two separate
entities, and update the mach-bcm dependencies to reflect the change.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lkml.kernel.org/r/1415342669-30640-13-git-send-email-cernekee@gmail.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-11-09 04:03:17 +00:00
Brian Norris
1aaaad3ffa ARM: brcmstb: Kconfig: drop unneeded symbol selections
These are either implied or not necessary.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2014-10-20 12:44:41 -07:00
Brian Norris
62639c2f53 ARM: brcmstb: reintroduce SMP support
Support for SMP bringup of the B15 CPUs on Broadcom STB chips was added
in commit 4fbe66d990 but was reverted in
commit fc3e825fa9 to address some late
review comments. This reintroduces SMP support.

Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2014-10-20 12:44:40 -07:00
Arnd Bergmann
e1e85e76ef Merge tag 'bcm63138-v4' of http://github.com/brcm/linux into next/soc
Merge "ARM: BCM: Broadcom BCM63138 support" from Florian Fainelli:

This patchset adds very minimal support for the BCM63138 SoC which is
a xDSL SoC using a dual Cortex A9 CPU complex.

* tag 'bcm63138-v4' of http://github.com/brcm/linux:
  MAINTAINERS: add entry for the Broadcom BCM63xx ARM SoCs
  ARM: BCM63XX: add BCM963138DVT Reference platform DTS
  ARM: BCM63XX: add BCM63138 minimal Device Tree
  ARM: BCM63XX: add low-level UART debug support
  ARM: BCM63XX: add basic support for the Broadcom BCM63138 DSL SoC

Conflicts:
	arch/arm/Kconfig.debug

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-09-25 23:50:02 +02:00
Florian Fainelli
dc6aec60e1 ARM: BCM63XX: add basic support for the Broadcom BCM63138 DSL SoC
This patch adds basic support for the Broadcom BCM63138 DSL SoC which is
using a dual-core Cortex A9 system. Add the very minimum required code
boot Linux on this SoC.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2014-09-17 10:56:06 -07:00
Brian Norris
fc3e825fa9 ARM: brcmstb: revert SMP support
There were several issues (of varying degree of importance) pointed out
with this code late in the review cycle, yet the code was still merged.
Let's rip it out for now and look at resubmitting at a later time.

This reverts most of commit 4fbe66d990.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-08-25 18:46:31 -07:00
Linus Torvalds
b3345d7c57 ARM: SoC platform changes for 3.17
This is the bulk of new SoC enablement and other platform changes for 3.17:
 
 * Samsung S5PV210 has been converted to DT and multiplatform
 * Clock drivers and bindings for some of the lower-end i.MX 1/2 platforms
 * Kirkwood, one of the popular Marvell platforms, is folded into the
   mvebu platform code, removing mach-kirkwood.
 * Hwmod data for TI AM43xx and DRA7 platforms.
 * More additions of Renesas shmobile platform support
 * Removal of plat-samsung contents that can be removed with S5PV210 being
   multiplatform/DT-enabled and the other two old platforms being removed.
 
 New platforms (most with only basic support right now):
 
 * Hisilicon X5HD2 settop box chipset is introduced
 * Mediatek MT6589 (mobile chipset) is introduced
 * Broadcom BCM7xxx settop box chipset is introduced
 
 + as usual a lot other pieces all over the platform code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJT5Dp+AAoJEIwa5zzehBx3w1sP/0vjT/LQOmC8Lv8RW2Ley2ua
 hNu3HcNPnT/N40JEdU9YNv3q0fdxGgcfKj011CNN+49zPSUf1xduk2wfCAk9yV50
 8Sbt1PfDGm1YyUugGN420CzI431pPoM1OGXHZHkAmg+2J286RtUi3NckB//QDbCY
 QhEjhpYc9SXhAOCGwmB4ab7thOljOFSPzKTLMTu3+PNI5zRPRgkDkt6w9XlsAYmB
 nuR271BnzsROkMzAjycwaJ3kdim7wqrMRfk8g96o0jHSF5qf4zsT5uWYYAjTxdUQ
 8Ajz6zjeHe4+95TwTDcq+lCX6rDLZgwkvCAc6hFbeg0uR7Dyek0h6XMEYtwdjaiU
 KNPwOENrYdENNDAGRpkFp1x4h/rY9Plfru0bBo5o6t7aPBvmNeCDzRtlTtLiUNDV
 dG8sfDMtrS/wFHVjylDSQ60Mb+wuW0XneC8D7chY/iRhIllUYi6YXXvt+/tH5C20
 oYDOWqqcDFSb0sJhE5pn4KBV82ZaHx9jMBWGLl+erg2sDX/SK8SxOkLqKYZKtKB5
 0leOGE3Y+C70xt3G9HftLz2sAvvt+C8UPsApPT+dHNE401TWJOYx6LphPkQKjeeK
 P1iwKi+It3l+FaBypgJy/LeMQRy7EyvDBK2I5WoVL/R2qq14EmP1ui3Tthjj0bhq
 tBBof6P9c8OnRVj1Lz3R
 =5TJ6
 -----END PGP SIGNATURE-----

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

Pull ARM SoC platform changes from Olof Johansson:
 "This is the bulk of new SoC enablement and other platform changes for
  3.17:

   - Samsung S5PV210 has been converted to DT and multiplatform
   - Clock drivers and bindings for some of the lower-end i.MX 1/2
     platforms
   - Kirkwood, one of the popular Marvell platforms, is folded into the
     mvebu platform code, removing mach-kirkwood
   - Hwmod data for TI AM43xx and DRA7 platforms
   - More additions of Renesas shmobile platform support
   - Removal of plat-samsung contents that can be removed with S5PV210
     being multiplatform/DT-enabled and the other two old platforms
     being removed

  New platforms (most with only basic support right now):

   - Hisilicon X5HD2 settop box chipset is introduced
   - Mediatek MT6589 (mobile chipset) is introduced
   - Broadcom BCM7xxx settop box chipset is introduced

  + as usual a lot other pieces all over the platform code"

* tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (240 commits)
  ARM: hisi: remove smp from machine descriptor
  power: reset: move hisilicon reboot code
  ARM: dts: Add hix5hd2-dkb dts file.
  ARM: debug: Rename Hi3716 to HIX5HD2
  ARM: hisi: enable hix5hd2 SoC
  ARM: hisi: add ARCH_HISI
  MAINTAINERS: add entry for Broadcom ARM STB architecture
  ARM: brcmstb: select GISB arbiter and interrupt drivers
  ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
  ARM: configs: enable SMP in bcm_defconfig
  ARM: add SMP support for Broadcom mobile SoCs
  Documentation: arm: misc updates to Marvell EBU SoC status
  Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC
  ARM: mvebu: fix build without platforms selected
  ARM: mvebu: add cpuidle support for Armada 38x
  ARM: mvebu: add cpuidle support for Armada 370
  cpuidle: mvebu: add Armada 38x support
  cpuidle: mvebu: add Armada 370 support
  cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
  ARM: mvebu: export the SCU address
  ...
2014-08-08 11:14:29 -07:00
Brian Norris
305787f901 ARM: brcmstb: select GISB arbiter and interrupt drivers
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-07-28 09:59:51 -04:00
Marc Carino
4fbe66d990 ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
The BCM7xxx series of Broadcom SoCs are used primarily in set-top boxes.

This patch adds machine support for the ARM-based Broadcom SoCs.

Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-07-28 09:58:52 -04:00
Alex Elder
9a5a110eb9 ARM: add SMP support for Broadcom mobile SoCs
This patch adds SMP support for BCM281XX and BCM21664 family SoCs.

This feature is controlled with a distinct config option such that
an SMP-enabled multi-v7 binary can be configured to run these SoCs
in uniprocessor mode.  Since this SMP functionality is used for
multiple Broadcom mobile chip families the config option is called
ARCH_BCM_MOBILE_SMP (for lack of a better name).

On SoCs of this type, the secondary core is not held in reset on
power-on.  Instead it loops in a ROM-based holding pen.  To release
it, one must write into a special register a jump address whose
low-order bits have been replaced with a secondary core's id, then
trigger an event with SEV.  On receipt of an event, the ROM code
will examine the register's contents, and if the low-order bits
match its cpu id, it will clear them and write the value back to the
register just prior to jumping to the address specified.

The location of the special register is defined in the device tree
using a "secondary-boot-reg" property in a node whose "enable-method"
matches.

Derived from code originally provided by Ray Jui <rjui@broadcom.com>

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-07-28 09:42:24 -04:00
Pawel Moll
d2168146c2 platform: Remove most references to platform_bus device
A number of board files in arch/arm and arch/unicore32
explicitly reference platform_bus device as a parent
for new platform devices.

This is unnecessary, as platform device API guarantees
that devices with NULL parent are going to by adopted
by the mentioned "root" device.

This patch removes or replaces with NULL such references.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-23 19:09:03 -07:00
Rob Herring
21278aeafb ARM: use menuconfig for sub-arch menus
The System Type menu is getting quite long with platforms and is
inconsistent in handling of sub-arch specific options. Tidy up the menu
by making platform options a menuconfig entry containing any platform
specific config items.

[arnd: change OMAP part according to suggestion from
 Tony Lindgren <tony@atomide.com>]

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17 17:09:48 +02:00
Linus Torvalds
eb3d3ec567 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into next
Pull ARM updates from Russell King:

 - Major clean-up of the L2 cache support code.  The existing mess was
   becoming rather unmaintainable through all the additions that others
   have done over time.  This turns it into a much nicer structure, and
   implements a few performance improvements as well.

 - Clean up some of the CP15 control register tweaks for alignment
   support, moving some code and data into alignment.c

 - DMA properties for ARM, from Santosh and reviewed by DT people.  This
   adds DT properties to specify bus translations we can't discover
   automatically, and to indicate whether devices are coherent.

 - Hibernation support for ARM

 - Make ftrace work with read-only text in modules

 - add suspend support for PJ4B CPUs

 - rework interrupt masking for undefined instruction handling, which
   allows us to enable interrupts earlier in the handling of these
   exceptions.

 - support for big endian page tables

 - fix stacktrace support to exclude stacktrace functions from the
   trace, and add save_stack_trace_regs() implementation so that kprobes
   can record stack traces.

 - Add support for the Cortex-A17 CPU.

 - Remove last vestiges of ARM710 support.

 - Removal of ARM "meminfo" structure, finally converting us solely to
   memblock to handle the early memory initialisation.

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (142 commits)
  ARM: ensure C page table setup code follows assembly code (part II)
  ARM: ensure C page table setup code follows assembly code
  ARM: consolidate last remaining open-coded alignment trap enable
  ARM: remove global cr_no_alignment
  ARM: remove CPU_CP15 conditional from alignment.c
  ARM: remove unused adjust_cr() function
  ARM: move "noalign" command line option to alignment.c
  ARM: provide common method to clear bits in CPU control register
  ARM: 8025/1: Get rid of meminfo
  ARM: 8060/1: mm: allow sub-architectures to override PCI I/O memory type
  ARM: 8066/1: correction for ARM patch 8031/2
  ARM: 8049/1: ftrace/add save_stack_trace_regs() implementation
  ARM: 8065/1: remove last use of CONFIG_CPU_ARM710
  ARM: 8062/1: Modify ldrt fixup handler to re-execute the userspace instruction
  ARM: 8047/1: rwsem: use asm-generic rwsem implementation
  ARM: l2c: trial at enabling some Cortex-A9 optimisations
  ARM: l2c: add warnings for stuff modifying aux_ctrl register values
  ARM: l2c: print a warning with L2C-310 caches if the cache size is modified
  ARM: l2c: remove old .set_debug method
  ARM: l2c: kill L2X0_AUX_CTRL_MASK before anyone else makes use of this
  ...
2014-06-05 15:57:04 -07:00
Linus Torvalds
825f4e0271 ARM: SoC updates for 3.16 (part 1)
A quite large set of SoC updates this cycle. In no particular order:
 
 - Multi-cluster power management for Samsung Exynos, adding support for
   big.LITTLE CPU switching on EXYNOS5
 - SMP support for Marvell Armada 375 and 38x
 - SMP rework on Allwinner A31
 - Xilinx Zynq support for SOC_BUS, big endian
 - Marvell orion5x platform cleanup, modernizing the implementation and
   moving to DT.
 - _Finally_ moving Samsung Exynos over to support MULTIPLATFORM, so
   that their platform can be enabled in the same kernel binary as most
   of the other v7 platforms in the tree. \o/ The work isn't quite complete,
   there's some driver fixes still needed, but the basics now work.
 
 New SoC support added:
 - Freescale i.MX6SX
 - LSI Axxia AXM55xx SoCs
 - Samsung EXYNOS 3250, 5260, 5410, 5420 and 5800
 - STi STIH407
 
 Plus a large set of various smaller updates for different platforms. I'm
 probably missing some important one here.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTjOKWAAoJEIwa5zzehBx36aEP/2vTD7x9FC59FACNHJ8iO7aw
 0ebTgBBjI1Np6X18O+M7URbxV5TaBgwpUm/NDN86p03MpQ2eOXr8r47qVxe/HhZs
 AdlTvzgE6QwxcVL/HeCKKUEN3BPH74+TZgFl9I5aSzNjpR39xETeK1aWP/ZiAl/q
 /lGRZAQ59+c7Ung00Hg0g2YDxH9WFpK50Nj90ROnyjKSFkhIYngXYVpZB3maOypq
 Pgib/U8IraKZ52oGJw3yinSoORr7FdcUdAGWGTz/lQdNL/jYDfQ6GkRW2oblWXdt
 3Xvj9UW6NmkbMICucMvFuuW1nXAgutZuTp9w7mBxsiUlYepxPv/DXM6yiI1WGlEb
 BeVOmOreNeN2nT6avv/uUhk3Osq63Jn9x8cz5y+7/lgWQwllh3/c+G01RotvgJEQ
 vpQq5ps9fMxIAMaNP6N/YqMJI1IOrBj0iXxaZEDw3VYM/k4lSvtb3VXP9c/rqApu
 U4i6hpSIGzrraU4NrjndYPndcLeNOVZbByETQKosZXuCo6G1sb7FstNSkzI9vSo8
 O/pujIVUfYyBW82GzZGDw+aa7DWA29FPeUQ3p+sj5MSCg051xXT8h6QwqMo2K/zY
 5ATs/qo6w7zH/Ou9rtHTRynCIb0GQJThDSlWtuXFedUF9quEltS+TDz/2o+dWtGJ
 yBFGKDRuBB20D36w9xqg
 =6LYI
 -----END PGP SIGNATURE-----

Merge tag 'soc-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into next

Pull part one of ARM SoC updates from Olof Johansson:
 "A quite large set of SoC updates this cycle.  In no particular order:

   - Multi-cluster power management for Samsung Exynos, adding support
     for big.LITTLE CPU switching on EXYNOS5

   - SMP support for Marvell Armada 375 and 38x

   - SMP rework on Allwinner A31

   - Xilinx Zynq support for SOC_BUS, big endian

   - Marvell orion5x platform cleanup, modernizing the implementation
     and moving to DT.

   - _Finally_ moving Samsung Exynos over to support MULTIPLATFORM, so
     that their platform can be enabled in the same kernel binary as
     most of the other v7 platforms in the tree.  \o/

     The work isn't quite complete, there's some driver fixes still
     needed, but the basics now work.

  New SoC support added:

   - Freescale i.MX6SX

   - LSI Axxia AXM55xx SoCs

   - Samsung EXYNOS 3250, 5260, 5410, 5420 and 5800

   - STi STIH407

  plus a large set of various smaller updates for different platforms.
  I'm probably missing some important one here"

* tag 'soc-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (281 commits)
  ARM: exynos: don't run exynos4 l2x0 setup on other platforms
  ARM: exynos: Fix "allmodconfig" build errors in mcpm and hotplug
  ARM: EXYNOS: mcpm rename the power_down_finish
  ARM: EXYNOS: Enable mcpm for dual-cluster exynos5800 SoC
  ARM: EXYNOS: Enable multi-platform build support
  ARM: EXYNOS: Consolidate Kconfig entries
  ARM: EXYNOS: Add support for EXYNOS5410 SoC
  ARM: EXYNOS: Support secondary CPU boot of Exynos3250
  ARM: EXYNOS: Add Exynos3250 SoC ID
  ARM: EXYNOS: Add 5800 SoC support
  ARM: EXYNOS: initial board support for exynos5260 SoC
  clk: exynos5410: register clocks using common clock framework
  ARM: debug: qcom: add UART addresses to Kconfig help for APQ8084
  ARM: sunxi: allow building without reset controller
  Documentation: devicetree: arm: sort enable-method entries
  ARM: rockchip: convert smp bringup to CPU_METHOD_OF_DECLARE
  clk: exynos5250: Add missing sysmmu clocks for DISP and ISP blocks
  ARM: dts: axxia: Add reset controller
  power: reset: Add Axxia system reset driver
  ARM: axxia: Adding defconfig for AXM55xx
  ...
2014-06-02 16:15:12 -07:00
Russell King
d458773fb3 ARM: l2c: bcm_5301x: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  We can remove the explicit machine init too
as this becomes identical to the generic version.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:04 +01:00
Will Deacon
08d38bebb4 ARM: kconfig: allow PCI support to be selected with ARCH_MULTIPLATFORM
When targetting ARCH_MULTIPLATFORM, we may include support for SoCs with
PCI-capable devices (e.g. mach-virt with virtio-pci).

This patch allows PCI support to be selected for these SoCs by selecting
CONFIG_MIGHT_HAVE_PCI when CONFIG_ARCH_MULTIPLATFORM=y and removes the
individual selections from multi-platform enabled SoCs.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 12:42:38 -07:00
Arnd Bergmann
1ef81bf7bc mach-bcm 3.16 soc updates:
* only show ARCH_BCM in multi v6/v7 configs
 * enable ARM erratum 775420
 * bcm_defconfig updates for pwm
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTf0eOAAoJEOfTILNwq7R4yOUQAJIJVm5Sv3NIfZuU4fq0d+RZ
 UITyfQKZ9CRZ0WVOBl2IoKapxMKR/55d/O7/EZPh5HTpybVam/FXGDCo/ewJ+CNJ
 JkfkPX1UhCHoZ2VgNnx6UdXpYhbdpkgXHnhCpEaJ7b28BDIobxnDogNudQPenp1O
 rougpAeuRrEc8tW6+iDlmng25hBicD60RtbxKyoPAoDBm3QtcvL7sUMhUnlajc6Q
 XjDMlLcm5/fNBooeDFFvGmAnnX1JHMiMgJsanRv3dFRuk+7WiE/qNLlxgZFJgNwX
 XTCu/mLelCr3Avoq142rTTXolV18i5P5Jk4eK6imhE6h9VYB/YvaVIbmlli8psDh
 A4+dADWtUe/jNarx8G3mMzyA2GBeWroUiCizTiECpJYiSAKYz9V8l+J1sLrFlR8v
 7OyFTHKQolfMkVBji6kfcBdAOprl/HhirDGJhcc+kczxsg0hLWMLocg9jLueEjQR
 8t00bJs41vuZnxSYxEuRfe2nZpj8HugsnC1yPzxvU7oUnKLNXor7N60Km68PQtWg
 3VVagGfcABQ5ZtRhABf/KhKM31WGWIzYY+kA61NBaj5XRP21aWgfVlhNb/E8OahJ
 +YJUjwISN4aQLlvFukmHiFHmE/5ekM9cF+TAPuOgnTTXI7Zmv4SBLcE1oR1NQtmr
 PTKlCQdMN1kITA5qLGKb
 =qAvl
 -----END PGP SIGNATURE-----

Merge tag 'for-3.16/bcm-soc' of git://github.com/broadcom/mach-bcm into next/soc

Merge "mach-bcm 3.16 soc updates" From Matt Porter:

* only show ARCH_BCM in multi v6/v7 configs
* enable ARM erratum 775420
* bcm_defconfig updates for pwm

* tag 'for-3.16/bcm-soc' of git://github.com/broadcom/mach-bcm:
  ARM: bcm_defconfig: Enable PWM and Backlight
  ARM: mach-bcm: add ARM_ERRATA_775420
  ARM: bcm: Restrict ARCH_BCM selection to ARCH_MULTI_V6_V7

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-05-24 00:44:26 +02:00
Arnd Bergmann
80e98a9ca6 Merge branch 'bcm/cleanup' into next/soc
Conflicts:
	arch/arm/mach-bcm/Kconfig
2014-05-24 00:44:17 +02:00
Arnd Bergmann
c40f01287b * Clean up mach-bcm config and build targets
* Clean up bcm281xx/21664 SMC code
 * Clean up bcm281xx/21664 L2C code
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTf0TFAAoJEOfTILNwq7R4nvIQAI8T/EVvRaGQYgkgyer8rnCq
 cfurHHrn51uEFUS+kER522wYmGgqK7+B00h6u5QohcLelb7f2CdC2MQarmSA8G1G
 M5zl5EpmkBBoEpq+co2IGMtdpDk3vQqZbh1yBIb3DsJAQZzsMDUyS/L4vQ/LSCQN
 VLDLptro5kJmsgMdZ37XhkcLUXYhWPTXEggSHBvVDWk9hjc0h+75ZSwkCegUdA4X
 JhmojUyb3qyh/Gq+9vRvdakkwlbQQv/duvkzwEDgpFXns7gt7jz/DSuKhH2HymPc
 N/F3l/mEwVt1k3Ve0ij7tjejXsm/to2goD2YJEkxjdO8QeK808WcHMXQRJL5xNPc
 803LI/LtpL9gw0MinLQX7w7WoFbQXI9dUofCzu16va42k0uNmF/OFcTo6Y0R4Fla
 qhvZDQksHjO0c64P87ly2ypRNhjqkSzrnA+umjJ5UAItSG3AwJYYK8/uuaKJbugp
 r5QnjRcSJI+k+iA03I9lZCrETS1hUFlMpzlv8ZjoMpRhJ9H4Y7S/xWqtQMJyE9bi
 ABjJj2Q3Y67NAmKJYYXcCZUNwMuiwitMVo+wamsDbIWEFVk1NTsZBqWRvGkD1Ev4
 STKz9UohrlFisODUsBhSt0VgX9D9BMihn5DwsN8Eh0OHbWbPrzWitcO26YBfsEue
 CH591KjF5+fiPYHMme9j
 =QVlm
 -----END PGP SIGNATURE-----

Merge tag 'for-3.16/bcm-cleanup' of git://github.com/broadcom/mach-bcm into next/cleanup

* Clean up mach-bcm config and build targets
* Clean up bcm281xx/21664 SMC code
* Clean up bcm281xx/21664 L2C code

* tag 'for-3.16/bcm-cleanup' of git://github.com/broadcom/mach-bcm:
  ARM: bcm: rename "kona.h" and "kona.c"
  ARM: bcm: rewrite commentary for bcm_kona_do_smc()
  ARM: bcm: use inline assembly for "smc" request
  ARM: bcm: tidy up a few includes
  ARM: bcm: config option for l2 cache support
  ARM: bcm: don't special-case CPU 0 in bcm_kona_smc()
  ARM: bcm: have bcm_kona_smc() return request result
  ARM: bcm: clean up SMC code
  ARM: bcm: err, don't BUG() on SMC init failures
  ARM: bcm: use memory accessors for ioremapped area
  ARM: bcm: clean up config and build targets

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Conflicts:
	arch/arm/mach-bcm/Kconfig
2014-05-24 00:29:10 +02:00
Russell King
d453ef752c ARM: l2c: remove unnecessary UL-suffix to mask values
They're u32, they're not unsigned long.  The UL suffix is not required
here.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-22 16:38:43 +01:00
Scott Branden
ffc1086a55 ARM: mach-bcm: add ARM_ERRATA_775420
ARM_ERRATA_775420 needs to be enabled.

A data cache maintenance operation which aborts, followed by an ISB,
without any DSB in-between, might lead to deadlock.

Affects: bug present in Cortex-A9 r3p0 and earlier. Fixed in r4p0.

Cortex-A9 r3p0 is used in a multitude of Broadcom parts including
the bcm21664, bcm281xx, 5301x families of devices.

Signed-off-by: Scott Branden <sbranden@broadcom.com>
Tested-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:56:48 -04:00
Alexander Shiyan
fd33615897 ARM: bcm: Restrict ARCH_BCM selection to ARCH_MULTI_V6_V7
Currently, Broadcom SoC options are shown whenever ARCH_MULTIPLATFORM
is enabled. Restrict this so they are only seen when ARCH_MULTI_V6_V7
variants are enabled.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
[mporter: added commit log message]
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:54:44 -04:00
Alex Elder
eeda4cb92e ARM: bcm: rename "kona.h" and "kona.c"
These source files contain only level-2 cache initialization code,
so rename them to make that fact more obvious.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:38 -04:00
Alex Elder
ed24f446ab ARM: bcm: rewrite commentary for bcm_kona_do_smc()
The block of comments in bcm_kona_do_smc() are somewhat confusing.
This patch attempts to clarify what's going on.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:37 -04:00
Alex Elder
8b9c550e37 ARM: bcm: use inline assembly for "smc" request
Move the code that implements the "smc" call into a C function that
uses inline assembly.  This allows us to make that function private,
and enables us to get rid of "arch/arm/mach-bcm/bcm_kona_smc_asm.S".
Rename what had been the "buffer_addr" argument to be "buffer_phys"
so it's consistent with other usage in this file.

Since it's now easy to do, verify that r12 contains SEC_EXIT_NORMAL
upon completion of the SMC.  There really isn't a good way to handle
the abnormal completion of a secure monitor request.

Since "bcm_kona_smc.h" is now only included from C files, eliminate
the #ifndef __ASSEMBLY__.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:36 -04:00
Alex Elder
d5c627b575 ARM: bcm: tidy up a few includes
Clean up a few header file includes, eliminating a few that are not
really needed and putting in their place some that are.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:36 -04:00
Alex Elder
7b5fe9c911 ARM: bcm: config option for l2 cache support
Add a new config option ARCH_BCM_MOBILE_L2_CACHE that allows support
for level-2 cache to be enabled or disabled at build time for
BCM218XX and BCM21664 family SoCs.

Build support for SMC only if it's required (currently it's only
required for to support level 2 cache control).

If arch/arm/mach-bcm/kona.c gets compiled, ARCH_BCM_MOBILE_L2_CACHE
must have been selected, which implies CONFIG_CACHE_L2X0 is set.
There is therefore no need to check CONFIG_CACHE_L2X0 at the top
of kona_l2_cache_init(), so get rid of that check.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:35 -04:00
Alex Elder
35138d52f1 ARM: bcm: don't special-case CPU 0 in bcm_kona_smc()
There's logic in bcm_kona_smc() to ensure __bcm_kona_smc() gets
called on CPU 0; if already executing on CPU 0, that function is
called directly.  The direct call is not protected from interrupts,
however, which is not safe.

Note that smp_call_function_single() is designed to handle the case
where the target cpu is the current one.  It also gets a reference
to the CPU and disables IRQs across the call.

So we can simplify things and at the same time be protected against
interrupts by calling smp_call_function_single() unconditionally.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:34 -04:00
Alex Elder
6c90f10864 ARM: bcm: have bcm_kona_smc() return request result
Currently it is assumed that SEC_ROM_RET_OK is the only valid "good"
result of a secure monitor request.  However the values that can be
returned by a secure monitor request are dependent on which service
id was provided.

We therefore should handle the result in a request-dependent way.
The most natural way to do that is to have the initiator of the
request--where bcm_kona_smc() is called--handle the result in a way
appropriate to the request.

An "smc" operation must be performed only on core 0, while the
request can be initiated from any core.  To pass back the request
result, we add a new field to the bcm_kona_smc_data structure, and
have bcm_kona_smc() return that value rather than 0.

There's only one caller right now.  Move the existing check of the
result out of __bcm_kona_smc() and into the kona_l2_cache_init()
where the SSAPI_ENABLE_L2_CACHE request is initiated.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:33 -04:00
Alex Elder
c64756cca2 ARM: bcm: clean up SMC code
This patch just does some simple cleanup in "bcm_kona_smc.c":
    - Get rid of the secure_bridge_data structure.  Instead, just
      define two globals that record the physical and virtual
      addresses of the SMC arguments buffer.  Use "buffer" instead
      of "bounce" in their names.  Drop of the erroneous __iomem
      annotation for the physical address.
    - Get rid of the initialized flag and just use a non-null buffer
      address to indicate that.
    - Get the size of the memory region when fetching the SMC
      arguments buffer location from the device tree.  Use it to
      call ioremap() directly rather than requiring of_iomap() to
      go look it up again.
    - Do some additional validation on that memory region size.
    - Flush caches unconditionally in __bcm_kona_smc(); nothing
      supplies SSAPI_BRCM_START_VC_CORE as a service id.
    - Drop a needless initialization of "rc" in __bcm_kona_smc().

It also deletes most of the content of "bcm_kona_smc.h" because it's
never actually used and is of questionable value anyway.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:32 -04:00
Alex Elder
5c4cee2fe8 ARM: bcm: err, don't BUG() on SMC init failures
Several conditions in bcm_kona_smc_init() are handled with BUG_ON().
That function is capable of returning an error, so do that instead.

Also, don't assume of_get_address() returns a valid pointer.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:32 -04:00
Alex Elder
e80eef33f4 ARM: bcm: use memory accessors for ioremapped area
The pointer used to pass parameters to an "smc" call is produced
through a call to ioremap().  As such, we should be using functions
like writel() to access it.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:31 -04:00
Alex Elder
1892bbcdd4 ARM: bcm: clean up config and build targets
Currently CONFIG_ARCH_BCM_MOBILE is used to select all (both)
Broadcom mobile SoC families.  Instead, use that only as a config
menu switch, and define specific symbols like ARCH_BCM_281XX to
select a particular SoC family.  If ARCH_BCM_MOBILE is selected, all
of the SoCs will be selected by default, but this way each can be
disabled individually as well.

Note that BCM281xx and BCM21664 both require the SMC and L2 cache
control code, so that code will be built based on ARCH_BCM_MOBILE.

Signed-off-by: Alex Elder <elder@linaro.org>
[mporter: added ARM: to the description]
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-04-25 08:51:30 -04:00
Rob Herring
9f0db8b9c4 ARM: bcm: clean-up unneeded kconfig selects
Multi-platform support implies all these options are already selected and
individual platforms don't need to select them.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Christian Daudt <bcm@fixthebug.org>
Cc: Matt Porter <mporter@linaro.org>
Cc: bcm-kernel-feedback-list@broadcom.com
2014-04-22 14:33:27 -05:00
Linus Torvalds
ff050ad12c ARM: SoC specific changes
Lots of changes specific to one of the SoC families. Some that
 stick out are:
 
 * mach-qcom gains new features, most importantly SMP support for
   the newer chips (Stephen Boyd, Rohit Vaswani)
 * mvebu gains support for three new SoCs: Armada 375, 380 and 385
   (Thomas Petazzoni and Free-electrons team)
 * SMP support for Rockchips (Heiko Stübner)
 * Lots of i.MX changes (Shawn Guo)
 * Added support for BCM5301x SoC (Hauke Mehrtens)
 * Multiplatform support for Marvell Kirkwood and Dove
   (Andrew Lunn and Sebastian Hesselbarth doing the final part
   of a long journey)
 * Unify davinci platforms and remove obsolete ones (Sekhar Nori,
   Arnd Bergmann)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUz/yT2CrR//JCVInAQJN8A/9Ft1rfp4LEe8Lpr9yAZydG4UaJKy8Hh7Z
 fmohMAuy88J+8jzdwQKKCeEiId+nIf+WmFIQDn9YRDev1/T2v32Ax49XuGtY47JX
 4loIC2wR0+j1aSwhEVOmlM03lX7Hbu6iNDkxaLkDKTRrt3DhDNA6cPZYwNOT273W
 Yx7hIDpvsoOVN3zbPwqhwLrXgywsaNB9E7ly1GixRd1thdg46kMRcM0LJSXPH3we
 pyx7sZbILTVMeUx79XUTvBDJYsbjJWFZknVDYXGkrS5YxAASVsVW2KW9fP9E+UXE
 wTmOxg6spsHGgCezwy8NL5UmfaAOXL3mm6ginFwWpyz7Iu+P5IvfR1W+8UA/O8tp
 K9y8wLA64chPQJkAGaPQBqUPq9QkNHodZWgaPKxKuuv3qF481DCnQKkFRz+sl7mu
 oQVGnoMCnTY6L6yYcIq/GpgiJ731vwefirAwPR8FEBN/gw/gC01b+DDchx/5inPJ
 6V6dCEtPZxXMOsIaYBWFauk3pMFU3E8coklmteyYDQg7eb+55Zq3vsNEpu/vb6ll
 M660AQzzbkZ7lgsSBdNODEvkNH15kC35G2UCfwy99uCE4k/0Vi7reJ1BzXkc+dtJ
 +maBtA6NMALXQ/EI+B+fZLccI4Hv7avwFy1rQJaf+TLiFvTd9yp0qUX8JjXWDPgu
 pPWQOC4a9mU=
 =AGpV
 -----END PGP SIGNATURE-----

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

Pull ARM SoC specific changes from Arnd Bergmann:
 "Lots of changes specific to one of the SoC families.  Some that stick
  out are:

   - mach-qcom gains new features, most importantly SMP support for the
     newer chips (Stephen Boyd, Rohit Vaswani)
   - mvebu gains support for three new SoCs: Armada 375, 380 and 385
     (Thomas Petazzoni and Free-electrons team)
   - SMP support for Rockchips (Heiko Stübner)
   - Lots of i.MX changes (Shawn Guo)
   - Added support for BCM5301x SoC (Hauke Mehrtens)
   - Multiplatform support for Marvell Kirkwood and Dove (Andrew Lunn
     and Sebastian Hesselbarth doing the final part of a long journey)
   - Unify davinci platforms and remove obsolete ones (Sekhar Nori, Arnd
     Bergmann)"

* tag 'soc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (126 commits)
  ARM: sunxi: Select HAVE_ARM_ARCH_TIMER
  ARM: cache-tauros2: remove ARMv6 code
  ARM: mvebu: don't select CONFIG_NEON
  ARM: davinci: fix DT booting with default defconfig
  ARM: configs: bcm_defconfig: enable bcm590xx regulator support
  ARM: davinci: remove tnetv107x support
  MAINTAINERS: Update ARM STi maintainers
  ARM: restrict BCM_KONA_UART to ARCH_BCM_MOBILE
  ARM: bcm21664: Add board support.
  ARM: sunxi: Add the new watchog compatibles to the reboot code
  ARM: enable ARM_HAS_SG_CHAIN for multiplatform
  ARM: davinci: remove da8xx_omapl_defconfig
  ARM: davinci: da8xx: fix multiple watchdog device registration
  ARM: davinci: add da8xx specific configs to davinci_all_defconfig
  ARM: davinci: enable da8xx build concurrently with older devices
  ARM: BCM5301X: workaround suppress fault
  ARM: BCM5301X: add early debugging support
  ARM: BCM5301X: initial support for the BCM5301X/BCM470X SoCs with ARM CPU
  ARM: mach-bcm: Remove GENERIC_TIME
  ARM: shmobile: APMU: Fix warnings due to improper printk formats
  ...
2014-04-05 14:19:54 -07:00
Arnd Bergmann
3b325a494b ARM: mach-bcm: soc updates for 3.15 - part 2
- Add bcm21664 support
 - Use Kona Debug UART only on ARCH_BCM_MOBILE
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTI1XaAAoJEOfTILNwq7R4y+gP/R4b689mZGiNM48PgWqzqK1o
 EgOg7GU9hMpZqAdzpFznWlePJeO0hKo8JZ7ozUefPQe4l3Lxt92C3lgrrJzZxbi5
 40N3mGwhjyrAS8DfdjBGDIJzCW+GUmNbQBb4yh9rFa40Z3kOh5c3xj30J+tA+/5M
 JT4H8tHS1AEJEuGedtIDASyN45cehskCYJ/dIYfeNOTPH4CaLhq9RxyO6PNSEvHD
 f9UG0jC1GIu9bDfkPBBzKIaJABSXzdUwT9fd7coKB9gFR9DcmpUUgFUZ9ZGqWHUO
 sBzMtWQI4Z5ueV226nrJca2zth4W8eMOu/GHbjVT7YLoDmibqRL/HlJfnoOaJLOg
 e1lk/ZsNk+hnNNvmyuFhadpFjxaDuDQM1rRkjyV60EszJ5gwre4MtAyrMX48dtUr
 nPmbgciUateNabgtJNJxVGehH/NPKf42sLcEsq4z+hCF3JI9nNmjpoPD6wILwNIz
 k2HOoOCWXo9z/57XJv2EDOHZbTpqmnyEaiFvR7hjtiHTohXgFTNVb5BvNMf7GbtA
 GUKp0qmhnPjseKMteNO2TiSO8OiHKLUQ1elIKeLY7CedpuEHHK1uj+eU/nzx0W95
 AimQRlNaWFqxJaSMpYkYUa+DGrAxsxbxnsnIUJWcUy1sEboNREIhwhaGv0hlfPuS
 QVl4PoPnY5iZ+4xKDFQi
 =bmN2
 -----END PGP SIGNATURE-----

Merge tag 'armsoc/for-3.15/soc-3' of git://github.com/broadcom/mach-bcm into next/soc

Merge "ARM: mach-bcm: soc updates for 3.15 - part 2" from Matt Porter:

- Add bcm21664 support
- Use Kona Debug UART only on ARCH_BCM_MOBILE

* tag 'armsoc/for-3.15/soc-3' of git://github.com/broadcom/mach-bcm:
  ARM: restrict BCM_KONA_UART to ARCH_BCM_MOBILE
  ARM: bcm21664: Add board support.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-17 14:45:28 +01:00
Arnd Bergmann
8efa50c5e1 Merge branch 'bcm/cleanup' into next/soc
This is a dependency for the bcm21664 support.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-17 14:45:02 +01:00
Markus Mayer
c3ceebd7ca ARM: bcm21664: Add board support.
Add support for the Broadcom BCM21664 mobile SoC. It has two Cortex-A9
cores like the BCM281xx family of chips. BCM21664 and BCM281xx share
many IP blocks in addition to the ARM cores.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-14 11:25:15 -04:00
Matt Porter
833688f4e4 ARM: mach-bcm soc updates
- add BCM5301x support
 - remove GENERIC_TIME
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTGAsEAAoJEOfTILNwq7R4hyEP/ApeGhAN6ubhui78M880ycl1
 TEjTvAA9yvbldiTF8Jp2XUIdIfxTcraCpd11TMF1kgQcnKNK9GqvkaB8Dh98WYzD
 MY8+8SMJSGsPtAT5tp0MaamZREoPm4wEZ5JWn8wQjIMTjiIPDu78Gjm0M00E3c+a
 1uOkbUrIFTECgzIeMr92p0NSYqYthz0g5EE/BTfPWCA6wqfIQ4DvqUtB9Mad6iR6
 VBN6tqjL98riz+CYSV3WhqMCaI60HEPtpVBhrVMoZHKyMcR7O83F7V91t2QZc/dM
 5DZLSdU9/1ZkIpK3gFf5CyBbO6lVv47kFpVm7hSZhqPIR6w3SfhCNxjPy5dyCb5Y
 vlMqUmakXtuqPkk6mm4x79Scxj/1ct3g7pssHzS7N8tuAtPISeBzW+GhjXjICXtR
 6shZQRJwhCDJ3pPMWsBW60VQ/ct+A9X5gXka8kthWGoLPBlZrLNR8vZmsfcbx4Ei
 nurWQGLoMfHt7KxVaTVrrwdUXkXTRc4EZrmMvVkNzJEiedyuN8E1nZEF2kVOPsgA
 aZIih6Lex4mPVakGwaQH4zPCXTfHwstIe0P1aPy+seHzbqUf64s0VkNEbctCCZOe
 7a4yj72KYXEnsD2mSHa3c/MRfQEzEatefl1QGeQw7nPsDwxOWgrCsWylXYoVCSyT
 +i6ga9T1VIwL5Jlb6fhr
 =WKwJ
 -----END PGP SIGNATURE-----

Merge tag 'armsoc/for-3.15/soc-2' into armsoc/for-3.15/soc-3

ARM: mach-bcm soc updates

- add BCM5301x support
- remove GENERIC_TIME
2014-03-14 11:20:43 -04:00
Olof Johansson
0daba17de7 ARM: bcm2835: consolidate into mach-bcm/
This pull request consists of a single patch which moves files from
 arch/arm/mach-bcm2835 into mach-bcm, thus consolidating them with
 support for other Broadcom chips.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTGTE1AAoJEJuNpwkmVCGc+LEP/iVZKPWIZVsc1XwT87SJZbqq
 BvHP7K+xo0qcy9I3xxlXPoaTfLMeaXdzlNBAMsSatq8gV2ZraMshBGIuTSbvu5c7
 hIlhi1NQS0tnSO7FndV7IjarQXcfgzNgO/b1/AowuLTlr2FGOzY6W+Z6JJf15Rrj
 bY23wwKR/cEzl0qDtWpG5nZzxqLcAUTZFZE0P2KnNgVBeumeny04i5ctma49rjhT
 sO61cNqD69svB4LO7gjTizWcOK5e63jX9HA6jaHCDDZqK3IbVWmNglmNBmedcj9I
 j9Zq73MD9O/HXi1sD5avdDVIKM+FYdK9AjGq53jypbynRJUppyYxuw30ndP1WBa5
 K8b7aLny+I6jOnXhtlkVmcOy7DgMJoMo/tqZL54vYeYLKCyTRL7pow9gg19mx+n/
 WXGee4BHSjoTBAI3F47NPxrKpnVsOeDrLHl8+hHSxPZ2VBaFk7Nqjc/7vuSpOla3
 0Byessu9jd32ZX2tZd66eEk2Zvj45pyfRdFCQ71kBtpzyzekTck2BPwdvO+eTAiz
 13Y8my2U38GE1aviN2RnjRO+cOc8VNaegO5GHGWRmq6oi4/tpZTHC8234v+jkfUs
 IOWVAdQ2u0NpkzV6PB/ZcLeNx3HE9BnqTaPIdPOxzD/CJV6FR1YaFrXdiLibSVVB
 a9sYmSyIw3/N1a+Qg8T4
 =yrfJ
 -----END PGP SIGNATURE-----

Merge tag 'bcm2835-for-3.15-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi into next/cleanup

Merge "ARM: bcm2835: consolidate into mach-bcm/" from Stephen Warren:

This pull request consists of a single patch which moves files from
arch/arm/mach-bcm2835 into mach-bcm, thus consolidating them with
support for other Broadcom chips.

* tag 'bcm2835-for-3.15-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi:
  ARM: bcm2835: Move to mach-bcm directory

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-11 13:28:32 -07:00
Olof Johansson
50776b6cf8 ARM: mach-bcm: cleanups for 3.15
- make bcm281xx symbol naming consistent with SoC name
 - remove unneeded and reorder bcm281xx header files
 - consolidate bcm281xx reboot and l2 cache code
 
  #
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTGDPeAAoJEOfTILNwq7R4qf0QAPRRcEFl8+B1jHFKeoR1NE73
 Y8RaajbaaVbiu7R/P3u271KfLl0M5yT3XT/ocG6wzaMgbewb3EYs47kNGJ8STqAB
 N9SCrS3baWbSjHKFbgHGqz/LMhGEWwUuRa0UE9Pqth/jhLcxS4p3sASyugINEr66
 E/mzZ5u04HRPE97FyAl6MbpX0ZOcA7BjNpeSwIDgd74bj6fmi2cO8Yo+Sozd2nBj
 bKo4BdTmJYx0O2A3p5UEjbQKOeAffoKznYKmIyfhsx21sRigkqj85JpynAO6bNY7
 wPhnGXbcePqECnBxSvlLwsVTmBKN3QKzMIjiHrqBDQ5bWl4ffVK68UtuBSxsmgWw
 oA9e76tT5qtbDDmWki4T0hhpK8LB27cJQB87nuV5C+C75FfVKRQLmg2jO4F+FllG
 K20Y+a2d6LGsUaMYeR/QhrPdMXCgwDGOjsqHerAGXWZXVHUiOB+KMyeS8cOQm1YV
 b5UgbNaOc1myrjejbvHfPMopdMuznWq1a3eVlK4W5cJKaY60/i3bqvdGn8bNJLQb
 2ViePUfHpx4vMeKWnfNtD2Ys6lvkw1DMy0uVLRkQEQO88jJBDWrJaA7cUNekCd2E
 R12sj7H61lvdi5lfz9mKabWHY0jZlqB6A1lGsTtvb/bL49faMGFJynfni9ZYv8zW
 D/j3x30zph+6gkC/8pi/
 =vYzH
 -----END PGP SIGNATURE-----

Merge tag 'armsoc/for-3.15/cleanup' of git://github.com/broadcom/mach-bcm into next/cleanup

Merge "ARM: mach-bcm: cleanups for 3.15" from Matt Porter:

- make bcm281xx symbol naming consistent with SoC name
- remove unneeded and reorder bcm281xx header files
- consolidate bcm281xx reboot and l2 cache code

* tag 'armsoc/for-3.15/cleanup' of git://github.com/broadcom/mach-bcm:
  ARM: bcm281xx: Rename board_init() function
  ARM: bcm281xx: Re-order hearder files
  ARM: bcm281xx: Consolidate reboot code
  ARM: bcm281xx: Move kona_l2_cache_init() so it can be shared
  ARM: bcm281xx: symbol cleanup

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-11 13:27:21 -07:00
Olof Johansson
07cb1ec1ae ARM: mach-bcm soc updates
- add BCM5301x support
 - remove GENERIC_TIME
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTGAsEAAoJEOfTILNwq7R4hyEP/ApeGhAN6ubhui78M880ycl1
 TEjTvAA9yvbldiTF8Jp2XUIdIfxTcraCpd11TMF1kgQcnKNK9GqvkaB8Dh98WYzD
 MY8+8SMJSGsPtAT5tp0MaamZREoPm4wEZ5JWn8wQjIMTjiIPDu78Gjm0M00E3c+a
 1uOkbUrIFTECgzIeMr92p0NSYqYthz0g5EE/BTfPWCA6wqfIQ4DvqUtB9Mad6iR6
 VBN6tqjL98riz+CYSV3WhqMCaI60HEPtpVBhrVMoZHKyMcR7O83F7V91t2QZc/dM
 5DZLSdU9/1ZkIpK3gFf5CyBbO6lVv47kFpVm7hSZhqPIR6w3SfhCNxjPy5dyCb5Y
 vlMqUmakXtuqPkk6mm4x79Scxj/1ct3g7pssHzS7N8tuAtPISeBzW+GhjXjICXtR
 6shZQRJwhCDJ3pPMWsBW60VQ/ct+A9X5gXka8kthWGoLPBlZrLNR8vZmsfcbx4Ei
 nurWQGLoMfHt7KxVaTVrrwdUXkXTRc4EZrmMvVkNzJEiedyuN8E1nZEF2kVOPsgA
 aZIih6Lex4mPVakGwaQH4zPCXTfHwstIe0P1aPy+seHzbqUf64s0VkNEbctCCZOe
 7a4yj72KYXEnsD2mSHa3c/MRfQEzEatefl1QGeQw7nPsDwxOWgrCsWylXYoVCSyT
 +i6ga9T1VIwL5Jlb6fhr
 =WKwJ
 -----END PGP SIGNATURE-----

Merge tag 'armsoc/for-3.15/soc-2' of git://github.com/broadcom/mach-bcm into next/soc

Merge "ARM: mach-bcm soc updates" from Matt Porter:

- add BCM5301x support
- remove GENERIC_TIME

* tag 'armsoc/for-3.15/soc-2' of git://github.com/broadcom/mach-bcm:
  ARM: BCM5301X: workaround suppress fault
  ARM: BCM5301X: add early debugging support
  ARM: BCM5301X: initial support for the BCM5301X/BCM470X SoCs with ARM CPU
  ARM: mach-bcm: Remove GENERIC_TIME

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-11 13:18:36 -07:00
Markus Mayer
0e8b860ac6 ARM: bcm281xx: Rename board_init() function
Rename board_init() to bcm281xx_init(), so the name reflects the board
specific nature of this function.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 03:18:01 -05:00
Markus Mayer
389df03610 ARM: bcm281xx: Re-order hearder files
Re-order header files alphabetically.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 03:18:00 -05:00
Markus Mayer
a21ea269b9 ARM: bcm281xx: Consolidate reboot code
Consolidate reboot code and remove unnecessary functions.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 03:17:59 -05:00
Markus Mayer
8b1c342629 ARM: bcm281xx: Move kona_l2_cache_init() so it can be shared
In preparation for future SoCs, move kona_l2_cache_init() from board
specific board_bcm281xx.c to shared kona.c, so multiple SoC families
can make use of it. Also change the return type to "void", since we
never look at the return code anyway.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 03:17:59 -05:00
Alex Elder
9c6423aa7e ARM: bcm281xx: symbol cleanup
This patch renames a few symbols that needlessly used "11351" rather
than "281xx" in their names.

Support for the bcm11351 board is being removed from the kernel, and
the family of boards is more properly referred to as "bcm281xx".

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 03:17:34 -05:00
Hauke Mehrtens
fdf4850cb5 ARM: BCM5301X: workaround suppress fault
Without this patch I am getting a unhandled fault exception like this
one after "Freeing unused kernel memory":

Freeing unused kernel memory: 1260K (c02c1000 - c03fc000)
Unhandled fault: imprecise external abort (0x1c06) at 0xb6f89005
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007

The address which is here 0xb6f89005 changes from boot to boot, with a
new build the changes are bigger. With kernel 3.10 I have also seen
this fault at different places in the boot process, but starting with
3.11 they are always occurring after the "Freeing unused kernel memory"
message. I never was able to completely boot to userspace without this
handler. The abort code is constant 0x1c06. This fault just happens
once in the boot process I have never seen it happing twice or more.

I also tried changing the CPSR.A bit to 0 in init_early, with this code
like Afzal suggested, but that did not change anything:
asm volatile("mrs r12, cpsr\n"
	"bic r12, r12, #0x00000100\n"
	"msr cpsr_c, r12" ::: "r12", "cc", "memory");

Disabling the L2 cache by building with CONFIG_CACHE_L2X0 unset did not
help.

This workaround was copied from the vendor code including most of the
comments. It says it they think this is caused by the CFE boot loader
used on this device. I do not have any access to any datasheet or
errata document to check this.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christian Daudt <bcm@fixthebug.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 00:36:04 -05:00
Hauke Mehrtens
5b293ebe75 ARM: BCM5301X: initial support for the BCM5301X/BCM470X SoCs with ARM CPU
This patch adds support for the BCM5301X/BCM470X SoCs with an ARM CPUs.
Currently just booting to a shell is working and nothing else, no
Ethernet, wifi, flash, ...
I have some pending patches to make Ethernet work for this device.
Mostly device tree support for bcma is missing.

This SoC is used in small office and home router with Broadcom SoCs
it's internal name is Northstar. This code should support the BCM4707,
BCM4708, BCM4709, BCM53010, BCM53011 and BCM53012 SoC. It uses one or
two ARM Cortex A9 Cores, some highlights are 2 PCIe 2.0 controllers,
4 Gigabit Ethernet MACs and a USB 3.0 host controller.

This SoC uses a dual core CPU, but this is currently not implemented.
More information about this SoC can be found here:
http://www.anandtech.com/show/5925/broadcom-announces-bcm4708x-and-bcm5301x-socs-for-80211ac-routers

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christian Daudt <bcm@fixthebug.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 00:36:02 -05:00
Richard Weinberger
c43bad6f76 ARM: mach-bcm: Remove GENERIC_TIME
The symbol is an orphan, get rid of it.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-03-06 00:34:32 -05:00
Markus Mayer
d30fe62721 ARM: bcm2835: Move to mach-bcm directory
Move the bcm2835 board file into the mach-bcm directory. This allows us
to get rid of the mach-bcm2835 directory with the associated Kconfig
and Makefile.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
[swarren, adjust defconfig so ARCH_BCM2835 still gets enabled]
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2014-02-24 19:42:35 -07:00
Rob Herring
ddb902cc34 ARM: centralize common multi-platform kconfig options
Multi-platform requires various kconfig options to be selected, so
platforms don't need to select them individually.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2014-02-19 16:38:18 -06:00
Sherman Yin
54b1aa5a5b ARM: pinctrl: Add Broadcom Capri pinctrl driver
Adds pinctrl driver for Broadcom Capri (BCM281xx) SoCs.

v4: - PINCTRL selected in Kconfig, PINCTRL_CAPRI selected in bcm_defconfig
    - make use of regmap
    - change CAPRI_PIN_UPDATE from macro to inline function.
    - Handle pull-up strength arg in Ohm instead of enum
v3: Re-work driver to be based on generic pin config. Moved config selection
    from Kconfig to bcm_defconfig.
v2: Use hyphens instead of underscore in DT property names.

Signed-off-by: Sherman Yin <syin@broadcom.com>
Reviewed-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-01-16 14:25:38 +01:00
Olof Johansson
6216650a7a BCM changes for 3.13/soc. A number of cleanup related changes.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJScKOTAAoJEPYb7NoJr+nL+fwP/1bZKlbqYURXdrjLxHTZGKp3
 WBpo8KUYp80nAZpw1SLoOk/78ciulQ0VLifWMebzMd/1qXXnek71jfYusbSb7MeM
 e70y9TRtXrfkDPxL12XTXIf6F7JieGtVx0S2jJsGsofmM0w6b723KwZAYZgxACYB
 Ec7TSzwaTlBBCI+ZyouS8e4CkS0x/0Mpkj8Ym8FDhKnwTs/mtD9kOcgVBzfz0Bt8
 ExtiAsASeDvxUq5zskOiGiEhaNlhbQHd8etLIHEBTRreYQRg8nWTI+fdKKqwHKi0
 qHm7p/ZcVQUgqf/2EjEfbEa0sQrQKrH82oaJirY3A6QrIEVQ5OVZCThkcvVV5Bxo
 w1jDJcxYl2PEM/awR1YkRT3KQKb13J2PxbLFTYnKyhKgZz4mvB/NnjI1AuskTiS8
 ddYfJ5apOqtZBqIYQvM6fv69mSWNinhmOqze14ulxGn+U6CVEYsGcQY1QvgA7T+c
 0JAAUJwgRsJ+jIDjzx4EJFYCEpdRY8NAKNnZmPr8maP7DIttsbZd0KjWTTqg1Y1N
 RHJkxJtnSxJYxfXkgpADJJNjcPdYxqfoYSpcRrGpFM3XLyCPKu2FiahpACyjua3W
 JPzRGuYr4I51D16uHiYLxkDSwBKLYBlzyi5bzb+hed9nhoeynvOYtZZkuVgqVRKT
 QJwnbUpxU1m870cNpAm/
 =fAes
 -----END PGP SIGNATURE-----

Merge tag 'bcm-for-3.13-soc2' of git://github.com/broadcom/bcm11351 into next/soc

From Christian Daudt, BCM changes for 3.13/soc. Mostly cleanups and
renaming of kernel config options, pushing down the mobile platforms
one level in the naming scheme, keeping ARCH_BCM as a wider family
config option.

* tag 'bcm-for-3.13-soc2' of git://github.com/broadcom/bcm11351:
  ARM: bcm_defconfig: Run "make savedefconfig"
  ARM: bcm281xx: Add ARCH Timers to config
  rename ARCH_BCM to ARCH_BCM_MOBILE (mach-bcm)
  ARM: bcm281xx: more descriptive machine string
  ARM: bcm281xx: Enable GPIO driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-30 14:03:39 -07:00
Christian Daudt
e84dfa26a0 ARM: bcm281xx: Add ARCH Timers to config
Add HAVE_ARM_ARCH_TIMER to Broadcom Kconfig as it is
required for some Mobile SoCs.

Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: Mark Hambleton <mahamble@broadcom.com>
Reviewed-by: James King <jamesk@broadcom.com>
2013-10-29 23:09:10 -07:00
Christian Daudt
badb923898 rename ARCH_BCM to ARCH_BCM_MOBILE (mach-bcm)
Currently ARCH_BCM has been used for Broadcom
Mobile V7 based SoCs. In order to allow other Broadcom
SoCs to also use mach-bcm directory and files, this patch
renames the original ARCH_BCM to ARCH_BCM_MOBILE, and
uses ARCH_BCM to define any Broadcom chip residing
in mach-bcm directory.

Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Acked-by: Olof Johansson <olof@lixom.net>

Changes from v2:
 - switch ARCH_MULTIPLATFORM from select to depends
 - remove 'default y' from BCM_MOBILE

Changes from v1:
 - fix alpha ordering in dts/Makefile
 - break into 4 patches for separate subsys
2013-10-29 23:07:57 -07:00
Christian Daudt
616b931eea ARM: bcm281xx: more descriptive machine string
Add SoC model to DT_MACHINE_START string.

Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: Mark Hambleton <mahamble@broadcom.com>
Reviewed-by: James King <jamesk@broadcom.com>
2013-10-01 18:16:25 -07:00
Markus Mayer
29c700d758 ARM: bcm281xx: Enable GPIO driver
Turn on the bcm281xx GPIO driver in the kernel configuration.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Christian Daudt <csd@broadcom.com>
2013-10-01 18:16:23 -07:00
Matt Porter
2881764d2a ARM: bcm: provide common arch init for DT clocks
With arch/arm calling of_clk_init(NULL) and clocksource_of_init()
this is no longer needed. The former is useful because we can make
use of dummy fixed clocks for drivers until the bcm281xx common
clock driver is ready.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Acked-by: Christian Daudt <csd@broadcom.com>
2013-09-29 21:09:23 +02:00
Christian Daudt
3a76b35186 ARM: bcm: Make secure API call optional
The current bcm_kona_smc_init function throws a BUG_ON if there's no SMC
device node defined in the device tree.

Since secure API access is optional depending the chip configuration,
fix this by allowing the rest of the code to run even if there's no SMC
device node defined

Signed-off-by: Christian Daudt <csd@broadcom.com>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
2013-08-20 10:51:39 -07:00
Christian Daudt
aea237bfa0 ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers)
[ this is a follow-up to this discussion:
http://archive.arm.linux.org.uk/lurker/message/20130730.230827.a1ceb12a.en.html ]
This patchset renames all uses of "bcm," name bindings to
"brcm," as they were done prior to knowing that brcm had
already been standardized as Broadcom vendor prefix
(in Documentation/devicetree/bindings/vendor-prefixes.txt).
This will not cause any churn on devices because none of
these bindings have made it into production yet.

Signed-off-by: Christian Daudt <csd@broadcom.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
2013-08-20 10:51:38 -07:00
Christian Daudt
959faee9e1 ARM: bcm: Rename board_bcm
In order to support multiple SoC models in the mach-bcm
directory, board_bcm.c is being renamed board_bcm281xx.c

Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Christian Daudt <csd@broadcom.com>
2013-08-19 15:44:28 -07:00
Markus Mayer
257b49e3d8 ARM: bcm281xx: Board specific reboot code
This patch adds the code needed to trigger a reboot on the bcm281xx
family.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Alex Elder <alex.elder@linaro.org>
Acked-by: Christian Daudt <csd@broadcom.com>
2013-08-08 15:19:19 -07:00
Markus Mayer
58d3077a75 ARM: bcm281xx: Turn on L2 cache.
Turning on the L2 cache for the bcm281xx family.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Acked-by: Christian Daudt <csd@broadcom.com>
2013-08-06 15:35:46 -07:00