summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2018-03-25 19:57:15 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2018-03-25 19:57:15 -0500
commit3ed97159e3afdcaf0275a3647d3826cc27ddcce5 (patch)
tree86a963055925f5e80958a2ac8c2bcce29f330a06
parent42ca6f88500bec23f513cf182f6cd0594044cef1 (diff)
downloaddevmem-aspeed-3ed97159e3afdcaf0275a3647d3826cc27ddcce5.zip
devmem-aspeed-3ed97159e3afdcaf0275a3647d3826cc27ddcce5.tar.gz
Remove debugging statements
-rw-r--r--devmem-aspeed.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/devmem-aspeed.c b/devmem-aspeed.c
index 293a798..21ad4a2 100644
--- a/devmem-aspeed.c
+++ b/devmem-aspeed.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2000 Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
* Copyright (C) 2009 Carl-Daniel Hailfinger
- * Copyright (C) 2016 Raptor Engineering, LLC
+ * Copyright (C) 2016-2018 Raptor Engineering, LLC
*
*
* This software has been developed for the LART computing board
@@ -40,6 +40,7 @@
*/
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@@ -139,21 +140,14 @@ int main(int argc, char **argv) {
if (!aspeed_dev) FATAL;
bar_addr = (void *)(aspeed_dev->base_addr[1] & PCI_BASE_ADDRESS_MEM_MASK);
- printf("Detected ASPEED MMIO base address: 0x%p.\n", bar_addr);
- fflush(stdout);
bar_addr += ASPEED_P2A_OFFSET;
- printf("ASPEED P2A base address: 0x%p.\n", bar_addr);
if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL;
- printf("/dev/mem opened.\n");
- fflush(stdout);
/* Map one page */
aspeed_bar = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, (uintptr_t)bar_addr);
if(aspeed_bar == (void *) -1) FATAL;
- printf("Memory mapped at address %p.\n", aspeed_bar);
- fflush(stdout);
ast2400_set_a2b_bridge_dest_address(target);
@@ -173,7 +167,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "Illegal data type '%c'.\n", access_type);
exit(2);
}
- printf("Value at address 0x%X (%p): 0x%08X\n", target, virt_addr, read_result);
+ printf("0x%08X\n", read_result);
fflush(stdout);
if(argc > 3) {
@@ -195,8 +189,6 @@ int main(int argc, char **argv) {
read_result = *((volatile uint32_t *) virt_addr);
break;
}
- printf("Written 0x%X; readback 0x%X\n", writeval, read_result);
- fflush(stdout);
}
ast2400_disable_a2b_bridge();
OpenPOWER on IntegriCloud