mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 23:35:26 +07:00
850bea2335
After patch "of/platform: Add common method to populate default bus", it is possible for arch code to remove unnecessary callers of of_platform_populate with default match table. Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Lee Jones <lee@kernel.org> Cc: Krzysztof Halasa <khalasa@piap.pl> Cc: Kukjin Kim <kgene@kernel.org> Cc: Rob Herring <robh@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Santosh Shilimkar <ssantosh@kernel.org> Cc: Roland Stigge <stigge@antcom.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Viresh Kumar <vireshk@kernel.org> Cc: Shiraz Hashim <shiraz.linux.kernel@gmail.com> Cc: Tony Prisk <linux@prisktech.co.nz> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Rob Herring <robh@kernel.org>
70 lines
1.6 KiB
C
70 lines
1.6 KiB
C
/*
|
|
* ARTPEC-6 device support.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/amba/bus.h>
|
|
#include <linux/clocksource.h>
|
|
#include <linux/dma-mapping.h>
|
|
#include <linux/io.h>
|
|
#include <linux/irqchip.h>
|
|
#include <linux/irqchip/arm-gic.h>
|
|
#include <linux/mfd/syscon.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of_address.h>
|
|
#include <linux/clk-provider.h>
|
|
#include <linux/regmap.h>
|
|
#include <linux/smp.h>
|
|
#include <asm/smp_scu.h>
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/mach/map.h>
|
|
#include <asm/psci.h>
|
|
#include <linux/arm-smccc.h>
|
|
|
|
|
|
#define ARTPEC6_DMACFG_REGNUM 0x10
|
|
#define ARTPEC6_DMACFG_UARTS_BURST 0xff
|
|
|
|
#define SECURE_OP_L2C_WRITEREG 0xb4000001
|
|
|
|
static void __init artpec6_init_machine(void)
|
|
{
|
|
struct regmap *regmap;
|
|
|
|
regmap = syscon_regmap_lookup_by_compatible("axis,artpec6-syscon");
|
|
|
|
if (!IS_ERR(regmap)) {
|
|
/* Use PL011 DMA Burst Request signal instead of DMA
|
|
* Single Request
|
|
*/
|
|
regmap_write(regmap, ARTPEC6_DMACFG_REGNUM,
|
|
ARTPEC6_DMACFG_UARTS_BURST);
|
|
};
|
|
}
|
|
|
|
static void artpec6_l2c310_write_sec(unsigned long val, unsigned reg)
|
|
{
|
|
struct arm_smccc_res res;
|
|
|
|
arm_smccc_smc(SECURE_OP_L2C_WRITEREG, reg, val, 0,
|
|
0, 0, 0, 0, &res);
|
|
|
|
WARN_ON(res.a0);
|
|
}
|
|
|
|
static const char * const artpec6_dt_match[] = {
|
|
"axis,artpec6",
|
|
NULL
|
|
};
|
|
|
|
DT_MACHINE_START(ARTPEC6, "Axis ARTPEC-6 Platform")
|
|
.l2c_aux_val = 0x0C000000,
|
|
.l2c_aux_mask = 0xF3FFFFFF,
|
|
.l2c_write_sec = artpec6_l2c310_write_sec,
|
|
.init_machine = artpec6_init_machine,
|
|
.dt_compat = artpec6_dt_match,
|
|
MACHINE_END
|