Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

This pull request contains drivers related changes for Broadcom SoCs:

- Florian moves drivers/soc/brcmstb to drivers/soc/bcm/brcmstb to be consistent with
how other SoCs are doing it

- Chris provides a reset driver which is common to the BCM21664 and BCM23550 SoCs

- Ben fixes a warning by providing the appropriate include file

* tag 'arm-soc/for-4.8/drivers' of http://github.com/Broadcom/stblinux:
soc: brcmstb: fix warning from missing include
power: Introduce Broadcom kona reset driver
soc: Move brcmstb to bcm/brcmstb

Signed-off-by: Olof Johansson <olof@lixom.net>

+102 -12
+1
MAINTAINERS
··· 2489 2489 F: arch/arm/configs/bcm_defconfig 2490 2490 F: drivers/mmc/host/sdhci-bcm-kona.c 2491 2491 F: drivers/clocksource/bcm_kona_timer.c 2492 + F: drivers/power/reset/brcm-kona-reset.c 2492 2493 2493 2494 BROADCOM BCM2835 ARM ARCHITECTURE 2494 2495 M: Stephen Warren <swarren@wwwdotorg.org>
+10
drivers/power/reset/Kconfig
··· 46 46 47 47 Say Y if you have an Axxia family SoC. 48 48 49 + config POWER_RESET_BRCMKONA 50 + bool "Broadcom Kona reset driver" 51 + depends on ARM || COMPILE_TEST 52 + default ARCH_BCM_MOBILE 53 + help 54 + This driver provides restart support for Broadcom Kona chips. 55 + 56 + Say Y here if you have a Broadcom Kona-based board and you wish 57 + to have restart support. 58 + 49 59 config POWER_RESET_BRCMSTB 50 60 bool "Broadcom STB reset driver" 51 61 depends on ARM || MIPS || COMPILE_TEST
+1
drivers/power/reset/Makefile
··· 3 3 obj-$(CONFIG_POWER_RESET_AT91_RESET) += at91-reset.o 4 4 obj-$(CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC) += at91-sama5d2_shdwc.o 5 5 obj-$(CONFIG_POWER_RESET_AXXIA) += axxia-reset.o 6 + obj-$(CONFIG_POWER_RESET_BRCMKONA) += brcm-kona-reset.o 6 7 obj-$(CONFIG_POWER_RESET_BRCMSTB) += brcmstb-reboot.o 7 8 obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o 8 9 obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
+73
drivers/power/reset/brcm-kona-reset.c
··· 1 + /* 2 + * Copyright (C) 2016 Broadcom 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License as 6 + * published by the Free Software Foundation version 2. 7 + * 8 + * This program is distributed "as is" WITHOUT ANY WARRANTY of any 9 + * kind, whether express or implied; without even the implied warranty 10 + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + */ 13 + 14 + #include <linux/io.h> 15 + #include <linux/of_address.h> 16 + #include <linux/of_platform.h> 17 + #include <linux/reboot.h> 18 + 19 + #define RSTMGR_REG_WR_ACCESS_OFFSET 0 20 + #define RSTMGR_REG_CHIP_SOFT_RST_OFFSET 4 21 + 22 + #define RSTMGR_WR_PASSWORD 0xa5a5 23 + #define RSTMGR_WR_PASSWORD_SHIFT 8 24 + #define RSTMGR_WR_ACCESS_ENABLE 1 25 + 26 + static void __iomem *kona_reset_base; 27 + 28 + static int kona_reset_handler(struct notifier_block *this, 29 + unsigned long mode, void *cmd) 30 + { 31 + /* 32 + * A soft reset is triggered by writing a 0 to bit 0 of the soft reset 33 + * register. To write to that register we must first write the password 34 + * and the enable bit in the write access enable register. 35 + */ 36 + writel((RSTMGR_WR_PASSWORD << RSTMGR_WR_PASSWORD_SHIFT) | 37 + RSTMGR_WR_ACCESS_ENABLE, 38 + kona_reset_base + RSTMGR_REG_WR_ACCESS_OFFSET); 39 + writel(0, kona_reset_base + RSTMGR_REG_CHIP_SOFT_RST_OFFSET); 40 + 41 + return NOTIFY_DONE; 42 + } 43 + 44 + static struct notifier_block kona_reset_nb = { 45 + .notifier_call = kona_reset_handler, 46 + .priority = 128, 47 + }; 48 + 49 + static int kona_reset_probe(struct platform_device *pdev) 50 + { 51 + struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 52 + 53 + kona_reset_base = devm_ioremap_resource(&pdev->dev, res); 54 + if (IS_ERR(kona_reset_base)) 55 + return PTR_ERR(kona_reset_base); 56 + 57 + return register_restart_handler(&kona_reset_nb); 58 + } 59 + 60 + static const struct of_device_id of_match[] = { 61 + { .compatible = "brcm,bcm21664-resetmgr" }, 62 + {}, 63 + }; 64 + 65 + static struct platform_driver bcm_kona_reset_driver = { 66 + .probe = kona_reset_probe, 67 + .driver = { 68 + .name = "brcm-kona-reset", 69 + .of_match_table = of_match, 70 + }, 71 + }; 72 + 73 + builtin_platform_driver(bcm_kona_reset_driver);
-1
drivers/soc/Kconfig
··· 1 1 menu "SOC (System On Chip) specific Drivers" 2 2 3 3 source "drivers/soc/bcm/Kconfig" 4 - source "drivers/soc/brcmstb/Kconfig" 5 4 source "drivers/soc/fsl/qe/Kconfig" 6 5 source "drivers/soc/mediatek/Kconfig" 7 6 source "drivers/soc/qcom/Kconfig"
-1
drivers/soc/Makefile
··· 3 3 # 4 4 5 5 obj-y += bcm/ 6 - obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ 7 6 obj-$(CONFIG_ARCH_DOVE) += dove/ 8 7 obj-$(CONFIG_MACH_DOVE) += dove/ 9 8 obj-y += fsl/
+15
drivers/soc/bcm/Kconfig
··· 1 + menu "Broadcom SoC drivers" 2 + 1 3 config RASPBERRYPI_POWER 2 4 bool "Raspberry Pi power domain driver" 3 5 depends on ARCH_BCM2835 || COMPILE_TEST ··· 9 7 help 10 8 This enables support for the RPi power domains which can be enabled 11 9 or disabled via the RPi firmware. 10 + 11 + config SOC_BRCMSTB 12 + bool "Broadcom STB SoC drivers" 13 + depends on ARM 14 + select SOC_BUS 15 + help 16 + Enables drivers for the Broadcom Set-Top Box (STB) series of chips. 17 + This option alone enables only some support code, while the drivers 18 + can be enabled individually within this menu. 19 + 20 + If unsure, say N. 21 + 22 + endmenu
+1
drivers/soc/bcm/Makefile
··· 1 1 obj-$(CONFIG_RASPBERRYPI_POWER) += raspberrypi-power.o 2 + obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/
-10
drivers/soc/brcmstb/Kconfig
··· 1 - menuconfig SOC_BRCMSTB 2 - bool "Broadcom STB SoC drivers" 3 - depends on ARM 4 - select SOC_BUS 5 - help 6 - Enables drivers for the Broadcom Set-Top Box (STB) series of chips. 7 - This option alone enables only some support code, while the drivers 8 - can be enabled individually within this menu. 9 - 10 - If unsure, say N.
drivers/soc/brcmstb/Makefile drivers/soc/bcm/brcmstb/Makefile
+1
drivers/soc/brcmstb/biuctrl.c drivers/soc/bcm/brcmstb/biuctrl.c
··· 19 19 #include <linux/io.h> 20 20 #include <linux/of_address.h> 21 21 #include <linux/syscore_ops.h> 22 + #include <linux/soc/brcmstb/brcmstb.h> 22 23 23 24 #define CPU_CREDIT_REG_OFFSET 0x184 24 25 #define CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK 0x70000000
drivers/soc/brcmstb/common.c drivers/soc/bcm/brcmstb/common.c