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 Add function omap_chipid().
details: https://anonhg.NetBSD.org/src/rev/a7ff20a97eee
branches: trunk
changeset: 344866:a7ff20a97eee
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Mon Apr 25 13:14:37 2016 +0000
description:
Add function omap_chipid().
diffstat:
sys/arch/arm/omap/omap2_obiovar.h | 4 +++-
sys/arch/arm/omap/omap3_scm.c | 16 ++++++++++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r 5662ecf1dff8 -r a7ff20a97eee sys/arch/arm/omap/omap2_obiovar.h
--- a/sys/arch/arm/omap/omap2_obiovar.h Mon Apr 25 13:07:03 2016 +0000
+++ b/sys/arch/arm/omap/omap2_obiovar.h Mon Apr 25 13:14:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_obiovar.h,v 1.3 2015/04/14 18:37:43 bouyer Exp $ */
+/* $NetBSD: omap2_obiovar.h,v 1.4 2016/04/25 13:14:37 kiyohara Exp $ */
/*
* Copyright (c) 2007 Microsoft
@@ -53,4 +53,6 @@
device_t sc_obio_dev;
};
+uint32_t omap_chipid(void);
+
#endif /* _ARM_OMAP_OMAP2_OBIOVAR_H_ */
diff -r 5662ecf1dff8 -r a7ff20a97eee sys/arch/arm/omap/omap3_scm.c
--- a/sys/arch/arm/omap/omap3_scm.c Mon Apr 25 13:07:03 2016 +0000
+++ b/sys/arch/arm/omap/omap3_scm.c Mon Apr 25 13:14:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap3_scm.c,v 1.3 2016/04/25 13:07:03 kiyohara Exp $ */
+/* $NetBSD: omap3_scm.c,v 1.4 2016/04/25 13:14:37 kiyohara Exp $ */
/*-
* Copyright (c) 2013 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap3_scm.c,v 1.3 2016/04/25 13:07:03 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_scm.c,v 1.4 2016/04/25 13:14:37 kiyohara Exp $");
#include "opt_omap.h"
@@ -254,3 +254,15 @@
edata->state = ENVSYS_SVALID;
}
}
+
+uint32_t
+omap_chipid(void)
+{
+ struct omap3_scm_softc *sc;
+ device_t dev;
+
+ dev = device_find_by_xname("omapscm0");
+ KASSERT(dev != NULL);
+ sc = device_private(dev);
+ return sc->sc_cid;
+}
Home |
Main Index |
Thread Index |
Old Index