aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vme
diff options
context:
space:
mode:
authorMartyn Welch <martyn.welch@ge.com>2013-06-11 12:03:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 19:41:50 -0400
commit2981795cc0c02d12d0e231bfe22480564b937cd5 (patch)
tree57f68379f098b7b32e890b38f6e0bdfb8c7694c6 /drivers/vme
parente31c51e4a1d11ed0b61557ca9da9cf18c8855531 (diff)
vme: tsi148: CR/CSR logic arround the wrong way
The logic in the init routine for the TSI148 is inverted. It isn't switching on the CR/CSR space when it should be and is reporting it's on when its not. Correct the logic to do the right thing. Reported-by: De Roo, Steven <steven.deroo@arcelormittal.com> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vme')
-rw-r--r--drivers/vme/bridges/vme_tsi148.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c
index 94ce64d7a5f6..c04600e26a38 100644
--- a/drivers/vme/bridges/vme_tsi148.c
+++ b/drivers/vme/bridges/vme_tsi148.c
@@ -2300,12 +2300,13 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
2300 dev_info(tsi148_bridge->parent, "CR/CSR Offset: %d\n", cbar); 2300 dev_info(tsi148_bridge->parent, "CR/CSR Offset: %d\n", cbar);
2301 2301
2302 crat = ioread32be(bridge->base + TSI148_LCSR_CRAT); 2302 crat = ioread32be(bridge->base + TSI148_LCSR_CRAT);
2303 if (crat & TSI148_LCSR_CRAT_EN) { 2303 if (crat & TSI148_LCSR_CRAT_EN)
2304 dev_info(tsi148_bridge->parent, "CR/CSR already enabled\n");
2305 else {
2304 dev_info(tsi148_bridge->parent, "Enabling CR/CSR space\n"); 2306 dev_info(tsi148_bridge->parent, "Enabling CR/CSR space\n");
2305 iowrite32be(crat | TSI148_LCSR_CRAT_EN, 2307 iowrite32be(crat | TSI148_LCSR_CRAT_EN,
2306 bridge->base + TSI148_LCSR_CRAT); 2308 bridge->base + TSI148_LCSR_CRAT);
2307 } else 2309 }
2308 dev_info(tsi148_bridge->parent, "CR/CSR already enabled\n");
2309 2310
2310 /* If we want flushed, error-checked writes, set up a window 2311 /* If we want flushed, error-checked writes, set up a window
2311 * over the CR/CSR registers. We read from here to safely flush 2312 * over the CR/CSR registers. We read from here to safely flush