PERFORCE change 1193938 for review
John Baldwin
jhb at FreeBSD.org
Sat May 17 22:45:36 UTC 2014
http://p4web.freebsd.org/@@1193938?ac=10
Change 1193938 by jhb at jhb_pippin on 2014/05/17 22:44:58
IFC @1193937
Affected files ...
.. //depot/projects/smpng/sys/amd64/amd64/db_disasm.c#16 integrate
.. //depot/projects/smpng/sys/arm/conf/BEAGLEBONE#10 integrate
.. //depot/projects/smpng/sys/arm/conf/PANDABOARD#8 integrate
.. //depot/projects/smpng/sys/arm/include/platformvar.h#2 integrate
.. //depot/projects/smpng/sys/arm/ti/ti_i2c.c#5 integrate
.. //depot/projects/smpng/sys/arm/ti/ti_machdep.c#8 integrate
.. //depot/projects/smpng/sys/boot/fdt/dts/arm/digi-ccwmx53.dts#2 integrate
.. //depot/projects/smpng/sys/boot/fdt/dts/arm/efikamx.dts#2 integrate
.. //depot/projects/smpng/sys/conf/NOTES#212 integrate
.. //depot/projects/smpng/sys/conf/kern.opts.mk#2 integrate
.. //depot/projects/smpng/sys/conf/kern.pre.mk#86 integrate
.. //depot/projects/smpng/sys/conf/kmod.mk#94 integrate
.. //depot/projects/smpng/sys/geom/geom_disk.c#77 integrate
Differences ...
==== //depot/projects/smpng/sys/amd64/amd64/db_disasm.c#16 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/amd64/amd64/db_disasm.c 261213 2014-01-27 18:53:18Z jhb $");
+__FBSDID("$FreeBSD: head/sys/amd64/amd64/db_disasm.c 266354 2014-05-17 21:10:03Z jhb $");
/*
* Instruction disassembler.
==== //depot/projects/smpng/sys/arm/conf/BEAGLEBONE#10 (text+ko) ====
@@ -18,7 +18,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: head/sys/arm/conf/BEAGLEBONE 263693 2014-03-24 20:06:27Z loos $
+# $FreeBSD: head/sys/arm/conf/BEAGLEBONE 266334 2014-05-17 18:35:22Z andrew $
ident BEAGLEBONE
@@ -50,6 +50,7 @@
options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options PREEMPTION
+options PLATFORM
options FREEBSD_BOOT_LOADER
options VFP # vfp/neon
==== //depot/projects/smpng/sys/arm/conf/PANDABOARD#8 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: head/sys/arm/conf/PANDABOARD 264138 2014-04-04 20:58:45Z ian $
+# $FreeBSD: head/sys/arm/conf/PANDABOARD 266334 2014-05-17 18:35:22Z andrew $
ident PANDABOARD
@@ -72,6 +72,7 @@
options FREEBSD_BOOT_LOADER
options PREEMPTION
+options PLATFORM
# MMC/SD/SDIO Card slot support
device mmc # mmc/sd bus
==== //depot/projects/smpng/sys/arm/include/platformvar.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/arm/include/platformvar.h 266301 2014-05-17 11:27:36Z andrew $
+ * $FreeBSD: head/sys/arm/include/platformvar.h 266333 2014-05-17 18:02:46Z andrew $
*/
#ifndef _MACHINE_PLATFORMVAR_H_
@@ -83,21 +83,24 @@
extern platform_method_t fdt_platform_methods[];
-#define FDT_PLATFORM_DEF(NAME, NAME_STR, size, compatible) \
-static fdt_platform_def_t NAME ## _fdt_platform = { \
- .name = NAME_STR, \
- .methods = fdt_platform_methods, \
- .fdt_compatible = compatible, \
-}; \
-static kobj_class_t NAME ## _baseclasses[] = \
- { (kobj_class_t)&NAME ## _fdt_platform, NULL }; \
-static platform_def_t NAME ## _platform = { \
- NAME_STR, \
- NAME ## _methods, \
- size, \
- NAME ## _baseclasses, \
-}; \
-DATA_SET(platform_set, NAME ## _platform)
+#define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible) \
+static fdt_platform_def_t VAR_NAME ## _fdt_platform = { \
+ .name = NAME_STR, \
+ .methods = fdt_platform_methods, \
+ .fdt_compatible = compatible, \
+}; \
+static kobj_class_t VAR_NAME ## _baseclasses[] = \
+ { (kobj_class_t)&VAR_NAME ## _fdt_platform, NULL }; \
+static platform_def_t VAR_NAME ## _platform = { \
+ NAME_STR, \
+ NAME ## _methods, \
+ size, \
+ VAR_NAME ## _baseclasses, \
+}; \
+DATA_SET(platform_set, VAR_NAME ## _platform)
+
+#define FDT_PLATFORM_DEF(NAME, NAME_STR, size, compatible) \
+ FDT_PLATFORM_DEF2(NAME, NAME, NAME_STR, size, compatible)
#endif
==== //depot/projects/smpng/sys/arm/ti/ti_i2c.c#5 (text+ko) ====
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/ti/ti_i2c.c 261410 2014-02-02 19:17:28Z ian $");
+__FBSDID("$FreeBSD: head/sys/arm/ti/ti_i2c.c 266336 2014-05-17 18:52:20Z andrew $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,6 +65,7 @@
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
+#include <arm/ti/ti_cpuid.h>
#include <arm/ti/ti_prcm.h>
#include <arm/ti/ti_i2c.h>
@@ -106,21 +107,23 @@
uint8_t hssclh; /* High Speed mode SCL high time */
};
-static struct ti_i2c_clock_config ti_i2c_clock_configs[] = {
-
#if defined(SOC_OMAP4)
+static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = {
{ IIC_SLOW, 100000, 23, 13, 15, 0, 0},
{ IIC_FAST, 400000, 9, 5, 7, 0, 0},
{ IIC_FASTEST, 3310000, 1, 113, 115, 7, 10},
-#elif defined(SOC_TI_AM335X)
+ { -1, 0 }
+};
+#endif
+
+#if defined(SOC_TI_AM335X)
+static struct ti_i2c_clock_config ti_am335x_i2c_clock_configs[] = {
{ IIC_SLOW, 100000, 3, 53, 55, 0, 0},
{ IIC_FAST, 400000, 3, 8, 10, 0, 0},
{ IIC_FASTEST, 400000, 3, 8, 10, 0, 0}, /* This might be higher */
-#else
-#error "TI I2C driver is not supported on this SoC"
-#endif
{ -1, 0 }
};
+#endif
#define TI_I2C_REV1 0x003C /* OMAP3 */
@@ -280,7 +283,20 @@
struct ti_i2c_clock_config *clkcfg;
uint16_t con_reg;
- clkcfg = ti_i2c_clock_configs;
+ switch (ti_chip()) {
+#ifdef SOC_OMAP4
+ case CHIP_OMAP_4:
+ clkcfg = ti_omap4_i2c_clock_configs;
+ break;
+#endif
+#ifdef SOC_TI_AM335X
+ case CHIP_AM335X:
+ clkcfg = ti_am335x_i2c_clock_configs;
+ break;
+#endif
+ default:
+ panic("Unknown Ti SoC, unable to reset the i2c");
+ }
while (clkcfg->speed != -1) {
if (clkcfg->speed == speed)
break;
==== //depot/projects/smpng/sys/arm/ti/ti_machdep.c#8 (text+ko) ====
@@ -38,7 +38,7 @@
#include "opt_platform.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/ti/ti_machdep.c 266301 2014-05-17 11:27:36Z andrew $");
+__FBSDID("$FreeBSD: head/sys/arm/ti/ti_machdep.c 266334 2014-05-17 18:35:22Z andrew $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -51,45 +51,40 @@
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
-#include <machine/platform.h>
+#include <machine/platformvar.h>
#include <arm/ti/omap4/omap4_reg.h>
+#include "platform_if.h"
+
void (*ti_cpu_reset)(void) = NULL;
-vm_offset_t
-platform_lastaddr(void)
+static vm_offset_t
+ti_lastaddr(platform_t plat)
{
return (arm_devmap_lastaddr());
}
-void
-platform_probe_and_attach(void)
-{
-}
-
-void
-platform_gpio_init(void)
-{
-}
-
-void
-platform_late_init(void)
-{
-}
-
/*
* Construct static devmap entries to map out the most frequently used
* peripherals using 1mb section mappings.
*/
-int
-platform_devmap_init(void)
+#if defined(SOC_OMAP4)
+static int
+ti_omap4_devmap_init(platform_t plat)
{
-#if defined(SOC_OMAP4)
arm_devmap_add_entry(0x48000000, 0x01000000); /*16mb L4_PER devices */
arm_devmap_add_entry(0x4A000000, 0x01000000); /*16mb L4_CFG devices */
-#elif defined(SOC_TI_AM335X)
+ return (0);
+}
+#endif
+
+#if defined(SOC_TI_AM335X)
+static int
+ti_am335x_devmap_init(platform_t plat)
+{
+
arm_devmap_add_entry(0x44C00000, 0x00400000); /* 4mb L4_WKUP devices*/
arm_devmap_add_entry(0x47400000, 0x00100000); /* 1mb USB */
arm_devmap_add_entry(0x47800000, 0x00100000); /* 1mb mmchs2 */
@@ -97,11 +92,9 @@
arm_devmap_add_entry(0x49000000, 0x00100000); /* 1mb edma3 */
arm_devmap_add_entry(0x49800000, 0x00300000); /* 3mb edma3 */
arm_devmap_add_entry(0x4A000000, 0x01000000); /*16mb L4_FAST devices*/
-#else
-#error "Unknown SoC"
-#endif
return (0);
}
+#endif
struct arm32_dma_range *
bus_dma_get_range(void)
@@ -127,3 +120,24 @@
printf("Reset failed!\n");
while (1);
}
+
+#if defined(SOC_OMAP4)
+static platform_method_t omap4_methods[] = {
+ PLATFORMMETHOD(platform_devmap_init, ti_omap4_devmap_init),
+ PLATFORMMETHOD(platform_lastaddr, ti_lastaddr),
+
+ PLATFORMMETHOD_END,
+};
+FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430");
+#endif
+
+#if defined(SOC_TI_AM335X)
+static platform_method_t am335x_methods[] = {
+ PLATFORMMETHOD(platform_devmap_init, ti_am335x_devmap_init),
+ PLATFORMMETHOD(platform_lastaddr, ti_lastaddr),
+
+ PLATFORMMETHOD_END,
+};
+
+FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x");
+#endif
==== //depot/projects/smpng/sys/boot/fdt/dts/arm/digi-ccwmx53.dts#2 (text+ko) ====
@@ -29,7 +29,7 @@
*
* Digi ConnectCore Wi-i.MX53
*
- * $FreeBSD: head/sys/boot/fdt/dts/arm/digi-ccwmx53.dts 264428 2014-04-13 22:35:39Z rpaulo $
+ * $FreeBSD: head/sys/boot/fdt/dts/arm/digi-ccwmx53.dts 266318 2014-05-17 14:57:34Z andrew $
*/
/dts-v1/;
@@ -37,7 +37,7 @@
/ {
model = "Digi ConnectCore Wi-i.MX53";
- compatible = "digi,imx53-ccwm53";
+ compatible = "digi,imx53-ccwm53", "fsl,imx53";
memory {
/* RAM 512M */
==== //depot/projects/smpng/sys/boot/fdt/dts/arm/efikamx.dts#2 (text+ko) ====
@@ -28,7 +28,7 @@
*
* Freescale i.MX515 Device Tree Source.
*
- * $FreeBSD: head/sys/boot/fdt/dts/arm/efikamx.dts 262614 2014-02-28 18:29:09Z imp $
+ * $FreeBSD: head/sys/boot/fdt/dts/arm/efikamx.dts 266318 2014-05-17 14:57:34Z andrew $
*/
/dts-v1/;
@@ -36,7 +36,7 @@
/ {
model = "Genesi Efika MX";
- compatible = "genesi,imx51-efikamx";
+ compatible = "genesi,imx51-efikamx", "fsl,imx51";
memory {
/* RAM 512M */
==== //depot/projects/smpng/sys/conf/NOTES#212 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/conf/NOTES 265248 2014-05-02 23:23:18Z marius $
+# $FreeBSD: head/sys/conf/NOTES 266335 2014-05-17 18:40:43Z lwhsu $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -2686,6 +2686,8 @@
# ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the
# LinkSys USB200M and various other adapters.
device axe
+# ASIX Electronics AX88178A/AX88179 USB 2.0/3.0 gigabit ethernet driver.
+device axge
#
# Devices which communicate using Ethernet over USB, particularly
==== //depot/projects/smpng/sys/conf/kern.opts.mk#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/conf/kern.opts.mk 265899 2014-05-12 01:47:45Z imp $
+# $FreeBSD: head/sys/conf/kern.opts.mk 266349 2014-05-17 20:31:34Z imp $
# Options set in the build system that affect the kernel somehow.
@@ -19,17 +19,15 @@
FORMAT_EXTENSIONS \
KERNEL_SYMBOLS
-__DEFAULT_NO_OPTIONS = \
+# expanded inline from bsd.mkopt.mk:
-# Kludge to allow a less painful transition. If MAKESYSPATH isn't defined,
-# assume we have a standard FreeBSD src tree layout and reach over and grab
-# bsd.mkopt.mk from there. If it is defined, trust it to point someplace sane
-# and include bsd.mkopt.mk from there. We need the !defined case to keep ports
-# kernel modules working (though arguably they should define MAKESYSPATH). We
-# need the latter case to keep the Jenkins testing harness working where they
-# specifically use a non-standard layout, but do define MAKESYSPATH correctly.
-.if !defined(MAKESYSPATH)
-.include "../../share/mk/bsd.mkopt.mk"
+.for var in ${__DEFAULT_YES_OPTIONS}
+.if !defined(MK_${var})
+.if defined(WITHOUT_${var}) # WITHOUT always wins
+MK_${var}:= no
.else
-.include <bsd.mkopt.mk>
+MK_${var}:= yes
+.endif
.endif
+.endfor
+.undef __DEFAULT_YES_OPTIONS
==== //depot/projects/smpng/sys/conf/kern.pre.mk#86 (text+ko) ====
@@ -1,9 +1,21 @@
-# $FreeBSD: head/sys/conf/kern.pre.mk 265833 2014-05-10 16:38:18Z imp $
+# $FreeBSD: head/sys/conf/kern.pre.mk 266349 2014-05-17 20:31:34Z imp $
# Part of a unified Makefile for building kernels. This part contains all
# of the definitions that need to be before %BEFORE_DEPEND.
-.include <src.opts.mk>
+# Allow user to configure things that only effect src tree builds.
+# Note: This is duplicated from src.sys.mk to ensure that we include
+# /etc/src.conf when building the kernel. Kernels can be built without
+# the rest of /usr/src, but they still always process SRCCONF even though
+# the normal mechanisms to prevent that (compiling out of tree) won't
+# work. To ensure they do work, we have to duplicate thee few lines here.
+SRCCONF?= /etc/src.conf
+.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
+.include "${SRCCONF}"
+_srcconf_included_:
+.endif
+
+.include <bsd.own.mk>
.include <bsd.compiler.mk>
.include "kern.opts.mk"
==== //depot/projects/smpng/sys/conf/kmod.mk#94 (text+ko) ====
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $FreeBSD: head/sys/conf/kmod.mk 265841 2014-05-10 16:39:15Z imp $
+# $FreeBSD: head/sys/conf/kmod.mk 266349 2014-05-17 20:31:34Z imp $
#
# The include file <bsd.kmod.mk> handles building and installing loadable
# kernel modules.
@@ -65,15 +65,10 @@
KMODUNLOAD?= /sbin/kldunload
OBJCOPY?= objcopy
-# Note: we're really bsd.kmod.mk, so we have to allow src.opts.mk to be
-# optional. Include it if we can so we can get /etc/src.conf changes,
-# if we're in the tree. If we can't include it that's OK. kern.opts.mk
-# has all the kernel options in it, and should be included after src.opts.mk
-# so it picks everything up.
-.sinclude <src.opts.mk>
+# Grab all the options for a kernel build.
+.include "kern.opts.mk"
.include <bsd.init.mk>
.include <bsd.compiler.mk>
-.include "kern.opts.mk"
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
==== //depot/projects/smpng/sys/geom/geom_disk.c#77 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 265072 2014-04-29 01:17:43Z bdrewery $");
+__FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 266319 2014-05-17 15:07:00Z mav $");
#include "opt_geom.h"
@@ -223,7 +223,7 @@
if (bp2->bio_error == 0)
bp2->bio_error = bp->bio_error;
bp2->bio_completed += bp->bio_completed;
- if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0)
+ if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_FLUSH)) != 0)
devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now);
bp2->bio_inbed++;
if (bp2->bio_children == bp2->bio_inbed) {
@@ -244,7 +244,7 @@
bp->bio_completed = bp->bio_length - bp->bio_resid;
bp->bio_done = (void *)bp->bio_to;
bp->bio_to = LIST_FIRST(&bp->bio_disk->d_geom->provider);
- if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0) {
+ if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_FLUSH)) != 0) {
binuptime(&now);
sc = bp->bio_to->private;
mtx_lock(&sc->done_mtx);
@@ -418,6 +418,9 @@
bp->bio_disk = dp;
bp->bio_to = (void *)bp->bio_done;
bp->bio_done = g_disk_done_single;
+ mtx_lock(&sc->start_mtx);
+ devstat_start_transaction_bio(dp->d_devstat, bp);
+ mtx_unlock(&sc->start_mtx);
dp->d_strategy(bp);
break;
default:
More information about the p4-projects
mailing list