@@ -84,6 +84,7 @@ struct prueth {
struct regmap *miig_rt;
fdt_addr_t mdio_base;
phys_addr_t pruss_shrdram2;
+ phys_addr_t tmaddr;
struct mii_dev *bus;
u32 port_id;
u32 sram_pa;
@@ -277,6 +278,9 @@ static void prueth_stop(struct udevice *dev)
dma_disable(&priv->dma_rx);
dma_free(&priv->dma_rx);
+
+ /* Workaround for shutdown command */
+ writel(0x0, priv->tmaddr + priv->slice * 0x200);
}
static const struct eth_ops prueth_ops = {
@@ -391,6 +395,10 @@ static int prueth_probe(struct udevice *dev)
if (ret)
return ret;
+ ret = pruss_request_tm_region(*prussdev, &prueth->tmaddr);
+ if (ret)
+ return ret;
+
node = dev_ofnode(dev);
eth0_node = ofnode_find_subnode(node, "ethernet-mii0");
eth1_node = ofnode_find_subnode(node, "ethernet-mii1");
@@ -21,6 +21,8 @@
#define PRUSS_CFG_IEPCLK 0x30
#define ICSSG_CFG_CORE_SYNC 0x3c
+#define ICSSG_TASK_MGR_OFFSET 0x2a000
+
/* PRUSS_IEPCLK register bits */
#define PRUSS_IEPCLK_IEP_OCP_CLK_EN BIT(0)
@@ -37,6 +39,19 @@ enum pruss_mem {
PRUSS_MEM_MAX,
};
+int pruss_request_tm_region(struct udevice *dev, phys_addr_t *loc)
+{
+ struct pruss *priv;
+
+ priv = dev_get_priv(dev);
+ if (!priv || !priv->pruss_dram0)
+ return -EINVAL;
+
+ *loc = priv->pruss_dram0 + ICSSG_TASK_MGR_OFFSET;
+
+ return 0;
+}
+
int pruss_request_shrmem_region(struct udevice *dev, phys_addr_t *loc)
{
struct pruss *priv;
@@ -10,3 +10,4 @@ struct pruss {
};
int pruss_request_shrmem_region(struct udevice *dev, phys_addr_t *loc);
+int pruss_request_tm_region(struct udevice *dev, phys_addr_t *loc);
Currently shutdown command is yet to be implemented. So work around clearing the task manager of ICSSG. Signed-off-by: Keerthy <j-keerthy@ti.com> --- drivers/net/ti/icssg-prueth.c | 8 ++++++++ drivers/soc/ti/pruss.c | 15 +++++++++++++++ include/ti-pruss.h | 1 + 3 files changed, 24 insertions(+)