From 9f5ad9b6d9243546ce83a2ec4feb9f0d2c3c7f8f Mon Sep 17 00:00:00 2001 From: Andrew Bresticker Date: Thu, 5 Feb 2015 13:48:35 -0800 Subject: libpayload: mips: Use KSEG1 to access DMA-coherent memory Use bus_to_virt() to convert the physical address of the DMA coherent region to an address in KSEG1 which is suitable for device memory accesses. BUG=chrome-os-partner:36258 BRANCH=none TEST=Build and boot on Pistachio. Change-Id: If382feda66f6d829f8b3548ab263cf603cab2e9b Signed-off-by: Patrick Georgi Original-Commit-Id: a88a175f6d6db81d3154fb5dd31a44363ab94653 Original-Change-Id: I9ad6435495df2c71d8f81a782f1c3dfcfd4aeb28 Original-Signed-off-by: Andrew Bresticker Original-Reviewed-on: https://chromium-review.googlesource.com/246696 Original-Reviewed-by: Ionela Voinescu Original-Reviewed-by: Vadim Bendebury Original-Commit-Queue: Vadim Bendebury Original-Tested-by: Vadim Bendebury Reviewed-on: http://review.coreboot.org/9818 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/arch/mips/coreboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload/arch') diff --git a/payloads/libpayload/arch/mips/coreboot.c b/payloads/libpayload/arch/mips/coreboot.c index 66ad907356..9b5f8c4203 100644 --- a/payloads/libpayload/arch/mips/coreboot.c +++ b/payloads/libpayload/arch/mips/coreboot.c @@ -27,7 +27,7 @@ void *cb_header_ptr; static void cb_parse_dma(void *ptr) { struct lb_range *dma = (struct lb_range *)ptr; - init_dma_memory(phys_to_virt(dma->range_start), dma->range_size); + init_dma_memory(bus_to_virt(dma->range_start), dma->range_size); } /* Architecture specific */ -- cgit v1.2.3