Re: [PATCH v2 2/4] net: designware: Mark drivers as having active DMA
[email protected] Mon, 7 Apr 2025 09:31:12 +0200
| Newsgroups | io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot |
|---|---|
| Organization | Linaro |
| Message-ID | <[email protected]> |
On 07/04/2025 03:35, Simon Glass wrote: > Network devices which use this driver have DMA running while receiving > packages. Add the required flag to driver model so that they will be > removed before starting the OS. > > Signed-off-by: Simon Glass <[email protected]> > --- > > Changes in v2: > - Add a new patch to mark drivers as having active DMA > > drivers/net/designware.c | 2 +- > drivers/net/dwmac_meson8b.c | 2 +- > drivers/net/dwmac_s700.c | 2 +- > drivers/net/dwmac_socfpga.c | 2 +- > drivers/net/gmac_rockchip.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/designware.c b/drivers/net/designware.c > index 5385849ea6b..9b2b0a5d602 100644 > --- a/drivers/net/designware.c > +++ b/drivers/net/designware.c > @@ -885,7 +885,7 @@ U_BOOT_DRIVER(eth_designware) = { > .ops = &designware_eth_ops, > .priv_auto = sizeof(struct dw_eth_dev), > .plat_auto = sizeof(struct dw_eth_pdata), > - .flags = DM_FLAG_ALLOC_PRIV_DMA, > + .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_ACTIVE_DMA, > }; > > static struct pci_device_id supported[] = { > diff --git a/drivers/net/dwmac_meson8b.c b/drivers/net/dwmac_meson8b.c > index bf94e50842d..95a99a98e99 100644 > --- a/drivers/net/dwmac_meson8b.c > +++ b/drivers/net/dwmac_meson8b.c > @@ -162,5 +162,5 @@ U_BOOT_DRIVER(dwmac_meson8b) = { > .ops = &designware_eth_ops, > .priv_auto = sizeof(struct dw_eth_dev), > .plat_auto = sizeof(struct dwmac_meson8b_plat), > - .flags = DM_FLAG_ALLOC_PRIV_DMA, > + .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_ACTIVE_DMA, > }; > diff --git a/drivers/net/dwmac_s700.c b/drivers/net/dwmac_s700.c > index e78193f3376..21df8e3ce81 100644 > --- a/drivers/net/dwmac_s700.c > +++ b/drivers/net/dwmac_s700.c > @@ -64,5 +64,5 @@ U_BOOT_DRIVER(dwmac_s700) = { > .ops = &designware_eth_ops, > .priv_auto = sizeof(struct dw_eth_dev), > .plat_auto = sizeof(struct eth_pdata), > - .flags = DM_FLAG_ALLOC_PRIV_DMA, > + .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_ACTIVE_DMA, > }; > diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c > index dda33f90d65..9f262aaee60 100644 > --- a/drivers/net/dwmac_socfpga.c > +++ b/drivers/net/dwmac_socfpga.c > @@ -145,5 +145,5 @@ U_BOOT_DRIVER(dwmac_socfpga) = { > .ops = &designware_eth_ops, > .priv_auto = sizeof(struct dw_eth_dev), > .plat_auto = sizeof(struct dwmac_socfpga_plat), > - .flags = DM_FLAG_ALLOC_PRIV_DMA, > + .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_ACTIVE_DMA, > }; > diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c > index 5c542d62bd8..52be3a5687f 100644 > --- a/drivers/net/gmac_rockchip.c > +++ b/drivers/net/gmac_rockchip.c > @@ -760,5 +760,5 @@ U_BOOT_DRIVER(eth_gmac_rockchip) = { > .ops = &gmac_rockchip_eth_ops, > .priv_auto = sizeof(struct dw_eth_dev), > .plat_auto = sizeof(struct gmac_rockchip_plat), > - .flags = DM_FLAG_ALLOC_PRIV_DMA, > + .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_ACTIVE_DMA, > }; Reviewed-by: Neil Armstrong <[email protected]>