Merge tag 'sunxi-drivers-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/drivers
Allwinner driver changes for 6.18 Some changes to the sram driver. One to register a syscon explicitly. Another to add a new driver entry for the A523, which has two Ethernet controllers, and thus has two RGMII clock delay control registers. * tag 'sunxi-drivers-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: soc: sunxi: sram: register regmap as syscon soc: sunxi: sram: add entry for a523 Link: https://lore.kernel.org/r/aMrsfw-_v3IAiKH8@wens.tw Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
@@ -310,6 +311,10 @@ static const struct sunxi_sramc_variant sun50i_h616_sramc_variant = {
|
||||
.has_ths_offset = true,
|
||||
};
|
||||
|
||||
static const struct sunxi_sramc_variant sun55i_a523_sramc_variant = {
|
||||
.num_emac_clocks = 2,
|
||||
};
|
||||
|
||||
#define SUNXI_SRAM_THS_OFFSET_REG 0x0
|
||||
#define SUNXI_SRAM_EMAC_CLOCK_REG 0x30
|
||||
#define SUNXI_SYS_LDO_CTRL_REG 0x150
|
||||
@@ -363,6 +368,7 @@ static int __init sunxi_sram_probe(struct platform_device *pdev)
|
||||
const struct sunxi_sramc_variant *variant;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct regmap *regmap;
|
||||
int ret;
|
||||
|
||||
sram_dev = &pdev->dev;
|
||||
|
||||
@@ -380,6 +386,10 @@ static int __init sunxi_sram_probe(struct platform_device *pdev)
|
||||
regmap = devm_regmap_init_mmio(dev, base, &sunxi_sram_regmap_config);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
ret = of_syscon_register_regmap(dev->of_node, regmap);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
of_platform_populate(dev->of_node, NULL, NULL, dev);
|
||||
@@ -430,6 +440,10 @@ static const struct of_device_id sunxi_sram_dt_match[] = {
|
||||
.compatible = "allwinner,sun50i-h616-system-control",
|
||||
.data = &sun50i_h616_sramc_variant,
|
||||
},
|
||||
{
|
||||
.compatible = "allwinner,sun55i-a523-system-control",
|
||||
.data = &sun55i_a523_sramc_variant,
|
||||
},
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sunxi_sram_dt_match);
|
||||
|
||||
Reference in New Issue
Block a user