add GRF bus space handle to obio_attach_args, from FUKAUMI Naoki <fun@naobsd.org>

This commit is contained in:
jmcneill 2015-01-05 21:35:53 +00:00
parent 8fa1a38636
commit afdba1bd96
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: obio.c,v 1.14 2015/01/04 16:31:58 jmcneill Exp $ */
/* $NetBSD: obio.c,v 1.15 2015/01/05 21:35:53 jmcneill Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@ -38,7 +38,7 @@
#include "opt_rockchip.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.14 2015/01/04 16:31:58 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.15 2015/01/05 21:35:53 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -158,6 +158,9 @@ obio_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
obio.obio_port = cf->cf_loc[OBIOCF_PORT];
obio.obio_dmat = &rockchip_bus_dma_tag;
bus_space_subregion(&rockchip_bs_tag, rockchip_core1_bsh,
ROCKCHIP_GRF_OFFSET, ROCKCHIP_GRF_SIZE, &obio.obio_grf_bsh);
switch (cf->cf_loc[OBIOCF_MULT]) {
case 1:
obio.obio_bst = &rockchip_bs_tag;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rockchip_var.h,v 1.10 2015/01/04 11:52:45 jmcneill Exp $ */
/* $NetBSD: rockchip_var.h,v 1.11 2015/01/05 21:35:53 jmcneill Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -40,6 +40,7 @@
struct obio_attach_args {
bus_space_tag_t obio_bst; /* bus space tag */
bus_space_handle_t obio_bsh; /* bus space handle */
bus_space_handle_t obio_grf_bsh; /* GRF bus space handle */
bus_addr_t obio_base; /* base address of handle */
bus_addr_t obio_offset; /* address of device */
bus_size_t obio_size; /* size of device */