* [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369
@ 2018-06-29 11:55 Oleksij Rempel
2018-06-29 11:55 ` [PATCH v1 2/2] net: designware: make sure DMA is disabled on kernel start Oleksij Rempel
2018-07-02 4:07 ` [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369 Sascha Hauer
0 siblings, 2 replies; 4+ messages in thread
From: Oleksij Rempel @ 2018-06-29 11:55 UTC (permalink / raw)
To: barebox; +Cc: Oleksij Rempel
This SoC is affected by this two any many other erratas.
So enable at least supported cases.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/arm/mach-socfpga/arria10-init.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-socfpga/arria10-init.c b/arch/arm/mach-socfpga/arria10-init.c
index 07256da1db..f016b84bb7 100644
--- a/arch/arm/mach-socfpga/arria10-init.c
+++ b/arch/arm/mach-socfpga/arria10-init.c
@@ -14,6 +14,7 @@
#include <mach/generic.h>
#include <asm/io.h>
#include <asm/cache-l2x0.h>
+#include <asm/errata.h>
#include <asm/system.h>
#define L310_AUX_CTRL_EARLY_BRESP BIT(30) /* R2P0+ */
@@ -70,6 +71,9 @@ static void arria10_initialize_security_policies(void)
/* BootROM leaves the L2X0 in a weird state. Always disable L2X0 for now. */
l2c310_disable(l2x0_base);
+ enable_arm_errata_794072_war();
+ enable_arm_errata_845369_war();
+
/* Put OCRAM in non-secure */
writel(0x003f0000, ARRIA10_NOC_FW_OCRAM_OCRAM_SCR_REGION0);
writel(0x1, ARRIA10_NOC_FW_OCRAM_OCRAM_SCR_EN);
--
2.17.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v1 2/2] net: designware: make sure DMA is disabled on kernel start.
2018-06-29 11:55 [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369 Oleksij Rempel
@ 2018-06-29 11:55 ` Oleksij Rempel
2018-07-02 4:07 ` [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369 Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2018-06-29 11:55 UTC (permalink / raw)
To: barebox; +Cc: Oleksij Rempel
Halt is not automatically executed if we start the kernel.
So, we may have potentially memory corruptions.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/designware.c | 8 ++++++++
drivers/net/designware.h | 1 +
drivers/net/designware_generic.c | 1 +
drivers/net/designware_socfpga.c | 1 +
4 files changed, 11 insertions(+)
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 862ee2f046..49ddaa20d8 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -471,6 +471,7 @@ struct dw_eth_dev *dwc_drv_probe(struct device_d *dev)
miibus = &priv->miibus;
edev->priv = priv;
+ dev->priv = edev;
edev->parent = dev;
edev->open = dwc_ether_open;
edev->send = dwc_ether_send;
@@ -489,3 +490,10 @@ struct dw_eth_dev *dwc_drv_probe(struct device_d *dev)
return priv;
}
+
+void dwc_drv_remove(struct device_d *dev)
+{
+ struct eth_device *edev = dev->priv;
+
+ dwc_ether_halt(edev);
+}
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index 4a99fa2aa6..6236d6c2e5 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -51,6 +51,7 @@ struct dw_eth_drvdata {
};
struct dw_eth_dev *dwc_drv_probe(struct device_d *dev);
+void dwc_drv_remove(struct device_d *dev);
#define CONFIG_TX_DESCR_NUM 16
#define CONFIG_RX_DESCR_NUM 16
diff --git a/drivers/net/designware_generic.c b/drivers/net/designware_generic.c
index 29269deac9..9d125b47a6 100644
--- a/drivers/net/designware_generic.c
+++ b/drivers/net/designware_generic.c
@@ -55,6 +55,7 @@ static __maybe_unused struct of_device_id dwc_ether_compatible[] = {
static struct driver_d dwc_ether_driver = {
.name = "designware_eth",
.probe = dwc_ether_probe,
+ .remove = dwc_drv_remove,
.of_compatible = DRV_OF_COMPAT(dwc_ether_compatible),
};
device_platform_driver(dwc_ether_driver);
diff --git a/drivers/net/designware_socfpga.c b/drivers/net/designware_socfpga.c
index 154c38f9a1..cb88882d66 100644
--- a/drivers/net/designware_socfpga.c
+++ b/drivers/net/designware_socfpga.c
@@ -179,6 +179,7 @@ static __maybe_unused struct of_device_id socfpga_dwc_ether_compatible[] = {
static struct driver_d socfpga_dwc_ether_driver = {
.name = "socfpga_designware_eth",
.probe = socfpga_dwc_ether_probe,
+ .remove = dwc_drv_remove,
.of_compatible = DRV_OF_COMPAT(socfpga_dwc_ether_compatible),
};
device_platform_driver(socfpga_dwc_ether_driver);
--
2.17.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369
2018-06-29 11:55 [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369 Oleksij Rempel
2018-06-29 11:55 ` [PATCH v1 2/2] net: designware: make sure DMA is disabled on kernel start Oleksij Rempel
@ 2018-07-02 4:07 ` Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2018-07-02 4:07 UTC (permalink / raw)
To: Oleksij Rempel; +Cc: barebox
On Fri, Jun 29, 2018 at 01:55:01PM +0200, Oleksij Rempel wrote:
> This SoC is affected by this two any many other erratas.
> So enable at least supported cases.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Rephrased the commit message and applied, thanks
Sascha
> ---
> arch/arm/mach-socfpga/arria10-init.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/mach-socfpga/arria10-init.c b/arch/arm/mach-socfpga/arria10-init.c
> index 07256da1db..f016b84bb7 100644
> --- a/arch/arm/mach-socfpga/arria10-init.c
> +++ b/arch/arm/mach-socfpga/arria10-init.c
> @@ -14,6 +14,7 @@
> #include <mach/generic.h>
> #include <asm/io.h>
> #include <asm/cache-l2x0.h>
> +#include <asm/errata.h>
> #include <asm/system.h>
>
> #define L310_AUX_CTRL_EARLY_BRESP BIT(30) /* R2P0+ */
> @@ -70,6 +71,9 @@ static void arria10_initialize_security_policies(void)
> /* BootROM leaves the L2X0 in a weird state. Always disable L2X0 for now. */
> l2c310_disable(l2x0_base);
>
> + enable_arm_errata_794072_war();
> + enable_arm_errata_845369_war();
> +
> /* Put OCRAM in non-secure */
> writel(0x003f0000, ARRIA10_NOC_FW_OCRAM_OCRAM_SCR_REGION0);
> writel(0x1, ARRIA10_NOC_FW_OCRAM_OCRAM_SCR_EN);
> --
> 2.17.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369
@ 2018-06-29 11:17 Oleksij Rempel
0 siblings, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2018-06-29 11:17 UTC (permalink / raw)
To: barebox; +Cc: Oleksij Rempel
This SoC is affected by this two any many other erratas.
So enable at least supported cases.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/arm/mach-socfpga/arria10-init.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-socfpga/arria10-init.c b/arch/arm/mach-socfpga/arria10-init.c
index 07256da1db..f016b84bb7 100644
--- a/arch/arm/mach-socfpga/arria10-init.c
+++ b/arch/arm/mach-socfpga/arria10-init.c
@@ -14,6 +14,7 @@
#include <mach/generic.h>
#include <asm/io.h>
#include <asm/cache-l2x0.h>
+#include <asm/errata.h>
#include <asm/system.h>
#define L310_AUX_CTRL_EARLY_BRESP BIT(30) /* R2P0+ */
@@ -70,6 +71,9 @@ static void arria10_initialize_security_policies(void)
/* BootROM leaves the L2X0 in a weird state. Always disable L2X0 for now. */
l2c310_disable(l2x0_base);
+ enable_arm_errata_794072_war();
+ enable_arm_errata_845369_war();
+
/* Put OCRAM in non-secure */
writel(0x003f0000, ARRIA10_NOC_FW_OCRAM_OCRAM_SCR_REGION0);
writel(0x1, ARRIA10_NOC_FW_OCRAM_OCRAM_SCR_EN);
--
2.17.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-02 4:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-29 11:55 [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369 Oleksij Rempel
2018-06-29 11:55 ` [PATCH v1 2/2] net: designware: make sure DMA is disabled on kernel start Oleksij Rempel
2018-07-02 4:07 ` [PATCH v1 1/2] arm: arria10: enable errata 794072 and 845369 Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2018-06-29 11:17 Oleksij Rempel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox