From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC
Date: Wed, 08 Oct 2014 09:54:04 +0200 [thread overview]
Message-ID: <4255803.4lcNtQPo2T@wuerfel> (raw)
In-Reply-To: <1412746025-11998-2-git-send-email-sbranden@broadcom.com>
On Tuesday 07 October 2014 22:27:00 Scott Branden wrote:
> From: Jonathan Richardson <jonathar@broadcom.com>
>
> 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>
> ---
> arch/arm/mach-bcm/Kconfig | 31 ++++++++
> arch/arm/mach-bcm/Makefile | 3 +
> arch/arm/mach-bcm/bcm_cygnus.c | 166 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 200 insertions(+)
> create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
>
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index fc93800..2dd3f78 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -5,6 +5,37 @@ menuconfig ARCH_BCM
>
> if ARCH_BCM
>
> +config ARCH_BCM_IPROC
> + bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
> + select ARM_GIC
> + select CACHE_L2X0
> + select HAVE_ARM_TWD if LOCAL_TIMERS
> + select HAVE_CLK
> + select CLKSRC_OF
> + select CLKSRC_MMIO
> + select GENERIC_CLOCKEVENTS
> + select ARM_GLOBAL_TIMER
> + select ARCH_REQUIRE_GPIOLIB
> + select ARM_AMBA
> + select PINCTRL
> + select DEBUG_UART_8250
A lot of these are implied by ARCH_MULTI_V7, just drop them here.
Some others like DEBUG_UART_8250 should remain user-selectable, if
the platform works without them.
> + help
> + This enables support for systems based on Broadcom IPROC architected SoCs.
> + The IPROC complex contains one or more ARM CPUs along with common
> + core periperals. Application specific SoCs are created by adding a
> + uArchitecture containing peripherals outside of the IPROC complex.
> + Currently supported SoCs are Cygnus.
> +
> +menu "iProc SoC based Machine types"
> + depends on ARCH_BCM_IPROC
> +
> + config ARCH_BCM_CYGNUS
> + bool "Support Broadcom Cygnus board"
> + select USB_ARCH_HAS_EHCI if USB_SUPPORT
> + help
> + Support for Broadcom Cygnus SoC.
> +endmenu
I don't think you need per-board config options. The main option
above should be enough.
> +
> +#define CRMU_MAIL_BOX1 0x03024028
> +#define CRMU_SOFT_RESET_CMD 0xFFFFFFFF
Never hardcode physical register locations in source. This should come
from DT, and get moved into a regular 'reset' device driver.
You probably want to use drivers/power/reset/syscon-reboot.c
> +/* CRU_RESET register */
> +static void * __iomem crmu_mail_box1_reg;
> +
> +#ifdef CONFIG_NEON
> +
> +#define CRU_BASE 0x1800e000
> +#define CRU_SIZE 0x34
> +#define CRU_CONTROL_OFFSET 0x0
> +#define CRU_PWRDWN_EN_OFFSET 0x4
> +#define CRU_PWRDWN_STATUS_OFFSET 0x8
> +#define CRU_NEON0_HW_RESET 6
> +#define CRU_CLAMP_ON_NEON0 20
> +#define CRU_PWRONIN_NEON0 21
> +#define CRU_PWRONOUT_NEON0 21
> +#define CRU_PWROKIN_NEON0 22
> +#define CRU_PWROKOUT_NEON0 22
> +#define CRU_STATUS_DELAY_NS 500
> +#define CRU_MAX_RETRY_COUNT 10
> +#define CRU_RETRY_INTVL_US 1
> +
> +/* Power up the NEON/VFPv3 block. */
> +static void bcm_cygnus_powerup_neon(void)
> +{
> + void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
> + u32 reg, i;
Same thing here: this should really use the device node for CRU.
Can you describe what the CRU is? Is this specific to NEON or is
it some general-purpose power management unit?
> +static void __init bcm_cygnus_init(void)
> +{
> + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +
> + l2x0_of_init(0, ~0UL);
The l2x0_of_init can be removed now, just move the arguments into the
respective fields of the machine descriptor.
> + crmu_mail_box1_reg = ioremap(CRMU_MAIL_BOX1, SZ_4);
> + WARN_ON(!crmu_mail_box1_reg);
> +
> +#ifdef CONFIG_NEON
> + bcm_cygnus_powerup_neon();
> +#endif
> +}
In general, try to avoid #ifdef, use
if (IS_ENABLED(CONFIG_NEON))
bcm_cygnus_powerup_neon();
instead.
> +
> +static const char const *bcm_cygnus_dt_compat[] = {
> + "brcm,cygnus",
> + NULL,
> +};
> +
> +DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
> + .init_machine = bcm_cygnus_init,
> + .map_io = debug_ll_io_init,
> + .dt_compat = bcm_cygnus_dt_compat,
> + .restart = bcm_cygnus_restart
> +MACHINE_END
The map_io pointer is unnecessary, and the restart pointer should get
set by the reset driver. I hope we can find a way to avoid the
bcm_cygnus_init callback as well.
Arnd
next prev parent reply other threads:[~2014-10-08 7:54 UTC|newest]
Thread overview: 185+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Scott Branden <sbranden@broadcom.com>
2014-10-08 5:26 ` [PATCH V3 0/6] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-08 5:27 ` [PATCH 1/6] ARM: cygnus: Initial " Scott Branden
2014-10-08 7:54 ` Arnd Bergmann [this message]
2014-10-08 12:27 ` Scott Branden
2014-10-08 13:28 ` Arnd Bergmann
2014-10-08 16:27 ` Scott Branden
2014-10-08 18:12 ` Arnd Bergmann
2014-10-08 18:45 ` Scott Branden
2014-10-08 22:16 ` Scott Branden
2014-10-09 7:32 ` Arnd Bergmann
2014-10-08 8:11 ` Russell King - ARM Linux
2014-10-08 11:17 ` Scott Branden
2014-10-08 11:41 ` Russell King - ARM Linux
2014-10-08 13:10 ` Rob Herring
2014-10-08 16:34 ` Scott Branden
2014-10-08 5:27 ` [PATCH 2/6] clk: Clock driver " Scott Branden
2014-10-08 5:27 ` [PATCH 3/6] dt-bindings: Document Broadcom Cygnus SoC and clock driver Scott Branden
2014-10-08 7:57 ` Arnd Bergmann
2014-10-08 10:58 ` Scott Branden
2014-10-08 13:35 ` Arnd Bergmann
2014-10-08 5:27 ` [PATCH 4/6] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-08 7:58 ` Arnd Bergmann
2014-10-08 11:01 ` Scott Branden
2014-10-08 5:27 ` [PATCH 5/6] ARM: dts: Enable " Scott Branden
2014-10-08 5:27 ` [PATCH 6/6] MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock drivers Scott Branden
2014-10-09 22:44 ` [PATCH V4 0/7] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-09 22:44 ` [PATCH V4 1/7] ARM: cygnus: Initial " Scott Branden
2014-10-10 9:50 ` Arnd Bergmann
2014-10-10 19:08 ` Scott Branden
2014-10-09 22:44 ` [PATCH V4 2/7] clk: Clock driver " Scott Branden
2014-10-09 22:44 ` [PATCH V4 3/7] dt-bindings: Document Broadcom Cygnus SoC and clock driver Scott Branden
2014-10-09 22:44 ` [PATCH V4 4/7] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-09 22:44 ` [PATCH V4 5/7] ARM: dts: Enable " Scott Branden
2014-10-10 10:08 ` Arnd Bergmann
2014-10-10 19:11 ` Scott Branden
2014-10-09 22:44 ` [PATCH V4 6/7] MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock drivers Scott Branden
2014-10-09 23:00 ` Joe Perches
2014-10-09 23:18 ` Scott Branden
2014-10-09 22:44 ` [PATCH V4 7/7] ARM: multi_v7_defconfig: Enable ARCH_BCM_CYGNUS config Scott Branden
2014-10-10 9:59 ` Arnd Bergmann
2014-10-10 19:12 ` Scott Branden
2014-10-15 2:58 ` [PATCH v5 0/6] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-15 2:58 ` [PATCH v5 1/6] ARM: cygnus: Initial " Scott Branden
2014-10-20 19:55 ` Arnd Bergmann
2014-10-20 22:59 ` Scott Branden
2014-10-21 5:48 ` Arnd Bergmann
2014-10-22 0:11 ` Scott Branden
2014-10-22 8:22 ` Arnd Bergmann
2014-10-22 17:12 ` Scott Branden
2014-10-15 2:58 ` [PATCH v5 2/6] dt-bindings: Document Broadcom Cygnus SoC and clocks Scott Branden
2014-10-15 2:58 ` [PATCH v5 3/6] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-15 2:58 ` [PATCH v5 4/6] ARM: dts: Enable " Scott Branden
2014-10-15 2:58 ` [PATCH v5 5/6] MAINTAINERS: Entry for Cygnus/iproc arm architecture Scott Branden
2014-10-15 2:58 ` [PATCH v5 6/6] ARM: mach-bcm: Consolidate currently supported IPROC SoCs Scott Branden
2014-10-22 2:09 ` [PATCH v6 0/6] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-22 2:09 ` [PATCH v6 1/6] ARM: cygnus: Initial " Scott Branden
2014-10-22 2:09 ` [PATCH v6 2/6] dt-bindings: Document Broadcom Cygnus SoC and clocks Scott Branden
2014-10-22 2:09 ` [PATCH v6 3/6] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-22 2:09 ` [PATCH v6 4/6] ARM: dts: Enable " Scott Branden
2014-10-22 2:09 ` [PATCH v6 5/6] MAINTAINERS: Entry for Cygnus/iproc arm architecture Scott Branden
2014-10-22 2:09 ` [PATCH v6 6/6] ARM: mach-bcm: Consolidate currently supported IPROC SoCs Scott Branden
2014-10-22 20:57 ` [PATCH v7 0/7] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-22 20:57 ` [PATCH v7 1/7] ARM: cygnus: Initial " Scott Branden
2014-10-22 20:57 ` [PATCH v7 2/7] dt-bindings: Document Broadcom Cygnus SoC and clocks Scott Branden
2014-10-22 20:57 ` [PATCH v7 3/7] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-22 20:57 ` [PATCH v7 4/7] ARM: dts: Enable " Scott Branden
2014-10-28 16:10 ` Arnd Bergmann
2014-10-28 19:41 ` Scott Branden
2014-10-22 20:57 ` [PATCH v7 5/7] MAINTAINERS: Entry for Cygnus/iproc arm architecture Scott Branden
2014-10-22 20:57 ` [PATCH v7 6/7] ARM: mach-bcm: Consolidate currently supported IPROC SoCs Scott Branden
2014-10-22 20:57 ` [PATCH v7 7/7] ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig Scott Branden
2014-10-28 19:53 ` [PATCH v8 0/8] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-28 19:53 ` [PATCH v8 1/8] ARM: cygnus: Initial " Scott Branden
2014-10-28 19:53 ` [PATCH v8 2/8] dt-bindings: Document Broadcom Cygnus SoC and clocks Scott Branden
2014-10-28 19:53 ` [PATCH v8 3/8] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-28 19:53 ` [PATCH v8 4/8] ARM: dts: Enable " Scott Branden
2014-11-09 0:22 ` Olof Johansson
2014-11-09 6:13 ` Scott Branden
2014-11-09 6:49 ` Olof Johansson
2014-11-09 17:23 ` Greg Kroah-Hartman
2014-11-09 20:38 ` Arnd Bergmann
2014-11-10 5:17 ` Scott Branden
2014-11-10 8:11 ` Arnd Bergmann
2014-11-10 18:28 ` Scott Branden
2014-10-28 19:53 ` [PATCH v8 5/8] MAINTAINERS: Entry for Cygnus/iproc arm architecture Scott Branden
2014-10-28 19:53 ` [PATCH v8 6/8] ARM: mach-bcm: Consolidate currently supported IPROC SoCs Scott Branden
2014-10-28 19:53 ` [PATCH v8 7/8] ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig Scott Branden
2014-10-28 19:53 ` [PATCH v8 8/8] ARM: multi_v7_defconfig: Enable Broadcom Cygnus Scott Branden
2014-10-28 20:01 ` Arnd Bergmann
2014-10-28 20:06 ` Scott Branden
2014-10-28 20:13 ` Arnd Bergmann
2014-10-28 23:15 ` [PATCH v9 0/8] Add initial support for Broadcom Cygnus SoC Scott Branden
2014-10-28 23:15 ` [PATCH v9 1/8] ARM: cygnus: Initial " Scott Branden
2014-10-28 23:15 ` [PATCH v9 2/8] dt-bindings: Document Broadcom Cygnus SoC and clocks Scott Branden
2014-11-20 1:05 ` Mike Turquette
2014-10-28 23:15 ` [PATCH v9 3/8] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Scott Branden
2014-10-28 23:15 ` [PATCH v9 4/8] ARM: dts: Enable " Scott Branden
2014-11-10 10:50 ` Paul Bolle
2014-11-10 18:35 ` Olof Johansson
2014-11-10 19:23 ` Paul Bolle
2014-10-28 23:15 ` [PATCH v9 5/8] MAINTAINERS: Entry for Cygnus/iproc arm architecture Scott Branden
2014-10-28 23:15 ` [PATCH v9 6/8] ARM: mach-bcm: Consolidate currently supported IPROC SoCs Scott Branden
2014-10-28 23:15 ` [PATCH v9 7/8] ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig Scott Branden
2014-10-28 23:15 ` [PATCH v9 8/8] ARM: multi_v7_defconfig: Enable Broadcom Cygnus Scott Branden
2014-11-10 5:55 ` [PATCH 1/2] ARM: multi_v7_defconfig: remove one level of menu from Kconfig Scott Branden
2014-11-10 5:55 ` [PATCH 2/2] ARM: multi_v7_defconfig: Enable Broadcom Cygnus Scott Branden
2015-02-10 0:06 ` [PATCH 0/4] Add support for IPROC SDHCI controller Scott Branden
2015-02-10 0:06 ` [PATCH 1/4] mmc: sdhci: add quirk for ACMD23 broken Scott Branden
2015-02-10 0:06 ` [PATCH 2/4] mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53 Scott Branden
2015-02-10 0:06 ` [PATCH 3/4] mmc: sdhci-iproc: add IPROC SDHCI driver Scott Branden
2015-02-10 0:06 ` [PATCH 4/4] mmc: sdhci-iproc: add device tree bindings Scott Branden
2015-03-02 23:50 ` Florian Fainelli
2015-03-04 23:14 ` Scott Branden
2015-02-26 17:28 ` [PATCH 0/4] Add support for IPROC SDHCI controller Scott Branden
2015-02-10 0:07 ` [PATCH 0/2] Add support for Broadcom RNG200 Scott Branden
2015-02-10 0:07 ` [PATCH 1/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver Scott Branden
2015-02-10 0:27 ` Joe Perches
2015-02-14 16:36 ` Scott Branden
2015-02-14 17:02 ` Scott Branden
2015-02-10 0:07 ` [PATCH 2/2] hwrng: iproc-rng200 - Add device tree bindings Scott Branden
2015-02-10 0:07 ` [PATCH 0/2] Add support for Broadcom keypad controller Scott Branden
2015-02-10 0:07 ` [PATCH 1/2] Input: bcm-keypad: add device tree bindings Scott Branden
2015-02-10 0:51 ` Dmitry Torokhov
2015-02-14 16:49 ` Scott Branden
2015-02-16 5:17 ` Dmitry Torokhov
2015-02-23 17:49 ` Dmitry Torokhov
2015-02-26 16:13 ` Scott Branden
2015-02-10 0:07 ` [PATCH 2/2] Input: bcm-keypad: Add Broadcom keypad controller Scott Branden
2015-02-10 1:02 ` Dmitry Torokhov
2015-02-14 17:12 ` Scott Branden
2015-02-25 18:16 ` [PATCH v2 0/2] Add support for Broadcom RNG200 Scott Branden
2015-02-25 18:16 ` [PATCH v2 1/2] hwrng: iproc-rng200 - Add device tree bindings Scott Branden
2015-03-02 23:47 ` Florian Fainelli
2015-02-25 18:16 ` [PATCH v2 2/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver Scott Branden
2015-02-25 18:43 ` Dmitry Torokhov
2015-03-03 0:50 ` Scott Branden
2015-02-25 19:17 ` Arnd Bergmann
2015-02-26 19:37 ` Scott Branden
2015-02-26 20:15 ` Arnd Bergmann
2015-02-26 22:26 ` Scott Branden
2015-02-27 9:14 ` Arnd Bergmann
2015-02-28 16:01 ` Scott Branden
2015-02-28 19:31 ` Arnd Bergmann
2015-03-02 19:41 ` Scott Branden
2015-03-02 10:23 ` [PATCH v2 0/2] Add support for Broadcom RNG200 Herbert Xu
2015-02-26 16:08 ` [PATCH v2 0/2] Add support for Broadcom keypad controller Scott Branden
2015-02-26 16:08 ` [PATCH v2 1/2] Input: bcm-keypad: add device tree bindings Scott Branden
2015-02-27 23:39 ` Dmitry Torokhov
2015-02-28 15:41 ` Scott Branden
2015-02-26 16:08 ` [PATCH v2 2/2] Input: bcm-keypad: Add Broadcom keypad controller Scott Branden
2015-02-27 23:44 ` Dmitry Torokhov
2015-02-28 15:52 ` Scott Branden
2015-02-28 14:16 ` Paul Bolle
2015-02-28 15:36 ` Scott Branden
2015-02-28 16:03 ` [PATCH v3 0/2] Add support for " Scott Branden
2015-02-28 16:03 ` [PATCH v3 1/2] Input: bcm-keypad: add device tree bindings Scott Branden
2015-02-28 16:03 ` [PATCH v3 2/2] Input: bcm-keypad: Add Broadcom keypad controller Scott Branden
2015-02-28 16:35 ` [PATCH v4 0/2] Add support for " Scott Branden
2015-02-28 16:35 ` [PATCH v4 1/2] Input: bcm-keypad: add device tree bindings Scott Branden
2015-03-03 0:04 ` Dmitry Torokhov
2015-02-28 16:35 ` [PATCH v4 2/2] Input: bcm-keypad: Add Broadcom keypad controller Scott Branden
2015-02-28 22:10 ` Dmitry Torokhov
2015-02-28 22:15 ` Dmitry Torokhov
2015-03-02 19:37 ` Scott Branden
2015-03-02 20:23 ` Dmitry Torokhov
2015-03-02 21:59 ` Scott Branden
2015-03-02 19:38 ` Scott Branden
2015-03-04 20:42 ` [PATCH v3 0/2] Add support for Broadcom RNG200 Scott Branden
2015-03-04 20:42 ` [PATCH v3 1/2] hwrng: iproc-rng200 - Add device tree bindings Scott Branden
2015-03-04 20:42 ` [PATCH v3 2/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver Scott Branden
2015-03-06 11:53 ` [PATCH v3 0/2] Add support for Broadcom RNG200 Herbert Xu
2015-03-05 15:59 ` [PATCH RESEND 0/4] Add support for IPROC SDHCI controller Scott Branden
2015-03-05 15:59 ` [PATCH 1/4] mmc: sdhci: add quirk for ACMD23 broken Scott Branden
2015-03-05 15:59 ` [PATCH 2/4] mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53 Scott Branden
2015-03-05 15:59 ` [PATCH 3/4] mmc: sdhci-iproc: add IPROC SDHCI driver Scott Branden
2015-03-05 15:59 ` [PATCH 4/4] mmc: sdhci-iproc: add device tree bindings Scott Branden
2015-03-05 16:16 ` [PATCH RESEND 0/4] Add support for IPROC SDHCI controller Ulf Hansson
2015-03-05 19:57 ` Florian Fainelli
2015-03-16 18:19 ` [PATCH] ARM: amba: Increase number of IRQs Scott Branden
2015-03-16 21:08 ` Russell King - ARM Linux
2015-03-16 21:18 ` Scott Branden
2015-03-16 21:16 ` [PATCH v2 1/1] " Scott Branden
[not found] <Jonathan Richardson <jonathar@broadcom.com>
2014-09-16 19:58 ` [PATCH 0/6] Add initial support for Broadcom Cygnus SoC Jonathan Richardson
2014-09-16 19:58 ` [PATCH 1/6] ARM: cygnus: Initial " Jonathan Richardson
2014-09-17 0:00 ` Mark Rutland
2014-09-18 23:33 ` Jonathan Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4255803.4lcNtQPo2T@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox