Module Name: src
Committed By: nonaka
Date: Sun Aug 2 00:06:44 UTC 2009
Modified Files:
src/sys/arch/landisk/dev: obio.c
src/sys/arch/landisk/include: bus.h
src/sys/arch/landisk/landisk: shpcic_machdep.c
src/sys/arch/sh3/dev: shpcic.c shpcicvar.h
Log Message:
fix build failure.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/landisk/dev/obio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/include/bus.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/landisk/landisk/shpcic_machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sh3/dev/shpcic.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sh3/dev/shpcicvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/landisk/dev/obio.c
diff -u src/sys/arch/landisk/dev/obio.c:1.6 src/sys/arch/landisk/dev/obio.c:1.7
--- src/sys/arch/landisk/dev/obio.c:1.6 Mon Apr 28 20:23:26 2008
+++ src/sys/arch/landisk/dev/obio.c Sun Aug 2 00:06:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.6 2008/04/28 20:23:26 martin Exp $ */
+/* $NetBSD: obio.c,v 1.7 2009/08/02 00:06:44 nonaka Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.6 2008/04/28 20:23:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.7 2009/08/02 00:06:44 nonaka Exp $");
#include "btn_obio.h"
#include "pwrsw_obio.h"
@@ -243,6 +243,8 @@
bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags,
bus_addr_t *bpap, bus_space_handle_t *bshp);
void obio_iomem_free(void *v, bus_space_handle_t bsh, bus_size_t size);
+paddr_t obio_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot,
+ int flags);
static int obio_iomem_add_mapping(bus_addr_t, bus_size_t, int,
bus_space_handle_t *);
@@ -384,6 +386,13 @@
obio_iomem_unmap(v, bsh, size);
}
+paddr_t
+obio_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags)
+{
+
+ return (paddr_t)-1;
+}
+
/*
* on-board I/O bus space read/write
*/
@@ -450,6 +459,8 @@
.bs_alloc = obio_iomem_alloc,
.bs_free = obio_iomem_free,
+ .bs_mmap = obio_iomem_mmap,
+
.bs_r_1 = obio_iomem_read_1,
.bs_r_2 = obio_iomem_read_2,
.bs_r_4 = obio_iomem_read_4,
Index: src/sys/arch/landisk/include/bus.h
diff -u src/sys/arch/landisk/include/bus.h:1.4 src/sys/arch/landisk/include/bus.h:1.5
--- src/sys/arch/landisk/include/bus.h:1.4 Mon Apr 28 20:23:26 2008
+++ src/sys/arch/landisk/include/bus.h Sun Aug 2 00:06:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.4 2008/04/28 20:23:26 martin Exp $ */
+/* $NetBSD: bus.h,v 1.5 2009/08/02 00:06:44 nonaka Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -130,6 +130,9 @@
/* get kernel virtual address */
void * (*bs_vaddr)(void *, bus_space_handle_t);
+ /* mmap bus space for user */
+ paddr_t (*bs_mmap)(void *, bus_addr_t, off_t, int, int);
+
/* read (single) */
uint8_t (*bs_r_1)(void *, bus_space_handle_t,
bus_size_t);
@@ -292,6 +295,12 @@
(*(t)->bs_vaddr)((t)->bs_cookie, (h))
/*
+ * MMap bus space for a user application.
+ */
+#define bus_space_mmap(t, a, o, p, f) \
+ (*(t)->bs_mmap)((t)->bs_cookie, (a), (o), (p), (f))
+
+/*
* Bus barrier operations. The SH3 does not currently require
* barriers, but we must provide the flags to MI code.
*/
Index: src/sys/arch/landisk/landisk/shpcic_machdep.c
diff -u src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1 src/sys/arch/landisk/landisk/shpcic_machdep.c:1.2
--- src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1 Fri Sep 1 21:26:18 2006
+++ src/sys/arch/landisk/landisk/shpcic_machdep.c Sun Aug 2 00:06:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
+/* $NetBSD: shpcic_machdep.c,v 1.2 2009/08/02 00:06:44 nonaka Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.2 2009/08/02 00:06:44 nonaka Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -189,6 +189,8 @@
.bs_alloc = shpcic_iomem_alloc,
.bs_free = shpcic_iomem_free,
+ .bs_mmap = shpcic_iomem_mmap,
+
.bs_r_1 = shpcic_io_read_1,
.bs_r_2 = shpcic_io_read_2,
.bs_r_4 = shpcic_io_read_4,
@@ -237,6 +239,8 @@
.bs_alloc = shpcic_iomem_alloc,
.bs_free = shpcic_iomem_free,
+ .bs_mmap = shpcic_iomem_mmap,
+
.bs_r_1 = shpcic_mem_read_1,
.bs_r_2 = shpcic_mem_read_2,
.bs_r_4 = shpcic_mem_read_4,
Index: src/sys/arch/sh3/dev/shpcic.c
diff -u src/sys/arch/sh3/dev/shpcic.c:1.12 src/sys/arch/sh3/dev/shpcic.c:1.13
--- src/sys/arch/sh3/dev/shpcic.c:1.12 Thu Mar 27 02:05:43 2008
+++ src/sys/arch/sh3/dev/shpcic.c Sun Aug 2 00:06:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: shpcic.c,v 1.12 2008/03/27 02:05:43 uwe Exp $ */
+/* $NetBSD: shpcic.c,v 1.13 2009/08/02 00:06:44 nonaka Exp $ */
/*
* Copyright (c) 2005 NONAKA Kimihiro
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: shpcic.c,v 1.12 2008/03/27 02:05:43 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: shpcic.c,v 1.13 2009/08/02 00:06:44 nonaka Exp $");
#include "opt_pci.h"
@@ -424,6 +424,13 @@
/* Nothing to do */
}
+paddr_t
+shpcic_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags)
+{
+
+ return (paddr_t)-1;
+}
+
/*
* shpcic bus space io/mem read/write
*/
Index: src/sys/arch/sh3/dev/shpcicvar.h
diff -u src/sys/arch/sh3/dev/shpcicvar.h:1.6 src/sys/arch/sh3/dev/shpcicvar.h:1.7
--- src/sys/arch/sh3/dev/shpcicvar.h:1.6 Sun Dec 11 12:18:58 2005
+++ src/sys/arch/sh3/dev/shpcicvar.h Sun Aug 2 00:06:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: shpcicvar.h,v 1.6 2005/12/11 12:18:58 christos Exp $ */
+/* $NetBSD: shpcicvar.h,v 1.7 2009/08/02 00:06:44 nonaka Exp $ */
/*-
* Copyright (c) 2005 NONAKA Kimihiro
@@ -57,6 +57,8 @@
bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags,
bus_addr_t *bpap, bus_space_handle_t *bshp);
void shpcic_iomem_free(void *v, bus_space_handle_t bsh, bus_size_t size);
+paddr_t shpcic_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot,
+ int flags);
/* read single */
uint8_t shpcic_io_read_1(void *v, bus_space_handle_t bsh, bus_size_t offset);