Memory controller drivers for v6.7
1. Atmel: Use __counted_by annotation. 2. Tegra: Add Tegra234 clients for RCE and VI. 3. Cleanup: - Use device_get_match_data() to simplify the code, - Make "additionalProperties: true" explicit in Devicetree bindings. -----BEGIN PGP SIGNATURE----- iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmUs6LEQHGtyemtAa2Vy bmVsLm9yZwAKCRDBN2bmhouD14Q6D/4zrc/524csRStCAgtJGA9XwX6iyD6+EKFv 51gIxZb378futNyDVfSHb4xcvVgqR91718buFG8+pFBKq4oshSlm/+KK+YyJwmGX 4OBB4slpCJFc8LU2XrBHgdNga5iygJtEukvycDRf6eOZ2vj8Dd+1QQYhcyfaT77j 4dt43qNFObxuQAuRXiyRy9Z4rH15TrboMlysJyva5gQ5ZaTSnzGG/ZjfITx0Lvc7 xZRhFBPhsy+zIKv9AhxUH3ijU9HCcYXub9AWBM97Zvvy7IAESQT5YkK16PS2GdOs rr8LxXDWtEsBMYB6a9pmVHSvO1292e9tQvNY1/Y6i7Wi3wYRqyVivXd9XB0oeBcF UzIOz4cUGx6nWCRgINlIUOoHTQRDmPlp3Y916p7N+QDsEUOx6R3p6SsahOvZvoeQ pmwnb24DdIXUytQEFEG6w/YtRdFfOcS8cfeVXrs8sneFXR1UvFyeAYPzC784JLAM tzRqsUWmBtrxzSOXH+uDSQ8Iz5dBQt7ZHWj2njCyhywOK6viurhj1h3+R4mR8G87 XoOhgMvN0SnwrpdC9PbKKaZN8IQUTi306x6unbs58mvtvbMOoDsPMznMxd48r9fD E6gwMU8fNG/l+x+j92Yb14S5HSIFDQDeuGHLn0I8kaC+VMXSZNYN02iBx0K6IStY gOI6S6hrCw== =+zNo -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUtpH4ACgkQYKtH/8kJ Uie1uhAAghdFpIBgmjXIKbGsTTlhtTU4nlxajp/h2Ubvq2GXk4+l3Sbdi82uqFpp 0PihYPsLKBEADeZI2LuK2KlniQ8/mjjpAEJW+jwvY9FCTDRB9HCR2qGjFKU3rnRm EkqLtc4uYfdWFvkVsVpcgNNCt0CjRKaa7no1mWJcLY6NR7bM3Duw4U3mOV9Spocs Z1pGUH040E0mVZ1PjTFNtxceEtv59AXAwtki7b0wPol1PQxy18ZrTqOmKUW9+sK+ O+zIgA0jQH88wYQmREDGxugpE4rWY4hrr7QOxMTXOQ9RxnEFVByq3pBeayS4K1+r +yvN5DewbONBo2a6r0zDRXIQuYFKNbwXpJThT3g86tSkrY0FOl913+D4WtqHyVnB 9yWS6yLSDxqc8BE7bH4w2VMyq9pbAznfobpubh3i9kkV+JTbX4c5zHN7JRr+yLuR aGdA8yX4LFz8GMecBkQcVnRyDqYXjeZCZaScKh7nRtf+iDeMunaz5Pcwt7DiC3sH Jhxk49vHVkheoogZgN75SXEfkp6xAVO0y8jJDow+sEJ7fII0E60NHNXJUxnHIgxY JGo8lqhcF7FatWLdvib6qppV0HCD7Po8AmGHvBYtlEvp1XLZ/Nk/+l5HJpQYnG3r GNUTHgE2WpfqBv9QajvInCR8b/Oa7+BjVhOSvbZzrX2BjJAGmT4= =uqQ0 -----END PGP SIGNATURE----- Merge tag 'memory-controller-drv-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.7 1. Atmel: Use __counted_by annotation. 2. Tegra: Add Tegra234 clients for RCE and VI. 3. Cleanup: - Use device_get_match_data() to simplify the code, - Make "additionalProperties: true" explicit in Devicetree bindings. * tag 'memory-controller-drv-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: Use device_get_match_data() memory: tegra: Add Tegra234 clients for RCE and VI dt-bindings: memory-controllers: Make "additionalProperties: true" explicit memory: atmel-ebi: Annotate struct atmel_ebi_dev with __counted_by Link: https://lore.kernel.org/r/20231016074013.28286-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
e855cbf28b
@ -40,6 +40,7 @@ patternProperties:
|
||||
".*@[0-9]+$":
|
||||
type: object
|
||||
$ref: mc-peripheral-props.yaml#
|
||||
additionalProperties: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
@ -80,6 +80,8 @@ properties:
|
||||
patternProperties:
|
||||
"flash@[0-9a-f]+$":
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
|
@ -130,7 +130,7 @@ patternProperties:
|
||||
bus. The device can be a NAND chip, SRAM device, NOR device
|
||||
or an ASIC.
|
||||
$ref: ti,gpmc-child.yaml
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
@ -12,7 +12,10 @@
|
||||
#include <linux/mfd/syscon/atmel-matrix.h>
|
||||
#include <linux/mfd/syscon/atmel-smc.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <soc/at91/atmel-sfr.h>
|
||||
|
||||
@ -30,7 +33,7 @@ struct atmel_ebi_dev {
|
||||
struct atmel_ebi *ebi;
|
||||
u32 mode;
|
||||
int numcs;
|
||||
struct atmel_ebi_dev_config configs[];
|
||||
struct atmel_ebi_dev_config configs[] __counted_by(numcs);
|
||||
};
|
||||
|
||||
struct atmel_ebi_caps {
|
||||
@ -515,16 +518,11 @@ static int atmel_ebi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *child, *np = dev->of_node, *smc_np;
|
||||
const struct of_device_id *match;
|
||||
struct atmel_ebi *ebi;
|
||||
int ret, reg_cells;
|
||||
struct clk *clk;
|
||||
u32 val;
|
||||
|
||||
match = of_match_device(atmel_ebi_id_table, dev);
|
||||
if (!match || !match->data)
|
||||
return -EINVAL;
|
||||
|
||||
ebi = devm_kzalloc(dev, sizeof(*ebi), GFP_KERNEL);
|
||||
if (!ebi)
|
||||
return -ENOMEM;
|
||||
@ -532,7 +530,9 @@ static int atmel_ebi_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, ebi);
|
||||
|
||||
INIT_LIST_HEAD(&ebi->devs);
|
||||
ebi->caps = match->data;
|
||||
ebi->caps = device_get_match_data(dev);
|
||||
if (!ebi->caps)
|
||||
return -EINVAL;
|
||||
ebi->dev = dev;
|
||||
|
||||
clk = devm_clk_get(dev, NULL);
|
||||
|
@ -8,8 +8,9 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
|
||||
#define REG_MEMC_CNTRLR_CONFIG 0x00
|
||||
#define CNTRLR_CONFIG_LPDDR4_SHIFT 5
|
||||
@ -121,12 +122,9 @@ static struct attribute_group dev_attr_group = {
|
||||
.attrs = dev_attrs,
|
||||
};
|
||||
|
||||
static const struct of_device_id brcmstb_memc_of_match[];
|
||||
|
||||
static int brcmstb_memc_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct brcmstb_memc_data *memc_data;
|
||||
const struct of_device_id *of_id;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct brcmstb_memc *memc;
|
||||
int ret;
|
||||
@ -137,8 +135,7 @@ static int brcmstb_memc_probe(struct platform_device *pdev)
|
||||
|
||||
dev_set_drvdata(dev, memc);
|
||||
|
||||
of_id = of_match_device(brcmstb_memc_of_match, dev);
|
||||
memc_data = of_id->data;
|
||||
memc_data = device_get_match_data(dev);
|
||||
memc->srpd_offset = memc_data->srpd_offset;
|
||||
|
||||
memc->ddr_ctrl = devm_platform_ioremap_resource(pdev, 0);
|
||||
|
@ -10,10 +10,8 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
|
||||
enum ccf_version {
|
||||
CCF1,
|
||||
@ -172,14 +170,9 @@ out:
|
||||
static int ccf_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct ccf_private *ccf;
|
||||
const struct of_device_id *match;
|
||||
u32 errinten;
|
||||
int ret, irq;
|
||||
|
||||
match = of_match_device(ccf_matches, &pdev->dev);
|
||||
if (WARN_ON(!match))
|
||||
return -ENODEV;
|
||||
|
||||
ccf = devm_kzalloc(&pdev->dev, sizeof(*ccf), GFP_KERNEL);
|
||||
if (!ccf)
|
||||
return -ENOMEM;
|
||||
@ -189,7 +182,7 @@ static int ccf_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(ccf->regs);
|
||||
|
||||
ccf->dev = &pdev->dev;
|
||||
ccf->info = match->data;
|
||||
ccf->info = device_get_match_data(&pdev->dev);
|
||||
ccf->err_regs = ccf->regs + ccf->info->err_reg_offs;
|
||||
|
||||
if (ccf->info->has_brr) {
|
||||
|
@ -449,6 +449,18 @@ static const struct tegra_mc_client tegra234_mc_clients[] = {
|
||||
.security = 0x38c,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_VIW,
|
||||
.name = "viw",
|
||||
.bpmp_id = TEGRA_ICC_BPMP_VI,
|
||||
.type = TEGRA_ICC_ISO_VI,
|
||||
.sid = TEGRA234_SID_ISO_VI,
|
||||
.regs = {
|
||||
.sid = {
|
||||
.override = 0x390,
|
||||
.security = 0x394,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_NVDECSRD,
|
||||
.name = "nvdecsrd",
|
||||
@ -621,6 +633,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = {
|
||||
.security = 0x50c,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_VIFALR,
|
||||
.name = "vifalr",
|
||||
.bpmp_id = TEGRA_ICC_BPMP_VIFAL,
|
||||
.type = TEGRA_ICC_ISO_VIFAL,
|
||||
.sid = TEGRA234_SID_ISO_VIFALC,
|
||||
.regs = {
|
||||
.sid = {
|
||||
.override = 0x5e0,
|
||||
.security = 0x5e4,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_VIFALW,
|
||||
.name = "vifalw",
|
||||
.bpmp_id = TEGRA_ICC_BPMP_VIFAL,
|
||||
.type = TEGRA_ICC_ISO_VIFAL,
|
||||
.sid = TEGRA234_SID_ISO_VIFALC,
|
||||
.regs = {
|
||||
.sid = {
|
||||
.override = 0x5e8,
|
||||
.security = 0x5ec,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_DLA0RDA,
|
||||
.name = "dla0rda",
|
||||
@ -701,6 +737,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = {
|
||||
.security = 0x62c,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_RCER,
|
||||
.name = "rcer",
|
||||
.bpmp_id = TEGRA_ICC_BPMP_RCE,
|
||||
.type = TEGRA_ICC_NISO,
|
||||
.sid = TEGRA234_SID_RCE,
|
||||
.regs = {
|
||||
.sid = {
|
||||
.override = 0x690,
|
||||
.security = 0x694,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_RCEW,
|
||||
.name = "rcew",
|
||||
.bpmp_id = TEGRA_ICC_BPMP_RCE,
|
||||
.type = TEGRA_ICC_NISO,
|
||||
.sid = TEGRA234_SID_RCE,
|
||||
.regs = {
|
||||
.sid = {
|
||||
.override = 0x698,
|
||||
.security = 0x69c,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
.id = TEGRA234_MEMORY_CLIENT_PCIE0R,
|
||||
.name = "pcie0r",
|
||||
|
Loading…
x
Reference in New Issue
Block a user