Commit 993fd7d6 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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

Merge tag 'memory-controller-drv-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.12

1. Mediatek SMI: fix PM usage counter and make the driver modular.
2. Renesas RPC-IF: add support for RZ/G2 series.
3. Minor fixes.

* tag 'memory-controller-drv-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: mtk-smi: Allow building as module
  memory: ti-aemif: Drop child node when jumping out loop
  memory: mtk-smi: Use platform_register_drivers
  memory: renesas-rpc-if: Add RZ/G2 to Kconfig description
  dt-bindings: memory: renesas,rpc-if: Add support for RZ/G2 Series
  memory: emif: Use DEFINE_SPINLOCK() for spinlock
  memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops

Link: https://lore.kernel.org/r/20210131180109.11510-1-krzk@kernel.org


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 4fe05d21 50fc8d92
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -26,10 +26,14 @@ properties:
  compatible:
    items:
      - enum:
          - renesas,r8a774a1-rpc-if       # RZ/G2M
          - renesas,r8a774b1-rpc-if       # RZ/G2N
          - renesas,r8a774c0-rpc-if       # RZ/G2E
          - renesas,r8a774e1-rpc-if       # RZ/G2H
          - renesas,r8a77970-rpc-if       # R-Car V3M
          - renesas,r8a77980-rpc-if       # R-Car V3H
          - renesas,r8a77995-rpc-if       # R-Car D3
      - const: renesas,rcar-gen3-rpc-if   # a generic R-Car gen3 device
      - const: renesas,rcar-gen3-rpc-if   # a generic R-Car gen3 or RZ/G2 device

  reg:
    items:
+4 −4
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ config JZ4780_NEMC
	  memory devices such as NAND and SRAM.

config MTK_SMI
	bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST
	tristate "MediaTek SoC Memory Controller driver" if COMPILE_TEST
	depends on ARCH_MEDIATEK || COMPILE_TEST
	help
	  This driver is for the Memory Controller module in MediaTek SoCs,
@@ -202,9 +202,9 @@ config RENESAS_RPCIF
	depends on ARCH_RENESAS || COMPILE_TEST
	select REGMAP_MMIO
	help
	  This supports Renesas R-Car Gen3 RPC-IF which provides either SPI
	  host or HyperFlash. You'll have to select individual components
	  under the corresponding menu.
	  This supports Renesas R-Car Gen3 or RZ/G2 RPC-IF which provides
	  either SPI host or HyperFlash. You'll have to select individual
	  components under the corresponding menu.

config STM32_FMC2_EBI
	tristate "Support for FMC2 External Bus Interface on STM32MP SoCs"
+1 −2
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ struct emif_data {
};

static struct emif_data *emif1;
static spinlock_t	emif_lock;
static DEFINE_SPINLOCK(emif_lock);
static unsigned long	irq_state;
static u32		t_ck; /* DDR clock period in ps */
static LIST_HEAD(device_list);
@@ -1531,7 +1531,6 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
	/* One-time actions taken on probing the first device */
	if (!emif1) {
		emif1 = emif;
		spin_lock_init(&emif_lock);

		/*
		 * TODO: register notifiers for frequency and voltage
+16 −20
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ static void mtk_smi_clk_disable(const struct mtk_smi *smi)

int mtk_smi_larb_get(struct device *larbdev)
{
	int ret = pm_runtime_get_sync(larbdev);
	int ret = pm_runtime_resume_and_get(larbdev);

	return (ret < 0) ? ret : 0;
}
@@ -374,7 +374,7 @@ static int __maybe_unused mtk_smi_larb_resume(struct device *dev)
	int ret;

	/* Power on smi-common. */
	ret = pm_runtime_get_sync(larb->smi_common_dev);
	ret = pm_runtime_resume_and_get(larb->smi_common_dev);
	if (ret < 0) {
		dev_err(dev, "Failed to pm get for smi-common(%d).\n", ret);
		return ret;
@@ -587,26 +587,22 @@ static struct platform_driver mtk_smi_common_driver = {
	}
};

static struct platform_driver * const smidrivers[] = {
	&mtk_smi_common_driver,
	&mtk_smi_larb_driver,
};

static int __init mtk_smi_init(void)
{
	int ret;

	ret = platform_driver_register(&mtk_smi_common_driver);
	if (ret != 0) {
		pr_err("Failed to register SMI driver\n");
		return ret;
	}

	ret = platform_driver_register(&mtk_smi_larb_driver);
	if (ret != 0) {
		pr_err("Failed to register SMI-LARB driver\n");
		goto err_unreg_smi;
	return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers));
}
	return ret;
module_init(mtk_smi_init);

err_unreg_smi:
	platform_driver_unregister(&mtk_smi_common_driver);
	return ret;
static void __exit mtk_smi_exit(void)
{
	platform_unregister_drivers(smidrivers, ARRAY_SIZE(smidrivers));
}
module_exit(mtk_smi_exit);

module_init(mtk_smi_init);
MODULE_DESCRIPTION("MediaTek SMI driver");
MODULE_LICENSE("GPL v2");
+6 −2
Original line number Diff line number Diff line
@@ -378,9 +378,11 @@ static int aemif_probe(struct platform_device *pdev)
		 */
		for_each_available_child_of_node(np, child_np) {
			ret = of_aemif_parse_abus_config(pdev, child_np);
			if (ret < 0)
			if (ret < 0) {
				of_node_put(child_np);
				goto error;
			}
		}
	} else if (pdata && pdata->num_abus_data > 0) {
		for (i = 0; i < pdata->num_abus_data; i++, aemif->num_cs++) {
			aemif->cs_data[i].cs = pdata->abus_data[i].cs;
@@ -405,9 +407,11 @@ static int aemif_probe(struct platform_device *pdev)
		for_each_available_child_of_node(np, child_np) {
			ret = of_platform_populate(child_np, NULL,
						   dev_lookup, dev);
			if (ret < 0)
			if (ret < 0) {
				of_node_put(child_np);
				goto error;
			}
		}
	} else if (pdata) {
		for (i = 0; i < pdata->num_sub_devices; i++) {
			pdata->sub_devices[i].dev.parent = dev;
Loading