diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-07-25 16:25:48 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-07-25 16:25:48 +1000 |
commit | f14c9e538cf30c6421c6637e3141334631098166 (patch) | |
tree | 98762dbdb6ad20b3fa7c3067d03d1805cd17fd11 /cf-fsi-test.c | |
parent | bae32e353a3641b5164211f6bf06c5620f6e384d (diff) | |
download | cf-fsi-f14c9e538cf30c6421c6637e3141334631098166.tar.gz cf-fsi-f14c9e538cf30c6421c6637e3141334631098166.zip |
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'cf-fsi-test.c')
-rw-r--r-- | cf-fsi-test.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cf-fsi-test.c b/cf-fsi-test.c index 414040f..10626a6 100644 --- a/cf-fsi-test.c +++ b/cf-fsi-test.c @@ -436,6 +436,7 @@ static void gpio_source_cf(void) #endif #ifdef PALMETTO +#if 0 static void gpio_source_arm(void) { uint32_t val; @@ -455,7 +456,7 @@ static void gpio_source_arm(void) val &= ~GPIO_H_SRC_BIT; writel(val, sysreg + GPIO_EFGH_CMDSRC1); } - +#endif static void gpio_source_cf(void) { uint32_t val; @@ -884,8 +885,8 @@ int test_rw(uint32_t addr, bool is_write, uint32_t *data) if (!is_write) resp = ntohl(readl(sysreg + SRAM_BASE + RSP_DATA)); - rtag = readb(sysreg + SRAM_BASE + STAT_RTAG); - rcrc = readb(sysreg + SRAM_BASE + STAT_RCRC); + rtag = readb(sysreg + SRAM_BASE + STAT_RTAG) & 0xf; + rcrc = readb(sysreg + SRAM_BASE + STAT_RCRC) & 0xf; ack = rtag & 3; /* we have a whole message now; check CRC */ @@ -1087,13 +1088,14 @@ int main(int argc, char *argv[]) #ifdef TEST_GPIO test_gpio_stuff(); #else - bench(); + //bench(); printf("Busy count: %d\n", busy_count); #endif printf("Press return...\n"); getchar(); +#ifndef PALMETTO gpio_source_arm(); - +#endif return 0; } |