summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-01-09 11:30:08 -0500
committerTom Rini <[email protected]>2023-01-09 11:30:08 -0500
commitcebdfc22da6eb81793b616e855bc4d6d89c1c7a6 (patch)
tree44eaafcbe4866712d361304882e7d56ca0ef1682 /drivers/memory
parent62e2ad1ceafbfdf2c44d3dc1b6efc81e768a96b9 (diff)
parentfe33066d246462551f385f204690a11018336ac8 (diff)
Merge branch 'next'
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/Kconfig7
-rw-r--r--drivers/memory/Makefile1
-rw-r--r--drivers/memory/atmel_ebi.c37
3 files changed, 45 insertions, 0 deletions
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 56b89f17be5..22cb9d637c5 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -13,6 +13,13 @@ config MEMORY
SRAM, Ethernet adapters, FPGAs, etc.
For now this uclass has no methods yet.
+config ATMEL_EBI
+ bool "Support for Atmel EBI"
+ help
+ Driver for Atmel EBI controller. This is a dummy
+ driver. Doesn't provide an access to EBI controller. Select
+ this option to enable the NAND flash controller driver
+
config SANDBOX_MEMORY
bool "Enable Sandbox Memory Controller driver"
depends on SANDBOX && MEMORY
diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile
index 2b196d78c0b..1cabf8ac9cd 100644
--- a/drivers/memory/Makefile
+++ b/drivers/memory/Makefile
@@ -2,5 +2,6 @@
obj-$(CONFIG_MEMORY) += memory-uclass.o
obj-$(CONFIG_SANDBOX_MEMORY) += memory-sandbox.o
obj-$(CONFIG_STM32_FMC2_EBI) += stm32-fmc2-ebi.o
+obj-$(CONFIG_ATMEL_EBI) += atmel_ebi.o
obj-$(CONFIG_TI_AEMIF) += ti-aemif.o
obj-$(CONFIG_TI_GPMC) += ti-gpmc.o
diff --git a/drivers/memory/atmel_ebi.c b/drivers/memory/atmel_ebi.c
new file mode 100644
index 00000000000..4739eef1b75
--- /dev/null
+++ b/drivers/memory/atmel_ebi.c
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
+ */
+
+#include <dm/device.h>
+#include <dm/read.h>
+#include <dm/uclass.h>
+#include <fdtdec.h>
+
+static int atmel_ebi_probe(struct udevice *dev)
+{
+ int ret;
+ struct udevice *ndev;
+
+ ret = uclass_get_device_by_driver(UCLASS_MTD,
+ DM_DRIVER_GET(atmel_nand_controller),
+ &ndev);
+ if (ret)
+ printf("Failed to probe nand driver (err = %d)\n", ret);
+
+ return ret;
+}
+
+static const struct udevice_id atmel_ebi_match[] = {
+ {.compatible = "microchip,sam9x60-ebi"},
+ {.compatible = "atmel,sama5d3-ebi"},
+ { /* Sentinel */ }
+};
+
+U_BOOT_DRIVER(atmel_ebi) = {
+ .name = "atmel_ebi",
+ .id = UCLASS_NOP,
+ .of_match = atmel_ebi_match,
+ .probe = atmel_ebi_probe,
+ .bind = dm_scan_fdt_dev,
+};