summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-09-29 17:40:34 +0300
committerTom Rini <trini@konsulko.com>2023-09-29 17:40:34 +0300
commit2173c4a990664d8228d4dadd814bd64fdc12948f (patch)
treef615f3e5541de2a956707f280ce3da522db53e57
parent87ebb54b9c8aa498616ae758277d9ccc5c886b16 (diff)
parent7b4ffe8c32db284e25d3a2636904def8e093da9e (diff)
downloadu-boot-2173c4a990664d8228d4dadd814bd64fdc12948f.tar.xz
Merge tag 'u-boot-at91-fixes-2023.10-b' of https://source.denx.de/u-boot/custodians/u-boot-at91
Second set of u-boot-atmel fixes for the 2023.10 cycle: Two small fixes , one for an array not initialized and the second one fixes an error case when a DT property is missing for the atmel NAND driver.
-rw-r--r--drivers/clk/at91/sam9x60.c4
-rw-r--r--drivers/clk/at91/sama7g5.c4
-rw-r--r--drivers/mtd/nand/raw/atmel/nand-controller.c11
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
index e2f72446d5..d858c860f6 100644
--- a/drivers/clk/at91/sam9x60.c
+++ b/drivers/clk/at91/sam9x60.c
@@ -429,8 +429,8 @@ static int sam9x60_clk_probe(struct udevice *dev)
if (!base)
return -EINVAL;
- memset(muxallocs, 0, ARRAY_SIZE(muxallocs));
- memset(clkmuxallocs, 0, ARRAY_SIZE(clkmuxallocs));
+ memset(muxallocs, 0, sizeof(muxallocs));
+ memset(clkmuxallocs, 0, sizeof(clkmuxallocs));
ret = clk_get_by_index(dev, 0, &clk);
if (ret)
diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c
index 3abd220803..3e62fb1f58 100644
--- a/drivers/clk/at91/sama7g5.c
+++ b/drivers/clk/at91/sama7g5.c
@@ -1115,8 +1115,8 @@ static int sama7g5_clk_probe(struct udevice *dev)
if (IS_ERR(base))
return PTR_ERR(base);
- memset(muxallocs, 0, ARRAY_SIZE(muxallocs));
- memset(clkmuxallocs, 0, ARRAY_SIZE(clkmuxallocs));
+ memset(muxallocs, 0, sizeof(muxallocs));
+ memset(clkmuxallocs, 0, sizeof(clkmuxallocs));
ret = clk_get_by_index(dev, 0, &clk);
if (ret)
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index 9873d11254..950e626f91 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -1601,10 +1601,13 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc,
nand->cs[i].rb.type = ATMEL_NAND_NATIVE_RB;
nand->cs[i].rb.id = val;
} else {
- gpio_request_by_name_nodev(np, "rb-gpios", 0,
- &nand->cs[i].rb.gpio,
- GPIOD_IS_IN);
- nand->cs[i].rb.type = ATMEL_NAND_GPIO_RB;
+ ret = gpio_request_by_name_nodev(np, "rb-gpios", 0,
+ &nand->cs[i].rb.gpio,
+ GPIOD_IS_IN);
+ if (ret && ret != -ENOENT)
+ dev_err(nc->dev, "Failed to get R/B gpio (err = %d)\n", ret);
+ if (!ret)
+ nand->cs[i].rb.type = ATMEL_NAND_GPIO_RB;
}
gpio_request_by_name_nodev(np, "cs-gpios", 0,