Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/omap Support locator "cs".
details: https://anonhg.NetBSD.org/src/rev/ae3c37d9caf3
branches: trunk
changeset: 348106:ae3c37d9caf3
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Tue Oct 04 15:23:40 2016 +0000
description:
Support locator "cs".
diffstat:
sys/arch/arm/omap/files.omap2 | 4 ++--
sys/arch/arm/omap/omap2_gpmc.c | 23 +++++++++++++++++++----
2 files changed, 21 insertions(+), 6 deletions(-)
diffs (64 lines):
diff -r b93e5239badf -r ae3c37d9caf3 sys/arch/arm/omap/files.omap2
--- a/sys/arch/arm/omap/files.omap2 Tue Oct 04 15:18:23 2016 +0000
+++ b/sys/arch/arm/omap/files.omap2 Tue Oct 04 15:23:40 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.omap2,v 1.33 2016/07/04 15:35:55 kiyohara Exp $
+# $NetBSD: files.omap2,v 1.34 2016/10/04 15:23:40 kiyohara Exp $
#
# Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
# Based on xscale/files.pxa2x0
@@ -117,7 +117,7 @@
# General Purpose Memory Controller
# XXX some addl. chip select config parms may be desired here (e.g. timing)
# XXX so far we just use the setup established by boot firmware
-device gpmc { [addr=-1], [size=0], [intr=-1], [mult=1], [nobyteacc=0]
+device gpmc { [cs=-1], [addr=-1], [size=0], [intr=-1], [mult=1], [nobyteacc=0]
} : bus_space_generic
attach gpmc at mainbus
file arch/arm/omap/omap2_gpmc.c gpmc
diff -r b93e5239badf -r ae3c37d9caf3 sys/arch/arm/omap/omap2_gpmc.c
--- a/sys/arch/arm/omap/omap2_gpmc.c Tue Oct 04 15:18:23 2016 +0000
+++ b/sys/arch/arm/omap/omap2_gpmc.c Tue Oct 04 15:23:40 2016 +0000
@@ -1,7 +1,7 @@
-/* $Id: omap2_gpmc.c,v 1.9 2011/07/01 20:30:21 dyoung Exp $ */
+/* $Id: omap2_gpmc.c,v 1.10 2016/10/04 15:23:40 kiyohara Exp $ */
/* adapted from: */
-/* $NetBSD: omap2_gpmc.c,v 1.9 2011/07/01 20:30:21 dyoung Exp $ */
+/* $NetBSD: omap2_gpmc.c,v 1.10 2016/10/04 15:23:40 kiyohara Exp $ */
/*
@@ -102,7 +102,7 @@
#include "opt_omap.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap2_gpmc.c,v 1.9 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_gpmc.c,v 1.10 2016/10/04 15:23:40 kiyohara Exp $");
#include "locators.h"
@@ -278,7 +278,22 @@
aa.gpmc_intr = cf->cf_loc[GPMCCF_INTR];
cs = &sc->sc_csconfig[0];
- for (i=0; i < GPMC_NCS; i++) {
+ for (i = 0; i < GPMC_NCS; i++) {
+ if (cf->cf_loc[GPMCCF_CS] != GPMCCF_CS_DEFAULT) {
+ if (i != cf->cf_loc[GPMCCF_CS]) {
+ cs++;
+ continue;
+ }
+
+ if (aa.gpmc_addr != GPMCCF_ADDR_DEFAULT
+ && aa.gpmc_addr != cs->cs_addr)
+ panic("cs:addr missmatch:"
+ " cs %d(0x%08lx), addr 0x%08lx\n",
+ cf->cf_loc[GPMCCF_CS], cs->cs_addr,
+ aa.gpmc_addr);
+ aa.gpmc_addr = cs->cs_addr;
+ }
+
if ((aa.gpmc_addr >= cs->cs_addr)
&& (aa.gpmc_addr < (cs->cs_addr + cs->cs_size))) {
/* XXX
Home |
Main Index |
Thread Index |
Old Index