Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S946935AbcJaVCQ (ORCPT ); Mon, 31 Oct 2016 17:02:16 -0400 Received: from gw.crowfest.net ([52.42.241.221]:39748 "EHLO gw.crowfest.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S946870AbcJaVCP (ORCPT ); Mon, 31 Oct 2016 17:02:15 -0400 From: Michael Zoran To: gregkh@linuxfoundation.org Cc: eric@anholt.net, swarren@wwwdotorg.org, lee@kernel.org, mzoran@crowfest.net, daniels@collabora.com, noralf@tronnes.org, popcornmix@gmail.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] staging: vc04_services: setup DMA and coherent mask Date: Mon, 31 Oct 2016 14:02:03 -0700 Message-Id: <20161031210203.2089-1-mzoran@crowfest.net> X-Mailer: git-send-email 2.10.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 31 VCHI messages between the CPU and firmware use 32-bit bus addresses. Explicitly set the DMA mask and coherent on all platforms. Signed-off-by: Michael Zoran --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index a5afcc5..ba77fd8 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -97,6 +97,15 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state) int slot_mem_size, frag_mem_size; int err, irq, i; + /* + * VCHI messages between the CPU and firmware use + * 32-bit bus addresses. + */ + err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); + + if (err < 0) + return err; + (void)of_property_read_u32(dev->of_node, "cache-line-size", &g_cache_line_size); g_fragments_size = 2 * g_cache_line_size; -- 2.10.1