Unverified Commit e855cbf2 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'memory-controller-drv-6.7' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 1780d27c 09de3691
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ patternProperties:
  ".*@[0-9]+$":
    type: object
    $ref: mc-peripheral-props.yaml#
    additionalProperties: true

required:
  - compatible
+2 −0
Original line number Diff line number Diff line
@@ -80,6 +80,8 @@ properties:
patternProperties:
  "flash@[0-9a-f]+$":
    type: object
    additionalProperties: true

    properties:
      compatible:
        contains:
+1 −1
Original line number Diff line number Diff line
@@ -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
+8 −8
Original line number Diff line number Diff line
@@ -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);
+3 −6
Original line number Diff line number Diff line
@@ -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);
Loading