Skip to content

Commit

Permalink
ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marc Carino authored and Matt Porter committed Jul 28, 2014
1 parent 6711523 commit 4fbe66d
Show file tree
Hide file tree
Showing 7 changed files with 463 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/configs/multi_v7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CONFIG_MACH_DOVE=y
CONFIG_ARCH_BCM=y
CONFIG_ARCH_BCM_MOBILE=y
CONFIG_ARCH_BCM_5301X=y
CONFIG_ARCH_BRCMSTB=y
CONFIG_ARCH_BERLIN=y
CONFIG_MACH_BERLIN_BG2=y
CONFIG_MACH_BERLIN_BG2CD=y
Expand Down
14 changes: 14 additions & 0 deletions arch/arm/mach-bcm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,18 @@ config ARCH_BCM_5301X
different SoC or with the older BCM47XX and BCM53XX based
network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx

config ARCH_BRCMSTB
bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7
depends on MMU
select ARM_GIC
select MIGHT_HAVE_PCI
select HAVE_SMP
select HAVE_ARM_ARCH_TIMER
help
Say Y if you intend to run the kernel on a Broadcom ARM-based STB
chipset.

This enables support for Broadcom ARM-based set-top box chipsets,
including the 7445 family of chips.

endif
5 changes: 5 additions & 0 deletions arch/arm/mach-bcm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o

# BCM5301X
obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o

ifeq ($(CONFIG_ARCH_BRCMSTB),y)
obj-y += brcmstb.o
obj-$(CONFIG_SMP) += headsmp-brcmstb.o platsmp-brcmstb.o
endif
28 changes: 28 additions & 0 deletions arch/arm/mach-bcm/brcmstb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2013-2014 Broadcom Corporation
*
* 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/init.h>
#include <linux/of_platform.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>

static const char *brcmstb_match[] __initconst = {
"brcm,bcm7445",
"brcm,brcmstb",
NULL
};

DT_MACHINE_START(BRCMSTB, "Broadcom STB (Flattened Device Tree)")
.dt_compat = brcmstb_match,
MACHINE_END
19 changes: 19 additions & 0 deletions arch/arm/mach-bcm/brcmstb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (C) 2013-2014 Broadcom Corporation
*
* 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 __BRCMSTB_H__
#define __BRCMSTB_H__

void brcmstb_secondary_startup(void);

#endif /* __BRCMSTB_H__ */
33 changes: 33 additions & 0 deletions arch/arm/mach-bcm/headsmp-brcmstb.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SMP boot code for secondary CPUs
* Based on arch/arm/mach-tegra/headsmp.S
*
* Copyright (C) 2010 NVIDIA, Inc.
* Copyright (C) 2013-2014 Broadcom Corporation
*
* 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 <asm/assembler.h>
#include <linux/linkage.h>
#include <linux/init.h>

.section ".text.head", "ax"

ENTRY(brcmstb_secondary_startup)
/*
* Ensure CPU is in a sane state by disabling all IRQs and switching
* into SVC mode.
*/
setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r0

bl v7_invalidate_l1
b secondary_startup
ENDPROC(brcmstb_secondary_startup)
Loading

0 comments on commit 4fbe66d

Please sign in to comment.