From 3e884359dcaae19d618e4a11033bfe2a1d80ffc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Mon, 30 Dec 2013 23:59:07 +0000 Subject: [PATCH] added missing memory barrier to asm statements - BaS crashed with compiler optimizations --- pci/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pci/pci.c b/pci/pci.c index 65b4f1e..a41a4df 100644 --- a/pci/pci.c +++ b/pci/pci.c @@ -43,7 +43,7 @@ #if MACHINE_FIREBEE #define pci_config_wait() wait(40000); /* FireBee USB not properly detected otherwise !?? */ #elif MACHINE_M5484LITE -#define pci_config_wait() do { __asm__ __volatile("tpf" :::); } while (0) +#define pci_config_wait() do { __asm__ __volatile("tpf" ::: "memory"); } while (0) #endif /* @@ -130,7 +130,7 @@ __attribute__((aligned(16))) void chip_errata_135(void) " tpf.l #0x0\n\t" " tpf.l #0x0\n\t" " tpf.l #0x0\n\t" - :::); + ::: "memory"); }