svn commit: r261411 - in head/sys: arm/conf boot/fdt/dts

2014-02-02 Thread Ruslan Bukin
Author: br
Date: Sun Feb  2 19:35:10 2014
New Revision: 261411
URL: http://svnweb.freebsd.org/changeset/base/261411

Log:
  Add support for Colibri VF50 Evaluation Board.
  
  Colibri VF50 is a SODIMM200 Vybrid Family core module
  and development board produced by Toradex AG.
  
  Sponsored by: Machdep, Inc.

Added:
  head/sys/arm/conf/COLIBRI-VF50   (contents, props changed)
  head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts   (contents, props changed)

Added: head/sys/arm/conf/COLIBRI-VF50
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/COLIBRI-VF50  Sun Feb  2 19:35:10 2014
(r261411)
@@ -0,0 +1,26 @@
+# Kernel configuration for Toradex Colibri VF50 Evaluation Board.
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+includeVYBRID.common
+ident  COLIBRI-VF50
+
+#FDT
+optionsFDT
+optionsFDT_DTB_STATIC
+makeoptionsFDT_DTS_FILE=vybrid-colibri-vf50.dts

Added: head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts   Sun Feb  2 19:35:10 
2014(r261411)
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2014 Ruslan Bukin b...@bsdpad.com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+
+/include/ vybrid.dtsi
+
+/ {
+   model = Toradex Colibri VF50;
+
+   memory {
+   device_type = memory;
+   reg =  0x8000 0x0800 ;/* 128MB RAM */
+   };
+
+   SOC: vybrid {
+   serial0: serial@40027000 {
+   status = okay;
+   };
+
+   fec1: ethernet@400D1000 {
+   status = okay;
+   iomux_config =  54 0x1 55 0x1
+56 0x1 57 0x1
+58 0x1 59 0x1
+60 0x1 61 0x1
+62 0x1  0 0x1 ;
+   };
+
+   sai3: sai@40032000 {
+   status = okay;
+   };
+
+   adc0: adc@4003B000 {
+   status = okay;
+   };
+
+   edma1: edma@40098000 {
+   status = okay;
+   };
+   };
+
+   chosen {
+   bootargs = -v;
+   stdin = serial0;
+   stdout = serial0;
+   };
+};
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261414 - head/sys/arm/ti

2014-02-02 Thread Olivier Houchard
Author: cognet
Date: Sun Feb  2 20:45:41 2014
New Revision: 261414
URL: http://svnweb.freebsd.org/changeset/base/261414

Log:
  Don't call device_set_ivars() for the mmchs, it doesn't seem to be used,
  and it overrides the ivars set by the simplebus.

Modified:
  head/sys/arm/ti/ti_mmchs.c

Modified: head/sys/arm/ti/ti_mmchs.c
==
--- head/sys/arm/ti/ti_mmchs.c  Sun Feb  2 20:25:27 2014(r261413)
+++ head/sys/arm/ti/ti_mmchs.c  Sun Feb  2 20:45:41 2014(r261414)
@@ -1755,7 +1755,6 @@ ti_mmchs_attach(device_t dev)
 
device_add_child(dev, mmc, 0);
 
-   device_set_ivars(dev, sc-host);
err = bus_generic_attach(dev);
 
 out:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261416 - head/sys/arm/freescale/vybrid

2014-02-02 Thread Ruslan Bukin
Author: br
Date: Sun Feb  2 21:10:40 2014
New Revision: 261416
URL: http://svnweb.freebsd.org/changeset/base/261416

Log:
  o Add prototype for tcon_bypass() used by dcu4
  o Add register definition

Modified:
  head/sys/arm/freescale/vybrid/vf_common.h
  head/sys/arm/freescale/vybrid/vf_tcon.c

Modified: head/sys/arm/freescale/vybrid/vf_common.h
==
--- head/sys/arm/freescale/vybrid/vf_common.h   Sun Feb  2 20:58:23 2014
(r261415)
+++ head/sys/arm/freescale/vybrid/vf_common.h   Sun Feb  2 21:10:40 2014
(r261416)
@@ -38,3 +38,5 @@
bus_space_read_1(_sc-bst, _sc-bsh, _reg)
 #defineWRITE1(_sc, _reg, _val) \
bus_space_write_1(_sc-bst, _sc-bsh, _reg, _val)
+
+uint32_t tcon_bypass(void);

Modified: head/sys/arm/freescale/vybrid/vf_tcon.c
==
--- head/sys/arm/freescale/vybrid/vf_tcon.c Sun Feb  2 20:58:23 2014
(r261415)
+++ head/sys/arm/freescale/vybrid/vf_tcon.c Sun Feb  2 21:10:40 2014
(r261416)
@@ -56,6 +56,7 @@ __FBSDID($FreeBSD$);
 #include arm/freescale/vybrid/vf_common.h
 
 #defineTCON0_CTRL1 0x00
+#defineTCON_BYPASS (1  29)
 
 struct tcon_softc {
struct resource *res[1];
@@ -80,7 +81,7 @@ tcon_bypass(void)
 
sc = tcon_sc;
 
-   WRITE4(tcon_sc, TCON0_CTRL1, (1  29));
+   WRITE4(tcon_sc, TCON0_CTRL1, TCON_BYPASS);
 
return (0);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261358 - head/sys/powerpc/conf

2014-02-02 Thread Alexey Dokuchaev
On Sat, Feb 01, 2014 at 08:56:50PM +, Nathan Whitehorn wrote:
 New Revision: 261358
 URL: http://svnweb.freebsd.org/changeset/base/261358
 
 Log:
   Switch default Book-E scheduler to ULE, which works now, and enable
   CAPABILITIES stuff required to make ssh work.

Hmm; I've been using ssh(d) on a kernel w/out CAPABILITIES support just
fine.  Am I missing something?

./danfe
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261358 - head/sys/powerpc/conf

2014-02-02 Thread Nathan Whitehorn

On 02/02/14 15:29, Alexey Dokuchaev wrote:

On Sat, Feb 01, 2014 at 08:56:50PM +, Nathan Whitehorn wrote:

New Revision: 261358
URL: http://svnweb.freebsd.org/changeset/base/261358

Log:
   Switch default Book-E scheduler to ULE, which works now, and enable
   CAPABILITIES stuff required to make ssh work.

Hmm; I've been using ssh(d) on a kernel w/out CAPABILITIES support just
fine.  Am I missing something?

./danfe


With a fresh install of head yesterday, it was non-functional. Gave an 
error during preauth about how it couldn't initialize a sandbox.

-Nathan
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261417 - head/sys/arm/include

2014-02-02 Thread Ian Lepore
Author: ian
Date: Sun Feb  2 21:44:04 2014
New Revision: 261417
URL: http://svnweb.freebsd.org/changeset/base/261417

Log:
  Add missing semicolon.

Modified:
  head/sys/arm/include/asmacros.h

Modified: head/sys/arm/include/asmacros.h
==
--- head/sys/arm/include/asmacros.h Sun Feb  2 21:10:40 2014
(r261416)
+++ head/sys/arm/include/asmacros.h Sun Feb  2 21:44:04 2014
(r261417)
@@ -248,7 +248,7 @@ name:
.word   _C_LABEL(__pcpu) + PC_CURTHREAD
 
 #define GET_CURTHREAD_PTR(tmp) \
-   ldr tmp, .Lcurthread \
+   ldr tmp, .Lcurthread; \
ldr tmp, [tmp]
 #endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261418 - head/sys/arm/arm

2014-02-02 Thread Olivier Houchard
Author: cognet
Date: Sun Feb  2 22:26:30 2014
New Revision: 261418
URL: http://svnweb.freebsd.org/changeset/base/261418

Log:
  Invalidate cachelines for bounce pages on PREREAD too, there may still be
  stale entries from a previous transfer.

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cSun Feb  2 21:44:04 2014
(r261417)
+++ head/sys/arm/arm/busdma_machdep-v6.cSun Feb  2 22:26:30 2014
(r261418)
@@ -1220,6 +1220,17 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus
dmat-bounce_zone-total_bounced++;
}
 
+   if (op  BUS_DMASYNC_PREREAD) {
+   bpage = STAILQ_FIRST(map-bpages);
+   while (bpage != NULL) {
+   cpu_dcache_inv_range((vm_offset_t)bpage-vaddr,
+   bpage-datacount);
+   l2cache_inv_range((vm_offset_t)bpage-vaddr,
+   (vm_offset_t)bpage-busaddr,
+   bpage-datacount);
+   bpage = STAILQ_NEXT(bpage, links);
+   }
+   }
if (op  BUS_DMASYNC_POSTREAD) {
while (bpage != NULL) {
vm_offset_t startv;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261216 - head/sys/dev/pccbb

2014-02-02 Thread Gavin Atkinson
On Mon, 27 Jan 2014, John Baldwin wrote:
 Author: jhb
 Date: Mon Jan 27 19:49:52 2014
 New Revision: 261216
 URL: http://svnweb.freebsd.org/changeset/base/261216
 
 Log:
   Explicitly enable I/O and memory decoding in the bridge's command register
   when activating an I/O or memory window on the CardBus bridge.

This fixes some, but not all of my machines.  One in particular, a Toshiba 
M5 laptop, remains broken by r254263 even with this change.  Specificaly, 
the laptop does not notice when a card is inserted.

The attached minimal patch gets things working again, though I don't know 
if is the correct fix or if a more involved fix is required.

dmesg before and after that patch:

http://people.freebsd.org/~gavin/m5-dmesg-before.txt
http://people.freebsd.org/~gavin/m5-dmesg-after.txt

The only difference is the cbb register dump, the one bit that I am 
setting in the patch.

Thanks,

GavinIndex: /usr/src/sys/dev/pccbb/pccbb_pci.c
===
--- /usr/src/sys/dev/pccbb/pccbb_pci.c  (revision 261352)
+++ /usr/src/sys/dev/pccbb/pccbb_pci.c  (working copy)
@@ -472,6 +472,7 @@
 
/* Enable memory access */
pci_enable_busmaster(sc-dev);
+   PCI_MASK_CONFIG(sc-dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2);
 
/* disable Legacy IO */
switch (sc-chipset) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org

svn commit: r261419 - in head/sys/arm: arm include

2014-02-02 Thread Olivier Houchard
Author: cognet
Date: Sun Feb  2 23:29:51 2014
New Revision: 261419
URL: http://svnweb.freebsd.org/changeset/base/261419

Log:
  Only use the CPU ID register if SMP is defined. Some non-MPCore armv6 cpu,
  such as the one found in the RPi, don't have it, and just hang when we try
  to access it.

Modified:
  head/sys/arm/arm/swtch.S
  head/sys/arm/include/pcpu.h

Modified: head/sys/arm/arm/swtch.S
==
--- head/sys/arm/arm/swtch.SSun Feb  2 22:26:30 2014(r261418)
+++ head/sys/arm/arm/swtch.SSun Feb  2 23:29:51 2014(r261419)
@@ -88,7 +88,7 @@ __FBSDID($FreeBSD$);
 
 #define DOMAIN_CLIENT  0x01
 
-#ifdef _ARM_ARCH_6
+#if defined(_ARM_ARCH_6)  defined(SMP)
 #define GET_PCPU(tmp, tmp2) \
mrc p15, 0, tmp, c0, c0, 5; \
and tmp, tmp, #0xf; \
@@ -240,8 +240,7 @@ ENTRY(cpu_switch)
/* Process is now on a processor. */
/* We have a new curthread now so make a note it */
GET_PCPU(r7, r2)
-   add r7, r7, #PC_CURTHREAD
-   str r1, [r7]
+   str r1, [r7, #PC_CURTHREAD]
 #ifndef ARM_TP_ADDRESS
mcr p15, 0, r1, c13, c0, 4
 #endif

Modified: head/sys/arm/include/pcpu.h
==
--- head/sys/arm/include/pcpu.h Sun Feb  2 22:26:30 2014(r261418)
+++ head/sys/arm/include/pcpu.h Sun Feb  2 23:29:51 2014(r261419)
@@ -65,11 +65,15 @@ extern struct pcpu *pcpup;
 
 #define CPU_MASK (0xf)
 
+#ifndef SMP
+#define get_pcpu() (pcpup)
+#else
 #define get_pcpu() __extension__ ({\
int id; \
 __asm __volatile(mrc p15, 0, %0, c0, c0, 5 : =r (id)); \
(pcpup + (id  CPU_MASK));  \
 })
+#endif

 static inline struct thread *
 get_curthread(void)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261420 - head/sys/modules/hwpmc

2014-02-02 Thread Justin Hibbits
Author: jhibbits
Date: Mon Feb  3 01:16:32 2014
New Revision: 261420
URL: http://svnweb.freebsd.org/changeset/base/261420

Log:
  Add missing file to Makefile.
  
  MFC after:1 month
  X-MFC-with:   261342

Modified:
  head/sys/modules/hwpmc/Makefile

Modified: head/sys/modules/hwpmc/Makefile
==
--- head/sys/modules/hwpmc/Makefile Sun Feb  2 23:29:51 2014
(r261419)
+++ head/sys/modules/hwpmc/Makefile Mon Feb  3 01:16:32 2014
(r261420)
@@ -29,7 +29,7 @@ SRCS+=hwpmc_ia64.c
 .endif
 
 .if ${MACHINE_CPUARCH} == powerpc
-SRCS+= hwpmc_powerpc.c hwpmc_mpc7xxx.c
+SRCS+= hwpmc_powerpc.c hwpmc_mpc7xxx.c hwpmc_ppc970.c
 .endif
 
 .if ${MACHINE_CPUARCH} == sparc64
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261421 - in head/sys: conf dev/iicbus powerpc/conf

2014-02-02 Thread Justin Hibbits
Author: jhibbits
Date: Mon Feb  3 01:22:50 2014
New Revision: 261421
URL: http://svnweb.freebsd.org/changeset/base/261421

Log:
  Add driver for the ADT7460/ADT7467 fan controller found in later PowerBooks
  and iBooks.  Original work by andreast.
  
  MFC after:1 month

Added:
  head/sys/dev/iicbus/adt746x.c   (contents, props changed)
Modified:
  head/sys/conf/files.powerpc
  head/sys/powerpc/conf/GENERIC

Modified: head/sys/conf/files.powerpc
==
--- head/sys/conf/files.powerpc Mon Feb  3 01:16:32 2014(r261420)
+++ head/sys/conf/files.powerpc Mon Feb  3 01:22:50 2014(r261421)
@@ -33,6 +33,7 @@ dev/hwpmc/hwpmc_powerpc.c optionalhwpmc
 dev/hwpmc/hwpmc_mpc7xxx.c  optionalhwpmc
 dev/hwpmc/hwpmc_ppc970.c   optionalhwpmc
 dev/iicbus/ad7417.coptionalad7417 powermac
+dev/iicbus/adt746x.c   optionaladt746x powermac
 dev/iicbus/ds1631.coptionalds1631 powermac
 dev/iicbus/ds1775.coptionalds1775 powermac
 dev/iicbus/max6690.c   optionalmax6690 powermac

Added: head/sys/dev/iicbus/adt746x.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/iicbus/adt746x.c   Mon Feb  3 01:22:50 2014
(r261421)
@@ -0,0 +1,664 @@
+/*-
+ * Copyright (c) 2012 Andreas Tobler
+ * Copyright (c) 2014 Justin Hibbits
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include sys/param.h
+#include sys/bus.h
+#include sys/systm.h
+#include sys/module.h
+#include sys/callout.h
+#include sys/conf.h
+#include sys/cpu.h
+#include sys/ctype.h
+#include sys/kernel.h
+#include sys/reboot.h
+#include sys/rman.h
+#include sys/sysctl.h
+#include sys/limits.h
+
+#include machine/bus.h
+#include machine/md_var.h
+
+#include dev/iicbus/iicbus.h
+#include dev/iicbus/iiconf.h
+
+#include dev/ofw/openfirm.h
+#include dev/ofw/ofw_bus.h
+#include powerpc/powermac/powermac_thermal.h
+
+/* ADT746X registers. */
+#define ADT746X_TACH1LOW  0x28
+#define ADT746X_TACH1HIGH 0x29
+#define ADT746X_TACH2LOW  0x2a
+#define ADT746X_TACH2HIGH 0x2b
+#define ADT746X_PWM1  0x30
+#define ADT746X_PWM2  0x31
+#define ADT746X_DEVICE_ID 0x3d
+#define ADT746X_COMPANY_ID0x3e
+#define ADT746X_REV_ID0x3f
+#define ADT746X_CONFIG0x40
+#define ADT746X_PWM1_CONF 0x5c
+#define ADT746X_PWM2_CONF 0x5d
+#define ADT746X_MANUAL_MASK   0xe0
+
+#define ADT7460_DEV_ID0x27
+#define ADT7467_DEV_ID0x68
+
+struct adt746x_fan {
+   struct pmac_fan fan;
+   device_tdev;
+   int id;
+   int setpoint;
+   int pwm_reg;
+   int conf_reg;
+};
+
+struct adt746x_sensor {
+   struct pmac_therm therm;
+   device_t  dev;
+   int   id;
+   cell_treg;
+   enum {
+   ADT746X_SENSOR_TEMP,
+   ADT746X_SENSOR_VOLT,
+   ADT746X_SENSOR_SPEED
+   } type;
+};
+
+struct adt746x_softc {
+   device_tsc_dev;
+   struct intr_config_hook enum_hook;
+   uint32_tsc_addr;
+   /* The 7467 supports up to 4 fans, 2 voltage and 3 temperature sensors. 
*/
+   struct adt746x_fan  sc_fans[4];
+   int sc_nfans;
+   struct adt746x_sensor   sc_sensors[9];
+   int sc_nsensors;
+   int 

svn commit: r261422 - head/contrib/binutils/gas/config

2014-02-02 Thread Justin Hibbits
Author: jhibbits
Date: Mon Feb  3 01:45:07 2014
New Revision: 261422
URL: http://svnweb.freebsd.org/changeset/base/261422

Log:
  Make gas accept any PowerPC instruction by default.  This is a local change,
  and will not be submitted upstream.
  
  Discussed with:   nwhitehorn,rdivacky
  MFC after:1 month

Modified:
  head/contrib/binutils/gas/config/tc-ppc.c

Modified: head/contrib/binutils/gas/config/tc-ppc.c
==
--- head/contrib/binutils/gas/config/tc-ppc.c   Mon Feb  3 01:22:50 2014
(r261421)
+++ head/contrib/binutils/gas/config/tc-ppc.c   Mon Feb  3 01:45:07 2014
(r261422)
@@ -681,7 +681,7 @@ ppc_parse_name (const char *name, expres
 
 /* The type of processor we are assembling for.  This is one or more
of the PPC_OPCODE flags defined in opcode/ppc.h.  */
-static unsigned long ppc_cpu = 0;
+static unsigned long ppc_cpu = PPC_OPCODE_ANY;
 
 /* Whether to target xcoff64/elf64.  */
 static unsigned int ppc_obj64 = BFD_DEFAULT_TARGET_SIZE == 64;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261423 - head/sys/dev/mmc

2014-02-02 Thread Ian Lepore
Author: ian
Date: Mon Feb  3 02:52:07 2014
New Revision: 261423
URL: http://svnweb.freebsd.org/changeset/base/261423

Log:
  Add the imx sdhci controller.

Modified:
  head/sys/dev/mmc/mmc.c

Modified: head/sys/dev/mmc/mmc.c
==
--- head/sys/dev/mmc/mmc.c  Mon Feb  3 01:45:07 2014(r261422)
+++ head/sys/dev/mmc/mmc.c  Mon Feb  3 02:52:07 2014(r261423)
@@ -1762,3 +1762,4 @@ DRIVER_MODULE(mmc, sdhci_pci, mmc_driver
 DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL);
 DRIVER_MODULE(mmc, sdhci_fdt, mmc_driver, mmc_devclass, NULL, NULL);
 DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL);
+DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261424 - head/sys/dev/mmc

2014-02-02 Thread Ian Lepore
Author: ian
Date: Mon Feb  3 02:56:23 2014
New Revision: 261424
URL: http://svnweb.freebsd.org/changeset/base/261424

Log:
  Sort the list.

Modified:
  head/sys/dev/mmc/mmc.c

Modified: head/sys/dev/mmc/mmc.c
==
--- head/sys/dev/mmc/mmc.c  Mon Feb  3 02:52:07 2014(r261423)
+++ head/sys/dev/mmc/mmc.c  Mon Feb  3 02:56:23 2014(r261424)
@@ -1756,10 +1756,11 @@ static driver_t mmc_driver = {
 };
 static devclass_t mmc_devclass;
 
-DRIVER_MODULE(mmc, ti_mmchs, mmc_driver, mmc_devclass, NULL, NULL);
 DRIVER_MODULE(mmc, at91_mci, mmc_driver, mmc_devclass, NULL, NULL);
-DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL);
 DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL);
 DRIVER_MODULE(mmc, sdhci_fdt, mmc_driver, mmc_devclass, NULL, NULL);
-DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL);
 DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL);
+DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL);
+DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL);
+DRIVER_MODULE(mmc, ti_mmchs, mmc_driver, mmc_devclass, NULL, NULL);
+
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261428 - head/sbin/dhclient

2014-02-02 Thread Eitan Adler
Author: eadler
Date: Mon Feb  3 04:22:29 2014
New Revision: 261428
URL: http://svnweb.freebsd.org/changeset/base/261428

Log:
  dhclient: change the pidfile's permissions to 644
  
  This change permits non-root users to determine if dhclient is running
  ('service dhclient status wlan0').
  
  Discussed with: mjg, cperciva

Modified:
  head/sbin/dhclient/dhclient.c

Modified: head/sbin/dhclient/dhclient.c
==
--- head/sbin/dhclient/dhclient.c   Mon Feb  3 03:35:43 2014
(r261427)
+++ head/sbin/dhclient/dhclient.c   Mon Feb  3 04:22:29 2014
(r261428)
@@ -393,7 +393,7 @@ main(int argc, char *argv[])
if (path_dhclient_pidfile == NULL)
error(asprintf);
}
-   pidfile = pidfile_open(path_dhclient_pidfile, 0600, otherpid);
+   pidfile = pidfile_open(path_dhclient_pidfile, 0644, otherpid);
if (pidfile == NULL) {
if (errno == EEXIST)
error(dhclient already running, pid: %d., otherpid);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261246 - in head: . cddl/contrib/opensolaris/tools/ctf/cvt contrib/elftoolchain lib/libdwarf lib/libelf sys/sys

2014-02-02 Thread Tijl Coosemans
On Sun, 2 Feb 2014 00:44:05 +0100 Baptiste Daroussin wrote:
 On Tue, Jan 28, 2014 at 09:38:54PM +, Kai Wang wrote:
 Author: kaiw
 Date: Tue Jan 28 21:38:54 2014
 New Revision: 261246
 URL: http://svnweb.freebsd.org/changeset/base/261246
 
 Log:
   Merge from projects/elftoolchain: Upgrade libelf and libdwarf to newer
   versions from elftoolchain upstream (r2974).  Convert ctfconvert to
   use the APIs from the new libdwarf and make ctfconvert work with Clang
   3.4.
   
   __FreeBSD_version is bumped to 116.
   
 Thanks for this update, I just want to remind something to everyone, because 
 it
 happened a lot recently.
 
 Before breaking any ABI (SHLIB num bumped here in this case) all committers
 should first talk to portmgr sync with them and then commit (and send a heasup
 to portmgr saying the commit has been done)

There also needs to be a compat10x port now and the other compat ports
have to be updated.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261401 - head/usr.sbin/newsyslog

2014-02-02 Thread Bryan Drewery
Author: bdrewery
Date: Sun Feb  2 14:11:34 2014
New Revision: 261401
URL: http://svnweb.freebsd.org/changeset/base/261401

Log:
  Fix newsyslog(8) to use the size of the file instead of the blocks it
  takes on disk, as advertised in newsyslog.conf(5).
  
  This fixes newsyslog(8) on ZFS with compression enabled to not have
  large files compared to the expected rotation size.
  
# grep remotes/messages /etc/newsyslog.conf
/var/log/remote/messages   root:info   640  5 500  * JC
# ls -alh /var/log/remote/messages
-rw-r-  1 root  info3.2M Jan 31 20:02 /var/log/remote/messages
# newsyslog -vN|grep remote/messages
/var/log/remote/messages 5J: size (Kb): 464 [500] -- skipping
# stat -f st_size: %z st_blocks: %b /var/log/remote/messages
st_size: 3372627 st_blocks: 928
# zfs get -H compressratio zroot/syslogs
zroot/syslogscompressratio   3.77x   -
  
  With fix:
  
# newsyslog -v | grep remote/messages
/var/log/remote/messages 5J: size (Kb): 3338 [500] -- trimming log
  
  Approved by:  bapt (mentor)
  PR:   docs/150877
  Reported by:  Joshua Isom jri...@gmail.com
  MFC after:2 weeks

Modified:
  head/usr.sbin/newsyslog/newsyslog.c

Modified: head/usr.sbin/newsyslog/newsyslog.c
==
--- head/usr.sbin/newsyslog/newsyslog.c Sun Feb  2 07:28:04 2014
(r261400)
+++ head/usr.sbin/newsyslog/newsyslog.c Sun Feb  2 14:11:34 2014
(r261401)
@@ -2284,7 +2284,7 @@ sizefile(const char *file)
 
if (stat(file, sb)  0)
return (-1);
-   return (kbytes(dbtob(sb.st_blocks)));
+   return (kbytes(sb.st_size));
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261402 - head/share/man/man9

2014-02-02 Thread Bryan Drewery
Author: bdrewery
Date: Sun Feb  2 14:13:51 2014
New Revision: 261402
URL: http://svnweb.freebsd.org/changeset/base/261402

Log:
  Add back reference to buf(9) removed in r32223 as buf(9) was added
  in r42016.
  
  Approved by:  bapt (mentor)

Modified:
  head/share/man/man9/VOP_STRATEGY.9

Modified: head/share/man/man9/VOP_STRATEGY.9
==
--- head/share/man/man9/VOP_STRATEGY.9  Sun Feb  2 14:11:34 2014
(r261401)
+++ head/share/man/man9/VOP_STRATEGY.9  Sun Feb  2 14:13:51 2014
(r261402)
@@ -28,7 +28,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 24, 1996
+.Dd February 2, 2014
 .Dt VOP_STRATEGY 9
 .Os
 .Sh NAME
@@ -57,7 +57,7 @@ Always zero.
 Errors should be signalled by setting BIO_ERROR on b_ioflags field in struct 
buf,
 and setting b_error to the appropriate errno value.
 .Sh SEE ALSO
-.\ .Xr buf 9 ,
+.Xr buf 9 ,
 .Xr vnode 9
 .Sh AUTHORS
 This manual page was written by
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261403 - head/sys/dev/ofw

2014-02-02 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sun Feb  2 16:41:54 2014
New Revision: 261403
URL: http://svnweb.freebsd.org/changeset/base/261403

Log:
  Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to
  process status properties of OF nodes.
  
  I've avoided adding new KOBJ methods here so that we don't have to modify
  every ofw_bus in the tree. Since 100% of implementations of ofw_bus use
  only ofw_bus_gen_*(), it might be worth garbage-collecting the other
  methods as well.

Modified:
  head/sys/dev/ofw/ofw_bus_if.m
  head/sys/dev/ofw/ofw_bus_subr.c
  head/sys/dev/ofw/ofw_bus_subr.h

Modified: head/sys/dev/ofw/ofw_bus_if.m
==
--- head/sys/dev/ofw/ofw_bus_if.m   Sun Feb  2 14:13:51 2014
(r261402)
+++ head/sys/dev/ofw/ofw_bus_if.m   Sun Feb  2 16:41:54 2014
(r261403)
@@ -46,6 +46,7 @@ HEADER {
char*obd_model;
char*obd_name;
char*obd_type;
+   char*obd_status;
};
 };
 

Modified: head/sys/dev/ofw/ofw_bus_subr.c
==
--- head/sys/dev/ofw/ofw_bus_subr.c Sun Feb  2 14:13:51 2014
(r261402)
+++ head/sys/dev/ofw/ofw_bus_subr.c Sun Feb  2 16:41:54 2014
(r261403)
@@ -55,6 +55,7 @@ ofw_bus_gen_setup_devinfo(struct ofw_bus
OF_getprop_alloc(node, compatible, 1, (void **)obd-obd_compat);
OF_getprop_alloc(node, device_type, 1, (void **)obd-obd_type);
OF_getprop_alloc(node, model, 1, (void **)obd-obd_model);
+   OF_getprop_alloc(node, status, 1, (void **)obd-obd_status);
obd-obd_node = node;
return (0);
 }
@@ -73,6 +74,8 @@ ofw_bus_gen_destroy_devinfo(struct ofw_b
free(obd-obd_name, M_OFWPROP);
if (obd-obd_type != NULL)
free(obd-obd_type, M_OFWPROP);
+   if (obd-obd_status != NULL)
+   free(obd-obd_status, M_OFWPROP);
 }
 
 int
@@ -147,6 +150,30 @@ ofw_bus_gen_get_type(device_t bus, devic
return (obd-obd_type);
 }
 
+const char *
+ofw_bus_get_status(device_t dev)
+{
+   const struct ofw_bus_devinfo *obd;
+
+   obd = OFW_BUS_GET_DEVINFO(device_get_parent(dev), dev);
+   if (obd == NULL)
+   return (NULL);
+
+   return (obd-obd_status);
+}
+
+int
+ofw_bus_status_okay(device_t dev)
+{
+   const char *status;
+
+   status = ofw_bus_get_status(dev);
+   if (status == NULL || strcmp(status, okay) == 0)
+   return (1);
+   
+   return (0);
+}
+
 int
 ofw_bus_is_compatible(device_t dev, const char *onecompat)
 {

Modified: head/sys/dev/ofw/ofw_bus_subr.h
==
--- head/sys/dev/ofw/ofw_bus_subr.h Sun Feb  2 14:13:51 2014
(r261402)
+++ head/sys/dev/ofw/ofw_bus_subr.h Sun Feb  2 16:41:54 2014
(r261403)
@@ -72,6 +72,10 @@ int  ofw_bus_lookup_imap(phandle_t, struc
 intofw_bus_search_intrmap(void *, int, void *, int, void *, int, void *,
void *, void *, int, phandle_t *);
 
+/* Helper to get device status property */
+const char *ofw_bus_get_status(device_t dev);
+int ofw_bus_status_okay(device_t dev);
+
 /* Helper to get node's interrupt parent */
 void   ofw_bus_find_iparent(phandle_t);
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261404 - head/sys/arm/arm

2014-02-02 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sun Feb  2 16:42:26 2014
New Revision: 261404
URL: http://svnweb.freebsd.org/changeset/base/261404

Log:
  Fix one remnant endian flaw here. The back-and-forth endian conversions are
  confusing.

Modified:
  head/sys/arm/arm/nexus.c

Modified: head/sys/arm/arm/nexus.c
==
--- head/sys/arm/arm/nexus.cSun Feb  2 16:41:54 2014(r261403)
+++ head/sys/arm/arm/nexus.cSun Feb  2 16:42:26 2014(r261404)
@@ -362,7 +362,7 @@ nexus_ofw_map_intr(device_t dev, device_
}
 
/* Not in table, so guess */
-   interrupt = FDT_MAP_IRQ(intr_parent, intr[0]);
+   interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(intr[0]));
 
return (interrupt);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261405 - head/sys/dev/fdt

2014-02-02 Thread Ian Lepore
Author: ian
Date: Sun Feb  2 16:56:40 2014
New Revision: 261405
URL: http://svnweb.freebsd.org/changeset/base/261405

Log:
  Be more robust with malformed interrupt config data.  Instead of crashing
  or going into a near-infinite loop, warn and make potentially-reasonable
  assumptions.

Modified:
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cSun Feb  2 16:42:26 2014
(r261404)
+++ head/sys/dev/fdt/simplebus.cSun Feb  2 16:56:40 2014
(r261405)
@@ -287,11 +287,23 @@ simplebus_setup_dinfo(device_t dev, phan
nintr = OF_getencprop_alloc(node, interrupts,  sizeof(*intr),
(void **)intr);
if (nintr  0) {
-   iparent = 0;
-   OF_searchencprop(node, interrupt-parent, iparent,
-   sizeof(iparent));
-   OF_searchencprop(OF_xref_phandle(iparent), #interrupt-cells,
-   icells, sizeof(icells));
+   if (OF_searchencprop(node, interrupt-parent, iparent,
+   sizeof(iparent)) == -1) {
+   device_printf(dev, No interrupt-parent found, 
+   assuming direct parent\n);
+   iparent = OF_parent(node);
+   }
+   if (OF_searchencprop(OF_xref_phandle(iparent), 
+   #interrupt-cells, icells, sizeof(icells)) == -1) {
+   device_printf(dev, Missing #interrupt-cells property, 
+   assuming 1\n);
+   icells = 1;
+   }
+   if (icells  1 || icells  nintr) {
+   device_printf(dev, Invalid #interrupt-cells property 
+   value %d, assuming 1\n, icells);
+   icells = 1;
+   }
for (i = 0, k = 0; i  nintr; i += icells, k++) {
intr[i] = ofw_bus_map_intr(dev, iparent, icells,
intr[i]);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261406 - in head/sys: arm/freescale/vybrid boot/fdt/dts

2014-02-02 Thread Ruslan Bukin
Author: br
Date: Sun Feb  2 17:48:06 2014
New Revision: 261406
URL: http://svnweb.freebsd.org/changeset/base/261406

Log:
  o Expand device tree information
  o Export iomuxc (pins) configuration to DTS
  o Allow devices to assign clocks in DTS

Modified:
  head/sys/arm/freescale/vybrid/vf_ccm.c
  head/sys/arm/freescale/vybrid/vf_iomuxc.c
  head/sys/boot/fdt/dts/vybrid-cosmic.dts
  head/sys/boot/fdt/dts/vybrid.dtsi

Modified: head/sys/arm/freescale/vybrid/vf_ccm.c
==
--- head/sys/arm/freescale/vybrid/vf_ccm.c  Sun Feb  2 16:56:40 2014
(r261405)
+++ head/sys/arm/freescale/vybrid/vf_ccm.c  Sun Feb  2 17:48:06 2014
(r261406)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013 Ruslan Bukin b...@bsdpad.com
+ * Copyright (c) 2013-2014 Ruslan Bukin b...@bsdpad.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -73,8 +73,8 @@ __FBSDID($FreeBSD$);
 
 #defineCCM_CCGRN   12
 #defineCCM_CCGR(n) (0x40 + (n * 0x04)) /* Clock Gating 
Register */
-#defineCCM_CMEOR(n)(0x70 + (n * 0x70)) /* Module Enable 
Override Reg */
-#defineCCM_CCPGR(n)(0x90 + (n * 0x04)) /* Platform Clock 
Gating Reg */
+#defineCCM_CMEOR(n)(0x70 + (n * 0x70)) /* Module Enable 
Override */
+#defineCCM_CCPGR(n)(0x90 + (n * 0x04)) /* Platform Clock 
Gating */
 
 #defineCCM_CPPDSR  0x88/* PLL PFD Disable Status Register */
 #defineCCM_CCOWR   0x8C/* CORE Wakeup Register */
@@ -100,6 +100,228 @@ __FBSDID($FreeBSD$);
 /* CCM_CSCDR1 */
 #defineENET_TS_EN  (1  23)
 #defineRMII_CLK_EN (1  24)
+#defineSAI3_EN (1  19)
+
+/* CCM_CSCDR2 */
+#defineESAI_EN (1  30)
+#defineESDHC1_EN   (1  29)
+#defineESDHC0_EN   (1  28)
+#defineNFC_EN  (1  9)
+#defineESDHC1_DIV_S20
+#defineESDHC1_DIV_M0xf
+#defineESDHC0_DIV_S16
+#defineESDHC0_DIV_M0xf
+
+/* CCM_CSCDR3 */
+#defineDCU0_EN (1  19)
+
+#defineQSPI1_EN(1  12)
+#defineQSPI1_DIV   (1  11)
+#defineQSPI1_X2_DIV(1  10)
+#defineQSPI1_X4_DIV_M  0x3
+#defineQSPI1_X4_DIV_S  8
+
+#defineQSPI0_EN(1  4)
+#defineQSPI0_DIV   (1  3)
+#defineQSPI0_X2_DIV(1  2)
+#defineQSPI0_X4_DIV_M  0x3
+#defineQSPI0_X4_DIV_S  0
+
+#defineSAI3_DIV_SHIFT  12
+#defineSAI3_DIV_MASK   0xf
+#defineESAI_DIV_SHIFT  24
+#defineESAI_DIV_MASK   0xf
+
+#definePLL4_CLK_DIV_SHIFT  6
+#definePLL4_CLK_DIV_MASK   0x7
+
+#defineIPG_CLK_DIV_SHIFT   11
+#defineIPG_CLK_DIV_MASK0x3
+
+#defineESAI_CLK_SEL_SHIFT  20
+#defineESAI_CLK_SEL_MASK   0x3
+
+#defineSAI3_CLK_SEL_SHIFT  6
+#defineSAI3_CLK_SEL_MASK   0x3
+
+#defineCKO1_EN (1  10)
+#defineCKO1_DIV_MASK   0xf
+#defineCKO1_DIV_SHIFT  6
+#defineCKO1_SEL_MASK   0x3f
+#defineCKO1_SEL_SHIFT  0
+#defineCKO1_PLL4_MAIN  0x6
+#defineCKO1_PLL4_DIVD  0x7
+
+struct clk {
+   uint32_treg;
+   uint32_tenable_reg;
+   uint32_tdiv_mask;
+   uint32_tdiv_shift;
+   uint32_tdiv_val;
+   uint32_tsel_reg;
+   uint32_tsel_mask;
+   uint32_tsel_shift;
+   uint32_tsel_val;
+};
+
+/*
+  PLL4 clock divider (before switching the clocks should be gated)
+  000 Divide by 1 (only if PLL frequency less than or equal to 650 MHz)
+  001 Divide by 4
+  010 Divide by 6
+  011 Divide by 8
+  100 Divide by 10
+  101 Divide by 12
+  110 Divide by 14
+  111 Divide by 16
+*/
+
+static struct clk pll4_clk = {
+   .reg = CCM_CACRR,
+   .enable_reg = 0,
+   .div_mask = PLL4_CLK_DIV_MASK,
+   .div_shift = PLL4_CLK_DIV_SHIFT,
+   .div_val = 5, /* Divide by 12 */
+   .sel_reg = 0,
+   .sel_mask = 0,
+   .sel_shift = 0,
+   .sel_val = 0,
+};
+
+static struct clk sai3_clk = {
+   .reg = CCM_CSCDR1,
+   .enable_reg = SAI3_EN,
+   .div_mask = SAI3_DIV_MASK,
+   .div_shift = SAI3_DIV_SHIFT,
+   .div_val = 1,
+   .sel_reg = CCM_CSCMR1,
+   .sel_mask = SAI3_CLK_SEL_MASK,
+   .sel_shift = SAI3_CLK_SEL_SHIFT,
+   .sel_val = 0x3, /* Divided PLL4 main clock */
+};
+
+static struct clk cko1_clk = {
+   .reg = CCM_CCOSR,
+   .enable_reg = CKO1_EN,
+   .div_mask = CKO1_DIV_MASK,
+   .div_shift = CKO1_DIV_SHIFT,
+   .div_val = 1,
+   .sel_reg = CCM_CCOSR,
+   .sel_mask = 

svn commit: r261407 - head/lib/libnv

2014-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Feb  2 19:03:52 2014
New Revision: 261407
URL: http://svnweb.freebsd.org/changeset/base/261407

Log:
  Fix sending empty nvlist.
  
  Submitted by: Mariusz Zaborski osho...@freebsd.org

Modified:
  head/lib/libnv/msgio.c

Modified: head/lib/libnv/msgio.c
==
--- head/lib/libnv/msgio.c  Sun Feb  2 17:48:06 2014(r261406)
+++ head/lib/libnv/msgio.c  Sun Feb  2 19:03:52 2014(r261407)
@@ -364,7 +364,7 @@ buf_recv(int sock, void *buf, size_t siz
unsigned char *ptr;
 
ptr = buf;
-   do {
+   while (size  0) {
fd_wait(sock, true);
done = recv(sock, ptr, size, 0);
if (done == -1) {
@@ -377,7 +377,7 @@ buf_recv(int sock, void *buf, size_t siz
}
size -= done;
ptr += done;
-   } while (size  0);
+   }
 
return (0);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261408 - head/lib/libnv

2014-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Feb  2 19:06:00 2014
New Revision: 261408
URL: http://svnweb.freebsd.org/changeset/base/261408

Log:
  Assert input arguments to buf_send() and buf_recv().
  
  Submitted by: Mariusz Zaborski osho...@freebsd.org

Modified:
  head/lib/libnv/msgio.c

Modified: head/lib/libnv/msgio.c
==
--- head/lib/libnv/msgio.c  Sun Feb  2 19:03:52 2014(r261407)
+++ head/lib/libnv/msgio.c  Sun Feb  2 19:06:00 2014(r261408)
@@ -338,6 +338,10 @@ buf_send(int sock, void *buf, size_t siz
ssize_t done;
unsigned char *ptr;
 
+   PJDLOG_ASSERT(sock = 0);
+   PJDLOG_ASSERT(size  0);
+   PJDLOG_ASSERT(buf != NULL);
+
ptr = buf;
do {
fd_wait(sock, false);
@@ -363,6 +367,9 @@ buf_recv(int sock, void *buf, size_t siz
ssize_t done;
unsigned char *ptr;
 
+   PJDLOG_ASSERT(sock = 0);
+   PJDLOG_ASSERT(buf != NULL);
+
ptr = buf;
while (size  0) {
fd_wait(sock, true);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261409 - head/sys/arm/conf

2014-02-02 Thread Ruslan Bukin
Author: br
Date: Sun Feb  2 19:13:02 2014
New Revision: 261409
URL: http://svnweb.freebsd.org/changeset/base/261409

Log:
  Split kernel configuration to chip common and board specific parts.

Added:
  head/sys/arm/conf/VYBRID.common   (contents, props changed)
Modified:
  head/sys/arm/conf/COSMIC

Modified: head/sys/arm/conf/COSMIC
==
--- head/sys/arm/conf/COSMICSun Feb  2 19:06:00 2014(r261408)
+++ head/sys/arm/conf/COSMICSun Feb  2 19:13:02 2014(r261409)
@@ -17,123 +17,9 @@
 #
 # $FreeBSD$
 
+includeVYBRID.common
 ident  COSMIC
 
-include../freescale/vybrid/std.vybrid
-
-makeoptionsMODULES_OVERRIDE=
-makeoptionsWITHOUT_MODULES=ahc
-
-makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
-makeoptionsWERROR=-Werror
-
-optionsHZ=100 ##
-optionsSCHED_4BSD  #4BSD scheduler
-optionsINET#InterNETworking
-optionsINET6   #IPv6 communications protocols
-optionsFFS #Berkeley Fast Filesystem
-optionsSOFTUPDATES
-optionsUFS_ACL #Support for access control 
lists
-optionsUFS_DIRHASH #Improve performance on big 
directories
-optionsMSDOSFS #MSDOS Filesystem
-optionsCD9660  #ISO 9660 Filesystem
-optionsPROCFS  #Process filesystem (requires 
PSEUDOFS)
-optionsPSEUDOFS#Pseudo-filesystem framework
-#options   NANDFS  #NAND Filesystem
-optionsTMPFS
-optionsCOMPAT_43   #Compatible with BSD 4.3 [KEEP 
THIS!]
-optionsSCSI_DELAY=5000 #Delay (in ms) before probing 
SCSI
-optionsKTRACE
-optionsSYSVSHM #SYSV-style shared memory
-optionsSYSVMSG #SYSV-style message queues
-optionsSYSVSEM #SYSV-style semaphores
-options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time 
extensions
-optionsKBD_INSTALL_CDEV
-optionsPREEMPTION
-optionsFREEBSD_BOOT_LOADER
-optionsVFP # vfp/neon
-
-# Debugging
-makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
-#options   VERBOSE_SYSINIT #Enable verbose sysinit messages
-optionsKDB
-optionsDDB #Enable the kernel debugger
-optionsINVARIANTS  #Enable calls of extra sanity 
checking
-optionsINVARIANT_SUPPORT   #Extra sanity checks of 
internal structures, required by INVARIANTS
-#options   WITNESS #Enable checks to detect deadlocks and 
cycles
-#options   WITNESS_SKIPSPIN#Don't run witness on spinlocks for 
speed
-optionsDIAGNOSTIC
-
-# NFS support
-optionsNFSCL   #Network Filesystem Client
-optionsNFSLOCKD#Network Lock Manager
-optionsNFS_ROOT#NFS usable as /, requires 
NFSCLIENT
-
-# Uncomment this for NFS root
-#options   NFS_ROOT#NFS usable as /, requires NFSCL
-#options   BOOTP_NFSROOT
-#options   BOOTP_COMPAT
-#options   BOOTP
-#options   BOOTP_NFSV3
-#options   BOOTP_WIRED_TO=ffec0
-
-device mmc # mmc/sd bus
-device mmcsd   # mmc/sd flash cards
-device sdhci   # generic sdhci
-
-#options   ROOTDEVNAME=\nfs:10.5.0.1:/tftpboot/cosmic\
-#options   ROOTDEVNAME=\nandfs:/dev/gnand0s.root\
-optionsROOTDEVNAME=\ufs:/dev/da0\
-
-#options   SMP
-
-# Pseudo devices
-
-device loop
-device random
-device pty
-device md
-device gpio
-
-# USB support
-optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
-device usb
-optionsUSB_DEBUG
-#options   USB_REQ_DEBUG
-#options   USB_VERBOSE
-#devicemusb
-device ehci
-#deviceohci
-
-device umass
-device scbus   # SCSI bus (required for SCSI)
-device da  # Direct Access (disks)
-device pass
-
-# SATA
-#deviceata
-#deviceatadisk
-#devicemvs
-
-device nand
-
-# Serial ports
-device uart
-
-# I2C (TWSI)
-#deviceiic
-#deviceiicbus
-
-# Ethernet
-device ether
-device ffec
-
-# USB 

svn commit: r261410 - in head/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/mv arm/rockchip arm/samsung/exynos arm/ti arm/ti/a...

2014-02-02 Thread Ian Lepore
Author: ian
Date: Sun Feb  2 19:17:28 2014
New Revision: 261410
URL: http://svnweb.freebsd.org/changeset/base/261410

Log:
  Follow r261352 by updating all drivers which are children of simplebus
  to check the status property in their probe routines.
  
  Simplebus used to only instantiate its children whose status=okay
  but that was improper behavior, fixed in r261352.  Now that it doesn't
  check anymore and probes all its children; the children all have to
  do the check because really only the children know how to properly
  interpret their status property strings.
  
  Right now all existing drivers only understand okay versus something-
  that's-not-okay, so they all use the new ofw_bus_status_okay() helper.

Modified:
  head/sys/arm/allwinner/a10_clk.c
  head/sys/arm/allwinner/a10_ehci.c
  head/sys/arm/allwinner/a10_gpio.c
  head/sys/arm/allwinner/a10_wdog.c
  head/sys/arm/allwinner/a20/a20_cpu_cfg.c
  head/sys/arm/allwinner/aintc.c
  head/sys/arm/arm/generic_timer.c
  head/sys/arm/arm/gic.c
  head/sys/arm/arm/mpcore_timer.c
  head/sys/arm/arm/pl190.c
  head/sys/arm/arm/pl310.c
  head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
  head/sys/arm/broadcom/bcm2835/bcm2835_dma.c
  head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
  head/sys/arm/broadcom/bcm2835/bcm2835_intr.c
  head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
  head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
  head/sys/arm/broadcom/bcm2835/bcm2835_spi.c
  head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
  head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c
  head/sys/arm/freescale/imx/i2c.c
  head/sys/arm/freescale/imx/imx51_ccm.c
  head/sys/arm/freescale/imx/imx51_gpio.c
  head/sys/arm/freescale/imx/imx51_iomux.c
  head/sys/arm/freescale/imx/imx51_ipuv3.c
  head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c
  head/sys/arm/freescale/imx/imx6_anatop.c
  head/sys/arm/freescale/imx/imx6_ccm.c
  head/sys/arm/freescale/imx/imx6_usbphy.c
  head/sys/arm/freescale/imx/imx_gpt.c
  head/sys/arm/freescale/imx/imx_nop_usbphy.c
  head/sys/arm/freescale/imx/imx_sdhci.c
  head/sys/arm/freescale/imx/imx_wdog.c
  head/sys/arm/freescale/imx/tzic.c
  head/sys/arm/freescale/vybrid/vf_anadig.c
  head/sys/arm/freescale/vybrid/vf_ccm.c
  head/sys/arm/freescale/vybrid/vf_ehci.c
  head/sys/arm/freescale/vybrid/vf_gpio.c
  head/sys/arm/freescale/vybrid/vf_iomuxc.c
  head/sys/arm/freescale/vybrid/vf_mscm.c
  head/sys/arm/freescale/vybrid/vf_nfc.c
  head/sys/arm/freescale/vybrid/vf_src.c
  head/sys/arm/lpc/if_lpe.c
  head/sys/arm/lpc/lpc_dmac.c
  head/sys/arm/lpc/lpc_fb.c
  head/sys/arm/lpc/lpc_gpio.c
  head/sys/arm/lpc/lpc_intc.c
  head/sys/arm/lpc/lpc_mmc.c
  head/sys/arm/lpc/lpc_ohci.c
  head/sys/arm/lpc/lpc_pwr.c
  head/sys/arm/lpc/lpc_rtc.c
  head/sys/arm/lpc/lpc_spi.c
  head/sys/arm/lpc/lpc_timer.c
  head/sys/arm/mv/gpio.c
  head/sys/arm/mv/ic.c
  head/sys/arm/mv/mpic.c
  head/sys/arm/mv/mv_sata.c
  head/sys/arm/mv/mv_ts.c
  head/sys/arm/mv/rtc.c
  head/sys/arm/mv/timer.c
  head/sys/arm/mv/twsi.c
  head/sys/arm/rockchip/rk30xx_gpio.c
  head/sys/arm/rockchip/rk30xx_grf.c
  head/sys/arm/rockchip/rk30xx_pmu.c
  head/sys/arm/rockchip/rk30xx_wdog.c
  head/sys/arm/samsung/exynos/arch_timer.c
  head/sys/arm/samsung/exynos/ehci_exynos5.c
  head/sys/arm/ti/aintc.c
  head/sys/arm/ti/am335x/am335x_dmtimer.c
  head/sys/arm/ti/am335x/am335x_lcd.c
  head/sys/arm/ti/am335x/am335x_prcm.c
  head/sys/arm/ti/am335x/am335x_pwm.c
  head/sys/arm/ti/am335x/am335x_usbss.c
  head/sys/arm/ti/cpsw/if_cpsw.c
  head/sys/arm/ti/omap4/omap4_prcm_clks.c
  head/sys/arm/ti/ti_edma3.c
  head/sys/arm/ti/ti_gpio.c
  head/sys/arm/ti/ti_i2c.c
  head/sys/arm/ti/ti_mbox.c
  head/sys/arm/ti/ti_mmchs.c
  head/sys/arm/ti/ti_pruss.c
  head/sys/arm/ti/ti_scm.c
  head/sys/arm/ti/ti_sdhci.c
  head/sys/arm/ti/ti_sdma.c
  head/sys/arm/ti/usb/omap_ehci.c
  head/sys/arm/versatile/if_smc_fdt.c
  head/sys/arm/versatile/pl050.c
  head/sys/arm/versatile/sp804.c
  head/sys/arm/versatile/versatile_clcd.c
  head/sys/arm/versatile/versatile_pci.c
  head/sys/arm/versatile/versatile_sic.c
  head/sys/arm/xilinx/zy7_devcfg.c
  head/sys/arm/xilinx/zy7_ehci.c
  head/sys/arm/xilinx/zy7_gpio.c
  head/sys/arm/xilinx/zy7_slcr.c
  head/sys/dev/altera/atse/if_atse_fdt.c
  head/sys/dev/altera/avgen/altera_avgen_fdt.c
  head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c
  head/sys/dev/altera/sdcard/altera_sdcard_fdt.c
  head/sys/dev/ata/chipsets/ata-fsl.c
  head/sys/dev/cesa/cesa.c
  head/sys/dev/cfi/cfi_bus_fdt.c
  head/sys/dev/fdt/simplebus.c
  head/sys/dev/ffec/if_ffec.c
  head/sys/dev/mge/if_mge.c
  head/sys/dev/mvs/mvs_soc.c
  head/sys/dev/quicc/quicc_bfe_fdt.c
  head/sys/dev/sdhci/sdhci_fdt.c
  head/sys/dev/sec/sec.c
  head/sys/dev/terasic/de4led/terasic_de4led_fdt.c
  head/sys/dev/terasic/mtl/terasic_mtl_fdt.c
  head/sys/dev/tsec/if_tsec_fdt.c
  head/sys/dev/uart/uart_bus_fdt.c
  head/sys/dev/usb/controller/dwc_otg_fdt.c
  head/sys/dev/usb/controller/ehci_fsl.c
  head/sys/dev/usb/controller/ehci_imx.c
  head/sys/dev/usb/controller/ehci_mv.c