summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/clk_versal.c6
-rw-r--r--drivers/mtd/nand/raw/arasan_nfc.c11
-rw-r--r--drivers/net/phy/dp83867.c4
-rw-r--r--drivers/net/zynq_gem.c24
4 files changed, 36 insertions, 9 deletions
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 9d4d2149e3..d3673a5c8b 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -571,6 +571,12 @@ static void versal_get_clock_info(void)
continue;
clock[i].valid = attr & CLK_VALID_MASK;
+
+ /* skip query for Invalid clock */
+ ret = versal_is_valid_clock(i);
+ if (ret != CLK_VALID_MASK)
+ continue;
+
clock[i].type = ((attr >> CLK_TYPE_SHIFT) & 0x1) ?
CLK_TYPE_EXTERNAL : CLK_TYPE_OUTPUT;
nodetype = (attr >> NODE_TYPE_SHIFT) & NODE_CLASS_MASK;
diff --git a/drivers/mtd/nand/raw/arasan_nfc.c b/drivers/mtd/nand/raw/arasan_nfc.c
index d1b1a4263a..110c32b396 100644
--- a/drivers/mtd/nand/raw/arasan_nfc.c
+++ b/drivers/mtd/nand/raw/arasan_nfc.c
@@ -1120,12 +1120,15 @@ static void arasan_nand_cmd_function(struct mtd_info *mtd, unsigned int command,
static void arasan_check_ondie(struct mtd_info *mtd)
{
struct nand_chip *nand_chip = mtd_to_nand(mtd);
- struct nand_config *nand = nand_get_controller_data(nand_chip);
+ struct nand_drv *info = nand_get_controller_data(nand_chip);
+ struct nand_config *nand = &info->config;
u8 maf_id, dev_id;
u8 get_feature[4];
u8 set_feature[4] = {ENABLE_ONDIE_ECC, 0x00, 0x00, 0x00};
u32 i;
+ nand_chip->select_chip(mtd, 0);
+
/* Send the command for reading device ID */
nand_chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
nand_chip->cmdfunc(mtd, NAND_CMD_READID, 0, -1);
@@ -1150,10 +1153,12 @@ static void arasan_check_ondie(struct mtd_info *mtd)
for (i = 0; i < 4; i++)
get_feature[i] = nand_chip->read_byte(mtd);
- if (get_feature[0] & ENABLE_ONDIE_ECC)
+ if (get_feature[0] & ENABLE_ONDIE_ECC) {
nand->on_die_ecc_enabled = true;
- else
+ printf("On-DIE ECC Enabled\n");
+ } else {
printf("%s: Unable to enable OnDie ECC\n", __func__);
+ }
/* Use the BBT pattern descriptors */
nand_chip->bbt_td = &bbt_main_descr;
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 08935d9c15..0098997c0c 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -65,6 +65,7 @@
#define DP83867_PHYCR_FIFO_DEPTH_SHIFT 14
#define DP83867_PHYCR_FIFO_DEPTH_MASK GENMASK(15, 14)
#define DP83867_PHYCR_RESERVED_MASK BIT(11)
+#define DP83867_PHYCR_FORCE_LINK_GOOD BIT(10)
#define DP83867_MDI_CROSSOVER 5
#define DP83867_MDI_CROSSOVER_MDIX 2
#define DP83867_PHYCTRL_SGMIIEN 0x0800
@@ -284,6 +285,9 @@ static int dp83867_config(struct phy_device *phydev)
val &= ~DP83867_PHYCR_FIFO_DEPTH_MASK;
val |= (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT);
+ /* Do not force link good */
+ val &= ~DP83867_PHYCR_FORCE_LINK_GOOD;
+
/* The code below checks if "port mirroring" N/A MODE4 has been
* enabled during power on bootstrap.
*
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 288037e2a0..5f2f87d352 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -655,14 +655,16 @@ static int zynq_gem_probe(struct udevice *dev)
return -ENOMEM;
memset(priv->rxbuffers, 0, RX_BUF * PKTSIZE_ALIGN);
- u32 addr = (ulong)priv->rxbuffers;
+ ulong addr = (ulong)priv->rxbuffers;
flush_dcache_range(addr, addr + roundup(RX_BUF * PKTSIZE_ALIGN, ARCH_DMA_MINALIGN));
barrier();
/* Align bd_space to MMU_SECTION_SHIFT */
bd_space = memalign(1 << MMU_SECTION_SHIFT, BD_SPACE);
- if (!bd_space)
- return -ENOMEM;
+ if (!bd_space) {
+ ret = -ENOMEM;
+ goto err1;
+ }
mmu_set_region_dcache_behaviour((phys_addr_t)bd_space,
BD_SPACE, DCACHE_OFF);
@@ -674,7 +676,7 @@ static int zynq_gem_probe(struct udevice *dev)
ret = clk_get_by_name(dev, "tx_clk", &priv->clk);
if (ret < 0) {
dev_err(dev, "failed to get clock\n");
- return -EINVAL;
+ goto err1;
}
priv->bus = mdio_alloc();
@@ -684,9 +686,19 @@ static int zynq_gem_probe(struct udevice *dev)
ret = mdio_register_seq(priv->bus, dev->seq);
if (ret)
- return ret;
+ goto err2;
- return zynq_phy_init(dev);
+ ret = zynq_phy_init(dev);
+ if (ret)
+ goto err2;
+
+ return ret;
+
+err2:
+ free(priv->rxbuffers);
+err1:
+ free(priv->tx_bd);
+ return ret;
}
static int zynq_gem_remove(struct udevice *dev)