Map the same mmio size as Linux does.
Unlikely to have practical consequences -- just reduces differences in behaviour from upstream, to rule them out.
This commit is contained in:
parent
3169daaff3
commit
619b8ca5eb
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: nouveau_engine_device_base.c,v 1.8 2015/11/05 20:32:39 riastradh Exp $ */
|
/* $NetBSD: nouveau_engine_device_base.c,v 1.9 2016/02/14 03:41:18 riastradh Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2012 Red Hat Inc.
|
* Copyright 2012 Red Hat Inc.
|
||||||
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.8 2015/11/05 20:32:39 riastradh Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.9 2016/02/14 03:41:18 riastradh Exp $");
|
||||||
|
|
||||||
#include <core/object.h>
|
#include <core/object.h>
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
@ -180,7 +180,7 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
|
|||||||
if (mmio_size < 0x102000)
|
if (mmio_size < 0x102000)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
/* XXX errno NetBSD->Linux */
|
/* XXX errno NetBSD->Linux */
|
||||||
ret = -bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh);
|
ret = -bus_space_map(mmiot, mmio_base, 0x102000, 0, &mmioh);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
|
|||||||
|
|
||||||
boot0 = bus_space_read_4(mmiot, mmioh, 0x000000);
|
boot0 = bus_space_read_4(mmiot, mmioh, 0x000000);
|
||||||
strap = bus_space_read_4(mmiot, mmioh, 0x101000);
|
strap = bus_space_read_4(mmiot, mmioh, 0x101000);
|
||||||
bus_space_unmap(mmiot, mmioh, mmio_size);
|
bus_space_unmap(mmiot, mmioh, 0x102000);
|
||||||
#else
|
#else
|
||||||
map = ioremap(mmio_base, 0x102000);
|
map = ioremap(mmio_base, 0x102000);
|
||||||
if (map == NULL)
|
if (map == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user