Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8739a229 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'arm-soc/for-4.8/soc' of http://github.com/Broadcom/stblinux into next/soc

This pull request contains SoC changes for Broadcom ARM-based SoCs:

- Chris prepares support for the BCM23550 by removing reset code in the
  BCM21664 machine code since a proper drivers/power/reset driver is provided and
  shared, he then adds a machine entry point for BCM23550 and updates the SMP
  code to bring-up the secondary cores on BCM23550

- Ben fixes a warning in the Kona L2 SMC code by adding the missing include file

* tag 'arm-soc/for-4.8/soc' of http://github.com/Broadcom/stblinux

:
  ARM: bcm: fix missing include of kona_l2_cache.h
  ARM: BCM23550 SMP support
  ARM: Add support for Broadcom BCM23550 SoC
  ARM: bcm21664: Remove reset code

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents cc97d394 423779cf
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -111,9 +111,17 @@ config ARCH_BCM_21664
	  Enable support for the BCM21664 family, which includes
	  BCM21663 and BCM21664 variants.

config ARCH_BCM_23550
	bool "Broadcom BCM23550 SoC"
	depends on ARCH_MULTI_V7
	select ARCH_BCM_MOBILE
	select HAVE_SMP
	help
	  Enable support for the BCM23550.

config ARCH_BCM_MOBILE_L2_CACHE
	bool "Broadcom mobile SoC level 2 cache support"
	depends on ARCH_BCM_MOBILE
	depends on ARCH_BCM_281XX || ARCH_BCM_21664
	default y
	select CACHE_L2X0
	select ARCH_BCM_MOBILE_SMC
@@ -128,7 +136,7 @@ config ARCH_BCM_MOBILE_SMP
	select HAVE_ARM_SCU
	select ARM_ERRATA_764369
	help
	  SMP support for the BCM281XX and BCM21664 SoC families.
	  SMP support for the BCM281XX, BCM21664 and BCM23550 SoC families.
	  Provided as an option so SMP support for SoCs of this type
	  can be disabled for an SMP-enabled kernel.

+4 −1
Original line number Diff line number Diff line
@@ -26,7 +26,10 @@ obj-$(CONFIG_ARCH_BCM_281XX) += board_bcm281xx.o
# BCM21664
obj-$(CONFIG_ARCH_BCM_21664)	+= board_bcm21664.o

# BCM281XX and BCM21664 SMP support
# BCM23550
obj-$(CONFIG_ARCH_BCM_23550)	+= board_bcm23550.o

# BCM281XX, BCM21664 and BCM23550 SMP support
obj-$(CONFIG_ARCH_BCM_MOBILE_SMP) += platsmp.o

# BCM281XX and BCM21664 L2 cache control
+0 −42
Original line number Diff line number Diff line
@@ -11,53 +11,12 @@
 * GNU General Public License for more details.
 */

#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/io.h>

#include <asm/mach/arch.h>

#include "kona_l2_cache.h"

#define RSTMGR_DT_STRING		"brcm,bcm21664-resetmgr"

#define RSTMGR_REG_WR_ACCESS_OFFSET	0
#define RSTMGR_REG_CHIP_SOFT_RST_OFFSET	4

#define RSTMGR_WR_PASSWORD		0xa5a5
#define RSTMGR_WR_PASSWORD_SHIFT	8
#define RSTMGR_WR_ACCESS_ENABLE		1

static void bcm21664_restart(enum reboot_mode mode, const char *cmd)
{
	void __iomem *base;
	struct device_node *resetmgr;

	resetmgr = of_find_compatible_node(NULL, NULL, RSTMGR_DT_STRING);
	if (!resetmgr) {
		pr_emerg("Couldn't find " RSTMGR_DT_STRING "\n");
		return;
	}
	base = of_iomap(resetmgr, 0);
	if (!base) {
		pr_emerg("Couldn't map " RSTMGR_DT_STRING "\n");
		return;
	}

	/*
	 * A soft reset is triggered by writing a 0 to bit 0 of the soft reset
	 * register. To write to that register we must first write the password
	 * and the enable bit in the write access enable register.
	 */
	writel((RSTMGR_WR_PASSWORD << RSTMGR_WR_PASSWORD_SHIFT) |
		RSTMGR_WR_ACCESS_ENABLE,
		base + RSTMGR_REG_WR_ACCESS_OFFSET);
	writel(0, base + RSTMGR_REG_CHIP_SOFT_RST_OFFSET);

	/* Wait for reset */
	while (1);
}

static void __init bcm21664_init(void)
{
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -71,6 +30,5 @@ static const char * const bcm21664_dt_compat[] = {

DT_MACHINE_START(BCM21664_DT, "BCM21664 Broadcom Application Processor")
	.init_machine = bcm21664_init,
	.restart = bcm21664_restart,
	.dt_compat = bcm21664_dt_compat,
MACHINE_END
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 Broadcom
 *
 * 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.
 */

#include <linux/of_platform.h>

#include <asm/mach/arch.h>

static const char * const bcm23550_dt_compat[] = {
	"brcm,bcm23550",
	NULL,
};

DT_MACHINE_START(BCM23550_DT, "BCM23550 Broadcom Application Processor")
	.dt_compat = bcm23550_dt_compat,
MACHINE_END
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <asm/hardware/cache-l2x0.h>

#include "bcm_kona_smc.h"
#include "kona_l2_cache.h"

void __init kona_l2_cache_init(void)
{
Loading