diff options
author | Tien Fong Chee <tien.fong.chee@intel.com> | 2018-04-09 16:26:29 +0800 |
---|---|---|
committer | Tien Fong Chee <tien.fong.chee@intel.com> | 2018-04-09 16:26:29 +0800 |
commit | 2c01b4de2dd1b28bbe976332bccf5f5314740a56 (patch) | |
tree | 9a65fb8f326ae140466f3cf91c4a099dd24bfe6f | |
parent | c563acf4bd8aac6ac50e0a85c22f65362c40d820 (diff) | |
download | u-boot-socfpga-2c01b4de2dd1b28bbe976332bccf5f5314740a56.tar.gz |
FogBugz #548483-4: Remove global data variable
Using the global data variable when global data memory structure is not
fully supported by SPL at that moment may lead to unexpected behavior.
For example: Synchronous abourt due to memory access randomly such as
accessing DDR before scrubbing DDR.
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
-rw-r--r-- | drivers/dma/dma330.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/dma/dma330.c b/drivers/dma/dma330.c index bd48e31799..22860628b3 100644 --- a/drivers/dma/dma330.c +++ b/drivers/dma/dma330.c @@ -197,14 +197,11 @@ WATCHDOG_RESET(); \ } while (!(dma330_getstate((t)) & (s))); -static unsigned cmd_line; - /* debug message printout */ #ifdef DEBUG #define DMA330_DBGCMD_DUMP(off, x...) do { \ - printf("%x:", cmd_line); \ - printf((x)); \ - cmd_line += (off); \ + printf("%x bytes:", off); \ + printf(x); \ WATCHDOG_RESET(); \ } while (0) #else @@ -889,7 +886,6 @@ int dma330_transfer_setup(struct dma330_transfer_struct *dma330) /* Channel Control Register */ u32 ccr = 0; struct dma330_reqcfg reqcfg; - cmd_line = 0; if (!buf) { debug("ERROR DMA330 : DMA Microcode buffer pointer is NULL\n"); @@ -1227,7 +1223,6 @@ int dma330_transfer_zeroes(struct dma330_transfer_struct *dma330) /* Channel Control Register */ u32 ccr = 0; struct dma330_reqcfg reqcfg; - cmd_line = 0; if (!buf) { debug("ERROR DMA330 : DMA Microcode buffer pointer is NULL\n"); |