[coreboot-gerrit] Patch set updated for coreboot: 1a20112 ryu: support for DMA region

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Mar 24 16:23:27 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8926

-gerrit

commit 1a20112244c4ff6eb9142eb8d2eda200e26ab0e7
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Tue Aug 12 17:55:02 2014 -0500

    ryu: support for DMA region
    
    Currently ryu needs a DMA region in order to communicate with
    USB devices. Therefore, add that region to the memory map.
    
    BUG=chrome-os-partner:31293
    BRANCH=None
    TEST=With usb added am able to talk to a USB mass storage device
         albeit inconsistently.
    
    Change-Id: I7efaf2ba44cc94dc64af3f1cd916bdc5c7ff0795
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: e93389479518ee28dc3477da0c6e6e33fa8a47d1
    Original-Change-Id: I6b5c052ccaafce30705349e07639dffbb994901f
    Original-Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/212162
    Original-Reviewed-by: Furquan Shaikh <furquan at chromium.org>
    Original-Commit-Queue: Furquan Shaikh <furquan at chromium.org>
---
 src/mainboard/google/rush_ryu/Kconfig     |  8 ++++++++
 src/mainboard/google/rush_ryu/mainboard.c | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/src/mainboard/google/rush_ryu/Kconfig b/src/mainboard/google/rush_ryu/Kconfig
index 700bef7..39824241 100644
--- a/src/mainboard/google/rush_ryu/Kconfig
+++ b/src/mainboard/google/rush_ryu/Kconfig
@@ -92,4 +92,12 @@ config EC_GOOGLE_CHROMEEC_I2C_BUS
 	hex
 	default 1
 
+config DRAM_DMA_START
+	hex
+	default 0xc0000000
+
+config DRAM_DMA_SIZE
+	hex
+	default 0x00200000
+
 endif # BOARD_GOOGLE_RUSH_RYU
diff --git a/src/mainboard/google/rush_ryu/mainboard.c b/src/mainboard/google/rush_ryu/mainboard.c
index 93ffca9..1e80b5b 100644
--- a/src/mainboard/google/rush_ryu/mainboard.c
+++ b/src/mainboard/google/rush_ryu/mainboard.c
@@ -17,8 +17,10 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <arch/mmu.h>
 #include <device/device.h>
 #include <boot/coreboot_tables.h>
+#include <memrange.h>
 
 #include <soc/addressmap.h>
 #include <soc/clock.h>
@@ -63,3 +65,21 @@ struct chip_operations mainboard_ops = {
 	.name   = "rush_ryu",
 	.enable_dev = mainboard_enable,
 };
+
+void mainboard_add_memory_ranges(struct memranges *map)
+{
+	/* Create non-cacheable region for DMA operations. */
+	memranges_insert(map, CONFIG_DRAM_DMA_START, CONFIG_DRAM_DMA_SIZE,
+			MA_MEM  | MA_MEM_NC | MA_NS | MA_RW);
+}
+
+void lb_board(struct lb_header *header)
+{
+	struct lb_range *dma;
+
+	dma = (struct lb_range *)lb_new_record(header);
+	dma->tag = LB_TAB_DMA;
+	dma->size = sizeof(*dma);
+	dma->range_start = CONFIG_DRAM_DMA_START;
+	dma->range_size = CONFIG_DRAM_DMA_SIZE;
+}



More information about the coreboot-gerrit mailing list