mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
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>
This commit is contained in:
commit
3b325a494b
@ -113,7 +113,7 @@ choice
|
||||
|
||||
config DEBUG_BCM_KONA_UART
|
||||
bool "Kernel low-level debugging messages via BCM KONA UART"
|
||||
depends on ARCH_BCM
|
||||
depends on ARCH_BCM_MOBILE
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2012-2013 Broadcom Corporation
|
||||
# Copyright (C) 2012-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
|
||||
@ -10,7 +10,9 @@
|
||||
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
obj-$(CONFIG_ARCH_BCM_MOBILE) := board_bcm281xx.o bcm_kona_smc.o bcm_kona_smc_asm.o kona.o
|
||||
obj-$(CONFIG_ARCH_BCM_MOBILE) := board_bcm281xx.o board_bcm21664.o \
|
||||
bcm_kona_smc.o bcm_kona_smc_asm.o kona.o
|
||||
|
||||
plus_sec := $(call as-instr,.arch_extension sec,+sec)
|
||||
AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec)
|
||||
obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o
|
||||
|
78
arch/arm/mach-bcm/board_bcm21664.c
Normal file
78
arch/arm/mach-bcm/board_bcm21664.c
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright (C) 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/clocksource.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "bcm_kona_smc.h"
|
||||
#include "kona.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,
|
||||
&platform_bus);
|
||||
kona_l2_cache_init();
|
||||
}
|
||||
|
||||
static const char * const bcm21664_dt_compat[] = {
|
||||
"brcm,bcm21664",
|
||||
NULL,
|
||||
};
|
||||
|
||||
DT_MACHINE_START(BCM21664_DT, "BCM21664 Broadcom Application Processor")
|
||||
.init_machine = bcm21664_init,
|
||||
.restart = bcm21664_restart,
|
||||
.dt_compat = bcm21664_dt_compat,
|
||||
MACHINE_END
|
Loading…
Reference in New Issue
Block a user