aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/vme/bridges/vme_ca91cx42.c6
-rw-r--r--drivers/vme/bridges/vme_tsi148.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index bfb2d3f06738..18078ecbfcc6 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -1555,16 +1555,14 @@ static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge,
1555 } 1555 }
1556 1556
1557 /* Allocate mem for CR/CSR image */ 1557 /* Allocate mem for CR/CSR image */
1558 bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, 1558 bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
1559 &bridge->crcsr_bus); 1559 &bridge->crcsr_bus);
1560 if (bridge->crcsr_kernel == NULL) { 1560 if (bridge->crcsr_kernel == NULL) {
1561 dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR " 1561 dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR "
1562 "image\n"); 1562 "image\n");
1563 return -ENOMEM; 1563 return -ENOMEM;
1564 } 1564 }
1565 1565
1566 memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE);
1567
1568 crcsr_addr = slot * (512 * 1024); 1566 crcsr_addr = slot * (512 * 1024);
1569 iowrite32(bridge->crcsr_bus - crcsr_addr, bridge->base + VCSR_TO); 1567 iowrite32(bridge->crcsr_bus - crcsr_addr, bridge->base + VCSR_TO);
1570 1568
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c
index 61e706c0e00c..e07cfa8001bb 100644
--- a/drivers/vme/bridges/vme_tsi148.c
+++ b/drivers/vme/bridges/vme_tsi148.c
@@ -2275,16 +2275,14 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
2275 bridge = tsi148_bridge->driver_priv; 2275 bridge = tsi148_bridge->driver_priv;
2276 2276
2277 /* Allocate mem for CR/CSR image */ 2277 /* Allocate mem for CR/CSR image */
2278 bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, 2278 bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
2279 &bridge->crcsr_bus); 2279 &bridge->crcsr_bus);
2280 if (bridge->crcsr_kernel == NULL) { 2280 if (bridge->crcsr_kernel == NULL) {
2281 dev_err(tsi148_bridge->parent, "Failed to allocate memory for " 2281 dev_err(tsi148_bridge->parent, "Failed to allocate memory for "
2282 "CR/CSR image\n"); 2282 "CR/CSR image\n");
2283 return -ENOMEM; 2283 return -ENOMEM;
2284 } 2284 }
2285 2285
2286 memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE);
2287
2288 reg_split(bridge->crcsr_bus, &crcsr_bus_high, &crcsr_bus_low); 2286 reg_split(bridge->crcsr_bus, &crcsr_bus_high, &crcsr_bus_low);
2289 2287
2290 iowrite32be(crcsr_bus_high, bridge->base + TSI148_LCSR_CROU); 2288 iowrite32be(crcsr_bus_high, bridge->base + TSI148_LCSR_CROU);