Index: head/sys/arm/conf/VYBRID
===================================================================
--- head/sys/arm/conf/VYBRID (revision 319553)
+++ head/sys/arm/conf/VYBRID (revision 319554)
@@ -1,114 +1,115 @@
#
# Kernel configuration for Vybrid Family boards.
#
# 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$
ident VYBRID
include "std.armv6"
include "../freescale/vybrid/std.vybrid"
makeoptions WERROR="-Werror"
options SCHED_4BSD # 4BSD scheduler
+options PLATFORM # Platform based SoC
#options NANDFS # NAND Filesystem
#options SMP # Enable multiple cores
# NFS root from boopt/dhcp
#options BOOTP
#options BOOTP_NFSROOT
#options BOOTP_COMPAT
#options BOOTP_NFSV3
#options BOOTP_WIRED_TO=ffec0
#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\"
#options ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\"
options ROOTDEVNAME=\"ufs:/dev/da0\"
options MUTEX_NOINLINE
options RWLOCK_NOINLINE
options NO_FFS_SNAPSHOT
options NO_SWAPPING
# Interrupt controller
device gic
options INTRNG
# ARM MPCore timer
device mpcore_timer
# MMC/SD/SDIO Card slot support
device mmc # mmc/sd bus
device mmcsd # mmc/sd flash cards
device sdhci # generic sdhci
# Pseudo devices
device loop
device random
device pty
device md
device gpio
# USB support
options USB_HOST_ALIGN=32 # Align usb buffers to cache line size.
device usb
#device musb
device ehci
#device ohci
device umass
device scbus # SCSI bus (required for ATA/SCSI)
device da # Direct Access (disks)
device pass
# SATA
#device ata
#device atadisk
#device mvs
device nand
# Serial ports
device uart
# I2C (TWSI)
device iic
device iicbus
# Ethernet
device ether
device ffec
# USB ethernet support, requires miibus
device miibus
device axe # ASIX Electronics USB Ethernet
device bpf # Berkeley packet filter
device sound
# SPI
device spibus
device vf_spi
# Framebuffer
device vt
device kbdmux
device ukbd
# Flattened Device Tree
options FDT # Configure using FDT/DTB data
Index: head/sys/arm/freescale/vybrid/vf_common.c
===================================================================
--- head/sys/arm/freescale/vybrid/vf_common.c (revision 319553)
+++ head/sys/arm/freescale/vybrid/vf_common.c (nonexistent)
@@ -1,61 +0,0 @@
-/*-
- * Copyright (c) 2013 Ruslan Bukin
- * 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.
- */
-
-#include
-__FBSDID("$FreeBSD$");
-
-#include
-#include
-#include
-#include
-
-#include
-
-#include
-#include
-
-#include
-
-void
-cpu_reset(void)
-{
- phandle_t src;
- uint32_t paddr;
- bus_addr_t vaddr;
-
- if (src_swreset() == 0)
- goto end;
-
- src = OF_finddevice("src");
- if ((src != 0) && (OF_getencprop(src, "reg", &paddr, sizeof(paddr))) > 0) {
- if (bus_space_map(fdtbus_bs_tag, paddr, 0x10, 0, &vaddr) == 0) {
- bus_space_write_4(fdtbus_bs_tag, vaddr, 0x00, SW_RST);
- }
- }
-
-end:
- while (1);
-}
Property changes on: head/sys/arm/freescale/vybrid/vf_common.c
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-FreeBSD=%H
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: head/sys/arm/freescale/vybrid/files.vybrid
===================================================================
--- head/sys/arm/freescale/vybrid/files.vybrid (revision 319553)
+++ head/sys/arm/freescale/vybrid/files.vybrid (revision 319554)
@@ -1,25 +1,24 @@
# $FreeBSD$
kern/kern_clocksource.c standard
arm/freescale/vybrid/vf_machdep.c standard
-arm/freescale/vybrid/vf_common.c standard
arm/freescale/vybrid/vf_ccm.c standard
arm/freescale/vybrid/vf_anadig.c standard
arm/freescale/vybrid/vf_iomuxc.c standard
arm/freescale/vybrid/vf_mscm.c standard
arm/freescale/vybrid/vf_src.c standard
arm/freescale/vybrid/vf_edma.c standard
arm/freescale/vybrid/vf_dmamux.c standard
arm/freescale/vybrid/vf_port.c standard
arm/freescale/vybrid/vf_adc.c standard
arm/freescale/vybrid/vf_i2c.c optional iicbus
arm/freescale/vybrid/vf_tcon.c optional vt
arm/freescale/vybrid/vf_dcu4.c optional vt
arm/freescale/vybrid/vf_nfc.c optional nand
arm/freescale/vybrid/vf_ehci.c optional ehci
arm/freescale/vybrid/vf_gpio.c optional gpio
arm/freescale/vybrid/vf_uart.c optional uart
arm/freescale/vybrid/vf_sai.c optional sound
arm/freescale/vybrid/vf_spi.c optional vf_spi
dev/ffec/if_ffec.c optional ffec
Index: head/sys/arm/freescale/vybrid/vf_machdep.c
===================================================================
--- head/sys/arm/freescale/vybrid/vf_machdep.c (revision 319553)
+++ head/sys/arm/freescale/vybrid/vf_machdep.c (revision 319554)
@@ -1,77 +1,86 @@
/*-
* Copyright (c) 2013 Ruslan Bukin
* 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.
*/
-#include "opt_ddb.h"
#include "opt_platform.h"
#include
__FBSDID("$FreeBSD$");
#include
#include
-#include
#include
#include
-#include
+#include
+
#include
-#include
+#include
#include
+#include
-vm_offset_t
-platform_lastaddr(void)
-{
+#include
- return (devmap_lastaddr());
-}
+#include "platform_if.h"
-void
-platform_probe_and_attach(void)
+static int
+vf_devmap_init(platform_t plat)
{
+ devmap_add_entry(0x40000000, 0x100000);
+
+ return (0);
}
-void
-platform_gpio_init(void)
+static void
+vf_cpu_reset(platform_t plat)
{
+ phandle_t src;
+ uint32_t paddr;
+ bus_addr_t vaddr;
-}
+ if (src_swreset() == 0)
+ goto end;
-void
-platform_late_init(void)
-{
+ src = OF_finddevice("src");
+ if ((src != 0) && (OF_getencprop(src, "reg", &paddr, sizeof(paddr))) > 0) {
+ if (bus_space_map(fdtbus_bs_tag, paddr, 0x10, 0, &vaddr) == 0) {
+ bus_space_write_4(fdtbus_bs_tag, vaddr, 0x00, SW_RST);
+ }
+ }
+end:
+ while (1);
}
-int
-platform_devmap_init(void)
-{
+static platform_method_t vf_methods[] = {
+ PLATFORMMETHOD(platform_devmap_init, vf_devmap_init),
+ PLATFORMMETHOD(platform_cpu_reset, vf_cpu_reset),
- devmap_add_entry(0x40000000, 0x100000);
+ PLATFORMMETHOD_END,
+};
- return (0);
-}
+FDT_PLATFORM_DEF(vf, "vybrid", 0, "freescale,vybrid", 0);