summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-03-21 12:39:24 -0500
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-21 16:57:39 -0500
commit8e5dd42060cd8e293d2b8d45c62a1c5f143ba988 (patch)
tree5d732f37c29e5b9124923358babf8d5bc9e34bfa
parent1b69d4bc2a363ffb2d727e44c64435a5e33e2199 (diff)
downloadtalos-openbmc-8e5dd42060cd8e293d2b8d45c62a1c5f143ba988.tar.gz
talos-openbmc-8e5dd42060cd8e293d2b8d45c62a1c5f143ba988.zip
u-boot: Apply patch to stop aspeednic dma
Apply Norm's mac-stop patch that calls the halt method after calling the init method in the aspeednic initialize function. While alternative patches exist that touch less hardware, this simple patch will prevent the memory alteration when the network is not used during u-boot. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r--meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/aspeednic-mac-stop.patch36
-rw-r--r--meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/u-boot_2013.07%.bbappend1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/aspeednic-mac-stop.patch b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/aspeednic-mac-stop.patch
new file mode 100644
index 000000000..bb53c4059
--- /dev/null
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/aspeednic-mac-stop.patch
@@ -0,0 +1,36 @@
+commit a7517cfcebd9ea45d65b3fbc6438602dd28cae86
+Author: Norman James <njames@us.ibm.com>
+Commit: Norman James <njames@us.ibm.com>
+
+ MAC needs to be stopped after starting
+
+ We found that u-boot network was corrupting kernel memory.
+ This is because aspeednic_init is called at startup,
+ but if the u-boot network is not used, the network driver
+ is not cleaned up. This fix is a temporary hack and just calls
+ the halt function after the init. This driver needs to be
+ reworked to not start network initially and use set_hwaddr hook
+ to setup MAC address.
+
+ Signed-off-by: Norman James <nkskjames@gmail.com>
+
+diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
+index d70c7ab..a870c4a 100644
+--- a/drivers/net/aspeednic.c
++++ b/drivers/net/aspeednic.c
+@@ -580,6 +580,7 @@ int aspeednic_initialize(bd_t *bis)
+ #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
+ miiphy_register(dev->name, faraday_mdio_read, faraday_mdio_write);
+ #endif
++ dev->halt(dev);
+
+ return 1;
+ }
+@@ -1359,6 +1360,7 @@ static int aspeednic_recv(struct eth_device* dev)
+
+ static void aspeednic_halt(struct eth_device* dev)
+ {
++ printf("Stopping Network\n");
+ STOP_MAC(dev);
+ }
+
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/u-boot_2013.07%.bbappend b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/u-boot_2013.07%.bbappend
index 50adb9fdd..774419f24 100644
--- a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/u-boot_2013.07%.bbappend
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/u-boot_2013.07%.bbappend
@@ -2,6 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://fw_env.config"
SRC_URI += "file://config.patch"
+SRC_URI += "file://aspeednic-mac-stop.patch"
# Do not install u-boot in rootfs
#do_install[postfuncs] += "remove_uboot_from_rootfs"
OpenPOWER on IntegriCloud