summaryrefslogtreecommitdiffstats
path: root/fpga
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-11-20 10:43:05 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-11-20 10:43:05 -0600
commitf1ead126008e8e73fac05c193450d3aac57fc4e1 (patch)
tree9601186300cf77cf9d3eb1fcda744f490fa16635 /fpga
parentf0c477eef466d0fbf47ecd92161c38ae474aa9ae (diff)
downloadulab-f1ead126008e8e73fac05c193450d3aac57fc4e1.tar.gz
ulab-f1ead126008e8e73fac05c193450d3aac57fc4e1.zip
Minor cleanup
Diffstat (limited to 'fpga')
-rw-r--r--fpga/xilinx/programmer/svfplayer/xsvf-rpi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fpga/xilinx/programmer/svfplayer/xsvf-rpi.c b/fpga/xilinx/programmer/svfplayer/xsvf-rpi.c
index 45d8c78..034abbc 100644
--- a/fpga/xilinx/programmer/svfplayer/xsvf-rpi.c
+++ b/fpga/xilinx/programmer/svfplayer/xsvf-rpi.c
@@ -1,14 +1,14 @@
/*
* Lib(X)SVF - A library for implementing SVF and XSVF JTAG players
*
- * Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+ * Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net> (Raspberry Pi)
* Copyright (C) 2009 RIEGL Research ForschungsGmbH
* Copyright (C) 2009 Clifford Wolf <clifford@clifford.at>
- *
+ *
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@@ -72,22 +72,22 @@ static void io_setup(void)
printf("can't open /dev/mem \n");
exit (-1);
}
-
+
/* mmap GPIO */
-
+
// Allocate MAP block
if ((gpio_mem = malloc(BLOCK_SIZE + (PAGE_SIZE-1))) == NULL) {
printf("allocation error \n");
exit (-1);
}
-
+
// Make sure pointer is on 4K boundary
if ((unsigned long)gpio_mem % PAGE_SIZE) {
gpio_mem += PAGE_SIZE - ((unsigned long)gpio_mem % PAGE_SIZE);
}
-
+
// Now map it
- gpio_map = (unsigned char *)mmap(
+ gpio_map = (char *)mmap(
(caddr_t)gpio_mem,
BLOCK_SIZE,
PROT_READ|PROT_WRITE,
@@ -95,12 +95,12 @@ static void io_setup(void)
mem_fd,
GPIO_BASE
);
-
+
if ((long)gpio_map < 0) {
printf("mmap error %d\n", (int)gpio_map);
exit (-1);
}
-
+
// Always use volatile pointer!
gpio = (volatile unsigned *)gpio_map;
@@ -372,6 +372,7 @@ static void copyleft()
fprintf(stderr, "xsvftool-gpio, part of Lib(X)SVF (http://www.clifford.at/libxsvf/).\n");
fprintf(stderr, "Copyright (C) 2009 RIEGL Research ForschungsGmbH\n");
fprintf(stderr, "Copyright (C) 2009 Clifford Wolf <clifford@clifford.at>\n");
+ fprintf(stderr, "Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net> (Raspberry Pi)\n");
fprintf(stderr, "Lib(X)SVF is free software licensed under the ISC license.\n");
already_printed = 1;
}