diff --git a/UPDATING b/UPDATING index 63e26cf81b44..def0d85b5250 100644 --- a/UPDATING +++ b/UPDATING @@ -1,2230 +1,2233 @@ Updating Information for FreeBSD current users. This file is maintained and copyrighted by M. Warner Losh . See end of file for further details. For commonly done items, please see the COMMON ITEMS: section later in the file. These instructions assume that you basically know what you are doing. If not, then please consult the FreeBSD handbook: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: FreeBSD 13.x has many debugging features turned on, in both the kernel and userland. These features attempt to detect incorrect use of system primitives, and encourage loud failure through extra sanity checking and fail stop semantics. They also substantially impact system performance. If you want to do performance measurement, benchmarking, and optimization, you'll want to turn them off. This includes various WITNESS- related kernel options, INVARIANTS, malloc debugging flags in userland, and various verbose features in the kernel. Many developers choose to disable these features on build machines to maximize performance. (To completely disable malloc debugging, define MALLOC_PRODUCTION in /etc/make.conf, or to merely disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200301: + Removed brooktree driver (bktr.4) from the tree. + 20200229: The WITH_GPL_DTC option has been removed. The BSD-licenced device tree compiler in usr.bin/dtc is used on all architectures which use dtc, and the GPL dtc is available (if needed) from the sysutils/dtc port. 20200229: The WITHOUT_LLVM_LIBUNWIND option has been removed. LLVM's libunwind is used by all supported CPU architectures. 20200229: GCC 4.2.1 has been removed from the tree. The WITH_GCC, WITH_GCC_BOOTSTRAP, and WITH_GNUCXX options are no longer available. Users who wish to build FreeBSD with GCC must use the external toolchain ports or packages. 20200220: ncurses has been updated to a newer version (6.2-20200215). Given the ABI has changed, users will have to rebuild all the ports that are linked to ncurses. 20200217: The size of struct vnet and the magic cookie have changed. Users need to recompile libkvm and all modules using VIMAGE together with their new kernel. 20200212: Defining the long deprecated NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE, and NO_WARNS variables is now an error. Update your Makefiles and scripts to define MK_=no instead as required. One exception to this is that program or library Makefiles should define MAN to empty rather than setting MK_MAN=no. 20200108: Clang/LLVM is now the default compiler and LLD the default linker for riscv64. 20200107: make universe no longer uses GCC 4.2.1 on any architectures. Architectures not supported by in-tree Clang/LLVM require an external toolchain package. 20200104: GCC 4.2.1 is now not built by default, as part of the GCC 4.2.1 retirement plan. Specifically, the GCC, GCC_BOOTSTRAP, and GNUCXX options default to off for all supported CPU architectures. As a short-term transition aid they may be enabled via WITH_* options. GCC 4.2.1 is expected to be removed from the tree on 2020-03-31. 20200102: Support for armv5 has been disconnected and is being removed. The machine combination MACHINE=arm MACHINE_ARCH=arm is no longer valid. You must now use a MACHINE_ARCH of armv6 or armv7. The default MACHINE_ARCH for MACHINE=arm is now armv7. 20191226: Clang/LLVM is now the default compiler for all powerpc architectures. LLD is now the default linker for powerpc64. The change for powerpc64 also includes a change to the ELFv2 ABI, incompatible with the existing ABI. 20191226: Kernel-loadable random(4) modules are no longer unloadable. 20191222: Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have been upgraded to 9.0.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20191212: r355677 has modified the internal interface used between the NFS modules in the kernel. As such, they must all be upgraded simultaneously. I will do a version bump for this. 20191205: The root certificates of the Mozilla CA Certificate Store have been imported into the base system and can be managed with the certctl(8) utility. If you have installed the security/ca_root_nss port or package with the ETCSYMLINK option (the default), be advised that there may be differences between those included in the port and those included in base due to differences in nss branch used as well as general update frequency. Note also that certctl(8) cannot manage certs in the format used by the security/ca_root_nss port. 20191120: The amd(8) automount daemon has been disabled by default, and will be removed in the future. As of FreeBSD 10.1 the autofs(5) is available for automounting. 20191107: The nctgpio and wbwd drivers have been moved to the superio bus. If you have one of these drivers in a kernel configuration, then you should add device superio to it. If you use one of these drivers as a module and you compile a custom set of modules, then you should add superio to the set. 20191021: KPIs for network drivers to access interface addresses have changed. Users need to recompile NIC driver modules together with kernel. 20191021: The net.link.tap.user_open sysctl no longer prevents user opening of already created /dev/tapNN devices. Access is still controlled by node permissions, just like tun devices. The net.link.tap.user_open sysctl is now used only to allow users to perform devfs cloning of tap devices, and the subsequent open may not succeed if the user is not in the appropriate group. This sysctl may be deprecated/removed completely in the future. 20191009: mips, powerpc, and sparc64 are no longer built as part of universe / tinderbox unless MAKE_OBSOLETE_GCC is defined. If not defined, mips, powerpc, and sparc64 builds will look for the xtoolchain binaries and if installed use them for universe builds. As llvm 9.0 becomes vetted for these architectures, they will be removed from the list. 20191009: Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have been upgraded to 9.0.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20191003: The hpt27xx, hptmv, hptnr, and hptrr drivers have been removed from GENERIC. They are available as modules and can be loaded by adding to /boot/loader.conf hpt27xx_load="YES", hptmv_load="YES", hptnr_load="YES", or hptrr_load="YES", respectively. 20190913: ntpd no longer by default locks its pages in memory, allowing them to be paged out by the kernel. Use rlimit memlock to restore historic BSD behaviour. For example, add "rlimit memlock 32" to ntp.conf to lock up to 32 MB of ntpd address space in memory. 20190823: Several of ping6's options have been renamed for better consistency with ping. If you use any of -ARWXaghmrtwx, you must update your scripts. See ping6(8) for details. 20190727: The vfs.fusefs.sync_unmount and vfs.fusefs.init_backgrounded sysctls and the "-o sync_unmount" and "-o init_backgrounded" mount options have been removed from mount_fusefs(8). You can safely remove them from your scripts, because they had no effect. The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize, vfs.fusefs.refresh_size, vfs.fusefs.mmap_enable, vfs.fusefs.reclaim_revoked, and vfs.fusefs.data_cache_invalidate sysctls have been removed. If you felt the need to set any of them to a non-default value, please tell asomers@FreeBSD.org why. 20190713: Default permissions on the /var/account/acct file (and copies of it rotated by periodic daily scripts) are changed from 0644 to 0640 because the file contains sensitive information that should not be world-readable. If the /var/account directory must be created by rc.d/accounting, the mode used is now 0750. Admins who use the accounting feature are encouraged to change the mode of an existing /var/account directory to 0750 or 0700. 20190620: Entropy collection and the /dev/random device are no longer optional components. The "device random" option has been removed. Implementations of distilling algorithms can still be made loadable with "options RANDOM_LOADABLE" (e.g., random_fortuna.ko). 20190612: Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have been upgraded to 8.0.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20190608: A fix was applied to i386 kernel modules to avoid panics with dpcpu or vnet. Users need to recompile i386 kernel modules having pcpu or vnet sections or they will refuse to load. 20190513: User-wired pages now have their own counter, vm.stats.vm.v_user_wire_count. The vm.max_wired sysctl was renamed to vm.max_user_wired and changed from an unsigned int to an unsigned long. bhyve VMs wired with the -S are now subject to the user wiring limit; the vm.max_user_wired sysctl may need to be tuned to avoid running into the limit. 20190507: The IPSEC option has been removed from GENERIC. Users requiring ipsec(4) must now load the ipsec(4) kernel module. 20190507: The tap(4) driver has been folded into tun(4), and the module has been renamed to tuntap. You should update any kld_list="if_tap" or kld_list="if_tun" entries in /etc/rc.conf, if_tap_load="YES" or if_tun_load="YES" entries in /boot/loader.conf to load the if_tuntap module instead, and "device tap" or "device tun" entries in kernel config files to select the tuntap device instead. 20190418: The following knobs have been added related to tradeoffs between safe use of the random device and availability in the absence of entropy: kern.random.initial_seeding.bypass_before_seeding: tunable; set non-zero to bypass the random device prior to seeding, or zero to block random requests until the random device is initially seeded. For now, set to 1 (unsafe) by default to restore pre-r346250 boot availability properties. kern.random.initial_seeding.read_random_bypassed_before_seeding: read-only diagnostic sysctl that is set when bypass is enabled and read_random(9) is bypassed, to enable programmatic handling of this initial condition, if desired. kern.random.initial_seeding.arc4random_bypassed_before_seeding: Similar to the above, but for for arc4random(9) initial seeding. kern.random.initial_seeding.disable_bypass_warnings: tunable; set non-zero to disable warnings in dmesg when the same conditions are met as for the diagnostic sysctls above. Defaults to zero, i.e., produce warnings in dmesg when the conditions are met. 20190416: The loadable random module KPI has changed; the random_infra_init() routine now requires a 3rd function pointer for a bool (*)(void) method that returns true if the random device is seeded (and therefore unblocked). 20190404: r345895 reverts r320698. This implies that an nfsuserd(8) daemon built from head sources between r320757 (July 6, 2017) and r338192 (Aug. 22, 2018) will not work unless the "-use-udpsock" is added to the command line. nfsuserd daemons built from head sources that are post-r338192 are not affected and should continue to work. 20190320: The fuse(4) module has been renamed to fusefs(4) for consistency with other filesystems. You should update any kld_load="fuse" entries in /etc/rc.conf, fuse_load="YES" entries in /boot/loader.conf, and "options FUSE" entries in kernel config files. 20190304: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 8.0.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20190226: geom_uzip(4) depends on the new module xz. If geom_uzip is statically compiled into your custom kernel, add 'device xz' statement to the kernel config. 20190219: drm and drm2 have been removed from the tree. Please see https://wiki.freebsd.org/Graphics for the latest information on migrating to the drm ports. 20190131: Iflib is no longer unconditionally compiled into the kernel. Drivers using iflib and statically compiled into the kernel, now require the 'device iflib' config option. For the same drivers loaded as modules on kernels not having 'device iflib', the iflib.ko module is loaded automatically. 20190125: The IEEE80211_AMPDU_AGE and AH_SUPPORT_AR5416 kernel configuration options no longer exist since r343219 and r343427 respectively; nothing uses them, so they should be just removed from custom kernel config files. 20181230: r342635 changes the way efibootmgr(8) works by requiring users to add the -b (bootnum) parameter for commands where the bootnum was previously specified with each option. For example 'efibootmgr -B 0001' is now 'efibootmgr -B -b 0001'. 20181220: r342286 modifies the NFSv4 server so that it obeys vfs.nfsd.nfs_privport in the same as it is applied to NFSv2 and 3. This implies that NFSv4 servers that have vfs.nfsd.nfs_privport set will only allow mounts from clients using a reserved port#. Since both the FreeBSD and Linux NFSv4 clients use reserved port#s by default, this should not affect most NFSv4 mounts. 20181219: The XLP config has been removed. We can't support 64-bit atomics in this kernel because it is running in 32-bit mode. XLP users must transition to running a 64-bit kernel (XLP64 or XLPN32). The mips GXEMUL support has been removed from FreeBSD. MALTA* + qemu is the preferred emulator today and we don't need two different ones. The old sibyte / swarm / Broadcom BCM1250 support has been removed from the mips port. 20181211: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 7.0.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20181211: Remove the timed and netdate programs from the base tree. Setting the time with these daemons has been obsolete for over a decade. 20181126: On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, as it produces broken binaries when ifuncs are in use. Users needing GNU ld should install the binutils port or package. 20181123: The BSD crtbegin and crtend code has been enabled by default. It has had extensive testing on amd64, arm64, and i386. It can be disabled by building a world with -DWITHOUT_BSD_CRTBEGIN. 20181115: The set of CTM commands (ctm, ctm_smail, ctm_rmail, ctm_dequeue) has been converted to a port (misc/ctm) and will be removed from FreeBSD-13. It is available as a package (ctm) for all supported FreeBSD versions. 20181110: The default newsyslog.conf(5) file has been changed to only include files in /etc/newsyslog.conf.d/ and /usr/local/etc/newsyslog.conf.d/ if the filenames end in '.conf' and do not begin with a '.'. You should check the configuration files in these two directories match this naming convention. You can verify which configuration files are being included using the command: $ newsyslog -Nrv 20181015: Ports for the DRM modules have been simplified. Now, amd64 users should just install the drm-kmod port. All others should install drm-legacy-kmod. Graphics hardware that's newer than about 2010 usually works with drm-kmod. For hardware older than 2013, however, some users will need to use drm-legacy-kmod if drm-kmod doesn't work for them. Hardware older than 2008 usually only works in drm-legacy-kmod. The graphics team can only commit to hardware made since 2013 due to the complexity of the market and difficulty to test all the older cards effectively. If you have hardware supported by drm-kmod, you are strongly encouraged to use that as you will get better support. Other than KPI chasing, drm-legacy-kmod will not be updated. As outlined elsewhere, the drm and drm2 modules will be eliminated from the src base soon (with a limited exception for arm). Please update to the package asap and report any issues to x11@freebsd.org. Generally, anybody using the drm*-kmod packages should add WITHOUT_DRM_MODULE=t and WITHOUT_DRM2_MODULE=t to avoid nasty cross-threading surprises, especially with automatic driver loading from X11 startup. These will become the defaults in 13-current shortly. 20181012: The ixlv(4) driver has been renamed to iavf(4). As a consequence, custom kernel and module loading configuration files must be updated accordingly. Moreover, interfaces previous presented as ixlvN to the system are now exposed as iavfN and network configuration files must be adjusted as necessary. 20181009: OpenSSL has been updated to version 1.1.1. This update included additional various API changes throughout the base system. It is important to rebuild third-party software after upgrading. The value of __FreeBSD_version has been bumped accordingly. 20181006: The legacy DRM modules and drivers have now been added to the loader's module blacklist, in favor of loading them with kld_list in rc.conf(5). The module blacklist may be overridden with the loader.conf(5) 'module_blacklist' variable, but loading them via rc.conf(5) is strongly encouraged. 20181002: The cam(4) based nda(4) driver will be used over nvd(4) by default on powerpc64. You may set 'options NVME_USE_NVD=1' in your kernel conf or loader tunable 'hw.nvme.use_nvd=1' if you wish to use the existing driver. Make sure to edit /boot/etc/kboot.conf and fstab to use the nda device name. 20180913: Reproducible build mode is now on by default, in preparation for FreeBSD 12.0. This eliminates build metadata such as the user, host, and time from the kernel (and uname), unless the working tree corresponds to a modified checkout from a version control system. The previous behavior can be obtained by setting the /etc/src.conf knob WITHOUT_REPRODUCIBLE_BUILD. 20180826: The Yarrow CSPRNG has been removed from the kernel as it has not been supported by its designers since at least 2003. Fortuna has been the default since FreeBSD-11. 20180822: devctl freeze/thaw have gone into the tree, the rc scripts have been updated to use them and devmatch has been changed. You should update kernel, userland and rc scripts all at the same time. 20180818: The default interpreter has been switched from 4th to Lua. LOADER_DEFAULT_INTERP, documented in build(7), will override the default interpreter. If you have custom FORTH code you will need to set LOADER_DEFAULT_INTERP=4th (valid values are 4th, lua or simp) in src.conf for the build. This will create default hard links between loader and loader_4th instead of loader and loader_lua, the new default. If you are using UEFI it will create the proper hard link to loader.efi. bhyve uses userboot.so. It remains 4th-only until some issues are solved regarding coexisting with multiple versions of FreeBSD are resolved. 20180815: ls(1) now respects the COLORTERM environment variable used in other systems and software to indicate that a colored terminal is both supported and desired. If ls(1) is suddenly emitting colors, they may be disabled again by either removing the unwanted COLORTERM from your environment, or using `ls --color=never`. The ls(1) specific CLICOLOR may not be observed in a future release. 20180808: The default pager for most commands has been changed to "less". To restore the old behavior, set PAGER="more" and MANPAGER="more -s" in your environment. 20180731: The jedec_ts(4) driver has been removed. A superset of its functionality is available in the jedec_dimm(4) driver, and the manpage for that driver includes migration instructions. If you have "device jedec_ts" in your kernel configuration file, it must be removed. 20180730: amd64/GENERIC now has EFI runtime services, EFIRT, enabled by default. This should have no effect if the kernel is booted via BIOS/legacy boot. EFIRT may be disabled via a loader tunable, efi.rt.disabled, if a system has a buggy firmware that prevents a successful boot due to use of runtime services. 20180727: Atmel AT91RM9200 and AT91SAM9, Cavium CNS 11xx and XScale support has been removed from the tree. These ports were obsolete and/or known to be broken for many years. 20180723: loader.efi has been augmented to participate more fully in the UEFI boot manager protocol. loader.efi will now look at the BootXXXX environment variable to determine if a specific kernel or root partition was specified. XXXX is derived from BootCurrent. efibootmgr(8) manages these standard UEFI variables. 20180720: zfsloader's functionality has now been folded into loader. zfsloader is no longer necessary once you've updated your boot blocks. For a transition period, we will install a hardlink for zfsloader to loader to allow a smooth transition until the boot blocks can be updated (hard link because old zfs boot blocks don't understand symlinks). 20180719: ARM64 now have efifb support, if you want to have serial console on your arm64 board when an screen is connected and the bootloader setup a frame buffer for us to use, just add : boot_serial=YES boot_multicons=YES in /boot/loader.conf For Raspberry Pi 3 (RPI) users, this is needed even if you don't have an screen connected as the firmware will setup a frame buffer are that u-boot will expose as an EFI frame buffer. 20180719: New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster or take steps to update /etc/passwd before doing installworld on existing systems. Do not skip the "mergemaster -Fp" step before installworld, as described in the update procedures near the bottom of this document. Also, rc.d/ntpd now starts ntpd(8) as user ntpd if the new mac_ntpd(4) policy is available, unless ntpd_flags or the ntp config file contain options that change file/dir locations. When such options (e.g., "statsdir" or "crypto") are used, ntpd can still be run as non-root by setting ntpd_user=ntpd in rc.conf, after taking steps to ensure that all required files/dirs are accessible by the ntpd user. 20180717: Big endian arm support has been removed. 20180711: The static environment setup in kernel configs is no longer mutually exclusive with the loader(8) environment by default. In order to restore the previous default behavior of disabling the loader(8) environment if a static environment is present, you must specify loader_env.disabled=1 in the static environment. 20180705: The ABI of syscalls used by management tools like sockstat and netstat has been broken to allow 32-bit binaries to work on 64-bit kernels without modification. These programs will need to match the kernel in order to function. External programs may require minor modifications to accommodate a change of type in structures from pointers to 64-bit virtual addresses. 20180702: On i386 and amd64 atomics are now inlined. Out of tree modules using atomics will need to be rebuilt. 20180701: The '%I' format in the kern.corefile sysctl limits the number of core files that a process can generate to the number stored in the debug.ncores sysctl. The '%I' format is replaced by the single digit index. Previously, if all indexes were taken the kernel would overwrite only a core file with the highest index in a filename. Currently the system will create a new core file if there is a free index or if all slots are taken it will overwrite the oldest one. 20180630: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 6.0.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20180628: r335753 introduced a new quoting method. However, etc/devd/devmatch.conf needed to be changed to work with it. This change was made with r335763 and requires a mergemaster / etcupdate / etc to update the installed file. 20180612: r334930 changed the interface between the NFS modules, so they all need to be rebuilt. r335018 did a __FreeBSD_version bump for this. 20180530: As of r334391 lld is the default amd64 system linker; it is installed as /usr/bin/ld. Kernel build workarounds (see 20180510 entry) are no longer necessary. 20180530: The kernel / userland interface for devinfo changed, so you'll need a new kernel and userland as a pair for it to work (rebuilding lib/libdevinfo is all that's required). devinfo and devmatch will not work, but everything else will when there's a mismatch. 20180523: The on-disk format for hwpmc callchain records has changed to include threadid corresponding to a given record. This changes the field offsets and thus requires that libpmcstat be rebuilt before using a kernel later than r334108. 20180517: The vxge(4) driver has been removed. This driver was introduced into HEAD one week before the Exar left the Ethernet market and is not known to be used. If you have device vxge in your kernel config file it must be removed. 20180510: The amd64 kernel now requires a ld that supports ifunc to produce a working kernel, either lld or a newer binutils. lld is built by default on amd64, and the 'buildkernel' target uses it automatically. However, it is not the default linker, so building the kernel the traditional way requires LD=ld.lld on the command line (or LD=/usr/local/bin/ld for binutils port/package). lld will soon be default, and this requirement will go away. NOTE: As of r334391 lld is the default system linker on amd64, and no workaround is necessary. 20180508: The nxge(4) driver has been removed. This driver was for PCI-X 10g cards made by s2io/Neterion. The company was acquired by Exar and no longer sells or supports Ethernet products. If you have device nxge in your kernel config file it must be removed. 20180504: The tz database (tzdb) has been updated to 2018e. This version more correctly models time stamps in time zones with negative DST such as Europe/Dublin (from 1971 on), Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This does not affect the UT offsets, only time zone abbreviations and the tm_isdst flag. 20180502: The ixgb(4) driver has been removed. This driver was for an early and uncommon legacy PCI 10GbE for a single ASIC, Intel 82597EX. Intel quickly shifted to the long lived ixgbe family. If you have device ixgb in your kernel config file it must be removed. 20180501: The lmc(4) driver has been removed. This was a WAN interface card that was already reportedly rare in 2003, and had an ambiguous license. If you have device lmc in your kernel config file it must be removed. 20180413: Support for Arcnet networks has been removed. If you have device arcnet or device cm in your kernel config file they must be removed. 20180411: Support for FDDI networks has been removed. If you have device fddi or device fpa in your kernel config file they must be removed. 20180406: In addition to supporting RFC 3164 formatted messages, the syslogd(8) service is now capable of parsing RFC 5424 formatted log messages. The main benefit of using RFC 5424 is that clients may now send log messages with timestamps containing year numbers, microseconds and time zone offsets. Similarly, the syslog(3) C library function has been altered to send RFC 5424 formatted messages to the local system logging daemon. On systems using syslogd(8), this change should have no negative impact, as long as syslogd(8) and the C library are updated at the same time. On systems using a different system logging daemon, it may be necessary to make configuration adjustments, depending on the software used. When using syslog-ng, add the 'syslog-protocol' flag to local input sources to enable parsing of RFC 5424 formatted messages: source src { unix-dgram("/var/run/log" flags(syslog-protocol)); } When using rsyslog, disable the 'SysSock.UseSpecialParser' option of the 'imuxsock' module to let messages be processed by the regular RFC 3164/5424 parsing pipeline: module(load="imuxsock" SysSock.UseSpecialParser="off") Do note that these changes only affect communication between local applications and syslogd(8). The format that syslogd(8) uses to store messages on disk or forward messages to other systems remains unchanged. syslogd(8) still uses RFC 3164 for these purposes. Options to customize this behaviour will be added in the future. Utilities that process log files stored in /var/log are thus expected to continue to function as before. __FreeBSD_version has been incremented to 1200061 to denote this change. 20180328: Support for token ring networks has been removed. If you have "device token" in your kernel config you should remove it. No device drivers supported token ring. 20180323: makefs was modified to be able to tag ISO9660 El Torito boot catalog entries as EFI instead of overloading the i386 tag as done previously. The amd64 mkisoimages.sh script used to build amd64 ISO images for release was updated to use this. This may mean that makefs must be updated before "make cdrom" can be run in the release directory. This should be as simple as: $ cd $SRCDIR/usr.sbin/makefs $ make depend all install 20180212: FreeBSD boot loader enhanced with Lua scripting. It's purely opt-in for now by building WITH_LOADER_LUA and WITHOUT_FORTH in /etc/src.conf. Co-existence for the transition period will come shortly. Booting is a complex environment and test coverage for Lua-enabled loaders has been thin, so it would be prudent to assume it might not work and make provisions for backup boot methods. 20180211: devmatch functionality has been turned on in devd. It will automatically load drivers for unattached devices. This may cause unexpected drivers to be loaded. Please report any problems to current@ and imp@freebsd.org. 20180114: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 6.0.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20180110: LLVM's lld linker is now used as the FreeBSD/amd64 bootstrap linker. This means it is used to link the kernel and userland libraries and executables, but is not yet installed as /usr/bin/ld by default. To revert to ld.bfd as the bootstrap linker, in /etc/src.conf set WITHOUT_LLD_BOOTSTRAP=yes 20180110: On i386, pmtimer has been removed. Its functionality has been folded into apm. It was a no-op on ACPI in current for a while now (but was still needed on i386 in FreeBSD 11 and earlier). Users may need to remove it from kernel config files. 20180104: The use of RSS hash from the network card aka flowid has been disabled by default for lagg(4) as it's currently incompatible with the lacp and loadbalance protocols. This can be re-enabled by setting the following in loader.conf: net.link.lagg.default_use_flowid="1" 20180102: The SW_WATCHDOG option is no longer necessary to enable the hardclock-based software watchdog if no hardware watchdog is configured. As before, SW_WATCHDOG will cause the software watchdog to be enabled even if a hardware watchdog is configured. 20171215: r326887 fixes the issue described in the 20171214 UPDATING entry. r326888 flips the switch back to building GELI support always. 20171214: r362593 broke ZFS + GELI support for reasons unknown. However, it also broke ZFS support generally, so GELI has been turned off by default as the lesser evil in r326857. If you boot off ZFS and/or GELI, it might not be a good time to update. 20171125: PowerPC users must update loader(8) by rebuilding world before installing a new kernel, as the protocol connecting them has changed. Without the update, loader metadata will not be passed successfully to the kernel and users will have to enter their root partition at the kernel mountroot prompt to continue booting. Newer versions of loader can boot old kernels without issue. 20171110: The LOADER_FIREWIRE_SUPPORT build variable as been renamed to WITH/OUT_LOADER_FIREWIRE. LOADER_{NO_,}GELI_SUPPORT has been renamed to WITH/OUT_LOADER_GELI. 20171106: The naive and non-compliant support of posix_fallocate(2) in ZFS has been removed as of r325320. The system call now returns EINVAL when used on a ZFS file. Although the new behavior complies with the standard, some consumers are not prepared to cope with it. One known victim is lld prior to r325420. 20171102: Building in a FreeBSD src checkout will automatically create object directories now rather than store files in the current directory if 'make obj' was not ran. Calling 'make obj' is no longer necessary. This feature can be disabled by setting WITHOUT_AUTO_OBJ=yes in /etc/src-env.conf (not /etc/src.conf), or passing the option in the environment. 20171101: The default MAKEOBJDIR has changed from /usr/obj/ for native builds, and /usr/obj// for cross-builds, to a unified /usr/obj//. This behavior can be changed to the old format by setting WITHOUT_UNIFIED_OBJDIR=yes in /etc/src-env.conf, the environment, or with -DWITHOUT_UNIFIED_OBJDIR when building. The UNIFIED_OBJDIR option is a transitional feature that will be removed for 12.0 release; please migrate to the new format for any tools by looking up the OBJDIR used by 'make -V .OBJDIR' means rather than hardcoding paths. 20171028: The native-xtools target no longer installs the files by default to the OBJDIR. Use the native-xtools-install target with a DESTDIR to install to ${DESTDIR}/${NXTP} where NXTP defaults to /nxb-bin. 20171021: As part of the boot loader infrastructure cleanup, LOADER_*_SUPPORT options are changing from controlling the build if defined / undefined to controlling the build with explicit 'yes' or 'no' values. They will shift to WITH/WITHOUT options to match other options in the system. 20171010: libstand has turned into a private library for sys/boot use only. It is no longer supported as a public interface outside of sys/boot. 20171005: The arm port has split armv6 into armv6 and armv7. armv7 is now a valid TARGET_ARCH/MACHINE_ARCH setting. If you have an armv7 system and are running a kernel from before r324363, you will need to add MACHINE_ARCH=armv7 to 'make buildworld' to do a native build. 20171003: When building multiple kernels using KERNCONF, non-existent KERNCONF files will produce an error and buildkernel will fail. Previously missing KERNCONF files silently failed giving no indication as to why, only to subsequently discover during installkernel that the desired kernel was never built in the first place. 20170912: The default serial number format for CTL LUNs has changed. This will affect users who use /dev/diskid/* device nodes, or whose FibreChannel or iSCSI clients care about their LUNs' serial numbers. Users who require serial number stability should hardcode serial numbers in /etc/ctl.conf . 20170912: For 32-bit arm compiled for hard-float support, soft-floating point binaries now always get their shared libraries from LD_SOFT_LIBRARY_PATH (in the past, this was only used if /usr/libsoft also existed). Only users with a hard-float ld.so, but soft-float everything else should be affected. 20170826: The geli password typed at boot is now hidden. To restore the previous behavior, see geli(8) for configuration options. 20170825: Move PMTUD blackhole counters to TCPSTATS and remove them from bare sysctl values. Minor nit, but requires a rebuild of both world/kernel to complete. 20170814: "make check" behavior (made in ^/head@r295380) has been changed to execute from a limited sandbox, as opposed to executing from ${TESTSDIR}. Behavioral changes: - The "beforecheck" and "aftercheck" targets are now specified. - ${CHECKDIR} (added in commit noted above) has been removed. - Legacy behavior can be enabled by setting WITHOUT_MAKE_CHECK_USE_SANDBOX in src.conf(5) or the environment. If the limited sandbox mode is enabled, "make check" will execute "make distribution", then install, execute the tests, and clean up the sandbox if successful. The "make distribution" and "make install" targets are typically run as root to set appropriate permissions and ownership at installation time. The end-user should set "WITH_INSTALL_AS_USER" in src.conf(5) or the environment if executing "make check" with limited sandbox mode using an unprivileged user. 20170808: Since the switch to GPT disk labels, fsck for UFS/FFS has been unable to automatically find alternate superblocks. As of r322297, the information needed to find alternate superblocks has been moved to the end of the area reserved for the boot block. Filesystems created with a newfs of this vintage or later will create the recovery information. If you have a filesystem created prior to this change and wish to have a recovery block created for your filesystem, you can do so by running fsck in foreground mode (i.e., do not use the -p or -y options). As it starts, fsck will ask ``SAVE DATA TO FIND ALTERNATE SUPERBLOCKS'' to which you should answer yes. 20170728: As of r321665, an NFSv4 server configuration that services Kerberos mounts or clients that do not support the uid/gid in owner/owner_group string capability, must explicitly enable the nfsuserd daemon by adding nfsuserd_enable="YES" to the machine's /etc/rc.conf file. 20170722: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 5.0.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20170701: WITHOUT_RCMDS is now the default. Set WITH_RCMDS if you need the r-commands (rlogin, rsh, etc.) to be built with the base system. 20170625: The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is a very major ABI incompatible change, so users of FreeBSD/powerpc must be careful when performing source upgrades. It is best to run 'make installworld' from an alternate root system, either a live CD/memory stick, or a temporary root partition. Additionally, all ports must be recompiled. powerpc64 is largely unaffected, except in the case of 32-bit compatibility. All 32-bit binaries will be affected. 20170623: Forward compatibility for the "ino64" project have been committed. This will allow most new binaries to run on older kernels in a limited fashion. This prevents many of the common foot-shooting actions in the upgrade as well as the limited ability to roll back the kernel across the ino64 upgrade. Complicated use cases may not work properly, though enough simpler ones work to allow recovery in most situations. 20170620: Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC if you require the GPL compiler. 20170618: The internal ABI used for communication between the NFS kernel modules was changed by r320085, so __FreeBSD_version was bumped to ensure all the NFS related modules are updated together. 20170617: The ABI of struct event was changed by extending the data member to 64bit and adding ext fields. For upgrade, same precautions as for the entry 20170523 "ino64" must be followed. 20170531: The GNU roff toolchain has been removed from base. To render manpages which are not supported by mandoc(1), man(1) can fallback on GNU roff from ports (and recommends to install it). To render roff(7) documents, consider using GNU roff from ports or the heirloom doctools roff toolchain from ports via pkg install groff or via pkg install heirloom-doctools. 20170524: The ath(4) and ath_hal(4) modules now build piecemeal to allow for smaller runtime footprint builds. This is useful for embedded systems which only require one chipset support. If you load it as a module, make sure this is in /boot/loader.conf: if_ath_load="YES" This will load the HAL, all chip/RF backends and if_ath_pci. If you have if_ath_pci in /boot/loader.conf, ensure it is after if_ath or it will not load any HAL chipset support. If you want to selectively load things (eg on ye cheape ARM/MIPS platforms where RAM is at a premium) you should: * load ath_hal * load the chip modules in question * load ath_rate, ath_dfs * load ath_main * load if_ath_pci and/or if_ath_ahb depending upon your particular bus bind type - this is where probe/attach is done. For further comments/feedback, poke adrian@ . 20170523: The "ino64" 64-bit inode project has been committed, which extends a number of types to 64 bits. Upgrading in place requires care and adherence to the documented upgrade procedure. If using a custom kernel configuration ensure that the COMPAT_FREEBSD11 option is included (as during the upgrade the system will be running the ino64 kernel with the existing world). For the safest in-place upgrade begin by removing previous build artifacts via "rm -rf /usr/obj/*". Then, carefully follow the full procedure documented below under the heading "To rebuild everything and install it on the current system." Specifically, a reboot is required after installing the new kernel before installing world. While an installworld normally works by accident from multiuser after rebooting the proper kernel, there are many cases where this will fail across this upgrade and installworld from single user is required. 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and patm(4) devices has been removed. Consumers should plan a migration before the end-of-life date for FreeBSD 11. 20170420: GNU diff has been replaced by a BSD licensed diff. Some features of GNU diff has not been implemented, if those are needed a newer version of GNU diff is available via the diffutils package under the gdiff name. 20170413: As of r316810 for ipfilter, keep frags is no longer assumed when keep state is specified in a rule. r316810 aligns ipfilter with documentation in man pages separating keep frags from keep state. This allows keep state to be specified without forcing keep frags and allows keep frags to be specified independently of keep state. To maintain previous behaviour, also specify keep frags with keep state (as documented in ipf.conf.5). 20170407: arm64 builds now use the base system LLD 4.0.0 linker by default, instead of requiring that the aarch64-binutils port or package be installed. To continue using aarch64-binutils, set CROSS_BINUTILS_PREFIX=/usr/local/aarch64-freebsd/bin . 20170405: The UDP optimization in entry 20160818 that added the sysctl net.inet.udp.require_l2_bcast has been reverted. L2 broadcast packets will no longer be treated as L3 broadcast packets. 20170331: Binds and sends to the loopback addresses, IPv6 and IPv4, will now use any explicitly assigned loopback address available in the jail instead of using the first assigned address of the jail. 20170329: The ctl.ko module no longer implements the iSCSI target frontend: cfiscsi.ko does instead. If building cfiscsi.ko as a kernel module, the module can be loaded via one of the following methods: - `cfiscsi_load="YES"` in loader.conf(5). - Add `cfiscsi` to `$kld_list` in rc.conf(5). - ctladm(8)/ctld(8), when compiled with iSCSI support (`WITH_ISCSI=yes` in src.conf(5)) Please see cfiscsi(4) for more details. 20170316: The mmcsd.ko module now additionally depends on geom_flashmap.ko. Also, mmc.ko and mmcsd.ko need to be a matching pair built from the same source (previously, the dependency of mmcsd.ko on mmc.ko was missing, but mmcsd.ko now will refuse to load if it is incompatible with mmc.ko). 20170315: The syntax of ipfw(8) named states was changed to avoid ambiguity. If you have used named states in the firewall rules, you need to modify them after installworld and before rebooting. Now named states must be prefixed with colon. 20170311: The old drm (sys/dev/drm/) drivers for i915 and radeon have been removed as the userland we provide cannot use them. The KMS version (sys/dev/drm2) supports the same hardware. 20170302: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 4.0.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20170221: The code that provides support for ZFS .zfs/ directory functionality has been reimplemented. It's not possible now to create a snapshot by mkdir under .zfs/snapshot/. That should be the only user visible change. 20170216: EISA bus support has been removed. The WITH_EISA option is no longer valid. 20170215: MCA bus support has been removed. 20170127: The WITH_LLD_AS_LD / WITHOUT_LLD_AS_LD build knobs have been renamed WITH_LLD_IS_LD / WITHOUT_LLD_IS_LD, for consistency with CLANG_IS_CC. 20170112: The EM_MULTIQUEUE kernel configuration option is deprecated now that the em(4) driver conforms to iflib specifications. 20170109: The igb(4), em(4) and lem(4) ethernet drivers are now implemented via IFLIB. If you have a custom kernel configuration that excludes em(4) but you use igb(4), you need to re-add em(4) to your custom configuration. 20161217: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20161124: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20161119: The layout of the pmap structure has changed for powerpc to put the pmap statistics at the front for all CPU variations. libkvm(3) and all tools that link against it need to be recompiled. 20161030: isl(4) and cyapa(4) drivers now require a new driver, chromebook_platform(4), to work properly on Chromebook-class hardware. On other types of hardware the drivers may need to be configured using device hints. Please see the corresponding manual pages for details. 20161017: The urtwn(4) driver was merged into rtwn(4) and now consists of rtwn(4) main module + rtwn_usb(4) and rtwn_pci(4) bus-specific parts. Also, firmware for RTL8188CE was renamed due to possible name conflict (rtwnrtl8192cU(B) -> rtwnrtl8192cE(B)) 20161015: GNU rcs has been removed from base. It is available as packages: - rcs: Latest GPLv3 GNU rcs version. - rcs57: Copy of the latest version of GNU rcs (GPLv2) before it was removed from base. 20161008: Use of the cc_cdg, cc_chd, cc_hd, or cc_vegas congestion control modules now requires that the kernel configuration contain the TCP_HHOOK option. (This option is included in the GENERIC kernel.) 20161003: The WITHOUT_ELFCOPY_AS_OBJCOPY src.conf(5) knob has been retired. ELF Tool Chain's elfcopy is always installed as /usr/bin/objcopy. 20160924: Relocatable object files with the extension of .So have been renamed to use an extension of .pico instead. The purpose of this change is to avoid a name clash with shared libraries on case-insensitive file systems. On those file systems, foo.So is the same file as foo.so. 20160918: GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. Otherwise, GNU rcs is available from packages: - rcs: Latest GPLv3 GNU rcs version. - rcs57: Copy of the latest version of GNU rcs (GPLv2) from base. 20160918: The backup_uses_rcs functionality has been removed from rc.subr. 20160908: The queue(3) debugging macro, QUEUE_MACRO_DEBUG, has been split into two separate components, QUEUE_MACRO_DEBUG_TRACE and QUEUE_MACRO_DEBUG_TRASH. Define both for the original QUEUE_MACRO_DEBUG behavior. 20160824: r304787 changed some ioctl interfaces between the iSCSI userspace programs and the kernel. ctladm, ctld, iscsictl, and iscsid must be rebuilt to work with new kernels. __FreeBSD_version has been bumped to 1200005. 20160818: The UDP receive code has been updated to only treat incoming UDP packets that were addressed to an L2 broadcast address as L3 broadcast packets. It is not expected that this will affect any standards-conforming UDP application. The new behaviour can be disabled by setting the sysctl net.inet.udp.require_l2_bcast to 0. 20160818: Remove the openbsd_poll system call. __FreeBSD_version has been bumped because of this. 20160708: The stable/11 branch has been created from head@r302406. 20160622: The libc stub for the pipe(2) system call has been replaced with a wrapper that calls the pipe2(2) system call and the pipe(2) system call is now only implemented by the kernels that include "options COMPAT_FREEBSD10" in their config file (this is the default). Users should ensure that this option is enabled in their kernel or upgrade userspace to r302092 before upgrading their kernel. 20160527: CAM will now strip leading spaces from SCSI disks' serial numbers. This will affect users who create UFS filesystems on SCSI disks using those disk's diskid device nodes. For example, if /etc/fstab previously contained a line like "/dev/diskid/DISK-%20%20%20%20%20%20%20ABCDEFG0123456", you should change it to "/dev/diskid/DISK-ABCDEFG0123456". Users of geom transforms like gmirror may also be affected. ZFS users should generally be fine. 20160523: The bitstring(3) API has been updated with new functionality and improved performance. But it is binary-incompatible with the old API. Objects built with the new headers may not be linked against objects built with the old headers. 20160520: The brk and sbrk functions have been removed from libc on arm64. Binutils from ports has been updated to not link to these functions and should be updated to the latest version before installing a new libc. 20160517: The armv6 port now defaults to hard float ABI. Limited support for running both hardfloat and soft float on the same system is available using the libraries installed with -DWITH_LIBSOFT. This has only been tested as an upgrade path for installworld and packages may fail or need manual intervention to run. New packages will be needed. To update an existing self-hosted armv6hf system, you must add TARGET_ARCH=armv6 on the make command line for both the build and the install steps. 20160510: Kernel modules compiled outside of a kernel build now default to installing to /boot/modules instead of /boot/kernel. Many kernel modules built this way (such as those in ports) already overrode KMODDIR explicitly to install into /boot/modules. However, manually building and installing a module from /sys/modules will now install to /boot/modules instead of /boot/kernel. 20160414: The CAM I/O scheduler has been committed to the kernel. There should be no user visible impact. This does enable NCQ Trim on ada SSDs. While the list of known rogues that claim support for this but actually corrupt data is believed to be complete, be on the lookout for data corruption. The known rogue list is believed to be complete: o Crucial MX100, M550 drives with MU01 firmware. o Micron M510 and M550 drives with MU01 firmware. o Micron M500 prior to MU07 firmware o Samsung 830, 840, and 850 all firmwares o FCCT M500 all firmwares Crucial has firmware http://www.crucial.com/usa/en/support-ssd-firmware with working NCQ TRIM. For Micron branded drives, see your sales rep for updated firmware. Black listed drives will work correctly because these drives work correctly so long as no NCQ TRIMs are sent to them. Given this list is the same as found in Linux, it's believed there are no other rogues in the market place. All other models from the above vendors work. To be safe, if you are at all concerned, you can quirk each of your drives to prevent NCQ from being sent by setting: kern.cam.ada.X.quirks="0x2" in loader.conf. If the drive requires the 4k sector quirk, set the quirks entry to 0x3. 20160330: The FAST_DEPEND build option has been removed and its functionality is now the one true way. The old mkdep(1) style of 'make depend' has been removed. See 20160311 for further details. 20160317: Resource range types have grown from unsigned long to uintmax_t. All drivers, and anything using libdevinfo, need to be recompiled. 20160311: WITH_FAST_DEPEND is now enabled by default for in-tree and out-of-tree builds. It no longer runs mkdep(1) during 'make depend', and the 'make depend' stage can safely be skipped now as it is auto ran when building 'make all' and will generate all SRCS and DPSRCS before building anything else. Dependencies are gathered at compile time with -MF flags kept in separate .depend files per object file. Users should run 'make cleandepend' once if using -DNO_CLEAN to clean out older stale .depend files. 20160306: On amd64, clang 3.8.0 can now insert sections of type AMD64_UNWIND into kernel modules. Therefore, if you load any kernel modules at boot time, please install the boot loaders after you install the kernel, but before rebooting, e.g.: make buildworld make buildkernel KERNCONF=YOUR_KERNEL_HERE make installkernel KERNCONF=YOUR_KERNEL_HERE make -C sys/boot install Then follow the usual steps, described in the General Notes section, below. 20160305: Clang, llvm, lldb and compiler-rt have been upgraded to 3.8.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20160301: The AIO subsystem is now a standard part of the kernel. The VFS_AIO kernel option and aio.ko kernel module have been removed. Due to stability concerns, asynchronous I/O requests are only permitted on sockets and raw disks by default. To enable asynchronous I/O requests on all file types, set the vfs.aio.enable_unsafe sysctl to a non-zero value. 20160226: The ELF object manipulation tool objcopy is now provided by the ELF Tool Chain project rather than by GNU binutils. It should be a drop-in replacement, with the addition of arm64 support. The (temporary) src.conf knob WITHOUT_ELFCOPY_AS_OBJCOPY knob may be set to obtain the GNU version if necessary. 20160129: Building ZFS pools on top of zvols is prohibited by default. That feature has never worked safely; it's always been prone to deadlocks. Using a zvol as the backing store for a VM guest's virtual disk will still work, even if the guest is using ZFS. Legacy behavior can be restored by setting vfs.zfs.vol.recursive=1. 20160119: The NONE and HPN patches has been removed from OpenSSH. They are still available in the security/openssh-portable port. 20160113: With the addition of ypldap(8), a new _ypldap user is now required during installworld. "mergemaster -p" can be used to add the user prior to installworld, as documented in the handbook. 20151216: The tftp loader (pxeboot) now uses the option root-path directive. As a consequence it no longer looks for a pxeboot.4th file on the tftp server. Instead it uses the regular /boot infrastructure as with the other loaders. 20151211: The code to start recording plug and play data into the modules has been committed. While the old tools will properly build a new kernel, a number of warnings about "unknown metadata record 4" will be produced for an older kldxref. To avoid such warnings, make sure to rebuild the kernel toolchain (or world). Make sure that you have r292078 or later when trying to build 292077 or later before rebuilding. 20151207: Debug data files are now built by default with 'make buildworld' and installed with 'make installworld'. This facilitates debugging but requires more disk space both during the build and for the installed world. Debug files may be disabled by setting WITHOUT_DEBUG_FILES=yes in src.conf(5). 20151130: r291527 changed the internal interface between the nfsd.ko and nfscommon.ko modules. As such, they must both be upgraded to-gether. __FreeBSD_version has been bumped because of this. 20151108: Add support for unicode collation strings leads to a change of order of files listed by ls(1) for example. To get back to the old behaviour, set LC_COLLATE environment variable to "C". Databases administrators will need to reindex their databases given collation results will be different. Due to a bug in install(1) it is recommended to remove the ancient locales before running make installworld. rm -rf /usr/share/locale/* 20151030: The OpenSSL has been upgraded to 1.0.2d. Any binaries requiring libcrypto.so.7 or libssl.so.7 must be recompiled. 20151020: Qlogic 24xx/25xx firmware images were updated from 5.5.0 to 7.3.0. Kernel modules isp_2400_multi and isp_2500_multi were removed and should be replaced with isp_2400 and isp_2500 modules respectively. 20151017: The build previously allowed using 'make -n' to not recurse into sub-directories while showing what commands would be executed, and 'make -n -n' to recursively show commands. Now 'make -n' will recurse and 'make -N' will not. 20151012: If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster and etcupdate will now use this file. A custom sendmail.cf is now updated via this mechanism rather than via installworld. If you had excluded sendmail.cf in mergemaster.rc or etcupdate.conf, you may want to remove the exclusion or change it to "always install". /etc/mail/sendmail.cf is now managed the same way regardless of whether SENDMAIL_MC/SENDMAIL_CF is used. If you are not using SENDMAIL_MC/SENDMAIL_CF there should be no change in behavior. 20151011: Compatibility shims for legacy ATA device names have been removed. It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.* environment variables, /dev/ad* and /dev/ar* symbolic links. 20151006: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. 20150924: Kernel debug files have been moved to /usr/lib/debug/boot/kernel/, and renamed from .symbols to .debug. This reduces the size requirements on the boot partition or file system and provides consistency with userland debug files. When using the supported kernel installation method the /usr/lib/debug/boot/kernel directory will be renamed (to kernel.old) as is done with /boot/kernel. Developers wishing to maintain the historical behavior of installing debug files in /boot/kernel/ can set KERN_DEBUGDIR="" in src.conf(5). 20150827: The wireless drivers had undergone changes that remove the 'parent interface' from the ifconfig -l output. The rc.d network scripts used to check presence of a parent interface in the list, so old scripts would fail to start wireless networking. Thus, etcupdate(3) or mergemaster(8) run is required after kernel update, to update your rc.d scripts in /etc. 20150827: pf no longer supports 'scrub fragment crop' or 'scrub fragment drop-ovl' These configurations are now automatically interpreted as 'scrub fragment reassemble'. 20150817: Kernel-loadable modules for the random(4) device are back. To use them, the kernel must have device random options RANDOM_LOADABLE kldload(8) can then be used to load random_fortuna.ko or random_yarrow.ko. Please note that due to the indirect function calls that the loadable modules need to provide, the build-in variants will be slightly more efficient. The random(4) kernel option RANDOM_DUMMY has been retired due to unpopularity. It was not all that useful anyway. 20150813: The WITHOUT_ELFTOOLCHAIN_TOOLS src.conf(5) knob has been retired. Control over building the ELF Tool Chain tools is now provided by the WITHOUT_TOOLCHAIN knob. 20150810: The polarity of Pulse Per Second (PPS) capture events with the uart(4) driver has been corrected. Prior to this change the PPS "assert" event corresponded to the trailing edge of a positive PPS pulse and the "clear" event was the leading edge of the next pulse. As the width of a PPS pulse in a typical GPS receiver is on the order of 1 millisecond, most users will not notice any significant difference with this change. Anyone who has compensated for the historical polarity reversal by configuring a negative offset equal to the pulse width will need to remove that workaround. 20150809: The default group assigned to /dev/dri entries has been changed from 'wheel' to 'video' with the id of '44'. If you want to have access to the dri devices please add yourself to the video group with: # pw groupmod video -m $USER 20150806: The menu.rc and loader.rc files will now be replaced during upgrades. Please migrate local changes to menu.rc.local and loader.rc.local instead. 20150805: GNU Binutils versions of addr2line, c++filt, nm, readelf, size, strings and strip have been removed. The src.conf(5) knob WITHOUT_ELFTOOLCHAIN_TOOLS no longer provides the binutils tools. 20150728: As ZFS requires more kernel stack pages than is the default on some architectures e.g. i386, it now warns if KSTACK_PAGES is less than ZFS_MIN_KSTACK_PAGES (which is 4 at the time of writing). Please consider using 'options KSTACK_PAGES=X' where X is greater than or equal to ZFS_MIN_KSTACK_PAGES i.e. 4 in such configurations. 20150706: sendmail has been updated to 8.15.2. Starting with FreeBSD 11.0 and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by default, i.e., they will not contain "::". For example, instead of ::1, it will be 0:0:0:0:0:0:0:1. This permits a zero subnet to have a more specific match, such as different map entries for IPv6:0:0 vs IPv6:0. This change requires that configuration data (including maps, files, classes, custom ruleset, etc.) must use the same format, so make certain such configuration data is upgrading. As a very simple check search for patterns like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. To return to the old behavior, set the m4 option confUSE_COMPRESSED_IPV6_ADDRESSES or the cf option UseCompressedIPv6Addresses. 20150630: The default kernel entropy-processing algorithm is now Fortuna, replacing Yarrow. Assuming you have 'device random' in your kernel config file, the configurations allow a kernel option to override this default. You may choose *ONE* of: options RANDOM_YARROW # Legacy /dev/random algorithm. options RANDOM_DUMMY # Blocking-only driver. If you have neither, you get Fortuna. For most people, read no further, Fortuna will give a /dev/random that works like it always used to, and the difference will be irrelevant. If you remove 'device random', you get *NO* kernel-processed entropy at all. This may be acceptable to folks building embedded systems, but has complications. Carry on reading, and it is assumed you know what you need. *PLEASE* read random(4) and random(9) if you are in the habit of tweaking kernel configs, and/or if you are a member of the embedded community, wanting specific and not-usual behaviour from your security subsystems. NOTE!! If you use RANDOM_DUMMY and/or have no 'device random', you will NOT have a functioning /dev/random, and many cryptographic features will not work, including SSH. You may also find strange behaviour from the random(3) set of library functions, in particular sranddev(3), srandomdev(3) and arc4random(3). The reason for this is that the KERN_ARND sysctl only returns entropy if it thinks it has some to share, and with RANDOM_DUMMY or no 'device random' this will never happen. 20150623: An additional fix for the issue described in the 20150614 sendmail entry below has been committed in revision 284717. 20150616: FreeBSD's old make (fmake) has been removed from the system. It is available as the devel/fmake port or via pkg install fmake. 20150615: The fix for the issue described in the 20150614 sendmail entry below has been committed in revision 284436. The work around described in that entry is no longer needed unless the default setting is overridden by a confDH_PARAMETERS configuration setting of '5' or pointing to a 512 bit DH parameter file. 20150614: ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf and devel/kyua to version 0.20+ and adjust any calling code to work with Kyuafile and kyua. 20150614: The import of openssl to address the FreeBSD-SA-15:10.openssl security advisory includes a change which rejects handshakes with DH parameters below 768 bits. sendmail releases prior to 8.15.2 (not yet released), defaulted to a 512 bit DH parameter setting for client connections. To work around this interoperability, sendmail can be configured to use a 2048 bit DH parameter by: 1. Edit /etc/mail/`hostname`.mc 2. If a setting for confDH_PARAMETERS does not exist or exists and is set to a string beginning with '5', replace it with '2'. 3. If a setting for confDH_PARAMETERS exists and is set to a file path, create a new file with: openssl dhparam -out /path/to/file 2048 4. Rebuild the .cf file: cd /etc/mail/; make; make install 5. Restart sendmail: cd /etc/mail/; make restart A sendmail patch is coming, at which time this file will be updated. 20150604: Generation of legacy formatted entries have been disabled by default in pwd_mkdb(8), as all base system consumers of the legacy formatted entries were converted to use the new format by default when the new, machine independent format have been added and supported since FreeBSD 5.x. Please see the pwd_mkdb(8) manual page for further details. 20150525: Clang and llvm have been upgraded to 3.6.1 release. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using 3.5.0 or higher. 20150521: TI platform code switched to using vendor DTS files and this update may break existing systems running on Beaglebone, Beaglebone Black, and Pandaboard: - dtb files should be regenerated/reinstalled. Filenames are the same but content is different now - GPIO addressing was changed, now each GPIO bank (32 pins per bank) has its own /dev/gpiocX device, e.g. pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25 on /dev/gpioc3. - Pandaboard: /etc/ttys should be updated, serial console device is now /dev/ttyu2, not /dev/ttyu0 20150501: soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soelim. If you need the GNU extension from groff soelim(1), install groff from package: pkg install groff, or via ports: textproc/groff. 20150423: chmod, chflags, chown and chgrp now affect symlinks in -R mode as defined in symlink(7); previously symlinks were silently ignored. 20150415: The const qualifier has been removed from iconv(3) to comply with POSIX. The ports tree is aware of this from r384038 onwards. 20150416: Libraries specified by LIBADD in Makefiles must have a corresponding DPADD_ variable to ensure correct dependencies. This is now enforced in src.libnames.mk. 20150324: From legacy ata(4) driver was removed support for SATA controllers supported by more functional drivers ahci(4), siis(4) and mvs(4). Kernel modules ataahci and ataadaptec were removed completely, replaced by ahci and mvs modules respectively. 20150315: Clang, llvm and lldb have been upgraded to 3.6.0 release. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using 3.5.0 or higher. 20150307: The 32-bit PowerPC kernel has been changed to a position-independent executable. This can only be booted with a version of loader(8) newer than January 31, 2015, so make sure to update both world and kernel before rebooting. 20150217: If you are running a -CURRENT kernel since r273872 (Oct 30th, 2014), but before r278950, the RNG was not seeded properly. Immediately upgrade the kernel to r278950 or later and regenerate any keys (e.g. ssh keys or openssl keys) that were generated w/ a kernel from that range. This does not affect programs that directly used /dev/random or /dev/urandom. All userland uses of arc4random(3) are affected. 20150210: The autofs(4) ABI was changed in order to restore binary compatibility with 10.1-RELEASE. The automountd(8) daemon needs to be rebuilt to work with the new kernel. 20150131: The powerpc64 kernel has been changed to a position-independent executable. This can only be booted with a new version of loader(8), so make sure to update both world and kernel before rebooting. 20150118: Clang and llvm have been upgraded to 3.5.1 release. This is a bugfix only release, no new features have been added. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using 3.5.0. 20150107: ELF tools addr2line, elfcopy (strip), nm, size, and strings are now taken from the ELF Tool Chain project rather than GNU binutils. They should be drop-in replacements, with the addition of arm64 support. The WITHOUT_ELFTOOLCHAIN_TOOLS= knob may be used to obtain the binutils tools, if necessary. See 20150805 for updated information. 20150105: The default Unbound configuration now enables remote control using a local socket. Users who have already enabled the local_unbound service should regenerate their configuration by running "service local_unbound setup" as root. 20150102: The GNU texinfo and GNU info pages have been removed. To be able to view GNU info pages please install texinfo from ports. 20141231: Clang, llvm and lldb have been upgraded to 3.5.0 release. As of this release, a prerequisite for building clang, llvm and lldb is a C++11 capable compiler and C++11 standard library. This means that to be able to successfully build the cross-tools stage of buildworld, with clang as the bootstrap compiler, your system compiler or cross compiler should either be clang 3.3 or later, or gcc 4.8 or later, and your system C++ library should be libc++, or libdstdc++ from gcc 4.8 or later. On any standard FreeBSD 10.x or 11.x installation, where clang and libc++ are on by default (that is, on x86 or arm), this should work out of the box. On 9.x installations where clang is enabled by default, e.g. on x86 and powerpc, libc++ will not be enabled by default, so libc++ should be built (with clang) and installed first. If both clang and libc++ are missing, build clang first, then use it to build libc++. On 8.x and earlier installations, upgrade to 9.x first, and then follow the instructions for 9.x above. Sparc64 and mips users are unaffected, as they still use gcc 4.2.1 by default, and do not build clang. Many embedded systems are resource constrained, and will not be able to build clang in a reasonable time, or in some cases at all. In those cases, cross building bootable systems on amd64 is a workaround. This new version of clang introduces a number of new warnings, of which the following are most likely to appear: -Wabsolute-value This warns in two cases, for both C and C++: * When the code is trying to take the absolute value of an unsigned quantity, which is effectively a no-op, and almost never what was intended. The code should be fixed, if at all possible. If you are sure that the unsigned quantity can be safely cast to signed, without loss of information or undefined behavior, you can add an explicit cast, or disable the warning. * When the code is trying to take an absolute value, but the called abs() variant is for the wrong type, which can lead to truncation. If you want to disable the warning instead of fixing the code, please make sure that truncation will not occur, or it might lead to unwanted side-effects. -Wtautological-undefined-compare and -Wundefined-bool-conversion These warn when C++ code is trying to compare 'this' against NULL, while 'this' should never be NULL in well-defined C++ code. However, there is some legacy (pre C++11) code out there, which actively abuses this feature, which was less strictly defined in previous C++ versions. Squid and openjdk do this, for example. The warning can be turned off for C++98 and earlier, but compiling the code in C++11 mode might result in unexpected behavior; for example, the parts of the program that are unreachable could be optimized away. 20141222: The old NFS client and server (kernel options NFSCLIENT, NFSSERVER) kernel sources have been removed. The .h files remain, since some utilities include them. This will need to be fixed later. If "mount -t oldnfs ..." is attempted, it will fail. If the "-o" option on mountd(8), nfsd(8) or nfsstat(1) is used, the utilities will report errors. 20141121: The handling of LOCAL_LIB_DIRS has been altered to skip addition of directories to top level SUBDIR variable when their parent directory is included in LOCAL_DIRS. Users with build systems with such hierarchies and without SUBDIR entries in the parent directory Makefiles should add them or add the directories to LOCAL_DIRS. 20141109: faith(4) and faithd(8) have been removed from the base system. Faith has been obsolete for a very long time. 20141104: vt(4), the new console driver, is enabled by default. It brings support for Unicode and double-width characters, as well as support for UEFI and integration with the KMS kernel video drivers. You may need to update your console settings in /etc/rc.conf, most probably the keymap. During boot, /etc/rc.d/syscons will indicate what you need to do. vt(4) still has issues and lacks some features compared to syscons(4). See the wiki for up-to-date information: https://wiki.freebsd.org/Newcons If you want to keep using syscons(4), you can do so by adding the following line to /boot/loader.conf: kern.vty=sc 20141102: pjdfstest has been integrated into kyua as an opt-in test suite. Please see share/doc/pjdfstest/README for more details on how to execute it. 20141009: gperf has been removed from the base system for architectures that use clang. Ports that require gperf will obtain it from the devel/gperf port. 20140923: pjdfstest has been moved from tools/regression/pjdfstest to contrib/pjdfstest . 20140922: At svn r271982, The default linux compat kernel ABI has been adjusted to 2.6.18 in support of the linux-c6 compat ports infrastructure update. If you wish to continue using the linux-f10 compat ports, add compat.linux.osrelease=2.6.16 to your local sysctl.conf. Users are encouraged to update their linux-compat packages to linux-c6 during their next update cycle. 20140729: The ofwfb driver, used to provide a graphics console on PowerPC when using vt(4), no longer allows mmap() of all physical memory. This will prevent Xorg on PowerPC with some ATI graphics cards from initializing properly unless x11-servers/xorg-server is updated to 1.12.4_8 or newer. 20140723: The xdev targets have been converted to using TARGET and TARGET_ARCH instead of XDEV and XDEV_ARCH. 20140719: The default unbound configuration has been modified to address issues with reverse lookups on networks that use private address ranges. If you use the local_unbound service, run "service local_unbound setup" as root to regenerate your configuration, then "service local_unbound reload" to load the new configuration. 20140709: The GNU texinfo and GNU info pages are not built and installed anymore, WITH_INFO knob has been added to allow to built and install them again. UPDATE: see 20150102 entry on texinfo's removal 20140708: The GNU readline library is now an INTERNALLIB - that is, it is statically linked into consumers (GDB and variants) in the base system, and the shared library is no longer installed. The devel/readline port is available for third party software that requires readline. 20140702: The Itanium architecture (ia64) has been removed from the list of known architectures. This is the first step in the removal of the architecture. 20140701: Commit r268115 has added NFSv4.1 server support, merged from projects/nfsv4.1-server. Since this includes changes to the internal interfaces between the NFS related modules, a full build of the kernel and modules will be necessary. __FreeBSD_version has been bumped. 20140629: The WITHOUT_VT_SUPPORT kernel config knob has been renamed WITHOUT_VT. (The other _SUPPORT knobs have a consistent meaning which differs from the behaviour controlled by this knob.) 20140619: Maximal length of the serial number in CTL was increased from 16 to 64 chars, that breaks ABI. All CTL-related tools, such as ctladm and ctld, need to be rebuilt to work with a new kernel. 20140606: The libatf-c and libatf-c++ major versions were downgraded to 0 and 1 respectively to match the upstream numbers. They were out of sync because, when they were originally added to FreeBSD, the upstream versions were not respected. These libraries are private and not yet built by default, so renumbering them should be a non-issue. However, unclean source trees will yield broken test programs once the operator executes "make delete-old-libs" after a "make installworld". Additionally, the atf-sh binary was made private by moving it into /usr/libexec/. Already-built shell test programs will keep the path to the old binary so they will break after "make delete-old" is run. If you are using WITH_TESTS=yes (not the default), wipe the object tree and rebuild from scratch to prevent spurious test failures. This is only needed once: the misnumbered libraries and misplaced binaries have been added to OptionalObsoleteFiles.inc so they will be removed during a clean upgrade. 20140512: Clang and llvm have been upgraded to 3.4.1 release. 20140508: We bogusly installed src.opts.mk in /usr/share/mk. This file should be removed to avoid issues in the future (and has been added to ObsoleteFiles.inc). 20140505: /etc/src.conf now affects only builds of the FreeBSD src tree. In the past, it affected all builds that used the bsd.*.mk files. The old behavior was a bug, but people may have relied upon it. To get this behavior back, you can .include /etc/src.conf from /etc/make.conf (which is still global and isn't changed). This also changes the behavior of incremental builds inside the tree of individual directories. Set MAKESYSPATH to ".../share/mk" to do that. Although this has survived make universe and some upgrade scenarios, other upgrade scenarios may have broken. At least one form of temporary breakage was fixed with MAKESYSPATH settings for buildworld as well... In cases where MAKESYSPATH isn't working with this setting, you'll need to set it to the full path to your tree. One side effect of all this cleaning up is that bsd.compiler.mk is no longer implicitly included by bsd.own.mk. If you wish to use COMPILER_TYPE, you must now explicitly include bsd.compiler.mk as well. 20140430: The lindev device has been removed since /dev/full has been made a standard device. __FreeBSD_version has been bumped. 20140424: The knob WITHOUT_VI was added to the base system, which controls building ex(1), vi(1), etc. Older releases of FreeBSD required ex(1) in order to reorder files share/termcap and didn't build ex(1) as a build tool, so building/installing with WITH_VI is highly advised for build hosts for older releases. This issue has been fixed in stable/9 and stable/10 in r277022 and r276991, respectively. 20140418: The YES_HESIOD knob has been removed. It has been obsolete for a decade. Please move to using WITH_HESIOD instead or your builds will silently lack HESIOD. 20140405: The uart(4) driver has been changed with respect to its handling of the low-level console. Previously the uart(4) driver prevented any process from changing the baudrate or the CLOCAL and HUPCL control flags. By removing the restrictions, operators can make changes to the serial console port without having to reboot. However, when getty(8) is started on the serial device that is associated with the low-level console, a misconfigured terminal line in /etc/ttys will now have a real impact. Before upgrading the kernel, make sure that /etc/ttys has the serial console device configured as 3wire without baudrate to preserve the previous behaviour. E.g: ttyu0 "/usr/libexec/getty 3wire" vt100 on secure 20140306: Support for libwrap (TCP wrappers) in rpcbind was disabled by default to improve performance. To re-enable it, if needed, run rpcbind with command line option -W. 20140226: Switched back to the GPL dtc compiler due to updates in the upstream dts files not being supported by the BSDL dtc compiler. You will need to rebuild your kernel toolchain to pick up the new compiler. Core dumps may result while building dtb files during a kernel build if you fail to do so. Set WITHOUT_GPL_DTC if you require the BSDL compiler. 20140216: Clang and llvm have been upgraded to 3.4 release. 20140216: The nve(4) driver has been removed. Please use the nfe(4) driver for NVIDIA nForce MCP Ethernet adapters instead. 20140212: An ABI incompatibility crept into the libc++ 3.4 import in r261283. This could cause certain C++ applications using shared libraries built against the previous version of libc++ to crash. The incompatibility has now been fixed, but any C++ applications or shared libraries built between r261283 and r261801 should be recompiled. 20140204: OpenSSH will now ignore errors caused by kernel lacking of Capsicum capability mode support. Please note that enabling the feature in kernel is still highly recommended. 20140131: OpenSSH is now built with sandbox support, and will use sandbox as the default privilege separation method. This requires Capsicum capability mode support in kernel. 20140128: The libelf and libdwarf libraries have been updated to newer versions from upstream. Shared library version numbers for these two libraries were bumped. Any ports or binaries requiring these two libraries should be recompiled. __FreeBSD_version is bumped to 1100006. 20140110: If a Makefile in a tests/ directory was auto-generating a Kyuafile instead of providing an explicit one, this would prevent such Makefile from providing its own Kyuafile in the future during NO_CLEAN builds. This has been fixed in the Makefiles but manual intervention is needed to clean an objdir if you use NO_CLEAN: # find /usr/obj -name Kyuafile | xargs rm -f 20131213: The behavior of gss_pseudo_random() for the krb5 mechanism has changed, for applications requesting a longer random string than produced by the underlying enctype's pseudo-random() function. In particular, the random string produced from a session key of enctype aes256-cts-hmac-sha1-96 or aes256-cts-hmac-sha1-96 will be different at the 17th octet and later, after this change. The counter used in the PRF+ construction is now encoded as a big-endian integer in accordance with RFC 4402. __FreeBSD_version is bumped to 1100004. 20131108: The WITHOUT_ATF build knob has been removed and its functionality has been subsumed into the more generic WITHOUT_TESTS. If you were using the former to disable the build of the ATF libraries, you should change your settings to use the latter. 20131025: The default version of mtree is nmtree which is obtained from NetBSD. The output is generally the same, but may vary slightly. If you found you need identical output adding "-F freebsd9" to the command line should do the trick. For the time being, the old mtree is available as fmtree. 20131014: libbsdyml has been renamed to libyaml and moved to /usr/lib/private. This will break ports-mgmt/pkg. Rebuild the port, or upgrade to pkg 1.1.4_8 and verify bsdyml not linked in, before running "make delete-old-libs": # make -C /usr/ports/ports-mgmt/pkg build deinstall install clean or # pkg install pkg; ldd /usr/local/sbin/pkg | grep bsdyml 20131010: The stable/10 branch has been created in subversion from head revision r256279. COMMON ITEMS: General Notes ------------- Sometimes, obscure build problems are the result of environment poisoning. This can happen because the make utility reads its environment when searching for values for global variables. To run your build attempts in an "environmental clean room", prefix all make commands with 'env -i '. See the env(1) manual page for more details. Occasionally a build failure will occur with "make -j" due to a race condition. If this happens try building again without -j, and please report a bug if it happens consistently. When upgrading from one major version to another it is generally best to upgrade to the latest code in the currently installed branch first, then do an upgrade to the new branch. This is the best-tested upgrade path, and has the highest probability of being successful. Please try this approach if you encounter problems with a major version upgrade. Since the stable 4.x branch point, one has generally been able to upgrade from anywhere in the most recent stable branch to head / current (or even the last couple of stable branches). See the top of this file when there's an exception. The update process will emit an error on an attempt to perform a build or install from a FreeBSD version below the earliest supported version. When updating from an older version the update should be performed one major release at a time, including running `make delete-old` at each step. When upgrading a live system, having a root shell around before installing anything can help undo problems. Not having a root shell around can lead to problems if pam has changed too much from your starting point to allow continued authentication after the upgrade. This file should be read as a log of events. When a later event changes information of a prior event, the prior event should not be deleted. Instead, a pointer to the entry with the new information should be placed in the old entry. Readers of this file should also sanity check older entries before relying on them blindly. Authors of new entries should write them with this in mind. ZFS notes --------- When upgrading the boot ZFS pool to a new version, always follow these two steps: 1.) recompile and reinstall the ZFS boot loader and boot block (this is part of "make buildworld" and "make installworld") 2.) update the ZFS boot block on your boot drive The following example updates the ZFS boot block on the first partition (freebsd-boot) of a GPT partitioned drive ada0: "gpart bootcode -p /boot/gptzfsboot -i 1 ada0" Non-boot pools do not need these updates. To build a kernel ----------------- If you are updating from a prior version of FreeBSD (even one just a few days old), you should follow this procedure. It is the most failsafe as it uses a /usr/obj tree with a fresh mini-buildworld, make kernel-toolchain make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE To test a kernel once --------------------- If you just want to boot a kernel once (because you are not sure if it works, or if you want to boot a known bad kernel to provide debugging information) run make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel nextboot -k testkernel To rebuild everything and install it on the current system. ----------------------------------------------------------- # Note: sometimes if you are running current you gotta do more than # is listed here if you are upgrading from a really old current. make buildworld make buildkernel KERNCONF=YOUR_KERNEL_HERE make installkernel KERNCONF=YOUR_KERNEL_HERE [1] [3] mergemaster -Fp [5] make installworld mergemaster -Fi [4] make delete-old [6] To cross-install current onto a separate partition -------------------------------------------------- # In this approach we use a separate partition to hold # current's root, 'usr', and 'var' directories. A partition # holding "/", "/usr" and "/var" should be about 2GB in # size. make buildworld make buildkernel KERNCONF=YOUR_KERNEL_HERE make installworld DESTDIR=${CURRENT_ROOT} -DDB_FROM_SRC make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT} cp /etc/fstab ${CURRENT_ROOT}/etc/fstab # if newfs'd To upgrade in-place from stable to current ---------------------------------------------- make buildworld [9] make buildkernel KERNCONF=YOUR_KERNEL_HERE [8] make installkernel KERNCONF=YOUR_KERNEL_HERE [1] [3] mergemaster -Fp [5] make installworld mergemaster -Fi [4] make delete-old [6] Make sure that you've read the UPDATING file to understand the tweaks to various things you need. At this point in the life cycle of current, things change often and you are on your own to cope. The defaults can also change, so please read ALL of the UPDATING entries. Also, if you are tracking -current, you must be subscribed to freebsd-current@freebsd.org. Make sure that before you update your sources that you have read and understood all the recent messages there. If in doubt, please track -stable which has much fewer pitfalls. [1] If you have third party modules, such as vmware, you should disable them at this point so they don't crash your system on reboot. [3] From the bootblocks, boot -s, and then do fsck -p mount -u / mount -a sh /etc/rc.d/zfs start # mount zfs filesystem, if needed cd src # full path to source adjkerntz -i # if CMOS is wall time Also, when doing a major release upgrade, it is required that you boot into single user mode to do the installworld. [4] Note: This step is non-optional. Failure to do this step can result in a significant reduction in the functionality of the system. Attempting to do it by hand is not recommended and those that pursue this avenue should read this file carefully, as well as the archives of freebsd-current and freebsd-hackers mailing lists for potential gotchas. The -U option is also useful to consider. See mergemaster(8) for more information. [5] Usually this step is a no-op. However, from time to time you may need to do this if you get unknown user in the following step. It never hurts to do it all the time. You may need to install a new mergemaster (cd src/usr.sbin/mergemaster && make install) after the buildworld before this step if you last updated from current before 20130425 or from -stable before 20130430. [6] This only deletes old files and directories. Old libraries can be deleted by "make delete-old-libs", but you have to make sure that no program is using those libraries anymore. [8] The new kernel must be able to run existing binaries used by an installworld. When upgrading across major versions, the new kernel's configuration must include the correct COMPAT_FREEBSD option for existing binaries (e.g. COMPAT_FREEBSD11 to run 11.x binaries). Failure to do so may leave you with a system that is hard to boot to recover. A GENERIC kernel will include suitable compatibility options to run binaries from older branches. Note that the ability to run binaries from unsupported branches is not guaranteed. Make sure that you merge any new devices from GENERIC since the last time you updated your kernel config file. Options also change over time, so you may need to adjust your custom kernels for these as well. [9] If CPUTYPE is defined in your /etc/make.conf, make sure to use the "?=" instead of the "=" assignment operator, so that buildworld can override the CPUTYPE if it needs to. MAKEOBJDIRPREFIX must be defined in an environment variable, and not on the command line, or in /etc/make.conf. buildworld will warn if it is improperly defined. FORMAT: This file contains a list, in reverse chronological order, of major breakages in tracking -current. It is not guaranteed to be a complete list of such breakages, and only contains entries since September 23, 2011. If you need to see UPDATING entries from before that date, you will need to fetch an UPDATING file from an older FreeBSD release. Copyright information: Copyright 1998-2009 M. Warner Losh Redistribution, publication, translation and use, with or without modification, in full or in part, in any form or format of this document are permitted without further permission from the author. THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``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 WARNER LOSH 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. Contact Warner Losh if you have any questions about your use of this document. $FreeBSD$ diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 91ca0346b050..71ae02a695f2 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,1027 +1,1025 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ .include MAN= aac.4 \ aacraid.4 \ acpi.4 \ ${_acpi_asus.4} \ ${_acpi_asus_wmi.4} \ ${_acpi_dock.4} \ ${_acpi_fujitsu.4} \ ${_acpi_hp.4} \ ${_acpi_ibm.4} \ ${_acpi_panasonic.4} \ ${_acpi_rapidstart.4} \ ${_acpi_sony.4} \ acpi_thermal.4 \ acpi_battery.4 \ ${_acpi_toshiba.4} \ acpi_video.4 \ ${_acpi_wmi.4} \ ada.4 \ adm6996fc.4 \ ads111x.4 \ ae.4 \ ${_aesni.4} \ age.4 \ agp.4 \ ahc.4 \ ahci.4 \ ahd.4 \ ${_aibs.4} \ aio.4 \ alc.4 \ ale.4 \ alpm.4 \ altera_atse.4 \ altera_avgen.4 \ altera_jtag_uart.4 \ altera_sdcard.4 \ altq.4 \ amdpm.4 \ ${_amdsbwd.4} \ ${_amdsmb.4} \ ${_amdsmn.4} \ ${_amdtemp.4} \ ${_bxe.4} \ amr.4 \ an.4 \ ${_aout.4} \ ${_apic.4} \ arcmsr.4 \ ${_asmc.4} \ at45d.4 \ ata.4 \ ath.4 \ ath_ahb.4 \ ath_hal.4 \ ath_pci.4 \ atkbd.4 \ atkbdc.4 \ atp.4 \ ${_atf_test_case.4} \ ${_atrtc.4} \ ${_attimer.4} \ audit.4 \ auditpipe.4 \ aue.4 \ axe.4 \ axge.4 \ bce.4 \ bcma.4 \ bfe.4 \ bge.4 \ ${_bhyve.4} \ bhnd.4 \ bhnd_chipc.4 \ bhnd_pmu.4 \ bhndb.4 \ bhndb_pci.4 \ - bktr.4 \ blackhole.4 \ bnxt.4 \ bpf.4 \ bridge.4 \ bt.4 \ bwi.4 \ bwn.4 \ ${_bytgpio.4} \ ${_chvgpio.4} \ capsicum.4 \ cardbus.4 \ carp.4 \ cas.4 \ cc_cdg.4 \ cc_chd.4 \ cc_cubic.4 \ cc_dctcp.4 \ cc_hd.4 \ cc_htcp.4 \ cc_newreno.4 \ cc_vegas.4 \ ${_ccd.4} \ ccr.4 \ cd.4 \ cdce.4 \ cdceem.4 \ cfi.4 \ cfumass.4 \ ch.4 \ chromebook_platform.4 \ ciss.4 \ cloudabi.4 \ cmx.4 \ ${_coretemp.4} \ ${_cpuctl.4} \ cpufreq.4 \ crypto.4 \ ctl.4 \ cue.4 \ cxgb.4 \ cxgbe.4 \ cxgbev.4 \ cy.4 \ cyapa.4 \ da.4 \ dc.4 \ dcons.4 \ dcons_crom.4 \ ddb.4 \ devctl.4 \ disc.4 \ divert.4 \ ${_dpms.4} \ ds1307.4 \ ds3231.4 \ ${_dtrace_provs} \ dummynet.4 \ edsc.4 \ ehci.4 \ em.4 \ ena.4 \ enc.4 \ epair.4 \ esp.4 \ est.4 \ et.4 \ etherswitch.4 \ eventtimers.4 \ exca.4 \ e6060sw.4 \ fd.4 \ fdc.4 \ fdt.4 \ fdt_pinctrl.4 \ fdtbus.4 \ ffclock.4 \ filemon.4 \ firewire.4 \ full.4 \ fwe.4 \ fwip.4 \ fwohci.4 \ fxp.4 \ gbde.4 \ gdb.4 \ gem.4 \ geom.4 \ geom_linux_lvm.4 \ geom_map.4 \ geom_uzip.4 \ gif.4 \ gpio.4 \ gpioiic.4 \ gpioled.4 \ gpioths.4 \ gre.4 \ h_ertt.4 \ hifn.4 \ hme.4 \ hpet.4 \ ${_hpt27xx.4} \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptnr.4} \ ${_hptrr.4} \ ${_hv_kvp.4} \ ${_hv_netvsc.4} \ ${_hv_storvsc.4} \ ${_hv_utils.4} \ ${_hv_vmbus.4} \ ${_hv_vss.4} \ hwpmc.4 \ ${_hwpstate_intel.4} \ iavf.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ icmp6.4 \ ida.4 \ if_ipsec.4 \ iflib.4 \ ifmib.4 \ ig4.4 \ igmp.4 \ iic.4 \ iic_gpiomux.4 \ iicbb.4 \ iicbus.4 \ iicmux.4 \ iicsmb.4 \ iir.4 \ ${_imcsmb.4} \ inet.4 \ inet6.4 \ intpm.4 \ intro.4 \ ${_io.4} \ ${_ioat.4} \ ip.4 \ ip6.4 \ ipfirewall.4 \ ipheth.4 \ ${_ipmi.4} \ ips.4 \ ipsec.4 \ ipw.4 \ ipwfw.4 \ isci.4 \ isl.4 \ ismt.4 \ isp.4 \ ispfw.4 \ ${_itwd.4} \ iwi.4 \ iwifw.4 \ iwm.4 \ iwmfw.4 \ iwn.4 \ iwnfw.4 \ ixgbe.4 \ ixl.4 \ jedec_dimm.4 \ jme.4 \ kbdmux.4 \ keyboard.4 \ kld.4 \ ksyms.4 \ ksz8995ma.4 \ ktr.4 \ kue.4 \ lagg.4 \ le.4 \ led.4 \ lge.4 \ ${_linux.4} \ liquidio.4 \ lm75.4 \ lo.4 \ lp.4 \ lpbb.4 \ lpt.4 \ ltc430x.4 \ mac.4 \ mac_biba.4 \ mac_bsdextended.4 \ mac_ifoff.4 \ mac_lomac.4 \ mac_mls.4 \ mac_none.4 \ mac_ntpd.4 \ mac_partition.4 \ mac_portacl.4 \ mac_seeotheruids.4 \ mac_stub.4 \ mac_test.4 \ malo.4 \ md.4 \ mdio.4 \ me.4 \ mem.4 \ meteor.4 \ mfi.4 \ miibus.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ mlx4en.4 \ mlx5en.4 \ mly.4 \ mmc.4 \ mmcsd.4 \ mn.4 \ mod_cc.4 \ mos.4 \ mouse.4 \ mpr.4 \ mps.4 \ mpt.4 \ mrsas.4 \ msk.4 \ mtio.4 \ multicast.4 \ muge.4 \ mvs.4 \ mwl.4 \ mwlfw.4 \ mx25l.4 \ mxge.4 \ my.4 \ ${_ndis.4} \ net80211.4 \ netdump.4 \ netfpga10g_nf10bmac.4 \ netgdb.4 \ netgraph.4 \ netintro.4 \ netmap.4 \ ${_nfe.4} \ ${_nfsmb.4} \ ng_async.4 \ ngatmbase.4 \ ng_atmllc.4 \ ng_bpf.4 \ ng_bridge.4 \ ng_bt3c.4 \ ng_btsocket.4 \ ng_car.4 \ ng_ccatm.4 \ ng_checksum.4 \ ng_cisco.4 \ ng_deflate.4 \ ng_device.4 \ nge.4 \ ng_echo.4 \ ng_eiface.4 \ ng_etf.4 \ ng_ether.4 \ ng_ether_echo.4 \ ng_frame_relay.4 \ ng_gif.4 \ ng_gif_demux.4 \ ng_h4.4 \ ng_hci.4 \ ng_hole.4 \ ng_hub.4 \ ng_iface.4 \ ng_ipfw.4 \ ng_ip_input.4 \ ng_ksocket.4 \ ng_l2cap.4 \ ng_l2tp.4 \ ng_lmi.4 \ ng_mppc.4 \ ng_nat.4 \ ng_netflow.4 \ ng_one2many.4 \ ng_patch.4 \ ng_pipe.4 \ ng_ppp.4 \ ng_pppoe.4 \ ng_pptpgre.4 \ ng_pred1.4 \ ng_rfc1490.4 \ ng_socket.4 \ ng_source.4 \ ng_split.4 \ ng_sppp.4 \ ng_sscfu.4 \ ng_sscop.4 \ ng_tag.4 \ ng_tcpmss.4 \ ng_tee.4 \ ng_tty.4 \ ng_ubt.4 \ ng_UI.4 \ ng_uni.4 \ ng_vjc.4 \ ng_vlan.4 \ nmdm.4 \ ${_ntb.4} \ ${_ntb_hw_amd.4} \ ${_ntb_hw_intel.4} \ ${_ntb_hw_plx.4} \ ${_ntb_transport.4} \ ${_nda.4} \ ${_if_ntb.4} \ null.4 \ numa.4 \ ${_nvd.4} \ ${_nvdimm.4} \ ${_nvme.4} \ ${_nvram.4} \ ${_nvram2env.4} \ oce.4 \ ocs_fc.4\ ohci.4 \ orm.4 \ ow.4 \ ow_temp.4 \ owc.4 \ ${_padlock.4} \ pass.4 \ pccard.4 \ pccbb.4 \ pcf.4 \ pci.4 \ pcib.4 \ pcic.4 \ pcm.4 \ ${_pf.4} \ ${_pflog.4} \ ${_pfsync.4} \ pim.4 \ pms.4 \ polling.4 \ ppbus.4 \ ppc.4 \ ppi.4 \ procdesc.4 \ proto.4 \ psm.4 \ pst.4 \ pt.4 \ ptnet.4 \ pts.4 \ pty.4 \ puc.4 \ pwmc.4 \ ${_qlxge.4} \ ${_qlxgb.4} \ ${_qlxgbe.4} \ ${_qlnxe.4} \ ral.4 \ random.4 \ rc.4 \ rctl.4 \ re.4 \ rgephy.4 \ rights.4 \ rl.4 \ rndtest.4 \ route.4 \ rp.4 \ rtwn.4 \ rtwnfw.4 \ rtwn_pci.4 \ rue.4 \ sa.4 \ safe.4 \ sbp.4 \ sbp_targ.4 \ scc.4 \ sched_4bsd.4 \ sched_ule.4 \ screen.4 \ scsi.4 \ sctp.4 \ sdhci.4 \ sem.4 \ send.4 \ ses.4 \ ${_sfxge.4} \ sge.4 \ siba.4 \ siftr.4 \ siis.4 \ simplebus.4 \ sis.4 \ sk.4 \ ${_smartpqi.4} \ smb.4 \ smbus.4 \ smp.4 \ smsc.4 \ snd_ad1816.4 \ snd_als4000.4 \ snd_atiixp.4 \ snd_cmi.4 \ snd_cs4281.4 \ snd_csa.4 \ snd_ds1.4 \ snd_emu10k1.4 \ snd_emu10kx.4 \ snd_envy24.4 \ snd_envy24ht.4 \ snd_es137x.4 \ snd_ess.4 \ snd_fm801.4 \ snd_gusc.4 \ snd_hda.4 \ snd_hdspe.4 \ snd_ich.4 \ snd_maestro3.4 \ snd_maestro.4 \ snd_mss.4 \ snd_neomagic.4 \ snd_sbc.4 \ snd_solo.4 \ snd_spicds.4 \ snd_t4dwave.4 \ snd_uaudio.4 \ snd_via8233.4 \ snd_via82c686.4 \ snd_vibes.4 \ snp.4 \ spigen.4 \ ${_spkr.4} \ splash.4 \ sppp.4 \ ste.4 \ stf.4 \ stge.4 \ ${_superio.4} \ sym.4 \ syncache.4 \ syncer.4 \ syscons.4 \ sysmouse.4 \ tap.4 \ targ.4 \ tcp.4 \ tdfx.4 \ terasic_mtl.4 \ termios.4 \ textdump.4 \ ti.4 \ timecounters.4 \ ${_tpm.4} \ tty.4 \ tun.4 \ twa.4 \ twe.4 \ tws.4 \ udp.4 \ udplite.4 \ ure.4 \ vale.4 \ vga.4 \ vge.4 \ viapm.4 \ ${_viawd.4} \ ${_virtio.4} \ ${_virtio_balloon.4} \ ${_virtio_blk.4} \ ${_virtio_console.4} \ ${_virtio_random.4} \ ${_virtio_scsi.4} \ ${_vmci.4} \ vkbd.4 \ vlan.4 \ vxlan.4 \ ${_vmd.4} \ ${_vmm.4} \ ${_vmx.4} \ vr.4 \ vt.4 \ vte.4 \ ${_vtnet.4} \ watchdog.4 \ ${_wbwd.4} \ wi.4 \ witness.4 \ wlan.4 \ wlan_acl.4 \ wlan_amrr.4 \ wlan_ccmp.4 \ wlan_tkip.4 \ wlan_wep.4 \ wlan_xauth.4 \ wmt.4 \ ${_wpi.4} \ wsp.4 \ ${_xen.4} \ xhci.4 \ xl.4 \ ${_xnb.4} \ xpt.4 \ zero.4 MLINKS= ads111x.4 ads1013.4 \ ads111x.4 ads1014.4 \ ads111x.4 ads1015.4 \ ads111x.4 ads1113.4 \ ads111x.4 ads1114.4 \ ads111x.4 ads1115.4 MLINKS+=ae.4 if_ae.4 MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 MLINKS+=alc.4 if_alc.4 MLINKS+=ale.4 if_ale.4 MLINKS+=altera_atse.4 atse.4 MLINKS+=altera_sdcard.4 altera_sdcardc.4 MLINKS+=altq.4 ALTQ.4 MLINKS+=ath.4 if_ath.4 MLINKS+=ath_pci.4 if_ath_pci.4 MLINKS+=an.4 if_an.4 MLINKS+=aue.4 if_aue.4 MLINKS+=axe.4 if_axe.4 MLINKS+=bce.4 if_bce.4 MLINKS+=bfe.4 if_bfe.4 MLINKS+=bge.4 if_bge.4 -MLINKS+=bktr.4 brooktree.4 MLINKS+=bnxt.4 if_bnxt.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=bwn.4 if_bwn.4 MLINKS+=${_bxe.4} ${_if_bxe.4} MLINKS+=cas.4 if_cas.4 MLINKS+=cdce.4 if_cdce.4 MLINKS+=cfi.4 cfid.4 MLINKS+=cloudabi.4 cloudabi32.4 \ cloudabi.4 cloudabi64.4 MLINKS+=crypto.4 cryptodev.4 MLINKS+=cue.4 if_cue.4 MLINKS+=cxgb.4 if_cxgb.4 MLINKS+=cxgbe.4 if_cxgbe.4 \ cxgbe.4 vcxgbe.4 \ cxgbe.4 if_vcxgbe.4 \ cxgbe.4 cxl.4 \ cxgbe.4 if_cxl.4 \ cxgbe.4 vcxl.4 \ cxgbe.4 if_vcxl.4 \ cxgbe.4 cc.4 \ cxgbe.4 if_cc.4 \ cxgbe.4 vcc.4 \ cxgbe.4 if_vcc.4 MLINKS+=cxgbev.4 if_cxgbev.4 \ cxgbev.4 cxlv.4 \ cxgbev.4 if_cxlv.4 \ cxgbev.4 ccv.4 \ cxgbev.4 if_ccv.4 MLINKS+=dc.4 if_dc.4 MLINKS+=disc.4 if_disc.4 MLINKS+=edsc.4 if_edsc.4 MLINKS+=em.4 if_em.4 \ em.4 igb.4 \ em.4 if_igb.4 MLINKS+=enc.4 if_enc.4 MLINKS+=epair.4 if_epair.4 MLINKS+=et.4 if_et.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ fd.4 stdout.4 MLINKS+=fdt.4 FDT.4 MLINKS+=firewire.4 ieee1394.4 MLINKS+=fwe.4 if_fwe.4 MLINKS+=fwip.4 if_fwip.4 MLINKS+=fxp.4 if_fxp.4 MLINKS+=gem.4 if_gem.4 MLINKS+=geom.4 GEOM.4 MLINKS+=gif.4 if_gif.4 MLINKS+=gpio.4 gpiobus.4 MLINKS+=gpioths.4 dht11.4 MLINKS+=gpioths.4 dht22.4 MLINKS+=gre.4 if_gre.4 MLINKS+=hme.4 if_hme.4 MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 MLINKS+=iwm.4 if_iwm.4 MLINKS+=iwn.4 if_iwn.4 MLINKS+=ixgbe.4 ix.4 MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 MLINKS+=ixl.4 if_ixl.4 MLINKS+=iavf.4 if_iavf.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 MLINKS+=lagg.4 if_lagg.4 MLINKS+=le.4 if_le.4 MLINKS+=lge.4 if_lge.4 MLINKS+=lo.4 loop.4 MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 MLINKS+=mfi.4 mfi_linux.4 \ mfi.4 mfip.4 MLINKS+=mlx5en.4 mce.4 MLINKS+=mn.4 if_mn.4 MLINKS+=mos.4 if_mos.4 MLINKS+=msk.4 if_msk.4 MLINKS+=mwl.4 if_mwl.4 MLINKS+=mxge.4 if_mxge.4 MLINKS+=my.4 if_my.4 MLINKS+=${_ndis.4} ${_if_ndis.4} MLINKS+=netfpga10g_nf10bmac.4 if_nf10bmac.4 MLINKS+=netintro.4 net.4 \ netintro.4 networking.4 MLINKS+=${_nfe.4} ${_if_nfe.4} MLINKS+=nge.4 if_nge.4 MLINKS+=ow.4 onewire.4 MLINKS+=pccbb.4 cbb.4 MLINKS+=pcm.4 snd.4 \ pcm.4 sound.4 MLINKS+=pms.4 pmspcv.4 MLINKS+=ptnet.4 if_ptnet.4 MLINKS+=ral.4 if_ral.4 MLINKS+=re.4 if_re.4 MLINKS+=rl.4 if_rl.4 MLINKS+=rtwn_pci.4 if_rtwn_pci.4 MLINKS+=rue.4 if_rue.4 MLINKS+=scsi.4 CAM.4 \ scsi.4 cam.4 \ scsi.4 scbus.4 \ scsi.4 SCSI.4 MLINKS+=sge.4 if_sge.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 MLINKS+=smp.4 SMP.4 MLINKS+=smsc.4 if_smsc.4 MLINKS+=snd_envy24.4 snd_ak452x.4 MLINKS+=snd_sbc.4 snd_sb16.4 \ snd_sbc.4 snd_sb8.4 MLINKS+=${_spkr.4} ${_speaker.4} MLINKS+=splash.4 screensaver.4 MLINKS+=ste.4 if_ste.4 MLINKS+=stf.4 if_stf.4 MLINKS+=stge.4 if_stge.4 MLINKS+=syncache.4 syncookies.4 MLINKS+=syscons.4 sc.4 MLINKS+=tap.4 if_tap.4 \ tap.4 vmnet.4 \ tap.4 if_vmnet.4 MLINKS+=tdfx.4 tdfx_linux.4 MLINKS+=ti.4 if_ti.4 MLINKS+=tun.4 if_tun.4 MLINKS+=ure.4 if_ure.4 MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vxlan.4 if_vxlan.4 MLINKS+=${_vmx.4} ${_if_vmx.4} MLINKS+=vr.4 if_vr.4 MLINKS+=vte.4 if_vte.4 MLINKS+=${_vtnet.4} ${_if_vtnet.4} MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wi.4 if_wi.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xl.4 if_xl.4 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _acpi_asus.4= acpi_asus.4 _acpi_asus_wmi.4= acpi_asus_wmi.4 _acpi_dock.4= acpi_dock.4 _acpi_fujitsu.4=acpi_fujitsu.4 _acpi_hp.4= acpi_hp.4 _acpi_ibm.4= acpi_ibm.4 _acpi_panasonic.4=acpi_panasonic.4 _acpi_rapidstart.4=acpi_rapidstart.4 _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 _aout.4= aout.4 _apic.4= apic.4 _atrtc.4= atrtc.4 _attimer.4= attimer.4 _aibs.4= aibs.4 _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdsmn.4= amdsmn.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 _bxe.4= bxe.4 _bytgpio.4= bytgpio.4 _chvgpio.4= chvgpio.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 _hpt27xx.4= hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptnr.4= hptnr.4 _hptrr.4= hptrr.4 _hv_kvp.4= hv_kvp.4 _hv_netvsc.4= hv_netvsc.4 _hv_storvsc.4= hv_storvsc.4 _hv_utils.4= hv_utils.4 _hv_vmbus.4= hv_vmbus.4 _hv_vss.4= hv_vss.4 _hwpstate_intel.4= hwpstate_intel.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 _if_bxe.4= if_bxe.4 _if_ndis.4= if_ndis.4 _if_nfe.4= if_nfe.4 _if_urtw.4= if_urtw.4 _if_vmx.4= if_vmx.4 _if_vtnet.4= if_vtnet.4 _if_wpi.4= if_wpi.4 _imcsmb.4= imcsmb.4 _ipmi.4= ipmi.4 _io.4= io.4 _itwd.4= itwd.4 _linux.4= linux.4 _nda.4= nda.4 _ndis.4= ndis.4 _nfe.4= nfe.4 _nfsmb.4= nfsmb.4 _if_ntb.4= if_ntb.4 _ntb.4= ntb.4 _ntb_hw_amd.4= ntb_hw_amd.4 _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 _nvd.4= nvd.4 _nvme.4= nvme.4 _nvram.4= nvram.4 _padlock.4= padlock.4 _rr232x.4= rr232x.4 _speaker.4= speaker.4 _spkr.4= spkr.4 _superio.4= superio.4 _tpm.4= tpm.4 _urtw.4= urtw.4 _viawd.4= viawd.4 _virtio.4= virtio.4 _virtio_balloon.4=virtio_balloon.4 _virtio_blk.4= virtio_blk.4 _virtio_console.4=virtio_console.4 _virtio_random.4= virtio_random.4 _virtio_scsi.4= virtio_scsi.4 _vmci.4= vmci.4 _vmx.4= vmx.4 _vtnet.4= vtnet.4 _wbwd.4= wbwd.4 _wpi.4= wpi.4 _xen.4= xen.4 _xnb.4= xnb.4 .endif .if ${MACHINE_CPUARCH} == "amd64" _ioat.4= ioat.4 _nvdimm.4= nvdimm.4 _qlxge.4= qlxge.4 _qlxgb.4= qlxgb.4 _qlxgbe.4= qlxgbe.4 _qlnxe.4= qlnxe.4 _sfxge.4= sfxge.4 _smartpqi.4= smartpqi.4 _vmd.4= vmd.4 MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=qlnxe.4 if_qlnxe.4 MLINKS+=sfxge.4 if_sfxge.4 .if ${MK_BHYVE} != "no" _bhyve.4= bhyve.4 _vmm.4= vmm.4 .endif .endif .if ${MACHINE_CPUARCH} == "mips" _nvram2env.4= nvram2env.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" _if_vtnet.4= if_vtnet.4 _nvd.4= nvd.4 _nvme.4= nvme.4 _virtio.4= virtio.4 _virtio_balloon.4=virtio_balloon.4 _virtio_blk.4= virtio_blk.4 _virtio_console.4=virtio_console.4 _virtio_random.4= virtio_random.4 _virtio_scsi.4= virtio_scsi.4 _vtnet.4= vtnet.4 .endif .if empty(MAN_ARCH) __arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} .elif ${MAN_ARCH} == "all" __arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} .else __arches= ${MAN_ARCH} .endif .for __arch in ${__arches:O:u} .if exists(${.CURDIR}/man4.${__arch}) SUBDIR+= man4.${__arch} .endif .endfor .if ${MK_BLUETOOTH} != "no" MAN+= ng_bluetooth.4 .endif .if ${MK_CCD} != "no" _ccd.4= ccd.4 .endif .if ${MK_CDDL} != "no" _dtrace_provs= dtrace_audit.4 \ dtrace_io.4 \ dtrace_ip.4 \ dtrace_lockstat.4 \ dtrace_proc.4 \ dtrace_sched.4 \ dtrace_sctp.4 \ dtrace_tcp.4 \ dtrace_udp.4 \ dtrace_udplite.4 MLINKS+= dtrace_audit.4 dtaudit.4 .endif .if ${MK_EFI} != "no" MAN+= efidev.4 MLINKS+= efidev.4 efirtc.4 .endif .if ${MK_ISCSI} != "no" MAN+= cfiscsi.4 MAN+= iscsi.4 MAN+= iscsi_initiator.4 MAN+= iser.4 .endif .if ${MK_OFED} != "no" MAN+= mlx4ib.4 MAN+= mlx5ib.4 .endif .if ${MK_MLX5TOOL} != "no" MAN+= mlx5io.4 .endif .if ${MK_TESTS} != "no" ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc _atf_test_case.4= atf-test-case.4 .endif .if ${MK_PF} != "no" _pf.4= pf.4 _pflog.4= pflog.4 _pfsync.4= pfsync.4 .endif .if ${MK_USB} != "no" MAN+= \ otus.4 \ otusfw.4 \ rsu.4 \ rsufw.4 \ rtwn_usb.4 \ rum.4 \ run.4 \ runfw.4 \ u3g.4 \ uark.4 \ uart.4 \ uath.4 \ ubsa.4 \ ubsec.4 \ ubser.4 \ ubtbcmfw.4 \ uchcom.4 \ ucom.4 \ ucycom.4 \ udav.4 \ udbp.4 \ udl.4 \ uep.4 \ ufm.4 \ ufoma.4 \ uftdi.4 \ ugen.4 \ ugold.4 \ uhci.4 \ uhid.4 \ uhso.4 \ uipaq.4 \ ukbd.4 \ uled.4 \ ulpt.4 \ umass.4 \ umcs.4 \ umct.4 \ umodem.4 \ umoscom.4 \ ums.4 \ unix.4 \ upgt.4 \ uplcom.4 \ ural.4 \ urio.4 \ urndis.4 \ ${_urtw.4} \ usb.4 \ usb_quirk.4 \ usb_template.4 \ usfs.4 \ uslcom.4 \ uvisor.4 \ uvscom.4 \ zyd.4 MLINKS+=otus.4 if_otus.4 MLINKS+=rsu.4 if_rsu.4 MLINKS+=rtwn_usb.4 if_rtwn_usb.4 MLINKS+=rum.4 if_rum.4 MLINKS+=run.4 if_run.4 MLINKS+=u3g.4 u3gstub.4 MLINKS+=uath.4 if_uath.4 MLINKS+=udav.4 if_udav.4 MLINKS+=upgt.4 if_upgt.4 MLINKS+=ural.4 if_ural.4 MLINKS+=urndis.4 if_urndis.4 MLINKS+=${_urtw.4} ${_if_urtw.4} MLINKS+=zyd.4 if_zyd.4 .endif .include diff --git a/share/man/man4/bktr.4 b/share/man/man4/bktr.4 deleted file mode 100644 index cc4b343cb181..000000000000 --- a/share/man/man4/bktr.4 +++ /dev/null @@ -1,264 +0,0 @@ -.\" -.\" $FreeBSD$ -.\" -.Dd February 25, 2020 -.Dt BKTR 4 -.Os -.Sh NAME -.Nm bktr -.Nd Brooktree Bt848/849/878/879 and Pinnacle PCTV video capture driver -.Sh SYNOPSIS -.Cd device bktr -.Pp -.Cd device iicbus -.Cd device iicbb -.Cd device smbus -.Sh DEPRECATION NOTICE -The -.Nm -driver is not present in -.Fx 13.0 -and later. -.Sh DESCRIPTION -The -.Nm bktr -driver provides support for PCI -.Em video -capture and -.Em VBI -capture on low cost, high performance boards. -The driver is based on the Matrox Meteor driver and uses the same API. -The -.Nm -driver should support most video cards based on the -.Em "Brooktree Bt848/849/878/879 Video Capture Chip" . -Also supported are most -.Em "Pinnacle PCTV" -video cards. -Furthermore, the driver supports -.Em FM Radio -if the tuner supports it. -.Pp -The driver currently supports the following features: -.Bd -unfilled -offset indent -PCI to PCI dma transfer -clipping -yuv -rgb16 -rgb24 -rgb32 -.Ed -.Pp -On the supported cards, tuners and other components are interconnected -with an I2C bus. -The Brooktree848 chips act as a master device on the bus to control them. -Therefore, -.Xr iicbus 4 , -.Xr iicbb 4 -and -.Xr smbus 4 -controller declarations are mandatory to activate -.Nm -support. -.Pp -The following kernel parameters may be used to further configure the driver: -.Pp -.Em options "BROOKTREE_ALLOC_PAGES=xxx" -specifies the number of contiguous pages to allocate when successfully -probed. -The default number of pages allocated by the kernel is 216. -This means that there are (216*4096) bytes available for use. -.Bd -unfilled -.Cd options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL -.Cd options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC -.Ed -One of these options can be used to set the default video format for the driver. -This fixed random hangs and lockups with the VideoLogic Captivator PCI card. -.Pp -The following sysctls may be used to further configure the driver: -.Pp -.Em sysctl hw.bt848.card=nnnn -This can be used to override the card make which was detected at boot time. -.Ql nnnn -is set to an integer from 1 to 23 taken from the following table: -.Pp -.Bl -tag -compact -width 30n -.It MIRO -1 -.It HAUPPAUGE -2 -.It STB -3 -.It INTEL -4 -.It IMS_TURBO -5 -.It AVER_MEDIA -6 -.It OSPREY -7 -.It NEC_PK -8 -.It IO_GV -9 -.It FLYVIDEO -10 -.It ZOLTRIX -11 -.It KISS -12 -.It VIDEO_HIGHWAY_XTREME -13 -.It ASKEY_DYNALINK_MAGIC_TVIEW -14 -.It LEADTEK -15 -.It TERRATVPLUS -16 -.It IO_BCTV3 -17 -.It AOPEN_VA1000 -18 -.It PINNACLE_PCTV_RAVE -19 -.It PIXELVIEW_PLAYTV_PAK -20 -.It TERRATVALUE -21 -.It PIXELVIEW_PLAYTV_PRO_REV_4C -22 -.It Bt848_MAX -23 -.El -.Pp -.Em sysctl hw.bt848.tuner=nnnn -This can be used to override the tuner make which was detected at boot time. -.Ql nnnn -is set to an integer from 0 to 16 taken from the following table: -.Pp -.Bl -tag -compact -width 22n -.It NO_TUNER -0 -.It TEMIC_NTSC -1 -.It TEMIC_PAL -2 -.It TEMIC_SECAM -3 -.It PHILIPS_NTSC -4 -.It PHILIPS_PAL -5 -.It PHILIPS_SECAM -6 -.It TEMIC_PALI -7 -.It PHILIPS_PALI -8 -.It PHILIPS_FR1236_NTSC -9 /* These have FM Radio support */ -.It PHILIPS_FR1216_PAL -10 /* These have FM Radio support */ -.It PHILIPS_FR1236_SECAM -11 /* These have FM Radio support */ -.It ALPS_TSCH5 -12 -.It ALPS_TSBH1 -13 -.It MT2032 -14 -.It LG_TPI8PSB12P_PAL -15 -.It Bt848_MAX -16 -.El -.Sh HARDWARE -The -.Nm -driver supports video capture cards based on the -Brooktree Bt848/849/878/879 chips, as well as -Pinnacle PCTV cards, including: -.Pp -.Bl -bullet -compact -.It -AOpen VA1000 -.It -AVerMedia AVerTV Studio -.It -AVerMedia TF/FM-98 -.It -ATI TV Wonder VE -.It -Hauppauge WinCast/TV -.It -Hauppauge WinTV-Go-FM -.It -Hauppauge WinTV-pci -.It -Hauppauge WinTV-radio -.It -Intel Smart Video Recorder III -.It -KWORLD PCI TV Tuner -.It -Miro PC TV -.It -Pinnacle PCTV Pro -.It -Pinnacle PCTV Rave -.It -PixelView PlayTV PAK -.It -PixelView PlayTV Pro (rev 4C, 9D) -.It -SIGMA TV II -.It -STB TV PCI Television Tuner -.It -Super TV Tuner -.It -TerraTec TValue -.It -V-Stream XPERT TV-PVR 878 -.It -Video Highway XTreme -.It -VideoLogic Captivator PCI -.El -.Sh FILES -.Bl -tag -width /usr/share/examples/meteor -compact -.It Pa /usr/ports/multimedia/fxtv -A TV and Camera display program utilizing the bktr driver - requires that -.Em The X Window System -and -.Em The Ports Collection -also be installed. -.It Pa /usr/ports/audio/xmradio -An FM Radio Tuner for cards which have an FM Radio tuner fitted - requires that -.Em The X Window System -and -.Em The Ports Collection -also be installed. -It also requires -.Em Motif -or the -.Em lesstif -port. -.El -.Sh SEE ALSO -.Xr meteor 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 2.2 . -.Sh AUTHORS -.An -nosplit -This driver is based on the work of -.An Jim Lowe Aq Mt james@miller.cs.uwm.edu , -.An Mark Tinguely Aq Mt tinguely@plains.nodak.edu , -.An Amancio Hasty Aq Mt hasty@star-gate.com , -.An Roger Hardiman Aq Mt roger@FreeBSD.org -and a bunch of other people. -Support for Pinnacle PCTV Rave cards was added by -.An Branko Lankester Aq Mt branko@euro.net . diff --git a/sys/conf/files b/sys/conf/files index b99b5838891f..6fbb76e7a056 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4993 +1,4986 @@ # $FreeBSD$ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # acpi_quirks.h optional acpi \ dependency "$S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ no-obj no-implicit-rule before-depend \ clean "acpi_quirks.h" bhnd_nvram_map.h optional bhnd \ dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -h" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map.h" bhnd_nvram_map_data.h optional bhnd \ dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map_data.h" fdt_static_dtb.h optional fdt fdt_dtb_static \ compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \ dependency "${FDT_DTS_FILE:T:R}.dtb" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" feeder_eq_gen.h optional sound \ dependency "$S/tools/sound/feeder_eq_mkfilter.awk" \ compile-with "${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \ no-obj no-implicit-rule before-depend \ clean "feeder_eq_gen.h" feeder_rate_gen.h optional sound \ dependency "$S/tools/sound/feeder_rate_mkfilter.awk" \ compile-with "${AWK} -f $S/tools/sound/feeder_rate_mkfilter.awk -- ${FEEDER_RATE_PRESETS} > feeder_rate_gen.h" \ no-obj no-implicit-rule before-depend \ clean "feeder_rate_gen.h" font.h optional sc_dflt_font \ compile-with "uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < ${SRCTOP}/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ no-obj no-implicit-rule before-depend \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" snd_fxdiv_gen.h optional sound \ dependency "$S/tools/sound/snd_fxdiv_gen.awk" \ compile-with "${AWK} -f $S/tools/sound/snd_fxdiv_gen.awk -- > snd_fxdiv_gen.h" \ no-obj no-implicit-rule before-depend \ clean "snd_fxdiv_gen.h" miidevs.h optional miibus | mii \ dependency "$S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ compile-with "${AWK} -f $S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ no-obj no-implicit-rule before-depend \ clean "miidevs.h" pccarddevs.h standard \ dependency "$S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" kbdmuxmap.h optional kbdmux_dflt_keymap \ compile-with "${KEYMAP} -L ${KBDMUX_DFLT_KEYMAP} | ${KEYMAP_FIX} > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "kbdmuxmap.h" teken_state.h optional sc | vt \ dependency "$S/teken/gensequences $S/teken/sequences" \ compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ clean "teken_state.h" ukbdmap.h optional ukbd_dflt_keymap \ compile-with "${KEYMAP} -L ${UKBD_DFLT_KEYMAP} | ${KEYMAP_FIX} > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" usbdevs.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ no-obj no-implicit-rule before-depend \ clean "usbdevs.h" usbdevs_data.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ no-obj no-implicit-rule before-depend \ clean "usbdevs_data.h" sdiodevs.h optional mmccam \ dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -h" \ no-obj no-implicit-rule before-depend \ clean "sdiodevs.h" sdiodevs_data.h optional mmccam \ dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -d" \ no-obj no-implicit-rule before-depend \ clean "sdiodevs_data.h" cam/cam.c optional scbus cam/cam_compat.c optional scbus cam/cam_iosched.c optional scbus cam/cam_periph.c optional scbus cam/cam_queue.c optional scbus cam/cam_sim.c optional scbus cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus cam/ata/ata_pmp.c optional scbus cam/nvme/nvme_all.c optional scbus cam/nvme/nvme_da.c optional nda | da cam/nvme/nvme_xpt.c optional scbus cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch cam/ata/ata_da.c optional ada | da cam/ctl/ctl.c optional ctl cam/ctl/ctl_backend.c optional ctl cam/ctl/ctl_backend_block.c optional ctl cam/ctl/ctl_backend_ramdisk.c optional ctl cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl cam/ctl/ctl_frontend_ioctl.c optional ctl cam/ctl/ctl_frontend_iscsi.c optional ctl cfiscsi cam/ctl/ctl_ha.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_tpc.c optional ctl cam/ctl/ctl_tpc_local.c optional ctl cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/mmc/mmc_xpt.c optional scbus mmccam cam/mmc/mmc_da.c optional scbus mmccam da cam/scsi/scsi_da.c optional da cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa cam/scsi/scsi_enc.c optional ses cam/scsi/scsi_enc_ses.c optional ses cam/scsi/scsi_enc_safte.c optional ses cam/scsi/scsi_sg.c optional sg cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ cam/scsi/smp_all.c optional scbus # shared between zfs and dtrace cddl/compat/opensolaris/kern/opensolaris.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${CDDL_C}" # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kobj.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kstat.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_lookup.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_policy.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_string.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_sysevent.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_uio.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vfs.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vm.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_zone.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/acl/acl_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/avl/avl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/lz4/lz4.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair_alloc_fixed.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/unicode/u8_textprep.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfeature_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_comutil.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_deleg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zpool_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zprop_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/vnode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bplist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c optional zfs compile-with "${ZFS_C}" \ warning "kernel contains CDDL licensed ZFS filesystem" cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/gzip.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/mmp.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/unique.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_births.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_initialize.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_global.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_iter.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zle.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/callb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/fm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/list.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/nvpair_alloc_system.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" # zfs lua support cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lapi.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lauxlib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lbaselib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lbitlib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lcode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lcompat.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lcorolib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lctype.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ldebug.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ldo.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ldump.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lfunc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lmem.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lobject.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lopcodes.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lparser.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstate.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstring.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltablib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lundump.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lvm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lzio.c optional zfs compile-with "${ZFS_C}" # dtrace specific cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ warning "kernel contains CDDL licensed DTRACE" cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" compat/cloudabi/cloudabi_clock.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_errno.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_fd.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_file.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_futex.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_mem.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_proc.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_random.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_sock.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_thread.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_vdso.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi32/cloudabi32_fd.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_module.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_poll.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_sock.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_syscalls.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_sysent.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_thread.c optional compat_cloudabi32 compat/cloudabi64/cloudabi64_fd.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_module.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_poll.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sock.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_syscalls.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sysent.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_thread.c optional compat_cloudabi64 compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 contrib/ck/src/ck_array.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_centralized.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_combining.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_dissemination.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_mcs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_tournament.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_epoch.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_hp.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_hs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_ht.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_rhs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/dev/acpica/common/ahids.c optional acpi acpi_debug contrib/dev/acpica/common/ahuuids.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbobject.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmcstyle.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcs.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmutils.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi contrib/dev/acpica/components/dispatcher/dsdebug.c optional acpi contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi contrib/dev/acpica/components/dispatcher/dspkginit.c optional acpi contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi contrib/dev/acpica/components/dispatcher/dswload.c optional acpi contrib/dev/acpica/components/dispatcher/dswload2.c optional acpi contrib/dev/acpica/components/dispatcher/dswscope.c optional acpi contrib/dev/acpica/components/dispatcher/dswstate.c optional acpi contrib/dev/acpica/components/events/evevent.c optional acpi contrib/dev/acpica/components/events/evglock.c optional acpi contrib/dev/acpica/components/events/evgpe.c optional acpi contrib/dev/acpica/components/events/evgpeblk.c optional acpi contrib/dev/acpica/components/events/evgpeinit.c optional acpi contrib/dev/acpica/components/events/evgpeutil.c optional acpi contrib/dev/acpica/components/events/evhandler.c optional acpi contrib/dev/acpica/components/events/evmisc.c optional acpi contrib/dev/acpica/components/events/evregion.c optional acpi contrib/dev/acpica/components/events/evrgnini.c optional acpi contrib/dev/acpica/components/events/evsci.c optional acpi contrib/dev/acpica/components/events/evxface.c optional acpi contrib/dev/acpica/components/events/evxfevnt.c optional acpi contrib/dev/acpica/components/events/evxfgpe.c optional acpi contrib/dev/acpica/components/events/evxfregn.c optional acpi contrib/dev/acpica/components/executer/exconcat.c optional acpi contrib/dev/acpica/components/executer/exconfig.c optional acpi contrib/dev/acpica/components/executer/exconvrt.c optional acpi contrib/dev/acpica/components/executer/excreate.c optional acpi contrib/dev/acpica/components/executer/exdebug.c optional acpi contrib/dev/acpica/components/executer/exdump.c optional acpi contrib/dev/acpica/components/executer/exfield.c optional acpi contrib/dev/acpica/components/executer/exfldio.c optional acpi contrib/dev/acpica/components/executer/exmisc.c optional acpi contrib/dev/acpica/components/executer/exmutex.c optional acpi contrib/dev/acpica/components/executer/exnames.c optional acpi contrib/dev/acpica/components/executer/exoparg1.c optional acpi contrib/dev/acpica/components/executer/exoparg2.c optional acpi contrib/dev/acpica/components/executer/exoparg3.c optional acpi contrib/dev/acpica/components/executer/exoparg6.c optional acpi contrib/dev/acpica/components/executer/exprep.c optional acpi contrib/dev/acpica/components/executer/exregion.c optional acpi contrib/dev/acpica/components/executer/exresnte.c optional acpi contrib/dev/acpica/components/executer/exresolv.c optional acpi contrib/dev/acpica/components/executer/exresop.c optional acpi contrib/dev/acpica/components/executer/exserial.c optional acpi contrib/dev/acpica/components/executer/exstore.c optional acpi contrib/dev/acpica/components/executer/exstoren.c optional acpi contrib/dev/acpica/components/executer/exstorob.c optional acpi contrib/dev/acpica/components/executer/exsystem.c optional acpi contrib/dev/acpica/components/executer/extrace.c optional acpi contrib/dev/acpica/components/executer/exutils.c optional acpi contrib/dev/acpica/components/hardware/hwacpi.c optional acpi contrib/dev/acpica/components/hardware/hwesleep.c optional acpi contrib/dev/acpica/components/hardware/hwgpe.c optional acpi contrib/dev/acpica/components/hardware/hwpci.c optional acpi contrib/dev/acpica/components/hardware/hwregs.c optional acpi contrib/dev/acpica/components/hardware/hwsleep.c optional acpi contrib/dev/acpica/components/hardware/hwtimer.c optional acpi contrib/dev/acpica/components/hardware/hwvalid.c optional acpi contrib/dev/acpica/components/hardware/hwxface.c optional acpi contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi contrib/dev/acpica/components/namespace/nsaccess.c optional acpi contrib/dev/acpica/components/namespace/nsalloc.c optional acpi contrib/dev/acpica/components/namespace/nsarguments.c optional acpi contrib/dev/acpica/components/namespace/nsconvert.c optional acpi contrib/dev/acpica/components/namespace/nsdump.c optional acpi contrib/dev/acpica/components/namespace/nseval.c optional acpi contrib/dev/acpica/components/namespace/nsinit.c optional acpi contrib/dev/acpica/components/namespace/nsload.c optional acpi contrib/dev/acpica/components/namespace/nsnames.c optional acpi contrib/dev/acpica/components/namespace/nsobject.c optional acpi contrib/dev/acpica/components/namespace/nsparse.c optional acpi contrib/dev/acpica/components/namespace/nspredef.c optional acpi contrib/dev/acpica/components/namespace/nsprepkg.c optional acpi contrib/dev/acpica/components/namespace/nsrepair.c optional acpi contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi contrib/dev/acpica/components/namespace/nssearch.c optional acpi contrib/dev/acpica/components/namespace/nsutils.c optional acpi contrib/dev/acpica/components/namespace/nswalk.c optional acpi contrib/dev/acpica/components/namespace/nsxfeval.c optional acpi contrib/dev/acpica/components/namespace/nsxfname.c optional acpi contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi contrib/dev/acpica/components/parser/psargs.c optional acpi contrib/dev/acpica/components/parser/psloop.c optional acpi contrib/dev/acpica/components/parser/psobject.c optional acpi contrib/dev/acpica/components/parser/psopcode.c optional acpi contrib/dev/acpica/components/parser/psopinfo.c optional acpi contrib/dev/acpica/components/parser/psparse.c optional acpi contrib/dev/acpica/components/parser/psscope.c optional acpi contrib/dev/acpica/components/parser/pstree.c optional acpi contrib/dev/acpica/components/parser/psutils.c optional acpi contrib/dev/acpica/components/parser/pswalk.c optional acpi contrib/dev/acpica/components/parser/psxface.c optional acpi contrib/dev/acpica/components/resources/rsaddr.c optional acpi contrib/dev/acpica/components/resources/rscalc.c optional acpi contrib/dev/acpica/components/resources/rscreate.c optional acpi contrib/dev/acpica/components/resources/rsdump.c optional acpi acpi_debug contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi contrib/dev/acpica/components/resources/rsinfo.c optional acpi contrib/dev/acpica/components/resources/rsio.c optional acpi contrib/dev/acpica/components/resources/rsirq.c optional acpi contrib/dev/acpica/components/resources/rslist.c optional acpi contrib/dev/acpica/components/resources/rsmemory.c optional acpi contrib/dev/acpica/components/resources/rsmisc.c optional acpi contrib/dev/acpica/components/resources/rsserial.c optional acpi contrib/dev/acpica/components/resources/rsutils.c optional acpi contrib/dev/acpica/components/resources/rsxface.c optional acpi contrib/dev/acpica/components/tables/tbdata.c optional acpi contrib/dev/acpica/components/tables/tbfadt.c optional acpi contrib/dev/acpica/components/tables/tbfind.c optional acpi contrib/dev/acpica/components/tables/tbinstal.c optional acpi contrib/dev/acpica/components/tables/tbprint.c optional acpi contrib/dev/acpica/components/tables/tbutils.c optional acpi contrib/dev/acpica/components/tables/tbxface.c optional acpi contrib/dev/acpica/components/tables/tbxfload.c optional acpi contrib/dev/acpica/components/tables/tbxfroot.c optional acpi contrib/dev/acpica/components/utilities/utaddress.c optional acpi contrib/dev/acpica/components/utilities/utalloc.c optional acpi contrib/dev/acpica/components/utilities/utascii.c optional acpi contrib/dev/acpica/components/utilities/utbuffer.c optional acpi contrib/dev/acpica/components/utilities/utcache.c optional acpi contrib/dev/acpica/components/utilities/utcopy.c optional acpi contrib/dev/acpica/components/utilities/utdebug.c optional acpi contrib/dev/acpica/components/utilities/utdecode.c optional acpi contrib/dev/acpica/components/utilities/utdelete.c optional acpi contrib/dev/acpica/components/utilities/uterror.c optional acpi contrib/dev/acpica/components/utilities/uteval.c optional acpi contrib/dev/acpica/components/utilities/utexcep.c optional acpi contrib/dev/acpica/components/utilities/utglobal.c optional acpi contrib/dev/acpica/components/utilities/uthex.c optional acpi contrib/dev/acpica/components/utilities/utids.c optional acpi contrib/dev/acpica/components/utilities/utinit.c optional acpi contrib/dev/acpica/components/utilities/utlock.c optional acpi contrib/dev/acpica/components/utilities/utmath.c optional acpi contrib/dev/acpica/components/utilities/utmisc.c optional acpi contrib/dev/acpica/components/utilities/utmutex.c optional acpi contrib/dev/acpica/components/utilities/utnonansi.c optional acpi contrib/dev/acpica/components/utilities/utobject.c optional acpi contrib/dev/acpica/components/utilities/utosi.c optional acpi contrib/dev/acpica/components/utilities/utownerid.c optional acpi contrib/dev/acpica/components/utilities/utpredef.c optional acpi contrib/dev/acpica/components/utilities/utresdecode.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi contrib/dev/acpica/components/utilities/utstrsuppt.c optional acpi contrib/dev/acpica/components/utilities/utstrtoul64.c optional acpi contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi contrib/dev/acpica/os_specific/service_layers/osgendbg.c optional acpi acpi_debug contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_frag.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_log.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter ${NO_WTAUTOLOGICAL_POINTER_COMPARE}" contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat6.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_rules.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_scan.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_dstlist.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/radix_ipf.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/libfdt/fdt.c optional fdt contrib/libfdt/fdt_ro.c optional fdt contrib/libfdt/fdt_rw.c optional fdt contrib/libfdt/fdt_strerror.c optional fdt contrib/libfdt/fdt_sw.c optional fdt contrib/libfdt/fdt_wip.c optional fdt contrib/libnv/cnvlist.c standard contrib/libnv/dnvlist.c standard contrib/libnv/nvlist.c standard contrib/libnv/nvpair.c standard contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_dump.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_port.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_sig.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_user.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/unisap.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/misc/straddr.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/misc/unimsg_common.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/traffic.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/uni_ie.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/uni_msg.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/saal/saal_sscfu.c optional ngatm_sscfu \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/saal/saal_sscop.c optional ngatm_sscop \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_call.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_coord.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_party.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_print.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_reset.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_uni.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_unimsgcpy.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" # xz dev/xz/xz_mod.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_crc32.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" # Zstd contrib/zstd/lib/freebsd/zstd_kmalloc.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/zstd_common.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/fse_decompress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/entropy_common.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/error_private.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/xxhash.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_compress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_compress_literals.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_compress_sequences.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/fse_compress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/hist.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/huf_compress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_double_fast.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_fast.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_lazy.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_ldm.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_opt.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/decompress/zstd_ddict.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/decompress/zstd_decompress.c optional zstdio compile-with ${ZSTD_C} # See comment in sys/conf/kern.pre.mk contrib/zstd/lib/decompress/zstd_decompress_block.c optional zstdio \ compile-with "${ZSTD_C} ${ZSTD_DECOMPRESS_BLOCK_FLAGS}" contrib/zstd/lib/decompress/huf_decompress.c optional zstdio compile-with ${ZSTD_C} # Blake 2 contrib/libb2/blake2b-ref.c optional crypto | ipsec | ipsec_support \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" contrib/libb2/blake2s-ref.c optional crypto | ipsec | ipsec_support \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" crypto/blake2/blake2-sw.c optional crypto | ipsec | ipsec_support \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual" crypto/blowfish/bf_ecb.c optional ipsec | ipsec_support crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support crypto/chacha20/chacha.c standard crypto/chacha20/chacha-sw.c optional crypto | ipsec | ipsec_support crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb crypto/des/des_setkey.c optional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | geom_bde | \ ipsec | ipsec_support | !random_loadable | wlan_ccmp crypto/rijndael/rijndael-api-fst.c optional ekcd | geom_bde | !random_loadable crypto/rijndael/rijndael-api.c optional crypto | ipsec | ipsec_support | \ wlan_ccmp crypto/sha1.c optional carp | crypto | ether | ipsec | \ ipsec_support | netgraph_mppc_encryption | sctp crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | \ ipsec_support | !random_loadable | sctp | zfs crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | \ ipsec_support | zfs crypto/skein/skein.c optional crypto | zfs crypto/skein/skein_block.c optional crypto | zfs crypto/siphash/siphash.c optional inet | inet6 crypto/siphash/siphash_test.c optional inet | inet6 ddb/db_access.c optional ddb ddb/db_break.c optional ddb ddb/db_capture.c optional ddb ddb/db_command.c optional ddb ddb/db_examine.c optional ddb ddb/db_expr.c optional ddb ddb/db_input.c optional ddb ddb/db_lex.c optional ddb ddb/db_main.c optional ddb ddb/db_output.c optional ddb ddb/db_print.c optional ddb ddb/db_ps.c optional ddb ddb/db_run.c optional ddb ddb/db_script.c optional ddb ddb/db_sym.c optional ddb ddb/db_thread.c optional ddb ddb/db_textdump.c optional ddb ddb/db_variables.c optional ddb ddb/db_watch.c optional ddb ddb/db_write_cmd.c optional ddb dev/aac/aac.c optional aac dev/aac/aac_cam.c optional aacp aac dev/aac/aac_debug.c optional aac dev/aac/aac_disk.c optional aac dev/aac/aac_linux.c optional aac compat_linux dev/aac/aac_pci.c optional aac pci dev/aacraid/aacraid.c optional aacraid dev/aacraid/aacraid_cam.c optional aacraid scbus dev/aacraid/aacraid_debug.c optional aacraid dev/aacraid/aacraid_linux.c optional aacraid compat_linux dev/aacraid/aacraid_pci.c optional aacraid pci dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi dev/acpi_support/acpi_asus_wmi.c optional acpi_asus_wmi acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi dev/acpi_support/atk0110.c optional aibs acpi dev/acpica/Osd/OsdDebug.c optional acpi dev/acpica/Osd/OsdHardware.c optional acpi dev/acpica/Osd/OsdInterrupt.c optional acpi dev/acpica/Osd/OsdMemory.c optional acpi dev/acpica/Osd/OsdSchedule.c optional acpi dev/acpica/Osd/OsdStream.c optional acpi dev/acpica/Osd/OsdSynch.c optional acpi dev/acpica/Osd/OsdTable.c optional acpi dev/acpica/acpi.c optional acpi dev/acpica/acpi_acad.c optional acpi dev/acpica/acpi_battery.c optional acpi dev/acpica/acpi_button.c optional acpi dev/acpica/acpi_cmbat.c optional acpi dev/acpica/acpi_cpu.c optional acpi dev/acpica/acpi_ec.c optional acpi dev/acpica/acpi_isab.c optional acpi isa dev/acpica/acpi_lid.c optional acpi dev/acpica/acpi_package.c optional acpi dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi dev/acpica/acpi_container.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink dev/ae/if_ae.c optional ae pci dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci dev/ahci/ahci.c optional ahci dev/ahci/ahciem.c optional ahci dev/ahci/ahci_pci.c optional ahci pci dev/aic7xxx/ahc_isa.c optional ahc isa dev/aic7xxx/ahc_pci.c optional ahc pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/ahd_pci.c optional ahd pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/aic7770.c optional ahc dev/aic7xxx/aic79xx.c optional ahd pci dev/aic7xxx/aic79xx_osm.c optional ahd pci dev/aic7xxx/aic79xx_pci.c optional ahd pci dev/aic7xxx/aic79xx_reg_print.c optional ahd pci ahd_reg_pretty_print dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci dev/aic7xxx/aic7xxx_reg_print.c optional ahc ahc_reg_pretty_print dev/al_eth/al_eth.c optional al_eth fdt \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/al_eth/al_init_eth_lm.c optional al_eth fdt \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/al_eth/al_init_eth_kr.c optional al_eth fdt \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_iofic.c optional al_iofic \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_serdes_25g.c optional al_serdes \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_serdes_hssp.c optional al_serdes \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_config.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_debug.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_iofic.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_main.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_serdes.c optional al_serdes \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/eth/al_hal_eth_kr.c optional al_eth \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/eth/al_hal_eth_main.c optional al_eth \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/alpm/alpm.c optional alpm pci dev/altera/avgen/altera_avgen.c optional altera_avgen dev/altera/avgen/altera_avgen_fdt.c optional altera_avgen fdt dev/altera/avgen/altera_avgen_nexus.c optional altera_avgen dev/altera/msgdma/msgdma.c optional altera_msgdma xdma dev/altera/sdcard/altera_sdcard.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_fdt.c optional altera_sdcard fdt dev/altera/sdcard/altera_sdcard_nexus.c optional altera_sdcard dev/altera/softdma/softdma.c optional altera_softdma xdma fdt dev/altera/pio/pio.c optional altera_pio dev/altera/pio/pio_if.m optional altera_pio dev/amdpm/amdpm.c optional amdpm pci | nfpm pci dev/amdsmb/amdsmb.c optional amdsmb pci dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr dev/amr/amr_disk.c optional amr dev/amr/amr_linux.c optional amr compat_linux dev/amr/amr_pci.c optional amr pci dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an pccard dev/an/if_an_pci.c optional an pci # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-dma.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-sata.c optional ata | atacore dev/ata/ata-card.c optional ata pccard | atapccard dev/ata/ata-isa.c optional ata isa | ataisa dev/ata/ata-pci.c optional ata pci | atapci dev/ata/chipsets/ata-acard.c optional ata pci | ataacard dev/ata/chipsets/ata-acerlabs.c optional ata pci | ataacerlabs dev/ata/chipsets/ata-amd.c optional ata pci | ataamd dev/ata/chipsets/ata-ati.c optional ata pci | ataati dev/ata/chipsets/ata-cenatek.c optional ata pci | atacenatek dev/ata/chipsets/ata-cypress.c optional ata pci | atacypress dev/ata/chipsets/ata-cyrix.c optional ata pci | atacyrix dev/ata/chipsets/ata-highpoint.c optional ata pci | atahighpoint dev/ata/chipsets/ata-intel.c optional ata pci | ataintel dev/ata/chipsets/ata-ite.c optional ata pci | ataite dev/ata/chipsets/ata-jmicron.c optional ata pci | atajmicron dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell dev/ata/chipsets/ata-micron.c optional ata pci | atamicron dev/ata/chipsets/ata-national.c optional ata pci | atanational dev/ata/chipsets/ata-netcell.c optional ata pci | atanetcell dev/ata/chipsets/ata-nvidia.c optional ata pci | atanvidia dev/ata/chipsets/ata-promise.c optional ata pci | atapromise dev/ata/chipsets/ata-serverworks.c optional ata pci | ataserverworks dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage | ataati dev/ata/chipsets/ata-sis.c optional ata pci | atasis dev/ata/chipsets/ata-via.c optional ata pci | atavia # dev/ath/if_ath_pci.c optional ath_pci pci \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/if_ath_ahb.c optional ath_ahb \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/if_ath.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_alq.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex_mci.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_descdma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_ioctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_led.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_lna_div.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_ht.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tdma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_sysctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_spectral.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ah_osdep.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/ath_hal/ah.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v1.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v3.c optional ath_hal | ath_ar5211 | ath_ar5212 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v14.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v4k.c \ optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_9287.c \ optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ compile-with "${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath" # ar5210 dev/ath/ath_hal/ar5210/ar5210_attach.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_beacon.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_interrupts.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_keycache.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_misc.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_phy.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_power.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_recv.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_reset.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_xmit.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5211 dev/ath/ath_hal/ar5211/ar5211_attach.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_beacon.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_interrupts.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_keycache.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_misc.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_phy.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_power.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_recv.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_reset.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_xmit.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5212 dev/ath/ath_hal/ar5212/ar5212_ani.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_attach.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_beacon.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_eeprom.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_gpio.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_interrupts.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_keycache.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_misc.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_phy.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_power.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_recv.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_reset.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_rfgain.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_xmit.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5416 (depends on ar5212) dev/ath/ath_hal/ar5416/ar5416_ani.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_attach.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_beacon.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_btcoex.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_iq.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_eeprom.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_gpio.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_interrupts.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_keycache.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_misc.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_phy.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_power.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_radar.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_recv.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_reset.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_spectral.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_xmit.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130 # # Since this is an embedded MAC SoC, there's no need to compile it into the # default HAL. dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9001/ar9130_phy.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9001/ar9130_eeprom.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9160 (depends on ar5416) dev/ath/ath_hal/ar9001/ar9160_attach.c optional ath_hal | ath_ar9160 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9280 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9280_attach.c optional ath_hal | ath_ar9280 | \ ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280_olc.c optional ath_hal | ath_ar9280 | \ ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9285 (depends on ar5416 and ar9280) dev/ath/ath_hal/ar9002/ar9285_attach.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_btcoex.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_phy.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9287 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9300 contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal ${NO_WCONSTANT_CONVERSION}" contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_interrupts.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_mci.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_paprd.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_phy.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_power.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal ${NO_WSOMETIMES_UNINITIALIZED} -Wno-unused-function" contrib/dev/ath/ath_hal/ar9300/ar9300_stub.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_timer.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" # rf backends dev/ath/ath_hal/ar5212/ar2316.c optional ath_rf2316 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2317.c optional ath_rf2317 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2413.c optional ath_hal | ath_rf2413 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2425.c optional ath_hal | ath_rf2425 | ath_rf2417 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5111.c optional ath_hal | ath_rf5111 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5112.c optional ath_hal | ath_rf5112 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5413.c optional ath_hal | ath_rf5413 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar2133.c optional ath_hal | ath_ar5416 | \ ath_ar9130 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280.c optional ath_hal | ath_ar9280 | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ath rate control algorithms dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ compile-with "${NORMAL_C} -I$S/dev/ath" # ath DFS modules dev/ath/ath_dfs/null/dfs_null.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bhnd/bhnd.c optional bhnd dev/bhnd/bhnd_erom.c optional bhnd dev/bhnd/bhnd_erom_if.m optional bhnd dev/bhnd/bhnd_subr.c optional bhnd dev/bhnd/bhnd_bus_if.m optional bhnd dev/bhnd/bhndb/bhnd_bhndb.c optional bhndb bhnd dev/bhnd/bhndb/bhndb.c optional bhndb bhnd dev/bhnd/bhndb/bhndb_bus_if.m optional bhndb bhnd dev/bhnd/bhndb/bhndb_hwdata.c optional bhndb bhnd dev/bhnd/bhndb/bhndb_if.m optional bhndb bhnd dev/bhnd/bhndb/bhndb_pci.c optional bhndb_pci bhndb bhnd pci dev/bhnd/bhndb/bhndb_pci_hwdata.c optional bhndb_pci bhndb bhnd pci dev/bhnd/bhndb/bhndb_pci_sprom.c optional bhndb_pci bhndb bhnd pci dev/bhnd/bhndb/bhndb_subr.c optional bhndb bhnd dev/bhnd/bcma/bcma.c optional bcma bhnd dev/bhnd/bcma/bcma_bhndb.c optional bcma bhnd bhndb dev/bhnd/bcma/bcma_erom.c optional bcma bhnd dev/bhnd/bcma/bcma_subr.c optional bcma bhnd dev/bhnd/cores/chipc/bhnd_chipc_if.m optional bhnd dev/bhnd/cores/chipc/bhnd_sprom_chipc.c optional bhnd dev/bhnd/cores/chipc/bhnd_pmu_chipc.c optional bhnd dev/bhnd/cores/chipc/chipc.c optional bhnd dev/bhnd/cores/chipc/chipc_cfi.c optional bhnd cfi dev/bhnd/cores/chipc/chipc_gpio.c optional bhnd gpio dev/bhnd/cores/chipc/chipc_slicer.c optional bhnd cfi | bhnd spibus dev/bhnd/cores/chipc/chipc_spi.c optional bhnd spibus dev/bhnd/cores/chipc/chipc_subr.c optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl.c optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_if.m optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_hostb_if.m optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c optional bhnd dev/bhnd/cores/pci/bhnd_pci.c optional bhnd pci dev/bhnd/cores/pci/bhnd_pci_hostb.c optional bhndb bhnd pci dev/bhnd/cores/pci/bhnd_pcib.c optional bhnd_pcib bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2.c optional bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c optional bhndb bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2b.c optional bhnd_pcie2b bhnd pci dev/bhnd/cores/pmu/bhnd_pmu.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_core.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_if.m optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_bcm.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_bcmraw.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_btxt.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_sprom.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_sprom_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_tlv.c optional bhnd dev/bhnd/nvram/bhnd_nvram_if.m optional bhnd dev/bhnd/nvram/bhnd_nvram_io.c optional bhnd dev/bhnd/nvram/bhnd_nvram_iobuf.c optional bhnd dev/bhnd/nvram/bhnd_nvram_ioptr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_iores.c optional bhnd dev/bhnd/nvram/bhnd_nvram_plist.c optional bhnd dev/bhnd/nvram/bhnd_nvram_store.c optional bhnd dev/bhnd/nvram/bhnd_nvram_store_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value_fmts.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value_prf.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value_subr.c optional bhnd dev/bhnd/nvram/bhnd_sprom.c optional bhnd dev/bhnd/siba/siba.c optional siba bhnd dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb dev/bhnd/siba/siba_erom.c optional siba bhnd dev/bhnd/siba/siba_subr.c optional siba bhnd # -dev/bktr/bktr_audio.c optional bktr pci -dev/bktr/bktr_card.c optional bktr pci -dev/bktr/bktr_core.c optional bktr pci -dev/bktr/bktr_i2c.c optional bktr pci smbus -dev/bktr/bktr_os.c optional bktr pci -dev/bktr/bktr_tuner.c optional bktr pci -dev/bktr/msp34xx.c optional bktr pci dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci dev/bnxt/bnxt_txrx.c optional bnxt iflib pci dev/bnxt/if_bnxt.c optional bnxt iflib pci dev/bwi/bwimac.c optional bwi dev/bwi/bwiphy.c optional bwi dev/bwi/bwirf.c optional bwi dev/bwi/if_bwi.c optional bwi dev/bwi/if_bwi_pci.c optional bwi pci dev/bwn/if_bwn.c optional bwn bhnd dev/bwn/if_bwn_pci.c optional bwn pci bhnd bhndb bhndb_pci dev/bwn/if_bwn_phy_common.c optional bwn bhnd dev/bwn/if_bwn_phy_g.c optional bwn bhnd dev/bwn/if_bwn_phy_lp.c optional bwn bhnd dev/bwn/if_bwn_phy_n.c optional bwn bhnd dev/bwn/if_bwn_util.c optional bwn bhnd dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus dev/cas/if_cas.c optional cas dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/cfi/cfi_bus_nexus.c optional cfi dev/cfi/cfi_core.c optional cfi dev/cfi/cfi_dev.c optional cfi dev/cfi/cfi_disk.c optional cfid dev/chromebook_platform/chromebook_platform.c optional chromebook_platform dev/ciss/ciss.c optional ciss dev/cmx/cmx.c optional cmx dev/cmx/cmx_pccard.c optional cmx pccard dev/cpufreq/ichss.c optional cpufreq pci dev/cxgb/cxgb_main.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_sge.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mc5.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_vsc7323.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_vsc8211.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_ael1002.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_aq100x.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_xgmac.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_tn1010.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/sys/uipc_mvec.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_clip.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_filter.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_if.m optional cxgbe pci dev/cxgbe/t4_iov.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sched.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_smt.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_tracer.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_vf.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/crypto/t4_kern_tls.c optional cxgbe pci kern_tls \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/crypto/t4_keyctx.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_common.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_flash_utils.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_lib.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_wtp.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/fastlz.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/fastlz_api.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" t4fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t4fw_cfg.c" t4fw_cfg.fwo optional cxgbe \ dependency "t4fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw_cfg.fwo" t4fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg.fw" t4fw_cfg_uwire.fwo optional cxgbe \ dependency "t4fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw_cfg_uwire.fwo" t4fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg_uwire.fw" t4fw.fwo optional cxgbe \ dependency "t4fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw-1.24.12.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" t5fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw_cfg_uwire.fw:t5fw_cfg_uwire t5fw.fw:t5fw -mt5fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t5fw_cfg.c" t5fw_cfg.fwo optional cxgbe \ dependency "t5fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw_cfg.fwo" t5fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw_cfg.fw" t5fw_cfg_uwire.fwo optional cxgbe \ dependency "t5fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw_cfg_uwire.fwo" t5fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw_cfg_uwire.fw" t5fw.fwo optional cxgbe \ dependency "t5fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw-1.24.12.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" t6fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t6fw_cfg.fw:t6fw_cfg t6fw_cfg_uwire.fw:t6fw_cfg_uwire t6fw.fw:t6fw -mt6fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t6fw_cfg.c" t6fw_cfg.fwo optional cxgbe \ dependency "t6fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t6fw_cfg.fwo" t6fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t6fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw_cfg.fw" t6fw_cfg_uwire.fwo optional cxgbe \ dependency "t6fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t6fw_cfg_uwire.fwo" t6fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t6fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw_cfg_uwire.fw" t6fw.fwo optional cxgbe \ dependency "t6fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t6fw-1.24.12.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" dev/cxgbe/crypto/t4_crypto.c optional ccr \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci dev/cyapa/cyapa.c optional cyapa iicbus dev/dc/if_dc.c optional dc pci dev/dc/dcphy.c optional dc pci dev/dc/pnphy.c optional dc pci dev/dcons/dcons.c optional dcons dev/dcons/dcons_crom.c optional dcons_crom dev/dcons/dcons_os.c optional dcons dev/dme/if_dme.c optional dme dev/drm2/drm_agpsupport.c optional drm2 dev/drm2/drm_auth.c optional drm2 dev/drm2/drm_bufs.c optional drm2 dev/drm2/drm_buffer.c optional drm2 dev/drm2/drm_context.c optional drm2 dev/drm2/drm_crtc.c optional drm2 dev/drm2/drm_crtc_helper.c optional drm2 dev/drm2/drm_dma.c optional drm2 dev/drm2/drm_dp_helper.c optional drm2 dev/drm2/drm_dp_iic_helper.c optional drm2 dev/drm2/drm_drv.c optional drm2 dev/drm2/drm_edid.c optional drm2 dev/drm2/drm_fb_helper.c optional drm2 dev/drm2/drm_fops.c optional drm2 dev/drm2/drm_gem.c optional drm2 dev/drm2/drm_gem_names.c optional drm2 dev/drm2/drm_global.c optional drm2 dev/drm2/drm_hashtab.c optional drm2 dev/drm2/drm_ioctl.c optional drm2 dev/drm2/drm_irq.c optional drm2 dev/drm2/drm_linux_list_sort.c optional drm2 dev/drm2/drm_lock.c optional drm2 dev/drm2/drm_memory.c optional drm2 dev/drm2/drm_mm.c optional drm2 dev/drm2/drm_modes.c optional drm2 dev/drm2/drm_pci.c optional drm2 dev/drm2/drm_platform.c optional drm2 dev/drm2/drm_scatter.c optional drm2 dev/drm2/drm_stub.c optional drm2 dev/drm2/drm_sysctl.c optional drm2 dev/drm2/drm_vm.c optional drm2 dev/drm2/drm_os_freebsd.c optional drm2 dev/drm2/ttm/ttm_agp_backend.c optional drm2 dev/drm2/ttm/ttm_lock.c optional drm2 dev/drm2/ttm/ttm_object.c optional drm2 dev/drm2/ttm/ttm_tt.c optional drm2 dev/drm2/ttm/ttm_bo_util.c optional drm2 dev/drm2/ttm/ttm_bo.c optional drm2 dev/drm2/ttm/ttm_bo_manager.c optional drm2 dev/drm2/ttm/ttm_execbuf_util.c optional drm2 dev/drm2/ttm/ttm_memory.c optional drm2 dev/drm2/ttm/ttm_page_alloc.c optional drm2 dev/drm2/ttm/ttm_bo_vm.c optional drm2 dev/efidev/efidev.c optional efirt dev/efidev/efirt.c optional efirt dev/efidev/efirtc.c optional efirt dev/e1000/if_em.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/em_txrx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/igb_txrx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82540.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82541.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82542.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82543.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82571.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82575.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_ich8lan.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_i210.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_api.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mac.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_manage.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_nvm.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_phy.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_vf.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mbx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_osdep.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et dev/ena/ena.c optional ena \ compile-with "${NORMAL_C} -I$S/contrib" dev/ena/ena_sysctl.c optional ena \ compile-with "${NORMAL_C} -I$S/contrib" contrib/ena-com/ena_com.c optional ena contrib/ena-com/ena_eth_com.c optional ena dev/esp/esp_pci.c optional esp pci dev/esp/ncr53c9x.c optional esp dev/etherswitch/arswitch/arswitch.c optional arswitch dev/etherswitch/arswitch/arswitch_reg.c optional arswitch dev/etherswitch/arswitch/arswitch_phy.c optional arswitch dev/etherswitch/arswitch/arswitch_8216.c optional arswitch dev/etherswitch/arswitch/arswitch_8226.c optional arswitch dev/etherswitch/arswitch/arswitch_8316.c optional arswitch dev/etherswitch/arswitch/arswitch_8327.c optional arswitch dev/etherswitch/arswitch/arswitch_7240.c optional arswitch dev/etherswitch/arswitch/arswitch_9340.c optional arswitch dev/etherswitch/arswitch/arswitch_vlans.c optional arswitch dev/etherswitch/etherswitch.c optional etherswitch dev/etherswitch/etherswitch_if.m optional etherswitch dev/etherswitch/ip17x/ip17x.c optional ip17x dev/etherswitch/ip17x/ip175c.c optional ip17x dev/etherswitch/ip17x/ip175d.c optional ip17x dev/etherswitch/ip17x/ip17x_phy.c optional ip17x dev/etherswitch/ip17x/ip17x_vlans.c optional ip17x dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/etherswitch/e6000sw/e6000sw.c optional e6000sw dev/etherswitch/e6000sw/e6060sw.c optional e6060sw dev/etherswitch/infineon/adm6996fc.c optional adm6996fc dev/etherswitch/micrel/ksz8995ma.c optional ksz8995ma dev/etherswitch/ukswitch/ukswitch.c optional ukswitch dev/evdev/cdev.c optional evdev dev/evdev/evdev.c optional evdev dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/exca/exca.c optional cbb dev/extres/clk/clk.c optional ext_resources clk fdt dev/extres/clk/clkdev_if.m optional ext_resources clk fdt dev/extres/clk/clknode_if.m optional ext_resources clk fdt dev/extres/clk/clk_bus.c optional ext_resources clk fdt dev/extres/clk/clk_div.c optional ext_resources clk fdt dev/extres/clk/clk_fixed.c optional ext_resources clk fdt dev/extres/clk/clk_gate.c optional ext_resources clk fdt dev/extres/clk/clk_link.c optional ext_resources clk fdt dev/extres/clk/clk_mux.c optional ext_resources clk fdt dev/extres/phy/phy.c optional ext_resources phy fdt dev/extres/phy/phydev_if.m optional ext_resources phy fdt dev/extres/phy/phynode_if.m optional ext_resources phy fdt dev/extres/phy/phy_usb.c optional ext_resources phy fdt dev/extres/phy/phynode_usb_if.m optional ext_resources phy fdt dev/extres/hwreset/hwreset.c optional ext_resources hwreset fdt dev/extres/hwreset/hwreset_if.m optional ext_resources hwreset fdt dev/extres/nvmem/nvmem.c optional ext_resources nvmem fdt dev/extres/nvmem/nvmem_if.m optional ext_resources nvmem fdt dev/extres/regulator/regdev_if.m optional ext_resources regulator fdt dev/extres/regulator/regnode_if.m optional ext_resources regulator fdt dev/extres/regulator/regulator.c optional ext_resources regulator fdt dev/extres/regulator/regulator_bus.c optional ext_resources regulator fdt dev/extres/regulator/regulator_fixed.c optional ext_resources regulator fdt dev/extres/syscon/syscon.c optional ext_resources syscon dev/extres/syscon/syscon_generic.c optional ext_resources syscon fdt dev/extres/syscon/syscon_if.m optional ext_resources syscon dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash dev/fdt/fdt_clock.c optional fdt fdt_clock dev/fdt/fdt_clock_if.m optional fdt fdt_clock dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_pinctrl.c optional fdt fdt_pinctrl dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl dev/fdt/fdt_slicer.c optional fdt cfi | fdt mx25l | fdt n25q | fdt at45d dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "${FDT_DTS_FILE:T:R}.dtb" dev/fdt/simplebus.c optional fdt dev/fdt/simple_mfd.c optional syscon fdt dev/filemon/filemon.c optional filemon dev/firewire/firewire.c optional firewire dev/firewire/fwcrom.c optional firewire dev/firewire/fwdev.c optional firewire dev/firewire/fwdma.c optional firewire dev/firewire/fwmem.c optional firewire dev/firewire/fwohci.c optional firewire dev/firewire/fwohci_pci.c optional firewire pci dev/firewire/if_fwe.c optional fwe dev/firewire/if_fwip.c optional fwip dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d dev/flash/cqspi.c optional cqspi fdt xdma dev/flash/mx25l.c optional mx25l dev/flash/n25q.c optional n25q fdt dev/flash/qspi_if.m optional cqspi fdt | n25q fdt dev/fxp/if_fxp.c optional fxp dev/fxp/inphy.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gpio/dwgpio/dwgpio.c optional gpio dwgpio fdt dev/gpio/dwgpio/dwgpio_bus.c optional gpio dwgpio fdt dev/gpio/dwgpio/dwgpio_if.m optional gpio dwgpio fdt dev/gpio/gpiobacklight.c optional gpiobacklight fdt dev/gpio/gpiokeys.c optional gpiokeys fdt dev/gpio/gpiokeys_codes.c optional gpiokeys fdt dev/gpio/gpiobus.c optional gpio \ dependency "gpiobus_if.h" dev/gpio/gpioc.c optional gpio \ dependency "gpio_if.h" dev/gpio/gpioiic.c optional gpioiic dev/gpio/gpioled.c optional gpioled !fdt dev/gpio/gpioled_fdt.c optional gpioled fdt dev/gpio/gpiomdio.c optional gpiomdio mii_bitbang dev/gpio/gpiopower.c optional gpiopower fdt dev/gpio/gpioregulator.c optional gpioregulator fdt ext_resources dev/gpio/gpiospi.c optional gpiospi dev/gpio/gpioths.c optional gpioths dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio dev/gpio/gpiopps.c optional gpiopps fdt dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc dev/ichiic/ig4_acpi.c optional ig4 acpi iicbus dev/ichiic/ig4_iic.c optional ig4 iicbus dev/ichiic/ig4_pci.c optional ig4 pci iicbus dev/ichsmb/ichsmb.c optional ichsmb dev/ichsmb/ichsmb_pci.c optional ichsmb pci dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ads111x.c optional ads111x dev/iicbus/ds1307.c optional ds1307 dev/iicbus/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/ds1672.c optional ds1672 dev/iicbus/ds3231.c optional ds3231 dev/iicbus/syr827.c optional syr827 ext_resources fdt dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic dev/iicbus/iic_recover_bus.c optional iicbus dev/iicbus/iicbb.c optional iicbb dev/iicbus/iicbb_if.m optional iicbb dev/iicbus/iicbus.c optional iicbus dev/iicbus/iicbus_if.m optional iicbus dev/iicbus/iiconf.c optional iicbus dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" dev/iicbus/iicoc.c optional iicoc dev/iicbus/iicoc_fdt.c optional iicoc ext_resources fdt dev/iicbus/iicoc_pci.c optional iicoc pci dev/iicbus/isl12xx.c optional isl12xx dev/iicbus/lm75.c optional lm75 dev/iicbus/mux/iicmux.c optional iicmux dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt dev/iicbus/mux/ltc430x.c optional ltc430x dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/rtc8583.c optional rtc8583 dev/iicbus/s35390a.c optional s35390a dev/iicbus/sy8106a.c optional sy8106a ext_resources fdt dev/iir/iir.c optional iir dev/iir/iir_ctrl.c optional iir dev/iir/iir_pci.c optional iir pci dev/intpm/intpm.c optional intpm pci # XXX Work around clang warning, until maintainer approves fix. dev/ips/ips.c optional ips \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/ips/ips_commands.c optional ips dev/ips/ips_disk.c optional ips dev/ips/ips_ioctl.c optional ips dev/ips/ips_pci.c optional ips pci dev/ipw/if_ipw.c optional ipw ipwbssfw.c optional ipwbssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_bss.fw:ipw_bss:130 -lintel_ipw -mipw_bss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwbssfw.c" ipw_bss.fwo optional ipwbssfw | ipwfw \ dependency "ipw_bss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_bss.fwo" ipw_bss.fw optional ipwbssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_bss.fw" ipwibssfw.c optional ipwibssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_ibss.fw:ipw_ibss:130 -lintel_ipw -mipw_ibss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwibssfw.c" ipw_ibss.fwo optional ipwibssfw | ipwfw \ dependency "ipw_ibss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_ibss.fwo" ipw_ibss.fw optional ipwibssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_ibss.fw" ipwmonitorfw.c optional ipwmonitorfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_monitor.fw:ipw_monitor:130 -lintel_ipw -mipw_monitor -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwmonitorfw.c" ipw_monitor.fwo optional ipwmonitorfw | ipwfw \ dependency "ipw_monitor.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_monitor.fwo" ipw_monitor.fw optional ipwmonitorfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" dev/iscsi/icl.c optional iscsi dev/iscsi/icl_conn_if.m optional cfiscsi | iscsi dev/iscsi/icl_soft.c optional iscsi dev/iscsi/icl_soft_proxy.c optional iscsi dev/iscsi/iscsi.c optional iscsi scbus dev/iscsi_initiator/iscsi.c optional iscsi_initiator scbus dev/iscsi_initiator/iscsi_subr.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_cam.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_soc.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_sm.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_subr.c optional iscsi_initiator scbus dev/ismt/ismt.c optional ismt dev/isl/isl.c optional isl iicbus dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp dev/isp/isp_library.c optional isp dev/isp/isp_pci.c optional isp pci dev/isp/isp_target.c optional isp dev/ispfw/ispfw.c optional ispfw dev/iwi/if_iwi.c optional iwi iwibssfw.c optional iwibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_bss.fw:iwi_bss:300 -lintel_iwi -miwi_bss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwibssfw.c" iwi_bss.fwo optional iwibssfw | iwifw \ dependency "iwi_bss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_bss.fwo" iwi_bss.fw optional iwibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_bss.fw" iwiibssfw.c optional iwiibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_ibss.fw:iwi_ibss:300 -lintel_iwi -miwi_ibss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwiibssfw.c" iwi_ibss.fwo optional iwiibssfw | iwifw \ dependency "iwi_ibss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_ibss.fwo" iwi_ibss.fw optional iwiibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_ibss.fw" iwimonitorfw.c optional iwimonitorfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_monitor.fw:iwi_monitor:300 -lintel_iwi -miwi_monitor -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwimonitorfw.c" iwi_monitor.fwo optional iwimonitorfw | iwifw \ dependency "iwi_monitor.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_monitor.fwo" iwi_monitor.fw optional iwimonitorfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_7000.c optional iwm dev/iwm/if_iwm_8000.c optional iwm dev/iwm/if_iwm_9000.c optional iwm dev/iwm/if_iwm_9260.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_fw.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm dev/iwm/if_iwm_notif_wait.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm dev/iwm/if_iwm_power.c optional iwm dev/iwm/if_iwm_scan.c optional iwm dev/iwm/if_iwm_sf.c optional iwm dev/iwm/if_iwm_sta.c optional iwm dev/iwm/if_iwm_time_event.c optional iwm dev/iwm/if_iwm_util.c optional iwm iwm3160fw.c optional iwm3160fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3160.fw:iwm3160fw -miwm3160fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm3160fw.c" iwm3160fw.fwo optional iwm3160fw | iwmfw \ dependency "iwm3160.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-3160-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" iwm3168fw.c optional iwm3168fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3168.fw:iwm3168fw -miwm3168fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm3168fw.c" iwm3168fw.fwo optional iwm3168fw | iwmfw \ dependency "iwm3168.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm3168fw.fwo" iwm3168.fw optional iwm3168fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-3168-22.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3168.fw" iwm7260fw.c optional iwm7260fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw -miwm7260fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7260fw.c" iwm7260fw.fwo optional iwm7260fw | iwmfw \ dependency "iwm7260.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7260-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" iwm7265fw.c optional iwm7265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265.fw:iwm7265fw -miwm7265fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7265fw.c" iwm7265fw.fwo optional iwm7265fw | iwmfw \ dependency "iwm7265.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7265-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" iwm7265Dfw.c optional iwm7265Dfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265D.fw:iwm7265Dfw -miwm7265Dfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7265Dfw.c" iwm7265Dfw.fwo optional iwm7265Dfw | iwmfw \ dependency "iwm7265D.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7265Dfw.fwo" iwm7265D.fw optional iwm7265Dfw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7265D-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265D.fw" iwm8000Cfw.c optional iwm8000Cfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8000C.fw:iwm8000Cfw -miwm8000Cfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm8000Cfw.c" iwm8000Cfw.fwo optional iwm8000Cfw | iwmfw \ dependency "iwm8000C.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" iwm8265.fw optional iwm8265fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-8265-22.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8265.fw" iwm8265fw.c optional iwm8265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8265.fw:iwm8265fw -miwm8265fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm8265fw.c" iwm8265fw.fwo optional iwm8265fw | iwmfw \ dependency "iwm8265.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm8265fw.fwo" dev/iwn/if_iwn.c optional iwn iwn1000fw.c optional iwn1000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn1000fw.c" iwn1000fw.fwo optional iwn1000fw | iwnfw \ dependency "iwn1000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn1000fw.fwo" iwn1000.fw optional iwn1000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" iwn100fw.c optional iwn100fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn100.fw:iwn100fw -miwn100fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn100fw.c" iwn100fw.fwo optional iwn100fw | iwnfw \ dependency "iwn100.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn100fw.fwo" iwn100.fw optional iwn100fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-100-39.31.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn100.fw" iwn105fw.c optional iwn105fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn105.fw:iwn105fw -miwn105fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn105fw.c" iwn105fw.fwo optional iwn105fw | iwnfw \ dependency "iwn105.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn105fw.fwo" iwn105.fw optional iwn105fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-105-6-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn105.fw" iwn135fw.c optional iwn135fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn135.fw:iwn135fw -miwn135fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn135fw.c" iwn135fw.fwo optional iwn135fw | iwnfw \ dependency "iwn135.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn135fw.fwo" iwn135.fw optional iwn135fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-135-6-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn135.fw" iwn2000fw.c optional iwn2000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw -miwn2000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn2000fw.c" iwn2000fw.fwo optional iwn2000fw | iwnfw \ dependency "iwn2000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn2000fw.fwo" iwn2000.fw optional iwn2000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn2000.fw" iwn2030fw.c optional iwn2030fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2030.fw:iwn2030fw -miwn2030fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn2030fw.c" iwn2030fw.fwo optional iwn2030fw | iwnfw \ dependency "iwn2030.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn2030fw.fwo" iwn2030.fw optional iwn2030fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwnwifi-2030-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn2030.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw -miwn4965fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn4965fw.c" iwn4965fw.fwo optional iwn4965fw | iwnfw \ dependency "iwn4965.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn4965fw.fwo" iwn4965.fw optional iwn4965fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn4965.fw" iwn5000fw.c optional iwn5000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5000.fw:iwn5000fw -miwn5000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn5000fw.c" iwn5000fw.fwo optional iwn5000fw | iwnfw \ dependency "iwn5000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5000fw.fwo" iwn5000.fw optional iwn5000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5150.fw:iwn5150fw -miwn5150fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn5150fw.c" iwn5150fw.fwo optional iwn5150fw | iwnfw \ dependency "iwn5150.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5150fw.fwo" iwn5150.fw optional iwn5150fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu"\ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5150.fw" iwn6000fw.c optional iwn6000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000.fw:iwn6000fw -miwn6000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000fw.c" iwn6000fw.fwo optional iwn6000fw | iwnfw \ dependency "iwn6000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000.fw" iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2a.fw:iwn6000g2afw -miwn6000g2afw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000g2afw.c" iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ dependency "iwn6000g2a.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2afw.fwo" iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2a.fw" iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2b.fw:iwn6000g2bfw -miwn6000g2bfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000g2bfw.c" iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ dependency "iwn6000g2b.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2bfw.fwo" iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6050fw.c" iwn6050fw.fwo optional iwn6050fw | iwnfw \ dependency "iwn6050.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6050fw.fwo" iwn6050.fw optional iwn6050fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6050.fw" dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_bypass.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/if_fdir.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/if_sriov.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ix_txrx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_common.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82598.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x550.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82598.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jedec_dimm/jedec_dimm.c optional jedec_dimm smbus dev/jme/if_jme.c optional jme pci dev/kbd/kbd.c optional atkbd | pckbd | sc | ukbd | vt dev/kbdmux/kbdmux.c optional kbdmux dev/ksyms/ksyms.c optional ksyms dev/le/am7990.c optional le dev/le/am79900.c optional le dev/le/if_le_pci.c optional le pci dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge dev/liquidio/base/cn23xx_pf_device.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_console.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_ctrl.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_device.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_droq.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_mem_ops.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_request_manager.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_response_manager.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_core.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_ioctl.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_main.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_rss.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_rxtx.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_sysctl.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" lio.c optional lio \ compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "lio.c" lio_23xx_nic.bin.fw.fwo optional lio \ dependency "lio_23xx_nic.bin.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "lio_23xx_nic.bin.fw.fwo" lio_23xx_nic.bin.fw optional lio \ dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "lio_23xx_nic.bin.fw" dev/malo/if_malo.c optional malo dev/malo/if_malohal.c optional malo dev/malo/if_malo_pci.c optional malo pci dev/mc146818/mc146818.c optional mc146818 dev/md/md.c optional md dev/mdio/mdio_if.m optional miiproxy | mdio dev/mdio/mdio.c optional miiproxy | mdio dev/mem/memdev.c optional mem dev/mem/memutil.c optional mem dev/mfi/mfi.c optional mfi dev/mfi/mfi_debug.c optional mfi dev/mfi/mfi_pci.c optional mfi pci dev/mfi/mfi_disk.c optional mfi dev/mfi/mfi_syspd.c optional mfi dev/mfi/mfi_tbolt.c optional mfi dev/mfi/mfi_linux.c optional mfi compat_linux dev/mfi/mfi_cam.c optional mfip scbus dev/mii/acphy.c optional miibus | acphy dev/mii/amphy.c optional miibus | amphy dev/mii/atphy.c optional miibus | atphy dev/mii/axphy.c optional miibus | axphy dev/mii/bmtphy.c optional miibus | bmtphy dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.c optional miibus | ciphy dev/mii/e1000phy.c optional miibus | e1000phy dev/mii/gentbi.c optional miibus | gentbi dev/mii/icsphy.c optional miibus | icsphy dev/mii/ip1000phy.c optional miibus | ip1000phy dev/mii/jmphy.c optional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy dev/mii/micphy.c optional miibus fdt | micphy fdt dev/mii/mii.c optional miibus | mii dev/mii/mii_bitbang.c optional miibus | mii_bitbang dev/mii/mii_physubr.c optional miibus | mii dev/mii/mii_fdt.c optional miibus fdt | mii fdt dev/mii/miibus_if.m optional miibus | mii dev/mii/mlphy.c optional miibus | mlphy dev/mii/nsgphy.c optional miibus | nsgphy dev/mii/nsphy.c optional miibus | nsphy dev/mii/nsphyter.c optional miibus | nsphyter dev/mii/pnaphy.c optional miibus | pnaphy dev/mii/qsphy.c optional miibus | qsphy dev/mii/rdcphy.c optional miibus | rdcphy dev/mii/rgephy.c optional miibus | rgephy dev/mii/rlphy.c optional miibus | rlphy dev/mii/rlswitch.c optional rlswitch dev/mii/smcphy.c optional miibus | smcphy dev/mii/smscphy.c optional miibus | smscphy dev/mii/tdkphy.c optional miibus | tdkphy dev/mii/tlphy.c optional miibus | tlphy dev/mii/truephy.c optional miibus | truephy dev/mii/ukphy.c optional miibus | mii dev/mii/ukphy_subr.c optional miibus | mii dev/mii/vscphy.c optional miibus | vscphy dev/mii/xmphy.c optional miibus | xmphy dev/mk48txx/mk48txx.c optional mk48txx dev/mlxfw/mlxfw_fsm.c optional mlxfw \ compile-with "${MLXFW_C}" dev/mlxfw/mlxfw_mfa2.c optional mlxfw \ compile-with "${MLXFW_C}" dev/mlxfw/mlxfw_mfa2_tlv_multi.c optional mlxfw \ compile-with "${MLXFW_C}" dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly dev/mmc/mmc_subr.c optional mmc | mmcsd !mmccam dev/mmc/mmc.c optional mmc !mmccam dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd !mmccam dev/mmcnull/mmcnull.c optional mmcnull dev/mn/if_mn.c optional mn pci dev/mpr/mpr.c optional mpr dev/mpr/mpr_config.c optional mpr # XXX Work around clang warning, until maintainer approves fix. dev/mpr/mpr_mapping.c optional mpr \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/mpr/mpr_pci.c optional mpr pci dev/mpr/mpr_sas.c optional mpr \ compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mpr/mpr_sas_lsi.c optional mpr dev/mpr/mpr_table.c optional mpr dev/mpr/mpr_user.c optional mpr dev/mps/mps.c optional mps dev/mps/mps_config.c optional mps # XXX Work around clang warning, until maintainer approves fix. dev/mps/mps_mapping.c optional mps \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/mps/mps_pci.c optional mps pci dev/mps/mps_sas.c optional mps \ compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mps/mps_sas_lsi.c optional mps dev/mps/mps_table.c optional mps dev/mps/mps_user.c optional mps dev/mpt/mpt.c optional mpt dev/mpt/mpt_cam.c optional mpt dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt dev/mrsas/mrsas.c optional mrsas dev/mrsas/mrsas_cam.c optional mrsas dev/mrsas/mrsas_ioctl.c optional mrsas dev/mrsas/mrsas_fp.c optional mrsas dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs dev/mvs/mvs_pci.c optional mvs pci dev/mwl/if_mwl.c optional mwl dev/mwl/if_mwl_pci.c optional mwl pci dev/mwl/mwlhal.c optional mwl mwlfw.c optional mwlfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot -mmwl -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "mwlfw.c" mw88W8363.fwo optional mwlfw \ dependency "mw88W8363.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mw88W8363.fwo" mw88W8363.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mw88W8363.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mw88W8363.fw" mwlboot.fwo optional mwlfw \ dependency "mwlboot.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mwlboot.fwo" mwlboot.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mwlboot.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mwlboot.fw" dev/mxge/if_mxge.c optional mxge pci dev/mxge/mxge_eth_z8e.c optional mxge pci dev/mxge/mxge_ethp_z8e.c optional mxge pci dev/mxge/mxge_rss_eth_z8e.c optional mxge pci dev/mxge/mxge_rss_ethp_z8e.c optional mxge pci dev/my/if_my.c optional my dev/netmap/if_ptnet.c optional netmap inet dev/netmap/netmap.c optional netmap dev/netmap/netmap_bdg.c optional netmap dev/netmap/netmap_freebsd.c optional netmap dev/netmap/netmap_generic.c optional netmap dev/netmap/netmap_kloop.c optional netmap dev/netmap/netmap_legacy.c optional netmap dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap dev/netmap/netmap_monitor.c optional netmap dev/netmap/netmap_null.c optional netmap dev/netmap/netmap_offloadings.c optional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_vale.c optional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge dev/nmdm/nmdm.c optional nmdm dev/null/null.c standard dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme dev/nvme/nvme_ahci.c optional nvme ahci dev/nvme/nvme_ctrlr.c optional nvme dev/nvme/nvme_ctrlr_cmd.c optional nvme dev/nvme/nvme_ns.c optional nvme dev/nvme/nvme_ns_cmd.c optional nvme dev/nvme/nvme_pci.c optional nvme pci dev/nvme/nvme_qpair.c optional nvme dev/nvme/nvme_sim.c optional nvme scbus dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme dev/nvme/nvme_util.c optional nvme dev/oce/oce_hw.c optional oce pci dev/oce/oce_if.c optional oce pci dev/oce/oce_mbox.c optional oce pci dev/oce/oce_queue.c optional oce pci dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci dev/ocs_fc/ocs_pci.c optional ocs_fc pci dev/ocs_fc/ocs_ioctl.c optional ocs_fc pci dev/ocs_fc/ocs_os.c optional ocs_fc pci dev/ocs_fc/ocs_utils.c optional ocs_fc pci dev/ocs_fc/ocs_hw.c optional ocs_fc pci dev/ocs_fc/ocs_hw_queues.c optional ocs_fc pci dev/ocs_fc/sli4.c optional ocs_fc pci dev/ocs_fc/ocs_sm.c optional ocs_fc pci dev/ocs_fc/ocs_device.c optional ocs_fc pci dev/ocs_fc/ocs_xport.c optional ocs_fc pci dev/ocs_fc/ocs_domain.c optional ocs_fc pci dev/ocs_fc/ocs_sport.c optional ocs_fc pci dev/ocs_fc/ocs_els.c optional ocs_fc pci dev/ocs_fc/ocs_fabric.c optional ocs_fc pci dev/ocs_fc/ocs_io.c optional ocs_fc pci dev/ocs_fc/ocs_node.c optional ocs_fc pci dev/ocs_fc/ocs_scsi.c optional ocs_fc pci dev/ocs_fc/ocs_unsol.c optional ocs_fc pci dev/ocs_fc/ocs_ddump.c optional ocs_fc pci dev/ocs_fc/ocs_mgmt.c optional ocs_fc pci dev/ocs_fc/ocs_cam.c optional ocs_fc pci dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_graph.c optional fdt dev/ofw/ofw_subr.c optional fdt dev/ofw/ofwbus.c optional fdt dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/ow/ow.c optional ow \ dependency "owll_if.h" \ dependency "own_if.h" dev/ow/owll_if.m optional ow dev/ow/own_if.m optional ow dev/ow/ow_temp.c optional ow_temp dev/ow/owc_gpiobus.c optional owc gpio dev/pbio/pbio.c optional pbio isa dev/pccard/card_if.m standard dev/pccard/pccard.c optional pccard dev/pccard/pccard_cis.c optional pccard dev/pccard/pccard_cis_quirks.c optional pccard dev/pccard/pccard_device.c optional pccard dev/pccard/power_if.m standard dev/pccbb/pccbb.c optional cbb dev/pccbb/pccbb_pci.c optional cbb pci dev/pcf/pcf.c optional pcf dev/pci/fixup_pci.c optional pci dev/pci/hostb_pci.c optional pci dev/pci/ignore_pci.c optional pci dev/pci/isa_pci.c optional pci isa dev/pci/pci.c optional pci dev/pci/pci_if.m standard dev/pci/pci_iov.c optional pci pci_iov dev/pci/pci_iov_if.m standard dev/pci/pci_iov_schema.c optional pci pci_iov dev/pci/pci_pci.c optional pci dev/pci/pci_subr.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pci/pcib_support.c standard dev/pci/vga_pci.c optional pci dev/pms/freebsd/driver/ini/src/agtiapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sadisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/mpi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saframe.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sahw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sainit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saint.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sampicmd.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sampirsp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saphy.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sasata.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sasmp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sassp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/satimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sautil.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saioctlcmd.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/mpidebug.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dminit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmsmp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmdisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmtimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/sminit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsatcb.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsathw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smtimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdinit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdesgl.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdint.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdioctl.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdhw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tddmcmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdtimers.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdcb.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdinit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/sat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/sathw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/ppbus/if_plip.c optional plip dev/ppbus/lpbb.c optional lpbb dev/ppbus/lpt.c optional lpt dev/ppbus/pcfclock.c optional pcfclock dev/ppbus/ppb_1284.c optional ppbus dev/ppbus/ppb_base.c optional ppbus dev/ppbus/ppb_msq.c optional ppbus dev/ppbus/ppbconf.c optional ppbus dev/ppbus/ppbus_if.m optional ppbus dev/ppbus/ppi.c optional ppi dev/ppbus/pps.c optional pps dev/ppc/ppc.c optional ppc dev/ppc/ppc_acpi.c optional ppc acpi dev/ppc/ppc_isa.c optional ppc isa dev/ppc/ppc_pci.c optional ppc pci dev/ppc/ppc_puc.c optional ppc puc dev/proto/proto_bus_isa.c optional proto acpi | proto isa dev/proto/proto_bus_pci.c optional proto pci dev/proto/proto_busdma.c optional proto dev/proto/proto_core.c optional proto dev/pst/pst-iop.c optional pst dev/pst/pst-pci.c optional pst pci dev/pst/pst-raid.c optional pst dev/pty/pty.c optional pty dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci dev/pwm/pwmc.c optional pwm | pwmc dev/pwm/pwmbus.c optional pwm | pwmbus dev/pwm/pwmbus_if.m optional pwm | pwmbus dev/pwm/ofw_pwm.c optional pwm fdt | pwmbus fdt dev/pwm/ofw_pwmbus.c optional pwm fdt | pwmbus fdt dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral dev/ral/rt2860.c optional ral dev/ral/if_ral_pci.c optional ral pci rt2561fw.c optional rt2561fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2561fw.c" rt2561fw.fwo optional rt2561fw | ralfw \ dependency "rt2561.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561fw.fwo" rt2561.fw optional rt2561fw | ralfw \ dependency "$S/contrib/dev/ral/rt2561.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561.fw" rt2561sfw.c optional rt2561sfw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561s.fw:rt2561sfw -mrt2561s -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2561sfw.c" rt2561sfw.fwo optional rt2561sfw | ralfw \ dependency "rt2561s.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561sfw.fwo" rt2561s.fw optional rt2561sfw | ralfw \ dependency "$S/contrib/dev/ral/rt2561s.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561s.fw" rt2661fw.c optional rt2661fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2661.fw:rt2661fw -mrt2661 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2661fw.c" rt2661fw.fwo optional rt2661fw | ralfw \ dependency "rt2661.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2661fw.fwo" rt2661.fw optional rt2661fw | ralfw \ dependency "$S/contrib/dev/ral/rt2661.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2661.fw" rt2860fw.c optional rt2860fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2860.fw:rt2860fw -mrt2860 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2860fw.c" rt2860fw.fwo optional rt2860fw | ralfw \ dependency "rt2860.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2860fw.fwo" rt2860.fw optional rt2860fw | ralfw \ dependency "$S/contrib/dev/ral/rt2860.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/random_infra.c standard dev/random/random_harvestq.c standard dev/random/randomdev.c optional !random_loadable dev/random/fortuna.c optional !random_loadable dev/random/hash.c optional !random_loadable dev/rc/rc.c optional rc dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest dev/rp/rp.c optional rp dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci # dev/rtwn/if_rtwn.c optional rtwn dev/rtwn/if_rtwn_beacon.c optional rtwn dev/rtwn/if_rtwn_calib.c optional rtwn dev/rtwn/if_rtwn_cam.c optional rtwn dev/rtwn/if_rtwn_efuse.c optional rtwn dev/rtwn/if_rtwn_fw.c optional rtwn dev/rtwn/if_rtwn_rx.c optional rtwn dev/rtwn/if_rtwn_task.c optional rtwn dev/rtwn/if_rtwn_tx.c optional rtwn # dev/rtwn/pci/rtwn_pci_attach.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_reg.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_rx.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_tx.c optional rtwn_pci pci # dev/rtwn/usb/rtwn_usb_attach.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_ep.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_reg.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_rx.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_tx.c optional rtwn_usb # RTL8188E dev/rtwn/rtl8188e/r88e_beacon.c optional rtwn dev/rtwn/rtl8188e/r88e_calib.c optional rtwn dev/rtwn/rtl8188e/r88e_chan.c optional rtwn dev/rtwn/rtl8188e/r88e_fw.c optional rtwn dev/rtwn/rtl8188e/r88e_init.c optional rtwn dev/rtwn/rtl8188e/r88e_led.c optional rtwn dev/rtwn/rtl8188e/r88e_tx.c optional rtwn dev/rtwn/rtl8188e/r88e_rf.c optional rtwn dev/rtwn/rtl8188e/r88e_rom.c optional rtwn dev/rtwn/rtl8188e/r88e_rx.c optional rtwn dev/rtwn/rtl8188e/pci/r88ee_attach.c optional rtwn_pci pci dev/rtwn/rtl8188e/pci/r88ee_init.c optional rtwn_pci pci dev/rtwn/rtl8188e/pci/r88ee_rx.c optional rtwn_pci pci dev/rtwn/rtl8188e/usb/r88eu_attach.c optional rtwn_usb dev/rtwn/rtl8188e/usb/r88eu_init.c optional rtwn_usb # RTL8192C dev/rtwn/rtl8192c/r92c_attach.c optional rtwn dev/rtwn/rtl8192c/r92c_beacon.c optional rtwn dev/rtwn/rtl8192c/r92c_calib.c optional rtwn dev/rtwn/rtl8192c/r92c_chan.c optional rtwn dev/rtwn/rtl8192c/r92c_fw.c optional rtwn dev/rtwn/rtl8192c/r92c_init.c optional rtwn dev/rtwn/rtl8192c/r92c_llt.c optional rtwn dev/rtwn/rtl8192c/r92c_rf.c optional rtwn dev/rtwn/rtl8192c/r92c_rom.c optional rtwn dev/rtwn/rtl8192c/r92c_rx.c optional rtwn dev/rtwn/rtl8192c/r92c_tx.c optional rtwn dev/rtwn/rtl8192c/pci/r92ce_attach.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_calib.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_fw.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_init.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_led.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_rx.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_tx.c optional rtwn_pci pci dev/rtwn/rtl8192c/usb/r92cu_attach.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_init.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_led.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_rx.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_tx.c optional rtwn_usb # RTL8192E dev/rtwn/rtl8192e/r92e_chan.c optional rtwn dev/rtwn/rtl8192e/r92e_fw.c optional rtwn dev/rtwn/rtl8192e/r92e_init.c optional rtwn dev/rtwn/rtl8192e/r92e_led.c optional rtwn dev/rtwn/rtl8192e/r92e_rf.c optional rtwn dev/rtwn/rtl8192e/r92e_rom.c optional rtwn dev/rtwn/rtl8192e/r92e_rx.c optional rtwn dev/rtwn/rtl8192e/usb/r92eu_attach.c optional rtwn_usb dev/rtwn/rtl8192e/usb/r92eu_init.c optional rtwn_usb # RTL8812A dev/rtwn/rtl8812a/r12a_beacon.c optional rtwn dev/rtwn/rtl8812a/r12a_calib.c optional rtwn dev/rtwn/rtl8812a/r12a_caps.c optional rtwn dev/rtwn/rtl8812a/r12a_chan.c optional rtwn dev/rtwn/rtl8812a/r12a_fw.c optional rtwn dev/rtwn/rtl8812a/r12a_init.c optional rtwn dev/rtwn/rtl8812a/r12a_led.c optional rtwn dev/rtwn/rtl8812a/r12a_rf.c optional rtwn dev/rtwn/rtl8812a/r12a_rom.c optional rtwn dev/rtwn/rtl8812a/r12a_rx.c optional rtwn dev/rtwn/rtl8812a/r12a_tx.c optional rtwn dev/rtwn/rtl8812a/usb/r12au_attach.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_init.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_rx.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_tx.c optional rtwn_usb # RTL8821A dev/rtwn/rtl8821a/r21a_beacon.c optional rtwn dev/rtwn/rtl8821a/r21a_calib.c optional rtwn dev/rtwn/rtl8821a/r21a_chan.c optional rtwn dev/rtwn/rtl8821a/r21a_fw.c optional rtwn dev/rtwn/rtl8821a/r21a_init.c optional rtwn dev/rtwn/rtl8821a/r21a_led.c optional rtwn dev/rtwn/rtl8821a/r21a_rom.c optional rtwn dev/rtwn/rtl8821a/r21a_rx.c optional rtwn dev/rtwn/rtl8821a/usb/r21au_attach.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_dfs.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_init.c optional rtwn_usb rtwn-rtl8188eefw.c optional rtwn-rtl8188eefw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eefw.fw:rtwn-rtl8188eefw:111 -mrtwn-rtl8188eefw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8188eefw.c" rtwn-rtl8188eefw.fwo optional rtwn-rtl8188eefw | rtwnfw \ dependency "rtwn-rtl8188eefw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8188eefw.fwo" rtwn-rtl8188eefw.fw optional rtwn-rtl8188eefw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8188eefw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8188eefw.fw" rtwn-rtl8188eufw.c optional rtwn-rtl8188eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eufw.fw:rtwn-rtl8188eufw:111 -mrtwn-rtl8188eufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8188eufw.c" rtwn-rtl8188eufw.fwo optional rtwn-rtl8188eufw | rtwnfw \ dependency "rtwn-rtl8188eufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8188eufw.fwo" rtwn-rtl8188eufw.fw optional rtwn-rtl8188eufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8188eufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8188eufw.fw" rtwn-rtl8192cfwE.c optional rtwn-rtl8192cfwE | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE.fw:rtwn-rtl8192cfwE:111 -mrtwn-rtl8192cfwE -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE.c" rtwn-rtl8192cfwE.fwo optional rtwn-rtl8192cfwE | rtwnfw \ dependency "rtwn-rtl8192cfwE.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwE.fwo" rtwn-rtl8192cfwE.fw optional rtwn-rtl8192cfwE | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwE.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwE.fw" rtwn-rtl8192cfwE_B.c optional rtwn-rtl8192cfwE_B | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE_B.fw:rtwn-rtl8192cfwE_B:111 -mrtwn-rtl8192cfwE_B -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE_B.c" rtwn-rtl8192cfwE_B.fwo optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "rtwn-rtl8192cfwE_B.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwE_B.fwo" rtwn-rtl8192cfwE_B.fw optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwE_B.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwE_B.fw" rtwn-rtl8192cfwT.c optional rtwn-rtl8192cfwT | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwT.fw:rtwn-rtl8192cfwT:111 -mrtwn-rtl8192cfwT -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwT.c" rtwn-rtl8192cfwT.fwo optional rtwn-rtl8192cfwT | rtwnfw \ dependency "rtwn-rtl8192cfwT.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwT.fwo" rtwn-rtl8192cfwT.fw optional rtwn-rtl8192cfwT | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwT.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwT.fw" rtwn-rtl8192cfwU.c optional rtwn-rtl8192cfwU | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwU.fw:rtwn-rtl8192cfwU:111 -mrtwn-rtl8192cfwU -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwU.c" rtwn-rtl8192cfwU.fwo optional rtwn-rtl8192cfwU | rtwnfw \ dependency "rtwn-rtl8192cfwU.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwU.fwo" rtwn-rtl8192cfwU.fw optional rtwn-rtl8192cfwU | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwU.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwU.fw" rtwn-rtl8192eufw.c optional rtwn-rtl8192eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192eufw.fw:rtwn-rtl8192eufw:111 -mrtwn-rtl8192eufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192eufw.c" rtwn-rtl8192eufw.fwo optional rtwn-rtl8192eufw | rtwnfw \ dependency "rtwn-rtl8192eufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192eufw.fwo" rtwn-rtl8192eufw.fw optional rtwn-rtl8192eufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192eufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192eufw.fw" rtwn-rtl8812aufw.c optional rtwn-rtl8812aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8812aufw.fw:rtwn-rtl8812aufw:111 -mrtwn-rtl8812aufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8812aufw.c" rtwn-rtl8812aufw.fwo optional rtwn-rtl8812aufw | rtwnfw \ dependency "rtwn-rtl8812aufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8812aufw.fwo" rtwn-rtl8812aufw.fw optional rtwn-rtl8812aufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8812aufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8812aufw.fw" rtwn-rtl8821aufw.c optional rtwn-rtl8821aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8821aufw.fw:rtwn-rtl8821aufw:111 -mrtwn-rtl8821aufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8821aufw.c" rtwn-rtl8821aufw.fwo optional rtwn-rtl8821aufw | rtwnfw \ dependency "rtwn-rtl8821aufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8821aufw.fwo" rtwn-rtl8821aufw.fw optional rtwn-rtl8821aufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8821aufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8821aufw.fw" dev/safe/safe.c optional safe dev/scc/scc_if.m optional scc dev/scc/scc_bfe_quicc.c optional scc quicc dev/scc/scc_core.c optional scc dev/scc/scc_dev_quicc.c optional scc quicc dev/scc/scc_dev_sab82532.c optional scc dev/scc/scc_dev_z8530.c optional scc dev/sdhci/sdhci.c optional sdhci dev/sdhci/sdhci_fdt.c optional sdhci fdt dev/sdhci/sdhci_fdt_gpio.c optional sdhci fdt gpio dev/sdhci/sdhci_if.m optional sdhci dev/sdhci/sdhci_acpi.c optional sdhci acpi dev/sdhci/sdhci_pci.c optional sdhci pci dev/sdio/sdio_if.m optional mmccam dev/sdio/sdio_subr.c optional mmccam dev/sdio/sdiob.c optional mmccam dev/sge/if_sge.c optional sge pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus dev/smbus/smbus_if.m optional smbus dev/smc/if_smc.c optional smc dev/smc/if_smc_fdt.c optional smc fdt dev/snp/snp.c optional snp dev/sound/clone.c optional sound dev/sound/unit.c optional sound dev/sound/isa/ad1816.c optional snd_ad1816 isa dev/sound/isa/ess.c optional snd_ess isa dev/sound/isa/gusc.c optional snd_gusc isa dev/sound/isa/mss.c optional snd_mss isa dev/sound/isa/sb16.c optional snd_sb16 isa dev/sound/isa/sb8.c optional snd_sb8 isa dev/sound/isa/sbc.c optional snd_sbc isa dev/sound/isa/sndbuf_dma.c optional sound isa dev/sound/pci/als4000.c optional snd_als4000 pci dev/sound/pci/atiixp.c optional snd_atiixp pci dev/sound/pci/cmi.c optional snd_cmi pci dev/sound/pci/cs4281.c optional snd_cs4281 pci dev/sound/pci/csa.c optional snd_csa pci dev/sound/pci/csapcm.c optional snd_csa pci dev/sound/pci/ds1.c optional snd_ds1 pci dev/sound/pci/emu10k1.c optional snd_emu10k1 pci dev/sound/pci/emu10kx.c optional snd_emu10kx pci dev/sound/pci/emu10kx-pcm.c optional snd_emu10kx pci dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci dev/sound/pci/envy24.c optional snd_envy24 pci dev/sound/pci/envy24ht.c optional snd_envy24ht pci dev/sound/pci/es137x.c optional snd_es137x pci dev/sound/pci/fm801.c optional snd_fm801 pci dev/sound/pci/ich.c optional snd_ich pci dev/sound/pci/maestro.c optional snd_maestro pci dev/sound/pci/maestro3.c optional snd_maestro3 pci dev/sound/pci/neomagic.c optional snd_neomagic pci dev/sound/pci/solo.c optional snd_solo pci dev/sound/pci/spicds.c optional snd_spicds pci dev/sound/pci/t4dwave.c optional snd_t4dwave pci dev/sound/pci/via8233.c optional snd_via8233 pci dev/sound/pci/via82c686.c optional snd_via82c686 pci dev/sound/pci/vibes.c optional snd_vibes pci dev/sound/pci/hda/hdaa.c optional snd_hda pci dev/sound/pci/hda/hdaa_patches.c optional snd_hda pci dev/sound/pci/hda/hdac.c optional snd_hda pci dev/sound/pci/hda/hdac_if.m optional snd_hda pci dev/sound/pci/hda/hdacc.c optional snd_hda pci dev/sound/pci/hdspe.c optional snd_hdspe pci dev/sound/pci/hdspe-pcm.c optional snd_hdspe pci dev/sound/pcm/ac97.c optional sound dev/sound/pcm/ac97_if.m optional sound dev/sound/pcm/ac97_patch.c optional sound dev/sound/pcm/buffer.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/channel.c optional sound dev/sound/pcm/channel_if.m optional sound dev/sound/pcm/dsp.c optional sound dev/sound/pcm/feeder.c optional sound dev/sound/pcm/feeder_chain.c optional sound dev/sound/pcm/feeder_eq.c optional sound \ dependency "feeder_eq_gen.h" \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_if.m optional sound dev/sound/pcm/feeder_format.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_matrix.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_mixer.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_rate.c optional sound \ dependency "feeder_rate_gen.h" \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_volume.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/mixer.c optional sound dev/sound/pcm/mixer_if.m optional sound dev/sound/pcm/sndstat.c optional sound dev/sound/pcm/sound.c optional sound dev/sound/pcm/vchan.c optional sound dev/sound/usb/uaudio.c optional snd_uaudio usb dev/sound/usb/uaudio_pcm.c optional snd_uaudio usb dev/sound/midi/midi.c optional sound dev/sound/midi/mpu401.c optional sound dev/sound/midi/mpu_if.m optional sound dev/sound/midi/mpufoi_if.m optional sound dev/sound/midi/sequencer.c optional sound dev/sound/midi/synth_if.m optional sound dev/spibus/ofw_spibus.c optional fdt spibus dev/spibus/spibus.c optional spibus \ dependency "spibus_if.h" dev/spibus/spigen.c optional spigen dev/spibus/spibus_if.m optional spibus dev/ste/if_ste.c optional ste pci dev/stge/if_stge.c optional stge dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/dragon/dragon_saver.c optional dragon_saver dev/syscons/fade/fade_saver.c optional fade_saver dev/syscons/fire/fire_saver.c optional fire_saver dev/syscons/green/green_saver.c optional green_saver dev/syscons/logo/logo.c optional logo_saver dev/syscons/logo/logo_saver.c optional logo_saver dev/syscons/rain/rain_saver.c optional rain_saver dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm.c optional sc dev/syscons/scterm-dumb.c optional sc !SC_NO_TERM_DUMB dev/syscons/scterm-sc.c optional sc !SC_NO_TERM_SC dev/syscons/scterm-teken.c optional sc !SC_NO_TERM_TEKEN dev/syscons/scvidctl.c optional sc dev/syscons/scvtb.c optional sc dev/syscons/snake/snake_saver.c optional snake_saver dev/syscons/star/star_saver.c optional star_saver dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc dev/syscons/warp/warp_saver.c optional warp_saver dev/tcp_log/tcp_log_dev.c optional tcp_blackbox inet | tcp_blackbox inet6 dev/tdfx/tdfx_linux.c optional tdfx_linux tdfx compat_linux dev/tdfx/tdfx_pci.c optional tdfx pci dev/ti/if_ti.c optional ti pci dev/twa/tw_cl_init.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_intr.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_io.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_misc.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_osl_cam.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_osl_freebsd.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tws/tws.c optional tws dev/tws/tws_cam.c optional tws dev/tws/tws_hdm.c optional tws dev/tws/tws_services.c optional tws dev/tws/tws_user.c optional tws dev/uart/uart_bus_acpi.c optional uart acpi dev/uart/uart_bus_fdt.c optional uart fdt dev/uart/uart_bus_isa.c optional uart isa dev/uart/uart_bus_pccard.c optional uart pccard dev/uart/uart_bus_pci.c optional uart pci dev/uart/uart_bus_puc.c optional uart puc dev/uart/uart_bus_scc.c optional uart scc dev/uart/uart_core.c optional uart dev/uart/uart_cpu_acpi.c optional uart acpi dev/uart/uart_dbg.c optional uart gdb dev/uart/uart_dev_msm.c optional uart uart_msm fdt dev/uart/uart_dev_mvebu.c optional uart uart_mvebu dev/uart/uart_dev_ns8250.c optional uart uart_ns8250 | uart uart_snps dev/uart/uart_dev_pl011.c optional uart pl011 dev/uart/uart_dev_quicc.c optional uart quicc dev/uart/uart_dev_sab82532.c optional uart uart_sab82532 | uart scc dev/uart/uart_dev_snps.c optional uart uart_snps fdt dev/uart/uart_dev_z8530.c optional uart uart_z8530 | uart scc dev/uart/uart_if.m optional uart dev/uart/uart_subr.c optional uart dev/uart/uart_tty.c optional uart dev/ubsec/ubsec.c optional ubsec # # USB controller drivers # dev/usb/controller/musb_otg.c optional musb dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/dwc_otg_fdt.c optional dwcotg fdt dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_msm.c optional ehci_msm fdt dev/usb/controller/ehci_pci.c optional ehci pci dev/usb/controller/ohci.c optional ohci dev/usb/controller/ohci_pci.c optional ohci pci dev/usb/controller/uhci.c optional uhci dev/usb/controller/uhci_pci.c optional uhci pci dev/usb/controller/xhci.c optional xhci dev/usb/controller/xhci_pci.c optional xhci pci dev/usb/controller/saf1761_otg.c optional saf1761otg dev/usb/controller/saf1761_otg_fdt.c optional saf1761otg fdt dev/usb/controller/uss820dci.c optional uss820dci dev/usb/controller/usb_controller.c optional usb # # USB storage drivers # dev/usb/storage/cfumass.c optional cfumass ctl dev/usb/storage/umass.c optional umass dev/usb/storage/urio.c optional urio dev/usb/storage/ustorage_fs.c optional usfs # # USB core # dev/usb/usb_busdma.c optional usb dev/usb/usb_core.c optional usb dev/usb/usb_debug.c optional usb dev/usb/usb_dev.c optional usb dev/usb/usb_device.c optional usb dev/usb/usb_dynamic.c optional usb dev/usb/usb_error.c optional usb dev/usb/usb_fdt_support.c optional usb fdt dev/usb/usb_generic.c optional usb dev/usb/usb_handle_request.c optional usb dev/usb/usb_hid.c optional usb dev/usb/usb_hub.c optional usb dev/usb/usb_hub_acpi.c optional uacpi acpi dev/usb/usb_if.m optional usb dev/usb/usb_lookup.c optional usb dev/usb/usb_mbuf.c optional usb dev/usb/usb_msctest.c optional usb dev/usb/usb_parse.c optional usb dev/usb/usb_pf.c optional usb dev/usb/usb_process.c optional usb dev/usb/usb_request.c optional usb dev/usb/usb_transfer.c optional usb dev/usb/usb_util.c optional usb # # USB network drivers # dev/usb/net/if_aue.c optional aue dev/usb/net/if_axe.c optional axe dev/usb/net/if_axge.c optional axge dev/usb/net/if_cdce.c optional cdce dev/usb/net/if_cdceem.c optional cdceem dev/usb/net/if_cue.c optional cue dev/usb/net/if_ipheth.c optional ipheth dev/usb/net/if_kue.c optional kue dev/usb/net/if_mos.c optional mos dev/usb/net/if_muge.c optional muge dev/usb/net/if_rue.c optional rue dev/usb/net/if_smsc.c optional smsc dev/usb/net/if_udav.c optional udav dev/usb/net/if_ure.c optional ure dev/usb/net/if_usie.c optional usie dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \ cdceem | cue | ipheth | kue | mos | \ rue | smsc | udav | ure | urndis | muge dev/usb/net/uhso.c optional uhso # # USB WLAN drivers # dev/usb/wlan/if_rsu.c optional rsu rsu-rtl8712fw.c optional rsu-rtl8712fw | rsufw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rsu-rtl8712fw.fw:rsu-rtl8712fw:120 -mrsu-rtl8712fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rsu-rtl8712fw.c" rsu-rtl8712fw.fwo optional rsu-rtl8712fw | rsufw \ dependency "rsu-rtl8712fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rsu-rtl8712fw.fwo" rsu-rtl8712fw.fw optional rsu-rtl8712.fw | rsufw \ dependency "$S/contrib/dev/rsu/rsu-rtl8712fw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rsu-rtl8712fw.fw" dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run runfw.c optional runfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk run.fw:runfw -mrunfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "runfw.c" runfw.fwo optional runfw \ dependency "run.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "runfw.fwo" run.fw optional runfw \ dependency "$S/contrib/dev/run/rt2870.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "run.fw" dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural dev/usb/wlan/if_urtw.c optional urtw dev/usb/wlan/if_zyd.c optional zyd # # USB serial and parallel port drivers # dev/usb/serial/u3g.c optional u3g dev/usb/serial/uark.c optional uark dev/usb/serial/ubsa.c optional ubsa dev/usb/serial/ubser.c optional ubser dev/usb/serial/uchcom.c optional uchcom dev/usb/serial/ucycom.c optional ucycom dev/usb/serial/ufoma.c optional ufoma dev/usb/serial/uftdi.c optional uftdi dev/usb/serial/ugensa.c optional ugensa dev/usb/serial/uipaq.c optional uipaq dev/usb/serial/ulpt.c optional ulpt dev/usb/serial/umcs.c optional umcs dev/usb/serial/umct.c optional umct dev/usb/serial/umodem.c optional umodem dev/usb/serial/umoscom.c optional umoscom dev/usb/serial/uplcom.c optional uplcom dev/usb/serial/uslcom.c optional uslcom dev/usb/serial/uvisor.c optional uvisor dev/usb/serial/uvscom.c optional uvscom dev/usb/serial/usb_serial.c optional ucom | u3g | uark | ubsa | ubser | \ uchcom | ucycom | ufoma | uftdi | \ ugensa | uipaq | umcs | umct | \ umodem | umoscom | uplcom | usie | \ uslcom | uvisor | uvscom # # USB misc drivers # dev/usb/misc/ufm.c optional ufm dev/usb/misc/udbp.c optional udbp dev/usb/misc/ugold.c optional ugold dev/usb/misc/uled.c optional uled # # USB input drivers # dev/usb/input/atp.c optional atp dev/usb/input/uep.c optional uep dev/usb/input/uhid.c optional uhid dev/usb/input/uhid_snes.c optional uhid_snes dev/usb/input/ukbd.c optional ukbd dev/usb/input/ums.c optional ums dev/usb/input/wmt.c optional wmt dev/usb/input/wsp.c optional wsp # # USB quirks # dev/usb/quirk/usb_quirk.c optional usb # # USB templates # dev/usb/template/usb_template.c optional usb_template dev/usb/template/usb_template_audio.c optional usb_template dev/usb/template/usb_template_cdce.c optional usb_template dev/usb/template/usb_template_kbd.c optional usb_template dev/usb/template/usb_template_modem.c optional usb_template dev/usb/template/usb_template_mouse.c optional usb_template dev/usb/template/usb_template_msc.c optional usb_template dev/usb/template/usb_template_mtp.c optional usb_template dev/usb/template/usb_template_phone.c optional usb_template dev/usb/template/usb_template_serialnet.c optional usb_template dev/usb/template/usb_template_midi.c optional usb_template dev/usb/template/usb_template_multi.c optional usb_template dev/usb/template/usb_template_cdceem.c optional usb_template # # USB video drivers # dev/usb/video/udl.c optional udl # # USB END # dev/videomode/videomode.c optional videomode dev/videomode/edid.c optional videomode dev/videomode/pickmode.c optional videomode dev/videomode/vesagtf.c optional videomode dev/veriexec/verified_exec.c optional veriexec mac_veriexec dev/vge/if_vge.c optional vge dev/viapm/viapm.c optional viapm pci dev/virtio/virtio.c optional virtio dev/virtio/virtqueue.c optional virtio dev/virtio/virtio_bus_if.m optional virtio dev/virtio/virtio_if.m optional virtio dev/virtio/pci/virtio_pci.c optional virtio_pci dev/virtio/mmio/virtio_mmio.c optional virtio_mmio dev/virtio/mmio/virtio_mmio_acpi.c optional virtio_mmio acpi dev/virtio/mmio/virtio_mmio_fdt.c optional virtio_mmio fdt dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio dev/virtio/network/if_vtnet.c optional vtnet dev/virtio/block/virtio_blk.c optional virtio_blk dev/virtio/balloon/virtio_balloon.c optional virtio_balloon dev/virtio/scsi/virtio_scsi.c optional virtio_scsi dev/virtio/random/virtio_random.c optional virtio_random dev/virtio/console/virtio_console.c optional virtio_console dev/vkbd/vkbd.c optional vkbd dev/vmgenc/vmgenc_acpi.c optional acpi dev/vr/if_vr.c optional vr pci dev/vt/colors/vt_termcolors.c optional vt dev/vt/font/vt_font_default.c optional vt dev/vt/font/vt_mouse_cursor.c optional vt dev/vt/hw/efifb/efifb.c optional vt_efifb dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash dev/vt/logo/logo_beastie.c optional vt splash dev/vt/vt_buf.c optional vt dev/vt/vt_consolectl.c optional vt dev/vt/vt_core.c optional vt dev/vt/vt_cpulogos.c optional vt splash dev/vt/vt_font.c optional vt dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci dev/watchdog/watchdog.c standard dev/wi/if_wi.c optional wi dev/wi/if_wi_pccard.c optional wi pccard dev/wi/if_wi_pci.c optional wi pci dev/wpi/if_wpi.c optional wpi pci wpifw.c optional wpifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk wpi.fw:wpifw:153229 -mwpi -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "wpifw.c" wpifw.fwo optional wpifw \ dependency "wpi.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "wpifw.fwo" wpi.fw optional wpifw \ dependency "$S/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "wpi.fw" dev/xdma/controller/pl330.c optional xdma pl330 dev/xdma/xdma.c optional xdma dev/xdma/xdma_bank.c optional xdma dev/xdma/xdma_bio.c optional xdma dev/xdma/xdma_fdt_test.c optional xdma xdma_test fdt dev/xdma/xdma_if.m optional xdma dev/xdma/xdma_iommu.c optional xdma dev/xdma/xdma_mbuf.c optional xdma dev/xdma/xdma_queue.c optional xdma dev/xdma/xdma_sg.c optional xdma dev/xdma/xdma_sglist.c optional xdma dev/xen/balloon/balloon.c optional xenhvm dev/xen/blkfront/blkfront.c optional xenhvm dev/xen/blkback/blkback.c optional xenhvm dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm dev/xen/netfront/netfront.c optional xenhvm dev/xen/xenpci/xenpci.c optional xenpci dev/xen/timer/timer.c optional xenhvm dev/xen/pvcpu/pvcpu.c optional xenhvm dev/xen/xenstore/xenstore.c optional xenhvm dev/xen/xenstore/xenstore_dev.c optional xenhvm dev/xen/xenstore/xenstored_dev.c optional xenhvm dev/xen/evtchn/evtchn_dev.c optional xenhvm dev/xen/privcmd/privcmd.c optional xenhvm dev/xen/gntdev/gntdev.c optional xenhvm dev/xen/debug/debug.c optional xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/autofs/autofs.c optional autofs fs/autofs/autofs_vfsops.c optional autofs fs/autofs/autofs_vnops.c optional autofs fs/deadfs/dead_vnops.c standard fs/devfs/devfs_devs.c standard fs/devfs/devfs_dir.c standard fs/devfs/devfs_rule.c standard fs/devfs/devfs_vfsops.c standard fs/devfs/devfs_vnops.c standard fs/fdescfs/fdesc_vfsops.c optional fdescfs fs/fdescfs/fdesc_vnops.c optional fdescfs fs/fifofs/fifo_vnops.c standard fs/cuse/cuse.c optional cuse fs/fuse/fuse_device.c optional fusefs fs/fuse/fuse_file.c optional fusefs fs/fuse/fuse_internal.c optional fusefs fs/fuse/fuse_io.c optional fusefs fs/fuse/fuse_ipc.c optional fusefs fs/fuse/fuse_main.c optional fusefs fs/fuse/fuse_node.c optional fusefs fs/fuse/fuse_vfsops.c optional fusefs fs/fuse/fuse_vnops.c optional fusefs fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs fs/nfs/nfs_commonkrpc.c optional nfscl | nfsd fs/nfs/nfs_commonsubs.c optional nfscl | nfsd fs/nfs/nfs_commonport.c optional nfscl | nfsd fs/nfs/nfs_commonacl.c optional nfscl | nfsd fs/nfsclient/nfs_clcomsubs.c optional nfscl fs/nfsclient/nfs_clsubs.c optional nfscl fs/nfsclient/nfs_clstate.c optional nfscl fs/nfsclient/nfs_clkrpc.c optional nfscl fs/nfsclient/nfs_clrpcops.c optional nfscl fs/nfsclient/nfs_clvnops.c optional nfscl fs/nfsclient/nfs_clnode.c optional nfscl fs/nfsclient/nfs_clvfsops.c optional nfscl fs/nfsclient/nfs_clport.c optional nfscl fs/nfsclient/nfs_clbio.c optional nfscl fs/nfsclient/nfs_clnfsiod.c optional nfscl fs/nfsserver/nfs_fha_new.c optional nfsd inet fs/nfsserver/nfs_nfsdsocket.c optional nfsd inet fs/nfsserver/nfs_nfsdsubs.c optional nfsd inet fs/nfsserver/nfs_nfsdstate.c optional nfsd inet fs/nfsserver/nfs_nfsdkrpc.c optional nfsd inet fs/nfsserver/nfs_nfsdserv.c optional nfsd inet fs/nfsserver/nfs_nfsdport.c optional nfsd inet fs/nfsserver/nfs_nfsdcache.c optional nfsd inet fs/nullfs/null_subr.c optional nullfs fs/nullfs/null_vfsops.c optional nullfs fs/nullfs/null_vnops.c optional nullfs fs/procfs/procfs.c optional procfs fs/procfs/procfs_dbregs.c optional procfs fs/procfs/procfs_fpregs.c optional procfs fs/procfs/procfs_ioctl.c optional procfs fs/procfs/procfs_map.c optional procfs fs/procfs/procfs_mem.c optional procfs fs/procfs/procfs_note.c optional procfs fs/procfs/procfs_osrel.c optional procfs fs/procfs/procfs_regs.c optional procfs fs/procfs/procfs_rlimit.c optional procfs fs/procfs/procfs_status.c optional procfs fs/procfs/procfs_type.c optional procfs fs/pseudofs/pseudofs.c optional pseudofs fs/pseudofs/pseudofs_fileno.c optional pseudofs fs/pseudofs/pseudofs_vncache.c optional pseudofs fs/pseudofs/pseudofs_vnops.c optional pseudofs fs/smbfs/smbfs_io.c optional smbfs fs/smbfs/smbfs_node.c optional smbfs fs/smbfs/smbfs_smb.c optional smbfs fs/smbfs/smbfs_subr.c optional smbfs fs/smbfs/smbfs_vfsops.c optional smbfs fs/smbfs/smbfs_vnops.c optional smbfs fs/udf/osta.c optional udf fs/udf/udf_iconv.c optional udf_iconv fs/udf/udf_vfsops.c optional udf fs/udf/udf_vnops.c optional udf fs/unionfs/union_subr.c optional unionfs fs/unionfs/union_vfsops.c optional unionfs fs/unionfs/union_vnops.c optional unionfs fs/tmpfs/tmpfs_vnops.c optional tmpfs fs/tmpfs/tmpfs_fifoops.c optional tmpfs fs/tmpfs/tmpfs_vfsops.c optional tmpfs fs/tmpfs/tmpfs_subr.c optional tmpfs gdb/gdb_cons.c optional gdb gdb/gdb_main.c optional gdb gdb/gdb_packet.c optional gdb gdb/netgdb.c optional ddb debugnet gdb netgdb inet geom/bde/g_bde.c optional geom_bde geom/bde/g_bde_crypt.c optional geom_bde geom/bde/g_bde_lock.c optional geom_bde geom/bde/g_bde_work.c optional geom_bde geom/cache/g_cache.c optional geom_cache geom/concat/g_concat.c optional geom_concat geom/eli/g_eli.c optional geom_eli geom/eli/g_eli_crypto.c optional geom_eli geom/eli/g_eli_ctl.c optional geom_eli geom/eli/g_eli_hmac.c optional geom_eli geom/eli/g_eli_integrity.c optional geom_eli geom/eli/g_eli_key.c optional geom_eli geom/eli/g_eli_key_cache.c optional geom_eli geom/eli/g_eli_privacy.c optional geom_eli geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate geom/geom_bsd_enc.c optional geom_part_bsd geom/geom_ccd.c optional ccd | geom_ccd geom/geom_ctl.c standard geom/geom_dev.c standard geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard geom/geom_vfs.c standard geom/journal/g_journal.c optional geom_journal geom/journal/g_journal_ufs.c optional geom_journal geom/label/g_label.c optional geom_label | geom_label_gpt geom/label/g_label_ext2fs.c optional geom_label geom/label/g_label_flashmap.c optional geom_label geom/label/g_label_iso9660.c optional geom_label geom/label/g_label_msdosfs.c optional geom_label geom/label/g_label_ntfs.c optional geom_label geom/label/g_label_reiserfs.c optional geom_label geom/label/g_label_ufs.c optional geom_label geom/label/g_label_gpt.c optional geom_label | geom_label_gpt geom/label/g_label_disk_ident.c optional geom_label geom/linux_lvm/g_linux_lvm.c optional geom_linux_lvm geom/mirror/g_mirror.c optional geom_mirror geom/mirror/g_mirror_ctl.c optional geom_mirror geom/mountver/g_mountver.c optional geom_mountver geom/multipath/g_multipath.c optional geom_multipath geom/nop/g_nop.c optional geom_nop geom/part/g_part.c standard geom/part/g_part_if.m standard geom/part/g_part_apm.c optional geom_part_apm geom/part/g_part_bsd.c optional geom_part_bsd geom/part/g_part_bsd64.c optional geom_part_bsd64 geom/part/g_part_ebr.c optional geom_part_ebr geom/part/g_part_gpt.c optional geom_part_gpt geom/part/g_part_ldm.c optional geom_part_ldm geom/part/g_part_mbr.c optional geom_part_mbr geom/part/g_part_vtoc8.c optional geom_part_vtoc8 geom/raid/g_raid.c optional geom_raid geom/raid/g_raid_ctl.c optional geom_raid geom/raid/g_raid_md_if.m optional geom_raid geom/raid/g_raid_tr_if.m optional geom_raid geom/raid/md_ddf.c optional geom_raid geom/raid/md_intel.c optional geom_raid geom/raid/md_jmicron.c optional geom_raid geom/raid/md_nvidia.c optional geom_raid geom/raid/md_promise.c optional geom_raid geom/raid/md_sii.c optional geom_raid geom/raid/tr_concat.c optional geom_raid geom/raid/tr_raid0.c optional geom_raid geom/raid/tr_raid1.c optional geom_raid geom/raid/tr_raid1e.c optional geom_raid geom/raid/tr_raid5.c optional geom_raid geom/raid3/g_raid3.c optional geom_raid3 geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe geom/uzip/g_uzip.c optional geom_uzip geom/uzip/g_uzip_lzma.c optional geom_uzip geom/uzip/g_uzip_wrkthr.c optional geom_uzip geom/uzip/g_uzip_zlib.c optional geom_uzip geom/uzip/g_uzip_zstd.c optional geom_uzip zstdio \ compile-with "${NORMAL_C} -I$S/contrib/zstd/lib/freebsd" geom/vinum/geom_vinum.c optional geom_vinum geom/vinum/geom_vinum_create.c optional geom_vinum geom/vinum/geom_vinum_drive.c optional geom_vinum geom/vinum/geom_vinum_plex.c optional geom_vinum geom/vinum/geom_vinum_volume.c optional geom_vinum geom/vinum/geom_vinum_subr.c optional geom_vinum geom/vinum/geom_vinum_raid5.c optional geom_vinum geom/vinum/geom_vinum_share.c optional geom_vinum geom/vinum/geom_vinum_list.c optional geom_vinum geom/vinum/geom_vinum_rm.c optional geom_vinum geom/vinum/geom_vinum_init.c optional geom_vinum geom/vinum/geom_vinum_state.c optional geom_vinum geom/vinum/geom_vinum_rename.c optional geom_vinum geom/vinum/geom_vinum_move.c optional geom_vinum geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor geom/zero/g_zero.c optional geom_zero fs/ext2fs/ext2_acl.c optional ext2fs fs/ext2fs/ext2_alloc.c optional ext2fs fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_csum.c optional ext2fs fs/ext2fs/ext2_extattr.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs fs/ext2fs/ext2_hash.c optional ext2fs fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs fs/ext2fs/ext2_vnops.c optional ext2fs # isa/isa_if.m standard isa/isa_common.c optional isa isa/isahint.c optional isa isa/pnp.c optional isa isapnp isa/pnpparse.c optional isa isapnp fs/cd9660/cd9660_bmap.c optional cd9660 fs/cd9660/cd9660_lookup.c optional cd9660 fs/cd9660/cd9660_node.c optional cd9660 fs/cd9660/cd9660_rrip.c optional cd9660 fs/cd9660/cd9660_util.c optional cd9660 fs/cd9660/cd9660_vfsops.c optional cd9660 fs/cd9660/cd9660_vnops.c optional cd9660 fs/cd9660/cd9660_iconv.c optional cd9660_iconv gnu/gcov/gcc_4_7.c optional gcov \ warning "kernel contains GPL licensed gcov support" gnu/gcov/gcov_fs.c optional gcov lindebugfs \ compile-with "${LINUXKPI_C}" gnu/gcov/gcov_subr.c optional gcov kern/bus_if.m standard kern/clock_if.m standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_binmisc.c optional imagact_binmisc kern/imgact_elf.c standard kern/imgact_elf32.c optional compat_freebsd32 kern/imgact_shell.c standard kern/init_main.c standard kern/init_sysent.c standard kern/ksched.c optional _kposix_priority_scheduling kern/kern_acct.c standard kern/kern_alq.c optional alq kern/kern_clock.c standard kern/kern_condvar.c standard kern/kern_conf.c standard kern/kern_cons.c standard kern/kern_cpu.c standard kern/kern_cpuset.c standard kern/kern_context.c standard kern/kern_descrip.c standard kern/kern_dtrace.c optional kdtrace_hooks kern/kern_dump.c standard kern/kern_environment.c standard kern/kern_et.c standard kern/kern_event.c standard kern/kern_exec.c standard kern/kern_exit.c standard kern/kern_fail.c standard kern/kern_ffclock.c standard kern/kern_fork.c standard kern/kern_hhook.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard kern/kern_kcov.c optional kcov \ compile-with "${NORMAL_C:N-fsanitize*}" kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr kern/kern_ktrace.c standard kern/kern_linker.c standard kern/kern_lock.c standard kern/kern_lockf.c standard kern/kern_lockstat.c optional kdtrace_hooks kern/kern_loginclass.c standard kern/kern_malloc.c standard kern/kern_mbuf.c standard kern/kern_mib.c standard kern/kern_module.c standard kern/kern_mtxpool.c standard kern/kern_mutex.c standard kern/kern_ntptime.c standard kern/kern_osd.c standard kern/kern_physio.c standard kern/kern_pmc.c standard kern/kern_poll.c optional device_polling kern/kern_priv.c standard kern/kern_proc.c standard kern/kern_procctl.c standard kern/kern_prot.c standard kern/kern_racct.c standard kern/kern_rangelock.c standard kern/kern_rctl.c standard kern/kern_resource.c standard kern/kern_rmlock.c standard kern/kern_rwlock.c standard kern/kern_sdt.c optional kdtrace_hooks kern/kern_sema.c standard kern/kern_sendfile.c standard kern/kern_sharedpage.c standard kern/kern_shutdown.c standard kern/kern_sig.c standard kern/kern_switch.c standard kern/kern_sx.c standard kern/kern_synch.c standard kern/kern_syscalls.c standard kern/kern_sysctl.c standard kern/kern_tc.c standard kern/kern_thr.c standard kern/kern_thread.c standard kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_tslog.c optional tslog kern/kern_ubsan.c optional kubsan kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard kern/link_elf.c standard kern/linker_if.m standard kern/md4c.c optional netsmb kern/md5c.c standard kern/p1003_1b.c standard kern/posix4_mib.c standard kern/sched_4bsd.c optional sched_4bsd kern/sched_ule.c optional sched_ule kern/serdev_if.m standard kern/stack_protector.c standard \ compile-with "${NORMAL_C:N-fstack-protector*}" kern/subr_acl_nfs4.c optional ufs_acl | zfs kern/subr_acl_posix1e.c optional ufs_acl kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_boot.c standard kern/subr_bus.c standard kern/subr_bus_dma.c standard kern/subr_bufring.c standard kern/subr_capability.c standard kern/subr_clock.c standard kern/subr_compressor.c standard \ compile-with "${NORMAL_C} -I$S/contrib/zstd/lib/freebsd" kern/subr_coverage.c optional coverage \ compile-with "${NORMAL_C:N-fsanitize*}" kern/subr_counter.c standard kern/subr_csan.c optional kcsan \ compile-with "${NORMAL_C:N-fsanitize*}" kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_early.c standard kern/subr_epoch.c standard kern/subr_eventhandler.c standard kern/subr_fattime.c standard kern/subr_firmware.c optional firmware kern/subr_filter.c standard kern/subr_gtaskqueue.c standard kern/subr_hash.c standard kern/subr_hints.c standard kern/subr_kdb.c standard kern/subr_kobj.c standard kern/subr_lock.c standard kern/subr_log.c standard kern/subr_mchain.c optional libmchain kern/subr_module.c standard kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard kern/subr_pctrie.c standard kern/subr_pidctrl.c standard kern/subr_power.c standard kern/subr_prf.c standard kern/subr_prof.c standard kern/subr_rangeset.c standard kern/subr_rman.c standard kern/subr_rtc.c standard kern/subr_sbuf.c standard kern/subr_scanf.c standard kern/subr_sglist.c standard kern/subr_sleepqueue.c standard kern/subr_smp.c standard kern/subr_smr.c standard kern/subr_stack.c optional ddb | stack | ktr kern/subr_stats.c optional stats kern/subr_taskqueue.c standard kern/subr_terminal.c optional vt kern/subr_trap.c standard kern/subr_turnstile.c standard kern/subr_uio.c standard kern/subr_unit.c standard kern/subr_vmem.c standard kern/subr_witness.c optional witness kern/sys_capability.c standard kern/sys_generic.c standard kern/sys_getrandom.c standard kern/sys_pipe.c standard kern/sys_procdesc.c standard kern/sys_process.c standard kern/sys_socket.c standard kern/syscalls.c standard kern/sysv_ipc.c standard kern/sysv_msg.c optional sysvmsg kern/sysv_sem.c optional sysvsem kern/sysv_shm.c optional sysvshm kern/tty.c standard kern/tty_compat.c optional compat_43tty kern/tty_info.c standard kern/tty_inq.c standard kern/tty_outq.c standard kern/tty_pts.c standard kern/tty_tty.c standard kern/tty_ttydisc.c standard kern/uipc_accf.c standard kern/uipc_debug.c optional ddb kern/uipc_domain.c standard kern/uipc_ktls.c optional kern_tls kern/uipc_mbuf.c standard kern/uipc_mbuf2.c standard kern/uipc_mbufhash.c standard kern/uipc_mqueue.c optional p1003_1b_mqueue kern/uipc_sem.c optional p1003_1b_semaphores kern/uipc_shm.c standard kern/uipc_sockbuf.c standard kern/uipc_socket.c standard kern/uipc_syscalls.c standard kern/uipc_usrreq.c standard kern/vfs_acl.c standard kern/vfs_aio.c standard kern/vfs_bio.c standard kern/vfs_cache.c standard kern/vfs_cluster.c standard kern/vfs_default.c standard kern/vfs_export.c standard kern/vfs_extattr.c standard kern/vfs_hash.c standard kern/vfs_init.c standard kern/vfs_lookup.c standard kern/vfs_mount.c standard kern/vfs_mountroot.c standard kern/vfs_subr.c standard kern/vfs_syscalls.c standard kern/vfs_vnops.c standard # # Kernel GSS-API # gssd.h optional kgssapi \ dependency "$S/kgssapi/gssd.x" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \ no-obj no-implicit-rule before-depend local \ clean "gssd.h" gssd_xdr.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ no-implicit-rule before-depend local \ clean "gssd_xdr.c" gssd_clnt.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ no-implicit-rule before-depend local \ clean "gssd_clnt.c" kgssapi/gss_accept_sec_context.c optional kgssapi kgssapi/gss_add_oid_set_member.c optional kgssapi kgssapi/gss_acquire_cred.c optional kgssapi kgssapi/gss_canonicalize_name.c optional kgssapi kgssapi/gss_create_empty_oid_set.c optional kgssapi kgssapi/gss_delete_sec_context.c optional kgssapi kgssapi/gss_display_status.c optional kgssapi kgssapi/gss_export_name.c optional kgssapi kgssapi/gss_get_mic.c optional kgssapi kgssapi/gss_init_sec_context.c optional kgssapi kgssapi/gss_impl.c optional kgssapi kgssapi/gss_import_name.c optional kgssapi kgssapi/gss_names.c optional kgssapi kgssapi/gss_pname_to_uid.c optional kgssapi kgssapi/gss_release_buffer.c optional kgssapi kgssapi/gss_release_cred.c optional kgssapi kgssapi/gss_release_name.c optional kgssapi kgssapi/gss_release_oid_set.c optional kgssapi kgssapi/gss_set_cred_option.c optional kgssapi kgssapi/gss_test_oid_set_member.c optional kgssapi kgssapi/gss_unwrap.c optional kgssapi kgssapi/gss_verify_mic.c optional kgssapi kgssapi/gss_wrap.c optional kgssapi kgssapi/gss_wrap_size_limit.c optional kgssapi kgssapi/gssd_prot.c optional kgssapi kgssapi/krb5/krb5_mech.c optional kgssapi kgssapi/krb5/kcrypto.c optional kgssapi kgssapi/krb5/kcrypto_aes.c optional kgssapi kgssapi/krb5/kcrypto_arcfour.c optional kgssapi kgssapi/krb5/kcrypto_des.c optional kgssapi kgssapi/krb5/kcrypto_des3.c optional kgssapi kgssapi/kgss_if.m optional kgssapi kgssapi/gsstest.c optional kgssapi_debug # These files in libkern/ are those needed by all architectures. Some # of the files in libkern/ are only needed on some architectures, e.g., # libkern/divdi3.c is needed by i386 but not alpha. Also, some of these # routines may be optimized for a particular platform. In either case, # the file should be moved to conf/files. from here. # libkern/arc4random.c standard libkern/asprintf.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/explicit_bzero.c standard libkern/fnmatch.c standard libkern/gsb_crc32.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv libkern/iconv_ucs.c optional libiconv libkern/iconv_xlat.c optional libiconv libkern/iconv_xlat16.c optional libiconv libkern/inet_aton.c standard libkern/inet_ntoa.c standard libkern/inet_ntop.c standard libkern/inet_pton.c standard libkern/jenkins_hash.c standard libkern/murmur3_32.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard libkern/memchr.c standard libkern/memmem.c optional gdb libkern/qsort.c standard libkern/qsort_r.c standard libkern/random.c standard libkern/scanc.c standard libkern/strcasecmp.c standard libkern/strcat.c standard libkern/strchr.c standard libkern/strchrnul.c optional gdb libkern/strcmp.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard libkern/strndup.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncat.c standard libkern/strncmp.c standard libkern/strncpy.c standard libkern/strnlen.c standard libkern/strrchr.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard libkern/strtol.c standard libkern/strtoq.c standard libkern/strtoul.c standard libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard contrib/zlib/adler32.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/compress.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/crc32.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/deflate.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/inffast.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/inflate.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/inftrees.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/trees.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/uncompr.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/zutil.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib dev/zlib/zlib_mod.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib dev/zlib/zcalloc.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib net/altq/altq_cbq.c optional altq net/altq/altq_codel.c optional altq net/altq/altq_hfsc.c optional altq net/altq/altq_fairq.c optional altq net/altq/altq_priq.c optional altq net/altq/altq_red.c optional altq net/altq/altq_rio.c optional altq net/altq/altq_rmclass.c optional altq net/altq/altq_subr.c optional altq net/bpf.c standard net/bpf_buffer.c optional bpf net/bpf_jitter.c optional bpf_jitter net/bpf_filter.c optional bpf | netgraph_bpf net/bpf_zerocopy.c optional bpf net/bridgestp.c optional bridge | if_bridge net/ieee8023ad_lacp.c optional lagg net/if.c standard net/if_bridge.c optional bridge inet | if_bridge inet net/if_clone.c standard net/if_dead.c standard net/if_debug.c optional ddb net/if_disc.c optional disc net/if_edsc.c optional edsc net/if_enc.c optional enc inet | enc inet6 net/if_epair.c optional epair net/if_ethersubr.c optional ether net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet | gre inet6 net/if_ipsec.c optional inet ipsec | inet6 ipsec net/if_lagg.c optional lagg net/if_loop.c optional loop net/if_llatbl.c standard net/if_me.c optional me inet net/if_media.c standard net/if_mib.c standard net/if_spppfr.c optional sppp | netgraph_sppp net/if_spppsubr.c optional sppp | netgraph_sppp net/if_stf.c optional stf inet inet6 net/if_tuntap.c optional tuntap net/if_vlan.c optional vlan net/if_vxlan.c optional vxlan inet | vxlan inet6 net/ifdi_if.m optional ether pci iflib net/iflib.c optional ether pci iflib net/iflib_clone.c optional ether pci iflib net/mp_ring.c optional ether iflib net/mppcc.c optional netgraph_mppc_compression net/mppcd.c optional netgraph_mppc_compression net/netisr.c standard net/debugnet.c optional inet debugnet net/debugnet_inet.c optional inet debugnet net/pfil.c optional ether | inet net/radix.c standard net/radix_mpath.c standard net/raw_cb.c standard net/raw_usrreq.c standard net/route.c standard net/route_temporal.c standard net/rss_config.c optional inet rss | inet6 rss net/rtsock.c standard net/slcompress.c optional netgraph_vjc | sppp | \ netgraph_sppp net/toeplitz.c optional inet rss | inet6 rss net/vnet.c optional vimage net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan net80211/ieee80211_adhoc.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ageq.c optional wlan net80211/ieee80211_amrr.c optional wlan | wlan_amrr net80211/ieee80211_crypto.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_crypto_ccmp.c optional wlan wlan_ccmp net80211/ieee80211_crypto_none.c optional wlan net80211/ieee80211_crypto_tkip.c optional wlan wlan_tkip net80211/ieee80211_crypto_wep.c optional wlan wlan_wep net80211/ieee80211_ddb.c optional wlan ddb net80211/ieee80211_dfs.c optional wlan net80211/ieee80211_freebsd.c optional wlan net80211/ieee80211_hostap.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ht.c optional wlan net80211/ieee80211_hwmp.c optional wlan ieee80211_support_mesh net80211/ieee80211_input.c optional wlan net80211/ieee80211_ioctl.c optional wlan net80211/ieee80211_mesh.c optional wlan ieee80211_support_mesh \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_monitor.c optional wlan net80211/ieee80211_node.c optional wlan net80211/ieee80211_output.c optional wlan net80211/ieee80211_phy.c optional wlan net80211/ieee80211_power.c optional wlan net80211/ieee80211_proto.c optional wlan net80211/ieee80211_radiotap.c optional wlan net80211/ieee80211_ratectl.c optional wlan net80211/ieee80211_ratectl_none.c optional wlan net80211/ieee80211_regdomain.c optional wlan net80211/ieee80211_rssadapt.c optional wlan wlan_rssadapt net80211/ieee80211_scan.c optional wlan net80211/ieee80211_scan_sta.c optional wlan net80211/ieee80211_sta.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_superg.c optional wlan ieee80211_support_superg net80211/ieee80211_scan_sw.c optional wlan net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_vht.c optional wlan net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth net80211/ieee80211_alq.c optional wlan ieee80211_alq netgraph/atm/ccatm/ng_ccatm.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/ngatmbase.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscfu/ng_sscfu.c optional ngatm_sscfu \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscop/ng_sscop.c optional ngatm_sscop \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/uni/ng_uni.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/bluetooth/common/ng_bluetooth.c optional netgraph_bluetooth netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c optional netgraph_bluetooth_bt3c netgraph/bluetooth/drivers/h4/ng_h4.c optional netgraph_bluetooth_h4 netgraph/bluetooth/drivers/ubt/ng_ubt.c optional netgraph_bluetooth_ubt usb netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c optional netgraph_bluetooth_ubt usb netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c optional netgraph_bluetooth_ubtbcmfw usb netgraph/bluetooth/hci/ng_hci_cmds.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_evnt.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_main.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_misc.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_ulpi.c optional netgraph_bluetooth_hci netgraph/bluetooth/l2cap/ng_l2cap_cmds.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_evnt.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_llpi.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_main.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_misc.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/socket/ng_btsocket.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_hci_raw.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_l2cap.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_rfcomm.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_sco.c optional netgraph_bluetooth_socket netgraph/netflow/netflow.c optional netgraph_netflow netgraph/netflow/netflow_v9.c optional netgraph_netflow netgraph/netflow/ng_netflow.c optional netgraph_netflow netgraph/ng_UI.c optional netgraph_UI netgraph/ng_async.c optional netgraph_async netgraph/ng_atmllc.c optional netgraph_atmllc netgraph/ng_base.c optional netgraph netgraph/ng_bpf.c optional netgraph_bpf netgraph/ng_bridge.c optional netgraph_bridge netgraph/ng_car.c optional netgraph_car netgraph/ng_checksum.c optional netgraph_checksum netgraph/ng_cisco.c optional netgraph_cisco netgraph/ng_deflate.c optional netgraph_deflate netgraph/ng_device.c optional netgraph_device netgraph/ng_echo.c optional netgraph_echo netgraph/ng_eiface.c optional netgraph_eiface netgraph/ng_ether.c optional netgraph_ether netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_frame_relay.c optional netgraph_frame_relay netgraph/ng_gif.c optional netgraph_gif inet6 | netgraph_gif inet netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface netgraph/ng_ip_input.c optional netgraph_ip_input netgraph/ng_ipfw.c optional netgraph_ipfw inet ipfirewall netgraph/ng_ksocket.c optional netgraph_ksocket netgraph/ng_l2tp.c optional netgraph_l2tp netgraph/ng_lmi.c optional netgraph_lmi netgraph/ng_mppc.c optional netgraph_mppc_compression | \ netgraph_mppc_encryption netgraph/ng_nat.c optional netgraph_nat inet libalias netgraph/ng_one2many.c optional netgraph_one2many netgraph/ng_parse.c optional netgraph netgraph/ng_patch.c optional netgraph_patch netgraph/ng_pipe.c optional netgraph_pipe netgraph/ng_ppp.c optional netgraph_ppp netgraph/ng_pppoe.c optional netgraph_pppoe netgraph/ng_pptpgre.c optional netgraph_pptpgre netgraph/ng_pred1.c optional netgraph_pred1 netgraph/ng_rfc1490.c optional netgraph_rfc1490 netgraph/ng_socket.c optional netgraph_socket netgraph/ng_split.c optional netgraph_split netgraph/ng_sppp.c optional netgraph_sppp netgraph/ng_tag.c optional netgraph_tag netgraph/ng_tcpmss.c optional netgraph_tcpmss netgraph/ng_tee.c optional netgraph_tee netgraph/ng_tty.c optional netgraph_tty netgraph/ng_vjc.c optional netgraph_vjc netgraph/ng_vlan.c optional netgraph_vlan netinet/accf_data.c optional accept_filter_data inet netinet/accf_dns.c optional accept_filter_dns inet netinet/accf_http.c optional accept_filter_http inet netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/in_debug.c optional inet ddb netinet/in_kdtrace.c optional inet | inet6 netinet/ip_carp.c optional inet carp | inet6 carp netinet/in_fib.c optional inet netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_jail.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup netinet/in_prot.c optional inet | inet6 netinet/in_proto.c optional inet | inet6 netinet/in_rmx.c optional inet netinet/in_rss.c optional inet rss netinet/ip_divert.c optional inet ipdivert ipfirewall netinet/ip_ecn.c optional inet | inet6 netinet/ip_encap.c optional inet | inet6 netinet/ip_fastfwd.c optional inet netinet/ip_icmp.c optional inet | inet6 netinet/ip_input.c optional inet netinet/ip_mroute.c optional mrouting inet netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/ip_reass.c optional inet netinet/raw_ip.c optional inet | inet6 netinet/cc/cc.c optional inet | inet6 netinet/cc/cc_newreno.c optional inet | inet6 netinet/sctp_asconf.c optional inet sctp | inet6 sctp netinet/sctp_auth.c optional inet sctp | inet6 sctp netinet/sctp_bsd_addr.c optional inet sctp | inet6 sctp netinet/sctp_cc_functions.c optional inet sctp | inet6 sctp netinet/sctp_crc32.c optional inet | inet6 netinet/sctp_indata.c optional inet sctp | inet6 sctp netinet/sctp_input.c optional inet sctp | inet6 sctp netinet/sctp_kdtrace.c optional inet sctp | inet6 sctp netinet/sctp_output.c optional inet sctp | inet6 sctp netinet/sctp_pcb.c optional inet sctp | inet6 sctp netinet/sctp_peeloff.c optional inet sctp | inet6 sctp netinet/sctp_ss_functions.c optional inet sctp | inet6 sctp netinet/sctp_syscalls.c optional inet sctp | inet6 sctp netinet/sctp_sysctl.c optional inet sctp | inet6 sctp netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp netinet/siftr.c optional inet siftr alq | inet6 siftr alq netinet/tcp_debug.c optional tcpdebug netinet/tcp_fastopen.c optional inet tcp_rfc7413 | inet6 tcp_rfc7413 netinet/tcp_hostcache.c optional inet | inet6 netinet/tcp_input.c optional inet | inet6 netinet/tcp_log_buf.c optional tcp_blackbox inet | tcp_blackbox inet6 netinet/tcp_lro.c optional inet | inet6 netinet/tcp_output.c optional inet | inet6 netinet/tcp_offload.c optional tcp_offload inet | tcp_offload inet6 netinet/tcp_hpts.c optional tcphpts inet | tcphpts inet6 netinet/tcp_ratelimit.c optional ratelimit inet | ratelimit inet6 netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap \ compile-with "${NORMAL_C} ${NO_WNONNULL}" netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 netinet/tcp_stats.c optional stats inet | stats inet6 netinet/tcp_subr.c optional inet | inet6 netinet/tcp_syncache.c optional inet | inet6 netinet/tcp_timer.c optional inet | inet6 netinet/tcp_timewait.c optional inet | inet6 netinet/tcp_usrreq.c optional inet | inet6 netinet/udp_usrreq.c optional inet | inet6 netinet/libalias/alias.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_db.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_mod.c optional libalias | netgraph_nat netinet/libalias/alias_proxy.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_util.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_sctp.c optional libalias inet | netgraph_nat inet netinet/netdump/netdump_client.c optional inet debugnet netdump netinet6/dest6.c optional inet6 netinet6/frag6.c optional inet6 netinet6/icmp6.c optional inet6 netinet6/in6.c optional inet6 netinet6/in6_cksum.c optional inet6 netinet6/in6_fib.c optional inet6 netinet6/in6_gif.c optional gif inet6 | netgraph_gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_jail.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 netinet6/in6_pcbgroup.c optional inet6 pcbgroup netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_rss.c optional inet6 rss netinet6/in6_src.c optional inet6 netinet6/ip6_fastfwd.c optional inet6 netinet6/ip6_forward.c optional inet6 netinet6/ip6_gre.c optional gre inet6 netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 netinet6/ip6_output.c optional inet6 netinet6/mld6.c optional inet6 netinet6/nd6.c optional inet6 netinet6/nd6_nbr.c optional inet6 netinet6/nd6_rtr.c optional inet6 netinet6/raw_ip6.c optional inet6 netinet6/route6.c optional inet6 netinet6/scope6.c optional inet6 netinet6/sctp6_usrreq.c optional inet6 sctp netinet6/udp6_usrreq.c optional inet6 netipsec/ipsec.c optional ipsec inet | ipsec inet6 netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mod.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 netipsec/ipsec_pcb.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/key.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/key_debug.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/keysock.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/subr_ipsec.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/udpencap.c optional ipsec inet netipsec/xform_ah.c optional ipsec inet | ipsec inet6 netipsec/xform_esp.c optional ipsec inet | ipsec inet6 netipsec/xform_ipcomp.c optional ipsec inet | ipsec inet6 netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \ ipsec_support inet6 tcp_signature netpfil/ipfw/dn_aqm_codel.c optional inet dummynet netpfil/ipfw/dn_aqm_pie.c optional inet dummynet netpfil/ipfw/dn_heap.c optional inet dummynet netpfil/ipfw/dn_sched_fifo.c optional inet dummynet netpfil/ipfw/dn_sched_fq_codel.c optional inet dummynet netpfil/ipfw/dn_sched_fq_pie.c optional inet dummynet netpfil/ipfw/dn_sched_prio.c optional inet dummynet netpfil/ipfw/dn_sched_qfq.c optional inet dummynet netpfil/ipfw/dn_sched_rr.c optional inet dummynet netpfil/ipfw/dn_sched_wf2q.c optional inet dummynet netpfil/ipfw/ip_dummynet.c optional inet dummynet netpfil/ipfw/ip_dn_io.c optional inet dummynet netpfil/ipfw/ip_dn_glue.c optional inet dummynet netpfil/ipfw/ip_fw2.c optional inet ipfirewall netpfil/ipfw/ip_fw_bpf.c optional inet ipfirewall netpfil/ipfw/ip_fw_dynamic.c optional inet ipfirewall \ compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/ip_fw_eaction.c optional inet ipfirewall netpfil/ipfw/ip_fw_log.c optional inet ipfirewall netpfil/ipfw/ip_fw_pfil.c optional inet ipfirewall netpfil/ipfw/ip_fw_sockopt.c optional inet ipfirewall netpfil/ipfw/ip_fw_table.c optional inet ipfirewall netpfil/ipfw/ip_fw_table_algo.c optional inet ipfirewall netpfil/ipfw/ip_fw_table_value.c optional inet ipfirewall netpfil/ipfw/ip_fw_iface.c optional inet ipfirewall netpfil/ipfw/ip_fw_nat.c optional inet ipfirewall_nat netpfil/ipfw/nat64/ip_fw_nat64.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64clat.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64clat_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn.c optional inet inet6 ipfirewall \ ipfirewall_nat64 compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/nat64/nat64lsn_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/nat64/nat64stl.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64stl_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64_translate.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nptv6/ip_fw_nptv6.c optional inet inet6 ipfirewall \ ipfirewall_nptv6 netpfil/ipfw/nptv6/nptv6.c optional inet inet6 ipfirewall \ ipfirewall_nptv6 netpfil/ipfw/pmod/ip_fw_pmod.c optional inet ipfirewall_pmod netpfil/ipfw/pmod/tcpmod.c optional inet ipfirewall_pmod netpfil/pf/if_pflog.c optional pflog pf inet netpfil/pf/if_pfsync.c optional pfsync pf inet netpfil/pf/pf.c optional pf inet netpfil/pf/pf_if.c optional pf inet netpfil/pf/pf_ioctl.c optional pf inet netpfil/pf/pf_lb.c optional pf inet netpfil/pf/pf_norm.c optional pf inet netpfil/pf/pf_osfp.c optional pf inet netpfil/pf/pf_ruleset.c optional pf inet netpfil/pf/pf_table.c optional pf inet netpfil/pf/in4_cksum.c optional pf inet netsmb/smb_conn.c optional netsmb netsmb/smb_crypt.c optional netsmb netsmb/smb_dev.c optional netsmb netsmb/smb_iod.c optional netsmb netsmb/smb_rq.c optional netsmb netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb nfs/bootp_subr.c optional bootp nfscl nfs/krpc_subr.c optional bootp nfscl nfs/nfs_diskless.c optional nfscl nfs_root nfs/nfs_fha.c optional nfsd nfs/nfs_lock.c optional nfscl | nfslockd | nfsd nfs/nfs_nfssvc.c optional nfscl | nfsd nlm/nlm_advlock.c optional nfslockd | nfsd nlm/nlm_prot_clnt.c optional nfslockd | nfsd nlm/nlm_prot_impl.c optional nfslockd | nfsd nlm/nlm_prot_server.c optional nfslockd | nfsd nlm/nlm_prot_svc.c optional nfslockd | nfsd nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd # Linux Kernel Programming Interface compat/linuxkpi/common/src/linux_kmod.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_compat.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_current.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_hrtimer.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_page.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_tasklet.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_radix.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_rcu.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C} -I$S/contrib/ck/include" compat/linuxkpi/common/src/linux_schedule.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_shmemfs.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_slab.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_work.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_seq_file.c optional compat_linuxkpi | lindebugfs \ compile-with "${LINUXKPI_C}" compat/lindebugfs/lindebugfs.c optional lindebugfs \ compile-with "${LINUXKPI_C}" # OpenFabrics Enterprise Distribution (Infiniband) ofed/drivers/infiniband/core/ib_addr.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_agent.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cache.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cm.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cma.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cq.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_device.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_fmr_pool.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_iwcm.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_iwpm_msg.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_iwpm_util.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_mad.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_mad_rmpp.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_multicast.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_packer.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_sa_query.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_smi.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_sysfs.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_ucm.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_ucma.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_ud_header.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_umem.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_user_mad.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_uverbs_cmd.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_uverbs_main.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_uverbs_marshall.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_verbs.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c optional ipoib \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c optional ipoib \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" dev/mthca/mthca_allocator.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_av.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_catas.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_cmd.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_cq.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_eq.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_mad.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_main.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_mcg.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_memfree.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_mr.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_pd.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_profile.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_provider.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_qp.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_reset.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_srq.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_uar.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_fw_qos.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_ah.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_cong.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_cq.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_gsi.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_mad.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_main.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_mem.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_mr.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_qp.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_srq.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_virt.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_diagnostics.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_tree.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fwdump.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_main.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mcg.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mpfs.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mr.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pagealloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_port.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_qp.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_rl.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_srq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_tls.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_transobj.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vsc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_lib/mlx5_gid.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_dim.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_main.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_tx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_flow_table.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_hw_tls.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rl.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_txrx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_port_buffer.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" # crypto support opencrypto/cast.c optional crypto | ipsec | ipsec_support opencrypto/criov.c optional crypto | ipsec | ipsec_support opencrypto/crypto.c optional crypto | ipsec | ipsec_support opencrypto/cryptodev.c optional cryptodev opencrypto/cryptodev_if.m optional crypto | ipsec | ipsec_support opencrypto/cryptosoft.c optional crypto | ipsec | ipsec_support opencrypto/cryptodeflate.c optional crypto | ipsec | ipsec_support opencrypto/gmac.c optional crypto | ipsec | ipsec_support opencrypto/gfmult.c optional crypto | ipsec | ipsec_support opencrypto/rmd160.c optional crypto | ipsec | ipsec_support opencrypto/skipjack.c optional crypto | ipsec | ipsec_support opencrypto/xform.c optional crypto | ipsec | ipsec_support opencrypto/xform_poly1305.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_verify/sodium/verify.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" crypto/libsodium/randombytes.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" crypto/libsodium/utils.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" opencrypto/cbc_mac.c optional crypto opencrypto/xform_cbc_mac.c optional crypto rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_bck.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_dg.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_rc.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/getnetconfig.c optional krpc | nfslockd | nfscl | nfsd rpc/replay.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_callmsg.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_generic.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcb_clnt.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcb_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/svc.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_auth.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_dg.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_generic.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcsec_gss/rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_conf.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_misc.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_prot.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/svc_rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi security/audit/audit.c optional audit security/audit/audit_arg.c optional audit security/audit/audit_bsm.c optional audit security/audit/audit_bsm_db.c optional audit security/audit/audit_bsm_klib.c optional audit security/audit/audit_dtrace.c optional dtaudit audit | dtraceall audit compile-with "${CDDL_C}" security/audit/audit_pipe.c optional audit security/audit/audit_syscalls.c standard security/audit/audit_trigger.c optional audit security/audit/audit_worker.c optional audit security/audit/bsm_domain.c optional audit security/audit/bsm_errno.c optional audit security/audit/bsm_fcntl.c optional audit security/audit/bsm_socket_type.c optional audit security/audit/bsm_token.c optional audit security/mac/mac_audit.c optional mac audit security/mac/mac_cred.c optional mac security/mac/mac_framework.c optional mac security/mac/mac_inet.c optional mac inet | mac inet6 security/mac/mac_inet6.c optional mac inet6 security/mac/mac_label.c optional mac security/mac/mac_net.c optional mac security/mac/mac_pipe.c optional mac security/mac/mac_posix_sem.c optional mac security/mac/mac_posix_shm.c optional mac security/mac/mac_priv.c optional mac security/mac/mac_process.c optional mac security/mac/mac_socket.c optional mac security/mac/mac_syscalls.c standard security/mac/mac_system.c optional mac security/mac/mac_sysv_msg.c optional mac security/mac/mac_sysv_sem.c optional mac security/mac/mac_sysv_shm.c optional mac security/mac/mac_vfs.c optional mac security/mac_biba/mac_biba.c optional mac_biba security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended security/mac_ifoff/mac_ifoff.c optional mac_ifoff security/mac_lomac/mac_lomac.c optional mac_lomac security/mac_mls/mac_mls.c optional mac_mls security/mac_none/mac_none.c optional mac_none security/mac_ntpd/mac_ntpd.c optional mac_ntpd security/mac_partition/mac_partition.c optional mac_partition security/mac_portacl/mac_portacl.c optional mac_portacl security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids security/mac_stub/mac_stub.c optional mac_stub security/mac_test/mac_test.c optional mac_test security/mac_veriexec/mac_veriexec.c optional mac_veriexec security/mac_veriexec/veriexec_fingerprint.c optional mac_veriexec security/mac_veriexec/veriexec_metadata.c optional mac_veriexec security/mac_veriexec_parser/mac_veriexec_parser.c optional mac_veriexec mac_veriexec_parser security/mac_veriexec/mac_veriexec_rmd160.c optional mac_veriexec_rmd160 security/mac_veriexec/mac_veriexec_sha1.c optional mac_veriexec_sha1 security/mac_veriexec/mac_veriexec_sha256.c optional mac_veriexec_sha256 security/mac_veriexec/mac_veriexec_sha384.c optional mac_veriexec_sha384 security/mac_veriexec/mac_veriexec_sha512.c optional mac_veriexec_sha512 teken/teken.c optional sc !SC_NO_TERM_TEKEN | vt ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs ufs/ffs/ffs_snapshot.c optional ffs ufs/ffs/ffs_softdep.c optional ffs ufs/ffs/ffs_subr.c optional ffs | geom_label ufs/ffs/ffs_tables.c optional ffs | geom_label ufs/ffs/ffs_vfsops.c optional ffs ufs/ffs/ffs_vnops.c optional ffs ufs/ffs/ffs_rawread.c optional ffs directio ufs/ffs/ffs_suspend.c optional ffs ufs/ufs/ufs_acl.c optional ffs ufs/ufs/ufs_bmap.c optional ffs ufs/ufs/ufs_dirhash.c optional ffs ufs/ufs/ufs_extattr.c optional ffs ufs/ufs/ufs_gjournal.c optional ffs UFS_GJOURNAL ufs/ufs/ufs_inode.c optional ffs ufs/ufs/ufs_lookup.c optional ffs ufs/ufs/ufs_quota.c optional ffs ufs/ufs/ufs_vfsops.c optional ffs ufs/ufs/ufs_vnops.c optional ffs vm/default_pager.c standard vm/device_pager.c standard vm/phys_pager.c standard vm/redzone.c optional DEBUG_REDZONE vm/sg_pager.c standard vm/swap_pager.c standard vm/uma_core.c standard vm/uma_dbg.c standard vm/memguard.c optional DEBUG_MEMGUARD vm/vm_domainset.c standard vm/vm_fault.c standard vm/vm_glue.c standard vm/vm_init.c standard vm/vm_kern.c standard vm/vm_map.c standard vm/vm_meter.c standard vm/vm_mmap.c standard vm/vm_object.c standard vm/vm_page.c standard vm/vm_pageout.c standard vm/vm_pager.c standard vm/vm_phys.c standard vm/vm_radix.c standard vm/vm_reserv.c standard vm/vm_swapout.c optional !NO_SWAPPING vm/vm_swapout_dummy.c optional NO_SWAPPING vm/vm_unix.c standard vm/vnode_pager.c standard xen/features.c optional xenhvm xen/xenbus/xenbus_if.m optional xenhvm xen/xenbus/xenbus.c optional xenhvm xen/xenbus/xenbusb_if.m optional xenhvm xen/xenbus/xenbusb.c optional xenhvm xen/xenbus/xenbusb_front.c optional xenhvm xen/xenbus/xenbusb_back.c optional xenhvm xen/xenmem/xenmem_if.m optional xenhvm xdr/xdr.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_array.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mem.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_reference.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_sizeof.c optional krpc | nfslockd | nfscl | nfsd diff --git a/sys/dev/bktr/CHANGELOG.TXT b/sys/dev/bktr/CHANGELOG.TXT deleted file mode 100644 index bead697f04d0..000000000000 --- a/sys/dev/bktr/CHANGELOG.TXT +++ /dev/null @@ -1,519 +0,0 @@ -/* $FreeBSD$ */ - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * CHANGELOG : The Change History: - * These version numbers represent the authors own numbering. - * They are unrelated to Revision Control numbering of FreeBSD or - * any other system. - -1.0 1/24/97 First Alpha release - -1.1 2/20/97 Added video ioctl so we can do PCI To PCI - data transfers. This is for capturing data - directly to a vga frame buffer which has - a linear frame buffer. Minor code clean-up. - -1.3 2/23/97 Fixed system lock-up reported by - Randall Hopper . This - problem seems somehow to be exhibited only - in his system. I changed the setting of - INT_MASK for CAP_CONTINUOUS to be exactly - the same as CAP_SINGLE apparently setting - bit 23 cleared the system lock up. - version 1.1 of the driver has been reported - to work with STB's WinTv, Hauppage's Wincast/Tv - and last but not least with the Intel Smart - Video Recorder. - -1.4 3/9/97 fsmp@freefall.org - Merged code to support tuners on STB and WinCast - cards. - Modifications to the contrast and chroma ioctls. - Textual cleanup. - -1.5 3/15/97 fsmp@freefall.org - new bt848 specific versions of hue/bright/ - contrast/satu/satv. - Amancio's patch to fix "screen freeze" problem. - -1.6 3/19/97 fsmp@freefall.org - new table-driven frequency lookup. - removed disable_intr()/enable_intr() calls from i2c. - misc. cleanup. - -1.7 3/19/97 fsmp@freefall.org - added audio support submitted by: - Michael Petry - -1.8 3/20/97 fsmp@freefall.org - extended audio support. - card auto-detection. - major cleanup, order of routines, declarations, etc. - -1.9 3/22/97 fsmp@freefall.org - merged in Amancio's minor unit for tuner control - mods. - misc. cleanup, especially in the _intr routine. - made AUDIO_SUPPORT mainline code. - -1.10 3/23/97 fsmp@freefall.org - added polled hardware i2c routines, - removed all existing software i2c routines. - created software i2cProbe() routine. - Randall Hopper's fixes of BT848_GHUE & BT848_GBRIG. - eeprom support. - -1.11 3/24/97 fsmp@freefall.org - Louis Mamakos's new bt848 struct. - -1.12 3/25/97 fsmp@freefall.org - japanese freq table from Naohiro Shichijo. - new table structs for tuner lookups. - major scrub for "magic numbers". - -1.13 3/28/97 fsmp@freefall.org - 1st PAL support. - MAGIC_[1-4] demarcates magic #s needing PAL work. - AFC code submitted by Richard Tobin - . - -1.14 3/29/97 richard@cogsci.ed.ac.uk - PAL support: magic numbers moved into - format_params structure. - Revised AFC interface. - fixed DMA_PROG_ALLOC size misdefinition. - -1.15 4/18/97 John-Mark Gurney - Added [SR]RGBMASKs ioctl for byte swapping. - -1.16 4/20/97 Randall Hopper - Generalized RGBMASK ioctls for general pixel - format setting [SG]ACTPIXFMT, and added query API - to return driver-supported pix fmts GSUPPIXFMT. - -1.17 4/21/97 hasty@rah.star-gate.com - Clipping support added. - -1.18 4/23/97 Clean up after failed CAP_SINGLEs where bt - interrupt isn't delivered, and fixed fixing - CAP_SINGLEs that for ODD_ONLY fields. -1.19 9/8/97 improved yuv support , cleaned up weurope - channel table, incorporated cleanup work from - Luigi, fixed pci interface bug due to a - change in the pci interface which disables - interrupts from a PCI device by default, - Added Luigi's, ioctl's BT848_SLNOTCH, - BT848_GLNOTCH (set luma notch and get luma not) -1.20 10/5/97 Keith Sklower submitted - a patch to fix compilation of the BSDI's PCI - interface. - Hideyuki Suzuki - Submitted a patch for Japanese cable channels - Joao Carlos Mendes Luis jonny@gta.ufrj.br - Submitted general ioctl to set video broadcast - formats (PAL, NTSC, etc..) previously we depended - on the Bt848 auto video detect feature. -1.21 10/24/97 Randall Hopper - Fix temporal decimation, disable it when - doing CAP_SINGLEs, and in dual-field capture, don't - capture fields for different frames -1.22 11/08/97 Randall Hopper - Fixes for packed 24bpp - FIFO alignment -1.23 11/17/97 Amancio - Added yuv support mpeg encoding -1.24 12/27/97 Jonathan Hanna - Patch to support Philips FR1236MK2 tuner -1.25 02/02/98 Takeshi Ohashi - submitted - code to support bktr_read . - Flemming Jacobsen - submitted code to support radio available with in - some bt848 based cards;additionally, wrote code to - correctly recognized his bt848 card. - Roger Hardiman submitted - various fixes to smooth out the microcode and made - all modes consistent. -1.26 Moved Luigi's I2CWR ioctl from the video_ioctl - section to the tuner_ioctl section - Changed Major device from 79 to 92 and reserved - our Major device number -- hasty@star-gate.com -1.27 Last batch of patches for radio support from - Flemming Jacobsen . - Added B849 PCI ID submitted by: - Tomi Vainio -1.28 Frank Nobis added tuner support - for the German Phillips PAL tuner and - additional channels for german cable tv. -1.29 Roger Hardiman - Revised autodetection code to correctly handle both - old and new VideoLogic Captivator PCI cards. - Added tsleep of 2 seconds to initialistion code - for PAL users.Corrected clock selection code on - format change. -1.30 Bring back Frank Nobis 's opt_bktr.h - -1.31 Randall Hopper - submitted ioctl to clear the video buffer - prior to starting video capture - Amancio : clean up yuv12 so that it does not - affect rgb capture. Basically, fxtv after - capturing in yuv12 mode , switching to rgb - would cause the video capture to be too bright. -1.32 disable inverse gamma function for rgb and yuv - capture. fixed meteor brightness ioctl it now - converts the brightness value from unsigned to - signed. -1.33 added sysctl: hw.bt848.tuner, hw.bt848.reverse_mute, - hw.bt848.card - card takes a value from 0 to bt848_max_card - tuner takes a value from 0 to bt848_max_tuner - reverse_mute : 0 no effect, 1 reverse tuner - mute function some tuners are wired reversed :( -1.34 reverse mute function for ims turbo card - -1.35 Roger Hardiman - options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL - in the kernel config file makes the driver's - video_open() function select PAL rather than NTSC. - This fixed all the hangs on my Dual Crystal card - when using a PAL video signal. As a result, you - can lose the tsleep (of 2 seconds - now 0.25!!) - which I previously added. (Unless someone else - wanted the 0.25 second tsleep). - -1.36 added bt848.format sysctl variable. - 1 denotes NTSC , 0 denotes PAL - -1.37 added support for Bt878 and improved Hauppauge's - bt848 tuner recognition -1.38 Further improvements on Hauppauge's rely on - eeprom[9] to determine the tuner type 8) - - AVerMedia card type added - -1.39 08/05/98 Roger Hardiman - Updated Hauppauge detection code for Tuner ID 0x0a - for newer NTSC WinCastTV 404 with Bt878 chipset. - Tidied up PAL default in video_open() - - Soren bumped version from 1.39 to 1.49 to sync - with FreeBSD CVS numbers. - -1.49 10 August 1998 Roger Hardiman - Added Capture Area ioctl - BT848[SG]CAPAREA. - Normally the full 640x480 (768x576 PAL) image - is grabbed. This ioctl allows a smaller area - from anywhere within the video image to be - grabbed, eg a 400x300 image from (50,10). - See restrictions in BT848SCAPAREA. - -1.50 31 August 1998 Roger Hardiman - Renamed BT848[SG]CAPAREA to BT848_[SG]CAPAREA. - Added PR kern/7177 for SECAM Video Highway Xtreme - with single crystal PLL configuration - submitted by Vsevolod Lobko . - In kernel configuration file add - options OVERRIDE_CARD=2 - options OVERRIDE_TUNER=11 - options BKTR_USE_PLL - -1.51 31 August 1998 Roger Hardiman - Fixed bug in Miro Tuner detection. Missing Goto. - Removed Hauppauge EEPROM 0x10 detection as I think - 0x10 should be a PAL tuner, not NTSC. - Reinstated some Tuner Guesswork code from 1.27 - -1.52 3 Sep 1998 Roger Hardiman - Submitted patch by Vsevolod Lobko - to correct SECAM B-Delay and add XUSSR channel set. - -1.53 9 Sep 1998 Roger Hardiman - Changed METEORSINPUT for Hauppauge cards with bt878. - Submitted by Fred Templin - Also fixed video_open defines and 878 support. - -1.54 18 Sep 1998 Roger Hardiman - Changed tuner code to autodetect tuner i2c address. - Addresses were incorrectly hardcoded. - -1.55 21 Sep 1998 Roger Hardiman - Hauppauge Tech Support confirmed all Hauppauge 878 - PAL/SECAM boards will use PLL mode. - Added to card probe. Thanks to Ken and Fred. - -1.56 21 Jan 1999 Roger Hardiman - Added detection of Hauppauge IR remote control. - and MSP34xx Audio chip. Fixed i2c read error. - Hauppauge supplied details of new Tuner Types. - Danny Braniss submitted Bt878 - AVerMedia detection with PCI subsystem vendor id. - -1.57 26 Jan 1999 Roger Hardiman - Support for MSP3410D / MSP3415D Stereo/Mono audio - using the audio format Auto Detection Mode. - Nicolas Souchu ported the - msp_read/write/reset functions to smbus/iicbus. - METEOR_INPUT_DEV2 now selects a composite camera on - the SVIDEO port for Johan Larsson - For true SVIDEO, use METEOR_INPUT_DEV_SVIDEO - -1.58 8 Feb 1999 Roger Hardiman - Added check to bktr_mmap from OpenBSD driver. - Improved MSP34xx reset for bt848 Hauppauge boards. - Added detection for Bt848a. - Vsevolod Lobko added - more XUSSR channels. - -1.59 9 Feb 1999 Added ioctl REMOTE_GETKEY for Hauppauge Infra-Red - Remote Control. Submitted by Roger Hardiman. - Added ioctl TVTUNER_GETCHANSET and - BT848_GPIO_SET_EN,BT848_GPIO_SET_DATA (and GETs) - Submitted by Vsevolod Lobko - -1.60 23 Feb 1999 Roger Hardiman - Corrected Mute on Hauppauge Radio cards. - Autodetect MMAC Osprey by looking for "MMAC" in the EEPROM. - Added for Jan Schmidt - Added ALPS Tuner Type from Hiroki Mori - -1.61 29 Apr 1999 Roger Hardiman - Fix row=0/columns=0 bug. From Randal Hopper - Add option to block the reset of the MSP34xx audio chip by - adding options BKTR_NO_MSP_RESET to the kernel config file. - This is useful if you run another operating system - first to initialise the audio chip, then do a soft reboot. - Added for Yuri Gindin - -1.62 29 Apr 1999 Added new cards: NEC PK-UG-X017 and I/O DATA GV-BCTV2/PCI - Added new tuner: ALPS_TSBH1 (plus FM Radio for ALPS_TSCH5) - Added support for BCTV audio mux. - All submitted by Hiroki Mori - -1.63 29 Apr 1999 Roger Hardiman - Added initial code for VBI capture based on work by - Hiroki Mori and reworked by myself. - This allows software decoding of teletext, intercast and - subtitles via /dev/vbi. - -1.64 7 May 1999 Roger Hardiman - Support LifeView FlyVideo 98 cards. Use EEPROM for card - autodetection. Use bttv's audio mux values. - Thanks to Paul Reece , - Ivan Brawley and - Gilad Rom - Automatically locate the EEPROM i2c address and read the - subsystem_vendor_id from EEPROM and not the PCI registers. - Add NSMBUS checks around smbus/iicbus i2c bus code - making it easier to compile the driver under 2.2.x. - Add GPIO mask for the audio mux to each card type. - Add CARD_ZOLTRIX and CARD_KISS from mailing list searches. - -1.65 18 May 1999 Roger Hardiman - Change Intel GPIO mask to stop turning the Intel Camera off - Fixed tuner selection on Hauppauge card with tuner 0x0a - Replaced none tuner with no tuner for Theo de Raadt. - Ivan Brawley added - the Australian channel frequencies. - -1.66 19 May 1999 Ivan Brawley added better - Australian channel frequencies. - -1.67 23 May 1999 Roger Hardiman - Added rgb_vbi_prog() to capture VBI data and video at the - same time. To capture VBI data, /dev/vbi must be opened - before starting video capture. - -1.68 25 May 1999 Roger Hardiman - Due to differences in PCI bus implementations from various - motherboard chipset manufactuers, the Bt878/Bt879 has 3 - PCI bus compatibility modes. These are - NORMAL PCI 2.1 for proper PCI 2.1 compatible chipsets. - INTEL 430 FX for the Intel 430 FX chipset. - SIS VIA CHIPSET for certain SiS and VIA chipsets. - Older Intel and non-Intel chipsets may also benefit from - either 430_FX or SIS/VIA mode. - - NORMAL PCI mode is enabled by default. - For INTEL 430 FX mode, add this to your kenel config: - options "BKTR_430_FX_MODE" - For SiS / VIA mode, add this to your kernel config: - options "BKTR_SIS_VIA_MODE" - - Using quotes in these options is not needed in FreeBSD 4.x. - - Note. Newer VIA chipsets should be fully PCI 2.1 compatible - and should work fine in the Default mode. - - Also rename 849 to 849A, the correct name for the chip. - -1.69 12 June 1999 Roger Hardiman - Updates for FreeBSD 4.x device driver interface. - BSDI code removed. Will be restored later. - -1.70 12 July 1999 Roger Hardiman - Reorganise OS device dependent parts (based on a port to - linux by Brad Parker). - Make the driver compile on FreeBSD 2.2.x systems again. - Change number of VBI lines from 16 to 12 for NTSC formats. - Changes to probeCard() for better eeprom identification. - Added STB Bt878 card identification. - Add Hauppauge model identification to probeCard(). - Added TDA9850 initialisation code taken from Linux bttv. - Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP. - Matt Brown added MSP3430G DBX initialisation. - -1.71 30 Aug 1999 Roger Hardiman - Small cleanup of OS dependent code. Remove NPCI usage. - Fix bug in AVerMedia detection. - Update VBI support for the AleVT Teletext package. Parts - from Juha Nurmela's driver - Add support for Hauppauge 627 and Temic 4006 submitted - by Maurice Castro - Tom Jansen added BSDi support again. - -1.72 31 Aug 1999 Juha Nurmela - Clear cap_ctl register when restarting the RISC program. - This fixes the freezes experienced when changing changes. - -1.73 10 Sep 1999 Roger Hardiman - Add Hauppauge tuner #6 for Brian Somers - Add card type for Aimslabs Video Highway Xtreme for - Ladislav Kostal - Added select() code (for VBI) for the 2.2.x driver - tested by Steve Richards - -1.74 17 Sep 1999 Roger Hardiman - Fix bug where FM radio stations were offset after using FXTV - AVerMedia tuner type autodetection added for cards with - a configuration EEPROM (currently their Bt878 range) - Thanks to Frank at AVerMedia for providing the information. - Tested by David La Croix - Tidy up some tuner code and Hauppauge detection code. - New NetBSD code from Bernd Ernesti - -2.00 25 Sep 1999 Roger Hardiman - Split the driver into separate tuner, card and audio sections. - Update tuner code for FM radio to use datasheet equations. - -2.01 27 Sep 1999 Roger Hardiman - Add Dynalink Magic TView for Craig - Add Leadtek Winfast 2000 for Peter Wemm - There is no audio support on these 2 cards yet. - Tidy up a few tables with tabs and PLL selection code. - Restore Video Highway Xtreme PLL code. - -2.02 4 Oct 1999 Peter Wemm - Updated Australian Channel Set. - Added Tuner and Mute values for LeadTek Winfast 2000 card - -2.03 5 Oct 1999 Thomas Runge - Found FM radio bug mute introduced in release 2.00 - -2.04 20 Oct 1999 Roger Hardiman - Updated AVerMedia audio sources to support FM and Line In - sources properly. (Based on info supplied by AVerMedia) - Make PLL mode the default for Bt878 chips. This means PAL - Bt878 users no longer need the BKTR_USE_PLL kernel option. - Detect and auto-configure Dolby Surround Sound DPL3518A chip - on Hauppauge WinTV Theater. From Frank Nobis - -2.05 8 Nov 1999 Update tuner control codes for Philips SECAM. Submitted by - Cyrille Lefevre - Updated clipping code, ready for Xv support in XFree86 4.0, - submitted by Thomas Mueller - Thomas also has information on a LynxOS port of this driver. - Phase out the rgb_prog RISC program and use rgb_vbi_prog as - the default. Now you no longer have to open /dev/vbi - before /dev/bktr. - Roger Hardiman - -2.06 7 Dec 1999 Fix bug which made the tuner fail on cards detected as - IMS Turbo. Found by Patrick Mackeown - Put back some Hauppauge Tuner Types I deleted my mistake. - Backout the switch from rgb_prob to rgb_vbi_prog due to - problems with NTSC users. - -2.07 24 Jan 2000 Update i2c code to build on FreeBSD 3.x and 4.x machines. - Added GPIO audio values for the Askey/Dynalink TV card - taken from postings on the V4L mailing list. - Update Australian Channel Set. Submitted by - John Birrell - Add new Channel Set for France. Submitted by - Daniel Dagneaux - -2.08 6 Mar 2000 Reinstate rgb_vbi_prog as the default RISC program for - PAL video. This does not want to work for NTSC, which will - continue to use the rgb_prog RISC program. - Add support for cable channels above channel 100. - Submitted by Scott Presnell - New MSP3410/3415 setup code submitted by - Frank Nobis. This is experimental and is - enabled by setting the sysctl, hw.bt848.slow_msp_audio to 1 - before starting FXTV (or before opening /dev/bktrN) - -2.09 20 Mar 2000 Thomas Klausner submitted - patches to include the NetBSD and OpenBSD support from driver - 1.74 into the new 2.xx driver. NetBSD is tested. OpenBSD is - untested. - Also fixed coding error in bktr_audio.c spotted by Thomas. - Change xxx_ioctl functions to use ioctl_cmd_t for the cmd - parameter. Found by looking at OpenBSDs change logs. - Delete PROT_EXEC from OpenBSD (as per OpenBSD cvs logs). - -2.10 4 Apr 2000 Convert to using bus_space() to access the Bt848/878 registers - rather than using a memory mapped structure. This makes the - driver portable to other architectures, like Alpha and PPC. - This was done by Thomas Klausner and - myself Roger Hardiman - -2.11 15 Apr 2000 Made changes so the driver compiles on FreeBSD/Alpha. - Stop printing MSP autodetect. Requested by - Chris D. Faulhaber - -2.12 16 Apr 2000 Set adelay as an 8 bit value, noticed by - Thomas Klausner - Fix typo in the new interrupt code. - -2.12 20 May 2000 Merge in NetBSD changes from Thomas Klausner - following the import of driver 2.12 into NetBSD - -2.13 26 Jun 2000 Merge in more changes from Thomas Klausner - syncing this driver with the NetBSD source at 25th June. - -2.14 28 Jun 2000 Add new Hauppauge Tuner Types, supplied by Hauppauge and - required for Josef Karthauser - Change the structure of some of the #include files and - merge in more NetBSD changes. - -2.15 10 Sep 2000 Add support for bktr_mem, a module to hold onto the bktr - drives's contiguous memory buffers even when it is unloaded - and reloaded. - Simplify the use of the optional SMBUS i2c code by using a new - #define called BKTR_USE_FREEBSD_SMBUS. - Poul-Henning Kamp changed the DEVFS code. - Peter Wemm fixed an SMBUS warning. - Alexander Langer fixed some FreeBSD newbus - resource allocation problems (FreeBSD PR kern/18744). - -2.16 19 Sep 2000 Merge in NetBSD changes from Thomas Klausner - -2.17 19 Oct 2000 Alexander Langer and - Daniel O'Connor - both submitted fixes to devfs code. - Fix PHK's commit so we only include machine/clock.h in - FreeBSD 2.x, 3.x and 4.x systems - -2.18 30 Oct 2000 Roger Hardiman - Add new ioctls to allow userland programs - fuller access to the I2C bus, BT848_MSP_READ BT848_MSP_WRITE - and BT848_MSP_RESET. - Add tuner type 0x2a. Remove 0x2c which was incorrect. - Christian Gusenbauer added - support for audio on Hauppauge cards without the audio mux. - The MSP is used for audio selection. (the 44xxx models) - -[see https://svnweb.freebsd.org/base/head/sys/dev/bktr/ -for newer change logs ] diff --git a/sys/dev/bktr/bktr_audio.c b/sys/dev/bktr/bktr_audio.c deleted file mode 100644 index ca1cf431ff3e..000000000000 --- a/sys/dev/bktr/bktr_audio.c +++ /dev/null @@ -1,646 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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 -__FBSDID("$FreeBSD$"); - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_audio : This deals with controlling the audio on TV cards, - * controlling the Audio Multiplexer (audio source selector). - * controlling any MSP34xx stereo audio decoders. - * controlling any DPL35xx dolby surroud sound audio decoders. - * initialising TDA98xx audio devices. - * - */ - -#include "opt_bktr.h" /* Include any kernel config options */ - -#include -#include -#include - -#ifdef __FreeBSD__ - -#if (__FreeBSD_version < 500000) -#include /* for DELAY */ -#include -#else -#include -#include -#include -#include -#endif - -#include -#include -#endif - -#ifdef __NetBSD__ -#include -#include /* NetBSD location of .h files */ -#include -#include -#include -#include -#include -#else -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include -#include -#include -#include -#endif - -/* - * Prototypes for the GV_BCTV2 specific functions. - */ -void set_bctv2_audio( bktr_ptr_t bktr ); -void bctv2_gpio_write( bktr_ptr_t bktr, int port, int val ); -/*int bctv2_gpio_read( bktr_ptr_t bktr, int port );*/ /* Not used */ - -/* - * init_audio_devices - * Reset any MSP34xx or TDA98xx audio devices. - */ -void init_audio_devices( bktr_ptr_t bktr ) { - - /* enable stereo if appropriate on TDA audio chip */ - if ( bktr->card.dbx ) - init_BTSC( bktr ); - - /* reset the MSP34xx stereo audio chip */ - if ( bktr->card.msp3400c ) - msp_dpl_reset( bktr, bktr->msp_addr ); - - /* reset the DPL35xx dolby audio chip */ - if ( bktr->card.dpl3518a ) - msp_dpl_reset( bktr, bktr->dpl_addr ); - -} - - -/* - * - */ -#define AUDIOMUX_DISCOVER_NOT -int -set_audio( bktr_ptr_t bktr, int cmd ) -{ - u_long temp; - volatile u_char idx; - -#if defined( AUDIOMUX_DISCOVER ) - if ( cmd >= 200 ) - cmd -= 200; - else -#endif /* AUDIOMUX_DISCOVER */ - - /* check for existence of audio MUXes */ - if ( !bktr->card.audiomuxs[ 4 ] ) - return( -1 ); - - switch (cmd) { - case AUDIO_TUNER: -#ifdef BKTR_REVERSEMUTE - bktr->audio_mux_select = 3; -#else - bktr->audio_mux_select = 0; -#endif - - if (bktr->reverse_mute ) - bktr->audio_mux_select = 0; - else - bktr->audio_mux_select = 3; - - break; - case AUDIO_EXTERN: - bktr->audio_mux_select = 1; - break; - case AUDIO_INTERN: - bktr->audio_mux_select = 2; - break; - case AUDIO_MUTE: - bktr->audio_mute_state = TRUE; /* set mute */ - break; - case AUDIO_UNMUTE: - bktr->audio_mute_state = FALSE; /* clear mute */ - break; - default: - printf("%s: audio cmd error %02x\n", bktr_name(bktr), - cmd); - return( -1 ); - } - - - /* Most cards have a simple audio multiplexer to select the - * audio source. The I/O_GV card has a more advanced multiplexer - * and requires special handling. - */ - if ( bktr->bt848_card == CARD_IO_BCTV2 ) { - set_bctv2_audio( bktr ); - return( 0 ); - } - - /* Proceed with the simpler audio multiplexer code for the majority - * of Bt848 cards. - */ - - /* - * Leave the upper bits of the GPIO port alone in case they control - * something like the dbx or teletext chips. This doesn't guarantee - * success, but follows the rule of least astonishment. - */ - - if ( bktr->audio_mute_state == TRUE ) { -#ifdef BKTR_REVERSEMUTE - idx = 0; -#else - idx = 3; -#endif - - if (bktr->reverse_mute ) - idx = 3; - else - idx = 0; - - } - else - idx = bktr->audio_mux_select; - - - temp = INL(bktr, BKTR_GPIO_DATA) & ~bktr->card.gpio_mux_bits; -#if defined( AUDIOMUX_DISCOVER ) - OUTL(bktr, BKTR_GPIO_DATA, temp | (cmd & 0xff)); - printf("%s: cmd: %d audio mux %x temp %x \n", bktr_name(bktr), - cmd, bktr->card.audiomuxs[ idx ], temp ); -#else - OUTL(bktr, BKTR_GPIO_DATA, temp | bktr->card.audiomuxs[ idx ]); -#endif /* AUDIOMUX_DISCOVER */ - - - - /* Some new Hauppauge cards do not have an audio mux */ - /* Instead we use the MSP34xx chip to select TV audio, Line-In */ - /* FM Radio and Mute */ - /* Examples of this are the Hauppauge 44xxx MSP34xx models */ - /* It is ok to drive both the mux and the MSP34xx chip. */ - /* If there is no mux, the MSP does the switching of the audio source */ - /* If there is a mux, it does the switching of the audio source */ - - if ((bktr->card.msp3400c) && (bktr->audio_mux_present == 0)) { - - if (bktr->audio_mute_state == TRUE ) { - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000, 0x0000); /* volume to MUTE */ - } else { - if(bktr->audio_mux_select == 0) { /* TV Tuner */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000, 0x7300); /* 0 db volume */ - if (bktr->msp_source_selected != 0) msp_autodetect(bktr); /* setup TV audio mode */ - bktr->msp_source_selected = 0; - } - if(bktr->audio_mux_select == 1) { /* Line In */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000, 0x7300); /* 0 db volume */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000d, 0x1900); /* scart prescale */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008, 0x0220); /* SCART | STEREO */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0013, 0x0000); /* DSP In = SC1_IN_L/R */ - bktr->msp_source_selected = 1; - } - - if(bktr->audio_mux_select == 2) { /* FM Radio */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000, 0x7300); /* 0 db volume */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000d, 0x1900); /* scart prescale */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008, 0x0220); /* SCART | STEREO */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0013, 0x0200); /* DSP In = SC2_IN_L/R */ - bktr->msp_source_selected = 2; - } - } - } - - - return( 0 ); -} - - -/* - * - */ -void -temp_mute( bktr_ptr_t bktr, int flag ) -{ - static int muteState = FALSE; - - if ( flag == TRUE ) { - muteState = bktr->audio_mute_state; - set_audio( bktr, AUDIO_MUTE ); /* prevent 'click' */ - } - else { - tsleep( BKTR_SLEEP, PZERO, "tuning", hz/8 ); - if ( muteState == FALSE ) - set_audio( bktr, AUDIO_UNMUTE ); - } -} - -/* address of BTSC/SAP decoder chip */ -#define TDA9850_WADDR 0xb6 -#define TDA9850_RADDR 0xb7 - - -/* registers in the TDA9850 BTSC/dbx chip */ -#define CON1ADDR 0x04 -#define CON2ADDR 0x05 -#define CON3ADDR 0x06 -#define CON4ADDR 0x07 -#define ALI1ADDR 0x08 -#define ALI2ADDR 0x09 -#define ALI3ADDR 0x0a - -/* - * initialise the dbx chip - * taken from the Linux bttv driver TDA9850 initialisation code - */ -void -init_BTSC( bktr_ptr_t bktr ) -{ - i2cWrite(bktr, TDA9850_WADDR, CON1ADDR, 0x08); /* noise threshold st */ - i2cWrite(bktr, TDA9850_WADDR, CON2ADDR, 0x08); /* noise threshold sap */ - i2cWrite(bktr, TDA9850_WADDR, CON3ADDR, 0x40); /* stereo mode */ - i2cWrite(bktr, TDA9850_WADDR, CON4ADDR, 0x07); /* 0 dB input gain? */ - i2cWrite(bktr, TDA9850_WADDR, ALI1ADDR, 0x10); /* wideband alignment? */ - i2cWrite(bktr, TDA9850_WADDR, ALI2ADDR, 0x10); /* spectral alignment? */ - i2cWrite(bktr, TDA9850_WADDR, ALI3ADDR, 0x03); -} - -/* - * setup the dbx chip - * XXX FIXME: a lot of work to be done here, this merely unmutes it. - */ -int -set_BTSC( bktr_ptr_t bktr, int control ) -{ - return( i2cWrite( bktr, TDA9850_WADDR, CON3ADDR, control ) ); -} - -/* - * CARD_GV_BCTV2 specific functions. - */ - -#define BCTV2_AUDIO_MAIN 0x10 /* main audio program */ -#define BCTV2_AUDIO_SUB 0x20 /* sub audio program */ -#define BCTV2_AUDIO_BOTH 0x30 /* main(L) + sub(R) program */ - -#define BCTV2_GPIO_REG0 1 -#define BCTV2_GPIO_REG1 3 - -#define BCTV2_GR0_AUDIO_MODE 3 -#define BCTV2_GR0_AUDIO_MAIN 0 /* main program */ -#define BCTV2_GR0_AUDIO_SUB 3 /* sub program */ -#define BCTV2_GR0_AUDIO_BOTH 1 /* main(L) + sub(R) */ -#define BCTV2_GR0_AUDIO_MUTE 4 /* audio mute */ -#define BCTV2_GR0_AUDIO_MONO 8 /* force mono */ - -void -set_bctv2_audio( bktr_ptr_t bktr ) -{ - int data; - - switch (bktr->audio_mux_select) { - case 1: /* external */ - case 2: /* internal */ - bctv2_gpio_write(bktr, BCTV2_GPIO_REG1, 0); - break; - default: /* tuner */ - bctv2_gpio_write(bktr, BCTV2_GPIO_REG1, 1); - break; - } -/* switch (bktr->audio_sap_select) { */ - switch (BCTV2_AUDIO_BOTH) { - case BCTV2_AUDIO_SUB: - data = BCTV2_GR0_AUDIO_SUB; - break; - case BCTV2_AUDIO_BOTH: - data = BCTV2_GR0_AUDIO_BOTH; - break; - case BCTV2_AUDIO_MAIN: - default: - data = BCTV2_GR0_AUDIO_MAIN; - break; - } - if (bktr->audio_mute_state == TRUE) - data |= BCTV2_GR0_AUDIO_MUTE; - - bctv2_gpio_write(bktr, BCTV2_GPIO_REG0, data); - - return; -} - -/* gpio_data bit assignment */ -#define BCTV2_GPIO_ADDR_MASK 0x000300 -#define BCTV2_GPIO_WE 0x000400 -#define BCTV2_GPIO_OE 0x000800 -#define BCTV2_GPIO_VAL_MASK 0x00f000 - -#define BCTV2_GPIO_PORT_MASK 3 -#define BCTV2_GPIO_ADDR_SHIFT 8 -#define BCTV2_GPIO_VAL_SHIFT 12 - -/* gpio_out_en value for read/write */ -#define BCTV2_GPIO_OUT_RMASK 0x000f00 -#define BCTV2_GPIO_OUT_WMASK 0x00ff00 - -#define BCTV2_BITS 100 - -void -bctv2_gpio_write( bktr_ptr_t bktr, int port, int val ) -{ - u_long data, outbits; - - port &= BCTV2_GPIO_PORT_MASK; - switch (port) { - case 1: - case 3: - data = ((val << BCTV2_GPIO_VAL_SHIFT) & BCTV2_GPIO_VAL_MASK) | - ((port << BCTV2_GPIO_ADDR_SHIFT) & BCTV2_GPIO_ADDR_MASK) | - BCTV2_GPIO_WE | BCTV2_GPIO_OE; - outbits = BCTV2_GPIO_OUT_WMASK; - break; - default: - return; - } - OUTL(bktr, BKTR_GPIO_OUT_EN, 0); - OUTL(bktr, BKTR_GPIO_DATA, data); - OUTL(bktr, BKTR_GPIO_OUT_EN, outbits); - DELAY(BCTV2_BITS); - OUTL(bktr, BKTR_GPIO_DATA, data & ~BCTV2_GPIO_WE); - DELAY(BCTV2_BITS); - OUTL(bktr, BKTR_GPIO_DATA, data); - DELAY(BCTV2_BITS); - OUTL(bktr, BKTR_GPIO_DATA, ~0); - OUTL(bktr, BKTR_GPIO_OUT_EN, 0); -} - -/* Not yet used -int -bctv2_gpio_read( bktr_ptr_t bktr, int port ) -{ - u_long data, outbits, ret; - - port &= BCTV2_GPIO_PORT_MASK; - switch (port) { - case 1: - case 3: - data = ((port << BCTV2_GPIO_ADDR_SHIFT) & BCTV2_GPIO_ADDR_MASK) | - BCTV2_GPIO_WE | BCTV2_GPIO_OE; - outbits = BCTV2_GPIO_OUT_RMASK; - break; - default: - return( -1 ); - } - OUTL(bktr, BKTR_GPIO_OUT_EN, 0); - OUTL(bktr, BKTR_GPIO_DATA, data); - OUTL(bktr, BKTR_GPIO_OUT_EN, outbits); - DELAY(BCTV2_BITS); - OUTL(bktr, BKTR_GPIO_DATA, data & ~BCTV2_GPIO_OE); - DELAY(BCTV2_BITS); - ret = INL(bktr, BKTR_GPIO_DATA); - DELAY(BCTV2_BITS); - OUTL(bktr, BKTR_GPIO_DATA, data); - DELAY(BCTV2_BITS); - OUTL(bktr, BKTR_GPIO_DATA, ~0); - OUTL(bktr, BKTR_GPIO_OUT_EN, 0); - return( (ret & BCTV2_GPIO_VAL_MASK) >> BCTV2_GPIO_VAL_SHIFT ); -} -*/ - -/* - * setup the MSP34xx Stereo Audio Chip - * This uses the Auto Configuration Option on MSP3410D and MSP3415D chips - * and DBX mode selection for MSP3430G chips. - * For MSP3400C support, the full programming sequence is required and is - * not yet supported. - */ - -/* Read the MSP version string */ -void msp_read_id( bktr_ptr_t bktr ){ - int rev1=0, rev2=0; - rev1 = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x001e); - rev2 = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x001f); - - sprintf(bktr->msp_version_string, "34%02d%c-%c%d", - (rev2>>8)&0xff, (rev1&0xff)+'@', ((rev1>>8)&0xff)+'@', rev2&0x1f); - -} - - -/* Configure the MSP chip to Auto-detect the audio format. - * For the MSP3430G, we use fast autodetect mode - * For the MSP3410/3415 there are two schemes for this - * a) Fast autodetection - the chip is put into autodetect mode, and the function - * returns immediately. This works in most cases and is the Default Mode. - * b) Slow mode. The function sets the MSP3410/3415 chip, then waits for feedback from - * the chip and re-programs it if needed. - */ -void msp_autodetect( bktr_ptr_t bktr ) { - -#ifdef BKTR_NEW_MSP34XX_DRIVER - - /* Just wake up the (maybe) sleeping thread, it'll do everything for us */ - msp_wake_thread(bktr); - -#else - int auto_detect, loops; - int stereo; - - /* MSP3430G - countries with mono and DBX stereo */ - if (strncmp("3430G", bktr->msp_version_string, 5) == 0){ - - msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0030,0x2003);/* Enable Auto format detection */ - msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0020,0x0020);/* Standard Select Reg. = BTSC-Stereo*/ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000E,0x2403);/* darned if I know */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0320);/* Source select = (St or A) */ - /* & Ch. Matrix = St */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000,0x7300);/* Set volume to 0db gain */ - } - - - /* MSP3415D SPECIAL CASE Use the Tuner's Mono audio output for the MSP */ - /* (for Hauppauge 44xxx card with Tuner Type 0x2a) */ - else if ( ( (strncmp("3415D", bktr->msp_version_string, 5) == 0) - &&(bktr->msp_use_mono_source == 1) - ) - || (bktr->slow_msp_audio == 2) ){ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000, 0x7300); /* 0 db volume */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000d, 0x1900); /* scart prescale */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008, 0x0220); /* SCART | STEREO */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0013, 0x0100); /* DSP In = MONO IN */ - } - - - /* MSP3410/MSP3415 - countries with mono, stereo using 2 FM channels and NICAM */ - /* FAST sound scheme */ - else if (bktr->slow_msp_audio == 0) { - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000,0x7300);/* Set volume to 0db gain */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0000);/* Spkr Source = default(FM/AM) */ - msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0020,0x0001);/* Enable Auto format detection */ - msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0021,0x0001);/* Auto selection of NICAM/MONO mode */ - } - - - /* MSP3410/MSP3415 - European Countries where the fast MSP3410/3415 programming fails */ - /* SLOW sound scheme */ - else if ( bktr->slow_msp_audio == 1) { - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0000,0x7300);/* Set volume to 0db gain */ - msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0020,0x0001);/* Enable Auto format detection */ - - /* wait for 0.5s max for terrestrial sound autodetection */ - loops = 10; - do { - DELAY(100000); - auto_detect = msp_dpl_read(bktr, bktr->msp_addr, 0x10, 0x007e); - loops++; - } while (auto_detect > 0xff && loops < 50); - if (bootverbose)printf ("%s: Result of autodetect after %dms: %d\n", - bktr_name(bktr), loops*10, auto_detect); - - /* Now set the audio baseband processing */ - switch (auto_detect) { - case 0: /* no TV sound standard detected */ - break; - case 2: /* M Dual FM */ - break; - case 3: /* B/G Dual FM; German stereo */ - /* Read the stereo detection value from DSP reg 0x0018 */ - DELAY(20000); - stereo = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x0018); - if (bootverbose)printf ("%s: Stereo reg 0x18 a: %d\n", - bktr_name(bktr), stereo); - DELAY(20000); - stereo = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x0018); - if (bootverbose)printf ("%s: Stereo reg 0x18 b: %d\n", - bktr_name(bktr), stereo); - DELAY(20000); - stereo = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x0018); - if (bootverbose)printf ("%s: Stereo reg 0x18 c: %d\n", - bktr_name(bktr), stereo); - if (stereo > 0x0100 && stereo < 0x8000) { /* Seems to be stereo */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0020);/* Loudspeaker set stereo*/ - /* - set spatial effect strength to 50% enlargement - set spatial effect mode b, stereo basewidth enlargement only - */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0005,0x3f28); - } else if (stereo > 0x8000) { /* bilingual mode */ - if (bootverbose) printf ("%s: Bilingual mode detected\n", - bktr_name(bktr)); - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0000);/* Loudspeaker */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0005,0x0000);/* all spatial effects off */ - } else { /* must be mono */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0030);/* Loudspeaker */ - /* - set spatial effect strength to 50% enlargement - set spatial effect mode a, stereo basewidth enlargement - and pseudo stereo effect with automatic high-pass filter - */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0005,0x3f08); - } -#if 0 - /* The reset value for Channel matrix mode is FM/AM and SOUNDA/LEFT */ - /* We would like STEREO instead val: 0x0020 */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0020);/* Loudspeaker */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0009,0x0020);/* Headphone */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000a,0x0020);/* SCART1 */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0041,0x0020);/* SCART2 */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000b,0x0020);/* I2S */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000c,0x0020);/* Quasi-Peak Detector Source */ - msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x000e,0x0001); -#endif - break; - case 8: /* B/G FM NICAM */ - msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0021,0x0001);/* Auto selection of NICAM/MONO mode */ - break; - case 9: /* L_AM NICAM or D/K*/ - case 10: /* i-FM NICAM */ - break; - default: - if (bootverbose) printf ("%s: Unknown autodetection result value: %d\n", - bktr_name(bktr), auto_detect); - } - - } - - - /* uncomment the following line to enable the MSP34xx 1Khz Tone Generator */ - /* turn your speaker volume down low before trying this */ - /* msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0014, 0x7f40); */ - -#endif /* BKTR_NEW_MSP34XX_DRIVER */ -} - -/* Read the DPL version string */ -void dpl_read_id( bktr_ptr_t bktr ){ - int rev1=0, rev2=0; - rev1 = msp_dpl_read(bktr, bktr->dpl_addr, 0x12, 0x001e); - rev2 = msp_dpl_read(bktr, bktr->dpl_addr, 0x12, 0x001f); - - sprintf(bktr->dpl_version_string, "34%02d%c-%c%d", - ((rev2>>8)&0xff)-1, (rev1&0xff)+'@', ((rev1>>8)&0xff)+'@', rev2&0x1f); -} - -/* Configure the DPL chip to Auto-detect the audio format */ -void dpl_autodetect( bktr_ptr_t bktr ) { - - /* The following are empiric values tried from the DPL35xx data sheet */ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x000c,0x0320); /* quasi peak detector source dolby - lr 0x03xx; quasi peak detector matrix - stereo 0xXX20 */ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x0040,0x0060); /* Surround decoder mode; - ADAPTIVE/3D-PANORAMA, that means two - speakers and no center speaker, all - channels L/R/C/S mixed to L and R */ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x0041,0x0620); /* surround source matrix;I2S2/STEREO*/ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x0042,0x1F00); /* surround delay 31ms max */ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x0043,0x0000); /* automatic surround input balance */ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x0044,0x4000); /* surround spatial effect 50% - recommended*/ - msp_dpl_write(bktr, bktr->dpl_addr, 0x12, 0x0045,0x5400); /* surround panorama effect 66% - recommended with PANORAMA mode - in 0x0040 set to panorama */ -} - diff --git a/sys/dev/bktr/bktr_audio.h b/sys/dev/bktr/bktr_audio.h deleted file mode 100644 index e891b0f69bcb..000000000000 --- a/sys/dev/bktr/bktr_audio.h +++ /dev/null @@ -1,91 +0,0 @@ -/* $FreeBSD$ */ -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_audio : This deals with controlling the audio on TV cards, - * controlling the Audio Multiplexer (audio source selector). - * controlling any MSP34xx stereo audio decoders. - * controlling any DPL35xx dolby surroud sound audio decoders. - * initialising TDA98xx audio devices. - * - */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ - -/* - * Select Audio source, and allow muting - */ -int set_audio( bktr_ptr_t bktr, int mode ); -void temp_mute( bktr_ptr_t bktr, int flag ); - - -/* - * Initialise any MSP or TDA devices - */ -void init_audio_devices( bktr_ptr_t bktr ); - - -/* - * MSP34xx Audio Chip functions. - */ -void msp_autodetect( bktr_ptr_t bktr ); -void msp_read_id( bktr_ptr_t bktr ); -#ifdef BKTR_NEW_MSP34XX_DRIVER -int msp_attach(bktr_ptr_t bktr); -int msp_detach(bktr_ptr_t bktr); -void msp_wake_thread(bktr_ptr_t bktr); -void msp_halt_thread(bktr_ptr_t bktr); -#endif - - -/* - * DPL35xx Audio Chip functions. - */ -void dpl_autodetect( bktr_ptr_t bktr ); -void dpl_read_id( bktr_ptr_t bktr ); - - -/* - * TDA98xx Audio Chip functions. - */ -void init_BTSC( bktr_ptr_t bktr ); -int set_BTSC( bktr_ptr_t bktr, int control ); - - - diff --git a/sys/dev/bktr/bktr_card.c b/sys/dev/bktr/bktr_card.c deleted file mode 100644 index 0c2486d2747d..000000000000 --- a/sys/dev/bktr/bktr_card.c +++ /dev/null @@ -1,1408 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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 -__FBSDID("$FreeBSD$"); - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_card : This deals with identifying TV cards. - * trying to find the card make and model of card. - * trying to find the type of tuner fitted. - * reading the configuration EEPROM. - * locating i2c devices. - */ - -#include "opt_bktr.h" /* Include any kernel config options */ - -#include -#include - -#ifdef __FreeBSD__ - -#if (__FreeBSD_version < 500000) -#include /* for DELAY */ -#include -#else -#include -#include -#include -#include -#endif - -#include -#include -#endif - -#ifdef __NetBSD__ -#include /* NetBSD location for .h files */ -#include -#include -#include -#include -#include -#else -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include -#include -#include -#include -#endif - -/* Include the PCI Vendor definitions */ -#ifdef __NetBSD__ -#include -#include -#endif - -/* Various defines */ -#define HAUP_REMOTE_INT_WADDR 0x30 -#define HAUP_REMOTE_INT_RADDR 0x31 - -#define HAUP_REMOTE_EXT_WADDR 0x34 -#define HAUP_REMOTE_EXT_RADDR 0x35 - -/* address of BTSC/SAP decoder chip */ -#define TDA9850_WADDR 0xb6 -#define TDA9850_RADDR 0xb7 - -/* address of MSP3400C chip */ -#define MSP3400C_WADDR 0x80 -#define MSP3400C_RADDR 0x81 - -/* address of DPL3518A chip */ -#define DPL3518A_WADDR 0x84 -#define DPL3518A_RADDR 0x85 - -/* EEProm (128 * 8) on an STB card */ -#define X24C01_WADDR 0xae -#define X24C01_RADDR 0xaf - - -/* EEProm (256 * 8) on a Hauppauge card */ -/* and on most BT878s cards to store the sub-system vendor id */ -#define PFC8582_WADDR 0xa0 -#define PFC8582_RADDR 0xa1 - -#if defined(BKTR_SYSTEM_DEFAULT) && BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL -#define DEFAULT_TUNER PHILIPS_PALI -#else -#define DEFAULT_TUNER PHILIPS_NTSC -#endif - - - - -/* - * the data for each type of card - * - * Note: - * these entried MUST be kept in the order defined by the CARD_XXX defines! - */ -static const struct CARDTYPE cards[] = { - - { CARD_UNKNOWN, /* the card id */ - "Unknown", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx unknown */ - 0, - 0, - 0, /* EEProm unknown */ - 0, /* EEProm unknown */ - { 0, 0, 0, 0, 0 }, - 0 }, /* GPIO mask */ - - { CARD_MIRO, /* the card id */ - "Pinnacle/Miro TV", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx unknown */ - 0, - 0, - 0, /* EEProm unknown */ - 0, /* size unknown */ - { 0x02, 0x01, 0x00, 0x0a, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_HAUPPAUGE, /* the card id */ - "Hauppauge WinCast/TV", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - PFC8582_WADDR, /* EEProm type */ - (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ - { 0x00, 0x02, 0x01, 0x04, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_STB, /* the card id */ - "STB TV/PCI", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - X24C01_WADDR, /* EEProm type */ - (u_char)(128 / EEPROMBLOCKSIZE), /* 128 bytes */ - { 0x00, 0x01, 0x02, 0x02, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_INTEL, /* the card id */ - "Intel Smart Video III/VideoLogic Captivator PCI", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, - 0, - 0, - 0, - 0, - { 0, 0, 0, 0, 0 }, /* audio MUX values */ - 0x00 }, /* GPIO mask */ - - { CARD_IMS_TURBO, /* the card id */ - "IMS TV Turbo", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - PFC8582_WADDR, /* EEProm type */ - (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ - { 0x01, 0x02, 0x01, 0x00, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_AVER_MEDIA, /* the card id */ - "AVer Media TV/FM", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x0c, 0x08, 0x04, 0x00, 1 }, /* audio MUX values */ - 0x1f }, /* GPIO mask */ - - { CARD_OSPREY, /* the card id */ - "MMAC Osprey", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - PFC8582_WADDR, /* EEProm type */ - (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ - { 0x00, 0x00, 0x00, 0x00, 0 }, /* audio MUX values */ - 0 }, /* GPIO mask */ - - { CARD_NEC_PK, /* the card id */ - "NEC PK-UG-X017", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x01, 0x02, 0x01, 0x00, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_IO_BCTV2, /* the card id */ - "I/O DATA GV-BCTV2/PCI", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x00, 0x00, 0x00, 0x00, 1 }, /* Has special MUX handler */ - 0x0f }, /* GPIO mask */ - - { CARD_FLYVIDEO, /* the card id */ - "FlyVideo", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, /* msp34xx is optional */ - 0, /* dpl3518a is optional */ - 0xac, /* EEProm type */ - (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ - { 0x000, 0x800, 0x400, 0x8dff00, 1 },/* audio MUX values */ - 0x8dff00 }, /* GPIO mask */ - - { CARD_ZOLTRIX, /* the card id */ - "Zoltrix", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, /* msp34xx is optional */ - 0, /* dpl3518a is optional */ - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x04, 0x01, 0x00, 0x0a, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_KISS, /* the card id */ - "KISS TV/FM PCI", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, /* msp34xx is optional */ - 0, /* dpl3518a is optional */ - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x0c, 0x00, 0x0b, 0x0b, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_VIDEO_HIGHWAY_XTREME, /* the card id */ - "Video Highway Xtreme", /* the 'name' */ - NULL, /* the tuner */ - 0, - 0, - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x00, 0x02, 0x01, 0x04, 1 }, /* audio MUX values */ - 0x0f }, /* GPIO mask */ - - { CARD_ASKEY_DYNALINK_MAGIC_TVIEW, /* the card id */ - "Askey/Dynalink Magic TView", /* the 'name' */ - NULL, /* the tuner */ - 0, - 0, - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x400, 0xE00, 0x400, 0xC00, 1 }, /* audio MUX values */ - 0xE00 }, /* GPIO mask */ - - { CARD_LEADTEK, /* the card id */ - "Leadtek Winfast TV 2000", /* the 'name' */ - NULL, /* the tuner */ - 0, - 0, - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - /* Tuner, Extern, Intern, Mute, Enabled */ - { 0x621000, 0x621000, 0x621000, 0xE21000, 1 }, /* audio MUX values */ - 0xfff000 }, /* GPIO mask */ - - { CARD_TERRATVPLUS, /* the card id */ - "TerraTVplus", /* the 'name' */ - NULL, /* the tuner */ - 0, - 0, - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x20000, 0x00000, 0x30000, 0x40000, 1 }, /* audio MUX values*/ - 0x70000 }, /* GPIO mask */ - - { CARD_IO_BCTV3, /* the card id */ - "I/O DATA GV-BCTV3/PCI", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - /* Tuner, Extern, Intern, Mute, Enabled */ - { 0x10000, 0, 0x10000, 0, 1 }, /* audio MUX values */ - 0x10f00 }, /* GPIO mask */ - - { CARD_AOPEN_VA1000, /* the card id */ - "AOpen VA1000", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm unknown */ - 0, /* size unknown */ - { 0x02, 0x00, 0x00, 0x00, 1 }, /* audio MUX values */ - 0x18e0 }, /* GPIO mask */ - - { CARD_PINNACLE_PCTV_RAVE, /* the card id */ - "Pinnacle PCTV Rave", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx unknown */ - 0, - 0, - 0, /* EEProm unknown */ - 0, /* size unknown */ - { 0x02, 0x01, 0x00, 0x0a, 1 }, /* audio MUX values */ - 0x03000F }, /* GPIO mask */ - - { CARD_PIXELVIEW_PLAYTV_PAK, /* the card id */ - "PixelView PlayTV Pak", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - PFC8582_WADDR, /* EEProm type */ - (u_char)(256 / EEPROMBLOCKSIZE), /* 256 bytes */ - { 0x20000, 0x80000, 0, 0xa8000, 1 }, /* audio MUX values */ - 0xAA0000 }, /* GPIO mask */ - - { CARD_TERRATVALUE, /* the card id */ - "TerraTec TValue", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - /* Tuner, Extern, Intern, Mute, Enabled */ - { 0x500, 0x900, 0x300, 0x900, 1 }, /* audio MUX values */ - 0xffff00 }, /* GPIO mask */ - - { CARD_PIXELVIEW_PLAYTV_PRO_REV_4C, /* the card id */ - "PixelView PlayTV Pro REV-4C ", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm type */ - 0, /* EEProm size */ - { 0x01, 0x04, 0x01, 0x03, 1 }, /* audio MUX values */ - 0x00ffffff }, - { CARD_LEADTEK_WINFAST_2000_XP, /* the card id */ - "Leadtek Winfast 2000 XP", /* the 'name' */ - NULL, /* the tuner */ - 0, /* the tuner i2c address */ - 0, /* dbx is optional */ - 0, - 0, - 0, /* EEProm unknown */ - 0, /* size unknown */ - { 0x122000, 0x1000, 0x620000, 0x0000, 1 }, /* audio MUX values */ - 0xb33000 }, /* GPIO mask */ - -}; - -struct bt848_card_sig bt848_card_signature[1]= { - /* IMS TURBO TV : card 5 */ - { 5,9, {00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 02, 00, 00, 00}} - - -}; - - -/* - * Write to the configuration EEPROM on the card. - * This is dangerous and will mess up your card. Therefore it is not - * implemented. - */ -int -writeEEProm( bktr_ptr_t bktr, int offset, int count, u_char *data ) -{ - return( -1 ); -} - -/* - * Read the contents of the configuration EEPROM on the card. - * (This is not fitted to all makes of card. All Hauppauge cards have them - * and so do newer Bt878 based cards. - */ -int -readEEProm( bktr_ptr_t bktr, int offset, int count, u_char *data ) -{ - int x; - int addr; - int max; - int byte; - - /* get the address of the EEProm */ - addr = (int)(bktr->card.eepromAddr & 0xff); - if ( addr == 0 ) - return( -1 ); - - max = (int)(bktr->card.eepromSize * EEPROMBLOCKSIZE); - if ( (offset + count) > max ) - return( -1 ); - - /* set the start address */ - if ( i2cWrite( bktr, addr, offset, -1 ) == -1 ) - return( -1 ); - - /* the read cycle */ - for ( x = 0; x < count; ++x ) { - if ( (byte = i2cRead( bktr, (addr | 1) )) == -1 ) - return( -1 ); - data[ x ] = byte; - } - - return( 0 ); -} - - -#define ABSENT (-1) - -/* - * get a signature of the card - * read all 128 possible i2c read addresses from 0x01 thru 0xff - * build a bit array with a 1 bit for each i2c device that responds - * - * XXX FIXME: use offset & count args - */ -int -signCard( bktr_ptr_t bktr, int offset, int count, u_char* sig ) -{ - int x; - - for ( x = 0; x < 16; ++x ) - sig[ x ] = 0; - - for ( x = 0; x < count; ++x ) { - if ( i2cRead( bktr, (2 * x) + 1 ) != ABSENT ) { - sig[ x / 8 ] |= (1 << (x % 8) ); - } - } - - return( 0 ); -} - - -/* - * check_for_i2c_devices. - * Some BT848 cards have no tuner and no additional i2c devices - * eg stereo decoder. These are used for video conferencing or capture from - * a video camera. (eg VideoLogic Captivator PCI, Intel SmartCapture card). - * - * Determine if there are any i2c devices present. There are none present if - * a) reading from all 128 devices returns ABSENT (-1) for each one - * (eg VideoLogic Captivator PCI with BT848) - * b) reading from all 128 devices returns 0 for each one - * (eg VideoLogic Captivator PCI rev. 2F with BT848A) - */ -static int check_for_i2c_devices( bktr_ptr_t bktr ){ - int x, temp_read; - int i2c_all_0 = 1; - int i2c_all_absent = 1; - for ( x = 0; x < 128; ++x ) { - temp_read = i2cRead( bktr, (2 * x) + 1 ); - if (temp_read != 0) i2c_all_0 = 0; - if (temp_read != ABSENT) i2c_all_absent = 0; - } - - if ((i2c_all_0) || (i2c_all_absent)) return 0; - else return 1; -} - - -/* - * Temic/Philips datasheets say tuners can be at i2c addresses 0xc0, 0xc2, - * 0xc4 or 0xc6, settable by links on the tuner. - * Determine the actual address used on the TV card by probing read addresses. - */ -static int locate_tuner_address( bktr_ptr_t bktr) { - if (i2cRead( bktr, 0xc1) != ABSENT) return 0xc0; - if (i2cRead( bktr, 0xc3) != ABSENT) return 0xc2; - if (i2cRead( bktr, 0xc5) != ABSENT) return 0xc4; - if (i2cRead( bktr, 0xc7) != ABSENT) return 0xc6; - return -1; /* no tuner found */ -} - - -/* - * Search for a configuration EEPROM on the i2c bus by looking at i2c addresses - * where EEPROMs are usually found. - * On some cards, the EEPROM appears in several locations, but all in the - * range 0xa0 to 0xae. - */ -static int locate_eeprom_address( bktr_ptr_t bktr) { - if (i2cRead( bktr, 0xa0) != ABSENT) return 0xa0; - if (i2cRead( bktr, 0xac) != ABSENT) return 0xac; - if (i2cRead( bktr, 0xae) != ABSENT) return 0xae; - return -1; /* no eeprom found */ -} - - -/* - * determine the card brand/model - * BKTR_OVERRIDE_CARD, BKTR_OVERRIDE_TUNER, BKTR_OVERRIDE_DBX and - * BKTR_OVERRIDE_MSP can be used to select a specific device, - * regardless of the autodetection and i2c device checks. - * - * The scheme used for probing cards faces these problems: - * It is impossible to work out which type of tuner is actually fitted, - * (the driver cannot tell if the Tuner is PAL or NTSC, Temic or Philips) - * It is impossible to determine what audio-mux hardware is connected. - * It is impossible to determine if there is extra hardware connected to the - * GPIO pins (eg radio chips or MSP34xx reset logic) - * - * However some makes of card (eg Hauppauge) come with a configuration eeprom - * which tells us the make of the card. Most eeproms also tell us the - * tuner type and other features of the cards. - * - * The current probe code works as follows - * A) If the card uses a Bt878/879: - * 1) Read the sub-system vendor id from the configuration EEPROM. - * Select the required tuner, audio mux arrangement and any other - * onboard features. If this fails, move to step B. - * B) If it card uses a Bt848, 848A, 849A or an unknown Bt878/879: - * 1) Look for I2C devices. If there are none fitted, it is an Intel or - * VideoLogic cards. - * 2) Look for a configuration EEPROM. - * 2a) If there is one at I2C address 0xa0 it may be - * a Hauppauge or an Osprey. Check the EEPROM contents to determine which - * one it is. For Hauppauge, select the tuner type and audio hardware. - * 2b) If there is an EEPROM at I2C address 0xa8 it will be an STB card. - * We still have to guess on the tuner type. - * - * C) If we do not know the card type from (A) or (B), guess at the tuner - * type based on the I2C address of the tuner. - * - * D) After determining the Tuner Type, we probe the i2c bus for other - * devices at known locations, eg IR-Remote Control, MSP34xx and TDA - * stereo chips. - */ - - -/* - * These are the sub-system vendor ID codes stored in the - * configuration EEPROM used on Bt878/879 cards. They should match the - * number assigned to the company by the PCI Special Interest Group - */ -#ifndef __NetBSD__ -#define PCI_VENDOR_HAUPPAUGE 0x0070 -#define PCI_VENDOR_AVERMEDIA 0x1461 -#define PCI_VENDOR_STB 0x10B4 -#define PCI_VENDOR_ASKEY 0x144F -#define PCI_VENDOR_TERRATEC 0x153B -#endif -/* Following not confirmed with http://members.hyperlink.net.au/~chart, - so not added to NetBSD's pcidevs */ -#define PCI_VENDOR_LEADTEK_ALT 0x6606 -#define PCI_VENDOR_LEADTEK_ALT_2 0x6607 -#define PCI_VENDOR_LEADTEK_ALT_3 0x107d -#define PCI_VENDOR_FLYVIDEO 0x1851 -#define PCI_VENDOR_FLYVIDEO_2 0x1852 -#define PCI_VENDOR_IODATA 0x10fc -#define PCI_VENDOR_PINNACLE_ALT 0xBD11 /* They got their own ID backwards? */ -#define PCI_VENDOR_PINNACLE_NEW 0x11BD - -#define MODEL_IODATA_GV_BCTV3_PCI 0x4020 -#define MODEL_TERRATVALUE_1117 0x1117 -#define MODEL_TERRATVALUE_1118 0x1118 -#define MODEL_TERRATVALUE_1119 0x1119 -#define MODEL_TERRATVALUE_111A 0x111a -#define MODEL_TERRATVALUE_1134 0x1134 - -void -probeCard( bktr_ptr_t bktr, int verbose, int unit ) -{ - int card, i,j, card_found; - int status; - u_char probe_signature[128], *probe_temp; - int any_i2c_devices; - u_char eeprom[256]; - int tuner_i2c_address = -1; - int eeprom_i2c_address = -1; - - /* Select all GPIO bits as inputs */ - OUTL(bktr, BKTR_GPIO_OUT_EN, 0); - if (bootverbose) - printf("%s: GPIO is 0x%08x\n", bktr_name(bktr), - INL(bktr, BKTR_GPIO_DATA)); - -#ifdef HAUPPAUGE_MSP_RESET - /* Reset the MSP34xx audio chip. This resolves bootup card - * detection problems with old Bt848 based Hauppauge cards with - * MSP34xx stereo audio chips. This must be user enabled because - * at this point the probe function does not know the card type. */ - OUTL(bktr, BKTR_GPIO_OUT_EN, INL(bktr, BKTR_GPIO_OUT_EN) | (1<<5)); - OUTL(bktr, BKTR_GPIO_DATA, INL(bktr, BKTR_GPIO_DATA) | (1<<5)); /* write '1' */ - DELAY(2500); /* wait 2.5ms */ - OUTL(bktr, BKTR_GPIO_DATA, INL(bktr, BKTR_GPIO_DATA) & ~(1<<5)); /* write '0' */ - DELAY(2500); /* wait 2.5ms */ - OUTL(bktr, BKTR_GPIO_DATA, INL(bktr, BKTR_GPIO_DATA) | (1<<5)); /* write '1' */ - DELAY(2500); /* wait 2.5ms */ -#endif - - /* Check for the presence of i2c devices */ - any_i2c_devices = check_for_i2c_devices( bktr ); - - - /* Check for a user specified override on the card selection */ -#if defined( BKTR_OVERRIDE_CARD ) - bktr->card = cards[ (card = BKTR_OVERRIDE_CARD) ]; - goto checkEEPROM; -#endif - if (bktr->bt848_card != -1 ) { - bktr->card = cards[ (card = bktr->bt848_card) ]; - goto checkEEPROM; - } - - - /* No override, so try and determine the make of the card */ - - /* On BT878/879 cards, read the sub-system vendor id */ - /* This identifies the manufacturer of the card and the model */ - /* In theory this can be read from PCI registers but this does not */ - /* appear to work on the FlyVideo 98. Hauppauge also warned that */ - /* the PCI registers are sometimes not loaded correctly. */ - /* Therefore, I will read the sub-system vendor ID from the EEPROM */ - /* (just like the Bt878 does during power up initialisation) */ - - if ((bktr->id==BROOKTREE_878) || (bktr->id==BROOKTREE_879)) { - /* Try and locate the EEPROM */ - eeprom_i2c_address = locate_eeprom_address( bktr ); - if (eeprom_i2c_address != -1) { - - unsigned int subsystem_vendor_id; /* vendors PCI-SIG ID */ - unsigned int subsystem_id; /* board model number */ - unsigned int byte_252, byte_253, byte_254, byte_255; - - bktr->card = cards[ (card = CARD_UNKNOWN) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - - readEEProm(bktr, 0, 256, (u_char *) &eeprom ); - byte_252 = (unsigned int)eeprom[252]; - byte_253 = (unsigned int)eeprom[253]; - byte_254 = (unsigned int)eeprom[254]; - byte_255 = (unsigned int)eeprom[255]; - - subsystem_id = (byte_252 << 8) | byte_253; - subsystem_vendor_id = (byte_254 << 8) | byte_255; - - if ( bootverbose ) - printf("%s: subsystem 0x%04x 0x%04x\n", bktr_name(bktr), - subsystem_vendor_id, subsystem_id); - - if (subsystem_vendor_id == PCI_VENDOR_AVERMEDIA) { - bktr->card = cards[ (card = CARD_AVER_MEDIA) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if (subsystem_vendor_id == PCI_VENDOR_HAUPPAUGE) { - bktr->card = cards[ (card = CARD_HAUPPAUGE) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if ((subsystem_vendor_id == PCI_VENDOR_FLYVIDEO) - || (subsystem_vendor_id == PCI_VENDOR_FLYVIDEO_2) ) { - bktr->card = cards[ (card = CARD_FLYVIDEO) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if (subsystem_vendor_id == PCI_VENDOR_STB) { - bktr->card = cards[ (card = CARD_STB) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if (subsystem_vendor_id == PCI_VENDOR_ASKEY) { - bktr->card = cards[ (card = CARD_ASKEY_DYNALINK_MAGIC_TVIEW) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if ((subsystem_vendor_id == PCI_VENDOR_LEADTEK_ALT) - || (subsystem_vendor_id == PCI_VENDOR_LEADTEK_ALT_2) - || (subsystem_vendor_id == PCI_VENDOR_LEADTEK_ALT_3)) { - bktr->card = cards[ (card = CARD_LEADTEK) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if (subsystem_vendor_id == PCI_VENDOR_PINNACLE_ALT || - subsystem_vendor_id == PCI_VENDOR_PINNACLE_NEW) { - bktr->card = cards[ (card = CARD_MIRO) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if (subsystem_vendor_id == PCI_VENDOR_IODATA && - subsystem_id == MODEL_IODATA_GV_BCTV3_PCI) { - bktr->card = cards[ (card = CARD_IO_BCTV3) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - if (subsystem_vendor_id == PCI_VENDOR_TERRATEC) { - switch (subsystem_id) { - case MODEL_TERRATVALUE_1117: - case MODEL_TERRATVALUE_1118: - case MODEL_TERRATVALUE_1119: - case MODEL_TERRATVALUE_111A: - case MODEL_TERRATVALUE_1134: - bktr->card = cards[ (card = CARD_TERRATVALUE) ]; - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - } - - /* Vendor is unknown. We will use the standard probe code */ - /* which may not give best results */ - printf("%s: Warning - card vendor 0x%04x (model 0x%04x) unknown.\n", - bktr_name(bktr), subsystem_vendor_id, subsystem_id); - } - else - { - printf("%s: Card has no configuration EEPROM. Cannot determine card make.\n", - bktr_name(bktr)); - } - } /* end of bt878/bt879 card detection code */ - - /* If we get to this point, we must have a Bt848/848A/849A card */ - /* or a Bt878/879 with an unknown subsystem vendor id */ - /* Try and determine the make of card by clever i2c probing */ - - /* Check for i2c devices. If none, move on */ - if (!any_i2c_devices) { - bktr->card = cards[ (card = CARD_INTEL) ]; - bktr->card.eepromAddr = 0; - bktr->card.eepromSize = 0; - goto checkTuner; - } - - /* Look for Hauppauge, STB and Osprey cards by the presence */ - /* of an EEPROM */ - /* Note: Bt878 based cards also use EEPROMs so we can only do this */ - /* test on BT848/848A and 849A based cards. */ - if ((bktr->id==BROOKTREE_848) || - (bktr->id==BROOKTREE_848A) || - (bktr->id==BROOKTREE_849A)) { - - /* At i2c address 0xa0, look for Hauppauge and Osprey cards */ - if ( (status = i2cRead( bktr, PFC8582_RADDR )) != ABSENT ) { - - /* Read the eeprom contents */ - bktr->card = cards[ (card = CARD_UNKNOWN) ]; - bktr->card.eepromAddr = PFC8582_WADDR; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - readEEProm(bktr, 0, 128, (u_char *) &eeprom ); - - /* For Hauppauge, check the EEPROM begins with 0x84 */ - if (eeprom[0] == 0x84) { - bktr->card = cards[ (card = CARD_HAUPPAUGE) ]; - bktr->card.eepromAddr = PFC8582_WADDR; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - /* For Osprey, check the EEPROM begins with "MMAC" */ - if ( (eeprom[0] == 'M') &&(eeprom[1] == 'M') - &&(eeprom[2] == 'A') &&(eeprom[3] == 'C')) { - bktr->card = cards[ (card = CARD_OSPREY) ]; - bktr->card.eepromAddr = PFC8582_WADDR; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - goto checkTuner; - } - printf("%s: Warning: Unknown card type. EEPROM data not recognised\n", - bktr_name(bktr)); - printf("%s: %x %x %x %x\n", bktr_name(bktr), - eeprom[0],eeprom[1],eeprom[2],eeprom[3]); - } - - /* look for an STB card */ - if ( (status = i2cRead( bktr, X24C01_RADDR )) != ABSENT ) { - bktr->card = cards[ (card = CARD_STB) ]; - bktr->card.eepromAddr = X24C01_WADDR; - bktr->card.eepromSize = (u_char)(128 / EEPROMBLOCKSIZE); - goto checkTuner; - } - - } - - signCard( bktr, 1, 128, (u_char *) &probe_signature ); - - if (bootverbose) { - printf("%s: card signature: ", bktr_name(bktr)); - for (j = 0; j < Bt848_MAX_SIGN; j++) { - printf(" %02x ", probe_signature[j]); - } - printf("\n\n"); - } - for (i = 0; - i < (sizeof bt848_card_signature)/ sizeof (struct bt848_card_sig); - i++ ) { - - card_found = 1; - probe_temp = (u_char *) &bt848_card_signature[i].signature; - - for (j = 0; j < Bt848_MAX_SIGN; j++) { - if ((probe_temp[j] & 0xf) != (probe_signature[j] & 0xf)) { - card_found = 0; - break; - } - - } - if (card_found) { - bktr->card = cards[ card = bt848_card_signature[i].card]; - eeprom_i2c_address = locate_eeprom_address( bktr ); - if (eeprom_i2c_address != -1) { - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - } else { - bktr->card.eepromAddr = 0; - bktr->card.eepromSize = 0; - } - tuner_i2c_address = locate_tuner_address( bktr ); - select_tuner( bktr, bt848_card_signature[i].tuner ); - goto checkDBX; - } - } - - /* We do not know the card type. Default to Miro */ - bktr->card = cards[ (card = CARD_MIRO) ]; - - -checkEEPROM: - /* look for a configuration eeprom */ - eeprom_i2c_address = locate_eeprom_address( bktr ); - if (eeprom_i2c_address != -1) { - bktr->card.eepromAddr = eeprom_i2c_address; - bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); - } else { - bktr->card.eepromAddr = 0; - bktr->card.eepromSize = 0; - } - - -checkTuner: - -#if !defined( BKTR_OVERRIDE_TUNER ) - if (card == CARD_MIRO && mt2032_init(bktr) == 0 && - bktr->bt848_tuner == -1) { - bktr->card = cards[ (card = CARD_PINNACLE_PCTV_RAVE) ]; - select_tuner( bktr, TUNER_MT2032 ); - goto checkDBX; - } -#endif - - /* look for a tuner */ - tuner_i2c_address = locate_tuner_address( bktr ); - if ( tuner_i2c_address == -1 ) { - select_tuner( bktr, NO_TUNER ); - goto checkDBX; - } - -#if defined( BKTR_OVERRIDE_TUNER ) - select_tuner( bktr, BKTR_OVERRIDE_TUNER ); - goto checkDBX; -#endif - if (bktr->bt848_tuner != -1 ) { - select_tuner( bktr, bktr->bt848_tuner & 0xff ); - goto checkDBX; - } - - /* Check for i2c devices */ - if (!any_i2c_devices) { - select_tuner( bktr, NO_TUNER ); - goto checkDBX; - } - - /* differentiate type of tuner */ - - switch (card) { - case CARD_MIRO: - switch (((INL(bktr, BKTR_GPIO_DATA) >> 10)-1)&7) { - case 0: select_tuner( bktr, TEMIC_PAL ); break; - case 1: select_tuner( bktr, PHILIPS_PAL ); break; - case 2: select_tuner( bktr, PHILIPS_NTSC ); break; - case 3: select_tuner( bktr, PHILIPS_SECAM ); break; - case 4: select_tuner( bktr, NO_TUNER ); break; - case 5: select_tuner( bktr, PHILIPS_PALI ); break; - case 6: select_tuner( bktr, TEMIC_NTSC ); break; - case 7: select_tuner( bktr, TEMIC_PALI ); break; - } - goto checkDBX; - break; - - case CARD_HAUPPAUGE: - /* Hauppauge kindly supplied the following Tuner Table */ - /* FIXME: I think the tuners the driver selects for types */ - /* 0x08 and 0x15 may be incorrect but no one has complained. */ - /* Old Temic tuners had their own API, but newer Temic tuners */ - /* have the same API as Philips tuners */ - /* - ID Tuner Model Format We select Format - 0x00 NONE - 0x01 EXTERNAL - 0x02 OTHER - 0x03 Philips FI1216 BG - 0x04 Philips FI1216MF BGLL' PHILIPS_SECAM - 0x05 Philips FI1236 MN PHILIPS_NTSC - 0x06 Philips FI1246 I PHILIPS_PALI - 0x07 Philips FI1256 DK - 0x08 Philips FI1216 MK2 BG PHILIPS_PALI - 0x09 Philips FI1216MF MK2 BGLL' PHILIPS_SECAM - 0x0a Philips FI1236 MK2 MN PHILIPS_NTSC - 0x0b Philips FI1246 MK2 I PHILIPS_PALI - 0x0c Philips FI1256 MK2 DK - 0x0d Temic 4032FY5 NTSC TEMIC_NTSC - 0x0e Temic 4002FH5 BG TEMIC_PAL - 0x0f Temic 4062FY5 I TEMIC_PALI - 0x10 Philips FR1216 MK2 BG - 0x11 Philips FR1216MF MK2 BGLL' PHILIPS_FR1236_SECAM - 0x12 Philips FR1236 MK2 MN PHILIPS_FR1236_NTSC - 0x13 Philips FR1246 MK2 I - 0x14 Philips FR1256 MK2 DK - 0x15 Philips FM1216 BG PHILIPS_FR1216_PAL - 0x16 Philips FM1216MF BGLL' PHILIPS_FR1236_SECAM - 0x17 Philips FM1236 MN PHILIPS_FR1236_NTSC - 0x18 Philips FM1246 I - 0x19 Philips FM1256 DK - 0x1a Temic 4036FY5 MN (FI1236 MK2 clone) PHILIPS_NTSC - 0x1b Samsung TCPN9082D MN - 0x1c Samsung TCPM9092P Pal BG/I/DK - 0x1d Temic 4006FH5 BG PHILIPS_PALI - 0x1e Samsung TCPN9085D MN/Radio - 0x1f Samsung TCPB9085P Pal BG/I/DK / Radio - 0x20 Samsung TCPL9091P Pal BG & Secam L/L' - 0x21 Temic 4039FY5 NTSC Radio - 0x22 Philips FQ1216ME Pal BGIDK & Secam L/L' - 0x23 Temic 4066FY5 Pal I (FI1246 MK2 clone) PHILIPS_PALI - 0x24 Philips TD1536 MN/ATSCDigital - 0x25 Philips TD1536D MN/ATSCDigital DUAL INPUT - 0x26 Philips FMR1236 M/N FM(no demod) - 0x27 Philips FI1256MP B/G, D/K - 0x28 Samsung TCPQ9091P BG/I/DK, L/L' - 0x29 Temic 4006FN5 BG/I/DK - 0x2a Temic 4009FR5 BG FM PHILIPS_FR1216_PAL - 0x2b Temic 4046FM5 B/G, I, D/K, L/L' - 0x2c Temic 4009FN5 B/G, I, D/K, FM (no demod) - 0x2d Philips TD1536D_FH_44 MN/ATSCDigital DUAL INPUT - */ - - - /* Determine the model number from the eeprom */ - if (bktr->card.eepromAddr != 0) { - /* eeprom data block structure */ - unsigned char *block_1, *block_2, *block_3, *block_4; - int block_1_data_size, block_2_data_size, block_3_data_size; - int block_1_total_size, block_2_total_size, block_3_total_size; - int block_4_header_size; - - unsigned int model,revision; - unsigned char tuner_code; - unsigned char no_audio_mux; - - readEEProm(bktr, 0, 128, (u_char *) &eeprom ); - - /* LOCATE THE EEPROM DATA BLOCKS */ - block_1 = &eeprom[0]; - block_1_data_size = (block_1[2] << 8 | block_1[1]); - block_1_total_size = block_1_data_size + 3; /* Header bytes */ - - block_2 = &eeprom[block_1_total_size]; - block_2_data_size = (block_2[2] << 8 | block_2[1]); - block_2_total_size = block_2_data_size + 3; /* Header bytes */ - - block_3 = &eeprom[block_1_total_size + block_2_total_size]; - block_3_data_size = (block_3[0] &0x07); - block_3_total_size = block_3_data_size + 1; /* Header size */ - - block_4 = &eeprom[block_1_total_size +block_2_total_size +block_3_total_size]; - block_4_header_size = 1; - - model = (block_1[12] << 8 | block_1[11]); - revision = (block_1[15] << 16 | block_1[14] << 8 | block_1[13]); - - tuner_code = block_1[9]; - - no_audio_mux = ((block_3[3] >> 7) &0x01); - - if (no_audio_mux) bktr->audio_mux_present = 0; - - if (verbose) - printf("%s: Hauppauge Model %d %c%c%c%c\n", - bktr_name(bktr), - model, - ((revision >> 18) & 0x3f) + 32, - ((revision >> 12) & 0x3f) + 32, - ((revision >> 6) & 0x3f) + 32, - ((revision >> 0) & 0x3f) + 32 ); - - /* Determine the tuner type from the eeprom */ - - switch (tuner_code) { - - case 0x5: - case 0x0a: - case 0x1a: - select_tuner( bktr, PHILIPS_NTSC ); - goto checkDBX; - - case 0x4: - case 0x9: - select_tuner( bktr, PHILIPS_SECAM ); - goto checkDBX; - - case 0x11: - case 0x16: - select_tuner( bktr, PHILIPS_FR1236_SECAM ); - goto checkDBX; - - case 0x12: - case 0x17: - case 0x21: - select_tuner( bktr, PHILIPS_FR1236_NTSC ); - goto checkDBX; - - case 0x6: - case 0x8: - case 0xb: - case 0x1d: - case 0x23: - select_tuner( bktr, PHILIPS_PALI ); - goto checkDBX; - - case 0xd: - select_tuner( bktr, TEMIC_NTSC ); - goto checkDBX; - - case 0xe: - select_tuner( bktr, TEMIC_PAL ); - goto checkDBX; - - case 0xf: - select_tuner( bktr, TEMIC_PALI ); - goto checkDBX; - - case 0x15: - select_tuner( bktr, PHILIPS_FR1216_PAL ); - goto checkDBX; - - case 0x2a: - bktr->msp_use_mono_source = 1; - select_tuner( bktr, PHILIPS_FR1216_PAL ); - goto checkDBX; - - default : - printf("%s: Warning - Unknown Hauppauge Tuner 0x%x\n", - bktr_name(bktr), tuner_code); - } - } - break; - - - case CARD_AVER_MEDIA: - /* AVerMedia kindly supplied some details of their EEPROM contents - * which allow us to auto select the Tuner Type. - * Only the newer AVerMedia cards actually have an EEPROM. - */ - if (bktr->card.eepromAddr != 0) { - - u_char tuner_make; /* Eg Philips, Temic */ - u_char tuner_tv_fm; /* TV or TV with FM Radio */ - u_char tuner_format; /* Eg NTSC, PAL, SECAM */ - int tuner; - - int tuner_0_table[] = { - PHILIPS_NTSC, PHILIPS_PAL, - PHILIPS_PAL, PHILIPS_PAL, - PHILIPS_PAL, PHILIPS_PAL, - PHILIPS_SECAM, PHILIPS_SECAM, - PHILIPS_SECAM, PHILIPS_PAL}; - - int tuner_0_fm_table[] = { - PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL, - PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, - PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, - PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM, - PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL}; - - int tuner_1_table[] = { - TEMIC_NTSC, TEMIC_PAL, TEMIC_PAL, - TEMIC_PAL, TEMIC_PAL, TEMIC_PAL, - TEMIC_SECAM, TEMIC_SECAM, TEMIC_SECAM, - TEMIC_PAL}; - - - /* Extract information from the EEPROM data */ - readEEProm(bktr, 0, 128, (u_char *) &eeprom ); - - tuner_make = (eeprom[0x41] & 0x7); - tuner_tv_fm = (eeprom[0x41] & 0x18) >> 3; - tuner_format = (eeprom[0x42] & 0xf0) >> 4; - - /* Treat tuner make 0 (Philips) and make 2 (LG) the same */ - if ( ((tuner_make == 0) || (tuner_make == 2)) - && (tuner_format <= 9) && (tuner_tv_fm == 0) ) { - tuner = tuner_0_table[tuner_format]; - select_tuner( bktr, tuner ); - goto checkDBX; - } - - if ( ((tuner_make == 0) || (tuner_make == 2)) - && (tuner_format <= 9) && (tuner_tv_fm == 1) ) { - tuner = tuner_0_fm_table[tuner_format]; - select_tuner( bktr, tuner ); - goto checkDBX; - } - - if ( (tuner_make == 1) && (tuner_format <= 9) ) { - tuner = tuner_1_table[tuner_format]; - select_tuner( bktr, tuner ); - goto checkDBX; - } - - printf("%s: Warning - Unknown AVerMedia Tuner Make %d Format %d\n", - bktr_name(bktr), tuner_make, tuner_format); - } - break; - - case CARD_LEADTEK: -#if defined(BKTR_SYSTEM_DEFAULT) && BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL - select_tuner( bktr, PHILIPS_FR1216_PAL ); -#else - select_tuner( bktr, PHILIPS_FR1236_NTSC ); -#endif - goto checkDBX; - break; - - case CARD_IO_BCTV3: - select_tuner( bktr, ALPS_TSCH5 ); /* ALPS_TSCH6, in fact. */ - goto checkDBX; - break; - - case CARD_TERRATVALUE: - select_tuner( bktr, PHILIPS_PAL); /* Phlips PAL tuner */ - goto checkDBX; - break; - - } /* end switch(card) */ - - - /* At this point, a goto checkDBX has not occurred */ - /* We have not been able to select a Tuner */ - /* Some cards make use of the tuner address to */ - /* identify the make/model of tuner */ - - /* At address 0xc0/0xc1 we often find a TEMIC NTSC */ - if ( i2cRead( bktr, 0xc1 ) != ABSENT ) { - select_tuner( bktr, TEMIC_NTSC ); - goto checkDBX; - } - - /* At address 0xc6/0xc7 we often find a PHILIPS NTSC Tuner */ - if ( i2cRead( bktr, 0xc7 ) != ABSENT ) { - select_tuner( bktr, PHILIPS_NTSC ); - goto checkDBX; - } - - /* Address 0xc2/0xc3 is default (or common address) for several */ - /* tuners and we cannot tell which is which. */ - /* And for all other tuner i2c addresses, select the default */ - select_tuner( bktr, DEFAULT_TUNER ); - - -checkDBX: -#if defined( BKTR_OVERRIDE_DBX ) - bktr->card.dbx = BKTR_OVERRIDE_DBX; - goto checkMSP; -#endif - /* Check for i2c devices */ - if (!any_i2c_devices) { - goto checkMSP; - } - - /* probe for BTSC (dbx) chip */ - if ( i2cRead( bktr, TDA9850_RADDR ) != ABSENT ) - bktr->card.dbx = 1; - -checkMSP: - /* If this is a Hauppauge Bt878 card, we need to enable the - * MSP 34xx audio chip. - * If this is a Hauppauge Bt848 card, reset the MSP device. - * The MSP reset line is wired to GPIO pin 5. On Bt878 cards a pulldown - * resistor holds the device in reset until we set GPIO pin 5. - */ - - /* Optionally skip the MSP reset. This is handy if you initialise the - * MSP audio in another operating system (eg Windows) first and then - * do a soft reboot. - */ - -#ifndef BKTR_NO_MSP_RESET - if (card == CARD_HAUPPAUGE) { - OUTL(bktr, BKTR_GPIO_OUT_EN, INL(bktr, BKTR_GPIO_OUT_EN) | (1<<5)); - OUTL(bktr, BKTR_GPIO_DATA, INL(bktr, BKTR_GPIO_DATA) | (1<<5)); /* write '1' */ - DELAY(2500); /* wait 2.5ms */ - OUTL(bktr, BKTR_GPIO_DATA, INL(bktr, BKTR_GPIO_DATA) & ~(1<<5)); /* write '0' */ - DELAY(2500); /* wait 2.5ms */ - OUTL(bktr, BKTR_GPIO_DATA, INL(bktr, BKTR_GPIO_DATA) | (1<<5)); /* write '1' */ - DELAY(2500); /* wait 2.5ms */ - } -#endif - -#if defined( BKTR_OVERRIDE_MSP ) - bktr->card.msp3400c = BKTR_OVERRIDE_MSP; - goto checkMSPEnd; -#endif - - /* Check for i2c devices */ - if (!any_i2c_devices) { - goto checkMSPEnd; - } - - if ( i2cRead( bktr, MSP3400C_RADDR ) != ABSENT ) { - bktr->card.msp3400c = 1; - } - -checkMSPEnd: - - if (bktr->card.msp3400c) { - bktr->msp_addr = MSP3400C_WADDR; - msp_read_id( bktr ); - printf("%s: Detected a MSP%s at 0x%x\n", bktr_name(bktr), - bktr->msp_version_string, - bktr->msp_addr); - - } - -/* Check for Dolby Surround Sound DPL3518A sound chip */ - if ( i2cRead( bktr, DPL3518A_RADDR ) != ABSENT ) { - bktr->card.dpl3518a = 1; - } - - if (bktr->card.dpl3518a) { - bktr->dpl_addr = DPL3518A_WADDR; - dpl_read_id( bktr ); - printf("%s: Detected a DPL%s at 0x%x\n", bktr_name(bktr), - bktr->dpl_version_string, - bktr->dpl_addr); - } - -/* Start of Check Remote */ - /* Check for the Hauppauge IR Remote Control */ - /* If there is an external unit, the internal will be ignored */ - - bktr->remote_control = 0; /* initial value */ - - if (any_i2c_devices) { - if (i2cRead( bktr, HAUP_REMOTE_EXT_RADDR ) != ABSENT ) - { - bktr->remote_control = 1; - bktr->remote_control_addr = HAUP_REMOTE_EXT_RADDR; - } - else if (i2cRead( bktr, HAUP_REMOTE_INT_RADDR ) != ABSENT ) - { - bktr->remote_control = 1; - bktr->remote_control_addr = HAUP_REMOTE_INT_RADDR; - } - - } - /* If a remote control is found, poll it 5 times to turn off the LED */ - if (bktr->remote_control) { - int i; - for (i=0; i<5; i++) - i2cRead( bktr, bktr->remote_control_addr ); - } -/* End of Check Remote */ - -#if defined( BKTR_USE_PLL ) - bktr->xtal_pll_mode = BT848_USE_PLL; - goto checkPLLEnd; -#endif - /* Default is to use XTALS and not PLL mode */ - bktr->xtal_pll_mode = BT848_USE_XTALS; - - /* Enable PLL mode for OSPREY users */ - if (card == CARD_OSPREY) - bktr->xtal_pll_mode = BT848_USE_PLL; - - /* Enable PLL mode for Video Highway Xtreme users */ - if (card == CARD_VIDEO_HIGHWAY_XTREME) - bktr->xtal_pll_mode = BT848_USE_PLL; - - - /* Most (perhaps all) Bt878 cards need to be switched to PLL mode */ - /* as they only fit the NTSC crystal to their cards */ - /* Default to enabling PLL mode for all Bt878/879 cards */ - - if ((bktr->id==BROOKTREE_878 || bktr->id==BROOKTREE_879) ) - bktr->xtal_pll_mode = BT848_USE_PLL; - - -#if defined( BKTR_USE_PLL ) -checkPLLEnd: -#endif - - - bktr->card.tuner_pllAddr = tuner_i2c_address; - - if ( verbose ) { - printf( "%s: %s", bktr_name(bktr), bktr->card.name ); - if ( bktr->card.tuner ) - printf( ", %s tuner", bktr->card.tuner->name ); - if ( bktr->card.dbx ) - printf( ", dbx stereo" ); - if ( bktr->card.msp3400c ) - printf( ", msp3400c stereo" ); - if ( bktr->card.dpl3518a ) - printf( ", dpl3518a dolby" ); - if ( bktr->remote_control ) - printf( ", remote control" ); - printf( ".\n" ); - } -} - -#undef ABSENT diff --git a/sys/dev/bktr/bktr_card.h b/sys/dev/bktr/bktr_card.h deleted file mode 100644 index 4229dc675605..000000000000 --- a/sys/dev/bktr/bktr_card.h +++ /dev/null @@ -1,97 +0,0 @@ -/* $FreeBSD$ */ - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_card : This deals with identifying TV cards. - * trying to find the card make and model of card. - * trying to find the type of tuner fitted. - * reading the configuration EEPROM. - * locating i2c devices. - * - */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ - -/* - * If probeCard() fails to detect the correct card on boot you can - * override it by setting adding the following option to your kernel config - * options BKTR_OVERRIDE_CARD - * eg options BKTR_OVERRIDE CARD=1 - * - * or using the sysclt hw.bt848.card - * eg sysctl hw.bt848.card=1 - * - * where is one of the following card defines. - */ - -#define CARD_UNKNOWN 0 -#define CARD_MIRO 1 -#define CARD_HAUPPAUGE 2 -#define CARD_STB 3 -#define CARD_INTEL 4 /* Also for VideoLogic Captivator PCI */ -#define CARD_IMS_TURBO 5 -#define CARD_AVER_MEDIA 6 -#define CARD_OSPREY 7 -#define CARD_NEC_PK 8 -#define CARD_IO_BCTV2 9 -#define CARD_FLYVIDEO 10 -#define CARD_ZOLTRIX 11 -#define CARD_KISS 12 -#define CARD_VIDEO_HIGHWAY_XTREME 13 -#define CARD_ASKEY_DYNALINK_MAGIC_TVIEW 14 -#define CARD_LEADTEK 15 -#define CARD_TERRATVPLUS 16 -#define CARD_IO_BCTV3 17 -#define CARD_AOPEN_VA1000 18 -#define CARD_PINNACLE_PCTV_RAVE 19 -#define CARD_PIXELVIEW_PLAYTV_PAK 20 -#define CARD_TERRATVALUE 21 -#define CARD_PIXELVIEW_PLAYTV_PRO_REV_4C 22 -#define CARD_LEADTEK_WINFAST_2000_XP 23 -#define Bt848_MAX_CARD 24 - -#define CARD_IO_GV CARD_IO_BCTV2 - -int signCard( bktr_ptr_t bktr, int offset, int count, u_char* sig ); -void probeCard( bktr_ptr_t bktr, int verbose, int unit); - -int writeEEProm( bktr_ptr_t bktr, int offset, int count, u_char *data ); -int readEEProm( bktr_ptr_t bktr, int offset, int count, u_char *data ); - diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c deleted file mode 100644 index 1b32b893bca5..000000000000 --- a/sys/dev/bktr/bktr_core.c +++ /dev/null @@ -1,4316 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ -/*- - * 1. Redistributions of source code must retain the - * Copyright (c) 1995 Mark Tinguely and Jim Lowe - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Mark Tinguely and Jim Lowe - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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 -__FBSDID("$FreeBSD$"); - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_core : This deals with the Bt848/849/878/879 PCI Frame Grabber, - * Handles all the open, close, ioctl and read userland calls. - * Sets the Bt848 registers and generates RISC pograms. - * Controls the i2c bus and GPIO interface. - * Contains the interface to the kernel. - * (eg probe/attach and open/close/ioctl) - */ - - /* - The Brooktree BT848 Driver driver is based upon Mark Tinguely and - Jim Lowe's driver for the Matrox Meteor PCI card . The - Philips SAA 7116 and SAA 7196 are very different chipsets than - the BT848. - - The original copyright notice by Mark and Jim is included mostly - to honor their fantastic work in the Matrox Meteor driver! - */ - -#include "opt_bktr.h" /* Include any kernel config options */ - -#if ( \ - (defined(__FreeBSD__)) \ - || (defined(__bsdi__)) \ - || (defined(__OpenBSD__)) \ - || (defined(__NetBSD__)) \ - ) - - -/*******************/ -/* *** FreeBSD *** */ -/*******************/ -#ifdef __FreeBSD__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include /* used by smbus and newbus */ - -#if (__FreeBSD_version < 500000) -#include /* for DELAY */ -#define PROC_LOCK(p) -#define PROC_UNLOCK(p) -#include -#else -#include -#endif - -#include -#include - -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include -#include -#include -#include -#include -#if defined(BKTR_FREEBSD_MODULE) -#include -#endif - -#if defined(BKTR_USE_FREEBSD_SMBUS) -#include -#include -#include -#include "smbus_if.h" -#include "iicbus_if.h" -#endif - -const char * -bktr_name(bktr_ptr_t bktr) -{ - return bktr->bktr_xname; -} - - -#endif /* __FreeBSD__ */ - - -/****************/ -/* *** BSDI *** */ -/****************/ -#ifdef __bsdi__ -#define PROC_LOCK(p) -#define PROC_UNLOCK(p) -#endif /* __bsdi__ */ - - -/**************************/ -/* *** OpenBSD/NetBSD *** */ -/**************************/ -#if defined(__NetBSD__) || defined(__OpenBSD__) - -#include -#include -#include -#include -#include - -#ifdef __NetBSD__ -#include -#else -#include -#include -#include -#include -#endif - -#include /* uintptr_t */ -#include -#include -#include -#include -#include -#include -#include - -static int bt848_format = -1; - -const char * -bktr_name(bktr_ptr_t bktr) -{ - return (bktr->bktr_dev.dv_xname); -} - -#define PROC_LOCK(p) -#define PROC_UNLOCK(p) - -#endif /* __NetBSD__ || __OpenBSD__ */ - - -typedef u_char bool_t; - -#define BKTRPRI (PZERO+8)|PCATCH -#define VBIPRI (PZERO-4)|PCATCH - - -/* - * memory allocated for DMA programs - */ -#define DMA_PROG_ALLOC (8 * PAGE_SIZE) - -/* When to split a dma transfer , the bt848 has timing as well as - dma transfer size limitations so that we have to split dma - transfers into two dma requests - */ -#define DMA_BT848_SPLIT 319*2 - -/* - * Allocate enough memory for: - * 768x576 RGB 16 or YUV (16 storage bits/pixel) = 884736 = 216 pages - * - * You may override this using the options "BROOKTREE_ALLOC_PAGES=value" - * in your kernel configuration file. - */ - -#ifndef BROOKTREE_ALLOC_PAGES -#define BROOKTREE_ALLOC_PAGES 217*4 -#endif -#define BROOKTREE_ALLOC (BROOKTREE_ALLOC_PAGES * PAGE_SIZE) - -/* Definitions for VBI capture. - * There are 16 VBI lines in a PAL video field (32 in a frame), - * and we take 2044 samples from each line (placed in a 2048 byte buffer - * for alignment). - * VBI lines are held in a circular buffer before being read by a - * user program from /dev/vbi. - */ - -#define MAX_VBI_LINES 16 /* Maximum for all vidoe formats */ -#define VBI_LINE_SIZE 2048 /* Store up to 2048 bytes per line */ -#define VBI_BUFFER_ITEMS 20 /* Number of frames we buffer */ -#define VBI_DATA_SIZE (VBI_LINE_SIZE * MAX_VBI_LINES * 2) -#define VBI_BUFFER_SIZE (VBI_DATA_SIZE * VBI_BUFFER_ITEMS) - - -/* Defines for fields */ -#define ODD_F 0x01 -#define EVEN_F 0x02 - - -/* - * Parameters describing size of transmitted image. - */ - -static struct format_params format_params[] = { -/* # define BT848_IFORM_F_AUTO (0x0) - don't matter. */ - { 525, 26, 480, 910, 135, 754, 640, 780, 30, 0x68, 0x5d, BT848_IFORM_X_AUTO, - 12, 1600 }, -/* # define BT848_IFORM_F_NTSCM (0x1) */ - { 525, 26, 480, 910, 135, 754, 640, 780, 30, 0x68, 0x5d, BT848_IFORM_X_XT0, - 12, 1600 }, -/* # define BT848_IFORM_F_NTSCJ (0x2) */ - { 525, 22, 480, 910, 135, 754, 640, 780, 30, 0x68, 0x5d, BT848_IFORM_X_XT0, - 12, 1600 }, -/* # define BT848_IFORM_F_PALBDGHI (0x3) */ - { 625, 32, 576, 1135, 186, 924, 768, 944, 25, 0x7f, 0x72, BT848_IFORM_X_XT1, - 16, 2044 }, -/* # define BT848_IFORM_F_PALM (0x4) */ - { 525, 22, 480, 910, 135, 754, 640, 780, 30, 0x68, 0x5d, BT848_IFORM_X_XT0, - 12, 1600 }, -/* # define BT848_IFORM_F_PALN (0x5) */ - { 625, 32, 576, 1135, 186, 924, 768, 944, 25, 0x7f, 0x72, BT848_IFORM_X_XT1, - 16, 2044 }, -/* # define BT848_IFORM_F_SECAM (0x6) */ - { 625, 32, 576, 1135, 186, 924, 768, 944, 25, 0x7f, 0xa0, BT848_IFORM_X_XT1, - 16, 2044 }, -/* # define BT848_IFORM_F_RSVD (0x7) - ???? */ - { 625, 32, 576, 1135, 186, 924, 768, 944, 25, 0x7f, 0x72, BT848_IFORM_X_XT0, - 16, 2044 }, -}; - -/* - * Table of supported Pixel Formats - */ - -static struct meteor_pixfmt_internal { - struct meteor_pixfmt public; - u_int color_fmt; -} pixfmt_table[] = { - -{ { 0, METEOR_PIXTYPE_RGB, 2, { 0x7c00, 0x03e0, 0x001f }, 0,0 }, 0x33 }, -{ { 0, METEOR_PIXTYPE_RGB, 2, { 0x7c00, 0x03e0, 0x001f }, 1,0 }, 0x33 }, - -{ { 0, METEOR_PIXTYPE_RGB, 2, { 0xf800, 0x07e0, 0x001f }, 0,0 }, 0x22 }, -{ { 0, METEOR_PIXTYPE_RGB, 2, { 0xf800, 0x07e0, 0x001f }, 1,0 }, 0x22 }, - -{ { 0, METEOR_PIXTYPE_RGB, 3, { 0xff0000,0x00ff00,0x0000ff }, 1,0 }, 0x11 }, - -{ { 0, METEOR_PIXTYPE_RGB, 4, { 0xff0000,0x00ff00,0x0000ff }, 0,0 }, 0x00 }, -{ { 0, METEOR_PIXTYPE_RGB, 4, { 0xff0000,0x00ff00,0x0000ff }, 0,1 }, 0x00 }, -{ { 0, METEOR_PIXTYPE_RGB, 4, { 0xff0000,0x00ff00,0x0000ff }, 1,0 }, 0x00 }, -{ { 0, METEOR_PIXTYPE_RGB, 4, { 0xff0000,0x00ff00,0x0000ff }, 1,1 }, 0x00 }, -{ { 0, METEOR_PIXTYPE_YUV, 2, { 0xff0000,0x00ff00,0x0000ff }, 1,1 }, 0x88 }, -{ { 0, METEOR_PIXTYPE_YUV_PACKED, 2, { 0xff0000,0x00ff00,0x0000ff }, 0,1 }, 0x44 }, -{ { 0, METEOR_PIXTYPE_YUV_12, 2, { 0xff0000,0x00ff00,0x0000ff }, 1,1 }, 0x88 }, - -}; -#define PIXFMT_TABLE_SIZE nitems(pixfmt_table) - -/* - * Table of Meteor-supported Pixel Formats (for SETGEO compatibility) - */ - -/* FIXME: Also add YUV_422 and YUV_PACKED as well */ -static struct { - u_long meteor_format; - struct meteor_pixfmt public; -} meteor_pixfmt_table[] = { - { METEOR_GEO_YUV_12, - { 0, METEOR_PIXTYPE_YUV_12, 2, { 0xff0000,0x00ff00,0x0000ff }, 1,1 } - }, - - /* FIXME: Should byte swap flag be on for this one; negative in drvr? */ - { METEOR_GEO_YUV_422, - { 0, METEOR_PIXTYPE_YUV, 2, { 0xff0000,0x00ff00,0x0000ff }, 1,1 } - }, - { METEOR_GEO_YUV_PACKED, - { 0, METEOR_PIXTYPE_YUV_PACKED, 2, { 0xff0000,0x00ff00,0x0000ff }, 0,1 } - }, - { METEOR_GEO_RGB16, - { 0, METEOR_PIXTYPE_RGB, 2, { 0x7c00, 0x03e0, 0x001f }, 0, 0 } - }, - { METEOR_GEO_RGB24, - { 0, METEOR_PIXTYPE_RGB, 4, { 0xff0000, 0x00ff00, 0x0000ff }, 0, 0 } - }, - -}; -#define METEOR_PIXFMT_TABLE_SIZE nitems(meteor_pixfmt_table) - - -#define BSWAP (BT848_COLOR_CTL_BSWAP_ODD | BT848_COLOR_CTL_BSWAP_EVEN) -#define WSWAP (BT848_COLOR_CTL_WSWAP_ODD | BT848_COLOR_CTL_WSWAP_EVEN) - - - -/* sync detect threshold */ -#if 0 -#define SYNC_LEVEL (BT848_ADC_RESERVED | \ - BT848_ADC_CRUSH) /* threshold ~125 mV */ -#else -#define SYNC_LEVEL (BT848_ADC_RESERVED | \ - BT848_ADC_SYNC_T) /* threshold ~75 mV */ -#endif - - - - -/* debug utility for holding previous INT_STAT contents */ -#define STATUS_SUM -static u_long status_sum = 0; - -/* - * defines to make certain bit-fiddles understandable - */ -#define FIFO_ENABLED BT848_DMA_CTL_FIFO_EN -#define RISC_ENABLED BT848_DMA_CTL_RISC_EN -#define FIFO_RISC_ENABLED (BT848_DMA_CTL_FIFO_EN | BT848_DMA_CTL_RISC_EN) -#define FIFO_RISC_DISABLED 0 - -#define ALL_INTS_DISABLED 0 -#define ALL_INTS_CLEARED 0xffffffff -#define CAPTURE_OFF 0 - -#define BIT_SEVEN_HIGH (1<<7) -#define BIT_EIGHT_HIGH (1<<8) - -#define I2C_BITS (BT848_INT_RACK | BT848_INT_I2CDONE) -#define TDEC_BITS (BT848_INT_FDSR | BT848_INT_FBUS) - - - -static int oformat_meteor_to_bt( u_long format ); - -static u_int pixfmt_swap_flags( int pixfmt ); - -/* - * bt848 RISC programming routines. - */ -#ifdef BT848_DUMP -static int dump_bt848( bktr_ptr_t bktr ); -#endif - -static void yuvpack_prog( bktr_ptr_t bktr, char i_flag, int cols, - int rows, int interlace ); -static void yuv422_prog( bktr_ptr_t bktr, char i_flag, int cols, - int rows, int interlace ); -static void yuv12_prog( bktr_ptr_t bktr, char i_flag, int cols, - int rows, int interlace ); -static void rgb_prog( bktr_ptr_t bktr, char i_flag, int cols, - int rows, int interlace ); -static void rgb_vbi_prog( bktr_ptr_t bktr, char i_flag, int cols, - int rows, int interlace ); -static void build_dma_prog( bktr_ptr_t bktr, char i_flag ); - -static bool_t getline(bktr_reg_t *, int); -static bool_t notclipped(bktr_reg_t * , int , int); -static bool_t split(bktr_reg_t *, volatile uint32_t **, int, u_long, int, - volatile u_char ** , int ); - -static void start_capture( bktr_ptr_t bktr, unsigned type ); -static void set_fps( bktr_ptr_t bktr, u_short fps ); - - - -/* - * Remote Control Functions - */ -static void remote_read(bktr_ptr_t bktr, struct bktr_remote *remote); - - -/* - * ioctls common to both video & tuner. - */ -static int common_ioctl( bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg ); - - -#if !defined(BKTR_USE_FREEBSD_SMBUS) -/* - * i2c primitives for low level control of i2c bus. Added for MSP34xx control - */ -static void i2c_start( bktr_ptr_t bktr); -static void i2c_stop( bktr_ptr_t bktr); -static int i2c_write_byte( bktr_ptr_t bktr, unsigned char data); -static int i2c_read_byte( bktr_ptr_t bktr, unsigned char *data, int last ); -#endif - - - -/* - * the common attach code, used by all OS versions. - */ -void -common_bktr_attach( bktr_ptr_t bktr, int unit, u_long pci_id, u_int rev ) -{ - vm_offset_t buf = 0; - int need_to_allocate_memory = 1; -#ifdef BKTR_NEW_MSP34XX_DRIVER - int err; -#endif - -/***************************************/ -/* *** OS Specific memory routines *** */ -/***************************************/ -#if defined(__NetBSD__) || defined(__OpenBSD__) - /* allocate space for dma program */ - bktr->dma_prog = get_bktr_mem(bktr, &bktr->dm_prog, - DMA_PROG_ALLOC); - bktr->odd_dma_prog = get_bktr_mem(bktr, &bktr->dm_oprog, - DMA_PROG_ALLOC); - - /* allocate space for the VBI buffer */ - bktr->vbidata = get_bktr_mem(bktr, &bktr->dm_vbidata, - VBI_DATA_SIZE); - bktr->vbibuffer = get_bktr_mem(bktr, &bktr->dm_vbibuffer, - VBI_BUFFER_SIZE); - - /* allocate space for pixel buffer */ - if ( BROOKTREE_ALLOC ) - buf = get_bktr_mem(bktr, &bktr->dm_mem, BROOKTREE_ALLOC); - else - buf = 0; -#endif - -#if defined(__FreeBSD__) || defined(__bsdi__) - -/* If this is a module, check if there is any currently saved contiguous memory */ -#if defined(BKTR_FREEBSD_MODULE) - if (bktr_has_stored_addresses(unit) == 1) { - /* recover the addresses */ - bktr->dma_prog = bktr_retrieve_address(unit, BKTR_MEM_DMA_PROG); - bktr->odd_dma_prog = bktr_retrieve_address(unit, BKTR_MEM_ODD_DMA_PROG); - bktr->vbidata = bktr_retrieve_address(unit, BKTR_MEM_VBIDATA); - bktr->vbibuffer = bktr_retrieve_address(unit, BKTR_MEM_VBIBUFFER); - buf = bktr_retrieve_address(unit, BKTR_MEM_BUF); - need_to_allocate_memory = 0; - } -#endif - - if (need_to_allocate_memory == 1) { - /* allocate space for dma program */ - bktr->dma_prog = get_bktr_mem(unit, DMA_PROG_ALLOC); - bktr->odd_dma_prog = get_bktr_mem(unit, DMA_PROG_ALLOC); - - /* allocte space for the VBI buffer */ - bktr->vbidata = get_bktr_mem(unit, VBI_DATA_SIZE); - bktr->vbibuffer = get_bktr_mem(unit, VBI_BUFFER_SIZE); - - /* allocate space for pixel buffer */ - if ( BROOKTREE_ALLOC ) - buf = get_bktr_mem(unit, BROOKTREE_ALLOC); - else - buf = 0; - } -#endif /* FreeBSD or BSDi */ - -#ifdef USE_VBIMUTEX - mtx_init(&bktr->vbimutex, "bktr vbi lock", NULL, MTX_DEF); -#endif - -/* If this is a module, save the current contiguous memory */ -#if defined(BKTR_FREEBSD_MODULE) -bktr_store_address(unit, BKTR_MEM_DMA_PROG, bktr->dma_prog); -bktr_store_address(unit, BKTR_MEM_ODD_DMA_PROG, bktr->odd_dma_prog); -bktr_store_address(unit, BKTR_MEM_VBIDATA, bktr->vbidata); -bktr_store_address(unit, BKTR_MEM_VBIBUFFER, bktr->vbibuffer); -bktr_store_address(unit, BKTR_MEM_BUF, buf); -#endif - - - if ( bootverbose ) { - printf("%s: buffer size %d, addr %p\n", - bktr_name(bktr), (int)BROOKTREE_ALLOC, - (void *)(uintptr_t)vtophys(buf)); - } - - if ( buf != 0 ) { - bktr->bigbuf = buf; - bktr->alloc_pages = BROOKTREE_ALLOC_PAGES; - bzero((caddr_t) bktr->bigbuf, BROOKTREE_ALLOC); - } else { - bktr->alloc_pages = 0; - } - - - bktr->flags = METEOR_INITALIZED | METEOR_AUTOMODE | - METEOR_DEV0 | METEOR_RGB16; - bktr->dma_prog_loaded = FALSE; - bktr->cols = 640; - bktr->rows = 480; - bktr->frames = 1; /* one frame */ - bktr->format = METEOR_GEO_RGB16; - bktr->pixfmt = oformat_meteor_to_bt( bktr->format ); - bktr->pixfmt_compat = TRUE; - - - bktr->vbiinsert = 0; - bktr->vbistart = 0; - bktr->vbisize = 0; - bktr->vbiflags = 0; - - - /* using the pci device id and revision id */ - /* and determine the card type */ - if (BKTR_PCI_VENDOR(pci_id) == PCI_VENDOR_BROOKTREE) - { - switch (BKTR_PCI_PRODUCT(pci_id)) { - case PCI_PRODUCT_BROOKTREE_BT848: - if (rev == 0x12) - bktr->id = BROOKTREE_848A; - else - bktr->id = BROOKTREE_848; - break; - case PCI_PRODUCT_BROOKTREE_BT849: - bktr->id = BROOKTREE_849A; - break; - case PCI_PRODUCT_BROOKTREE_BT878: - bktr->id = BROOKTREE_878; - break; - case PCI_PRODUCT_BROOKTREE_BT879: - bktr->id = BROOKTREE_879; - break; - } - } - - bktr->clr_on_start = FALSE; - - /* defaults for the tuner section of the card */ - bktr->tflags = TUNER_INITALIZED; - bktr->tuner.frequency = 0; - bktr->tuner.channel = 0; - bktr->tuner.chnlset = DEFAULT_CHNLSET; - bktr->tuner.afc = 0; - bktr->tuner.radio_mode = 0; - bktr->audio_mux_select = 0; - bktr->audio_mute_state = FALSE; - bktr->bt848_card = -1; - bktr->bt848_tuner = -1; - bktr->reverse_mute = -1; - bktr->slow_msp_audio = 0; - bktr->msp_use_mono_source = 0; - bktr->msp_source_selected = -1; - bktr->audio_mux_present = 1; - -#if defined(__FreeBSD__) -#ifdef BKTR_NEW_MSP34XX_DRIVER - /* get hint on short programming of the msp34xx, so we know */ - /* if the decision what thread to start should be overwritten */ - if ( (err = resource_int_value("bktr", unit, "mspsimple", - &(bktr->mspsimple)) ) != 0 ) - bktr->mspsimple = -1; /* fall back to default */ -#endif -#endif - - probeCard( bktr, TRUE, unit ); - - /* Initialise any MSP34xx or TDA98xx audio chips */ - init_audio_devices( bktr ); - -#ifdef BKTR_NEW_MSP34XX_DRIVER - /* setup the kernel thread */ - err = msp_attach( bktr ); - if ( err != 0 ) /* error doing kernel thread stuff, disable msp3400c */ - bktr->card.msp3400c = 0; -#endif - - -} - - -/* Copy the vbi lines from 'vbidata' into the circular buffer, 'vbibuffer'. - * The circular buffer holds 'n' fixed size data blocks. - * vbisize is the number of bytes in the circular buffer - * vbiread is the point we reading data out of the circular buffer - * vbiinsert is the point we insert data into the circular buffer - */ -static void vbidecode(bktr_ptr_t bktr) { - unsigned char *dest; - unsigned int *seq_dest; - - /* Check if there is room in the buffer to insert the data. */ - if (bktr->vbisize + VBI_DATA_SIZE > VBI_BUFFER_SIZE) return; - - /* Copy the VBI data into the next free slot in the buffer. */ - /* 'dest' is the point in vbibuffer where we want to insert new data */ - dest = (unsigned char *)bktr->vbibuffer + bktr->vbiinsert; - memcpy(dest, (unsigned char*)bktr->vbidata, VBI_DATA_SIZE); - - /* Write the VBI sequence number to the end of the vbi data */ - /* This is used by the AleVT teletext program */ - seq_dest = (unsigned int *)((unsigned char *)bktr->vbibuffer - + bktr->vbiinsert - + (VBI_DATA_SIZE - sizeof(bktr->vbi_sequence_number))); - *seq_dest = bktr->vbi_sequence_number; - - /* And increase the VBI sequence number */ - /* This can wrap around */ - bktr->vbi_sequence_number++; - - - /* Increment the vbiinsert pointer */ - /* This can wrap around */ - bktr->vbiinsert += VBI_DATA_SIZE; - bktr->vbiinsert = (bktr->vbiinsert % VBI_BUFFER_SIZE); - - /* And increase the amount of vbi data in the buffer */ - bktr->vbisize = bktr->vbisize + VBI_DATA_SIZE; - -} - - -/* - * the common interrupt handler. - * Returns a 0 or 1 depending on whether the interrupt has handled. - * In the OS specific section, bktr_intr() is defined which calls this - * common interrupt handler. - */ -int -common_bktr_intr( void *arg ) -{ - bktr_ptr_t bktr; - u_long bktr_status; - u_char dstatus; - u_long field; - u_long w_field; - u_long req_field; - - bktr = (bktr_ptr_t) arg; - - /* - * check to see if any interrupts are unmasked on this device. If - * none are, then we likely got here by way of being on a PCI shared - * interrupt dispatch list. - */ - if (INL(bktr, BKTR_INT_MASK) == ALL_INTS_DISABLED) - return 0; /* bail out now, before we do something we - shouldn't */ - - if (!(bktr->flags & METEOR_OPEN)) { - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - /* return; ?? */ - } - - /* record and clear the INTerrupt status bits */ - bktr_status = INL(bktr, BKTR_INT_STAT); - OUTL(bktr, BKTR_INT_STAT, bktr_status & ~I2C_BITS); /* don't touch i2c */ - - /* record and clear the device status register */ - dstatus = INB(bktr, BKTR_DSTATUS); - OUTB(bktr, BKTR_DSTATUS, 0x00); - -#if defined( STATUS_SUM ) - /* add any new device status or INTerrupt status bits */ - status_sum |= (bktr_status & ~(BT848_INT_RSV0|BT848_INT_RSV1)); - status_sum |= ((dstatus & (BT848_DSTATUS_COF|BT848_DSTATUS_LOF)) << 6); -#endif /* STATUS_SUM */ - /* printf( "%s: STATUS %x %x %x \n", bktr_name(bktr), - dstatus, bktr_status, INL(bktr, BKTR_RISC_COUNT) ); - */ - - - /* if risc was disabled re-start process again */ - /* if there was one of the following errors re-start again */ - if ( !(bktr_status & BT848_INT_RISC_EN) || - ((bktr_status &(/* BT848_INT_FBUS | */ - /* BT848_INT_FTRGT | */ - /* BT848_INT_FDSR | */ - BT848_INT_PPERR | - BT848_INT_RIPERR | BT848_INT_PABORT | - BT848_INT_OCERR | BT848_INT_SCERR) ) != 0) - || ((INB(bktr, BKTR_TDEC) == 0) && (bktr_status & TDEC_BITS)) ) { - - u_short tdec_save = INB(bktr, BKTR_TDEC); - - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - OUTB(bktr, BKTR_CAP_CTL, CAPTURE_OFF); - - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - - /* Reset temporal decimation counter */ - OUTB(bktr, BKTR_TDEC, 0); - OUTB(bktr, BKTR_TDEC, tdec_save); - - /* Reset to no-fields captured state */ - if (bktr->flags & (METEOR_CONTIN | METEOR_SYNCAP)) { - switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { - case METEOR_ONLY_ODD_FIELDS: - bktr->flags |= METEOR_WANT_ODD; - break; - case METEOR_ONLY_EVEN_FIELDS: - bktr->flags |= METEOR_WANT_EVEN; - break; - default: - bktr->flags |= METEOR_WANT_MASK; - break; - } - } - - OUTL(bktr, BKTR_RISC_STRT_ADD, vtophys(bktr->dma_prog)); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, bktr->capcontrol); - - OUTL(bktr, BKTR_INT_MASK, BT848_INT_MYSTERYBIT | - BT848_INT_RISCI | - BT848_INT_VSYNC | - BT848_INT_FMTCHG); - - OUTB(bktr, BKTR_CAP_CTL, bktr->bktr_cap_ctl); - return 1; - } - - /* If this is not a RISC program interrupt, return */ - if (!(bktr_status & BT848_INT_RISCI)) - return 0; - -/** - printf( "%s: intr status %x %x %x\n", bktr_name(bktr), - bktr_status, dstatus, INL(bktr, BKTR_RISC_COUNT) ); - */ - - - /* - * Disable future interrupts if a capture mode is not selected. - * This can happen when we are in the process of closing or - * changing capture modes, otherwise it shouldn't happen. - */ - if (!(bktr->flags & METEOR_CAP_MASK)) - OUTB(bktr, BKTR_CAP_CTL, CAPTURE_OFF); - - - /* Determine which field generated this interrupt */ - field = ( bktr_status & BT848_INT_FIELD ) ? EVEN_F : ODD_F; - - - /* - * Process the VBI data if it is being captured. We do this once - * both Odd and Even VBI data is captured. Therefore we do this - * in the Even field interrupt handler. - */ - LOCK_VBI(bktr); - if ( (bktr->vbiflags & VBI_CAPTURE) - &&(bktr->vbiflags & VBI_OPEN) - &&(field==EVEN_F)) { - /* Put VBI data into circular buffer */ - vbidecode(bktr); - - /* If someone is blocked on reading from /dev/vbi, wake them */ - if (bktr->vbi_read_blocked) { - bktr->vbi_read_blocked = FALSE; - wakeup(VBI_SLEEP); - } - - /* If someone has a select() on /dev/vbi, inform them */ - if (SEL_WAITING(&bktr->vbi_select)) { - selwakeuppri(&bktr->vbi_select, VBIPRI); - } - - - } - UNLOCK_VBI(bktr); - - /* - * Register the completed field - * (For dual-field mode, require fields from the same frame) - */ - switch ( bktr->flags & METEOR_WANT_MASK ) { - case METEOR_WANT_ODD : w_field = ODD_F ; break; - case METEOR_WANT_EVEN : w_field = EVEN_F ; break; - default : w_field = (ODD_F|EVEN_F); break; - } - switch ( bktr->flags & METEOR_ONLY_FIELDS_MASK ) { - case METEOR_ONLY_ODD_FIELDS : req_field = ODD_F ; break; - case METEOR_ONLY_EVEN_FIELDS : req_field = EVEN_F ; break; - default : req_field = (ODD_F|EVEN_F); - break; - } - - if (( field == EVEN_F ) && ( w_field == EVEN_F )) - bktr->flags &= ~METEOR_WANT_EVEN; - else if (( field == ODD_F ) && ( req_field == ODD_F ) && - ( w_field == ODD_F )) - bktr->flags &= ~METEOR_WANT_ODD; - else if (( field == ODD_F ) && ( req_field == (ODD_F|EVEN_F) ) && - ( w_field == (ODD_F|EVEN_F) )) - bktr->flags &= ~METEOR_WANT_ODD; - else if (( field == ODD_F ) && ( req_field == (ODD_F|EVEN_F) ) && - ( w_field == ODD_F )) { - bktr->flags &= ~METEOR_WANT_ODD; - bktr->flags |= METEOR_WANT_EVEN; - } - else { - /* We're out of sync. Start over. */ - if (bktr->flags & (METEOR_CONTIN | METEOR_SYNCAP)) { - switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { - case METEOR_ONLY_ODD_FIELDS: - bktr->flags |= METEOR_WANT_ODD; - break; - case METEOR_ONLY_EVEN_FIELDS: - bktr->flags |= METEOR_WANT_EVEN; - break; - default: - bktr->flags |= METEOR_WANT_MASK; - break; - } - } - return 1; - } - - /* - * If we have a complete frame. - */ - if (!(bktr->flags & METEOR_WANT_MASK)) { - bktr->frames_captured++; - /* - * post the completion time. - */ - if (bktr->flags & METEOR_WANT_TS) { - struct timeval *ts; - - if ((u_int) bktr->alloc_pages * PAGE_SIZE - <= (bktr->frame_size + sizeof(struct timeval))) { - ts =(struct timeval *)bktr->bigbuf + - bktr->frame_size; - /* doesn't work in synch mode except - * for first frame */ - /* XXX */ - microtime(ts); - } - } - - - /* - * Wake up the user in single capture mode. - */ - if (bktr->flags & METEOR_SINGLE) { - - /* stop dma */ - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - - /* disable risc, leave fifo running */ - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - wakeup(BKTR_SLEEP); - } - - /* - * If the user requested to be notified via signal, - * let them know the frame is complete. - */ - - if (bktr->proc != NULL) { - PROC_LOCK(bktr->proc); - kern_psignal( bktr->proc, bktr->signal); - PROC_UNLOCK(bktr->proc); - } - - /* - * Reset the want flags if in continuous or - * synchronous capture mode. - */ -/* -* XXX NOTE (Luigi): -* currently we only support 3 capture modes: odd only, even only, -* odd+even interlaced (odd field first). A fourth mode (non interlaced, -* either even OR odd) could provide 60 (50 for PAL) pictures per -* second, but it would require this routine to toggle the desired frame -* each time, and one more different DMA program for the Bt848. -* As a consequence, this fourth mode is currently unsupported. -*/ - - if (bktr->flags & (METEOR_CONTIN | METEOR_SYNCAP)) { - switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { - case METEOR_ONLY_ODD_FIELDS: - bktr->flags |= METEOR_WANT_ODD; - break; - case METEOR_ONLY_EVEN_FIELDS: - bktr->flags |= METEOR_WANT_EVEN; - break; - default: - bktr->flags |= METEOR_WANT_MASK; - break; - } - } - } - - return 1; -} - - - - -/* - * - */ -extern int bt848_format; /* used to set the default format, PAL or NTSC */ -int -video_open( bktr_ptr_t bktr ) -{ - int frame_rate, video_format=0; - - if (bktr->flags & METEOR_OPEN) /* device is busy */ - return( EBUSY ); - - bktr->flags |= METEOR_OPEN; - -#ifdef BT848_DUMP - dump_bt848(bktr); -#endif - - bktr->clr_on_start = FALSE; - - OUTB(bktr, BKTR_DSTATUS, 0x00); /* clear device status reg. */ - - OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - -#if defined(BKTR_SYSTEM_DEFAULT) && BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL - video_format = 0; -#else - video_format = 1; -#endif - - if (bt848_format == 0 ) - video_format = 0; - - if (bt848_format == 1 ) - video_format = 1; - - if (video_format == 1 ) { - OUTB(bktr, BKTR_IFORM, BT848_IFORM_F_NTSCM); - bktr->format_params = BT848_IFORM_F_NTSCM; - - } else { - OUTB(bktr, BKTR_IFORM, BT848_IFORM_F_PALBDGHI); - bktr->format_params = BT848_IFORM_F_PALBDGHI; - - } - - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | format_params[bktr->format_params].iform_xtsel); - - /* work around for new Hauppauge 878 cards */ - if ((bktr->card.card_id == CARD_HAUPPAUGE) && - (bktr->id==BROOKTREE_878 || bktr->id==BROOKTREE_879) ) - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX3); - else - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX1); - - OUTB(bktr, BKTR_ADELAY, format_params[bktr->format_params].adelay); - OUTB(bktr, BKTR_BDELAY, format_params[bktr->format_params].bdelay); - frame_rate = format_params[bktr->format_params].frame_rate; - - /* enable PLL mode using 28Mhz crystal for PAL/SECAM users */ - if (bktr->xtal_pll_mode == BT848_USE_PLL) { - OUTB(bktr, BKTR_TGCTRL, 0); - OUTB(bktr, BKTR_PLL_F_LO, 0xf9); - OUTB(bktr, BKTR_PLL_F_HI, 0xdc); - OUTB(bktr, BKTR_PLL_F_XCI, 0x8e); - } - - bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) | METEOR_DEV0; - - bktr->max_clip_node = 0; - - OUTB(bktr, BKTR_COLOR_CTL, BT848_COLOR_CTL_GAMMA | BT848_COLOR_CTL_RGB_DED); - - OUTB(bktr, BKTR_E_HSCALE_LO, 170); - OUTB(bktr, BKTR_O_HSCALE_LO, 170); - - OUTB(bktr, BKTR_E_DELAY_LO, 0x72); - OUTB(bktr, BKTR_O_DELAY_LO, 0x72); - OUTB(bktr, BKTR_E_SCLOOP, 0); - OUTB(bktr, BKTR_O_SCLOOP, 0); - - OUTB(bktr, BKTR_VBI_PACK_SIZE, 0); - OUTB(bktr, BKTR_VBI_PACK_DEL, 0); - - bktr->fifo_errors = 0; - bktr->dma_errors = 0; - bktr->frames_captured = 0; - bktr->even_fields_captured = 0; - bktr->odd_fields_captured = 0; - bktr->proc = NULL; - set_fps(bktr, frame_rate); - bktr->video.addr = 0; - bktr->video.width = 0; - bktr->video.banksize = 0; - bktr->video.ramsize = 0; - bktr->pixfmt_compat = TRUE; - bktr->format = METEOR_GEO_RGB16; - bktr->pixfmt = oformat_meteor_to_bt( bktr->format ); - - bktr->capture_area_enabled = FALSE; - - OUTL(bktr, BKTR_INT_MASK, BT848_INT_MYSTERYBIT); /* if you take this out triton - based motherboards will - operate unreliably */ - return( 0 ); -} - -int -vbi_open( bktr_ptr_t bktr ) -{ - - LOCK_VBI(bktr); - - if (bktr->vbiflags & VBI_OPEN) { /* device is busy */ - UNLOCK_VBI(bktr); - return( EBUSY ); - } - - bktr->vbiflags |= VBI_OPEN; - - /* reset the VBI circular buffer pointers and clear the buffers */ - bktr->vbiinsert = 0; - bktr->vbistart = 0; - bktr->vbisize = 0; - bktr->vbi_sequence_number = 0; - bktr->vbi_read_blocked = FALSE; - - bzero((caddr_t) bktr->vbibuffer, VBI_BUFFER_SIZE); - bzero((caddr_t) bktr->vbidata, VBI_DATA_SIZE); - - UNLOCK_VBI(bktr); - - return( 0 ); -} - -/* - * - */ -int -tuner_open( bktr_ptr_t bktr ) -{ - if ( !(bktr->tflags & TUNER_INITALIZED) ) /* device not found */ - return( ENXIO ); - - if ( bktr->tflags & TUNER_OPEN ) /* already open */ - return( 0 ); - - bktr->tflags |= TUNER_OPEN; - bktr->tuner.frequency = 0; - bktr->tuner.channel = 0; - bktr->tuner.chnlset = DEFAULT_CHNLSET; - bktr->tuner.afc = 0; - bktr->tuner.radio_mode = 0; - - /* enable drivers on the GPIO port that control the MUXes */ - OUTL(bktr, BKTR_GPIO_OUT_EN, INL(bktr, BKTR_GPIO_OUT_EN) | bktr->card.gpio_mux_bits); - - /* unmute the audio stream */ - set_audio( bktr, AUDIO_UNMUTE ); - - /* Initialise any audio chips, eg MSP34xx or TDA98xx */ - init_audio_devices( bktr ); - - return( 0 ); -} - - - - -/* - * - */ -int -video_close( bktr_ptr_t bktr ) -{ - bktr->flags &= ~(METEOR_OPEN | - METEOR_SINGLE | - METEOR_CAP_MASK | - METEOR_WANT_MASK); - - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - OUTB(bktr, BKTR_CAP_CTL, CAPTURE_OFF); - - bktr->dma_prog_loaded = FALSE; - OUTB(bktr, BKTR_TDEC, 0); - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - -/** FIXME: is 0xf magic, wouldn't 0x00 work ??? */ - OUTL(bktr, BKTR_SRESET, 0xf); - OUTL(bktr, BKTR_INT_STAT, ALL_INTS_CLEARED); - - return( 0 ); -} - - -/* - * tuner close handle, - * place holder for tuner specific operations on a close. - */ -int -tuner_close( bktr_ptr_t bktr ) -{ - bktr->tflags &= ~TUNER_OPEN; - - /* mute the audio by switching the mux */ - set_audio( bktr, AUDIO_MUTE ); - - /* disable drivers on the GPIO port that control the MUXes */ - OUTL(bktr, BKTR_GPIO_OUT_EN, INL(bktr, BKTR_GPIO_OUT_EN) & ~bktr->card.gpio_mux_bits); - - return( 0 ); -} - -int -vbi_close( bktr_ptr_t bktr ) -{ - - LOCK_VBI(bktr); - - bktr->vbiflags &= ~VBI_OPEN; - - UNLOCK_VBI(bktr); - - return( 0 ); -} - -/* - * - */ -int -video_read(bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio) -{ - int status; - int count; - - - if (bktr->bigbuf == 0) /* no frame buffer allocated (ioctl failed) */ - return( ENOMEM ); - - if (bktr->flags & METEOR_CAP_MASK) - return( EIO ); /* already capturing */ - - OUTB(bktr, BKTR_CAP_CTL, bktr->bktr_cap_ctl); - - - count = bktr->rows * bktr->cols * - pixfmt_table[ bktr->pixfmt ].public.Bpp; - - if ((int) uio->uio_iov->iov_len < count) - return( EINVAL ); - - bktr->flags &= ~(METEOR_CAP_MASK | METEOR_WANT_MASK); - - /* capture one frame */ - start_capture(bktr, METEOR_SINGLE); - /* wait for capture to complete */ - OUTL(bktr, BKTR_INT_STAT, ALL_INTS_CLEARED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, bktr->capcontrol); - OUTL(bktr, BKTR_INT_MASK, BT848_INT_MYSTERYBIT | - BT848_INT_RISCI | - BT848_INT_VSYNC | - BT848_INT_FMTCHG); - - - status = tsleep(BKTR_SLEEP, BKTRPRI, "captur", 0); - if (!status) /* successful capture */ - status = uiomove((caddr_t)bktr->bigbuf, count, uio); - else - printf ("%s: read: tsleep error %d\n", - bktr_name(bktr), status); - - bktr->flags &= ~(METEOR_SINGLE | METEOR_WANT_MASK); - - return( status ); -} - -/* - * Read VBI data from the vbi circular buffer - * The buffer holds vbi data blocks which are the same size - * vbiinsert is the position we will insert the next item into the buffer - * vbistart is the actual position in the buffer we want to read from - * vbisize is the exact number of bytes in the buffer left to read - */ -int -vbi_read(bktr_ptr_t bktr, struct uio *uio, int ioflag) -{ - int readsize, readsize2, start; - int status; - - /* - * XXX - vbi_read() should be protected against being re-entered - * while it is unlocked for the uiomove. - */ - LOCK_VBI(bktr); - - while(bktr->vbisize == 0) { - if (ioflag & FNDELAY) { - status = EWOULDBLOCK; - goto out; - } - - bktr->vbi_read_blocked = TRUE; -#ifdef USE_VBIMUTEX - if ((status = msleep(VBI_SLEEP, &bktr->vbimutex, VBIPRI, "vbi", - 0))) { - goto out; - } -#else - if ((status = tsleep(VBI_SLEEP, VBIPRI, "vbi", 0))) { - goto out; - } -#endif - } - - /* Now we have some data to give to the user */ - - /* We cannot read more bytes than there are in - * the circular buffer - */ - readsize = (int)uio->uio_iov->iov_len; - - if (readsize > bktr->vbisize) readsize = bktr->vbisize; - - /* Check if we can read this number of bytes without having - * to wrap around the circular buffer */ - if((bktr->vbistart + readsize) >= VBI_BUFFER_SIZE) { - /* We need to wrap around */ - - readsize2 = VBI_BUFFER_SIZE - bktr->vbistart; - start = bktr->vbistart; - UNLOCK_VBI(bktr); - status = uiomove((caddr_t)bktr->vbibuffer + start, readsize2, uio); - if (status == 0) - status = uiomove((caddr_t)bktr->vbibuffer, (readsize - readsize2), uio); - } else { - UNLOCK_VBI(bktr); - /* We do not need to wrap around */ - status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize, uio); - } - - LOCK_VBI(bktr); - - /* Update the number of bytes left to read */ - bktr->vbisize -= readsize; - - /* Update vbistart */ - bktr->vbistart += readsize; - bktr->vbistart = bktr->vbistart % VBI_BUFFER_SIZE; /* wrap around if needed */ - -out: - UNLOCK_VBI(bktr); - - return( status ); - -} - - - -/* - * video ioctls - */ -int -video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* td ) -{ - volatile u_char c_temp; - unsigned int temp; - unsigned int temp_iform; - unsigned int error; - struct meteor_geomet *geo; - struct meteor_counts *counts; - struct meteor_video *video; - struct bktr_capture_area *cap_area; - vm_offset_t buf; - int i; - int sig; - char char_temp; - - switch ( cmd ) { - - case BT848SCLIP: /* set clip region */ - bktr->max_clip_node = 0; - memcpy(&bktr->clip_list, arg, sizeof(bktr->clip_list)); - - for (i = 0; i < BT848_MAX_CLIP_NODE; i++) { - if (bktr->clip_list[i].y_min == 0 && - bktr->clip_list[i].y_max == 0) - break; - } - bktr->max_clip_node = i; - - /* make sure that the list contains a valid clip secquence */ - /* the clip rectangles should be sorted by x then by y as the - second order sort key */ - - /* clip rectangle list is terminated by y_min and y_max set to 0 */ - - /* to disable clipping set y_min and y_max to 0 in the first - clip rectangle . The first clip rectangle is clip_list[0]. - */ - - - - if (bktr->max_clip_node == 0 && - (bktr->clip_list[0].y_min != 0 && - bktr->clip_list[0].y_max != 0)) { - return EINVAL; - } - - for (i = 0; i < BT848_MAX_CLIP_NODE - 1 ; i++) { - if (bktr->clip_list[i].y_min == 0 && - bktr->clip_list[i].y_max == 0) { - break; - } - if ( bktr->clip_list[i+1].y_min != 0 && - bktr->clip_list[i+1].y_max != 0 && - bktr->clip_list[i].x_min > bktr->clip_list[i+1].x_min ) { - - bktr->max_clip_node = 0; - return (EINVAL); - - } - - if (bktr->clip_list[i].x_min >= bktr->clip_list[i].x_max || - bktr->clip_list[i].y_min >= bktr->clip_list[i].y_max || - bktr->clip_list[i].x_min < 0 || - bktr->clip_list[i].x_max < 0 || - bktr->clip_list[i].y_min < 0 || - bktr->clip_list[i].y_max < 0 ) { - bktr->max_clip_node = 0; - return (EINVAL); - } - } - - bktr->dma_prog_loaded = FALSE; - - break; - - case METEORSTATUS: /* get Bt848 status */ - c_temp = INB(bktr, BKTR_DSTATUS); - temp = 0; - if (!(c_temp & 0x40)) temp |= METEOR_STATUS_HCLK; - if (!(c_temp & 0x10)) temp |= METEOR_STATUS_FIDT; - *(u_short *)arg = temp; - break; - - case BT848SFMT: /* set input format */ - temp = *(unsigned long*)arg & BT848_IFORM_FORMAT; - temp_iform = INB(bktr, BKTR_IFORM); - temp_iform &= ~BT848_IFORM_FORMAT; - temp_iform &= ~BT848_IFORM_XTSEL; - OUTB(bktr, BKTR_IFORM, (temp_iform | temp | format_params[temp].iform_xtsel)); - switch( temp ) { - case BT848_IFORM_F_AUTO: - bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) | - METEOR_AUTOMODE; - break; - - case BT848_IFORM_F_NTSCM: - case BT848_IFORM_F_NTSCJ: - bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) | - METEOR_NTSC; - OUTB(bktr, BKTR_ADELAY, format_params[temp].adelay); - OUTB(bktr, BKTR_BDELAY, format_params[temp].bdelay); - bktr->format_params = temp; - break; - - case BT848_IFORM_F_PALBDGHI: - case BT848_IFORM_F_PALN: - case BT848_IFORM_F_SECAM: - case BT848_IFORM_F_RSVD: - case BT848_IFORM_F_PALM: - bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) | - METEOR_PAL; - OUTB(bktr, BKTR_ADELAY, format_params[temp].adelay); - OUTB(bktr, BKTR_BDELAY, format_params[temp].bdelay); - bktr->format_params = temp; - break; - - } - bktr->dma_prog_loaded = FALSE; - break; - - case METEORSFMT: /* set input format */ - temp_iform = INB(bktr, BKTR_IFORM); - temp_iform &= ~BT848_IFORM_FORMAT; - temp_iform &= ~BT848_IFORM_XTSEL; - switch(*(unsigned long *)arg & METEOR_FORM_MASK ) { - case 0: /* default */ - case METEOR_FMT_NTSC: - bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) | - METEOR_NTSC; - OUTB(bktr, BKTR_IFORM, temp_iform | BT848_IFORM_F_NTSCM | - format_params[BT848_IFORM_F_NTSCM].iform_xtsel); - OUTB(bktr, BKTR_ADELAY, format_params[BT848_IFORM_F_NTSCM].adelay); - OUTB(bktr, BKTR_BDELAY, format_params[BT848_IFORM_F_NTSCM].bdelay); - bktr->format_params = BT848_IFORM_F_NTSCM; - break; - - case METEOR_FMT_PAL: - bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) | - METEOR_PAL; - OUTB(bktr, BKTR_IFORM, temp_iform | BT848_IFORM_F_PALBDGHI | - format_params[BT848_IFORM_F_PALBDGHI].iform_xtsel); - OUTB(bktr, BKTR_ADELAY, format_params[BT848_IFORM_F_PALBDGHI].adelay); - OUTB(bktr, BKTR_BDELAY, format_params[BT848_IFORM_F_PALBDGHI].bdelay); - bktr->format_params = BT848_IFORM_F_PALBDGHI; - break; - - case METEOR_FMT_AUTOMODE: - bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) | - METEOR_AUTOMODE; - OUTB(bktr, BKTR_IFORM, temp_iform | BT848_IFORM_F_AUTO | - format_params[BT848_IFORM_F_AUTO].iform_xtsel); - break; - - default: - return( EINVAL ); - } - bktr->dma_prog_loaded = FALSE; - break; - - case METEORGFMT: /* get input format */ - *(u_long *)arg = bktr->flags & METEOR_FORM_MASK; - break; - - - case BT848GFMT: /* get input format */ - *(u_long *)arg = INB(bktr, BKTR_IFORM) & BT848_IFORM_FORMAT; - break; - - case METEORSCOUNT: /* (re)set error counts */ - counts = (struct meteor_counts *) arg; - bktr->fifo_errors = counts->fifo_errors; - bktr->dma_errors = counts->dma_errors; - bktr->frames_captured = counts->frames_captured; - bktr->even_fields_captured = counts->even_fields_captured; - bktr->odd_fields_captured = counts->odd_fields_captured; - break; - - case METEORGCOUNT: /* get error counts */ - counts = (struct meteor_counts *) arg; - counts->fifo_errors = bktr->fifo_errors; - counts->dma_errors = bktr->dma_errors; - counts->frames_captured = bktr->frames_captured; - counts->even_fields_captured = bktr->even_fields_captured; - counts->odd_fields_captured = bktr->odd_fields_captured; - break; - - case METEORGVIDEO: - video = (struct meteor_video *)arg; - video->addr = bktr->video.addr; - video->width = bktr->video.width; - video->banksize = bktr->video.banksize; - video->ramsize = bktr->video.ramsize; - break; - - case METEORSVIDEO: - video = (struct meteor_video *)arg; - bktr->video.addr = video->addr; - bktr->video.width = video->width; - bktr->video.banksize = video->banksize; - bktr->video.ramsize = video->ramsize; - break; - - case METEORSFPS: - set_fps(bktr, *(u_short *)arg); - break; - - case METEORGFPS: - *(u_short *)arg = bktr->fps; - break; - - case METEORSHUE: /* set hue */ - OUTB(bktr, BKTR_HUE, (*(u_char *) arg) & 0xff); - break; - - case METEORGHUE: /* get hue */ - *(u_char *)arg = INB(bktr, BKTR_HUE); - break; - - case METEORSBRIG: /* set brightness */ - char_temp = ( *(u_char *)arg & 0xff) - 128; - OUTB(bktr, BKTR_BRIGHT, char_temp); - - break; - - case METEORGBRIG: /* get brightness */ - *(u_char *)arg = INB(bktr, BKTR_BRIGHT) + 128; - break; - - case METEORSCSAT: /* set chroma saturation */ - temp = (int)*(u_char *)arg; - - OUTB(bktr, BKTR_SAT_U_LO, (temp << 1) & 0xff); - OUTB(bktr, BKTR_SAT_V_LO, (temp << 1) & 0xff); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) - & ~(BT848_E_CONTROL_SAT_U_MSB - | BT848_E_CONTROL_SAT_V_MSB)); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) - & ~(BT848_O_CONTROL_SAT_U_MSB | - BT848_O_CONTROL_SAT_V_MSB)); - - if ( temp & BIT_SEVEN_HIGH ) { - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) - | (BT848_E_CONTROL_SAT_U_MSB - | BT848_E_CONTROL_SAT_V_MSB)); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) - | (BT848_O_CONTROL_SAT_U_MSB - | BT848_O_CONTROL_SAT_V_MSB)); - } - break; - - case METEORGCSAT: /* get chroma saturation */ - temp = (INB(bktr, BKTR_SAT_V_LO) >> 1) & 0xff; - if ( INB(bktr, BKTR_E_CONTROL) & BT848_E_CONTROL_SAT_V_MSB ) - temp |= BIT_SEVEN_HIGH; - *(u_char *)arg = (u_char)temp; - break; - - case METEORSCONT: /* set contrast */ - temp = (int)*(u_char *)arg & 0xff; - temp <<= 1; - OUTB(bktr, BKTR_CONTRAST_LO, temp & 0xff); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~BT848_E_CONTROL_CON_MSB); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) & ~BT848_O_CONTROL_CON_MSB); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) | - (((temp & 0x100) >> 6 ) & BT848_E_CONTROL_CON_MSB)); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) | - (((temp & 0x100) >> 6 ) & BT848_O_CONTROL_CON_MSB)); - break; - - case METEORGCONT: /* get contrast */ - temp = (int)INB(bktr, BKTR_CONTRAST_LO) & 0xff; - temp |= ((int)INB(bktr, BKTR_O_CONTROL) & 0x04) << 6; - *(u_char *)arg = (u_char)((temp >> 1) & 0xff); - break; - - case BT848SCBUF: /* set Clear-Buffer-on-start flag */ - bktr->clr_on_start = (*(int *)arg != 0); - break; - - case BT848GCBUF: /* get Clear-Buffer-on-start flag */ - *(int *)arg = (int) bktr->clr_on_start; - break; - - case METEORSSIGNAL: - sig = *(int *)arg; - /* Historically, applications used METEOR_SIG_MODE_MASK - * to reset signal delivery. - */ - if (sig == METEOR_SIG_MODE_MASK) - sig = 0; - if (sig < 0 || sig > _SIG_MAXSIG) - return (EINVAL); - bktr->signal = sig; - bktr->proc = sig ? td->td_proc : NULL; - break; - - case METEORGSIGNAL: - *(int *)arg = bktr->signal; - break; - - case METEORCAPTUR: - temp = bktr->flags; - switch (*(int *) arg) { - case METEOR_CAP_SINGLE: - - if (bktr->bigbuf==0) /* no frame buffer allocated */ - return( ENOMEM ); - /* already capturing */ - if (temp & METEOR_CAP_MASK) - return( EIO ); - - - - start_capture(bktr, METEOR_SINGLE); - - /* wait for capture to complete */ - OUTL(bktr, BKTR_INT_STAT, ALL_INTS_CLEARED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, bktr->capcontrol); - - OUTL(bktr, BKTR_INT_MASK, BT848_INT_MYSTERYBIT | - BT848_INT_RISCI | - BT848_INT_VSYNC | - BT848_INT_FMTCHG); - - OUTB(bktr, BKTR_CAP_CTL, bktr->bktr_cap_ctl); - error = tsleep(BKTR_SLEEP, BKTRPRI, "captur", hz); - if (error && (error != ERESTART)) { - /* Here if we didn't get complete frame */ -#ifdef DIAGNOSTIC - printf( "%s: ioctl: tsleep error %d %x\n", - bktr_name(bktr), error, - INL(bktr, BKTR_RISC_COUNT)); -#endif - - /* stop dma */ - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - - /* disable risc, leave fifo running */ - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - } - - bktr->flags &= ~(METEOR_SINGLE|METEOR_WANT_MASK); - /* FIXME: should we set bt848->int_stat ??? */ - break; - - case METEOR_CAP_CONTINOUS: - if (bktr->bigbuf==0) /* no frame buffer allocated */ - return( ENOMEM ); - /* already capturing */ - if (temp & METEOR_CAP_MASK) - return( EIO ); - - - start_capture(bktr, METEOR_CONTIN); - - /* Clear the interrypt status register */ - OUTL(bktr, BKTR_INT_STAT, INL(bktr, BKTR_INT_STAT)); - - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, bktr->capcontrol); - OUTB(bktr, BKTR_CAP_CTL, bktr->bktr_cap_ctl); - - OUTL(bktr, BKTR_INT_MASK, BT848_INT_MYSTERYBIT | - BT848_INT_RISCI | - BT848_INT_VSYNC | - BT848_INT_FMTCHG); -#ifdef BT848_DUMP - dump_bt848(bktr); -#endif - break; - - case METEOR_CAP_STOP_CONT: - if (bktr->flags & METEOR_CONTIN) { - /* turn off capture */ - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - OUTB(bktr, BKTR_CAP_CTL, CAPTURE_OFF); - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - bktr->flags &= - ~(METEOR_CONTIN | METEOR_WANT_MASK); - - } - } - break; - - case METEORSETGEO: - /* can't change parameters while capturing */ - if (bktr->flags & METEOR_CAP_MASK) - return( EBUSY ); - - - geo = (struct meteor_geomet *) arg; - - error = 0; - /* Either even or odd, if even & odd, then these a zero */ - if ((geo->oformat & METEOR_GEO_ODD_ONLY) && - (geo->oformat & METEOR_GEO_EVEN_ONLY)) { - printf( "%s: ioctl: Geometry odd or even only.\n", - bktr_name(bktr)); - return( EINVAL ); - } - - /* set/clear even/odd flags */ - if (geo->oformat & METEOR_GEO_ODD_ONLY) - bktr->flags |= METEOR_ONLY_ODD_FIELDS; - else - bktr->flags &= ~METEOR_ONLY_ODD_FIELDS; - if (geo->oformat & METEOR_GEO_EVEN_ONLY) - bktr->flags |= METEOR_ONLY_EVEN_FIELDS; - else - bktr->flags &= ~METEOR_ONLY_EVEN_FIELDS; - - if (geo->columns <= 0) { - printf( - "%s: ioctl: %d: columns must be greater than zero.\n", - bktr_name(bktr), geo->columns); - error = EINVAL; - } - else if ((geo->columns & 0x3fe) != geo->columns) { - printf( - "%s: ioctl: %d: columns too large or not even.\n", - bktr_name(bktr), geo->columns); - error = EINVAL; - } - - if (geo->rows <= 0) { - printf( - "%s: ioctl: %d: rows must be greater than zero.\n", - bktr_name(bktr), geo->rows); - error = EINVAL; - } - else if (((geo->rows & 0x7fe) != geo->rows) || - ((geo->oformat & METEOR_GEO_FIELD_MASK) && - ((geo->rows & 0x3fe) != geo->rows)) ) { - printf( - "%s: ioctl: %d: rows too large or not even.\n", - bktr_name(bktr), geo->rows); - error = EINVAL; - } - - if (geo->frames > 32) { - printf("%s: ioctl: too many frames.\n", - bktr_name(bktr)); - - error = EINVAL; - } - - if (error) - return( error ); - - bktr->dma_prog_loaded = FALSE; - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - - if ((temp=(geo->rows * geo->columns * geo->frames * 2))) { - if (geo->oformat & METEOR_GEO_RGB24) temp = temp * 2; - - /* meteor_mem structure for SYNC Capture */ - if (geo->frames > 1) temp += PAGE_SIZE; - - temp = btoc(temp); - if ((int) temp > bktr->alloc_pages - && bktr->video.addr == 0) { - -/*****************************/ -/* *** OS Dependent code *** */ -/*****************************/ -#if defined(__NetBSD__) || defined(__OpenBSD__) - bus_dmamap_t dmamap; - - buf = get_bktr_mem(bktr, &dmamap, - temp * PAGE_SIZE); - if (buf != 0) { - free_bktr_mem(bktr, bktr->dm_mem, - bktr->bigbuf); - bktr->dm_mem = dmamap; - -#else - buf = get_bktr_mem(unit, temp*PAGE_SIZE); - if (buf != 0) { - contigfree( - (void *)(uintptr_t)bktr->bigbuf, - (bktr->alloc_pages * PAGE_SIZE), - M_DEVBUF); -#endif - - bktr->bigbuf = buf; - bktr->alloc_pages = temp; - if (bootverbose) - printf("%s: ioctl: Allocating %d bytes\n", - bktr_name(bktr), (int)(temp*PAGE_SIZE)); - } - else - error = ENOMEM; - } - } - - if (error) - return error; - - bktr->rows = geo->rows; - bktr->cols = geo->columns; - bktr->frames = geo->frames; - - /* Pixel format (if in meteor pixfmt compatibility mode) */ - if ( bktr->pixfmt_compat ) { - bktr->format = METEOR_GEO_YUV_422; - switch (geo->oformat & METEOR_GEO_OUTPUT_MASK) { - case 0: /* default */ - case METEOR_GEO_RGB16: - bktr->format = METEOR_GEO_RGB16; - break; - case METEOR_GEO_RGB24: - bktr->format = METEOR_GEO_RGB24; - break; - case METEOR_GEO_YUV_422: - bktr->format = METEOR_GEO_YUV_422; - if (geo->oformat & METEOR_GEO_YUV_12) - bktr->format = METEOR_GEO_YUV_12; - break; - case METEOR_GEO_YUV_PACKED: - bktr->format = METEOR_GEO_YUV_PACKED; - break; - } - bktr->pixfmt = oformat_meteor_to_bt( bktr->format ); - } - - if (bktr->flags & METEOR_CAP_MASK) { - - if (bktr->flags & (METEOR_CONTIN|METEOR_SYNCAP)) { - switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { - case METEOR_ONLY_ODD_FIELDS: - bktr->flags |= METEOR_WANT_ODD; - break; - case METEOR_ONLY_EVEN_FIELDS: - bktr->flags |= METEOR_WANT_EVEN; - break; - default: - bktr->flags |= METEOR_WANT_MASK; - break; - } - - start_capture(bktr, METEOR_CONTIN); - OUTL(bktr, BKTR_INT_STAT, INL(bktr, BKTR_INT_STAT)); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_ENABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, bktr->capcontrol); - OUTL(bktr, BKTR_INT_MASK, BT848_INT_MYSTERYBIT | - BT848_INT_VSYNC | - BT848_INT_FMTCHG); - } - } - break; - /* end of METEORSETGEO */ - - /* FIXME. The Capture Area currently has the following restrictions: - GENERAL - y_offset may need to be even in interlaced modes - RGB24 - Interlaced mode - x_size must be greater than or equal to 1.666*METEORSETGEO width (cols) - y_size must be greater than or equal to METEORSETGEO height (rows) - RGB24 - Even Only (or Odd Only) mode - x_size must be greater than or equal to 1.666*METEORSETGEO width (cols) - y_size must be greater than or equal to 2*METEORSETGEO height (rows) - YUV12 - Interlaced mode - x_size must be greater than or equal to METEORSETGEO width (cols) - y_size must be greater than or equal to METEORSETGEO height (rows) - YUV12 - Even Only (or Odd Only) mode - x_size must be greater than or equal to METEORSETGEO width (cols) - y_size must be greater than or equal to 2*METEORSETGEO height (rows) - */ - - case BT848_SCAPAREA: /* set capture area of each video frame */ - /* can't change parameters while capturing */ - if (bktr->flags & METEOR_CAP_MASK) - return( EBUSY ); - - cap_area = (struct bktr_capture_area *) arg; - bktr->capture_area_x_offset = cap_area->x_offset; - bktr->capture_area_y_offset = cap_area->y_offset; - bktr->capture_area_x_size = cap_area->x_size; - bktr->capture_area_y_size = cap_area->y_size; - bktr->capture_area_enabled = TRUE; - - bktr->dma_prog_loaded = FALSE; - break; - - case BT848_GCAPAREA: /* get capture area of each video frame */ - cap_area = (struct bktr_capture_area *) arg; - if (bktr->capture_area_enabled == FALSE) { - cap_area->x_offset = 0; - cap_area->y_offset = 0; - cap_area->x_size = format_params[ - bktr->format_params].scaled_hactive; - cap_area->y_size = format_params[ - bktr->format_params].vactive; - } else { - cap_area->x_offset = bktr->capture_area_x_offset; - cap_area->y_offset = bktr->capture_area_y_offset; - cap_area->x_size = bktr->capture_area_x_size; - cap_area->y_size = bktr->capture_area_y_size; - } - break; - - default: - return common_ioctl( bktr, cmd, arg ); - } - - return( 0 ); -} - -/* - * tuner ioctls - */ -int -tuner_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* td ) -{ - int tmp_int; - int temp, temp1; - int offset; - int count; - u_char *buf; - u_long par; - u_char write; - int i2c_addr; - int i2c_port; - u_long data; - - switch ( cmd ) { - - case REMOTE_GETKEY: - /* Read the last key pressed by the Remote Control */ - if (bktr->remote_control == 0) return (EINVAL); - remote_read(bktr, (struct bktr_remote *)arg); - break; - -#if defined( TUNER_AFC ) - case TVTUNER_SETAFC: - bktr->tuner.afc = (*(int *)arg != 0); - break; - - case TVTUNER_GETAFC: - *(int *)arg = bktr->tuner.afc; - /* XXX Perhaps use another bit to indicate AFC success? */ - break; -#endif /* TUNER_AFC */ - - case TVTUNER_SETCHNL: - temp_mute( bktr, TRUE ); - temp = tv_channel( bktr, (int)*(unsigned long *)arg ); - if ( temp < 0 ) { - temp_mute( bktr, FALSE ); - return( EINVAL ); - } - *(unsigned long *)arg = temp; - - /* after every channel change, we must restart the MSP34xx */ - /* audio chip to reselect NICAM STEREO or MONO audio */ - if ( bktr->card.msp3400c ) - msp_autodetect( bktr ); - - /* after every channel change, we must restart the DPL35xx */ - if ( bktr->card.dpl3518a ) - dpl_autodetect( bktr ); - - temp_mute( bktr, FALSE ); - break; - - case TVTUNER_GETCHNL: - *(unsigned long *)arg = bktr->tuner.channel; - break; - - case TVTUNER_SETTYPE: - temp = *(unsigned long *)arg; - if ( (temp < CHNLSET_MIN) || (temp > CHNLSET_MAX) ) - return( EINVAL ); - bktr->tuner.chnlset = temp; - break; - - case TVTUNER_GETTYPE: - *(unsigned long *)arg = bktr->tuner.chnlset; - break; - - case TVTUNER_GETSTATUS: - temp = get_tuner_status( bktr ); - *(unsigned long *)arg = temp & 0xff; - break; - - case TVTUNER_SETFREQ: - temp_mute( bktr, TRUE ); - temp = tv_freq( bktr, (int)*(unsigned long *)arg, TV_FREQUENCY); - temp_mute( bktr, FALSE ); - if ( temp < 0 ) { - temp_mute( bktr, FALSE ); - return( EINVAL ); - } - *(unsigned long *)arg = temp; - - /* after every channel change, we must restart the MSP34xx */ - /* audio chip to reselect NICAM STEREO or MONO audio */ - if ( bktr->card.msp3400c ) - msp_autodetect( bktr ); - - /* after every channel change, we must restart the DPL35xx */ - if ( bktr->card.dpl3518a ) - dpl_autodetect( bktr ); - - temp_mute( bktr, FALSE ); - break; - - case TVTUNER_GETFREQ: - *(unsigned long *)arg = bktr->tuner.frequency; - break; - - case TVTUNER_GETCHNLSET: - return tuner_getchnlset((struct bktr_chnlset *)arg); - - case BT848_SAUDIO: /* set audio channel */ - if ( set_audio( bktr, *(int*)arg ) < 0 ) - return( EIO ); - break; - - /* hue is a 2's compliment number, -90' to +89.3' in 0.7' steps */ - case BT848_SHUE: /* set hue */ - OUTB(bktr, BKTR_HUE, (u_char)(*(int*)arg & 0xff)); - break; - - case BT848_GHUE: /* get hue */ - *(int*)arg = (signed char)(INB(bktr, BKTR_HUE) & 0xff); - break; - - /* brightness is a 2's compliment #, -50 to +%49.6% in 0.39% steps */ - case BT848_SBRIG: /* set brightness */ - OUTB(bktr, BKTR_BRIGHT, (u_char)(*(int *)arg & 0xff)); - break; - - case BT848_GBRIG: /* get brightness */ - *(int *)arg = (signed char)(INB(bktr, BKTR_BRIGHT) & 0xff); - break; - - /* */ - case BT848_SCSAT: /* set chroma saturation */ - tmp_int = *(int*)arg; - - temp = INB(bktr, BKTR_E_CONTROL); - temp1 = INB(bktr, BKTR_O_CONTROL); - if ( tmp_int & BIT_EIGHT_HIGH ) { - temp |= (BT848_E_CONTROL_SAT_U_MSB | - BT848_E_CONTROL_SAT_V_MSB); - temp1 |= (BT848_O_CONTROL_SAT_U_MSB | - BT848_O_CONTROL_SAT_V_MSB); - } - else { - temp &= ~(BT848_E_CONTROL_SAT_U_MSB | - BT848_E_CONTROL_SAT_V_MSB); - temp1 &= ~(BT848_O_CONTROL_SAT_U_MSB | - BT848_O_CONTROL_SAT_V_MSB); - } - - OUTB(bktr, BKTR_SAT_U_LO, (u_char)(tmp_int & 0xff)); - OUTB(bktr, BKTR_SAT_V_LO, (u_char)(tmp_int & 0xff)); - OUTB(bktr, BKTR_E_CONTROL, temp); - OUTB(bktr, BKTR_O_CONTROL, temp1); - break; - - case BT848_GCSAT: /* get chroma saturation */ - tmp_int = (int)(INB(bktr, BKTR_SAT_V_LO) & 0xff); - if ( INB(bktr, BKTR_E_CONTROL) & BT848_E_CONTROL_SAT_V_MSB ) - tmp_int |= BIT_EIGHT_HIGH; - *(int*)arg = tmp_int; - break; - - /* */ - case BT848_SVSAT: /* set chroma V saturation */ - tmp_int = *(int*)arg; - - temp = INB(bktr, BKTR_E_CONTROL); - temp1 = INB(bktr, BKTR_O_CONTROL); - if ( tmp_int & BIT_EIGHT_HIGH) { - temp |= BT848_E_CONTROL_SAT_V_MSB; - temp1 |= BT848_O_CONTROL_SAT_V_MSB; - } - else { - temp &= ~BT848_E_CONTROL_SAT_V_MSB; - temp1 &= ~BT848_O_CONTROL_SAT_V_MSB; - } - - OUTB(bktr, BKTR_SAT_V_LO, (u_char)(tmp_int & 0xff)); - OUTB(bktr, BKTR_E_CONTROL, temp); - OUTB(bktr, BKTR_O_CONTROL, temp1); - break; - - case BT848_GVSAT: /* get chroma V saturation */ - tmp_int = (int)INB(bktr, BKTR_SAT_V_LO) & 0xff; - if ( INB(bktr, BKTR_E_CONTROL) & BT848_E_CONTROL_SAT_V_MSB ) - tmp_int |= BIT_EIGHT_HIGH; - *(int*)arg = tmp_int; - break; - - /* */ - case BT848_SUSAT: /* set chroma U saturation */ - tmp_int = *(int*)arg; - - temp = INB(bktr, BKTR_E_CONTROL); - temp1 = INB(bktr, BKTR_O_CONTROL); - if ( tmp_int & BIT_EIGHT_HIGH ) { - temp |= BT848_E_CONTROL_SAT_U_MSB; - temp1 |= BT848_O_CONTROL_SAT_U_MSB; - } - else { - temp &= ~BT848_E_CONTROL_SAT_U_MSB; - temp1 &= ~BT848_O_CONTROL_SAT_U_MSB; - } - - OUTB(bktr, BKTR_SAT_U_LO, (u_char)(tmp_int & 0xff)); - OUTB(bktr, BKTR_E_CONTROL, temp); - OUTB(bktr, BKTR_O_CONTROL, temp1); - break; - - case BT848_GUSAT: /* get chroma U saturation */ - tmp_int = (int)INB(bktr, BKTR_SAT_U_LO) & 0xff; - if ( INB(bktr, BKTR_E_CONTROL) & BT848_E_CONTROL_SAT_U_MSB ) - tmp_int |= BIT_EIGHT_HIGH; - *(int*)arg = tmp_int; - break; - -/* lr 970528 luma notch etc - 3 high bits of e_control/o_control */ - - case BT848_SLNOTCH: /* set luma notch */ - tmp_int = (*(int *)arg & 0x7) << 5 ; - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~0xe0); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) & ~0xe0); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) | tmp_int); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) | tmp_int); - break; - - case BT848_GLNOTCH: /* get luma notch */ - *(int *)arg = (int) ( (INB(bktr, BKTR_E_CONTROL) & 0xe0) >> 5) ; - break; - - - /* */ - case BT848_SCONT: /* set contrast */ - tmp_int = *(int*)arg; - - temp = INB(bktr, BKTR_E_CONTROL); - temp1 = INB(bktr, BKTR_O_CONTROL); - if ( tmp_int & BIT_EIGHT_HIGH ) { - temp |= BT848_E_CONTROL_CON_MSB; - temp1 |= BT848_O_CONTROL_CON_MSB; - } - else { - temp &= ~BT848_E_CONTROL_CON_MSB; - temp1 &= ~BT848_O_CONTROL_CON_MSB; - } - - OUTB(bktr, BKTR_CONTRAST_LO, (u_char)(tmp_int & 0xff)); - OUTB(bktr, BKTR_E_CONTROL, temp); - OUTB(bktr, BKTR_O_CONTROL, temp1); - break; - - case BT848_GCONT: /* get contrast */ - tmp_int = (int)INB(bktr, BKTR_CONTRAST_LO) & 0xff; - if ( INB(bktr, BKTR_E_CONTROL) & BT848_E_CONTROL_CON_MSB ) - tmp_int |= BIT_EIGHT_HIGH; - *(int*)arg = tmp_int; - break; - - /* FIXME: SCBARS and CCBARS require a valid int * */ - /* argument to succeed, but its not used; consider */ - /* using the arg to store the on/off state so */ - /* there's only one ioctl() needed to turn cbars on/off */ - case BT848_SCBARS: /* set colorbar output */ - OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) | BT848_COLOR_CTL_COLOR_BARS); - break; - - case BT848_CCBARS: /* clear colorbar output */ - OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) & ~(BT848_COLOR_CTL_COLOR_BARS)); - break; - - case BT848_GAUDIO: /* get audio channel */ - temp = bktr->audio_mux_select; - if ( bktr->audio_mute_state == TRUE ) - temp |= AUDIO_MUTE; - *(int*)arg = temp; - break; - - case BT848_SBTSC: /* set audio channel */ - if ( set_BTSC( bktr, *(int*)arg ) < 0 ) - return( EIO ); - break; - - case BT848_WEEPROM: /* write eeprom */ - offset = (((struct eeProm *)arg)->offset); - count = (((struct eeProm *)arg)->count); - buf = &(((struct eeProm *)arg)->bytes[ 0 ]); - if ( writeEEProm( bktr, offset, count, buf ) < 0 ) - return( EIO ); - break; - - case BT848_REEPROM: /* read eeprom */ - offset = (((struct eeProm *)arg)->offset); - count = (((struct eeProm *)arg)->count); - buf = &(((struct eeProm *)arg)->bytes[ 0 ]); - if ( readEEProm( bktr, offset, count, buf ) < 0 ) - return( EIO ); - break; - - case BT848_SIGNATURE: - offset = (((struct eeProm *)arg)->offset); - count = (((struct eeProm *)arg)->count); - buf = &(((struct eeProm *)arg)->bytes[ 0 ]); - if ( signCard( bktr, offset, count, buf ) < 0 ) - return( EIO ); - break; - - /* Ioctl's for direct gpio access */ -#ifdef BKTR_GPIO_ACCESS - case BT848_GPIO_GET_EN: - *(int*)arg = INL(bktr, BKTR_GPIO_OUT_EN); - break; - - case BT848_GPIO_SET_EN: - OUTL(bktr, BKTR_GPIO_OUT_EN, *(int*)arg); - break; - - case BT848_GPIO_GET_DATA: - *(int*)arg = INL(bktr, BKTR_GPIO_DATA); - break; - - case BT848_GPIO_SET_DATA: - OUTL(bktr, BKTR_GPIO_DATA, *(int*)arg); - break; -#endif /* BKTR_GPIO_ACCESS */ - - /* Ioctl's for running the tuner device in radio mode */ - - case RADIO_GETMODE: - *(unsigned char *)arg = bktr->tuner.radio_mode; - break; - - case RADIO_SETMODE: - bktr->tuner.radio_mode = *(unsigned char *)arg; - break; - - case RADIO_GETFREQ: - *(unsigned long *)arg = bktr->tuner.frequency; - break; - - case RADIO_SETFREQ: - /* The argument to this ioctl is NOT freq*16. It is - ** freq*100. - */ - - temp=(int)*(unsigned long *)arg; - -#ifdef BKTR_RADIO_DEBUG - printf("%s: arg=%d temp=%d\n", bktr_name(bktr), - (int)*(unsigned long *)arg, temp); -#endif - -#ifndef BKTR_RADIO_NOFREQCHECK - /* According to the spec. sheet the band: 87.5MHz-108MHz */ - /* is supported. */ - if(temp<8750 || temp>10800) { - printf("%s: Radio frequency out of range\n", bktr_name(bktr)); - return(EINVAL); - } -#endif - temp_mute( bktr, TRUE ); - temp = tv_freq( bktr, temp, FM_RADIO_FREQUENCY ); - temp_mute( bktr, FALSE ); -#ifdef BKTR_RADIO_DEBUG - if(temp) - printf("%s: tv_freq returned: %d\n", bktr_name(bktr), temp); -#endif - if ( temp < 0 ) - return( EINVAL ); - *(unsigned long *)arg = temp; - break; - - /* Luigi's I2CWR ioctl */ - case BT848_I2CWR: - par = *(u_long *)arg; - write = (par >> 24) & 0xff ; - i2c_addr = (par >> 16) & 0xff ; - i2c_port = (par >> 8) & 0xff ; - data = (par) & 0xff ; - - if (write) { - i2cWrite( bktr, i2c_addr, i2c_port, data); - } else { - data = i2cRead( bktr, i2c_addr); - } - *(u_long *)arg = (par & 0xffffff00) | ( data & 0xff ); - break; - - -#ifdef BT848_MSP_READ - /* I2C ioctls to allow userland access to the MSP chip */ - case BT848_MSP_READ: - { - struct bktr_msp_control *msp; - msp = (struct bktr_msp_control *) arg; - msp->data = msp_dpl_read(bktr, bktr->msp_addr, - msp->function, msp->address); - break; - } - - case BT848_MSP_WRITE: - { - struct bktr_msp_control *msp; - msp = (struct bktr_msp_control *) arg; - msp_dpl_write(bktr, bktr->msp_addr, msp->function, - msp->address, msp->data ); - break; - } - - case BT848_MSP_RESET: - msp_dpl_reset(bktr, bktr->msp_addr); - break; -#endif - - default: - return common_ioctl( bktr, cmd, arg ); - } - - return( 0 ); -} - - -/* - * common ioctls - */ -static int -common_ioctl( bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg ) -{ - int pixfmt; - unsigned int temp; - struct meteor_pixfmt *pf_pub; - - switch (cmd) { - - case METEORSINPUT: /* set input device */ - /*Bt848 has 3 MUX Inputs. Bt848A/849A/878/879 has 4 MUX Inputs*/ - /* On the original bt848 boards, */ - /* Tuner is MUX0, RCA is MUX1, S-Video is MUX2 */ - /* On the Hauppauge bt878 boards, */ - /* Tuner is MUX0, RCA is MUX3 */ - /* Unfortunately Meteor driver codes DEV_RCA as DEV_0, so we */ - /* stick with this system in our Meteor Emulation */ - - switch(*(unsigned long *)arg & METEOR_DEV_MASK) { - - /* this is the RCA video input */ - case 0: /* default */ - case METEOR_INPUT_DEV0: - /* METEOR_INPUT_DEV_RCA: */ - bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) - | METEOR_DEV0; - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) - & ~BT848_IFORM_MUXSEL); - - /* work around for new Hauppauge 878 cards */ - if ((bktr->card.card_id == CARD_HAUPPAUGE) && - (bktr->id==BROOKTREE_878 || - bktr->id==BROOKTREE_879) ) - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX3); - else - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX1); - - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~BT848_E_CONTROL_COMP); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) & ~BT848_O_CONTROL_COMP); - set_audio( bktr, AUDIO_EXTERN ); - break; - - /* this is the tuner input */ - case METEOR_INPUT_DEV1: - bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) - | METEOR_DEV1; - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) & ~BT848_IFORM_MUXSEL); - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX0); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~BT848_E_CONTROL_COMP); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) & ~BT848_O_CONTROL_COMP); - set_audio( bktr, AUDIO_TUNER ); - break; - - /* this is the S-VHS input, but with a composite camera */ - case METEOR_INPUT_DEV2: - bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) - | METEOR_DEV2; - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) & ~BT848_IFORM_MUXSEL); - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX2); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~BT848_E_CONTROL_COMP); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~BT848_O_CONTROL_COMP); - set_audio( bktr, AUDIO_EXTERN ); - break; - - /* this is the S-VHS input */ - case METEOR_INPUT_DEV_SVIDEO: - bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) - | METEOR_DEV_SVIDEO; - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) & ~BT848_IFORM_MUXSEL); - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX2); - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) | BT848_E_CONTROL_COMP); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) | BT848_O_CONTROL_COMP); - set_audio( bktr, AUDIO_EXTERN ); - break; - - case METEOR_INPUT_DEV3: - if ((bktr->id == BROOKTREE_848A) || - (bktr->id == BROOKTREE_849A) || - (bktr->id == BROOKTREE_878) || - (bktr->id == BROOKTREE_879) ) { - bktr->flags = (bktr->flags & ~METEOR_DEV_MASK) - | METEOR_DEV3; - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) & ~BT848_IFORM_MUXSEL); - - /* work around for new Hauppauge 878 cards */ - if ((bktr->card.card_id == CARD_HAUPPAUGE) && - (bktr->id==BROOKTREE_878 || - bktr->id==BROOKTREE_879) ) - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX1); - else - OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX3); - - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) & ~BT848_E_CONTROL_COMP); - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) & ~BT848_O_CONTROL_COMP); - set_audio( bktr, AUDIO_EXTERN ); - - break; - } - - default: - return( EINVAL ); - } - break; - - case METEORGINPUT: /* get input device */ - *(u_long *)arg = bktr->flags & METEOR_DEV_MASK; - break; - - case METEORSACTPIXFMT: - if (( *(int *)arg < 0 ) || - ( *(int *)arg >= PIXFMT_TABLE_SIZE )) - return( EINVAL ); - - bktr->pixfmt = *(int *)arg; - OUTB(bktr, BKTR_COLOR_CTL, (INB(bktr, BKTR_COLOR_CTL) & 0xf0) - | pixfmt_swap_flags( bktr->pixfmt )); - bktr->pixfmt_compat = FALSE; - break; - - case METEORGACTPIXFMT: - *(int *)arg = bktr->pixfmt; - break; - - case METEORGSUPPIXFMT : - pf_pub = (struct meteor_pixfmt *)arg; - pixfmt = pf_pub->index; - - if (( pixfmt < 0 ) || ( pixfmt >= PIXFMT_TABLE_SIZE )) - return( EINVAL ); - - memcpy( pf_pub, &pixfmt_table[ pixfmt ].public, - sizeof( *pf_pub ) ); - - /* Patch in our format index */ - pf_pub->index = pixfmt; - break; - -#if defined( STATUS_SUM ) - case BT848_GSTATUS: /* reap status */ - { - DECLARE_INTR_MASK(s); - DISABLE_INTR(s); - temp = status_sum; - status_sum = 0; - ENABLE_INTR(s); - *(u_int*)arg = temp; - break; - } -#endif /* STATUS_SUM */ - - default: - return( ENOTTY ); - } - - return( 0 ); -} - - - - -/****************************************************************************** - * bt848 RISC programming routines: - */ - - -/* - * - */ -#if defined(BT848_DEBUG) || defined(BT848_DUMP) -static int -dump_bt848( bktr_ptr_t bktr ) -{ - int r[60]={ - 4, 8, 0xc, 0x8c, 0x10, 0x90, 0x14, 0x94, - 0x18, 0x98, 0x1c, 0x9c, 0x20, 0xa0, 0x24, 0xa4, - 0x28, 0x2c, 0xac, 0x30, 0x34, 0x38, 0x3c, 0x40, - 0xc0, 0x48, 0x4c, 0xcc, 0x50, 0xd0, 0xd4, 0x60, - 0x64, 0x68, 0x6c, 0xec, 0xd8, 0xdc, 0xe0, 0xe4, - 0, 0, 0, 0 - }; - int i; - - for (i = 0; i < 40; i+=4) { - printf("%s: Reg:value : \t%x:%x \t%x:%x \t %x:%x \t %x:%x\n", - bktr_name(bktr), - r[i], INL(bktr, r[i]), - r[i+1], INL(bktr, r[i+1]), - r[i+2], INL(bktr, r[i+2]), - r[i+3], INL(bktr, r[i+3])); - } - - printf("%s: INT STAT %x \n", bktr_name(bktr), - INL(bktr, BKTR_INT_STAT)); - printf("%s: Reg INT_MASK %x \n", bktr_name(bktr), - INL(bktr, BKTR_INT_MASK)); - printf("%s: Reg GPIO_DMA_CTL %x \n", bktr_name(bktr), - INW(bktr, BKTR_GPIO_DMA_CTL)); - - return( 0 ); -} - -#endif - -/* - * build write instruction - */ -#define BKTR_FM1 0x6 /* packed data to follow */ -#define BKTR_FM3 0xe /* planar data to follow */ -#define BKTR_VRE 0x4 /* Marks the end of the even field */ -#define BKTR_VRO 0xC /* Marks the end of the odd field */ -#define BKTR_PXV 0x0 /* valid word (never used) */ -#define BKTR_EOL 0x1 /* last dword, 4 bytes */ -#define BKTR_SOL 0x2 /* first dword */ - -#define OP_WRITE (0x1 << 28) -#define OP_SKIP (0x2 << 28) -#define OP_WRITEC (0x5 << 28) -#define OP_JUMP (0x7 << 28) -#define OP_SYNC (0x8 << 28) -#define OP_WRITE123 (0x9 << 28) -#define OP_WRITES123 (0xb << 28) -#define OP_SOL (1 << 27) /* first instr for scanline */ -#define OP_EOL (1 << 26) - -#define BKTR_RESYNC (1 << 15) -#define BKTR_GEN_IRQ (1 << 24) - -/* - * The RISC status bits can be set/cleared in the RISC programs - * and tested in the Interrupt Handler - */ -#define BKTR_SET_RISC_STATUS_BIT0 (1 << 16) -#define BKTR_SET_RISC_STATUS_BIT1 (1 << 17) -#define BKTR_SET_RISC_STATUS_BIT2 (1 << 18) -#define BKTR_SET_RISC_STATUS_BIT3 (1 << 19) - -#define BKTR_CLEAR_RISC_STATUS_BIT0 (1 << 20) -#define BKTR_CLEAR_RISC_STATUS_BIT1 (1 << 21) -#define BKTR_CLEAR_RISC_STATUS_BIT2 (1 << 22) -#define BKTR_CLEAR_RISC_STATUS_BIT3 (1 << 23) - -#define BKTR_TEST_RISC_STATUS_BIT0 (1 << 28) -#define BKTR_TEST_RISC_STATUS_BIT1 (1 << 29) -#define BKTR_TEST_RISC_STATUS_BIT2 (1 << 30) -#define BKTR_TEST_RISC_STATUS_BIT3 (1U << 31) - -static bool_t notclipped (bktr_reg_t * bktr, int x, int width) { - int i; - bktr_clip_t * clip_node; - bktr->clip_start = -1; - bktr->last_y = 0; - bktr->y = 0; - bktr->y2 = width; - bktr->line_length = width; - bktr->yclip = -1; - bktr->yclip2 = -1; - bktr->current_col = 0; - - if (bktr->max_clip_node == 0 ) return TRUE; - clip_node = (bktr_clip_t *) &bktr->clip_list[0]; - - - for (i = 0; i < bktr->max_clip_node; i++ ) { - clip_node = (bktr_clip_t *) &bktr->clip_list[i]; - if (x >= clip_node->x_min && x <= clip_node->x_max ) { - bktr->clip_start = i; - return FALSE; - } - } - - return TRUE; -} - -static bool_t getline(bktr_reg_t *bktr, int x ) { - int i, j; - bktr_clip_t * clip_node ; - - if (bktr->line_length == 0 || - bktr->current_col >= bktr->line_length) return FALSE; - - bktr->y = min(bktr->last_y, bktr->line_length); - bktr->y2 = bktr->line_length; - - bktr->yclip = bktr->yclip2 = -1; - for (i = bktr->clip_start; i < bktr->max_clip_node; i++ ) { - clip_node = (bktr_clip_t *) &bktr->clip_list[i]; - if (x >= clip_node->x_min && x <= clip_node->x_max) { - if (bktr->last_y <= clip_node->y_min) { - bktr->y = min(bktr->last_y, bktr->line_length); - bktr->y2 = min(clip_node->y_min, bktr->line_length); - bktr->yclip = min(clip_node->y_min, bktr->line_length); - bktr->yclip2 = min(clip_node->y_max, bktr->line_length); - bktr->last_y = bktr->yclip2; - bktr->clip_start = i; - - for (j = i+1; j < bktr->max_clip_node; j++ ) { - clip_node = (bktr_clip_t *) &bktr->clip_list[j]; - if (x >= clip_node->x_min && x <= clip_node->x_max) { - if (bktr->last_y >= clip_node->y_min) { - bktr->yclip2 = min(clip_node->y_max, bktr->line_length); - bktr->last_y = bktr->yclip2; - bktr->clip_start = j; - } - } else break ; - } - return TRUE; - } - } - } - - if (bktr->current_col <= bktr->line_length) { - bktr->current_col = bktr->line_length; - return TRUE; - } - return FALSE; -} - -static bool_t split(bktr_reg_t * bktr, volatile uint32_t **dma_prog, int width , - u_long operation, int pixel_width, - volatile u_char ** target_buffer, int cols ) { - - u_long flag, flag2; - struct meteor_pixfmt *pf = &pixfmt_table[ bktr->pixfmt ].public; - u_int skip, start_skip; - - /* For RGB24, we need to align the component in FIFO Byte Lane 0 */ - /* to the 1st byte in the mem dword containing our start addr. */ - /* BTW, we know this pixfmt's 1st byte is Blue; thus the start addr */ - /* must be Blue. */ - start_skip = 0; - if (( pf->type == METEOR_PIXTYPE_RGB ) && ( pf->Bpp == 3 )) - switch ( ((uintptr_t) (volatile void *) *target_buffer) % 4 ) { - case 2 : start_skip = 4 ; break; - case 1 : start_skip = 8 ; break; - } - - if ((width * pixel_width) < DMA_BT848_SPLIT ) { - if ( width == cols) { - flag = OP_SOL | OP_EOL; - } else if (bktr->current_col == 0 ) { - flag = OP_SOL; - } else if (bktr->current_col == cols) { - flag = OP_EOL; - } else flag = 0; - - skip = 0; - if (( flag & OP_SOL ) && ( start_skip > 0 )) { - *(*dma_prog)++ = OP_SKIP | OP_SOL | start_skip; - flag &= ~OP_SOL; - skip = start_skip; - } - - *(*dma_prog)++ = operation | flag | (width * pixel_width - skip); - if (operation != OP_SKIP ) - *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer; - - *target_buffer += width * pixel_width; - bktr->current_col += width; - - } else { - - if (bktr->current_col == 0 && width == cols) { - flag = OP_SOL ; - flag2 = OP_EOL; - } else if (bktr->current_col == 0 ) { - flag = OP_SOL; - flag2 = 0; - } else if (bktr->current_col >= cols) { - flag = 0; - flag2 = OP_EOL; - } else { - flag = 0; - flag2 = 0; - } - - skip = 0; - if (( flag & OP_SOL ) && ( start_skip > 0 )) { - *(*dma_prog)++ = OP_SKIP | OP_SOL | start_skip; - flag &= ~OP_SOL; - skip = start_skip; - } - - *(*dma_prog)++ = operation | flag | - (width * pixel_width / 2 - skip); - if (operation != OP_SKIP ) - *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer ; - *target_buffer += (width * pixel_width / 2) ; - - if ( operation == OP_WRITE ) - operation = OP_WRITEC; - *(*dma_prog)++ = operation | flag2 | - (width * pixel_width / 2); - *target_buffer += (width * pixel_width / 2) ; - bktr->current_col += width; - - } - return TRUE; -} - - -/* - * Generate the RISC instructions to capture both VBI and video images - */ -static void -rgb_vbi_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace ) -{ - int i; - volatile uint32_t target_buffer, buffer, target,width; - volatile uint32_t pitch; - volatile uint32_t *dma_prog; /* DMA prog is an array of - 32 bit RISC instructions */ - volatile uint32_t *loop_point; - struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ]; - u_int Bpp = pf_int->public.Bpp; - unsigned int vbisamples; /* VBI samples per line */ - unsigned int vbilines; /* VBI lines per field */ - unsigned int num_dwords; /* DWORDS per line */ - - vbisamples = format_params[bktr->format_params].vbi_num_samples; - vbilines = format_params[bktr->format_params].vbi_num_lines; - num_dwords = vbisamples/4; - - OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt); - OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - OUTB(bktr, BKTR_VBI_PACK_SIZE, ((num_dwords)) & 0xff); - OUTB(bktr, BKTR_VBI_PACK_DEL, ((num_dwords)>> 8) & 0x01); /* no hdelay */ - /* no ext frame */ - - OUTB(bktr, BKTR_OFORM, 0x00); - - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) | 0x40); /* set chroma comb */ - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) | 0x40); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x80); /* clear Ycomb */ - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) & ~0x80); - - /* disable gamma correction removal */ - OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) | BT848_COLOR_CTL_GAMMA); - - if (cols > 385 ) { - OUTB(bktr, BKTR_E_VTC, 0); - OUTB(bktr, BKTR_O_VTC, 0); - } else { - OUTB(bktr, BKTR_E_VTC, 1); - OUTB(bktr, BKTR_O_VTC, 1); - } - bktr->capcontrol = 3 << 2 | 3; - - dma_prog = (uint32_t *) bktr->dma_prog; - - /* Construct Write */ - - if (bktr->video.addr) { - target_buffer = (u_long) bktr->video.addr; - pitch = bktr->video.width; - } - else { - target_buffer = (u_long) vtophys(bktr->bigbuf); - pitch = cols*Bpp; - } - - buffer = target_buffer; - - /* Wait for the VRE sync marking the end of the Even and - * the start of the Odd field. Resync here. - */ - *dma_prog++ = OP_SYNC | BKTR_RESYNC |BKTR_VRE; - *dma_prog++ = 0; - - loop_point = dma_prog; - - /* store the VBI data */ - /* look for sync with packed data */ - *dma_prog++ = OP_SYNC | BKTR_FM1; - *dma_prog++ = 0; - for(i = 0; i < vbilines; i++) { - *dma_prog++ = OP_WRITE | OP_SOL | OP_EOL | vbisamples; - *dma_prog++ = (u_long) vtophys((caddr_t)bktr->vbidata + - (i * VBI_LINE_SIZE)); - } - - if ( (i_flag == 2/*Odd*/) || (i_flag==3) /*interlaced*/ ) { - /* store the Odd field video image */ - /* look for sync with packed data */ - *dma_prog++ = OP_SYNC | BKTR_FM1; - *dma_prog++ = 0; /* NULL WORD */ - width = cols; - for (i = 0; i < (rows/interlace); i++) { - target = target_buffer; - if ( notclipped(bktr, i, width)) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - - } else { - while(getline(bktr, i)) { - if (bktr->y != bktr->y2 ) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } - if (bktr->yclip != bktr->yclip2 ) { - split(bktr,(volatile uint32_t **) &dma_prog, - bktr->yclip2 - bktr->yclip, - OP_SKIP, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } - } - - } - - target_buffer += interlace * pitch; - - } - - } /* end if */ - - /* Grab the Even field */ - /* Look for the VRO, end of Odd field, marker */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - - /* store the VBI data */ - /* look for sync with packed data */ - *dma_prog++ = OP_SYNC | BKTR_FM1; - *dma_prog++ = 0; - for(i = 0; i < vbilines; i++) { - *dma_prog++ = OP_WRITE | OP_SOL | OP_EOL | vbisamples; - *dma_prog++ = (u_long) vtophys((caddr_t)bktr->vbidata + - ((i+MAX_VBI_LINES) * VBI_LINE_SIZE)); - } - - /* store the video image */ - if (i_flag == 1) /*Even Only*/ - target_buffer = buffer; - if (i_flag == 3) /*interlaced*/ - target_buffer = buffer+pitch; - - - if ((i_flag == 1) /*Even Only*/ || (i_flag==3) /*interlaced*/) { - /* look for sync with packed data */ - *dma_prog++ = OP_SYNC | BKTR_FM1; - *dma_prog++ = 0; /* NULL WORD */ - width = cols; - for (i = 0; i < (rows/interlace); i++) { - target = target_buffer; - if ( notclipped(bktr, i, width)) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } else { - while(getline(bktr, i)) { - if (bktr->y != bktr->y2 ) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, - cols); - } - if (bktr->yclip != bktr->yclip2 ) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->yclip2 - bktr->yclip, OP_SKIP, - Bpp, (volatile u_char **)(uintptr_t) &target, cols); - } - - } - - } - - target_buffer += interlace * pitch; - - } - } - - /* Look for end of 'Even Field' */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP ; - *dma_prog++ = (u_long ) vtophys(loop_point) ; - *dma_prog++ = 0; /* NULL WORD */ - -} - - - - -static void -rgb_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace ) -{ - int i; - volatile uint32_t target_buffer, buffer, target,width; - volatile uint32_t pitch; - volatile uint32_t *dma_prog; - struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ]; - u_int Bpp = pf_int->public.Bpp; - - OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt); - OUTB(bktr, BKTR_VBI_PACK_SIZE, 0); - OUTB(bktr, BKTR_VBI_PACK_DEL, 0); - OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - - OUTB(bktr, BKTR_OFORM, 0x00); - - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) | 0x40); /* set chroma comb */ - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) | 0x40); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x80); /* clear Ycomb */ - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) & ~0x80); - - /* disable gamma correction removal */ - OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) | BT848_COLOR_CTL_GAMMA); - - if (cols > 385 ) { - OUTB(bktr, BKTR_E_VTC, 0); - OUTB(bktr, BKTR_O_VTC, 0); - } else { - OUTB(bktr, BKTR_E_VTC, 1); - OUTB(bktr, BKTR_O_VTC, 1); - } - bktr->capcontrol = 3 << 2 | 3; - - dma_prog = (uint32_t *) bktr->dma_prog; - - /* Construct Write */ - - if (bktr->video.addr) { - target_buffer = (uint32_t) bktr->video.addr; - pitch = bktr->video.width; - } - else { - target_buffer = (uint32_t) vtophys(bktr->bigbuf); - pitch = cols*Bpp; - } - - buffer = target_buffer; - - /* contruct sync : for video packet format */ - *dma_prog++ = OP_SYNC | BKTR_RESYNC | BKTR_FM1; - - /* sync, mode indicator packed data */ - *dma_prog++ = 0; /* NULL WORD */ - width = cols; - for (i = 0; i < (rows/interlace); i++) { - target = target_buffer; - if ( notclipped(bktr, i, width)) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - - } else { - while(getline(bktr, i)) { - if (bktr->y != bktr->y2 ) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } - if (bktr->yclip != bktr->yclip2 ) { - split(bktr,(volatile uint32_t **) &dma_prog, - bktr->yclip2 - bktr->yclip, - OP_SKIP, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } - } - - } - - target_buffer += interlace * pitch; - - } - - switch (i_flag) { - case 1: - /* sync vre */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t ) vtophys(bktr->dma_prog); - return; - - case 2: - /* sync vro */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t ) vtophys(bktr->dma_prog); - return; - - case 3: - /* sync vro */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP; - *dma_prog = (uint32_t ) vtophys(bktr->odd_dma_prog); - break; - } - - if (interlace == 2) { - - target_buffer = buffer + pitch; - - dma_prog = (uint32_t *) bktr->odd_dma_prog; - - /* sync vre IRQ bit */ - *dma_prog++ = OP_SYNC | BKTR_RESYNC | BKTR_FM1; - *dma_prog++ = 0; /* NULL WORD */ - width = cols; - for (i = 0; i < (rows/interlace); i++) { - target = target_buffer; - if ( notclipped(bktr, i, width)) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } else { - while(getline(bktr, i)) { - if (bktr->y != bktr->y2 ) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->y2 - bktr->y, OP_WRITE, - Bpp, (volatile u_char **)(uintptr_t)&target, - cols); - } - if (bktr->yclip != bktr->yclip2 ) { - split(bktr, (volatile uint32_t **) &dma_prog, - bktr->yclip2 - bktr->yclip, OP_SKIP, - Bpp, (volatile u_char **)(uintptr_t)&target, cols); - } - - } - - } - - target_buffer += interlace * pitch; - - } - } - - /* sync vre IRQ bit */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP ; - *dma_prog++ = (uint32_t ) vtophys(bktr->dma_prog) ; - *dma_prog++ = 0; /* NULL WORD */ -} - - -/* - * - */ -static void -yuvpack_prog( bktr_ptr_t bktr, char i_flag, - int cols, int rows, int interlace ) -{ - int i; - volatile unsigned int inst; - volatile unsigned int inst3; - volatile uint32_t target_buffer, buffer; - volatile uint32_t *dma_prog; - struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ]; - int b; - - OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt); - - OUTB(bktr, BKTR_E_SCLOOP, INB(bktr, BKTR_E_SCLOOP) | BT848_E_SCLOOP_CAGC); /* enable chroma comb */ - OUTB(bktr, BKTR_O_SCLOOP, INB(bktr, BKTR_O_SCLOOP) | BT848_O_SCLOOP_CAGC); - - OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) | BT848_COLOR_CTL_RGB_DED | BT848_COLOR_CTL_GAMMA); - OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - - bktr->capcontrol = 3 << 2 | 3; - - dma_prog = (uint32_t *) bktr->dma_prog; - - /* Construct Write */ - - /* write , sol, eol */ - inst = OP_WRITE | OP_SOL | (cols); - /* write , sol, eol */ - inst3 = OP_WRITE | OP_EOL | (cols); - - if (bktr->video.addr) - target_buffer = (uint32_t) bktr->video.addr; - else - target_buffer = (uint32_t) vtophys(bktr->bigbuf); - - buffer = target_buffer; - - /* contruct sync : for video packet format */ - /* sync, mode indicator packed data */ - *dma_prog++ = OP_SYNC | BKTR_RESYNC | BKTR_FM1; - *dma_prog++ = 0; /* NULL WORD */ - - b = cols; - - for (i = 0; i < (rows/interlace); i++) { - *dma_prog++ = inst; - *dma_prog++ = target_buffer; - *dma_prog++ = inst3; - *dma_prog++ = target_buffer + b; - target_buffer += interlace*(cols * 2); - } - - switch (i_flag) { - case 1: - /* sync vre */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - return; - - case 2: - /* sync vro */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - return; - - case 3: - /* sync vro */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP ; - *dma_prog = (uint32_t) vtophys(bktr->odd_dma_prog); - break; - } - - if (interlace == 2) { - - target_buffer = (uint32_t) buffer + cols*2; - - dma_prog = (uint32_t *) bktr->odd_dma_prog; - - /* sync vre */ - *dma_prog++ = OP_SYNC | BKTR_RESYNC | BKTR_FM1; - *dma_prog++ = 0; /* NULL WORD */ - - for (i = 0; i < (rows/interlace) ; i++) { - *dma_prog++ = inst; - *dma_prog++ = target_buffer; - *dma_prog++ = inst3; - *dma_prog++ = target_buffer + b; - target_buffer += interlace * ( cols*2); - } - } - - /* sync vro IRQ bit */ - *dma_prog++ = OP_SYNC | BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP ; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - *dma_prog++ = 0; /* NULL WORD */ -} - - -/* - * - */ -static void -yuv422_prog( bktr_ptr_t bktr, char i_flag, - int cols, int rows, int interlace ){ - - int i; - volatile unsigned int inst; - volatile uint32_t target_buffer, t1, buffer; - volatile uint32_t *dma_prog; - struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ]; - - OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt); - - dma_prog = (uint32_t*) bktr->dma_prog; - - bktr->capcontrol = 1 << 6 | 1 << 4 | 3; - - OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - OUTB(bktr, BKTR_OFORM, 0x00); - - OUTB(bktr, BKTR_E_CONTROL, INB(bktr, BKTR_E_CONTROL) | BT848_E_CONTROL_LDEC); /* disable luma decimation */ - OUTB(bktr, BKTR_O_CONTROL, INB(bktr, BKTR_O_CONTROL) | BT848_O_CONTROL_LDEC); - - OUTB(bktr, BKTR_E_SCLOOP, INB(bktr, BKTR_E_SCLOOP) | BT848_E_SCLOOP_CAGC); /* chroma agc enable */ - OUTB(bktr, BKTR_O_SCLOOP, INB(bktr, BKTR_O_SCLOOP) | BT848_O_SCLOOP_CAGC); - - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x80); /* clear Ycomb */ - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) & ~0x80); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) | 0x40); /* set chroma comb */ - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) | 0x40); - - /* disable gamma correction removal */ - OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) | BT848_COLOR_CTL_GAMMA); - - /* Construct Write */ - inst = OP_WRITE123 | OP_SOL | OP_EOL | (cols); - if (bktr->video.addr) - target_buffer = (uint32_t) bktr->video.addr; - else - target_buffer = (uint32_t) vtophys(bktr->bigbuf); - - buffer = target_buffer; - - t1 = buffer; - - /* contruct sync : for video packet format */ - *dma_prog++ = OP_SYNC | 1 << 15 | BKTR_FM3; /*sync, mode indicator packed data*/ - *dma_prog++ = 0; /* NULL WORD */ - - for (i = 0; i < (rows/interlace ) ; i++) { - *dma_prog++ = inst; - *dma_prog++ = cols/2 | cols/2 << 16; - *dma_prog++ = target_buffer; - *dma_prog++ = t1 + (cols*rows) + i*cols/2 * interlace; - *dma_prog++ = t1 + (cols*rows) + (cols*rows/2) + i*cols/2 * interlace; - target_buffer += interlace*cols; - } - - switch (i_flag) { - case 1: - *dma_prog++ = OP_SYNC | 1 << 24 | BKTR_VRE; /*sync vre*/ - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP ; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - return; - - case 2: - *dma_prog++ = OP_SYNC | 1 << 24 | BKTR_VRO; /*sync vre*/ - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - return; - - case 3: - *dma_prog++ = OP_SYNC | 1 << 24 | 1 << 15 | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP ; - *dma_prog = (uint32_t) vtophys(bktr->odd_dma_prog); - break; - } - - if (interlace == 2) { - - dma_prog = (uint32_t *) bktr->odd_dma_prog; - - target_buffer = (uint32_t) buffer + cols; - t1 = buffer + cols/2; - *dma_prog++ = OP_SYNC | 1 << 15 | BKTR_FM3; - *dma_prog++ = 0; /* NULL WORD */ - - for (i = 0; i < (rows/interlace ) ; i++) { - *dma_prog++ = inst; - *dma_prog++ = cols/2 | cols/2 << 16; - *dma_prog++ = target_buffer; - *dma_prog++ = t1 + (cols*rows) + i*cols/2 * interlace; - *dma_prog++ = t1 + (cols*rows) + (cols*rows/2) + i*cols/2 * interlace; - target_buffer += interlace*cols; - } - } - - *dma_prog++ = OP_SYNC | 1 << 24 | 1 << 15 | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP ; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog) ; - *dma_prog++ = 0; /* NULL WORD */ -} - - -/* - * - */ -static void -yuv12_prog( bktr_ptr_t bktr, char i_flag, - int cols, int rows, int interlace ){ - - int i; - volatile unsigned int inst; - volatile unsigned int inst1; - volatile uint32_t target_buffer, t1, buffer; - volatile uint32_t *dma_prog; - struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ]; - - OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt); - - dma_prog = (uint32_t *) bktr->dma_prog; - - bktr->capcontrol = 1 << 6 | 1 << 4 | 3; - - OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - OUTB(bktr, BKTR_OFORM, 0x0); - - /* Construct Write */ - inst = OP_WRITE123 | OP_SOL | OP_EOL | (cols); - inst1 = OP_WRITES123 | OP_SOL | OP_EOL | (cols); - if (bktr->video.addr) - target_buffer = (uint32_t) bktr->video.addr; - else - target_buffer = (uint32_t) vtophys(bktr->bigbuf); - - buffer = target_buffer; - t1 = buffer; - - *dma_prog++ = OP_SYNC | 1 << 15 | BKTR_FM3; /*sync, mode indicator packed data*/ - *dma_prog++ = 0; /* NULL WORD */ - - for (i = 0; i < (rows/interlace )/2 ; i++) { - *dma_prog++ = inst; - *dma_prog++ = cols/2 | (cols/2 << 16); - *dma_prog++ = target_buffer; - *dma_prog++ = t1 + (cols*rows) + i*cols/2 * interlace; - *dma_prog++ = t1 + (cols*rows) + (cols*rows/4) + i*cols/2 * interlace; - target_buffer += interlace*cols; - *dma_prog++ = inst1; - *dma_prog++ = cols/2 | (cols/2 << 16); - *dma_prog++ = target_buffer; - target_buffer += interlace*cols; - - } - - switch (i_flag) { - case 1: - *dma_prog++ = OP_SYNC | 1 << 24 | BKTR_VRE; /*sync vre*/ - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - return; - - case 2: - *dma_prog++ = OP_SYNC | 1 << 24 | BKTR_VRO; /*sync vro*/ - *dma_prog++ = 0; /* NULL WORD */ - - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - return; - - case 3: - *dma_prog++ = OP_SYNC | 1 << 24 | 1 << 15 | BKTR_VRO; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP ; - *dma_prog = (uint32_t) vtophys(bktr->odd_dma_prog); - break; - } - - if (interlace == 2) { - - dma_prog = (uint32_t *) bktr->odd_dma_prog; - - target_buffer = (uint32_t) buffer + cols; - t1 = buffer + cols/2; - *dma_prog++ = OP_SYNC | 1 << 15 | BKTR_FM3; - *dma_prog++ = 0; /* NULL WORD */ - - for (i = 0; i < ((rows/interlace )/2 ) ; i++) { - *dma_prog++ = inst; - *dma_prog++ = cols/2 | (cols/2 << 16); - *dma_prog++ = target_buffer; - *dma_prog++ = t1 + (cols*rows) + i*cols/2 * interlace; - *dma_prog++ = t1 + (cols*rows) + (cols*rows/4) + i*cols/2 * interlace; - target_buffer += interlace*cols; - *dma_prog++ = inst1; - *dma_prog++ = cols/2 | (cols/2 << 16); - *dma_prog++ = target_buffer; - target_buffer += interlace*cols; - - } - - - } - - *dma_prog++ = OP_SYNC | 1 << 24 | 1 << 15 | BKTR_VRE; - *dma_prog++ = 0; /* NULL WORD */ - *dma_prog++ = OP_JUMP; - *dma_prog++ = (uint32_t) vtophys(bktr->dma_prog); - *dma_prog++ = 0; /* NULL WORD */ -} - - - -/* - * - */ -static void -build_dma_prog( bktr_ptr_t bktr, char i_flag ) -{ - int rows, cols, interlace; - int tmp_int; - unsigned int temp; - struct format_params *fp; - struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ]; - - - fp = &format_params[bktr->format_params]; - - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - - /* disable FIFO & RISC, leave other bits alone */ - OUTW(bktr, BKTR_GPIO_DMA_CTL, INW(bktr, BKTR_GPIO_DMA_CTL) & ~FIFO_RISC_ENABLED); - - /* set video parameters */ - if (bktr->capture_area_enabled) - temp = ((quad_t ) fp->htotal* (quad_t) bktr->capture_area_x_size * 4096 - / fp->scaled_htotal / bktr->cols) - 4096; - else - temp = ((quad_t ) fp->htotal* (quad_t) fp->scaled_hactive * 4096 - / fp->scaled_htotal / bktr->cols) - 4096; - - /* printf("%s: HSCALE value is %d\n", bktr_name(bktr), temp); */ - OUTB(bktr, BKTR_E_HSCALE_LO, temp & 0xff); - OUTB(bktr, BKTR_O_HSCALE_LO, temp & 0xff); - OUTB(bktr, BKTR_E_HSCALE_HI, (temp >> 8) & 0xff); - OUTB(bktr, BKTR_O_HSCALE_HI, (temp >> 8) & 0xff); - - /* horizontal active */ - temp = bktr->cols; - /* printf("%s: HACTIVE value is %d\n", bktr_name(bktr), temp); */ - OUTB(bktr, BKTR_E_HACTIVE_LO, temp & 0xff); - OUTB(bktr, BKTR_O_HACTIVE_LO, temp & 0xff); - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0x3); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) & ~0x3); - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) | ((temp >> 8) & 0x3)); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) | ((temp >> 8) & 0x3)); - - /* horizontal delay */ - if (bktr->capture_area_enabled) - temp = ( (fp->hdelay* fp->scaled_hactive + bktr->capture_area_x_offset* fp->scaled_htotal) - * bktr->cols) / (bktr->capture_area_x_size * fp->hactive); - else - temp = (fp->hdelay * bktr->cols) / fp->hactive; - - temp = temp & 0x3fe; - - /* printf("%s: HDELAY value is %d\n", bktr_name(bktr), temp); */ - OUTB(bktr, BKTR_E_DELAY_LO, temp & 0xff); - OUTB(bktr, BKTR_O_DELAY_LO, temp & 0xff); - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0xc); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) & ~0xc); - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) | ((temp >> 6) & 0xc)); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) | ((temp >> 6) & 0xc)); - - /* vertical scale */ - - if (bktr->capture_area_enabled) { - if (bktr->flags & METEOR_ONLY_ODD_FIELDS || - bktr->flags & METEOR_ONLY_EVEN_FIELDS) - tmp_int = 65536 - - (((bktr->capture_area_y_size * 256 + (bktr->rows/2)) / bktr->rows) - 512); - else { - tmp_int = 65536 - - (((bktr->capture_area_y_size * 512 + (bktr->rows / 2)) / bktr->rows) - 512); - } - } else { - if (bktr->flags & METEOR_ONLY_ODD_FIELDS || - bktr->flags & METEOR_ONLY_EVEN_FIELDS) - tmp_int = 65536 - - (((fp->vactive * 256 + (bktr->rows/2)) / bktr->rows) - 512); - else { - tmp_int = 65536 - - (((fp->vactive * 512 + (bktr->rows / 2)) / bktr->rows) - 512); - } - } - - tmp_int &= 0x1fff; - /* printf("%s: VSCALE value is %d\n", bktr_name(bktr), tmp_int); */ - OUTB(bktr, BKTR_E_VSCALE_LO, tmp_int & 0xff); - OUTB(bktr, BKTR_O_VSCALE_LO, tmp_int & 0xff); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x1f); - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) & ~0x1f); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) | ((tmp_int >> 8) & 0x1f)); - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) | ((tmp_int >> 8) & 0x1f)); - - - /* vertical active */ - if (bktr->capture_area_enabled) - temp = bktr->capture_area_y_size; - else - temp = fp->vactive; - /* printf("%s: VACTIVE is %d\n", bktr_name(bktr), temp); */ - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0x30); - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) | ((temp >> 4) & 0x30)); - OUTB(bktr, BKTR_E_VACTIVE_LO, temp & 0xff); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) & ~0x30); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) | ((temp >> 4) & 0x30)); - OUTB(bktr, BKTR_O_VACTIVE_LO, temp & 0xff); - - /* vertical delay */ - if (bktr->capture_area_enabled) - temp = fp->vdelay + (bktr->capture_area_y_offset); - else - temp = fp->vdelay; - /* printf("%s: VDELAY is %d\n", bktr_name(bktr), temp); */ - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0xC0); - OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) | ((temp >> 2) & 0xC0)); - OUTB(bktr, BKTR_E_VDELAY_LO, temp & 0xff); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) & ~0xC0); - OUTB(bktr, BKTR_O_CROP, INB(bktr, BKTR_O_CROP) | ((temp >> 2) & 0xC0)); - OUTB(bktr, BKTR_O_VDELAY_LO, temp & 0xff); - - /* end of video params */ - - if ((bktr->xtal_pll_mode == BT848_USE_PLL) - && (fp->iform_xtsel==BT848_IFORM_X_XT1)) { - OUTB(bktr, BKTR_TGCTRL, BT848_TGCTRL_TGCKI_PLL); /* Select PLL mode */ - } else { - OUTB(bktr, BKTR_TGCTRL, BT848_TGCTRL_TGCKI_XTAL); /* Select Normal xtal 0/xtal 1 mode */ - } - - /* capture control */ - switch (i_flag) { - case 1: - bktr->bktr_cap_ctl = - (BT848_CAP_CTL_DITH_FRAME | BT848_CAP_CTL_EVEN); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x20); - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) & ~0x20); - interlace = 1; - break; - case 2: - bktr->bktr_cap_ctl = - (BT848_CAP_CTL_DITH_FRAME | BT848_CAP_CTL_ODD); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x20); - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) & ~0x20); - interlace = 1; - break; - default: - bktr->bktr_cap_ctl = - (BT848_CAP_CTL_DITH_FRAME | - BT848_CAP_CTL_EVEN | BT848_CAP_CTL_ODD); - OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) | 0x20); - OUTB(bktr, BKTR_O_VSCALE_HI, INB(bktr, BKTR_O_VSCALE_HI) | 0x20); - interlace = 2; - break; - } - - OUTL(bktr, BKTR_RISC_STRT_ADD, vtophys(bktr->dma_prog)); - - rows = bktr->rows; - cols = bktr->cols; - - bktr->vbiflags &= ~VBI_CAPTURE; /* default - no vbi capture */ - - /* RGB Grabs. If /dev/vbi is already open, or we are a PAL/SECAM */ - /* user, then use the rgb_vbi RISC program. */ - /* Otherwise, use the normal rgb RISC program */ - if (pf_int->public.type == METEOR_PIXTYPE_RGB) { - if ( (bktr->vbiflags & VBI_OPEN) - ||(bktr->format_params == BT848_IFORM_F_PALBDGHI) - ||(bktr->format_params == BT848_IFORM_F_SECAM) - ){ - bktr->bktr_cap_ctl |= - BT848_CAP_CTL_VBI_EVEN | BT848_CAP_CTL_VBI_ODD; - bktr->vbiflags |= VBI_CAPTURE; - rgb_vbi_prog(bktr, i_flag, cols, rows, interlace); - return; - } else { - rgb_prog(bktr, i_flag, cols, rows, interlace); - return; - } - } - - if ( pf_int->public.type == METEOR_PIXTYPE_YUV ) { - yuv422_prog(bktr, i_flag, cols, rows, interlace); - OUTB(bktr, BKTR_COLOR_CTL, (INB(bktr, BKTR_COLOR_CTL) & 0xf0) - | pixfmt_swap_flags( bktr->pixfmt )); - return; - } - - if ( pf_int->public.type == METEOR_PIXTYPE_YUV_PACKED ) { - yuvpack_prog(bktr, i_flag, cols, rows, interlace); - OUTB(bktr, BKTR_COLOR_CTL, (INB(bktr, BKTR_COLOR_CTL) & 0xf0) - | pixfmt_swap_flags( bktr->pixfmt )); - return; - } - - if ( pf_int->public.type == METEOR_PIXTYPE_YUV_12 ) { - yuv12_prog(bktr, i_flag, cols, rows, interlace); - OUTB(bktr, BKTR_COLOR_CTL, (INB(bktr, BKTR_COLOR_CTL) & 0xf0) - | pixfmt_swap_flags( bktr->pixfmt )); - return; - } - return; -} - - -/****************************************************************************** - * video & video capture specific routines: - */ - - -/* - * - */ -static void -start_capture( bktr_ptr_t bktr, unsigned type ) -{ - u_char i_flag; - struct format_params *fp; - - fp = &format_params[bktr->format_params]; - - /* If requested, clear out capture buf first */ - if (bktr->clr_on_start && (bktr->video.addr == 0)) { - bzero((caddr_t)bktr->bigbuf, - (size_t)bktr->rows * bktr->cols * bktr->frames * - pixfmt_table[ bktr->pixfmt ].public.Bpp); - } - - OUTB(bktr, BKTR_DSTATUS, 0); - OUTL(bktr, BKTR_INT_STAT, INL(bktr, BKTR_INT_STAT)); - - bktr->flags |= type; - bktr->flags &= ~METEOR_WANT_MASK; - switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { - case METEOR_ONLY_EVEN_FIELDS: - bktr->flags |= METEOR_WANT_EVEN; - i_flag = 1; - break; - case METEOR_ONLY_ODD_FIELDS: - bktr->flags |= METEOR_WANT_ODD; - i_flag = 2; - break; - default: - bktr->flags |= METEOR_WANT_MASK; - i_flag = 3; - break; - } - - /* TDEC is only valid for continuous captures */ - if ( type == METEOR_SINGLE ) { - u_short fps_save = bktr->fps; - - set_fps(bktr, fp->frame_rate); - bktr->fps = fps_save; - } - else - set_fps(bktr, bktr->fps); - - if (bktr->dma_prog_loaded == FALSE) { - build_dma_prog(bktr, i_flag); - bktr->dma_prog_loaded = TRUE; - } - - - OUTL(bktr, BKTR_RISC_STRT_ADD, vtophys(bktr->dma_prog)); - -} - - -/* - * Set the temporal decimation register to get the desired frame rate. - * We use the 'skip frame' modus always and always start dropping on an - * odd field. - */ -static void -set_fps( bktr_ptr_t bktr, u_short fps ) -{ - struct format_params *fp; - - fp = &format_params[bktr->format_params]; - - switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { - case METEOR_ONLY_EVEN_FIELDS: - bktr->flags |= METEOR_WANT_EVEN; - break; - case METEOR_ONLY_ODD_FIELDS: - bktr->flags |= METEOR_WANT_ODD; - break; - default: - bktr->flags |= METEOR_WANT_MASK; - break; - } - - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - OUTL(bktr, BKTR_INT_STAT, ALL_INTS_CLEARED); - - bktr->fps = fps; - OUTB(bktr, BKTR_TDEC, 0); - - if (fps < fp->frame_rate) - OUTB(bktr, BKTR_TDEC, (fp->frame_rate - fps) & 0x3f); - else - OUTB(bktr, BKTR_TDEC, 0); - return; - -} - - - - - -/* - * Given a pixfmt index, compute the bt848 swap_flags necessary to - * achieve the specified swapping. - * Note that without bt swapping, 2Bpp and 3Bpp modes are written - * byte-swapped, and 4Bpp modes are byte and word swapped (see Table 6 - * and read R->L). - * Note also that for 3Bpp, we may additionally need to do some creative - * SKIPing to align the FIFO bytelines with the target buffer (see split()). - * This is abstracted here: e.g. no swaps = RGBA; byte & short swap = ABGR - * as one would expect. - */ - -static u_int pixfmt_swap_flags( int pixfmt ) -{ - struct meteor_pixfmt *pf = &pixfmt_table[ pixfmt ].public; - u_int swapf = 0; - - switch ( pf->Bpp ) { - case 2 : swapf = ( pf->swap_bytes ? 0 : BSWAP ); - break; - - case 3 : /* no swaps supported for 3bpp - makes no sense w/ bt848 */ - break; - - case 4 : if ( pf->swap_bytes ) - swapf = pf->swap_shorts ? 0 : WSWAP; - else - swapf = pf->swap_shorts ? BSWAP : (BSWAP | WSWAP); - break; - } - return swapf; -} - - - -/* - * Converts meteor-defined pixel formats (e.g. METEOR_GEO_RGB16) into - * our pixfmt_table indices. - */ - -static int oformat_meteor_to_bt( u_long format ) -{ - int i; - struct meteor_pixfmt *pf1, *pf2; - - /* Find format in compatibility table */ - for ( i = 0; i < METEOR_PIXFMT_TABLE_SIZE; i++ ) - if ( meteor_pixfmt_table[i].meteor_format == format ) - break; - - if ( i >= METEOR_PIXFMT_TABLE_SIZE ) - return -1; - pf1 = &meteor_pixfmt_table[i].public; - - /* Match it with an entry in master pixel format table */ - for ( i = 0; i < PIXFMT_TABLE_SIZE; i++ ) { - pf2 = &pixfmt_table[i].public; - - if (( pf1->type == pf2->type ) && - ( pf1->Bpp == pf2->Bpp ) && - !bcmp( pf1->masks, pf2->masks, sizeof( pf1->masks )) && - ( pf1->swap_bytes == pf2->swap_bytes ) && - ( pf1->swap_shorts == pf2->swap_shorts )) - break; - } - if ( i >= PIXFMT_TABLE_SIZE ) - return -1; - - return i; -} - -/****************************************************************************** - * i2c primitives: - */ - -/* */ -#define I2CBITTIME (0x5<<4) /* 5 * 0.48uS */ -#define I2CBITTIME_878 (1 << 7) -#define I2C_READ 0x01 -#define I2C_COMMAND (I2CBITTIME | \ - BT848_DATA_CTL_I2CSCL | \ - BT848_DATA_CTL_I2CSDA) - -#define I2C_COMMAND_878 (I2CBITTIME_878 | \ - BT848_DATA_CTL_I2CSCL | \ - BT848_DATA_CTL_I2CSDA) - -/* Select between old i2c code and new iicbus / smbus code */ -#if defined(BKTR_USE_FREEBSD_SMBUS) - -/* - * The hardware interface is actually SMB commands - */ -int -i2cWrite( bktr_ptr_t bktr, int addr, int byte1, int byte2 ) -{ - char cmd; - - if (bktr->id == BROOKTREE_848 || - bktr->id == BROOKTREE_848A || - bktr->id == BROOKTREE_849A) - cmd = I2C_COMMAND; - else - cmd = I2C_COMMAND_878; - - if (byte2 != -1) { - if (smbus_writew(bktr->i2c_sc.smbus, addr, cmd, - (short)(((byte2 & 0xff) << 8) | (byte1 & 0xff)))) - return (-1); - } else { - if (smbus_writeb(bktr->i2c_sc.smbus, addr, cmd, - (char)(byte1 & 0xff))) - return (-1); - } - - /* return OK */ - return( 0 ); -} - -int -i2cRead( bktr_ptr_t bktr, int addr ) -{ - char result; - char cmd; - - if (bktr->id == BROOKTREE_848 || - bktr->id == BROOKTREE_848A || - bktr->id == BROOKTREE_849A) - cmd = I2C_COMMAND; - else - cmd = I2C_COMMAND_878; - - if (smbus_readb(bktr->i2c_sc.smbus, addr, cmd, &result)) - return (-1); - - return ((int)((unsigned char)result)); -} - -#define IICBUS(bktr) ((bktr)->i2c_sc.iicbb) - -/* The MSP34xx and DPL35xx Audio chip require i2c bus writes of up */ -/* to 5 bytes which the bt848 automated i2c bus controller cannot handle */ -/* Therefore we need low level control of the i2c bus hardware */ - -/* Write to the MSP or DPL registers */ -void -msp_dpl_write(bktr_ptr_t bktr, int i2c_addr, unsigned char dev, unsigned int addr, unsigned int data) -{ - unsigned char addr_l, addr_h, data_h, data_l ; - - addr_h = (addr >>8) & 0xff; - addr_l = addr & 0xff; - data_h = (data >>8) & 0xff; - data_l = data & 0xff; - - iicbus_start(IICBUS(bktr), i2c_addr, 0 /* no timeout? */); - - iicbus_write_byte(IICBUS(bktr), dev, 0); - iicbus_write_byte(IICBUS(bktr), addr_h, 0); - iicbus_write_byte(IICBUS(bktr), addr_l, 0); - iicbus_write_byte(IICBUS(bktr), data_h, 0); - iicbus_write_byte(IICBUS(bktr), data_l, 0); - - iicbus_stop(IICBUS(bktr)); - - return; -} - -/* Read from the MSP or DPL registers */ -unsigned int -msp_dpl_read(bktr_ptr_t bktr, int i2c_addr, unsigned char dev, unsigned int addr) -{ - unsigned int data; - unsigned char addr_l, addr_h, dev_r; - int read; - u_char data_read[2]; - - addr_h = (addr >>8) & 0xff; - addr_l = addr & 0xff; - dev_r = dev+1; - - /* XXX errors ignored */ - iicbus_start(IICBUS(bktr), i2c_addr, 0 /* no timeout? */); - - iicbus_write_byte(IICBUS(bktr), dev_r, 0); - iicbus_write_byte(IICBUS(bktr), addr_h, 0); - iicbus_write_byte(IICBUS(bktr), addr_l, 0); - - iicbus_repeated_start(IICBUS(bktr), i2c_addr +1, 0 /* no timeout? */); - iicbus_read(IICBUS(bktr), data_read, 2, &read, IIC_LAST_READ, 0); - iicbus_stop(IICBUS(bktr)); - - data = (data_read[0]<<8) | data_read[1]; - - return (data); -} - -/* Reset the MSP or DPL chip */ -/* The user can block the reset (which is handy if you initialise the - * MSP and/or DPL audio in another operating system first (eg in Windows) - */ -void -msp_dpl_reset( bktr_ptr_t bktr, int i2c_addr ) -{ - -#ifndef BKTR_NO_MSP_RESET - /* put into reset mode */ - iicbus_start(IICBUS(bktr), i2c_addr, 0 /* no timeout? */); - iicbus_write_byte(IICBUS(bktr), 0x00, 0); - iicbus_write_byte(IICBUS(bktr), 0x80, 0); - iicbus_write_byte(IICBUS(bktr), 0x00, 0); - iicbus_stop(IICBUS(bktr)); - - /* put back to operational mode */ - iicbus_start(IICBUS(bktr), i2c_addr, 0 /* no timeout? */); - iicbus_write_byte(IICBUS(bktr), 0x00, 0); - iicbus_write_byte(IICBUS(bktr), 0x00, 0); - iicbus_write_byte(IICBUS(bktr), 0x00, 0); - iicbus_stop(IICBUS(bktr)); -#endif - return; -} - -static void remote_read(bktr_ptr_t bktr, struct bktr_remote *remote) { - int read; - - /* XXX errors ignored */ - iicbus_start(IICBUS(bktr), bktr->remote_control_addr, 0 /* no timeout? */); - iicbus_read(IICBUS(bktr), remote->data, 3, &read, IIC_LAST_READ, 0); - iicbus_stop(IICBUS(bktr)); - - return; -} - -#else /* defined(BKTR_USE_FREEBSD_SMBUS) */ - -/* - * Program the i2c bus directly - */ -int -i2cWrite( bktr_ptr_t bktr, int addr, int byte1, int byte2 ) -{ - u_long x; - u_long data; - - /* clear status bits */ - OUTL(bktr, BKTR_INT_STAT, BT848_INT_RACK | BT848_INT_I2CDONE); - - /* build the command datum */ - if (bktr->id == BROOKTREE_848 || - bktr->id == BROOKTREE_848A || - bktr->id == BROOKTREE_849A) { - data = ((addr & 0xff) << 24) | ((byte1 & 0xff) << 16) | I2C_COMMAND; - } else { - data = ((addr & 0xff) << 24) | ((byte1 & 0xff) << 16) | I2C_COMMAND_878; - } - if ( byte2 != -1 ) { - data |= ((byte2 & 0xff) << 8); - data |= BT848_DATA_CTL_I2CW3B; - } - - /* write the address and data */ - OUTL(bktr, BKTR_I2C_DATA_CTL, data); - - /* wait for completion */ - for ( x = 0x7fffffff; x; --x ) { /* safety valve */ - if ( INL(bktr, BKTR_INT_STAT) & BT848_INT_I2CDONE ) - break; - } - - /* check for ACK */ - if ( !x || !(INL(bktr, BKTR_INT_STAT) & BT848_INT_RACK) ) - return( -1 ); - - /* return OK */ - return( 0 ); -} - - -/* - * - */ -int -i2cRead( bktr_ptr_t bktr, int addr ) -{ - u_long x; - - /* clear status bits */ - OUTL(bktr, BKTR_INT_STAT, BT848_INT_RACK | BT848_INT_I2CDONE); - - /* write the READ address */ - /* The Bt878 and Bt879 differed on the treatment of i2c commands */ - - if (bktr->id == BROOKTREE_848 || - bktr->id == BROOKTREE_848A || - bktr->id == BROOKTREE_849A) { - OUTL(bktr, BKTR_I2C_DATA_CTL, ((addr & 0xff) << 24) | I2C_COMMAND); - } else { - OUTL(bktr, BKTR_I2C_DATA_CTL, ((addr & 0xff) << 24) | I2C_COMMAND_878); - } - - /* wait for completion */ - for ( x = 0x7fffffff; x; --x ) { /* safety valve */ - if ( INL(bktr, BKTR_INT_STAT) & BT848_INT_I2CDONE ) - break; - } - - /* check for ACK */ - if ( !x || !(INL(bktr, BKTR_INT_STAT) & BT848_INT_RACK) ) - return( -1 ); - - /* it was a read */ - return( (INL(bktr, BKTR_I2C_DATA_CTL) >> 8) & 0xff ); -} - -/* The MSP34xx Audio chip require i2c bus writes of up to 5 bytes which the */ -/* bt848 automated i2c bus controller cannot handle */ -/* Therefore we need low level control of the i2c bus hardware */ -/* Idea for the following functions are from elsewhere in this driver and */ -/* from the Linux BTTV i2c driver by Gerd Knorr */ - -#define BITD 40 -static void i2c_start( bktr_ptr_t bktr) { - OUTL(bktr, BKTR_I2C_DATA_CTL, 1); DELAY( BITD ); /* release data */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 3); DELAY( BITD ); /* release clock */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 2); DELAY( BITD ); /* lower data */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 0); DELAY( BITD ); /* lower clock */ -} - -static void i2c_stop( bktr_ptr_t bktr) { - OUTL(bktr, BKTR_I2C_DATA_CTL, 0); DELAY( BITD ); /* lower clock & data */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 2); DELAY( BITD ); /* release clock */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 3); DELAY( BITD ); /* release data */ -} - -static int i2c_write_byte( bktr_ptr_t bktr, unsigned char data) { - int x; - int status; - - /* write out the byte */ - for ( x = 7; x >= 0; --x ) { - if ( data & (1<= 0; --x ) { - OUTL(bktr, BKTR_I2C_DATA_CTL, 3); - DELAY( BITD ); /* strobe clock */ - bit = INL(bktr, BKTR_I2C_DATA_CTL) & 1; /* read the data bit */ - if ( bit ) byte |= (1<>8) & 0xff; - addr_l = addr & 0xff; - data_h = (data >>8) & 0xff; - data_l = data & 0xff; - - i2c_start(bktr); - i2c_write_byte(bktr, msp_w_addr); - i2c_write_byte(bktr, dev); - i2c_write_byte(bktr, addr_h); - i2c_write_byte(bktr, addr_l); - i2c_write_byte(bktr, data_h); - i2c_write_byte(bktr, data_l); - i2c_stop(bktr); -} - -/* Read from the MSP or DPL registers */ -unsigned int msp_dpl_read(bktr_ptr_t bktr, int i2c_addr, unsigned char dev, unsigned int addr){ - unsigned int data; - unsigned char addr_l, addr_h, data_1, data_2, dev_r ; - addr_h = (addr >>8) & 0xff; - addr_l = addr & 0xff; - dev_r = dev+1; - - i2c_start(bktr); - i2c_write_byte(bktr,i2c_addr); - i2c_write_byte(bktr,dev_r); - i2c_write_byte(bktr,addr_h); - i2c_write_byte(bktr,addr_l); - - i2c_start(bktr); - i2c_write_byte(bktr,i2c_addr+1); - i2c_read_byte(bktr,&data_1, 0); - i2c_read_byte(bktr,&data_2, 1); - i2c_stop(bktr); - data = (data_1<<8) | data_2; - return data; -} - -/* Reset the MSP or DPL chip */ -/* The user can block the reset (which is handy if you initialise the - * MSP audio in another operating system first (eg in Windows) - */ -void msp_dpl_reset( bktr_ptr_t bktr, int i2c_addr ) { - -#ifndef BKTR_NO_MSP_RESET - /* put into reset mode */ - i2c_start(bktr); - i2c_write_byte(bktr, i2c_addr); - i2c_write_byte(bktr, 0x00); - i2c_write_byte(bktr, 0x80); - i2c_write_byte(bktr, 0x00); - i2c_stop(bktr); - - /* put back to operational mode */ - i2c_start(bktr); - i2c_write_byte(bktr, i2c_addr); - i2c_write_byte(bktr, 0x00); - i2c_write_byte(bktr, 0x00); - i2c_write_byte(bktr, 0x00); - i2c_stop(bktr); -#endif - return; - -} - -static void remote_read(bktr_ptr_t bktr, struct bktr_remote *remote) { - - /* XXX errors ignored */ - i2c_start(bktr); - i2c_write_byte(bktr,bktr->remote_control_addr); - i2c_read_byte(bktr,&(remote->data[0]), 0); - i2c_read_byte(bktr,&(remote->data[1]), 0); - i2c_read_byte(bktr,&(remote->data[2]), 0); - i2c_stop(bktr); - - return; -} - -#endif /* defined(BKTR_USE_FREEBSD_SMBUS) */ - - -#if defined( I2C_SOFTWARE_PROBE ) - -/* - * we are keeping this around for any parts that we need to probe - * but that CANNOT be probed via an i2c read. - * this is necessary because the hardware i2c mechanism - * cannot be programmed for 1 byte writes. - * currently there are no known i2c parts that we need to probe - * and that cannot be safely read. - */ -static int i2cProbe( bktr_ptr_t bktr, int addr ); -#define BITD 40 -#define EXTRA_START - -/* - * probe for an I2C device at addr. - */ -static int -i2cProbe( bktr_ptr_t bktr, int addr ) -{ - int x, status; - - /* the START */ -#if defined( EXTRA_START ) - OUTL(bktr, BKTR_I2C_DATA_CTL, 1); DELAY( BITD ); /* release data */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 3); DELAY( BITD ); /* release clock */ -#endif /* EXTRA_START */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 2); DELAY( BITD ); /* lower data */ - OUTL(bktr, BKTR_I2C_DATA_CTL, 0); DELAY( BITD ); /* lower clock */ - - /* write addr */ - for ( x = 7; x >= 0; --x ) { - if ( addr & (1< 1 byte - */ -#define BKTR_SLEEP ((caddr_t)bktr ) -#define VBI_SLEEP ((caddr_t)bktr + 1) - - -/* device name for printf */ -const char *bktr_name(bktr_ptr_t bktr); - -/* Prototypes for attatch and interrupt functions */ -void common_bktr_attach( bktr_ptr_t bktr, int unit, - u_long pci_id, u_int rev ); -int common_bktr_intr( void *arg ); - - -/* Prototypes for open, close, read, mmap and ioctl calls */ -int video_open( bktr_ptr_t bktr ); -int video_close( bktr_ptr_t bktr ); -int video_read( bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio ); -int video_ioctl( bktr_ptr_t bktr, int unit, - ioctl_cmd_t cmd, caddr_t arg, struct thread* pr ); - - -int tuner_open( bktr_ptr_t bktr ); -int tuner_close( bktr_ptr_t bktr ); -int tuner_ioctl( bktr_ptr_t bktr, int unit, - ioctl_cmd_t cmd, caddr_t arg, struct thread* pr ); - -int vbi_open( bktr_ptr_t bktr ); -int vbi_close( bktr_ptr_t bktr ); -int vbi_read( bktr_ptr_t bktr, struct uio *uio, int ioflag ); - diff --git a/sys/dev/bktr/bktr_i2c.c b/sys/dev/bktr/bktr_i2c.c deleted file mode 100644 index 0e9464822e60..000000000000 --- a/sys/dev/bktr/bktr_i2c.c +++ /dev/null @@ -1,364 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 1998, 2001 Nicolas Souchu - * 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$"); - -/* - * I2C support for the bti2c chipset. - * - * From brooktree848.c - */ - -#include "opt_bktr.h" - -#include -#include -#include -#include -#include -#include -#include - -#if __FreeBSD_version < 500014 -#include -#else -#include -#endif - -#if (__FreeBSD_version < 500000) -#include -#include -#else -#include -#include -#endif - -#include -#include - -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include - -#include -#include - -/* Compilation is void if BKTR_USE_FREEBSD_SMBUS is not - * defined. This allows bktr owners to have smbus active for there - * motherboard and still use their bktr without smbus. - */ -#if defined(BKTR_USE_FREEBSD_SMBUS) - -#define BTI2C_DEBUG(x) if (bti2c_debug) (x) -static int bti2c_debug = 0; - -/* - * Call this to pass the address of the bktr device to the - * bti2c_i2c layer and initialize all the I2C bus architecture - */ -int bt848_i2c_attach(device_t dev) -{ - struct bktr_softc *bktr_sc = (struct bktr_softc *)device_get_softc(dev); - struct bktr_i2c_softc *sc = &bktr_sc->i2c_sc; - - sc->smbus = device_add_child(dev, "smbus", -1); - sc->iicbb = device_add_child(dev, "iicbb", -1); - - if (!sc->iicbb || !sc->smbus) - return ENXIO; - - bus_generic_attach(dev); - - return (0); -}; - -int bt848_i2c_detach(device_t dev) -{ - struct bktr_softc *bktr_sc = (struct bktr_softc *)device_get_softc(dev); - struct bktr_i2c_softc *sc = &bktr_sc->i2c_sc; - int error = 0; - - if ((error = bus_generic_detach(dev))) - goto error; - - if (sc->iicbb && (error = device_delete_child(dev, sc->iicbb))) - goto error; - - if (sc->smbus && (error = device_delete_child(dev, sc->smbus))) - goto error; - -error: - return (error); -} - -int bti2c_smb_callback(device_t dev, int index, void *data) -{ - struct bktr_softc *bktr_sc = (struct bktr_softc *)device_get_softc(dev); - struct bktr_i2c_softc *sc = &bktr_sc->i2c_sc; - int error = 0; - - /* test each time if we already have/haven't the iicbus - * to avoid deadlocks - */ - switch (index) { - case SMB_REQUEST_BUS: - /* XXX test & set */ - mtx_lock(&Giant); - if (!sc->bus_owned) { - sc->bus_owned = 1; - } else - error = EWOULDBLOCK; - mtx_unlock(&Giant); - break; - - case SMB_RELEASE_BUS: - /* XXX test & set */ - mtx_lock(&Giant); - if (sc->bus_owned) { - sc->bus_owned = 0; - } else - error = EINVAL; - mtx_unlock(&Giant); - break; - - default: - error = EINVAL; - } - - return (error); -} - -int bti2c_iic_callback(device_t dev, int index, caddr_t *data) -{ - struct bktr_softc *bktr_sc = (struct bktr_softc *)device_get_softc(dev); - struct bktr_i2c_softc *sc = &bktr_sc->i2c_sc; - int error = 0; - - /* test each time if we already have/haven't the smbus - * to avoid deadlocks - */ - switch (index) { - case IIC_REQUEST_BUS: - /* XXX test & set */ - mtx_lock(&Giant); - if (!sc->bus_owned) { - sc->bus_owned = 1; - } else - error = EWOULDBLOCK; - mtx_unlock(&Giant); - break; - - case IIC_RELEASE_BUS: - /* XXX test & set */ - mtx_lock(&Giant); - if (sc->bus_owned) { - sc->bus_owned = 0; - } else - error = EINVAL; - mtx_unlock(&Giant); - break; - - default: - error = EINVAL; - } - - return (error); -} - -int bti2c_iic_reset(device_t dev, u_char speed, u_char addr, u_char * oldaddr) -{ - mtx_lock(&Giant); - if (oldaddr) - *oldaddr = 0; /* XXX */ - mtx_unlock(&Giant); - - return (IIC_ENOADDR); -} - -void bti2c_iic_setsda(device_t dev, int val) -{ - struct bktr_softc *sc = (struct bktr_softc *)device_get_softc(dev); - int clock; - - mtx_lock(&Giant); - clock = INL(sc, BKTR_I2C_DATA_CTL) & 0x2; - - if (val) - OUTL(sc, BKTR_I2C_DATA_CTL, clock | 1); - else - OUTL(sc, BKTR_I2C_DATA_CTL, clock); - mtx_unlock(&Giant); - - return; -} - -void bti2c_iic_setscl(device_t dev, int val) -{ - struct bktr_softc *sc = (struct bktr_softc *)device_get_softc(dev); - int data; - - mtx_lock(&Giant); - data = INL(sc, BKTR_I2C_DATA_CTL) & 0x1; - - if (val) - OUTL(sc, BKTR_I2C_DATA_CTL, 0x2 | data); - else - OUTL(sc, BKTR_I2C_DATA_CTL, data); - mtx_unlock(&Giant); - - return; -} - -int -bti2c_iic_getsda(device_t dev) -{ - struct bktr_softc *sc = (struct bktr_softc *)device_get_softc(dev); - int retval; - - mtx_lock(&Giant); - retval = INL(sc,BKTR_I2C_DATA_CTL) & 0x1; - mtx_unlock(&Giant); - return (retval); -} - -int -bti2c_iic_getscl(device_t dev) -{ - return (0); -} - -static int -bti2c_write(struct bktr_softc *sc, u_long data) -{ - u_long x; - - mtx_lock(&Giant); - - /* clear status bits */ - OUTL(sc, BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE)); - - BTI2C_DEBUG(printf("w%lx", data)); - - /* write the address and data */ - OUTL(sc, BKTR_I2C_DATA_CTL, data); - - /* wait for completion */ - for ( x = 0x7fffffff; x; --x ) { /* safety valve */ - if ( INL(sc, BKTR_INT_STAT) & BT848_INT_I2CDONE ) - break; - } - - /* check for ACK */ - if ( !x || !( INL(sc, BKTR_INT_STAT) & BT848_INT_RACK) ) { - BTI2C_DEBUG(printf("%c%c", (!x)?'+':'-', - (!( INL(sc, BKTR_INT_STAT) & BT848_INT_RACK))?'+':'-')); - mtx_unlock(&Giant); - return (SMB_ENOACK); - } - BTI2C_DEBUG(printf("+")); - mtx_unlock(&Giant); - - /* return OK */ - return( 0 ); -} - -int -bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte) -{ - struct bktr_softc *sc = (struct bktr_softc *)device_get_softc(dev); - u_long data; - - data = ((slave & 0xff) << 24) | ((byte & 0xff) << 16) | (u_char)cmd; - - return (bti2c_write(sc, data)); -} - -/* - * byte1 becomes low byte of word - * byte2 becomes high byte of word - */ -int -bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word) -{ - struct bktr_softc *sc = (struct bktr_softc *)device_get_softc(dev); - u_long data; - char low, high; - - low = (char)(word & 0xff); - high = (char)((word & 0xff00) >> 8); - - data = ((slave & 0xff) << 24) | ((low & 0xff) << 16) | - ((high & 0xff) << 8) | BT848_DATA_CTL_I2CW3B | (u_char)cmd; - - return (bti2c_write(sc, data)); -} - -/* - * The Bt878 and Bt879 differed on the treatment of i2c commands - */ -int -bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte) -{ - struct bktr_softc *sc = (struct bktr_softc *)device_get_softc(dev); - u_long x; - - mtx_lock(&Giant); - /* clear status bits */ - OUTL(sc,BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE)); - - OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd); - - BTI2C_DEBUG(printf("r%lx/", (u_long)(((slave & 0xff) << 24) | (u_char)cmd))); - - /* wait for completion */ - for ( x = 0x7fffffff; x; --x ) { /* safety valve */ - if ( INL(sc,BKTR_INT_STAT) & BT848_INT_I2CDONE ) - break; - } - - /* check for ACK */ - if ( !x || !(INL(sc,BKTR_INT_STAT) & BT848_INT_RACK) ) { - BTI2C_DEBUG(printf("r%c%c", (!x)?'+':'-', - (!( INL(sc,BKTR_INT_STAT) & BT848_INT_RACK))?'+':'-')); - mtx_unlock(&Giant); - return (SMB_ENOACK); - } - - *byte = (char)((INL(sc,BKTR_I2C_DATA_CTL) >> 8) & 0xff); - BTI2C_DEBUG(printf("r%x+", *byte)); - mtx_unlock(&Giant); - - return (0); -} - -DRIVER_MODULE(iicbb, bktr, iicbb_driver, iicbb_devclass, 0, 0); -DRIVER_MODULE(smbus, bktr, smbus_driver, smbus_devclass, 0, 0); - -#endif /* defined(BKTR_USE_FREEBSD_SMBUS) */ diff --git a/sys/dev/bktr/bktr_i2c.h b/sys/dev/bktr/bktr_i2c.h deleted file mode 100644 index 8ea53559ff62..000000000000 --- a/sys/dev/bktr/bktr_i2c.h +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 1998, 2001 Nicolas Souchu - * 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$ - * - */ -#ifndef _BT848_I2C_H -#define _BT848_I2C_H - -extern int bt848_i2c_attach(device_t); -extern int bt848_i2c_detach(device_t); - -extern int bti2c_iic_callback(device_t, int, caddr_t *); -extern void bti2c_iic_setsda(device_t, int); -extern void bti2c_iic_setscl(device_t, int); -extern int bti2c_iic_getsda(device_t); -extern int bti2c_iic_getscl(device_t); -extern int bti2c_iic_reset(device_t, u_char, u_char, u_char *); - -extern int bti2c_smb_callback(device_t, int, void *); -extern int bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte); -extern int bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word); -extern int bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte); - -#endif diff --git a/sys/dev/bktr/bktr_mem.c b/sys/dev/bktr/bktr_mem.c deleted file mode 100644 index 5009c51e75fe..000000000000 --- a/sys/dev/bktr/bktr_mem.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman. - * - * bktr_mem : This kernel module allows us to keep our allocated - * contiguous memory for the video buffer, DMA programs and VBI data - * while the main bktr driver is unloaded and reloaded. - * This avoids the problem of trying to allocate contiguous each - * time the bktr driver is loaded. - */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 2000 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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 -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include - -struct memory_pointers { - int addresses_stored; - vm_offset_t dma_prog; - vm_offset_t odd_dma_prog; - vm_offset_t vbidata; - vm_offset_t vbibuffer; - vm_offset_t buf; -} memory_pointers; - -static struct memory_pointers memory_list[BKTR_MEM_MAX_DEVICES]; - -/*************************************************************/ - -static int -bktr_mem_modevent(module_t mod, int type, void *unused){ - - switch (type) { - case MOD_LOAD: - printf("bktr_mem: memory holder loaded\n"); - /* - * bzero((caddr_t)memory_list, sizeof(memory_list)); - * causes a panic. So use a simple for loop for now. - */ - { - int x; - unsigned char *d; - - d = (unsigned char *)memory_list; - for (x = 0; x < sizeof(memory_list); x++) - d[x] = 0; - } - return 0; - case MOD_UNLOAD: - printf("bktr_mem: memory holder cannot be unloaded\n"); - return EBUSY; - default: - return EOPNOTSUPP; - break; - } - return (0); -} - -/*************************************************************/ - -int -bktr_has_stored_addresses(int unit) -{ - - if (unit < 0 || unit >= BKTR_MEM_MAX_DEVICES) { - printf("bktr_mem: Unit number %d invalid\n", unit); - return 0; - } - - return memory_list[unit].addresses_stored; -} - -/*************************************************************/ - -void -bktr_store_address(int unit, int type, vm_offset_t addr) -{ - - if (unit < 0 || unit >= BKTR_MEM_MAX_DEVICES) { - printf("bktr_mem: Unit number %d invalid for memory type %d, address %p\n", - unit, type, (void *) addr); - return; - } - - switch (type) { - case BKTR_MEM_DMA_PROG: - memory_list[unit].dma_prog = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_ODD_DMA_PROG: - memory_list[unit].odd_dma_prog = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_VBIDATA: - memory_list[unit].vbidata = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_VBIBUFFER: - memory_list[unit].vbibuffer = addr; - memory_list[unit].addresses_stored = 1; - break; - case BKTR_MEM_BUF: - memory_list[unit].buf = addr; - memory_list[unit].addresses_stored = 1; - break; - default: - printf("bktr_mem: Invalid memory type %d for bktr%d, address %p\n", - type, unit, (void *)addr); - break; - } -} - -/*************************************************************/ - -vm_offset_t -bktr_retrieve_address(int unit, int type) -{ - - if (unit < 0 || unit >= BKTR_MEM_MAX_DEVICES) { - printf("bktr_mem: Unit number %d too large for memory type %d\n", - unit, type); - return (0); - } - switch (type) { - case BKTR_MEM_DMA_PROG: - return memory_list[unit].dma_prog; - case BKTR_MEM_ODD_DMA_PROG: - return memory_list[unit].odd_dma_prog; - case BKTR_MEM_VBIDATA: - return memory_list[unit].vbidata; - case BKTR_MEM_VBIBUFFER: - return memory_list[unit].vbibuffer; - case BKTR_MEM_BUF: - return memory_list[unit].buf; - default: - printf("bktr_mem: Invalid memory type %d for bktr%d", - type, unit); - return (0); - } -} - -/*************************************************************/ - -static moduledata_t bktr_mem_mod = { - "bktr_mem", - bktr_mem_modevent, - 0 -}; - -/* - * The load order is First and module type is Driver to make sure bktr_mem - * loads (and initialises) before bktr when both are loaded together. - */ -DECLARE_MODULE(bktr_mem, bktr_mem_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(bktr_mem, 1); diff --git a/sys/dev/bktr/bktr_mem.h b/sys/dev/bktr/bktr_mem.h deleted file mode 100644 index 91b4b1c5afca..000000000000 --- a/sys/dev/bktr/bktr_mem.h +++ /dev/null @@ -1,65 +0,0 @@ -/* $FreeBSD$ */ - -/* - * This is prt of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman. - * - * bktr_mem : This kernel module allows us to keep our allocated - * contiguous memory for the video buffer, DMA programs and VBI data - * while the main bktr driver is unloaded and reloaded. - * This avoids the problem of trying to allocate contiguous each - * time the bktr driver is loaded. - */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 2000 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ - - -/* Support this number of devices */ -#define BKTR_MEM_MAX_DEVICES 8 - -/* Define a name for each block of memory we need to keep hold of */ -#define BKTR_MEM_DMA_PROG 1 -#define BKTR_MEM_ODD_DMA_PROG 2 -#define BKTR_MEM_VBIDATA 3 -#define BKTR_MEM_VBIBUFFER 4 -#define BKTR_MEM_BUF 5 - -/* Prototypes */ -int bktr_has_stored_addresses(int unit); -void bktr_store_address(int unit, int type, vm_offset_t addr); -vm_offset_t bktr_retrieve_address(int unit, int type); - diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c deleted file mode 100644 index 12d6ac825b4b..000000000000 --- a/sys/dev/bktr/bktr_os.c +++ /dev/null @@ -1,1348 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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 -__FBSDID("$FreeBSD$"); - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_os : This has all the Operating System dependent code, - * probe/attach and open/close/ioctl/read/mmap - * memory allocation - * PCI bus interfacing - */ - -#include "opt_bktr.h" /* include any kernel config options */ - -#define FIFO_RISC_DISABLED 0 -#define ALL_INTS_DISABLED 0 - - -/*******************/ -/* *** FreeBSD *** */ -/*******************/ -#ifdef __FreeBSD__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if __FreeBSD_version >= 500014 -#include -#else -#include -#endif - -#include -#include -#include -#include - -#include /* used by smbus and newbus */ - -#include /* used by bus space and newbus */ -#include - -#include /* used by newbus */ -#include /* used by newbus */ - -#if (__FreeBSD_version < 500000) -#include /* for DELAY */ -#include -#include -#else -#include -#include -#endif - -#include -int bt848_card = -1; -int bt848_tuner = -1; -int bt848_reverse_mute = -1; -int bt848_format = -1; -int bt848_slow_msp_audio = -1; -#ifdef BKTR_NEW_MSP34XX_DRIVER -int bt848_stereo_once = 0; /* no continuous stereo monitoring */ -int bt848_amsound = 0; /* hard-wire AM sound at 6.5 Hz (france), - the autoscan seems work well only with FM... */ -int bt848_dolby = 0; -#endif - -static SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - "Bt848 Driver mgmt"); -SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, ""); -#ifdef BKTR_NEW_MSP34XX_DRIVER -SYSCTL_INT(_hw_bt848, OID_AUTO, stereo_once, CTLFLAG_RW, &bt848_stereo_once, 0, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, amsound, CTLFLAG_RW, &bt848_amsound, 0, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, dolby, CTLFLAG_RW, &bt848_dolby, 0, ""); -#endif - -#endif /* end freebsd section */ - - - -/****************/ -/* *** BSDI *** */ -/****************/ -#ifdef __bsdi__ -#endif /* __bsdi__ */ - - -/**************************/ -/* *** OpenBSD/NetBSD *** */ -/**************************/ -#if defined(__NetBSD__) || defined(__OpenBSD__) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include /* extensions to ioctl_meteor.h */ - -#ifndef __NetBSD__ -#include -#include -#include -#endif - -#include -#include -#include -#include - -#define BKTR_DEBUG -#ifdef BKTR_DEBUG -int bktr_debug = 0; -#define DPR(x) (bktr_debug ? printf x : 0) -#else -#define DPR(x) -#endif -#endif /* __NetBSD__ || __OpenBSD__ */ - - -#ifdef __NetBSD__ -#include /* NetBSD location for .h files */ -#include -#include -#include -#include -#include -#include -#else /* Traditional location for .h files */ -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include -#include -#include -#include -#include - -#if defined(BKTR_USE_FREEBSD_SMBUS) -#include - -#include "iicbb_if.h" -#include "smbus_if.h" -#endif -#endif - - -/****************************/ -/* *** FreeBSD 4.x code *** */ -/****************************/ - -static int bktr_probe( device_t dev ); -static int bktr_attach( device_t dev ); -static int bktr_detach( device_t dev ); -static int bktr_shutdown( device_t dev ); -static void bktr_intr(void *arg) { common_bktr_intr(arg); } - -static device_method_t bktr_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, bktr_probe), - DEVMETHOD(device_attach, bktr_attach), - DEVMETHOD(device_detach, bktr_detach), - DEVMETHOD(device_shutdown, bktr_shutdown), - -#if defined(BKTR_USE_FREEBSD_SMBUS) - /* iicbb interface */ - DEVMETHOD(iicbb_callback, bti2c_iic_callback), - DEVMETHOD(iicbb_setsda, bti2c_iic_setsda), - DEVMETHOD(iicbb_setscl, bti2c_iic_setscl), - DEVMETHOD(iicbb_getsda, bti2c_iic_getsda), - DEVMETHOD(iicbb_getscl, bti2c_iic_getscl), - DEVMETHOD(iicbb_reset, bti2c_iic_reset), - - /* smbus interface */ - DEVMETHOD(smbus_callback, bti2c_smb_callback), - DEVMETHOD(smbus_writeb, bti2c_smb_writeb), - DEVMETHOD(smbus_writew, bti2c_smb_writew), - DEVMETHOD(smbus_readb, bti2c_smb_readb), -#endif - - { 0, 0 } -}; - -static driver_t bktr_driver = { - "bktr", - bktr_methods, - sizeof(struct bktr_softc), -}; - -static devclass_t bktr_devclass; - -static d_open_t bktr_open; -static d_close_t bktr_close; -static d_read_t bktr_read; -static d_write_t bktr_write; -static d_ioctl_t bktr_ioctl; -static d_mmap_t bktr_mmap; -static d_poll_t bktr_poll; - -static struct cdevsw bktr_cdevsw = { - .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, - .d_open = bktr_open, - .d_close = bktr_close, - .d_read = bktr_read, - .d_write = bktr_write, - .d_ioctl = bktr_ioctl, - .d_poll = bktr_poll, - .d_mmap = bktr_mmap, - .d_name = "bktr", -}; - -#ifdef BKTR_USE_FREEBSD_SMBUS -#include -#include -MODULE_DEPEND(bktr, iicbb, IICBB_MINVER, IICBB_MODVER, IICBB_MAXVER); -MODULE_DEPEND(bktr, iicbus, IICBUS_MINVER, IICBUS_MODVER, IICBUS_MAXVER); -MODULE_DEPEND(bktr, smbus, SMBUS_MINVER, SMBUS_MODVER, SMBUS_MAXVER); -#endif -DRIVER_MODULE(bktr, pci, bktr_driver, bktr_devclass, 0, 0); -MODULE_DEPEND(bktr, bktr_mem, 1,1,1); -MODULE_VERSION(bktr, 1); - - -/* - * the boot time probe routine. - */ -static int -bktr_probe( device_t dev ) -{ - unsigned int type = pci_get_devid(dev); - unsigned int rev = pci_get_revid(dev); - - if (BKTR_PCI_VENDOR(type) == PCI_VENDOR_BROOKTREE) - { - switch (BKTR_PCI_PRODUCT(type)) { - case PCI_PRODUCT_BROOKTREE_BT848: - if (rev == 0x12) - device_set_desc(dev, "BrookTree 848A"); - else - device_set_desc(dev, "BrookTree 848"); - return BUS_PROBE_DEFAULT; - case PCI_PRODUCT_BROOKTREE_BT849: - device_set_desc(dev, "BrookTree 849A"); - return BUS_PROBE_DEFAULT; - case PCI_PRODUCT_BROOKTREE_BT878: - device_set_desc(dev, "BrookTree 878"); - return BUS_PROBE_DEFAULT; - case PCI_PRODUCT_BROOKTREE_BT879: - device_set_desc(dev, "BrookTree 879"); - return BUS_PROBE_DEFAULT; - } - } - - return ENXIO; -} - - -/* - * the attach routine. - */ -static int -bktr_attach( device_t dev ) -{ - u_long latency; - u_long fun; - unsigned int rev; - unsigned int unit; - int error = 0; -#ifdef BROOKTREE_IRQ - u_long old_irq, new_irq; -#endif - - struct bktr_softc *bktr = device_get_softc(dev); - - unit = device_get_unit(dev); - - /* build the device name for bktr_name() */ - snprintf(bktr->bktr_xname, sizeof(bktr->bktr_xname), "bktr%d",unit); - - /* - * Enable bus mastering and Memory Mapped device - */ - pci_enable_busmaster(dev); - - /* - * Map control/status registers. - */ - bktr->mem_rid = PCIR_BAR(0); - bktr->res_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &bktr->mem_rid, RF_ACTIVE); - - if (!bktr->res_mem) { - device_printf(dev, "could not map memory\n"); - error = ENXIO; - goto fail; - } - bktr->memt = rman_get_bustag(bktr->res_mem); - bktr->memh = rman_get_bushandle(bktr->res_mem); - - - /* - * Disable the brooktree device - */ - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - - -#ifdef BROOKTREE_IRQ /* from the configuration file */ - old_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); - pci_conf_write(tag, PCI_INTERRUPT_REG, BROOKTREE_IRQ); - new_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); - printf("bktr%d: attach: irq changed from %d to %d\n", - unit, (old_irq & 0xff), (new_irq & 0xff)); -#endif - - /* - * Allocate our interrupt. - */ - bktr->irq_rid = 0; - bktr->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &bktr->irq_rid, RF_SHAREABLE | RF_ACTIVE); - if (bktr->res_irq == NULL) { - device_printf(dev, "could not map interrupt\n"); - error = ENXIO; - goto fail; - } - - error = bus_setup_intr(dev, bktr->res_irq, INTR_TYPE_TTY, - NULL, bktr_intr, bktr, &bktr->res_ih); - if (error) { - device_printf(dev, "could not setup irq\n"); - goto fail; - - } - - - /* Update the Device Control Register */ - /* on Bt878 and Bt879 cards */ - fun = pci_read_config( dev, 0x40, 2); - fun = fun | 1; /* Enable writes to the sub-system vendor ID */ - -#if defined( BKTR_430_FX_MODE ) - if (bootverbose) printf("Using 430 FX chipset compatibility mode\n"); - fun = fun | 2; /* Enable Intel 430 FX compatibility mode */ -#endif - -#if defined( BKTR_SIS_VIA_MODE ) - if (bootverbose) printf("Using SiS/VIA chipset compatibility mode\n"); - fun = fun | 4; /* Enable SiS/VIA compatibility mode (useful for - OPTi chipset motherboards too */ -#endif - pci_write_config(dev, 0x40, fun, 2); - -#if defined(BKTR_USE_FREEBSD_SMBUS) - if (bt848_i2c_attach(dev)) - printf("bktr%d: i2c_attach: can't attach\n", unit); -#endif - -/* - * PCI latency timer. 32 is a good value for 4 bus mastering slots, if - * you have more than four, then 16 would probably be a better value. - */ -#ifndef BROOKTREE_DEF_LATENCY_VALUE -#define BROOKTREE_DEF_LATENCY_VALUE 10 -#endif - latency = pci_read_config(dev, PCI_LATENCY_TIMER, 4); - latency = (latency >> 8) & 0xff; - if ( bootverbose ) { - if (latency) - printf("brooktree%d: PCI bus latency is", unit); - else - printf("brooktree%d: PCI bus latency was 0 changing to", - unit); - } - if ( !latency ) { - latency = BROOKTREE_DEF_LATENCY_VALUE; - pci_write_config(dev, PCI_LATENCY_TIMER, latency<<8, 4); - } - if ( bootverbose ) { - printf(" %d.\n", (int) latency); - } - - /* read the pci device id and revision id */ - fun = pci_get_devid(dev); - rev = pci_get_revid(dev); - - /* call the common attach code */ - common_bktr_attach( bktr, unit, fun, rev ); - - /* make the device entries */ - bktr->bktrdev = make_dev(&bktr_cdevsw, unit, - 0, 0, 0444, "bktr%d", unit); - bktr->tunerdev= make_dev(&bktr_cdevsw, unit+16, - 0, 0, 0444, "tuner%d", unit); - bktr->vbidev = make_dev(&bktr_cdevsw, unit+32, - 0, 0, 0444, "vbi%d" , unit); - - - /* if this is unit 0 (/dev/bktr0, /dev/tuner0, /dev/vbi0) then make */ - /* alias entries to /dev/bktr /dev/tuner and /dev/vbi */ -#if (__FreeBSD_version >=500000) - if (unit == 0) { - bktr->bktrdev_alias = make_dev_alias(bktr->bktrdev, "bktr"); - bktr->tunerdev_alias= make_dev_alias(bktr->tunerdev, "tuner"); - bktr->vbidev_alias = make_dev_alias(bktr->vbidev, "vbi"); - } -#endif - - gone_in_dev(dev, 13, "bktr driver removed in FreeBSD 13.0\n"); - return 0; - -fail: - if (bktr->res_irq) - bus_release_resource(dev, SYS_RES_IRQ, bktr->irq_rid, bktr->res_irq); - if (bktr->res_mem) - bus_release_resource(dev, SYS_RES_MEMORY, bktr->mem_rid, bktr->res_mem); - return error; - -} - -/* - * the detach routine. - */ -static int -bktr_detach( device_t dev ) -{ - struct bktr_softc *bktr = device_get_softc(dev); - -#ifdef BKTR_NEW_MSP34XX_DRIVER - /* Disable the soundchip and kernel thread */ - if (bktr->msp3400c_info != NULL) - msp_detach(bktr); -#endif - - /* Disable the brooktree device */ - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - -#if defined(BKTR_USE_FREEBSD_SMBUS) - if (bt848_i2c_detach(dev)) - printf("bktr%d: i2c_attach: can't attach\n", - device_get_unit(dev)); -#endif -#ifdef USE_VBIMUTEX - mtx_destroy(&bktr->vbimutex); -#endif - - /* Note: We do not free memory for RISC programs, grab buffer, vbi buffers */ - /* The memory is retained by the bktr_mem module so we can unload and */ - /* then reload the main bktr driver module */ - - /* Unregister the /dev/bktrN, tunerN and vbiN devices, - * the aliases for unit 0 are automatically destroyed */ - destroy_dev(bktr->vbidev); - destroy_dev(bktr->tunerdev); - destroy_dev(bktr->bktrdev); - - /* - * Deallocate resources. - */ - bus_teardown_intr(dev, bktr->res_irq, bktr->res_ih); - bus_release_resource(dev, SYS_RES_IRQ, bktr->irq_rid, bktr->res_irq); - bus_release_resource(dev, SYS_RES_MEMORY, bktr->mem_rid, bktr->res_mem); - - return 0; -} - -/* - * the shutdown routine. - */ -static int -bktr_shutdown( device_t dev ) -{ - struct bktr_softc *bktr = device_get_softc(dev); - - /* Disable the brooktree device */ - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - - return 0; -} - - -/* - * Special Memory Allocation - */ -vm_offset_t -get_bktr_mem( int unit, unsigned size ) -{ - vm_offset_t addr = 0; - - addr = (vm_offset_t)contigmalloc(size, M_DEVBUF, M_NOWAIT, 0, - 0xffffffff, 1<<24, 0); - if (addr == 0) - addr = (vm_offset_t)contigmalloc(size, M_DEVBUF, M_NOWAIT, 0, - 0xffffffff, PAGE_SIZE, 0); - if (addr == 0) { - printf("bktr%d: Unable to allocate %d bytes of memory.\n", - unit, size); - } - - return( addr ); -} - - -/*--------------------------------------------------------- -** -** BrookTree 848 character device driver routines -** -**--------------------------------------------------------- -*/ - -#define VIDEO_DEV 0x00 -#define TUNER_DEV 0x01 -#define VBI_DEV 0x02 - -#define UNIT(x) ((x) & 0x0f) -#define FUNCTION(x) (x >> 4) - -/* - * - */ -static int -bktr_open( struct cdev *dev, int flags, int fmt, struct thread *td ) -{ - bktr_ptr_t bktr; - int unit; - int result; - - unit = UNIT( dev2unit(dev) ); - - /* Get the device data */ - bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); - if (bktr == NULL) { - /* the device is no longer valid/functioning */ - return (ENXIO); - } - - if (!(bktr->flags & METEOR_INITALIZED)) /* device not found */ - return( ENXIO ); - - /* Record that the device is now busy */ - device_busy(devclass_get_device(bktr_devclass, unit)); - - - if (bt848_card != -1) { - if ((bt848_card >> 8 == unit ) && - ( (bt848_card & 0xff) < Bt848_MAX_CARD )) { - if ( bktr->bt848_card != (bt848_card & 0xff) ) { - bktr->bt848_card = (bt848_card & 0xff); - probeCard(bktr, FALSE, unit); - } - } - } - - if (bt848_tuner != -1) { - if ((bt848_tuner >> 8 == unit ) && - ( (bt848_tuner & 0xff) < Bt848_MAX_TUNER )) { - if ( bktr->bt848_tuner != (bt848_tuner & 0xff) ) { - bktr->bt848_tuner = (bt848_tuner & 0xff); - probeCard(bktr, FALSE, unit); - } - } - } - - if (bt848_reverse_mute != -1) { - if ((bt848_reverse_mute >> 8) == unit ) { - bktr->reverse_mute = bt848_reverse_mute & 0xff; - } - } - - if (bt848_slow_msp_audio != -1) { - if ((bt848_slow_msp_audio >> 8) == unit ) { - bktr->slow_msp_audio = (bt848_slow_msp_audio & 0xff); - } - } - -#ifdef BKTR_NEW_MSP34XX_DRIVER - if (bt848_stereo_once != 0) { - if ((bt848_stereo_once >> 8) == unit ) { - bktr->stereo_once = (bt848_stereo_once & 0xff); - } - } - - if (bt848_amsound != -1) { - if ((bt848_amsound >> 8) == unit ) { - bktr->amsound = (bt848_amsound & 0xff); - } - } - - if (bt848_dolby != -1) { - if ((bt848_dolby >> 8) == unit ) { - bktr->dolby = (bt848_dolby & 0xff); - } - } -#endif - - switch ( FUNCTION( dev2unit(dev) ) ) { - case VIDEO_DEV: - result = video_open( bktr ); - break; - case TUNER_DEV: - result = tuner_open( bktr ); - break; - case VBI_DEV: - result = vbi_open( bktr ); - break; - default: - result = ENXIO; - break; - } - - /* If there was an error opening the device, undo the busy status */ - if (result != 0) - device_unbusy(devclass_get_device(bktr_devclass, unit)); - return( result ); -} - - -/* - * - */ -static int -bktr_close( struct cdev *dev, int flags, int fmt, struct thread *td ) -{ - bktr_ptr_t bktr; - int unit; - int result; - - unit = UNIT( dev2unit(dev) ); - - /* Get the device data */ - bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); - if (bktr == NULL) { - /* the device is no longer valid/functioning */ - return (ENXIO); - } - - switch ( FUNCTION( dev2unit(dev) ) ) { - case VIDEO_DEV: - result = video_close( bktr ); - break; - case TUNER_DEV: - result = tuner_close( bktr ); - break; - case VBI_DEV: - result = vbi_close( bktr ); - break; - default: - return (ENXIO); - break; - } - - device_unbusy(devclass_get_device(bktr_devclass, unit)); - return( result ); -} - - -/* - * - */ -static int -bktr_read( struct cdev *dev, struct uio *uio, int ioflag ) -{ - bktr_ptr_t bktr; - int unit; - - unit = UNIT(dev2unit(dev)); - - /* Get the device data */ - bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); - if (bktr == NULL) { - /* the device is no longer valid/functioning */ - return (ENXIO); - } - - switch ( FUNCTION( dev2unit(dev) ) ) { - case VIDEO_DEV: - return( video_read( bktr, unit, dev, uio ) ); - case VBI_DEV: - return( vbi_read( bktr, uio, ioflag ) ); - } - return( ENXIO ); -} - - -/* - * - */ -static int -bktr_write( struct cdev *dev, struct uio *uio, int ioflag ) -{ - return( EINVAL ); /* XXX or ENXIO ? */ -} - - -/* - * - */ -static int -bktr_ioctl( struct cdev *dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td ) -{ - bktr_ptr_t bktr; - int unit; - - unit = UNIT(dev2unit(dev)); - - /* Get the device data */ - bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); - if (bktr == NULL) { - /* the device is no longer valid/functioning */ - return (ENXIO); - } - -#ifdef BKTR_GPIO_ACCESS - if (bktr->bigbuf == 0 && cmd != BT848_GPIO_GET_EN && - cmd != BT848_GPIO_SET_EN && cmd != BT848_GPIO_GET_DATA && - cmd != BT848_GPIO_SET_DATA) /* no frame buffer allocated (ioctl failed) */ - return( ENOMEM ); -#else - if (bktr->bigbuf == 0) /* no frame buffer allocated (ioctl failed) */ - return( ENOMEM ); -#endif - - switch ( FUNCTION( dev2unit(dev) ) ) { - case VIDEO_DEV: - return( video_ioctl( bktr, unit, cmd, arg, td ) ); - case TUNER_DEV: - return( tuner_ioctl( bktr, unit, cmd, arg, td ) ); - } - - return( ENXIO ); -} - - -/* - * - */ -static int -bktr_mmap( struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, - int nprot, vm_memattr_t *memattr ) -{ - int unit; - bktr_ptr_t bktr; - - unit = UNIT(dev2unit(dev)); - - if (FUNCTION(dev2unit(dev)) > 0) /* only allow mmap on /dev/bktr[n] */ - return( -1 ); - - /* Get the device data */ - bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); - if (bktr == NULL) { - /* the device is no longer valid/functioning */ - return (ENXIO); - } - - if (nprot & PROT_EXEC) - return( -1 ); - - if (offset < 0) - return( -1 ); - - if (offset >= bktr->alloc_pages * PAGE_SIZE) - return( -1 ); - - *paddr = vtophys(bktr->bigbuf) + offset; - return( 0 ); -} - -static int -bktr_poll( struct cdev *dev, int events, struct thread *td) -{ - int unit; - bktr_ptr_t bktr; - int revents = 0; - DECLARE_INTR_MASK(s); - - unit = UNIT(dev2unit(dev)); - - /* Get the device data */ - bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); - if (bktr == NULL) { - /* the device is no longer valid/functioning */ - return (ENXIO); - } - - LOCK_VBI(bktr); - DISABLE_INTR(s); - - if (events & (POLLIN | POLLRDNORM)) { - - switch ( FUNCTION( dev2unit(dev) ) ) { - case VBI_DEV: - if(bktr->vbisize == 0) - selrecord(td, &bktr->vbi_select); - else - revents |= events & (POLLIN | POLLRDNORM); - break; - } - } - - ENABLE_INTR(s); - UNLOCK_VBI(bktr); - - return (revents); -} - -/*****************/ -/* *** BSDI *** */ -/*****************/ - -#if defined(__bsdi__) -#endif /* __bsdi__ BSDI specific kernel interface routines */ - - -/*****************************/ -/* *** OpenBSD / NetBSD *** */ -/*****************************/ -#if defined(__NetBSD__) || defined(__OpenBSD__) - -#define IPL_VIDEO IPL_BIO /* XXX */ - -static int bktr_intr(void *arg) { return common_bktr_intr(arg); } - -#define bktr_open bktropen -#define bktr_close bktrclose -#define bktr_read bktrread -#define bktr_write bktrwrite -#define bktr_ioctl bktrioctl -#define bktr_mmap bktrmmap - -vm_offset_t vm_page_alloc_contig(vm_offset_t, vm_offset_t, - vm_offset_t, vm_offset_t); - -#if defined(__OpenBSD__) -static int bktr_probe(struct device *, void *, void *); -static void bktr_attach(struct device *, struct device *, void *); -#else -static int bktr_probe(device_t, struct cfdata *, void *); -static void bktr_attach(device_t, device_t, void *); -#endif - -struct cfattach bktr_ca = { - sizeof(struct bktr_softc), bktr_probe, bktr_attach -}; - -#if defined(__NetBSD__) -extern struct cfdriver bktr_cd; -#else -struct cfdriver bktr_cd = { - NULL, "bktr", DV_DULL -}; -#endif - -int -bktr_probe(parent, match, aux) -#if defined(__OpenBSD__) - struct device *parent; - void *match; -#else - device_t parent; - struct cfdata *match; -#endif - void *aux; -{ - struct pci_attach_args *pa = aux; - - if (BKTR_PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROOKTREE && - (BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT848 || - BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT849 || - BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT878 || - BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT879)) - return 1; - - return 0; -} - - -/* - * the attach routine. - */ -static void -bktr_attach(parent, self, aux) -#if defined(__OpenBSD__) - struct device *parent; - struct device *self; -#else - device_t parent; - device_t self; -#endif - void *aux; -{ - bktr_ptr_t bktr; - u_long latency; - u_long fun; - unsigned int rev; - -#if defined(__OpenBSD__) - struct pci_attach_args *pa = aux; - pci_chipset_tag_t pc = pa->pa_pc; - - pci_intr_handle_t ih; - const char *intrstr; - int retval; - int unit; - - bktr = (bktr_ptr_t)self; - unit = bktr->bktr_dev.dv_unit; - - bktr->pc = pa->pa_pc; - bktr->tag = pa->pa_tag; - bktr->dmat = pa->pa_dmat; - - /* - * map memory - */ - bktr->memt = pa->pa_memt; - retval = pci_mem_find(pc, pa->pa_tag, PCI_MAPREG_START, - &bktr->phys_base, &bktr->obmemsz, NULL); - if (!retval) - retval = bus_space_map(pa->pa_memt, bktr->phys_base, - bktr->obmemsz, 0, &bktr->memh); - if (retval) { - printf(": couldn't map memory\n"); - return; - } - - - /* - * map interrupt - */ - if (pci_intr_map(pa->pa_pc, pa->pa_intrtag, pa->pa_intrpin, - pa->pa_intrline, &ih)) { - printf(": couldn't map interrupt\n"); - return; - } - intrstr = pci_intr_string(pa->pa_pc, ih); - - bktr->ih = pci_intr_establish(pa->pa_pc, ih, IPL_VIDEO, - bktr_intr, bktr, bktr->bktr_dev.dv_xname); - if (bktr->ih == NULL) { - printf(": couldn't establish interrupt"); - if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); - return; - } - - if (intrstr != NULL) - printf(": %s\n", intrstr); -#endif /* __OpenBSD__ */ - -#if defined(__NetBSD__) - struct pci_attach_args *pa = aux; - pci_intr_handle_t ih; - const char *intrstr; - int retval; - int unit; - - bktr = (bktr_ptr_t)self; - unit = bktr->bktr_dev.dv_unit; - bktr->dmat = pa->pa_dmat; - - printf("\n"); - - /* - * map memory - */ - retval = pci_mapreg_map(pa, PCI_MAPREG_START, - PCI_MAPREG_TYPE_MEM - | PCI_MAPREG_MEM_TYPE_32BIT, 0, - &bktr->memt, &bktr->memh, NULL, - &bktr->obmemsz); - DPR(("pci_mapreg_map: memt %x, memh %x, size %x\n", - bktr->memt, (u_int)bktr->memh, (u_int)bktr->obmemsz)); - if (retval) { - printf("%s: couldn't map memory\n", bktr_name(bktr)); - return; - } - - /* - * Disable the brooktree device - */ - OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); - OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); - - /* - * map interrupt - */ - if (pci_intr_map(pa->pa_pc, pa->pa_intrtag, pa->pa_intrpin, - pa->pa_intrline, &ih)) { - printf("%s: couldn't map interrupt\n", - bktr_name(bktr)); - return; - } - intrstr = pci_intr_string(pa->pa_pc, ih); - bktr->ih = pci_intr_establish(pa->pa_pc, ih, IPL_VIDEO, - bktr_intr, bktr); - if (bktr->ih == NULL) { - printf("%s: couldn't establish interrupt", - bktr_name(bktr)); - if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); - return; - } - if (intrstr != NULL) - printf("%s: interrupting at %s\n", bktr_name(bktr), - intrstr); -#endif /* __NetBSD__ */ - -/* - * PCI latency timer. 32 is a good value for 4 bus mastering slots, if - * you have more than four, then 16 would probably be a better value. - */ -#ifndef BROOKTREE_DEF_LATENCY_VALUE -#define BROOKTREE_DEF_LATENCY_VALUE 10 -#endif - latency = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_LATENCY_TIMER); - latency = (latency >> 8) & 0xff; - - if (!latency) { - if (bootverbose) { - printf("%s: PCI bus latency was 0 changing to %d", - bktr_name(bktr), BROOKTREE_DEF_LATENCY_VALUE); - } - latency = BROOKTREE_DEF_LATENCY_VALUE; - pci_conf_write(pa->pa_pc, pa->pa_tag, - PCI_LATENCY_TIMER, latency<<8); - } - - - /* Enabled Bus Master - XXX: check if all old DMA is stopped first (e.g. after warm - boot) */ - fun = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, - fun | PCI_COMMAND_MASTER_ENABLE); - - /* read the pci id and determine the card type */ - fun = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ID_REG); - rev = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_CLASS_REG) & 0x000000ff; - - common_bktr_attach(bktr, unit, fun, rev); -} - - -/* - * Special Memory Allocation - */ -vm_offset_t -get_bktr_mem(bktr, dmapp, size) - bktr_ptr_t bktr; - bus_dmamap_t *dmapp; - unsigned int size; -{ - bus_dma_tag_t dmat = bktr->dmat; - bus_dma_segment_t seg; - bus_size_t align; - int rseg; - caddr_t kva; - - /* - * Allocate a DMA area - */ - align = 1 << 24; - if (bus_dmamem_alloc(dmat, size, align, 0, &seg, 1, - &rseg, BUS_DMA_NOWAIT)) { - align = PAGE_SIZE; - if (bus_dmamem_alloc(dmat, size, align, 0, &seg, 1, - &rseg, BUS_DMA_NOWAIT)) { - printf("%s: Unable to dmamem_alloc of %d bytes\n", - bktr_name(bktr), size); - return 0; - } - } - if (bus_dmamem_map(dmat, &seg, rseg, size, - &kva, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { - printf("%s: Unable to dmamem_map of %d bytes\n", - bktr_name(bktr), size); - bus_dmamem_free(dmat, &seg, rseg); - return 0; - } -#ifdef __OpenBSD__ - bktr->dm_mapsize = size; -#endif - /* - * Create and locd the DMA map for the DMA area - */ - if (bus_dmamap_create(dmat, size, 1, size, 0, BUS_DMA_NOWAIT, dmapp)) { - printf("%s: Unable to dmamap_create of %d bytes\n", - bktr_name(bktr), size); - bus_dmamem_unmap(dmat, kva, size); - bus_dmamem_free(dmat, &seg, rseg); - return 0; - } - if (bus_dmamap_load(dmat, *dmapp, kva, size, NULL, BUS_DMA_NOWAIT)) { - printf("%s: Unable to dmamap_load of %d bytes\n", - bktr_name(bktr), size); - bus_dmamem_unmap(dmat, kva, size); - bus_dmamem_free(dmat, &seg, rseg); - bus_dmamap_destroy(dmat, *dmapp); - return 0; - } - return (vm_offset_t)kva; -} - -void -free_bktr_mem(bktr, dmap, kva) - bktr_ptr_t bktr; - bus_dmamap_t dmap; - vm_offset_t kva; -{ - bus_dma_tag_t dmat = bktr->dmat; - -#ifdef __NetBSD__ - bus_dmamem_unmap(dmat, (caddr_t)kva, dmap->dm_mapsize); -#else - bus_dmamem_unmap(dmat, (caddr_t)kva, bktr->dm_mapsize); -#endif - bus_dmamem_free(dmat, dmap->dm_segs, 1); - bus_dmamap_destroy(dmat, dmap); -} - - -/*--------------------------------------------------------- -** -** BrookTree 848 character device driver routines -** -**--------------------------------------------------------- -*/ - - -#define VIDEO_DEV 0x00 -#define TUNER_DEV 0x01 -#define VBI_DEV 0x02 - -#define UNIT(x) (dev2unit((x) & 0x0f)) -#define FUNCTION(x) (dev2unit((x >> 4) & 0x0f)) - -/* - * - */ -int -bktr_open(dev_t dev, int flags, int fmt, struct thread *td) -{ - bktr_ptr_t bktr; - int unit; - - unit = UNIT(dev); - - /* unit out of range */ - if ((unit > bktr_cd.cd_ndevs) || (bktr_cd.cd_devs[unit] == NULL)) - return(ENXIO); - - bktr = bktr_cd.cd_devs[unit]; - - if (!(bktr->flags & METEOR_INITALIZED)) /* device not found */ - return(ENXIO); - - switch (FUNCTION(dev)) { - case VIDEO_DEV: - return(video_open(bktr)); - case TUNER_DEV: - return(tuner_open(bktr)); - case VBI_DEV: - return(vbi_open(bktr)); - } - - return(ENXIO); -} - - -/* - * - */ -int -bktr_close(dev_t dev, int flags, int fmt, struct thread *td) -{ - bktr_ptr_t bktr; - int unit; - - unit = UNIT(dev); - - bktr = bktr_cd.cd_devs[unit]; - - switch (FUNCTION(dev)) { - case VIDEO_DEV: - return(video_close(bktr)); - case TUNER_DEV: - return(tuner_close(bktr)); - case VBI_DEV: - return(vbi_close(bktr)); - } - - return(ENXIO); -} - -/* - * - */ -int -bktr_read(dev_t dev, struct uio *uio, int ioflag) -{ - bktr_ptr_t bktr; - int unit; - - unit = UNIT(dev); - - bktr = bktr_cd.cd_devs[unit]; - - switch (FUNCTION(dev)) { - case VIDEO_DEV: - return(video_read(bktr, unit, dev, uio)); - case VBI_DEV: - return(vbi_read(bktr, uio, ioflag)); - } - - return(ENXIO); -} - - -/* - * - */ -int -bktr_write(dev_t dev, struct uio *uio, int ioflag) -{ - /* operation not supported */ - return(EOPNOTSUPP); -} - -/* - * - */ -int -bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td) -{ - bktr_ptr_t bktr; - int unit; - - unit = UNIT(dev); - - bktr = bktr_cd.cd_devs[unit]; - - if (bktr->bigbuf == 0) /* no frame buffer allocated (ioctl failed) */ - return(ENOMEM); - - switch (FUNCTION(dev)) { - case VIDEO_DEV: - return(video_ioctl(bktr, unit, cmd, arg, pr)); - case TUNER_DEV: - return(tuner_ioctl(bktr, unit, cmd, arg, pr)); - } - - return(ENXIO); -} - -/* - * - */ -paddr_t -bktr_mmap(dev_t dev, off_t offset, int nprot) -{ - int unit; - bktr_ptr_t bktr; - - unit = UNIT(dev); - - if (FUNCTION(dev) > 0) /* only allow mmap on /dev/bktr[n] */ - return(-1); - - bktr = bktr_cd.cd_devs[unit]; - - if ((vaddr_t)offset < 0) - return(-1); - - if ((vaddr_t)offset >= bktr->alloc_pages * PAGE_SIZE) - return(-1); - -#ifdef __NetBSD__ - return (bus_dmamem_mmap(bktr->dmat, bktr->dm_mem->dm_segs, 1, - (vaddr_t)offset, nprot, BUS_DMA_WAITOK)); -#else - return(i386_btop(vtophys(bktr->bigbuf) + offset)); -#endif -} - -#endif /* __NetBSD__ || __OpenBSD__ */ diff --git a/sys/dev/bktr/bktr_os.h b/sys/dev/bktr/bktr_os.h deleted file mode 100644 index cd4ea20b3b8d..000000000000 --- a/sys/dev/bktr/bktr_os.h +++ /dev/null @@ -1,87 +0,0 @@ -/* $FreeBSD$ */ - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_os : This has all the Operating System dependent code. - * - */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ - - -/******************************/ -/* *** Memory Allocation *** */ -/******************************/ -#if (defined(__FreeBSD__) || defined(__bsdi__)) -vm_offset_t get_bktr_mem( int unit, unsigned size ); -#endif - -#if (defined(__NetBSD__) || defined(__OpenBSD__)) -vm_offset_t get_bktr_mem(bktr_ptr_t, bus_dmamap_t *, unsigned size); -void free_bktr_mem(bktr_ptr_t, bus_dmamap_t, vm_offset_t); -#endif - -/************************************/ -/* *** Interrupt Enable/Disable *** */ -/************************************/ -#if defined(__FreeBSD__) -#if (__FreeBSD_version >=500000) -#define USE_VBIMUTEX -#define DECLARE_INTR_MASK(s) /* no need to declare 's' */ -#define DISABLE_INTR(s) -#define ENABLE_INTR(s) -#else -#define DECLARE_INTR_MASK(s) intrmask_t s -#define DISABLE_INTR(s) s=spltty() -#define ENABLE_INTR(s) splx(s) -#endif -#else -#define DECLARE_INTR_MASK(s) /* no need to declare 's' */ -#define DISABLE_INTR(s) disable_intr() -#define ENABLE_INTR(s) enable_intr() -#endif - -#ifdef USE_VBIMUTEX -#define LOCK_VBI(bktr) mtx_lock(&bktr->vbimutex) -#define UNLOCK_VBI(bktr) mtx_unlock(&bktr->vbimutex) -#else -#define LOCK_VBI(bktr) -#define UNLOCK_VBI(bktr) -#endif diff --git a/sys/dev/bktr/bktr_reg.h b/sys/dev/bktr/bktr_reg.h deleted file mode 100644 index 16e4bdbeb700..000000000000 --- a/sys/dev/bktr/bktr_reg.h +++ /dev/null @@ -1,730 +0,0 @@ -/*- - * $FreeBSD$ - * - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1999 Roger Hardiman - * Copyright (c) 1998 Amancio Hasty - * Copyright (c) 1995 Mark Tinguely and Jim Lowe - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Mark Tinguely and Jim Lowe - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - * - */ - -#ifdef __NetBSD__ -#include /* device_t */ -#include -#include /* struct selinfo */ -# ifdef DEBUG -# define bootverbose 1 -# else -# define bootverbose 0 -# endif -#endif - -/* - * The kernel options for the driver now all begin with BKTR. - * Support the older kernel options on FreeBSD and OpenBSD. - * - */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) -#if defined(BROOKTREE_ALLOC_PAGES) -#define BKTR_ALLOC_PAGES BROOKTREE_ALLOC_PAGES -#endif - -#if defined(BROOKTREE_SYSTEM_DEFAULT) -#define BKTR_SYSTEM_DEFAULT BROOKTREE_SYSTEM_DEFAULT -#endif - -#if defined(OVERRIDE_CARD) -#define BKTR_OVERRIDE_CARD OVERRIDE_CARD -#endif - -#if defined(OVERRIDE_TUNER) -#define BKTR_OVERRIDE_TUNER OVERRIDE_TUNER -#endif - -#if defined(OVERRIDE_DBX) -#define BKTR_OVERRIDE_DBX OVERRIDE_DBX -#endif - -#if defined(OVERRIDE_MSP) -#define BKTR_OVERRIDE_MSP OVERRIDE_MSP -#endif - -#endif - - -#ifndef PCI_LATENCY_TIMER -#define PCI_LATENCY_TIMER 0x0c /* pci timer register */ -#endif - -/* - * Definitions for the Brooktree 848/878 video capture to pci interface. - */ -#ifndef __NetBSD__ -#define BKTR_PCI_VENDOR_SHIFT 0 -#define BKTR_PCI_VENDOR_MASK 0xffff -#define BKTR_PCI_VENDOR(id) \ - (((id) >> BKTR_PCI_VENDOR_SHIFT) & BKTR_PCI_VENDOR_MASK) - -#define BKTR_PCI_PRODUCT_SHIFT 16 -#define BKTR_PCI_PRODUCT_MASK 0xffff -#define BKTR_PCI_PRODUCT(id) \ - (((id) >> BKTR_PCI_PRODUCT_SHIFT) & BKTR_PCI_PRODUCT_MASK) - -/* PCI vendor ID */ -#define PCI_VENDOR_BROOKTREE 0x109e /* Brooktree */ -/* Brooktree products */ -#define PCI_PRODUCT_BROOKTREE_BT848 0x0350 /* Bt848 Video Capture */ -#define PCI_PRODUCT_BROOKTREE_BT849 0x0351 /* Bt849 Video Capture */ -#define PCI_PRODUCT_BROOKTREE_BT878 0x036e /* Bt878 Video Capture */ -#define PCI_PRODUCT_BROOKTREE_BT879 0x036f /* Bt879 Video Capture */ -#endif - -#define BROOKTREE_848 1 -#define BROOKTREE_848A 2 -#define BROOKTREE_849A 3 -#define BROOKTREE_878 4 -#define BROOKTREE_879 5 - -typedef volatile u_int bregister_t; -/* - * if other persuasion endian, then compiler will probably require that - * these next - * macros be reversed - */ -#define BTBYTE(what) bregister_t what:8; int :24 -#define BTWORD(what) bregister_t what:16; int: 16 -#define BTLONG(what) bregister_t what:32 - -struct bt848_registers { - BTBYTE (dstatus); /* 0, 1,2,3 */ -#define BT848_DSTATUS_PRES (1<<7) -#define BT848_DSTATUS_HLOC (1<<6) -#define BT848_DSTATUS_FIELD (1<<5) -#define BT848_DSTATUS_NUML (1<<4) -#define BT848_DSTATUS_CSEL (1<<3) -#define BT848_DSTATUS_PLOCK (1<<2) -#define BT848_DSTATUS_LOF (1<<1) -#define BT848_DSTATUS_COF (1<<0) - BTBYTE (iform); /* 4, 5,6,7 */ -#define BT848_IFORM_MUXSEL (0x3<<5) -# define BT848_IFORM_M_MUX1 (0x03<<5) -# define BT848_IFORM_M_MUX0 (0x02<<5) -# define BT848_IFORM_M_MUX2 (0x01<<5) -# define BT848_IFORM_M_MUX3 (0x0) -# define BT848_IFORM_M_RSVD (0x00<<5) -#define BT848_IFORM_XTSEL (0x3<<3) -# define BT848_IFORM_X_AUTO (0x03<<3) -# define BT848_IFORM_X_XT1 (0x02<<3) -# define BT848_IFORM_X_XT0 (0x01<<3) -# define BT848_IFORM_X_RSVD (0x00<<3) - BTBYTE (tdec); /* 8, 9,a,b */ - BTBYTE (e_crop); /* c, d,e,f */ - BTBYTE (e_vdelay_lo); /* 10, 11,12,13 */ - BTBYTE (e_vactive_lo); /* 14, 15,16,17 */ - BTBYTE (e_delay_lo); /* 18, 19,1a,1b */ - BTBYTE (e_hactive_lo); /* 1c, 1d,1e,1f */ - BTBYTE (e_hscale_hi); /* 20, 21,22,23 */ - BTBYTE (e_hscale_lo); /* 24, 25,26,27 */ - BTBYTE (bright); /* 28, 29,2a,2b */ - BTBYTE (e_control); /* 2c, 2d,2e,2f */ -#define BT848_E_CONTROL_LNOTCH (1<<7) -#define BT848_E_CONTROL_COMP (1<<6) -#define BT848_E_CONTROL_LDEC (1<<5) -#define BT848_E_CONTROL_CBSENSE (1<<4) -#define BT848_E_CONTROL_RSVD (1<<3) -#define BT848_E_CONTROL_CON_MSB (1<<2) -#define BT848_E_CONTROL_SAT_U_MSB (1<<1) -#define BT848_E_CONTROL_SAT_V_MSB (1<<0) - BTBYTE (contrast_lo); /* 30, 31,32,33 */ - BTBYTE (sat_u_lo); /* 34, 35,36,37 */ - BTBYTE (sat_v_lo); /* 38, 39,3a,3b */ - BTBYTE (hue); /* 3c, 3d,3e,3f */ - BTBYTE (e_scloop); /* 40, 41,42,43 */ -#define BT848_E_SCLOOP_RSVD1 (1<<7) -#define BT848_E_SCLOOP_CAGC (1<<6) -#define BT848_E_SCLOOP_CKILL (1<<5) -#define BT848_E_SCLOOP_HFILT (0x3<<3) -# define BT848_E_SCLOOP_HFILT_ICON (0x3<<3) -# define BT848_E_SCLOOP_HFILT_QCIF (0x2<<3) -# define BT848_E_SCLOOP_HFILT_CIF (0x1<<3) -# define BT848_E_SCLOOP_HFILT_AUTO (0x0<<3) -#define BT848_E_SCLOOP_RSVD0 (0x7<<0) - int :32; /* 44, 45,46,47 */ - BTBYTE (oform); /* 48, 49,4a,4b */ - BTBYTE (e_vscale_hi); /* 4c, 4d,4e,4f */ - BTBYTE (e_vscale_lo); /* 50, 51,52,53 */ - BTBYTE (test); /* 54, 55,56,57 */ - int :32; /* 58, 59,5a,5b */ - int :32; /* 5c, 5d,5e,5f */ - BTLONG (adelay); /* 60, 61,62,63 */ - BTBYTE (bdelay); /* 64, 65,66,67 */ - BTBYTE (adc); /* 68, 69,6a,6b */ -#define BT848_ADC_RESERVED (0x80) /* required pattern */ -#define BT848_ADC_SYNC_T (1<<5) -#define BT848_ADC_AGC_EN (1<<4) -#define BT848_ADC_CLK_SLEEP (1<<3) -#define BT848_ADC_Y_SLEEP (1<<2) -#define BT848_ADC_C_SLEEP (1<<1) -#define BT848_ADC_CRUSH (1<<0) - BTBYTE (e_vtc); /* 6c, 6d,6e,6f */ - int :32; /* 70, 71,72,73 */ - int :32; /* 74, 75,76,77 */ - int :32; /* 78, 79,7a,7b */ - BTLONG (sreset); /* 7c, 7d,7e,7f */ - u_char filler1[0x84-0x80]; - BTBYTE (tgctrl); /* 84, 85,86,87 */ -#define BT848_TGCTRL_TGCKI (3<<3) -#define BT848_TGCTRL_TGCKI_XTAL (0<<3) -#define BT848_TGCTRL_TGCKI_PLL (1<<3) -#define BT848_TGCTRL_TGCKI_GPCLK (2<<3) -#define BT848_TGCTRL_TGCKI_GPCLK_I (3<<3) - u_char filler[0x8c-0x88]; - BTBYTE (o_crop); /* 8c, 8d,8e,8f */ - BTBYTE (o_vdelay_lo); /* 90, 91,92,93 */ - BTBYTE (o_vactive_lo); /* 94, 95,96,97 */ - BTBYTE (o_delay_lo); /* 98, 99,9a,9b */ - BTBYTE (o_hactive_lo); /* 9c, 9d,9e,9f */ - BTBYTE (o_hscale_hi); /* a0, a1,a2,a3 */ - BTBYTE (o_hscale_lo); /* a4, a5,a6,a7 */ - int :32; /* a8, a9,aa,ab */ - BTBYTE (o_control); /* ac, ad,ae,af */ -#define BT848_O_CONTROL_LNOTCH (1<<7) -#define BT848_O_CONTROL_COMP (1<<6) -#define BT848_O_CONTROL_LDEC (1<<5) -#define BT848_O_CONTROL_CBSENSE (1<<4) -#define BT848_O_CONTROL_RSVD (1<<3) -#define BT848_O_CONTROL_CON_MSB (1<<2) -#define BT848_O_CONTROL_SAT_U_MSB (1<<1) -#define BT848_O_CONTROL_SAT_V_MSB (1<<0) - u_char fillter4[16]; - BTBYTE (o_scloop); /* c0, c1,c2,c3 */ -#define BT848_O_SCLOOP_RSVD1 (1<<7) -#define BT848_O_SCLOOP_CAGC (1<<6) -#define BT848_O_SCLOOP_CKILL (1<<5) -#define BT848_O_SCLOOP_HFILT (0x3<<3) -#define BT848_O_SCLOOP_HFILT_ICON (0x3<<3) -#define BT848_O_SCLOOP_HFILT_QCIF (0x2<<3) -#define BT848_O_SCLOOP_HFILT_CIF (0x1<<3) -#define BT848_O_SCLOOP_HFILT_AUTO (0x0<<3) -#define BT848_O_SCLOOP_RSVD0 (0x7<<0) - int :32; /* c4, c5,c6,c7 */ - int :32; /* c8, c9,ca,cb */ - BTBYTE (o_vscale_hi); /* cc, cd,ce,cf */ - BTBYTE (o_vscale_lo); /* d0, d1,d2,d3 */ - BTBYTE (color_fmt); /* d4, d5,d6,d7 */ - bregister_t color_ctl_swap :4; /* d8 */ -#define BT848_COLOR_CTL_WSWAP_ODD (1<<3) -#define BT848_COLOR_CTL_WSWAP_EVEN (1<<2) -#define BT848_COLOR_CTL_BSWAP_ODD (1<<1) -#define BT848_COLOR_CTL_BSWAP_EVEN (1<<0) - bregister_t color_ctl_gamma :1; - bregister_t color_ctl_rgb_ded :1; - bregister_t color_ctl_color_bars :1; - bregister_t color_ctl_ext_frmrate :1; -#define BT848_COLOR_CTL_GAMMA (1<<4) -#define BT848_COLOR_CTL_RGB_DED (1<<5) -#define BT848_COLOR_CTL_COLOR_BARS (1<<6) -#define BT848_COLOR_CTL_EXT_FRMRATE (1<<7) - int :24; /* d9,da,db */ - BTBYTE (cap_ctl); /* dc, dd,de,df */ -#define BT848_CAP_CTL_DITH_FRAME (1<<4) -#define BT848_CAP_CTL_VBI_ODD (1<<3) -#define BT848_CAP_CTL_VBI_EVEN (1<<2) -#define BT848_CAP_CTL_ODD (1<<1) -#define BT848_CAP_CTL_EVEN (1<<0) - BTBYTE (vbi_pack_size); /* e0, e1,e2,e3 */ - BTBYTE (vbi_pack_del); /* e4, e5,e6,e7 */ - int :32; /* e8, e9,ea,eb */ - BTBYTE (o_vtc); /* ec, ed,ee,ef */ - BTBYTE (pll_f_lo); /* f0, f1,f2,f3 */ - BTBYTE (pll_f_hi); /* f4, f5,f6,f7 */ - BTBYTE (pll_f_xci); /* f8, f9,fa,fb */ -#define BT848_PLL_F_C (1<<6) -#define BT848_PLL_F_X (1<<7) - u_char filler2[0x100-0xfc]; - BTLONG (int_stat); /* 100, 101,102,103 */ - BTLONG (int_mask); /* 104, 105,106,107 */ -#define BT848_INT_RISCS (0xf<<28) -#define BT848_INT_RISC_EN (1<<27) -#define BT848_INT_RACK (1<<25) -#define BT848_INT_FIELD (1<<24) -#define BT848_INT_MYSTERYBIT (1<<23) -#define BT848_INT_SCERR (1<<19) -#define BT848_INT_OCERR (1<<18) -#define BT848_INT_PABORT (1<<17) -#define BT848_INT_RIPERR (1<<16) -#define BT848_INT_PPERR (1<<15) -#define BT848_INT_FDSR (1<<14) -#define BT848_INT_FTRGT (1<<13) -#define BT848_INT_FBUS (1<<12) -#define BT848_INT_RISCI (1<<11) -#define BT848_INT_GPINT (1<<9) -#define BT848_INT_I2CDONE (1<<8) -#define BT848_INT_RSV1 (1<<7) -#define BT848_INT_RSV0 (1<<6) -#define BT848_INT_VPRES (1<<5) -#define BT848_INT_HLOCK (1<<4) -#define BT848_INT_OFLOW (1<<3) -#define BT848_INT_HSYNC (1<<2) -#define BT848_INT_VSYNC (1<<1) -#define BT848_INT_FMTCHG (1<<0) - int :32; /* 108, 109,10a,10b */ - BTWORD (gpio_dma_ctl); /* 10c, 10d,10e,10f */ -#define BT848_DMA_CTL_PL23TP4 (0<<6) /* planar1 trigger 4 */ -#define BT848_DMA_CTL_PL23TP8 (1<<6) /* planar1 trigger 8 */ -#define BT848_DMA_CTL_PL23TP16 (2<<6) /* planar1 trigger 16 */ -#define BT848_DMA_CTL_PL23TP32 (3<<6) /* planar1 trigger 32 */ -#define BT848_DMA_CTL_PL1TP4 (0<<4) /* planar1 trigger 4 */ -#define BT848_DMA_CTL_PL1TP8 (1<<4) /* planar1 trigger 8 */ -#define BT848_DMA_CTL_PL1TP16 (2<<4) /* planar1 trigger 16 */ -#define BT848_DMA_CTL_PL1TP32 (3<<4) /* planar1 trigger 32 */ -#define BT848_DMA_CTL_PKTP4 (0<<2) /* packed trigger 4 */ -#define BT848_DMA_CTL_PKTP8 (1<<2) /* packed trigger 8 */ -#define BT848_DMA_CTL_PKTP16 (2<<2) /* packed trigger 16 */ -#define BT848_DMA_CTL_PKTP32 (3<<2) /* packed trigger 32 */ -#define BT848_DMA_CTL_RISC_EN (1<<1) -#define BT848_DMA_CTL_FIFO_EN (1<<0) - BTLONG (i2c_data_ctl); /* 110, 111,112,113 */ -#define BT848_DATA_CTL_I2CDIV (0xf<<4) -#define BT848_DATA_CTL_I2CSYNC (1<<3) -#define BT848_DATA_CTL_I2CW3B (1<<2) -#define BT848_DATA_CTL_I2CSCL (1<<1) -#define BT848_DATA_CTL_I2CSDA (1<<0) - BTLONG (risc_strt_add); /* 114, 115,116,117 */ - BTLONG (gpio_out_en); /* 118, 119,11a,11b */ /* really 24 bits */ - BTLONG (gpio_reg_inp); /* 11c, 11d,11e,11f */ /* really 24 bits */ - BTLONG (risc_count); /* 120, 121,122,123 */ - u_char filler3[0x200-0x124]; - BTLONG (gpio_data); /* 200, 201,202,203 */ /* really 24 bits */ -}; - - -#define BKTR_DSTATUS 0x000 -#define BKTR_IFORM 0x004 -#define BKTR_TDEC 0x008 -#define BKTR_E_CROP 0x00C -#define BKTR_O_CROP 0x08C -#define BKTR_E_VDELAY_LO 0x010 -#define BKTR_O_VDELAY_LO 0x090 -#define BKTR_E_VACTIVE_LO 0x014 -#define BKTR_O_VACTIVE_LO 0x094 -#define BKTR_E_DELAY_LO 0x018 -#define BKTR_O_DELAY_LO 0x098 -#define BKTR_E_HACTIVE_LO 0x01C -#define BKTR_O_HACTIVE_LO 0x09C -#define BKTR_E_HSCALE_HI 0x020 -#define BKTR_O_HSCALE_HI 0x0A0 -#define BKTR_E_HSCALE_LO 0x024 -#define BKTR_O_HSCALE_LO 0x0A4 -#define BKTR_BRIGHT 0x028 -#define BKTR_E_CONTROL 0x02C -#define BKTR_O_CONTROL 0x0AC -#define BKTR_CONTRAST_LO 0x030 -#define BKTR_SAT_U_LO 0x034 -#define BKTR_SAT_V_LO 0x038 -#define BKTR_HUE 0x03C -#define BKTR_E_SCLOOP 0x040 -#define BKTR_O_SCLOOP 0x0C0 -#define BKTR_OFORM 0x048 -#define BKTR_E_VSCALE_HI 0x04C -#define BKTR_O_VSCALE_HI 0x0CC -#define BKTR_E_VSCALE_LO 0x050 -#define BKTR_O_VSCALE_LO 0x0D0 -#define BKTR_TEST 0x054 -#define BKTR_ADELAY 0x060 -#define BKTR_BDELAY 0x064 -#define BKTR_ADC 0x068 -#define BKTR_E_VTC 0x06C -#define BKTR_O_VTC 0x0EC -#define BKTR_SRESET 0x07C -#define BKTR_COLOR_FMT 0x0D4 -#define BKTR_COLOR_CTL 0x0D8 -#define BKTR_CAP_CTL 0x0DC -#define BKTR_VBI_PACK_SIZE 0x0E0 -#define BKTR_VBI_PACK_DEL 0x0E4 -#define BKTR_INT_STAT 0x100 -#define BKTR_INT_MASK 0x104 -#define BKTR_RISC_COUNT 0x120 -#define BKTR_RISC_STRT_ADD 0x114 -#define BKTR_GPIO_DMA_CTL 0x10C -#define BKTR_GPIO_OUT_EN 0x118 -#define BKTR_GPIO_REG_INP 0x11C -#define BKTR_GPIO_DATA 0x200 -#define BKTR_I2C_DATA_CTL 0x110 -#define BKTR_TGCTRL 0x084 -#define BKTR_PLL_F_LO 0x0F0 -#define BKTR_PLL_F_HI 0x0F4 -#define BKTR_PLL_F_XCI 0x0F8 - -/* - * device support for onboard tv tuners - */ - -/* description of the LOGICAL tuner */ -struct TVTUNER { - int frequency; - u_char chnlset; - u_char channel; - u_char band; - u_char afc; - u_char radio_mode; /* current mode of the radio mode */ -}; - -/* description of the PHYSICAL tuner */ -struct TUNER { - char* name; - u_char type; - u_char pllControl[4]; - u_char bandLimits[ 2 ]; - u_char bandAddrs[ 4 ]; /* 3 first for the 3 TV - ** bands. Last for radio - ** band (0x00=NoRadio). - */ - -}; - -/* description of the card */ -#define EEPROMBLOCKSIZE 32 -struct CARDTYPE { - unsigned int card_id; /* card id (from #define's) */ - char* name; - const struct TUNER* tuner; /* Tuner details */ - u_char tuner_pllAddr; /* Tuner i2c address */ - u_char dbx; /* Has DBX chip? */ - u_char msp3400c; /* Has msp3400c chip? */ - u_char dpl3518a; /* Has dpl3518a chip? */ - u_char eepromAddr; - u_char eepromSize; /* bytes / EEPROMBLOCKSIZE */ - u_int audiomuxs[ 5 ]; /* tuner, ext (line-in) */ - /* int/unused (radio) */ - /* mute, present */ - u_int gpio_mux_bits; /* GPIO mask for audio mux */ -}; - -struct format_params { - /* Total lines, lines before image, image lines */ - int vtotal, vdelay, vactive; - /* Total unscaled horizontal pixels, pixels before image, image pixels */ - int htotal, hdelay, hactive; - /* Scaled horizontal image pixels, Total Scaled horizontal pixels */ - int scaled_hactive, scaled_htotal; - /* frame rate . for ntsc is 30 frames per second */ - int frame_rate; - /* A-delay and B-delay */ - u_char adelay, bdelay; - /* Iform XTSEL value */ - int iform_xtsel; - /* VBI number of lines per field, and number of samples per line */ - int vbi_num_lines, vbi_num_samples; -}; - -#if defined(BKTR_USE_FREEBSD_SMBUS) -struct bktr_i2c_softc { - int bus_owned; - - device_t iicbb; - device_t smbus; -}; -#endif - - -/* Bt848/878 register access - * The registers can either be access via a memory mapped structure - * or accessed via bus_space. - * bus_0pace access allows cross platform support, where as the - * memory mapped structure method only works on 32 bit processors - * with the right type of endianness. - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) -#define INB(bktr,offset) bus_space_read_1((bktr)->memt,(bktr)->memh,(offset)) -#define INW(bktr,offset) bus_space_read_2((bktr)->memt,(bktr)->memh,(offset)) -#define INL(bktr,offset) bus_space_read_4((bktr)->memt,(bktr)->memh,(offset)) -#define OUTB(bktr,offset,value) bus_space_write_1((bktr)->memt,(bktr)->memh,(offset),(value)) -#define OUTW(bktr,offset,value) bus_space_write_2((bktr)->memt,(bktr)->memh,(offset),(value)) -#define OUTL(bktr,offset,value) bus_space_write_4((bktr)->memt,(bktr)->memh,(offset),(value)) -#else -#define INB(bktr,offset) *(volatile unsigned char*) ((int)((bktr)->memh)+(offset)) -#define INW(bktr,offset) *(volatile unsigned short*)((int)((bktr)->memh)+(offset)) -#define INL(bktr,offset) *(volatile unsigned int*) ((int)((bktr)->memh)+(offset)) -#define OUTB(bktr,offset,value) *(volatile unsigned char*) ((int)((bktr)->memh)+(offset)) = (value) -#define OUTW(bktr,offset,value) *(volatile unsigned short*)((int)((bktr)->memh)+(offset)) = (value) -#define OUTL(bktr,offset,value) *(volatile unsigned int*) ((int)((bktr)->memh)+(offset)) = (value) -#endif - - -typedef struct bktr_clip bktr_clip_t; - -/* - * BrookTree 848 info structure, one per bt848 card installed. - */ -struct bktr_softc { - -#if defined (__bsdi__) - struct device bktr_dev; /* base device */ - struct isadev bktr_id; /* ISA device */ - struct intrhand bktr_ih; /* interrupt vectoring */ - #define pcici_t pci_devaddr_t -#endif - -#if defined(__NetBSD__) - struct device bktr_dev; /* base device */ - bus_dma_tag_t dmat; /* DMA tag */ - bus_space_tag_t memt; - bus_space_handle_t memh; - bus_size_t obmemsz; /* size of en card (bytes) */ - void *ih; - bus_dmamap_t dm_prog; - bus_dmamap_t dm_oprog; - bus_dmamap_t dm_mem; - bus_dmamap_t dm_vbidata; - bus_dmamap_t dm_vbibuffer; -#endif - -#if defined(__OpenBSD__) - struct device bktr_dev; /* base device */ - bus_dma_tag_t dmat; /* DMA tag */ - bus_space_tag_t memt; - bus_space_handle_t memh; - bus_size_t obmemsz; /* size of en card (bytes) */ - void *ih; - bus_dmamap_t dm_prog; - bus_dmamap_t dm_oprog; - bus_dmamap_t dm_mem; - bus_dmamap_t dm_vbidata; - bus_dmamap_t dm_vbibuffer; - size_t dm_mapsize; - pci_chipset_tag_t pc; /* Opaque PCI chipset tag */ - pcitag_t tag; /* PCI tag, for doing PCI commands */ - vm_offset_t phys_base; /* Bt848 register physical address */ -#endif - -#if defined (__FreeBSD__) - int mem_rid; /* 4.x resource id */ - struct resource *res_mem; /* 4.x resource descriptor for registers */ - int irq_rid; /* 4.x resource id */ - struct resource *res_irq; /* 4.x resource descriptor for interrupt */ - void *res_ih; /* 4.x newbus interrupt handler cookie */ - struct cdev *bktrdev; /* 4.x device entry for /dev/bktrN */ - struct cdev *tunerdev; /* 4.x device entry for /dev/tunerN */ - struct cdev *vbidev; /* 4.x device entry for /dev/vbiN */ - struct cdev *bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */ - struct cdev *tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */ - struct cdev *vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */ - #if (__FreeBSD_version >= 500000) - struct mtx vbimutex; /* Mutex protecting vbi buffer */ - #endif - bus_space_tag_t memt; /* Bus space register access functions */ - bus_space_handle_t memh; /* Bus space register access functions */ - bus_size_t obmemsz;/* Size of card (bytes) */ -#if defined(BKTR_USE_FREEBSD_SMBUS) - struct bktr_i2c_softc i2c_sc; /* bt848_i2c device */ -#endif - char bktr_xname[7]; /* device name and unit number */ -#endif - - - /* The following definitions are for the contiguous memory */ -#ifdef __NetBSD__ - vaddr_t bigbuf; /* buffer that holds the captured image */ - vaddr_t vbidata; /* RISC program puts VBI data from the current frame here */ - vaddr_t vbibuffer; /* Circular buffer holding VBI data for the user */ - vaddr_t dma_prog; /* RISC prog for single and/or even field capture*/ - vaddr_t odd_dma_prog; /* RISC program for Odd field capture */ -#else - vm_offset_t bigbuf; /* buffer that holds the captured image */ - vm_offset_t vbidata; /* RISC program puts VBI data from the current frame here */ - vm_offset_t vbibuffer; /* Circular buffer holding VBI data for the user */ - vm_offset_t dma_prog; /* RISC prog for single and/or even field capture*/ - vm_offset_t odd_dma_prog;/* RISC program for Odd field capture */ -#endif - - - /* the following definitions are common over all platforms */ - int alloc_pages; /* number of pages in bigbuf */ - int vbiinsert; /* Position for next write into circular buffer */ - int vbistart; /* Position of last read from circular buffer */ - int vbisize; /* Number of bytes in the circular buffer */ - uint32_t vbi_sequence_number; /* sequence number for VBI */ - int vbi_read_blocked; /* user process blocked on read() from /dev/vbi */ - struct selinfo vbi_select; /* Data used by select() on /dev/vbi */ - - - struct proc *proc; /* process to receive raised signal */ - int signal; /* signal to send to process */ - int clr_on_start; /* clear cap buf on capture start? */ -#define METEOR_SIG_MODE_MASK 0xffff0000 -#define METEOR_SIG_FIELD_MODE 0x00010000 -#define METEOR_SIG_FRAME_MODE 0x00000000 - char dma_prog_loaded; - struct meteor_mem *mem; /* used to control sync. multi-frame output */ - u_long synch_wait; /* wait for free buffer before continuing */ - short current; /* frame number in buffer (1-frames) */ - short rows; /* number of rows in a frame */ - short cols; /* number of columns in a frame */ - int capture_area_x_offset; /* Usually the full 640x480(NTSC) image is */ - int capture_area_y_offset; /* captured. The capture area allows for */ - int capture_area_x_size; /* example 320x200 pixels from the centre */ - int capture_area_y_size; /* of the video image to be captured. */ - char capture_area_enabled; /* When TRUE use user's capture area. */ - int pixfmt; /* active pixel format (idx into fmt tbl) */ - int pixfmt_compat; /* Y/N - in meteor pix fmt compat mode */ - u_long format; /* frame format rgb, yuv, etc.. */ - short frames; /* number of frames allocated */ - int frame_size; /* number of bytes in a frame */ - u_long fifo_errors; /* number of fifo capture errors since open */ - u_long dma_errors; /* number of DMA capture errors since open */ - u_long frames_captured;/* number of frames captured since open */ - u_long even_fields_captured; /* number of even fields captured */ - u_long odd_fields_captured; /* number of odd fields captured */ - u_long range_enable; /* enable range checking ?? */ - u_short capcontrol; /* reg 0xdc capture control */ - u_short bktr_cap_ctl; - volatile u_int flags; -#define METEOR_INITALIZED 0x00000001 -#define METEOR_OPEN 0x00000002 -#define METEOR_MMAP 0x00000004 -#define METEOR_INTR 0x00000008 -#define METEOR_READ 0x00000010 /* XXX never gets referenced */ -#define METEOR_SINGLE 0x00000020 /* get single frame */ -#define METEOR_CONTIN 0x00000040 /* continuously get frames */ -#define METEOR_SYNCAP 0x00000080 /* synchronously get frames */ -#define METEOR_CAP_MASK 0x000000f0 -#define METEOR_NTSC 0x00000100 -#define METEOR_PAL 0x00000200 -#define METEOR_SECAM 0x00000400 -#define BROOKTREE_NTSC 0x00000100 /* used in video open() and */ -#define BROOKTREE_PAL 0x00000200 /* in the kernel config */ -#define BROOKTREE_SECAM 0x00000400 /* file */ -#define METEOR_AUTOMODE 0x00000800 -#define METEOR_FORM_MASK 0x00000f00 -#define METEOR_DEV0 0x00001000 -#define METEOR_DEV1 0x00002000 -#define METEOR_DEV2 0x00004000 -#define METEOR_DEV3 0x00008000 -#define METEOR_DEV_SVIDEO 0x00006000 -#define METEOR_DEV_RGB 0x0000a000 -#define METEOR_DEV_MASK 0x0000f000 -#define METEOR_RGB16 0x00010000 -#define METEOR_RGB24 0x00020000 -#define METEOR_YUV_PACKED 0x00040000 -#define METEOR_YUV_PLANAR 0x00080000 -#define METEOR_WANT_EVEN 0x00100000 /* want even frame */ -#define METEOR_WANT_ODD 0x00200000 /* want odd frame */ -#define METEOR_WANT_MASK 0x00300000 -#define METEOR_ONLY_EVEN_FIELDS 0x01000000 -#define METEOR_ONLY_ODD_FIELDS 0x02000000 -#define METEOR_ONLY_FIELDS_MASK 0x03000000 -#define METEOR_YUV_422 0x04000000 -#define METEOR_OUTPUT_FMT_MASK 0x040f0000 -#define METEOR_WANT_TS 0x08000000 /* time-stamp a frame */ -#define METEOR_RGB 0x20000000 /* meteor rgb unit */ -#define METEOR_FIELD_MODE 0x80000000 - u_char tflags; /* Tuner flags (/dev/tuner) */ -#define TUNER_INITALIZED 0x00000001 -#define TUNER_OPEN 0x00000002 - u_char vbiflags; /* VBI flags (/dev/vbi) */ -#define VBI_INITALIZED 0x00000001 -#define VBI_OPEN 0x00000002 -#define VBI_CAPTURE 0x00000004 - u_short fps; /* frames per second */ - struct meteor_video video; - struct TVTUNER tuner; - struct CARDTYPE card; - u_char audio_mux_select; /* current mode of the audio */ - u_char audio_mute_state; /* mute state of the audio */ - u_char format_params; - u_long current_sol; - u_long current_col; - int clip_start; - int line_length; - int last_y; - int y; - int y2; - int yclip; - int yclip2; - int max_clip_node; - bktr_clip_t clip_list[100]; - int reverse_mute; /* Swap the GPIO values for Mute and TV Audio */ - int bt848_tuner; - int bt848_card; - u_long id; -#define BT848_USE_XTALS 0 -#define BT848_USE_PLL 1 - int xtal_pll_mode; /* Use XTAL or PLL mode for PAL/SECAM */ - int remote_control; /* remote control detected */ - int remote_control_addr; /* remote control i2c address */ - char msp_version_string[9]; /* MSP version string 34xxx-xx */ - int msp_addr; /* MSP i2c address */ - char dpl_version_string[9]; /* DPL version string 35xxx-xx */ - int dpl_addr; /* DPL i2c address */ - int slow_msp_audio; /* 0 = use fast MSP3410/3415 programming sequence */ - /* 1 = use slow MSP3410/3415 programming sequence */ - /* 2 = use Tuner's Mono audio output via the MSP chip */ - int msp_use_mono_source; /* use Tuner's Mono audio output via the MSP chip */ - int audio_mux_present; /* 1 = has audio mux on GPIO lines, 0 = no audio mux */ - int msp_source_selected; /* 0 = TV source, 1 = Line In source, 2 = FM Radio Source */ - -#ifdef BKTR_NEW_MSP34XX_DRIVER - /* msp3400c related data */ - void * msp3400c_info; - int stereo_once; - int amsound; - int mspsimple; - int dolby; -#endif - -}; - -typedef struct bktr_softc bktr_reg_t; -typedef struct bktr_softc* bktr_ptr_t; - -#define Bt848_MAX_SIGN 16 - -struct bt848_card_sig { - int card; - int tuner; - u_char signature[Bt848_MAX_SIGN]; -}; - - -/***********************************************************/ -/* ioctl_cmd_t int on old versions, u_long on new versions */ -/***********************************************************/ - -#if defined(__FreeBSD__) -typedef u_long ioctl_cmd_t; -#endif - -#if defined(__NetBSD__) || defined(__OpenBSD__) -typedef u_long ioctl_cmd_t; -#endif - - diff --git a/sys/dev/bktr/bktr_tuner.c b/sys/dev/bktr/bktr_tuner.c deleted file mode 100644 index e17a4fb89a71..000000000000 --- a/sys/dev/bktr/bktr_tuner.c +++ /dev/null @@ -1,1436 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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 -__FBSDID("$FreeBSD$"); - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_tuner : This deals with controlling the tuner fitted to TV cards. - */ - -#include -#include -#include -#ifdef __NetBSD__ -#include -#endif - -#ifdef __FreeBSD__ -#if (__FreeBSD_version < 500000) -#include /* for DELAY */ -#include -#else -#include -#include -#include -#include -#endif - -#include -#include -#endif - -#ifdef __NetBSD__ -#include /* NetBSD .h file location */ -#include -#include -#include -#include -#else -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include -#include -#include -#endif - - - -#if defined( TUNER_AFC ) -#define AFC_DELAY 10000 /* 10 millisend delay */ -#define AFC_BITS 0x07 -#define AFC_FREQ_MINUS_125 0x00 -#define AFC_FREQ_MINUS_62 0x01 -#define AFC_FREQ_CENTERED 0x02 -#define AFC_FREQ_PLUS_62 0x03 -#define AFC_FREQ_PLUS_125 0x04 -#define AFC_MAX_STEP (5 * FREQFACTOR) /* no more than 5 MHz */ -#endif /* TUNER_AFC */ - - -#define TTYPE_XXX 0 -#define TTYPE_NTSC 1 -#define TTYPE_NTSC_J 2 -#define TTYPE_PAL 3 -#define TTYPE_PAL_M 4 -#define TTYPE_PAL_N 5 -#define TTYPE_SECAM 6 - -#define TSA552x_CB_MSB (0x80) -#define TSA552x_CB_CP (1<<6) /* set this for fast tuning */ -#define TSA552x_CB_T2 (1<<5) /* test mode - Normally set to 0 */ -#define TSA552x_CB_T1 (1<<4) /* test mode - Normally set to 0 */ -#define TSA552x_CB_T0 (1<<3) /* test mode - Normally set to 1 */ -#define TSA552x_CB_RSA (1<<2) /* 0 for 31.25 khz, 1 for 62.5 kHz */ -#define TSA552x_CB_RSB (1<<1) /* 0 for FM 50kHz steps, 1 = Use RSA*/ -#define TSA552x_CB_OS (1<<0) /* Set to 0 for normal operation */ - -#define TSA552x_RADIO (TSA552x_CB_MSB | \ - TSA552x_CB_T0) - -/* raise the charge pump voltage for fast tuning */ -#define TSA552x_FCONTROL (TSA552x_CB_MSB | \ - TSA552x_CB_CP | \ - TSA552x_CB_T0 | \ - TSA552x_CB_RSA | \ - TSA552x_CB_RSB) - -/* lower the charge pump voltage for better residual oscillator FM */ -#define TSA552x_SCONTROL (TSA552x_CB_MSB | \ - TSA552x_CB_T0 | \ - TSA552x_CB_RSA | \ - TSA552x_CB_RSB) - -/* The control value for the ALPS TSCH5 Tuner */ -#define TSCH5_FCONTROL 0x82 -#define TSCH5_RADIO 0x86 - -/* The control value for the ALPS TSBH1 Tuner */ -#define TSBH1_FCONTROL 0xce - - -static void mt2032_set_tv_freq(bktr_ptr_t bktr, unsigned int freq); - - -static const struct TUNER tuners[] = { -/* XXX FIXME: fill in the band-switch crosspoints */ - /* NO_TUNER */ - { "", /* the 'name' */ - TTYPE_XXX, /* input type */ - { 0x00, /* control byte for Tuner PLL */ - 0x00, - 0x00, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x00, 0x00, 0x00,0x00} }, /* the band-switch values */ - - /* TEMIC_NTSC */ - { "Temic NTSC", /* the 'name' */ - TTYPE_NTSC, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00}, /* band-switch crosspoints */ - { 0x02, 0x04, 0x01, 0x00 } }, /* the band-switch values */ - - /* TEMIC_PAL */ - { "Temic PAL", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x02, 0x04, 0x01, 0x00 } }, /* the band-switch values */ - - /* TEMIC_SECAM */ - { "Temic SECAM", /* the 'name' */ - TTYPE_SECAM, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x02, 0x04, 0x01,0x00 } }, /* the band-switch values */ - - /* PHILIPS_NTSC */ - { "Philips NTSC", /* the 'name' */ - TTYPE_NTSC, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30, 0x00 } }, /* the band-switch values */ - - /* PHILIPS_PAL */ - { "Philips PAL", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30, 0x00 } }, /* the band-switch values */ - - /* PHILIPS_SECAM */ - { "Philips SECAM", /* the 'name' */ - TTYPE_SECAM, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa7, 0x97, 0x37, 0x00 } }, /* the band-switch values */ - - /* TEMIC_PAL I */ - { "Temic PAL I", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x02, 0x04, 0x01,0x00 } }, /* the band-switch values */ - - /* PHILIPS_PALI */ - { "Philips PAL I", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30,0x00 } }, /* the band-switch values */ - - /* PHILIPS_FR1236_NTSC */ - { "Philips FR1236 NTSC FM", /* the 'name' */ - TTYPE_NTSC, /* input type */ - { TSA552x_FCONTROL, /* control byte for Tuner PLL */ - TSA552x_FCONTROL, - TSA552x_FCONTROL, - TSA552x_RADIO }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30,0xa4 } }, /* the band-switch values */ - - /* PHILIPS_FR1216_PAL */ - { "Philips FR1216 PAL FM" , /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_FCONTROL, /* control byte for Tuner PLL */ - TSA552x_FCONTROL, - TSA552x_FCONTROL, - TSA552x_RADIO }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30, 0xa4 } }, /* the band-switch values */ - - /* PHILIPS_FR1236_SECAM */ - { "Philips FR1236 SECAM FM", /* the 'name' */ - TTYPE_SECAM, /* input type */ - { TSA552x_FCONTROL, /* control byte for Tuner PLL */ - TSA552x_FCONTROL, - TSA552x_FCONTROL, - TSA552x_RADIO }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa7, 0x97, 0x37, 0xa4 } }, /* the band-switch values */ - - /* ALPS TSCH5 NTSC */ - { "ALPS TSCH5 NTSC FM", /* the 'name' */ - TTYPE_NTSC, /* input type */ - { TSCH5_FCONTROL, /* control byte for Tuner PLL */ - TSCH5_FCONTROL, - TSCH5_FCONTROL, - TSCH5_RADIO }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x14, 0x12, 0x11, 0x04 } }, /* the band-switch values */ - - /* ALPS TSBH1 NTSC */ - { "ALPS TSBH1 NTSC", /* the 'name' */ - TTYPE_NTSC, /* input type */ - { TSBH1_FCONTROL, /* control byte for Tuner PLL */ - TSBH1_FCONTROL, - TSBH1_FCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x01, 0x02, 0x08, 0x00 } }, /* the band-switch values */ - - /* MT2032 Microtune */ - { "MT2032", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30, 0x00 } }, /* the band-switch values */ - - /* LG TPI8PSB12P PAL */ - { "LG TPI8PSB12P PAL", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSA552x_SCONTROL, /* control byte for Tuner PLL */ - TSA552x_SCONTROL, - TSA552x_SCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0xa0, 0x90, 0x30, 0x8e } }, /* the band-switch values */ - - /* PHILIPS FI1216 */ - { "PHILIPS_FI1216", /* the 'name' */ - TTYPE_PAL, /* input type */ - { TSBH1_FCONTROL, /* control byte for Tuner PLL */ - TSBH1_FCONTROL, - TSBH1_FCONTROL, - 0x00 }, - { 0x00, 0x00 }, /* band-switch crosspoints */ - { 0x01, 0x02, 0x04, 0x00 } }, /* the band-switch values */ -}; - - -/* scaling factor for frequencies expressed as ints */ -#define FREQFACTOR 16 - -/* - * Format: - * entry 0: MAX legal channel - * entry 1: IF frequency - * expressed as fi{mHz} * 16, - * eg 45.75mHz == 45.75 * 16 = 732 - * entry 2: [place holder/future] - * entry 3: base of channel record 0 - * entry 3 + (x*3): base of channel record 'x' - * entry LAST: NULL channel entry marking end of records - * - * Record: - * int 0: base channel - * int 1: frequency of base channel, - * expressed as fb{mHz} * 16, - * int 2: offset frequency between channels, - * expressed as fo{mHz} * 16, - */ - -/* - * North American Broadcast Channels: - * - * 2: 55.25 mHz - 4: 67.25 mHz - * 5: 77.25 mHz - 6: 83.25 mHz - * 7: 175.25 mHz - 13: 211.25 mHz - * 14: 471.25 mHz - 83: 885.25 mHz - * - * IF freq: 45.75 mHz - */ -#define OFFSET 6.00 -static int nabcst[] = { - 83, (int)( 45.75 * FREQFACTOR), 0, - 14, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 5, (int)( 77.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 2, (int)( 55.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 -}; -#undef OFFSET - -/* - * North American Cable Channels, IRC: - * - * 2: 55.25 mHz - 4: 67.25 mHz - * 5: 77.25 mHz - 6: 83.25 mHz - * 7: 175.25 mHz - 13: 211.25 mHz - * 14: 121.25 mHz - 22: 169.25 mHz - * 23: 217.25 mHz - 94: 643.25 mHz - * 95: 91.25 mHz - 99: 115.25 mHz - * - * IF freq: 45.75 mHz - */ -#define OFFSET 6.00 -static int irccable[] = { - 116, (int)( 45.75 * FREQFACTOR), 0, - 100, (int)(649.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 95, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 23, (int)(217.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 14, (int)(121.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 5, (int)( 77.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 2, (int)( 55.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 -}; -#undef OFFSET - -/* - * North American Cable Channels, HRC: - * - * 2: 54 mHz - 4: 66 mHz - * 5: 78 mHz - 6: 84 mHz - * 7: 174 mHz - 13: 210 mHz - * 14: 120 mHz - 22: 168 mHz - * 23: 216 mHz - 94: 642 mHz - * 95: 90 mHz - 99: 114 mHz - * - * IF freq: 45.75 mHz - */ -#define OFFSET 6.00 -static int hrccable[] = { - 116, (int)( 45.75 * FREQFACTOR), 0, - 100, (int)(648.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 95, (int)( 90.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 23, (int)(216.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 14, (int)(120.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 7, (int)(174.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 5, (int)( 78.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 2, (int)( 54.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 -}; -#undef OFFSET - -/* - * Western European broadcast channels: - * - * (there are others that appear to vary between countries - rmt) - * - * here's the table Philips provides: - * caution, some of the offsets don't compute... - * - * 1 4525 700 N21 - * - * 2 4825 700 E2 - * 3 5525 700 E3 - * 4 6225 700 E4 - * - * 5 17525 700 E5 - * 6 18225 700 E6 - * 7 18925 700 E7 - * 8 19625 700 E8 - * 9 20325 700 E9 - * 10 21025 700 E10 - * 11 21725 700 E11 - * 12 22425 700 E12 - * - * 13 5375 700 ITA - * 14 6225 700 ITB - * - * 15 8225 700 ITC - * - * 16 17525 700 ITD - * 17 18325 700 ITE - * - * 18 19225 700 ITF - * 19 20125 700 ITG - * 20 21025 700 ITH - * - * 21 47125 800 E21 - * 22 47925 800 E22 - * 23 48725 800 E23 - * 24 49525 800 E24 - * 25 50325 800 E25 - * 26 51125 800 E26 - * 27 51925 800 E27 - * 28 52725 800 E28 - * 29 53525 800 E29 - * 30 54325 800 E30 - * 31 55125 800 E31 - * 32 55925 800 E32 - * 33 56725 800 E33 - * 34 57525 800 E34 - * 35 58325 800 E35 - * 36 59125 800 E36 - * 37 59925 800 E37 - * 38 60725 800 E38 - * 39 61525 800 E39 - * 40 62325 800 E40 - * 41 63125 800 E41 - * 42 63925 800 E42 - * 43 64725 800 E43 - * 44 65525 800 E44 - * 45 66325 800 E45 - * 46 67125 800 E46 - * 47 67925 800 E47 - * 48 68725 800 E48 - * 49 69525 800 E49 - * 50 70325 800 E50 - * 51 71125 800 E51 - * 52 71925 800 E52 - * 53 72725 800 E53 - * 54 73525 800 E54 - * 55 74325 800 E55 - * 56 75125 800 E56 - * 57 75925 800 E57 - * 58 76725 800 E58 - * 59 77525 800 E59 - * 60 78325 800 E60 - * 61 79125 800 E61 - * 62 79925 800 E62 - * 63 80725 800 E63 - * 64 81525 800 E64 - * 65 82325 800 E65 - * 66 83125 800 E66 - * 67 83925 800 E67 - * 68 84725 800 E68 - * 69 85525 800 E69 - * - * 70 4575 800 IA - * 71 5375 800 IB - * 72 6175 800 IC - * - * 74 6925 700 S01 - * 75 7625 700 S02 - * 76 8325 700 S03 - * - * 80 10525 700 S1 - * 81 11225 700 S2 - * 82 11925 700 S3 - * 83 12625 700 S4 - * 84 13325 700 S5 - * 85 14025 700 S6 - * 86 14725 700 S7 - * 87 15425 700 S8 - * 88 16125 700 S9 - * 89 16825 700 S10 - * 90 23125 700 S11 - * 91 23825 700 S12 - * 92 24525 700 S13 - * 93 25225 700 S14 - * 94 25925 700 S15 - * 95 26625 700 S16 - * 96 27325 700 S17 - * 97 28025 700 S18 - * 98 28725 700 S19 - * 99 29425 700 S20 - * - * - * Channels S21 - S41 are taken from - * http://gemma.apple.com:80/dev/technotes/tn/tn1012.html - * - * 100 30325 800 S21 - * 101 31125 800 S22 - * 102 31925 800 S23 - * 103 32725 800 S24 - * 104 33525 800 S25 - * 105 34325 800 S26 - * 106 35125 800 S27 - * 107 35925 800 S28 - * 108 36725 800 S29 - * 109 37525 800 S30 - * 110 38325 800 S31 - * 111 39125 800 S32 - * 112 39925 800 S33 - * 113 40725 800 S34 - * 114 41525 800 S35 - * 115 42325 800 S36 - * 116 43125 800 S37 - * 117 43925 800 S38 - * 118 44725 800 S39 - * 119 45525 800 S40 - * 120 46325 800 S41 - * - * 121 3890 000 IFFREQ - * - */ -static int weurope[] = { - 121, (int)( 38.90 * FREQFACTOR), 0, - 100, (int)(303.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), - 80, (int)(105.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), - 74, (int)( 69.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), - 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 17, (int)(183.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), - 16, (int)(175.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), - 15, (int)(82.25 * FREQFACTOR), (int)(8.50 * FREQFACTOR), - 13, (int)(53.75 * FREQFACTOR), (int)(8.50 * FREQFACTOR), - 5, (int)(175.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), - 2, (int)(48.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), - 0 -}; - -/* - * Japanese Broadcast Channels: - * - * 1: 91.25MHz - 3: 103.25MHz - * 4: 171.25MHz - 7: 189.25MHz - * 8: 193.25MHz - 12: 217.25MHz (VHF) - * 13: 471.25MHz - 62: 765.25MHz (UHF) - * - * IF freq: 58.75 mHz - */ -#define OFFSET 6.00 -#define IF_FREQ 58.75 -static int jpnbcst[] = { - 62, (int)(IF_FREQ * FREQFACTOR), 0, - 13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 4, (int)(171.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 1, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 -}; -#undef IF_FREQ -#undef OFFSET - -/* - * Japanese Cable Channels: - * - * 1: 91.25MHz - 3: 103.25MHz - * 4: 171.25MHz - 7: 189.25MHz - * 8: 193.25MHz - 12: 217.25MHz - * 13: 109.25MHz - 21: 157.25MHz - * 22: 165.25MHz - * 23: 223.25MHz - 63: 463.25MHz - * - * IF freq: 58.75 mHz - */ -#define OFFSET 6.00 -#define IF_FREQ 58.75 -static int jpncable[] = { - 63, (int)(IF_FREQ * FREQFACTOR), 0, - 23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 22, (int)(165.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 13, (int)(109.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 4, (int)(171.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 1, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 -}; -#undef IF_FREQ -#undef OFFSET - -/* - * xUSSR Broadcast Channels: - * - * 1: 49.75MHz - 2: 59.25MHz - * 3: 77.25MHz - 5: 93.25MHz - * 6: 175.25MHz - 12: 223.25MHz - * 13-20 - not exist - * 21: 471.25MHz - 34: 575.25MHz - * 35: 583.25MHz - 69: 855.25MHz - * - * Cable channels - * - * 70: 111.25MHz - 77: 167.25MHz - * 78: 231.25MHz -107: 463.25MHz - * - * IF freq: 38.90 MHz - */ -#define IF_FREQ 38.90 -static int xussr[] = { - 107, (int)(IF_FREQ * FREQFACTOR), 0, - 78, (int)(231.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 70, (int)(111.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 35, (int)(583.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 6, (int)(175.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 3, (int)( 77.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), - 1, (int)( 49.75 * FREQFACTOR), (int)(9.50 * FREQFACTOR), - 0 -}; -#undef IF_FREQ - -/* - * Australian broadcast channels - */ -#define OFFSET 7.00 -#define IF_FREQ 38.90 -static int australia[] = { - 83, (int)(IF_FREQ * FREQFACTOR), 0, - 28, (int)(527.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 10, (int)(209.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 6, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 4, (int)( 95.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 3, (int)( 86.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 1, (int)( 57.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 -}; -#undef OFFSET -#undef IF_FREQ - -/* - * France broadcast channels - */ -#define OFFSET 8.00 -#define IF_FREQ 38.90 -static int france[] = { - 69, (int)(IF_FREQ * FREQFACTOR), 0, - 21, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 21 -> 69 */ - 5, (int)(176.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 5 -> 10 */ - 4, (int)( 63.75 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 4 */ - 3, (int)( 60.50 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 3 */ - 1, (int)( 47.75 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 1 2 */ - 0 -}; -#undef OFFSET -#undef IF_FREQ - -static struct { - int *ptr; - char name[BT848_MAX_CHNLSET_NAME_LEN]; -} freqTable[] = { - {NULL, ""}, - {nabcst, "nabcst"}, - {irccable, "cableirc"}, - {hrccable, "cablehrc"}, - {weurope, "weurope"}, - {jpnbcst, "jpnbcst"}, - {jpncable, "jpncable"}, - {xussr, "xussr"}, - {australia, "australia"}, - {france, "france"}, - -}; - -#define TBL_CHNL freqTable[ bktr->tuner.chnlset ].ptr[ x ] -#define TBL_BASE_FREQ freqTable[ bktr->tuner.chnlset ].ptr[ x + 1 ] -#define TBL_OFFSET freqTable[ bktr->tuner.chnlset ].ptr[ x + 2 ] -static int -frequency_lookup( bktr_ptr_t bktr, int channel ) -{ - int x; - - /* check for "> MAX channel" */ - x = 0; - if ( channel > TBL_CHNL ) - return( -1 ); - - /* search the table for data */ - for ( x = 3; TBL_CHNL; x += 3 ) { - if ( channel >= TBL_CHNL ) { - return( TBL_BASE_FREQ + - ((channel - TBL_CHNL) * TBL_OFFSET) ); - } - } - - /* not found, must be below the MIN channel */ - return( -1 ); -} -#undef TBL_OFFSET -#undef TBL_BASE_FREQ -#undef TBL_CHNL - - -#define TBL_IF (bktr->format_params == BT848_IFORM_F_NTSCJ || \ - bktr->format_params == BT848_IFORM_F_NTSCM ? \ - nabcst[1] : weurope[1]) - - -/* Initialise the tuner structures in the bktr_softc */ -/* This is needed as the tuner details are no longer globally declared */ - -void select_tuner( bktr_ptr_t bktr, int tuner_type ) { - if (tuner_type < Bt848_MAX_TUNER) { - bktr->card.tuner = &tuners[ tuner_type ]; - } else { - bktr->card.tuner = NULL; - } -} - -/* - * Tuner Notes: - * Programming the tuner properly is quite complicated. - * Here are some notes, based on a FM1246 data sheet for a PAL-I tuner. - * The tuner (front end) covers 45.75 Mhz - 855.25 Mhz and an FM band of - * 87.5 Mhz to 108.0 Mhz. - * - * RF and IF. RF = radio frequencies, it is the transmitted signal. - * IF is the Intermediate Frequency (the offset from the base - * signal where the video, color, audio and NICAM signals are. - * - * Eg, Picture at 38.9 Mhz, Colour at 34.47 MHz, sound at 32.9 MHz - * NICAM at 32.348 Mhz. - * Strangely enough, there is an IF (intermediate frequency) for - * FM Radio which is 10.7 Mhz. - * - * The tuner also works in Bands. Philips bands are - * FM radio band 87.50 to 108.00 MHz - * Low band 45.75 to 170.00 MHz - * Mid band 170.00 to 450.00 MHz - * High band 450.00 to 855.25 MHz - * - * - * Now we need to set the PLL on the tuner to the required freuqncy. - * It has a programmable divisor. - * For TV we want - * N = 16 (freq RF(pc) + freq IF(pc)) pc is picture carrier and RF and IF - * are in MHz. - - * For RADIO we want a different equation. - * freq IF is 10.70 MHz (so the data sheet tells me) - * N = (freq RF + freq IF) / step size - * The step size must be set to 50 khz (so the data sheet tells me) - * (note this is 50 kHz, the other things are in MHz) - * so we end up with N = 20x(freq RF + 10.7) - * - */ - -#define LOW_BAND 0 -#define MID_BAND 1 -#define HIGH_BAND 2 -#define FM_RADIO_BAND 3 - - -/* Check if these are correct for other than Philips PAL */ -#define STATUSBIT_COLD 0x80 -#define STATUSBIT_LOCK 0x40 -#define STATUSBIT_TV 0x20 -#define STATUSBIT_STEREO 0x10 /* valid if FM (aka not TV) */ -#define STATUSBIT_ADC 0x07 - -/* - * set the frequency of the tuner - * If 'type' is TV_FREQUENCY, the frequency is freq MHz*16 - * If 'type' is FM_RADIO_FREQUENCY, the frequency is freq MHz * 100 - * (note *16 gives is 4 bits of fraction, eg steps of nnn.0625) - * - */ -int -tv_freq( bktr_ptr_t bktr, int frequency, int type ) -{ - const struct TUNER* tuner; - u_char addr; - u_char control; - u_char band; - int N; - int band_select = 0; -#if defined( TEST_TUNER_AFC ) - int oldFrequency, afcDelta; -#endif - - tuner = bktr->card.tuner; - if ( tuner == NULL ) - return( -1 ); - - if (tuner == &tuners[TUNER_MT2032]) { - mt2032_set_tv_freq(bktr, frequency); - return 0; - } - if (type == TV_FREQUENCY) { - /* - * select the band based on frequency - * XXX FIXME: get the cross-over points from the tuner struct - */ - if ( frequency < (160 * FREQFACTOR ) ) - band_select = LOW_BAND; - else if ( frequency < (454 * FREQFACTOR ) ) - band_select = MID_BAND; - else - band_select = HIGH_BAND; - -#if defined( TEST_TUNER_AFC ) - if ( bktr->tuner.afc ) - frequency -= 4; -#endif - /* - * N = 16 * { fRF(pc) + fIF(pc) } - * or N = 16* fRF(pc) + 16*fIF(pc) } - * where: - * pc is picture carrier, fRF & fIF are in MHz - * - * fortunatly, frequency is passed in as MHz * 16 - * and the TBL_IF frequency is also stored in MHz * 16 - */ - N = frequency + TBL_IF; - - /* set the address of the PLL */ - addr = bktr->card.tuner_pllAddr; - control = tuner->pllControl[ band_select ]; - band = tuner->bandAddrs[ band_select ]; - - if(!(band && control)) /* Don't try to set un- */ - return(-1); /* supported modes. */ - - if ( frequency > bktr->tuner.frequency ) { - i2cWrite( bktr, addr, (N>>8) & 0x7f, N & 0xff ); - i2cWrite( bktr, addr, control, band ); - } - else { - i2cWrite( bktr, addr, control, band ); - i2cWrite( bktr, addr, (N>>8) & 0x7f, N & 0xff ); - } - -#if defined( TUNER_AFC ) - if ( bktr->tuner.afc == TRUE ) { -#if defined( TEST_TUNER_AFC ) - oldFrequency = frequency; -#endif - if ( (N = do_afc( bktr, addr, N )) < 0 ) { - /* AFC failed, restore requested frequency */ - N = frequency + TBL_IF; -#if defined( TEST_TUNER_AFC ) - printf("%s: do_afc: failed to lock\n", - bktr_name(bktr)); -#endif - i2cWrite( bktr, addr, (N>>8) & 0x7f, N & 0xff ); - } - else - frequency = N - TBL_IF; -#if defined( TEST_TUNER_AFC ) - printf("%s: do_afc: returned freq %d (%d %% %d)\n", bktr_name(bktr), frequency, frequency / 16, frequency % 16); - afcDelta = frequency - oldFrequency; - printf("%s: changed by: %d clicks (%d mod %d)\n", bktr_name(bktr), afcDelta, afcDelta / 16, afcDelta % 16); -#endif - } -#endif /* TUNER_AFC */ - - bktr->tuner.frequency = frequency; - } - - if ( type == FM_RADIO_FREQUENCY ) { - band_select = FM_RADIO_BAND; - - /* - * N = { fRF(pc) + fIF(pc) }/step_size - * The step size is 50kHz for FM radio. - * (eg after 102.35MHz comes 102.40 MHz) - * fIF is 10.7 MHz (as detailed in the specs) - * - * frequency is passed in as MHz * 100 - * - * So, we have N = (frequency/100 + 10.70) /(50/1000) - */ - N = (frequency + 1070)/5; - - /* set the address of the PLL */ - addr = bktr->card.tuner_pllAddr; - control = tuner->pllControl[ band_select ]; - band = tuner->bandAddrs[ band_select ]; - - if(!(band && control)) /* Don't try to set un- */ - return(-1); /* supported modes. */ - - band |= bktr->tuner.radio_mode; /* tuner.radio_mode is set in - * the ioctls RADIO_SETMODE - * and RADIO_GETMODE */ - - i2cWrite( bktr, addr, control, band ); - i2cWrite( bktr, addr, (N>>8) & 0x7f, N & 0xff ); - - bktr->tuner.frequency = (N * 5) - 1070; - - - } - - - return( 0 ); -} - - - -#if defined( TUNER_AFC ) -/* - * - */ -int -do_afc( bktr_ptr_t bktr, int addr, int frequency ) -{ - int step; - int status; - int origFrequency; - - origFrequency = frequency; - - /* wait for first setting to take effect */ - tsleep( BKTR_SLEEP, PZERO, "tuning", hz/8 ); - - if ( (status = i2cRead( bktr, addr + 1 )) < 0 ) - return( -1 ); - -#if defined( TEST_TUNER_AFC ) - printf( "%s: Original freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); -#endif - for ( step = 0; step < AFC_MAX_STEP; ++step ) { - if ( (status = i2cRead( bktr, addr + 1 )) < 0 ) - goto fubar; - if ( !(status & 0x40) ) { -#if defined( TEST_TUNER_AFC ) - printf( "%s: no lock!\n", bktr_name(bktr) ); -#endif - goto fubar; - } - - switch( status & AFC_BITS ) { - case AFC_FREQ_CENTERED: -#if defined( TEST_TUNER_AFC ) - printf( "%s: Centered, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); -#endif - return( frequency ); - - case AFC_FREQ_MINUS_125: - case AFC_FREQ_MINUS_62: -#if defined( TEST_TUNER_AFC ) - printf( "%s: Low, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); -#endif - --frequency; - break; - - case AFC_FREQ_PLUS_62: - case AFC_FREQ_PLUS_125: -#if defined( TEST_TUNER_AFC ) - printf( "%s: Hi, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); -#endif - ++frequency; - break; - } - - i2cWrite( bktr, addr, - (frequency>>8) & 0x7f, frequency & 0xff ); - DELAY( AFC_DELAY ); - } - - fubar: - i2cWrite( bktr, addr, - (origFrequency>>8) & 0x7f, origFrequency & 0xff ); - - return( -1 ); -} -#endif /* TUNER_AFC */ -#undef TBL_IF - - -/* - * Get the Tuner status and signal strength - */ -int get_tuner_status( bktr_ptr_t bktr ) { - if (bktr->card.tuner == &tuners[TUNER_MT2032]) - return 0; - return i2cRead( bktr, bktr->card.tuner_pllAddr + 1 ); -} - -/* - * set the channel of the tuner - */ -int -tv_channel( bktr_ptr_t bktr, int channel ) -{ - int frequency; - - /* calculate the frequency according to tuner type */ - if ( (frequency = frequency_lookup( bktr, channel )) < 0 ) - return( -1 ); - - /* set the new frequency */ - if ( tv_freq( bktr, frequency, TV_FREQUENCY ) < 0 ) - return( -1 ); - - /* OK to update records */ - return( (bktr->tuner.channel = channel) ); -} - -/* - * get channelset name - */ -int -tuner_getchnlset(struct bktr_chnlset *chnlset) -{ - if (( chnlset->index < CHNLSET_MIN ) || - ( chnlset->index > CHNLSET_MAX )) - return( EINVAL ); - - memcpy(&chnlset->name, &freqTable[chnlset->index].name, - BT848_MAX_CHNLSET_NAME_LEN); - - chnlset->max_channel=freqTable[chnlset->index].ptr[0]; - return( 0 ); -} - - - - -#define TDA9887_ADDR 0x86 - -static int -TDA9887_init(bktr_ptr_t bktr, int output2_enable) -{ - u_char addr = TDA9887_ADDR; - - i2cWrite(bktr, addr, 0, output2_enable ? 0x50 : 0xd0); - i2cWrite(bktr, addr, 1, 0x6e); /* takeover point / de-emphasis */ - - /* PAL BG: 0x09 PAL I: 0x0a NTSC: 0x04 */ -#ifdef MT2032_NTSC - i2cWrite(bktr, addr, 2, 0x04); -#else - i2cWrite(bktr, addr, 2, 0x09); -#endif - return 0; -} - - - -#define MT2032_OPTIMIZE_VCO 1 - -/* holds the value of XOGC register after init */ -static int MT2032_XOGC = 4; - -/* card.tuner_pllAddr not set during init */ -#define MT2032_ADDR 0xc0 - -#ifndef MT2032_ADDR -#define MT2032_ADDR (bktr->card.tuner_pllAddr) -#endif - -static int -_MT2032_GetRegister(bktr_ptr_t bktr, u_char regNum) -{ - int ch; - - if (i2cWrite(bktr, MT2032_ADDR, regNum, -1) == -1) { - if (bootverbose) - printf("%s: MT2032 write failed (i2c addr %#x)\n", - bktr_name(bktr), MT2032_ADDR); - return -1; - } - if ((ch = i2cRead(bktr, MT2032_ADDR + 1)) == -1) { - if (bootverbose) - printf("%s: MT2032 get register %d failed\n", - bktr_name(bktr), regNum); - return -1; - } - return ch; -} - -static void -_MT2032_SetRegister(bktr_ptr_t bktr, u_char regNum, u_char data) -{ - i2cWrite(bktr, MT2032_ADDR, regNum, data); -} - -#define MT2032_GetRegister(r) _MT2032_GetRegister(bktr,r) -#define MT2032_SetRegister(r,d) _MT2032_SetRegister(bktr,r,d) - - -int -mt2032_init(bktr_ptr_t bktr) -{ - u_char rdbuf[22]; - int xogc, xok = 0; - int i; - int x; - - TDA9887_init(bktr, 0); - - for (i = 0; i < 21; i++) { - if ((x = MT2032_GetRegister(i)) == -1) - break; - rdbuf[i] = x; - } - if (i < 21) - return -1; - - printf("%s: MT2032: Companycode=%02x%02x Part=%02x Revision=%02x\n", - bktr_name(bktr), - rdbuf[0x11], rdbuf[0x12], rdbuf[0x13], rdbuf[0x14]); - if (rdbuf[0x13] != 4) { - printf("%s: MT2032 not found or unknown type\n", bktr_name(bktr)); - return -1; - } - - /* Initialize Registers per spec. */ - MT2032_SetRegister(2, 0xff); - MT2032_SetRegister(3, 0x0f); - MT2032_SetRegister(4, 0x1f); - MT2032_SetRegister(6, 0xe4); - MT2032_SetRegister(7, 0x8f); - MT2032_SetRegister(8, 0xc3); - MT2032_SetRegister(9, 0x4e); - MT2032_SetRegister(10, 0xec); - MT2032_SetRegister(13, 0x32); - - /* Adjust XOGC (register 7), wait for XOK */ - xogc = 7; - do { - DELAY(10000); - xok = MT2032_GetRegister(0x0e) & 0x01; - if (xok == 1) { - break; - } - xogc--; - if (xogc == 3) { - xogc = 4; /* min. 4 per spec */ - break; - } - MT2032_SetRegister(7, 0x88 + xogc); - } while (xok != 1); - - TDA9887_init(bktr, 1); - - MT2032_XOGC = xogc; - - return 0; -} - -static int -MT2032_SpurCheck(int f1, int f2, int spectrum_from, int spectrum_to) -{ - int n1 = 1, n2, f; - - f1 = f1 / 1000; /* scale to kHz to avoid 32bit overflows */ - f2 = f2 / 1000; - spectrum_from /= 1000; - spectrum_to /= 1000; - - do { - n2 = -n1; - f = n1 * (f1 - f2); - do { - n2--; - f = f - f2; - if ((f > spectrum_from) && (f < spectrum_to)) { - return 1; - } - } while ((f > (f2 - spectrum_to)) || (n2 > -5)); - n1++; - } while (n1 < 5); - - return 0; -} - -static int -MT2032_ComputeFreq( - int rfin, - int if1, - int if2, - int spectrum_from, - int spectrum_to, - unsigned char *buf, - int *ret_sel, - int xogc -) -{ /* all in Hz */ - int fref, lo1, lo1n, lo1a, s, sel; - int lo1freq, desired_lo1, desired_lo2, lo2, lo2n, lo2a, - lo2num, lo2freq; - int nLO1adjust; - - fref = 5250 * 1000; /* 5.25MHz */ - - /* per spec 2.3.1 */ - desired_lo1 = rfin + if1; - lo1 = (2 * (desired_lo1 / 1000) + (fref / 1000)) / (2 * fref / 1000); - lo1freq = lo1 * fref; - desired_lo2 = lo1freq - rfin - if2; - - /* per spec 2.3.2 */ - for (nLO1adjust = 1; nLO1adjust < 3; nLO1adjust++) { - if (!MT2032_SpurCheck(lo1freq, desired_lo2, spectrum_from, spectrum_to)) { - break; - } - if (lo1freq < desired_lo1) { - lo1 += nLO1adjust; - } else { - lo1 -= nLO1adjust; - } - - lo1freq = lo1 * fref; - desired_lo2 = lo1freq - rfin - if2; - } - - /* per spec 2.3.3 */ - s = lo1freq / 1000 / 1000; - - if (MT2032_OPTIMIZE_VCO) { - if (s > 1890) { - sel = 0; - } else if (s > 1720) { - sel = 1; - } else if (s > 1530) { - sel = 2; - } else if (s > 1370) { - sel = 3; - } else { - sel = 4;/* >1090 */ - } - } else { - if (s > 1790) { - sel = 0;/* <1958 */ - } else if (s > 1617) { - sel = 1; - } else if (s > 1449) { - sel = 2; - } else if (s > 1291) { - sel = 3; - } else { - sel = 4;/* >1090 */ - } - } - - *ret_sel = sel; - - /* per spec 2.3.4 */ - lo1n = lo1 / 8; - lo1a = lo1 - (lo1n * 8); - lo2 = desired_lo2 / fref; - lo2n = lo2 / 8; - lo2a = lo2 - (lo2n * 8); - /* scale to fit in 32bit arith */ - lo2num = ((desired_lo2 / 1000) % (fref / 1000)) * 3780 / (fref / 1000); - lo2freq = (lo2a + 8 * lo2n) * fref + lo2num * (fref / 1000) / 3780 * 1000; - - if (lo1a < 0 || lo1a > 7 || lo1n < 17 || lo1n > 48 || lo2a < 0 || - lo2a > 7 || lo2n < 17 || lo2n > 30) { - printf("MT2032: parameter out of range\n"); - return -1; - } - /* set up MT2032 register map for transfer over i2c */ - buf[0] = lo1n - 1; - buf[1] = lo1a | (sel << 4); - buf[2] = 0x86; /* LOGC */ - buf[3] = 0x0f; /* reserved */ - buf[4] = 0x1f; - buf[5] = (lo2n - 1) | (lo2a << 5); - if (rfin < 400 * 1000 * 1000) { - buf[6] = 0xe4; - } else { - buf[6] = 0xf4; /* set PKEN per rev 1.2 */ - } - - buf[7] = 8 + xogc; - buf[8] = 0xc3; /* reserved */ - buf[9] = 0x4e; /* reserved */ - buf[10] = 0xec; /* reserved */ - buf[11] = (lo2num & 0xff); - buf[12] = (lo2num >> 8) | 0x80; /* Lo2RST */ - - return 0; -} - -static int -MT2032_CheckLOLock(bktr_ptr_t bktr) -{ - int t, lock = 0; - for (t = 0; t < 10; t++) { - lock = MT2032_GetRegister(0x0e) & 0x06; - if (lock == 6) { - break; - } - DELAY(1000); - } - return lock; -} - -static int -MT2032_OptimizeVCO(bktr_ptr_t bktr, int sel, int lock) -{ - int tad1, lo1a; - - tad1 = MT2032_GetRegister(0x0f) & 0x07; - - if (tad1 == 0) { - return lock; - } - if (tad1 == 1) { - return lock; - } - if (tad1 == 2) { - if (sel == 0) { - return lock; - } else { - sel--; - } - } else { - if (sel < 4) { - sel++; - } else { - return lock; - } - } - lo1a = MT2032_GetRegister(0x01) & 0x07; - MT2032_SetRegister(0x01, lo1a | (sel << 4)); - lock = MT2032_CheckLOLock(bktr); - return lock; -} - -static int -MT2032_SetIFFreq(bktr_ptr_t bktr, int rfin, int if1, int if2, int from, int to) -{ - u_char buf[21]; - int lint_try, sel, lock = 0; - - if (MT2032_ComputeFreq(rfin, if1, if2, from, to, &buf[0], &sel, MT2032_XOGC) == -1) - return -1; - - TDA9887_init(bktr, 0); - - /* send only the relevant registers per Rev. 1.2 */ - MT2032_SetRegister(0, buf[0x00]); - MT2032_SetRegister(1, buf[0x01]); - MT2032_SetRegister(2, buf[0x02]); - - MT2032_SetRegister(5, buf[0x05]); - MT2032_SetRegister(6, buf[0x06]); - MT2032_SetRegister(7, buf[0x07]); - - MT2032_SetRegister(11, buf[0x0B]); - MT2032_SetRegister(12, buf[0x0C]); - - /* wait for PLLs to lock (per manual), retry LINT if not. */ - for (lint_try = 0; lint_try < 2; lint_try++) { - lock = MT2032_CheckLOLock(bktr); - - if (MT2032_OPTIMIZE_VCO) { - lock = MT2032_OptimizeVCO(bktr, sel, lock); - } - if (lock == 6) { - break; - } - /* set LINT to re-init PLLs */ - MT2032_SetRegister(7, 0x80 + 8 + MT2032_XOGC); - DELAY(10000); - MT2032_SetRegister(7, 8 + MT2032_XOGC); - } - if (lock != 6) - printf("%s: PLL didn't lock\n", bktr_name(bktr)); - - MT2032_SetRegister(2, 0x20); - - TDA9887_init(bktr, 1); - return 0; -} - -static void -mt2032_set_tv_freq(bktr_ptr_t bktr, unsigned int freq) -{ - int if2,from,to; - int stat, tad; - -#ifdef MT2032_NTSC - from=40750*1000; - to=46750*1000; - if2=45750*1000; -#else - from=32900*1000; - to=39900*1000; - if2=38900*1000; -#endif - - if (MT2032_SetIFFreq(bktr, freq*62500 /* freq*1000*1000/16 */, - 1090*1000*1000, if2, from, to) == 0) { - bktr->tuner.frequency = freq; - stat = MT2032_GetRegister(0x0e); - tad = MT2032_GetRegister(0x0f); - if (bootverbose) - printf("%s: frequency set to %d, st = %#x, tad = %#x\n", - bktr_name(bktr), freq*62500, stat, tad); - } -} diff --git a/sys/dev/bktr/bktr_tuner.h b/sys/dev/bktr/bktr_tuner.h deleted file mode 100644 index 1d52ad2e563c..000000000000 --- a/sys/dev/bktr/bktr_tuner.h +++ /dev/null @@ -1,107 +0,0 @@ -/* $FreeBSD$ */ - -/* - * This is part of the Driver for Video Capture Cards (Frame grabbers) - * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 - * chipset. - * Copyright Roger Hardiman and Amancio Hasty. - * - * bktr_tuner : This deals with controlling the tuner fitted to TV cards. - * - */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * 1. Redistributions of source code must retain the - * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Amancio Hasty and - * Roger Hardiman - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ - -/* Definitions for Tuners */ - -#define NO_TUNER 0 -#define TEMIC_NTSC 1 -#define TEMIC_PAL 2 -#define TEMIC_SECAM 3 -#define PHILIPS_NTSC 4 -#define PHILIPS_PAL 5 -#define PHILIPS_SECAM 6 -#define TEMIC_PALI 7 -#define PHILIPS_PALI 8 -#define PHILIPS_FR1236_NTSC 9 /* These have FM radio support */ -#define PHILIPS_FR1216_PAL 10 /* These have FM radio support */ -#define PHILIPS_FR1236_SECAM 11 /* These have FM radio support */ -#define ALPS_TSCH5 12 -#define ALPS_TSBH1 13 -#define TUNER_MT2032 14 -#define LG_TPI8PSB12P_PAL 15 -#define PHILIPS_FI1216 16 -#define Bt848_MAX_TUNER 17 - -/* experimental code for Automatic Frequency Control */ -#define TUNER_AFC - -/* - * Fill in the tuner entries in the bktr_softc based on the selected tuner - * type (from the list of tuners above) - */ -void select_tuner( bktr_ptr_t bktr, int tuner_type ); - -/* - * The Channel Set maps TV channels eg Ch 36, Ch 51, onto frequencies - * and is country specific. - */ -int tuner_getchnlset( struct bktr_chnlset *chnlset ); - -/* - * tv_channel sets the tuner to channel 'n' using the current Channel Set - * tv_freq sets the tuner to a specific frequency for TV or for FM Radio - * get_tuner_status can be used to get the signal strength. - */ -#define TV_FREQUENCY 0 -#define FM_RADIO_FREQUENCY 1 -int tv_channel( bktr_ptr_t bktr, int channel ); -int tv_freq( bktr_ptr_t bktr, int frequency, int type ); -int get_tuner_status( bktr_ptr_t bktr ); - -#if defined( TUNER_AFC ) -int do_afc( bktr_ptr_t bktr, int addr, int frequency ); -#endif /* TUNER_AFC */ - -int mt2032_init(bktr_ptr_t bktr); - -/* - * This is for start-up convenience only, NOT mandatory. - */ -#if !defined( DEFAULT_CHNLSET ) -#define DEFAULT_CHNLSET CHNLSET_WEUROPE -#endif - diff --git a/sys/dev/bktr/ioctl_bt848.h b/sys/dev/bktr/ioctl_bt848.h deleted file mode 100644 index 6e50b615deb2..000000000000 --- a/sys/dev/bktr/ioctl_bt848.h +++ /dev/null @@ -1,298 +0,0 @@ -/* - * extensions to ioctl_meteor.h for the bt848 cards - * - * $FreeBSD$ - */ - -#ifndef _DEV_BKTR_IOCTL_BT848_H_ -#define _DEV_BKTR_IOCTL_BT848_H_ - -/* - * frequency sets - */ -#define CHNLSET_NABCST 1 -#define CHNLSET_CABLEIRC 2 -#define CHNLSET_CABLEHRC 3 -#define CHNLSET_WEUROPE 4 -#define CHNLSET_JPNBCST 5 -#define CHNLSET_JPNCABLE 6 -#define CHNLSET_XUSSR 7 -#define CHNLSET_AUSTRALIA 8 -#define CHNLSET_FRANCE 9 -#define CHNLSET_MIN CHNLSET_NABCST -#define CHNLSET_MAX CHNLSET_FRANCE - - -/* - * constants for various tuner registers - */ -#define BT848_HUEMIN (-90) -#define BT848_HUEMAX 90 -#define BT848_HUECENTER 0 -#define BT848_HUERANGE 179.3 -#define BT848_HUEREGMIN (-128) -#define BT848_HUEREGMAX 127 -#define BT848_HUESTEPS 256 - -#define BT848_BRIGHTMIN (-50) -#define BT848_BRIGHTMAX 50 -#define BT848_BRIGHTCENTER 0 -#define BT848_BRIGHTRANGE 99.6 -#define BT848_BRIGHTREGMIN (-128) -#define BT848_BRIGHTREGMAX 127 -#define BT848_BRIGHTSTEPS 256 - -#define BT848_CONTRASTMIN 0 -#define BT848_CONTRASTMAX 237 -#define BT848_CONTRASTCENTER 100 -#define BT848_CONTRASTRANGE 236.57 -#define BT848_CONTRASTREGMIN 0 -#define BT848_CONTRASTREGMAX 511 -#define BT848_CONTRASTSTEPS 512 - -#define BT848_CHROMAMIN 0 -#define BT848_CHROMAMAX 284 -#define BT848_CHROMACENTER 100 -#define BT848_CHROMARANGE 283.89 -#define BT848_CHROMAREGMIN 0 -#define BT848_CHROMAREGMAX 511 -#define BT848_CHROMASTEPS 512 - -#define BT848_SATUMIN 0 -#define BT848_SATUMAX 202 -#define BT848_SATUCENTER 100 -#define BT848_SATURANGE 201.18 -#define BT848_SATUREGMIN 0 -#define BT848_SATUREGMAX 511 -#define BT848_SATUSTEPS 512 - -#define BT848_SATVMIN 0 -#define BT848_SATVMAX 284 -#define BT848_SATVCENTER 100 -#define BT848_SATVRANGE 283.89 -#define BT848_SATVREGMIN 0 -#define BT848_SATVREGMAX 511 -#define BT848_SATVSTEPS 512 - - -/* - * audio stuff - */ -#define AUDIO_TUNER 0x00 /* command for the audio routine */ -#define AUDIO_EXTERN 0x01 /* don't confuse them with bit */ -#define AUDIO_INTERN 0x02 /* settings */ -#define AUDIO_MUTE 0x80 -#define AUDIO_UNMUTE 0x81 - - -/* - * EEProm stuff - */ -struct eeProm { - short offset; - short count; - unsigned char bytes[ 256 ]; -}; - - -/* - * XXX: this is a hack, should be in ioctl_meteor.h - * here to avoid touching that file for now... - */ -#define TVTUNER_SETCHNL _IOW('x', 32, unsigned int) /* set channel */ -#define TVTUNER_GETCHNL _IOR('x', 32, unsigned int) /* get channel */ -#define TVTUNER_SETTYPE _IOW('x', 33, unsigned int) /* set tuner type */ -#define TVTUNER_GETTYPE _IOR('x', 33, unsigned int) /* get tuner type */ -#define TVTUNER_GETSTATUS _IOR('x', 34, unsigned int) /* get tuner status */ -#define TVTUNER_SETFREQ _IOW('x', 35, unsigned int) /* set frequency */ -#define TVTUNER_GETFREQ _IOR('x', 36, unsigned int) /* get frequency */ - - -#define BT848_SHUE _IOW('x', 37, int) /* set hue */ -#define BT848_GHUE _IOR('x', 37, int) /* get hue */ -#define BT848_SBRIG _IOW('x', 38, int) /* set brightness */ -#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ -#define BT848_SCSAT _IOW('x', 39, int) /* set chroma sat */ -#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ -#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ -#define BT848_GCONT _IOR('x', 40, int) /* get contrast */ -#define BT848_SVSAT _IOW('x', 41, int) /* set chroma V sat */ -#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ -#define BT848_SUSAT _IOW('x', 42, int) /* set chroma U sat */ -#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ - -#define BT848_SCBARS _IOR('x', 43, int) /* set colorbar */ -#define BT848_CCBARS _IOR('x', 44, int) /* clear colorbar */ - - -#define BT848_SAUDIO _IOW('x', 46, int) /* set audio channel */ -#define BT848_GAUDIO _IOR('x', 47, int) /* get audio channel */ -#define BT848_SBTSC _IOW('x', 48, int) /* set audio channel */ - -#define BT848_GSTATUS _IOR('x', 49, unsigned int) /* reap status */ - -#define BT848_WEEPROM _IOWR('x', 50, struct eeProm) /* write to EEProm */ -#define BT848_REEPROM _IOWR('x', 51, struct eeProm) /* read from EEProm */ - -#define BT848_SIGNATURE _IOWR('x', 52, struct eeProm) /* read card sig */ - -#define TVTUNER_SETAFC _IOW('x', 53, int) /* turn AFC on/off */ -#define TVTUNER_GETAFC _IOR('x', 54, int) /* query AFC on/off */ -#define BT848_SLNOTCH _IOW('x', 55, int) /* set luma notch */ -#define BT848_GLNOTCH _IOR('x', 56, int) /* get luma notch */ - -/* Read/Write the BT848's I2C bus directly - * b7-b0: data (read/write) - * b15-b8: internal peripheral register (write) - * b23-b16: i2c addr (write) - * b31-b24: 1 = write, 0 = read - */ -#define BT848_I2CWR _IOWR('x', 57, unsigned long) /* i2c read-write */ - -struct bktr_msp_control { - unsigned char function; - unsigned int address; - unsigned int data; -}; - -#define BT848_MSP_RESET _IO('x', 76) /* MSP chip reset */ -#define BT848_MSP_READ _IOWR('x', 77, struct bktr_msp_control) /* MSP chip read */ -#define BT848_MSP_WRITE _IOWR('x', 78, struct bktr_msp_control) /* MSP chip write */ - -/* Support for radio tuner */ -#define RADIO_SETMODE _IOW('x', 58, unsigned int) /* set radio modes */ -#define RADIO_GETMODE _IOR('x', 58, unsigned char) /* get radio modes */ -#define RADIO_AFC 0x01 /* These modes will probably not */ -#define RADIO_MONO 0x02 /* work on the FRxxxx. It does */ -#define RADIO_MUTE 0x08 /* work on the FMxxxx. */ -#define RADIO_SETFREQ _IOW('x', 59, unsigned int) /* set frequency */ -#define RADIO_GETFREQ _IOR('x', 59, unsigned int) /* set frequency */ - /* Argument is frequency*100MHz */ - -/* - * XXX: more bad magic, - * we need to fix the METEORGINPUT to return something public - * duplicate them here for now... - */ -#define METEOR_DEV0 0x00001000 -#define METEOR_DEV1 0x00002000 -#define METEOR_DEV2 0x00004000 -#define METEOR_DEV3 0x00008000 -#define METEOR_DEV_SVIDEO 0x00006000 -/* - * right now I don't know were to put these, but as they are suppose to be - * a part of a common video capture interface, these should be relocated to - * another place. Probably most of the METEOR_xxx defines need to be - * renamed and moved to a common header - */ - -typedef enum { METEOR_PIXTYPE_RGB, METEOR_PIXTYPE_YUV, - METEOR_PIXTYPE_YUV_PACKED, - METEOR_PIXTYPE_YUV_12 } METEOR_PIXTYPE; - - -struct meteor_pixfmt { - unsigned int index; /* Index in supported pixfmt list */ - METEOR_PIXTYPE type; /* What's the board gonna feed us */ - unsigned int Bpp; /* Bytes per pixel */ - unsigned long masks[3]; /* R,G,B or Y,U,V masks, respectively */ - unsigned swap_bytes :1; /* Bytes swapped within shorts */ - unsigned swap_shorts:1; /* Shorts swapped within longs */ -}; - - -struct bktr_clip { - int x_min; - int x_max; - int y_min; - int y_max; -}; - -#define BT848_MAX_CLIP_NODE 100 -struct _bktr_clip { - struct bktr_clip x[BT848_MAX_CLIP_NODE]; -}; - -/* - * I'm using METEOR_xxx just because that will be common to other interface - * and less of a surprise - */ -#define METEORSACTPIXFMT _IOW('x', 64, int ) -#define METEORGACTPIXFMT _IOR('x', 64, int ) -#define METEORGSUPPIXFMT _IOWR('x', 65, struct meteor_pixfmt) - -/* set clip list */ -#define BT848SCLIP _IOW('x', 66, struct _bktr_clip ) -#define BT848GCLIP _IOR('x', 66, struct _bktr_clip ) - - -/* set input format */ -#define BT848SFMT _IOW('x', 67, unsigned long ) -#define BT848GFMT _IOR('x', 67, unsigned long ) - -/* set clear-buffer-on-start */ -#define BT848SCBUF _IOW('x', 68, int) -#define BT848GCBUF _IOR('x', 68, int) - -/* set capture area */ -/* The capture area is the area of the video image which is grabbed */ -/* Usually the capture area is 640x480 (768x576 PAL) pixels */ -/* This area is then scaled to the dimensions the user requires */ -/* using the METEORGEO ioctl */ -/* However, the capture area could be 400x300 pixels from the top right */ -/* corner of the video image */ -struct bktr_capture_area { - int x_offset; - int y_offset; - int x_size; - int y_size; -}; -#define BT848_SCAPAREA _IOW('x', 69, struct bktr_capture_area) -#define BT848_GCAPAREA _IOR('x', 69, struct bktr_capture_area) - - -/* Get channel Set */ -#define BT848_MAX_CHNLSET_NAME_LEN 16 -struct bktr_chnlset { - short index; - short max_channel; - char name[BT848_MAX_CHNLSET_NAME_LEN]; -}; -#define TVTUNER_GETCHNLSET _IOWR('x', 70, struct bktr_chnlset) - - - -/* Infra Red Remote Control */ -struct bktr_remote { - unsigned char data[3]; -}; -#define REMOTE_GETKEY _IOR('x', 71, struct bktr_remote)/*read the remote */ - /*control receiver*/ - /*returns raw data*/ - - -/* - * Direct access to GPIO pins. You must add BKTR_GPIO_ACCESS to your kernel - * configuration file to use these - */ -#define BT848_GPIO_SET_EN _IOW('x', 72, int) /* set gpio_out_en */ -#define BT848_GPIO_GET_EN _IOR('x', 73, int) /* get gpio_out_en */ -#define BT848_GPIO_SET_DATA _IOW('x', 74, int) /* set gpio_data */ -#define BT848_GPIO_GET_DATA _IOR('x', 75, int) /* get gpio_data */ - - - -/* XXX - Copied from /sys/pci/brktree_reg.h */ -#define BT848_IFORM_FORMAT (0x7<<0) -# define BT848_IFORM_F_RSVD (0x7) -# define BT848_IFORM_F_SECAM (0x6) -# define BT848_IFORM_F_PALN (0x5) -# define BT848_IFORM_F_PALM (0x4) -# define BT848_IFORM_F_PALBDGHI (0x3) -# define BT848_IFORM_F_NTSCJ (0x2) -# define BT848_IFORM_F_NTSCM (0x1) -# define BT848_IFORM_F_AUTO (0x0) - - -#endif /* _DEV_BKTR_IOCTL_BT848_H_ */ - diff --git a/sys/dev/bktr/ioctl_meteor.h b/sys/dev/bktr/ioctl_meteor.h deleted file mode 100644 index 9a1959c6206e..000000000000 --- a/sys/dev/bktr/ioctl_meteor.h +++ /dev/null @@ -1,189 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1995 Mark Tinguely and Jim Lowe - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Mark Tinguely and Jim Lowe - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - * - * $FreeBSD$ - */ -/* - * ioctl constants for Matrox Meteor Capture card. - */ - -#ifndef _DEV_BKTR_IOCTL_METEOR_H_ -#define _DEV_BKTR_IOCTL_METEOR_H_ - -#ifndef _KERNEL -#include -#endif -#include - -struct meteor_capframe { - short command; /* see below for valid METEORCAPFRM commands */ - short lowat; /* start transfer if < this number */ - short hiwat; /* stop transfer if > this number */ -} ; - -/* structure for METEOR[GS]ETGEO - get/set geometry */ -struct meteor_geomet { - unsigned short rows; - unsigned short columns; - unsigned short frames; - unsigned long oformat; -} ; - -/* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ -struct meteor_counts { - unsigned long fifo_errors; /* count of fifo errors since open */ - unsigned long dma_errors; /* count of dma errors since open */ - unsigned long frames_captured; /* count of frames captured since open */ - unsigned long even_fields_captured; /* count of even fields captured */ - unsigned long odd_fields_captured; /* count of odd fields captured */ -} ; - -/* structure for getting and setting direct transfers to vram */ -struct meteor_video { - unsigned long addr; /* Address of location to dma to */ - unsigned long width; /* Width of memory area */ - unsigned long banksize; /* Size of Vram bank */ - unsigned long ramsize; /* Size of Vram */ -}; - -#define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ -#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */ -#define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */ -#define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */ -#define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */ -#define METEORSHUE _IOW('x', 6, signed char) /* set hue */ -#define METEORGHUE _IOR('x', 6, signed char) /* get hue */ -#define METEORSFMT _IOW('x', 7, unsigned long) /* set format */ -#define METEORGFMT _IOR('x', 7, unsigned long) /* get format */ -#define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */ -#define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */ -#define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */ -#define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */ -#define METEORSCOUNT _IOW('x',10, struct meteor_counts) -#define METEORGCOUNT _IOR('x',10, struct meteor_counts) -#define METEORSFPS _IOW('x',11, unsigned short) /* set fps */ -#define METEORGFPS _IOR('x',11, unsigned short) /* get fps */ -#define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */ -#define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */ -#define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */ -#define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */ -#define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */ -#define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */ -#define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */ -#define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */ -#define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */ -#define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */ -#define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */ -#define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */ -#define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */ -#define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */ -#define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */ -#define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */ -#define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */ -#define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */ - -#define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */ -#define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */ -#define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */ -#define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */ -#define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */ -#define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */ -#define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */ -#define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */ -#define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */ - - /* METEORCAPTUR capture options */ -#define METEOR_CAP_SINGLE 0x0001 /* capture one frame */ -#define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */ -#define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */ - - /* METEORCAPFRM capture commands */ -#define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */ -#define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */ -#define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */ -#define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */ - - /* valid video input formats: */ -#define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */ -#define METEOR_FMT_PAL 0x00200 /* PAL */ -#define METEOR_FMT_SECAM 0x00400 /* SECAM */ -#define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */ -#define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */ -#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0 -#define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */ -#define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */ -#define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */ -#define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */ -#define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */ - - /* valid video output formats: */ -#define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */ -#define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */ - /* internally stored in 32 bits */ -#define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */ -#define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */ -#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR -#define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */ -#define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */ -#define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */ -#define METEOR_GEO_FIELD_MASK 0x3000000 -#define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */ -#define METEOR_GEO_OUTPUT_MASK 0x40f0000 -#define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */ -#define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */ - -#define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */ - -#define METEOR_SIG_MODE_MASK 0xffff0000 -#define METEOR_SIG_FRAME 0x00000000 /* signal every frame */ -#define METEOR_SIG_FIELD 0x00010000 /* signal every field */ - - /* following structure is used to coordinate the synchronous */ - -struct meteor_mem { - /* kernel write only */ - int frame_size; /* row*columns*depth */ - unsigned num_bufs; /* number of frames in buffer (1-32) */ - /* user and kernel change these */ - int lowat; /* kernel starts capture if < this number */ - int hiwat; /* kernel stops capture if > this number. - hiwat <= numbufs */ - unsigned active; /* bit mask of active frame buffers - kernel sets, user clears */ - int num_active_bufs; /* count of active frame buffer - kernel increments, user decrements */ - - /* reference to mmapped data */ - caddr_t buf; /* The real space (virtual addr) */ -} ; - -#endif /* !_DEV_BKTR_IOCTL_METEOR_H_ */ diff --git a/sys/dev/bktr/msp34xx.c b/sys/dev/bktr/msp34xx.c deleted file mode 100644 index a37c6cb8715f..000000000000 --- a/sys/dev/bktr/msp34xx.c +++ /dev/null @@ -1,1254 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 1997-2001 Gerd Knorr - * 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$ - */ - -/* - * programming the msp34* sound processor family - * - * (c) 1997-2001 Gerd Knorr - * - * what works and what doesn't: - * - * AM-Mono - * Support for Hauppauge cards added (decoding handled by tuner) added by - * Frederic Crozat - * - * FM-Mono - * should work. The stereo modes are backward compatible to FM-mono, - * therefore FM-Mono should be always available. - * - * FM-Stereo (B/G, used in germany) - * should work, with autodetect - * - * FM-Stereo (satellite) - * should work, no autodetect (i.e. default is mono, but you can - * switch to stereo -- untested) - * - * NICAM (B/G, L , used in UK, Scandinavia, Spain and France) - * should work, with autodetect. Support for NICAM was added by - * Pekka Pietikainen - * - * - * TODO: - * - better SAT support - * - * - * 980623 Thomas Sailer (sailer@ife.ee.ethz.ch) - * using soundcore instead of OSS - * - * - * The FreeBSD modifications by Alexander Langer - * are in the public domain. Please contact me (Alex) and not Gerd for - * any problems you encounter under FreeBSD. - * - * FreeBSD TODO: - * - mutex handling (currently not mp-safe) - * - the various options here as loader tunables or compile time or whatever - * - how does the new dolby flag work with the current dpl_* stuff? - * Maybe it's just enough to set the dolby flag to 1 and it works. - * As I don't have a dolby card myself, I can't test it, though. - */ - -#include "opt_bktr.h" /* Include any kernel config options */ -#ifdef BKTR_NEW_MSP34XX_DRIVER /* file only needed for new driver */ - -#include -#include -#include -#include - -#include -#include -#include - -#ifdef BKTR_USE_FREEBSD_SMBUS -#include /* required by bktr_reg.h */ -#endif - -#include /* required by bktr_reg.h */ - -#include -#include /* extensions to ioctl_meteor.h */ -#include -#include -#include -#include - -#define VIDEO_MODE_PAL 0 -#define VIDEO_MODE_NTSC 1 -#define VIDEO_MODE_SECAM 2 -#define VIDEO_MODE_AUTO 3 - -#define VIDEO_SOUND_MONO 1 -#define VIDEO_SOUND_STEREO 2 -#define VIDEO_SOUND_LANG1 4 -#define VIDEO_SOUND_LANG2 8 - -#define DFP_COUNT 0x41 - -struct msp3400c { - int simple; - int nicam; - int mode; - int norm; - int stereo; - int nicam_on; - int acb; - int main, second; /* sound carrier */ - int input; - - int muted; - int left, right; /* volume */ - int bass, treble; - - /* shadow register set */ - int dfp_regs[DFP_COUNT]; - - /* thread */ - struct proc *kthread; - - int active,restart,rmmod; - - int watch_stereo; - int halt_thread; -}; - -#define VIDEO_MODE_RADIO 16 /* norm magic for radio mode */ - -/* ---------------------------------------------------------------------- */ - -#define dprintk(...) do { \ - if (bootverbose) { \ - printf("%s: ", bktr_name(client)); \ - printf(__VA_ARGS__); \ - } \ -} while (0) - -/* ---------------------------------------------------------------------- */ - -#define I2C_MSP3400C 0x80 -#define I2C_MSP3400C_DEM 0x10 -#define I2C_MSP3400C_DFP 0x12 - -/* ----------------------------------------------------------------------- */ -/* functions for talking to the MSP3400C Sound processor */ - -static int msp3400c_reset(bktr_ptr_t client) -{ - /* use our own which handles config(8) options */ - msp_dpl_reset(client, client->msp_addr); - - return 0; -} - -static int -msp3400c_read(bktr_ptr_t client, int dev, int addr) -{ - /* use our own */ - return(msp_dpl_read(client, client->msp_addr, dev, addr)); -} - -static int -msp3400c_write(bktr_ptr_t client, int dev, int addr, int val) -{ - /* use our own */ - msp_dpl_write(client, client->msp_addr, dev, addr, val); - - return(0); -} - -/* ------------------------------------------------------------------------ */ - -/* This macro is allowed for *constants* only, gcc must calculate it - at compile time. Remember -- no floats in kernel mode */ -#define MSP_CARRIER(freq) ((int)((float)(freq/18.432)*(1<<24))) - -#define MSP_MODE_AM_DETECT 0 -#define MSP_MODE_FM_RADIO 2 -#define MSP_MODE_FM_TERRA 3 -#define MSP_MODE_FM_SAT 4 -#define MSP_MODE_FM_NICAM1 5 -#define MSP_MODE_FM_NICAM2 6 -#define MSP_MODE_AM_NICAM 7 -#define MSP_MODE_BTSC 8 -#define MSP_MODE_EXTERN 9 - -static struct MSP_INIT_DATA_DEM { - int fir1[6]; - int fir2[6]; - int cdo1; - int cdo2; - int ad_cv; - int mode_reg; - int dfp_src; - int dfp_matrix; -} msp_init_data[] = { - /* AM (for carrier detect / msp3400) */ - { { 75, 19, 36, 35, 39, 40 }, { 75, 19, 36, 35, 39, 40 }, - MSP_CARRIER(5.5), MSP_CARRIER(5.5), - 0x00d0, 0x0500, 0x0020, 0x3000}, - - /* AM (for carrier detect / msp3410) */ - { { -1, -1, -8, 2, 59, 126 }, { -1, -1, -8, 2, 59, 126 }, - MSP_CARRIER(5.5), MSP_CARRIER(5.5), - 0x00d0, 0x0100, 0x0020, 0x3000}, - - /* FM Radio */ - { { -8, -8, 4, 6, 78, 107 }, { -8, -8, 4, 6, 78, 107 }, - MSP_CARRIER(10.7), MSP_CARRIER(10.7), - 0x00d0, 0x0480, 0x0020, 0x3000 }, - - /* Terrestrial FM-mono + FM-stereo */ - { { 3, 18, 27, 48, 66, 72 }, { 3, 18, 27, 48, 66, 72 }, - MSP_CARRIER(5.5), MSP_CARRIER(5.5), - 0x00d0, 0x0480, 0x0030, 0x3000}, - - /* Sat FM-mono */ - { { 1, 9, 14, 24, 33, 37 }, { 3, 18, 27, 48, 66, 72 }, - MSP_CARRIER(6.5), MSP_CARRIER(6.5), - 0x00c6, 0x0480, 0x0000, 0x3000}, - - /* NICAM/FM -- B/G (5.5/5.85), D/K (6.5/5.85) */ - { { -2, -8, -10, 10, 50, 86 }, { 3, 18, 27, 48, 66, 72 }, - MSP_CARRIER(5.5), MSP_CARRIER(5.5), - 0x00d0, 0x0040, 0x0120, 0x3000}, - - /* NICAM/FM -- I (6.0/6.552) */ - { { 2, 4, -6, -4, 40, 94 }, { 3, 18, 27, 48, 66, 72 }, - MSP_CARRIER(6.0), MSP_CARRIER(6.0), - 0x00d0, 0x0040, 0x0120, 0x3000}, - - /* NICAM/AM -- L (6.5/5.85) */ - { { -2, -8, -10, 10, 50, 86 }, { -4, -12, -9, 23, 79, 126 }, - MSP_CARRIER(6.5), MSP_CARRIER(6.5), - 0x00c6, 0x0140, 0x0120, 0x7c03}, -}; - -struct CARRIER_DETECT { - int cdo; - char *name; -}; - -static struct CARRIER_DETECT carrier_detect_main[] = { - /* main carrier */ - { MSP_CARRIER(4.5), "4.5 NTSC" }, - { MSP_CARRIER(5.5), "5.5 PAL B/G" }, - { MSP_CARRIER(6.0), "6.0 PAL I" }, - { MSP_CARRIER(6.5), "6.5 PAL D/K + SAT + SECAM" } -}; - -static struct CARRIER_DETECT carrier_detect_55[] = { - /* PAL B/G */ - { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" }, - { MSP_CARRIER(5.85), "5.85 PAL B/G NICAM" } -}; - -static struct CARRIER_DETECT carrier_detect_65[] = { - /* PAL SAT / SECAM */ - { MSP_CARRIER(5.85), "5.85 PAL D/K + SECAM NICAM" }, - { MSP_CARRIER(6.2578125), "6.25 PAL D/K1 FM-stereo" }, - { MSP_CARRIER(6.7421875), "6.74 PAL D/K2 FM-stereo" }, - { MSP_CARRIER(7.02), "7.02 PAL SAT FM-stereo s/b" }, - { MSP_CARRIER(7.20), "7.20 PAL SAT FM-stereo s" }, - { MSP_CARRIER(7.38), "7.38 PAL SAT FM-stereo b" }, -}; - -#define CARRIER_COUNT(x) (sizeof(x)/sizeof(struct CARRIER_DETECT)) - -/* ----------------------------------------------------------------------- */ - -#define SCART_MASK 0 -#define SCART_IN1 1 -#define SCART_IN2 2 -#define SCART_IN1_DA 3 -#define SCART_IN2_DA 4 -#define SCART_IN3 5 -#define SCART_IN4 6 -#define SCART_MONO 7 -#define SCART_MUTE 8 - -static int scarts[3][9] = { - /* MASK IN1 IN2 IN1_DA IN2_DA IN3 IN4 MONO MUTE */ - { 0x0320, 0x0000, 0x0200, -1, -1, 0x0300, 0x0020, 0x0100, 0x0320 }, - { 0x0c40, 0x0440, 0x0400, 0x0c00, 0x0040, 0x0000, 0x0840, 0x0800, 0x0c40 }, - { 0x3080, 0x1000, 0x1080, 0x0000, 0x0080, 0x2080, 0x3080, 0x2000, 0x3000 }, -}; - -static char *scart_names[] = { - "mask", "in1", "in2", "in1 da", "in2 da", "in3", "in4", "mono", "mute" -}; - -static void -msp3400c_set_scart(bktr_ptr_t client, int in, int out) -{ - struct msp3400c *msp = client->msp3400c_info; - - if (-1 == scarts[out][in]) - return; - - dprintk("msp34xx: scart switch: %s => %d\n",scart_names[in],out); - msp->acb &= ~scarts[out][SCART_MASK]; - msp->acb |= scarts[out][in]; - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0013, msp->acb); -} - -/* ------------------------------------------------------------------------ */ - -static void msp3400c_setcarrier(bktr_ptr_t client, int cdo1, int cdo2) -{ - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0093, cdo1 & 0xfff); - msp3400c_write(client,I2C_MSP3400C_DEM, 0x009b, cdo1 >> 12); - msp3400c_write(client,I2C_MSP3400C_DEM, 0x00a3, cdo2 & 0xfff); - msp3400c_write(client,I2C_MSP3400C_DEM, 0x00ab, cdo2 >> 12); - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0056, 0); /*LOAD_REG_1/2*/ -} - -static void msp3400c_setvolume(bktr_ptr_t client, - int muted, int left, int right) -{ - int vol = 0,val = 0,balance = 0; - - if (!muted) { - vol = (left > right) ? left : right; - val = (vol * 0x73 / 65535) << 8; - } - if (vol > 0) { - balance = ((right-left) * 127) / vol; - } - - dprintk("msp34xx: setvolume: mute=%s %d:%d v=0x%02x b=0x%02x\n", - muted ? "on" : "off", left, right, val>>8, balance); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0000, val); /* loudspeaker */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0006, val); /* headphones */ - /* scart - on/off only */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007, val ? 0x4000 : 0); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, balance << 8); -} - -static void msp3400c_setbass(bktr_ptr_t client, int bass) -{ - int val = ((bass-32768) * 0x60 / 65535) << 8; - - dprintk("msp34xx: setbass: %d 0x%02x\n",bass, val>>8); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0002, val); /* loudspeaker */ -} - -static void msp3400c_settreble(bktr_ptr_t client, int treble) -{ - int val = ((treble-32768) * 0x60 / 65535) << 8; - - dprintk("msp34xx: settreble: %d 0x%02x\n",treble, val>>8); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0003, val); /* loudspeaker */ -} - -static void msp3400c_setmode(bktr_ptr_t client, int type) -{ - struct msp3400c *msp = client->msp3400c_info; - int i; - - dprintk("msp3400: setmode: %d\n",type); - msp->mode = type; - msp->stereo = VIDEO_SOUND_MONO; - - msp3400c_write(client,I2C_MSP3400C_DEM, 0x00bb, /* ad_cv */ - msp_init_data[type].ad_cv); - - for (i = 5; i >= 0; i--) /* fir 1 */ - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0001, - msp_init_data[type].fir1[i]); - - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0004); /* fir 2 */ - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0040); - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0000); - for (i = 5; i >= 0; i--) - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, - msp_init_data[type].fir2[i]); - - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0083, /* MODE_REG */ - msp_init_data[type].mode_reg); - - msp3400c_setcarrier(client, msp_init_data[type].cdo1, - msp_init_data[type].cdo2); - - msp3400c_write(client,I2C_MSP3400C_DEM, 0x0056, 0); /*LOAD_REG_1/2*/ - - if (client->dolby) { - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0008, - 0x0520); /* I2S1 */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0009, - 0x0620); /* I2S2 */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000b, - msp_init_data[type].dfp_src); - } else { - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0008, - msp_init_data[type].dfp_src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0009, - msp_init_data[type].dfp_src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000b, - msp_init_data[type].dfp_src); - } - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000a, - msp_init_data[type].dfp_src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000e, - msp_init_data[type].dfp_matrix); - - if (msp->nicam) { - /* nicam prescale */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0010, 0x5a00); /* was: 0x3000 */ - } -} - -/* turn on/off nicam + stereo */ -static void msp3400c_setstereo(bktr_ptr_t client, int mode) -{ - static char *strmode[] = { "0", "mono", "stereo", "3", - "lang1", "5", "6", "7", "lang2" }; - struct msp3400c *msp = client->msp3400c_info; - int nicam=0; /* channel source: FM/AM or nicam */ - int src=0; - - /* switch demodulator */ - switch (msp->mode) { - case MSP_MODE_FM_TERRA: - dprintk("msp3400: FM setstereo: %s\n",strmode[mode]); - msp3400c_setcarrier(client,msp->second,msp->main); - switch (mode) { - case VIDEO_SOUND_STEREO: - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000e, 0x3001); - break; - case VIDEO_SOUND_MONO: - case VIDEO_SOUND_LANG1: - case VIDEO_SOUND_LANG2: - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000e, 0x3000); - break; - } - break; - case MSP_MODE_FM_SAT: - dprintk("msp3400: SAT setstereo: %s\n",strmode[mode]); - switch (mode) { - case VIDEO_SOUND_MONO: - msp3400c_setcarrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5)); - break; - case VIDEO_SOUND_STEREO: - msp3400c_setcarrier(client, MSP_CARRIER(7.2), MSP_CARRIER(7.02)); - break; - case VIDEO_SOUND_LANG1: - msp3400c_setcarrier(client, MSP_CARRIER(7.38), MSP_CARRIER(7.02)); - break; - case VIDEO_SOUND_LANG2: - msp3400c_setcarrier(client, MSP_CARRIER(7.38), MSP_CARRIER(7.02)); - break; - } - break; - case MSP_MODE_FM_NICAM1: - case MSP_MODE_FM_NICAM2: - case MSP_MODE_AM_NICAM: - dprintk("msp3400: NICAM setstereo: %s\n",strmode[mode]); - msp3400c_setcarrier(client,msp->second,msp->main); - if (msp->nicam_on) - nicam=0x0100; - break; - case MSP_MODE_BTSC: - dprintk("msp3400: BTSC setstereo: %s\n",strmode[mode]); - nicam=0x0300; - break; - case MSP_MODE_EXTERN: - dprintk("msp3400: extern setstereo: %s\n",strmode[mode]); - nicam = 0x0200; - break; - case MSP_MODE_FM_RADIO: - dprintk("msp3400: FM-Radio setstereo: %s\n",strmode[mode]); - break; - default: - dprintk("msp3400: mono setstereo\n"); - return; - } - - /* switch audio */ - switch (mode) { - case VIDEO_SOUND_STEREO: - src = 0x0020 | nicam; -#if 0 - /* spatial effect */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0005,0x4000); -#endif - break; - case VIDEO_SOUND_MONO: - if (msp->mode == MSP_MODE_AM_NICAM) { - dprintk("msp3400: switching to AM mono\n"); - /* AM mono decoding is handled by tuner, not MSP chip */ - /* SCART switching control register */ - msp3400c_set_scart(client,SCART_MONO,0); - src = 0x0200; - break; - } - case VIDEO_SOUND_LANG1: - src = 0x0000 | nicam; - break; - case VIDEO_SOUND_LANG2: - src = 0x0010 | nicam; - break; - } - dprintk("msp3400: setstereo final source/matrix = 0x%x\n", src); - - if (client->dolby) { - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0008,0x0520); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0009,0x0620); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000a,src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000b,src); - } else { - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0008,src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0009,src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000a,src); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000b,src); - } -} - -static void -msp3400c_print_mode(struct msp3400c *msp) -{ - if (msp->main == msp->second) { - printf("bktr: msp3400: mono sound carrier: %d.%03d MHz\n", - msp->main/910000,(msp->main/910)%1000); - } else { - printf("bktr: msp3400: main sound carrier: %d.%03d MHz\n", - msp->main/910000,(msp->main/910)%1000); - } - if (msp->mode == MSP_MODE_FM_NICAM1 || - msp->mode == MSP_MODE_FM_NICAM2) - printf("bktr: msp3400: NICAM/FM carrier : %d.%03d MHz\n", - msp->second/910000,(msp->second/910)%1000); - if (msp->mode == MSP_MODE_AM_NICAM) - printf("bktr: msp3400: NICAM/AM carrier : %d.%03d MHz\n", - msp->second/910000,(msp->second/910)%1000); - if (msp->mode == MSP_MODE_FM_TERRA && - msp->main != msp->second) { - printf("bktr: msp3400: FM-stereo carrier : %d.%03d MHz\n", - msp->second/910000,(msp->second/910)%1000); - } -} - -static void -msp3400c_restore_dfp(bktr_ptr_t client) -{ - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - int i; - - for (i = 0; i < DFP_COUNT; i++) { - if (-1 == msp->dfp_regs[i]) - continue; - msp3400c_write(client,I2C_MSP3400C_DFP, i, msp->dfp_regs[i]); - } -} - -/* ----------------------------------------------------------------------- */ - -struct REGISTER_DUMP { - int addr; - char *name; -}; - -struct REGISTER_DUMP d1[] = { - { 0x007e, "autodetect" }, - { 0x0023, "C_AD_BITS " }, - { 0x0038, "ADD_BITS " }, - { 0x003e, "CIB_BITS " }, - { 0x0057, "ERROR_RATE" }, -}; - -static int -autodetect_stereo(bktr_ptr_t client) -{ - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - int val; - int newstereo = msp->stereo; - int newnicam = msp->nicam_on; - int update = 0; - - switch (msp->mode) { - case MSP_MODE_FM_TERRA: - val = msp3400c_read(client, I2C_MSP3400C_DFP, 0x18); - if (val > 32767) - val -= 65536; - dprintk("msp34xx: stereo detect register: %d\n",val); - - if (val > 4096) { - newstereo = VIDEO_SOUND_STEREO | VIDEO_SOUND_MONO; - } else if (val < -4096) { - newstereo = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; - } else { - newstereo = VIDEO_SOUND_MONO; - } - newnicam = 0; - break; - case MSP_MODE_FM_NICAM1: - case MSP_MODE_FM_NICAM2: - case MSP_MODE_AM_NICAM: - val = msp3400c_read(client, I2C_MSP3400C_DEM, 0x23); - dprintk("msp34xx: nicam sync=%d, mode=%d\n",val & 1, (val & 0x1e) >> 1); - - if (val & 1) { - /* nicam synced */ - switch ((val & 0x1e) >> 1) { - case 0: - case 8: - newstereo = VIDEO_SOUND_STEREO; - break; - case 1: - case 9: - newstereo = VIDEO_SOUND_MONO - | VIDEO_SOUND_LANG1; - break; - case 2: - case 10: - newstereo = VIDEO_SOUND_MONO - | VIDEO_SOUND_LANG1 - | VIDEO_SOUND_LANG2; - break; - default: - newstereo = VIDEO_SOUND_MONO; - break; - } - newnicam=1; - } else { - newnicam = 0; - newstereo = VIDEO_SOUND_MONO; - } - break; - case MSP_MODE_BTSC: - val = msp3400c_read(client, I2C_MSP3400C_DEM, 0x200); - dprintk("msp3410: status=0x%x (pri=%s, sec=%s, %s%s%s)\n", - val, - (val & 0x0002) ? "no" : "yes", - (val & 0x0004) ? "no" : "yes", - (val & 0x0040) ? "stereo" : "mono", - (val & 0x0080) ? ", nicam 2nd mono" : "", - (val & 0x0100) ? ", bilingual/SAP" : ""); - newstereo = VIDEO_SOUND_MONO; - if (val & 0x0040) newstereo |= VIDEO_SOUND_STEREO; - if (val & 0x0100) newstereo |= VIDEO_SOUND_LANG1; - break; - } - if (newstereo != msp->stereo) { - update = 1; - dprintk("msp34xx: watch: stereo %d => %d\n", - msp->stereo,newstereo); - msp->stereo = newstereo; - } - if (newnicam != msp->nicam_on) { - update = 1; - dprintk("msp34xx: watch: nicam %d => %d\n", - msp->nicam_on,newnicam); - msp->nicam_on = newnicam; - } - return update; -} - -/* - * A kernel thread for msp3400 control -- we don't want to block the - * in the ioctl while doing the sound carrier & stereo detect - */ - -/* stereo/multilang monitoring */ -static void watch_stereo(bktr_ptr_t client) -{ - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - - if (autodetect_stereo(client)) { - if (msp->stereo & VIDEO_SOUND_STEREO) - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); - else if (msp->stereo & VIDEO_SOUND_LANG1) - msp3400c_setstereo(client,VIDEO_SOUND_LANG1); - else - msp3400c_setstereo(client,VIDEO_SOUND_MONO); - } - if (client->stereo_once) - msp->watch_stereo = 0; - -} - -static void msp3400c_thread(void *data) -{ - bktr_ptr_t client = data; - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - - struct CARRIER_DETECT *cd; - int count, max1,max2,val1,val2, val,this; - - dprintk("msp3400: thread started\n"); - - mtx_lock(&Giant); - for (;;) { - if (msp->rmmod) - goto done; - tsleep(msp->kthread, PRIBIO, "idle", 0); - if (msp->rmmod) - goto done; - if (msp->halt_thread) { - msp->watch_stereo = 0; - msp->halt_thread = 0; - continue; - } - - if (VIDEO_MODE_RADIO == msp->norm || - MSP_MODE_EXTERN == msp->mode) - continue; /* nothing to do */ - - msp->active = 1; - - if (msp->watch_stereo) { - watch_stereo(client); - msp->active = 0; - continue; - } - - /* some time for the tuner to sync */ - tsleep(msp->kthread, PRIBIO, "tuner sync", hz/2); - - restart: - if (VIDEO_MODE_RADIO == msp->norm || - MSP_MODE_EXTERN == msp->mode) - continue; /* nothing to do */ - msp->restart = 0; - msp3400c_setvolume(client, msp->muted, 0, 0); - msp3400c_setmode(client, MSP_MODE_AM_DETECT /* +1 */ ); - val1 = val2 = 0; - max1 = max2 = -1; - msp->watch_stereo = 0; - - /* carrier detect pass #1 -- main carrier */ - cd = carrier_detect_main; count = CARRIER_COUNT(carrier_detect_main); - - if (client->amsound && (msp->norm == VIDEO_MODE_SECAM)) { - /* autodetect doesn't work well with AM ... */ - max1 = 3; - count = 0; - dprintk("msp3400: AM sound override\n"); - } - - for (this = 0; this < count; this++) { - msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo); - - tsleep(msp->kthread, PRIBIO, "carrier detect", hz/100); - - if (msp->restart) - msp->restart = 0; - - val = msp3400c_read(client, I2C_MSP3400C_DFP, 0x1b); - if (val > 32767) - val -= 65536; - if (val1 < val) - val1 = val, max1 = this; - dprintk("msp3400: carrier1 val: %5d / %s\n", val,cd[this].name); - } - - /* carrier detect pass #2 -- second (stereo) carrier */ - switch (max1) { - case 1: /* 5.5 */ - cd = carrier_detect_55; count = CARRIER_COUNT(carrier_detect_55); - break; - case 3: /* 6.5 */ - cd = carrier_detect_65; count = CARRIER_COUNT(carrier_detect_65); - break; - case 0: /* 4.5 */ - case 2: /* 6.0 */ - default: - cd = NULL; count = 0; - break; - } - - if (client->amsound && (msp->norm == VIDEO_MODE_SECAM)) { - /* autodetect doesn't work well with AM ... */ - cd = NULL; count = 0; max2 = 0; - } - for (this = 0; this < count; this++) { - msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo); - - tsleep(msp->kthread, PRIBIO, "carrier detection", hz/100); - if (msp->restart) - goto restart; - - val = msp3400c_read(client, I2C_MSP3400C_DFP, 0x1b); - if (val > 32767) - val -= 65536; - if (val2 < val) - val2 = val, max2 = this; - dprintk("msp3400: carrier2 val: %5d / %s\n", val,cd[this].name); - } - - /* programm the msp3400 according to the results */ - msp->main = carrier_detect_main[max1].cdo; - switch (max1) { - case 1: /* 5.5 */ - if (max2 == 0) { - /* B/G FM-stereo */ - msp->second = carrier_detect_55[max2].cdo; - msp3400c_setmode(client, MSP_MODE_FM_TERRA); - msp->nicam_on = 0; - /* XXX why mono? this probably can do stereo... - Alex*/ - msp3400c_setstereo(client, VIDEO_SOUND_MONO); - msp->watch_stereo = 1; - } else if (max2 == 1 && msp->nicam) { - /* B/G NICAM */ - msp->second = carrier_detect_55[max2].cdo; - msp3400c_setmode(client, MSP_MODE_FM_NICAM1); - msp->nicam_on = 1; - msp3400c_setcarrier(client, msp->second, msp->main); - msp->watch_stereo = 1; - } else { - goto no_second; - } - break; - case 2: /* 6.0 */ - /* PAL I NICAM */ - msp->second = MSP_CARRIER(6.552); - msp3400c_setmode(client, MSP_MODE_FM_NICAM2); - msp->nicam_on = 1; - msp3400c_setcarrier(client, msp->second, msp->main); - msp->watch_stereo = 1; - break; - case 3: /* 6.5 */ - if (max2 == 1 || max2 == 2) { - /* D/K FM-stereo */ - msp->second = carrier_detect_65[max2].cdo; - msp3400c_setmode(client, MSP_MODE_FM_TERRA); - msp->nicam_on = 0; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); - msp->watch_stereo = 1; - } else if (max2 == 0 && - msp->norm == VIDEO_MODE_SECAM) { - /* L NICAM or AM-mono */ - msp->second = carrier_detect_65[max2].cdo; - msp3400c_setmode(client, MSP_MODE_AM_NICAM); - msp->nicam_on = 0; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); - msp3400c_setcarrier(client, msp->second, msp->main); - /* volume prescale for SCART (AM mono input) */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x000d, 0x1900); - msp->watch_stereo = 1; - } else if (max2 == 0 && msp->nicam) { - /* D/K NICAM */ - msp->second = carrier_detect_65[max2].cdo; - msp3400c_setmode(client, MSP_MODE_FM_NICAM1); - msp->nicam_on = 1; - msp3400c_setcarrier(client, msp->second, msp->main); - msp->watch_stereo = 1; - } else { - goto no_second; - } - break; - case 0: /* 4.5 */ - default: - no_second: - msp->second = carrier_detect_main[max1].cdo; - msp3400c_setmode(client, MSP_MODE_FM_TERRA); - msp->nicam_on = 0; - msp3400c_setcarrier(client, msp->second, msp->main); - msp->stereo = VIDEO_SOUND_MONO; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); - break; - } - - if (msp->watch_stereo) - watch_stereo(client); - - /* unmute + restore dfp registers */ - msp3400c_setvolume(client, msp->muted, msp->left, msp->right); - msp3400c_restore_dfp(client); - - if (bootverbose) - msp3400c_print_mode(msp); - - msp->active = 0; - } - -done: - dprintk("msp3400: thread: exit\n"); - msp->active = 0; - - msp->kthread = NULL; - wakeup(&msp->kthread); - mtx_unlock(&Giant); - - kproc_exit(0); -} - -/* ----------------------------------------------------------------------- */ -/* this one uses the automatic sound standard detection of newer */ -/* msp34xx chip versions */ - -static struct MODES { - int retval; - int main, second; - char *name; -} modelist[] = { - { 0x0000, 0, 0, "ERROR" }, - { 0x0001, 0, 0, "autodetect start" }, - { 0x0002, MSP_CARRIER(4.5), MSP_CARRIER(4.72), "4.5/4.72 M Dual FM-Stereo" }, - { 0x0003, MSP_CARRIER(5.5), MSP_CARRIER(5.7421875), "5.5/5.74 B/G Dual FM-Stereo" }, - { 0x0004, MSP_CARRIER(6.5), MSP_CARRIER(6.2578125), "6.5/6.25 D/K1 Dual FM-Stereo" }, - { 0x0005, MSP_CARRIER(6.5), MSP_CARRIER(6.7421875), "6.5/6.74 D/K2 Dual FM-Stereo" }, - { 0x0006, MSP_CARRIER(6.5), MSP_CARRIER(6.5), "6.5 D/K FM-Mono (HDEV3)" }, - { 0x0008, MSP_CARRIER(5.5), MSP_CARRIER(5.85), "5.5/5.85 B/G NICAM FM" }, - { 0x0009, MSP_CARRIER(6.5), MSP_CARRIER(5.85), "6.5/5.85 L NICAM AM" }, - { 0x000a, MSP_CARRIER(6.0), MSP_CARRIER(6.55), "6.0/6.55 I NICAM FM" }, - { 0x000b, MSP_CARRIER(6.5), MSP_CARRIER(5.85), "6.5/5.85 D/K NICAM FM" }, - { 0x000c, MSP_CARRIER(6.5), MSP_CARRIER(5.85), "6.5/5.85 D/K NICAM FM (HDEV2)" }, - { 0x0020, MSP_CARRIER(4.5), MSP_CARRIER(4.5), "4.5 M BTSC-Stereo" }, - { 0x0021, MSP_CARRIER(4.5), MSP_CARRIER(4.5), "4.5 M BTSC-Mono + SAP" }, - { 0x0030, MSP_CARRIER(4.5), MSP_CARRIER(4.5), "4.5 M EIA-J Japan Stereo" }, - { 0x0040, MSP_CARRIER(10.7), MSP_CARRIER(10.7), "10.7 FM-Stereo Radio" }, - { 0x0050, MSP_CARRIER(6.5), MSP_CARRIER(6.5), "6.5 SAT-Mono" }, - { 0x0051, MSP_CARRIER(7.02), MSP_CARRIER(7.20), "7.02/7.20 SAT-Stereo" }, - { 0x0060, MSP_CARRIER(7.2), MSP_CARRIER(7.2), "7.2 SAT ADR" }, - { -1, 0, 0, NULL }, /* EOF */ -}; - -static void msp3410d_thread(void *data) -{ - bktr_ptr_t client = data; - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - int mode,val,i,std; - int timo = 0; - - dprintk("msp3410: thread started\n"); - - mtx_lock(&Giant); - for (;;) { - if (msp->rmmod) - goto done; - if (!msp->watch_stereo) - timo = 0; - else - timo = 10*hz; - tsleep(msp->kthread, PRIBIO, "idle", timo); - if (msp->rmmod) - goto done; - if (msp->halt_thread) { - msp->watch_stereo = 0; - msp->halt_thread = 0; - dprintk("msp3410: thread halted\n"); - continue; - } - - if (msp->mode == MSP_MODE_EXTERN) - continue; - - msp->active = 1; - - if (msp->watch_stereo) { - watch_stereo(client); - msp->active = 0; - continue; - } - - /* some time for the tuner to sync */ - tsleep(msp->kthread, PRIBIO, "tuner sync", hz/2); - - restart: - if (msp->mode == MSP_MODE_EXTERN) - continue; - msp->restart = 0; - msp->watch_stereo = 0; - - /* put into sane state (and mute) */ - msp3400c_reset(client); - - /* start autodetect */ - switch (msp->norm) { - case VIDEO_MODE_PAL: - mode = 0x1003; - std = 1; - break; - case VIDEO_MODE_NTSC: /* BTSC */ - mode = 0x2003; - std = 0x0020; - break; - case VIDEO_MODE_SECAM: - mode = 0x0003; - std = 1; - break; - case VIDEO_MODE_RADIO: - mode = 0x0003; - std = 0x0040; - break; - default: - mode = 0x0003; - std = 1; - break; - } - msp3400c_write(client, I2C_MSP3400C_DEM, 0x30, mode); - msp3400c_write(client, I2C_MSP3400C_DEM, 0x20, std); - - if (bootverbose) { - int i; - for (i = 0; modelist[i].name != NULL; i++) - if (modelist[i].retval == std) - break; - dprintk("msp3410: setting mode: %s (0x%04x)\n", - modelist[i].name ? modelist[i].name : "unknown",std); - } - - if (std != 1) { - /* programmed some specific mode */ - val = std; - } else { - /* triggered autodetect */ - for (;;) { - tsleep(msp->kthread, PRIBIO, "autodetection", hz/10); - if (msp->restart) - goto restart; - - /* check results */ - val = msp3400c_read(client, I2C_MSP3400C_DEM, 0x7e); - if (val < 0x07ff) - break; - dprintk("msp3410: detection still in progress\n"); - } - } - for (i = 0; modelist[i].name != NULL; i++) - if (modelist[i].retval == val) - break; - dprintk("msp3410: current mode: %s (0x%04x)\n", - modelist[i].name ? modelist[i].name : "unknown", - val); - msp->main = modelist[i].main; - msp->second = modelist[i].second; - - if (client->amsound && (msp->norm == VIDEO_MODE_SECAM) && (val != 0x0009)) { - /* autodetection has failed, let backup */ - dprintk("msp3410: autodetection failed, switching to backup mode: %s (0x%04x)\n", - modelist[8].name ? modelist[8].name : "unknown",val); - val = 0x0009; - msp3400c_write(client, I2C_MSP3400C_DEM, 0x20, val); - } - - /* set various prescales */ - msp3400c_write(client, I2C_MSP3400C_DFP, 0x0d, 0x1900); /* scart */ - msp3400c_write(client, I2C_MSP3400C_DFP, 0x0e, 0x2403); /* FM */ - msp3400c_write(client, I2C_MSP3400C_DFP, 0x10, 0x5a00); /* nicam */ - - /* set stereo */ - switch (val) { - case 0x0008: /* B/G NICAM */ - case 0x000a: /* I NICAM */ - if (val == 0x0008) - msp->mode = MSP_MODE_FM_NICAM1; - else - msp->mode = MSP_MODE_FM_NICAM2; - /* just turn on stereo */ - msp->stereo = VIDEO_SOUND_STEREO; - msp->nicam_on = 1; - msp->watch_stereo = 1; - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); - break; - case 0x0009: - msp->mode = MSP_MODE_AM_NICAM; - msp->stereo = VIDEO_SOUND_MONO; - msp->nicam_on = 1; - msp3400c_setstereo(client,VIDEO_SOUND_MONO); - msp->watch_stereo = 1; - break; - case 0x0020: /* BTSC */ - /* just turn on stereo */ - msp->mode = MSP_MODE_BTSC; - msp->stereo = VIDEO_SOUND_STEREO; - msp->nicam_on = 0; - msp->watch_stereo = 1; - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); - break; - case 0x0040: /* FM radio */ - msp->mode = MSP_MODE_FM_RADIO; - msp->stereo = VIDEO_SOUND_STEREO; - msp->nicam_on = 0; - msp->watch_stereo = 0; - /* scart routing */ - msp3400c_set_scart(client,SCART_IN2,0); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x08, 0x0220); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x09, 0x0220); - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0b, 0x0220); - break; - case 0x0003: - msp->mode = MSP_MODE_FM_TERRA; - msp->stereo = VIDEO_SOUND_STEREO; - msp->nicam_on = 0; - msp->watch_stereo = 1; - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); - break; - } - - if (msp->watch_stereo) - watch_stereo(client); - - /* unmute + restore dfp registers */ - msp3400c_setbass(client, msp->bass); - msp3400c_settreble(client, msp->treble); - msp3400c_setvolume(client, msp->muted, msp->left, msp->right); - msp3400c_restore_dfp(client); - - msp->active = 0; - } - -done: - dprintk("msp3410: thread: exit\n"); - msp->active = 0; - - msp->kthread = NULL; - wakeup(&msp->kthread); - mtx_unlock(&Giant); - - kproc_exit(0); -} - -int msp_attach(bktr_ptr_t bktr) -{ - struct msp3400c *msp; - int rev1,rev2,i; - int err; - char buf[20]; - - msp = (struct msp3400c *) malloc(sizeof(struct msp3400c), M_DEVBUF, M_NOWAIT); - if (msp == NULL) - return ENOMEM; - bktr->msp3400c_info = msp; - - memset(msp,0,sizeof(struct msp3400c)); - msp->left = 65535; - msp->right = 65535; - msp->bass = 32768; - msp->treble = 32768; - msp->input = -1; - - for (i = 0; i < DFP_COUNT; i++) - msp->dfp_regs[i] = -1; - - msp3400c_reset(bktr); - - rev1 = msp3400c_read(bktr, I2C_MSP3400C_DFP, 0x1e); - if (-1 != rev1) - rev2 = msp3400c_read(bktr, I2C_MSP3400C_DFP, 0x1f); - if ((-1 == rev1) || (0 == rev1 && 0 == rev2)) { - free(msp, M_DEVBUF); - bktr->msp3400c_info = NULL; - printf("%s: msp3400: error while reading chip version\n", bktr_name(bktr)); - return ENXIO; - } - -#if 0 - /* this will turn on a 1kHz beep - might be useful for debugging... */ - msp3400c_write(bktr,I2C_MSP3400C_DFP, 0x0014, 0x1040); -#endif - - sprintf(buf,"MSP34%02d%c-%c%d", - (rev2>>8)&0xff, (rev1&0xff)+'@', ((rev1>>8)&0xff)+'@', rev2&0x1f); - msp->nicam = (((rev2>>8)&0xff) != 00) ? 1 : 0; - - if (bktr->mspsimple == -1) { - /* default mode */ - /* msp->simple = (((rev2>>8)&0xff) == 0) ? 0 : 1; */ - msp->simple = ((rev1&0xff)+'@' > 'C'); - } else { - /* use kenv value */ - msp->simple = bktr->mspsimple; - } - - /* hello world :-) */ - if (bootverbose) { - printf("%s: msp34xx: init: chip=%s", bktr_name(bktr), buf); - if (msp->nicam) - printf(", has NICAM support"); - printf("\n"); - } - - /* startup control thread */ - err = kproc_create(msp->simple ? msp3410d_thread : msp3400c_thread, - bktr, &msp->kthread, (RFFDG | RFPROC), 0, - "%s_msp34xx_thread", bktr->bktr_xname); - if (err) { - printf("%s: Error returned by kproc_create: %d", bktr_name(bktr), err); - free(msp, M_DEVBUF); - bktr->msp3400c_info = NULL; - return ENXIO; - } - wakeup(msp->kthread); - - /* done */ - return 0; -} - -int msp_detach(bktr_ptr_t client) -{ - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - - /* shutdown control thread */ - if (msp->kthread) - { - /* XXX mutex lock required */ - mtx_lock(&Giant); - msp->rmmod = 1; - msp->watch_stereo = 0; - wakeup(msp->kthread); - - while (msp->kthread) - tsleep(&msp->kthread, PRIBIO, "wait for kthread", hz/10); - mtx_unlock(&Giant); - } - - if (client->msp3400c_info != NULL) { - free(client->msp3400c_info, M_DEVBUF); - client->msp3400c_info = NULL; - } - - msp3400c_reset(client); - - return 0; -} - -void msp_wake_thread(bktr_ptr_t client) -{ - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - - msp3400c_setvolume(client,msp->muted,0,0); - msp->watch_stereo=0; - if (msp->active) - msp->restart = 1; - wakeup(msp->kthread); -} - -void msp_halt_thread(bktr_ptr_t client) -{ - struct msp3400c *msp = (struct msp3400c*)client->msp3400c_info; - - msp3400c_setvolume(client,msp->muted,0,0); - if (msp->active) - msp->restart = 1; - msp->halt_thread = 1; - wakeup(msp->kthread); -} -#endif /* BKTR_NEW_MSP34XX_DRIVER */ diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b4a116ddcacc..461998568040 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -1,810 +1,808 @@ # $FreeBSD$ SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" SUBDIR_PARALLEL= # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). .include "${SYSDIR}/conf/config.mk" .if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES) SUBDIR=${MODULES_OVERRIDE} .else SUBDIR= \ ${_3dfx} \ ${_3dfx_linux} \ ${_aac} \ ${_aacraid} \ accf_data \ accf_dns \ accf_http \ acl_nfs4 \ acl_posix1e \ ${_acpi} \ ae \ ${_aesni} \ age \ ${_agp} \ ahci \ aic7xxx \ alc \ ale \ alq \ ${_amd_ecc_inject} \ ${_amdgpio} \ ${_amdsbwd} \ ${_amdsmn} \ ${_amdtemp} \ amr \ ${_an} \ ${_aout} \ ${_apm} \ ${_arcmsr} \ ${_allwinner} \ ${_armv8crypto} \ ${_asmc} \ ata \ ath \ ath_dfs \ ath_hal \ ath_hal_ar5210 \ ath_hal_ar5211 \ ath_hal_ar5212 \ ath_hal_ar5416 \ ath_hal_ar9300 \ ath_main \ ath_rate \ ath_pci \ ${_autofs} \ ${_bce} \ ${_bcm283x_clkman} \ ${_bcm283x_pwm} \ bfe \ bge \ bhnd \ ${_bxe} \ ${_bios} \ - ${_bktr} \ ${_blake2} \ bnxt \ bridgestp \ bwi \ bwn \ ${_bytgpio} \ ${_chvgpio} \ cam \ ${_cardbus} \ ${_carp} \ cas \ ${_cbb} \ cc \ ${_ccp} \ cd9660 \ cd9660_iconv \ ${_ce} \ ${_cfi} \ ${_chromebook_platform} \ ${_ciss} \ cloudabi \ ${_cloudabi32} \ ${_cloudabi64} \ ${_cmx} \ ${_coretemp} \ ${_cp} \ ${_cpsw} \ ${_cpuctl} \ ${_cpufreq} \ ${_crypto} \ ${_cryptodev} \ ${_ctau} \ ctl \ ${_cxgb} \ ${_cxgbe} \ dc \ dcons \ dcons_crom \ ${_dpms} \ dummynet \ ${_efirt} \ ${_em} \ ${_ena} \ esp \ ${_et} \ evdev \ ${_exca} \ ext2fs \ fdc \ fdescfs \ ${_ffec} \ filemon \ firewire \ firmware \ fusefs \ ${_fxp} \ gem \ geom \ ${_glxiic} \ ${_glxsb} \ gpio \ hifn \ hme \ ${_hpt27xx} \ ${_hptiop} \ ${_hptmv} \ ${_hptnr} \ ${_hptrr} \ hwpmc \ ${_hwpmc_mips24k} \ ${_hwpmc_mips74k} \ ${_hyperv} \ i2c \ ${_iavf} \ ${_ibcore} \ ${_ichwd} \ ${_ida} \ if_bridge \ if_disc \ if_edsc \ ${_if_enc} \ if_epair \ ${_if_gif} \ ${_if_gre} \ ${_if_me} \ if_lagg \ ${_if_ndis} \ ${_if_stf} \ if_tuntap \ if_vlan \ if_vxlan \ iflib \ ${_iir} \ imgact_binmisc \ ${_intelspi} \ ${_io} \ ${_ioat} \ ${_ipoib} \ ${_ipdivert} \ ${_ipfilter} \ ${_ipfw} \ ipfw_nat \ ${_ipfw_nat64} \ ${_ipfw_nptv6} \ ${_ipfw_pmod} \ ${_ipmi} \ ip6_mroute_mod \ ip_mroute_mod \ ${_ips} \ ${_ipsec} \ ${_ipw} \ ${_ipwfw} \ ${_isci} \ ${_iser} \ isp \ ${_ispfw} \ ${_itwd} \ ${_iwi} \ ${_iwifw} \ ${_iwm} \ ${_iwmfw} \ ${_iwn} \ ${_iwnfw} \ ${_ix} \ ${_ixv} \ ${_ixl} \ jme \ kbdmux \ kgssapi \ kgssapi_krb5 \ khelp \ krpc \ ksyms \ ${_ktls_ocf} \ le \ lge \ libalias \ libiconv \ libmchain \ lindebugfs \ linuxkpi \ ${_lio} \ lpt \ mac_biba \ mac_bsdextended \ mac_ifoff \ mac_lomac \ mac_mls \ mac_none \ mac_ntpd \ mac_partition \ mac_portacl \ mac_seeotheruids \ mac_stub \ mac_test \ malo \ md \ mdio \ mem \ mfi \ mii \ mlx \ mlxfw \ ${_mlx4} \ ${_mlx4ib} \ ${_mlx4en} \ ${_mlx5} \ ${_mlx5en} \ ${_mlx5ib} \ ${_mly} \ mmc \ mmcsd \ ${_mpr} \ ${_mps} \ mpt \ mqueue \ mrsas \ msdosfs \ msdosfs_iconv \ msk \ ${_mthca} \ mvs \ mwl \ ${_mwlfw} \ mxge \ my \ ${_nctgpio} \ ${_ndis} \ ${_netgraph} \ ${_nfe} \ nfscl \ nfscommon \ nfsd \ nfslock \ nfslockd \ nfssvc \ nge \ nmdm \ nullfs \ ${_ntb} \ ${_nvd} \ ${_nvdimm} \ ${_nvme} \ ${_nvram} \ oce \ ${_ocs_fc} \ otus \ ${_otusfw} \ ow \ ${_padlock} \ ${_padlock_rng} \ ${_pccard} \ ${_pcfclock} \ ${_pf} \ ${_pflog} \ ${_pfsync} \ plip \ ${_pms} \ ppbus \ ppc \ ppi \ pps \ procfs \ proto \ pseudofs \ ${_pst} \ pty \ puc \ pwm \ ${_qlxge} \ ${_qlxgb} \ ${_qlxgbe} \ ${_qlnx} \ ral \ ${_ralfw} \ ${_random_fortuna} \ ${_random_other} \ rc4 \ ${_rdma} \ ${_rdrand_rng} \ re \ rl \ ${_rockchip} \ rtwn \ rtwn_pci \ rtwn_usb \ ${_rtwnfw} \ ${_s3} \ ${_safe} \ ${_sbni} \ scc \ sdhci \ ${_sdhci_acpi} \ sdhci_pci \ sdio \ sem \ send \ ${_sfxge} \ sge \ ${_sgx} \ ${_sgx_linux} \ siftr \ siis \ sis \ sk \ ${_smartpqi} \ smbfs \ snp \ sound \ ${_speaker} \ spi \ ${_splash} \ ${_sppp} \ ste \ stge \ ${_superio} \ ${_sym} \ ${_syscons} \ sysvipc \ tcp \ ${_ti} \ tmpfs \ ${_toecore} \ ${_tpm} \ ${_twa} \ twe \ tws \ uart \ ubsec \ udf \ udf_iconv \ ufs \ uinput \ unionfs \ usb \ ${_vesa} \ ${_virtio} \ vge \ ${_viawd} \ videomode \ vkbd \ ${_vmd} \ ${_vmm} \ ${_vmware} \ vr \ vte \ ${_wbwd} \ ${_wi} \ wlan \ wlan_acl \ wlan_amrr \ wlan_ccmp \ wlan_rssadapt \ wlan_tkip \ wlan_wep \ wlan_xauth \ ${_wpi} \ ${_wpifw} \ ${_x86bios} \ xl \ xz \ zlib .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) _autofs= autofs .endif .if ${MK_CDDL} != "no" || defined(ALL_MODULES) .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \ ${MACHINE_CPUARCH} != "mips" .if ${KERN_OPTS:MKDTRACE_HOOKS} SUBDIR+= dtrace .endif .endif SUBDIR+= opensolaris .endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${SRCTOP}/sys/opencrypto) _crypto= crypto _cryptodev= cryptodev _random_fortuna=random_fortuna _random_other= random_other _ktls_ocf= ktls_ocf .endif .endif .if ${MK_CUSE} != "no" || defined(ALL_MODULES) SUBDIR+= cuse .endif .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _carp= carp _toecore= toecore _if_enc= if_enc _if_gif= if_gif _if_gre= if_gre _ipfw_pmod= ipfw_pmod .if ${MK_IPSEC_SUPPORT} != "no" _ipsec= ipsec .endif .endif .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _if_stf= if_stf .endif .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) _if_me= if_me _ipdivert= ipdivert _ipfw= ipfw .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) _ipfw_nat64= ipfw_nat64 .endif .endif .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) _ipfw_nptv6= ipfw_nptv6 .endif .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) _ipfilter= ipfilter .endif .if ${MK_ISCSI} != "no" || defined(ALL_MODULES) SUBDIR+= cfiscsi SUBDIR+= iscsi SUBDIR+= iscsi_initiator .endif .if !empty(OPT_FDT) SUBDIR+= fdt .endif # Linuxulator .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" SUBDIR+= linprocfs SUBDIR+= linsysfs .endif .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SUBDIR+= linux .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" SUBDIR+= linux64 SUBDIR+= linux_common .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" _ena= ena .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ibcore= ibcore _ipoib= ipoib _iser= iser .endif _mlx4= mlx4 _mlx5= mlx5 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _mlx4en= mlx4en _mlx5en= mlx5en .endif .if ${MK_OFED} != "no" || defined(ALL_MODULES) _mthca= mthca _mlx4ib= mlx4ib _mlx5ib= mlx5ib .endif .endif .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) _netgraph= netgraph .endif .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) _pf= pf _pflog= pflog .if ${MK_INET_SUPPORT} != "no" _pfsync= pfsync .endif .endif .if ${MK_SOURCELESS_UCODE} != "no" _bce= bce _fxp= fxp _ispfw= ispfw _ti= ti .if ${MACHINE_CPUARCH} != "mips" _mwlfw= mwlfw _otusfw= otusfw _ralfw= ralfw _rtwnfw= rtwnfw .endif .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" && \ ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ ${MACHINE_CPUARCH} != "riscv" _cxgbe= cxgbe .endif # These rely on 64bit atomics .if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ ${MACHINE_CPUARCH} != "mips" _mps= mps _mpr= mpr .endif .if ${MK_TESTS} != "no" || defined(ALL_MODULES) SUBDIR+= tests .endif .if ${MK_ZFS} != "no" || defined(ALL_MODULES) SUBDIR+= zfs .endif .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") _hwpmc_mips24k= hwpmc_mips24k _hwpmc_mips74k= hwpmc_mips74k .endif .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ ${MACHINE_CPUARCH} != "riscv" _syscons= syscons .endif .if ${MACHINE_CPUARCH} != "mips" # no BUS_SPACE_UNSPECIFIED # No barrier instruction support (specific to this driver) _sym= sym # intr_disable() is a macro, causes problems .if ${MK_SOURCELESS_UCODE} != "no" _cxgb= cxgb .endif .endif .if ${MACHINE_CPUARCH} == "aarch64" _allwinner= allwinner _armv8crypto= armv8crypto _efirt= efirt _em= em _rockchip= rockchip .endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _agp= agp _an= an _aout= aout _bios= bios -_bktr= bktr .if ${MK_SOURCELESS_UCODE} != "no" _bxe= bxe .endif _cardbus= cardbus _cbb= cbb _cpuctl= cpuctl _cpufreq= cpufreq _dpms= dpms _em= em _et= et _exca= exca _if_ndis= if_ndis _io= io _itwd= itwd _ix= ix _ixv= ixv .if ${MK_SOURCELESS_UCODE} != "no" _lio= lio .endif _nctgpio= nctgpio _ndis= ndis _ntb= ntb _ocs_fc= ocs_fc _pccard= pccard .if ${MK_OFED} != "no" || defined(ALL_MODULES) _rdma= rdma .endif _safe= safe _speaker= speaker _splash= splash _sppp= sppp _vmware= vmware _wbwd= wbwd _wi= wi _aac= aac _aacraid= aacraid _acpi= acpi .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} > 40201 _aesni= aesni .endif .endif _amd_ecc_inject=amd_ecc_inject _amdsbwd= amdsbwd _amdsmn= amdsmn _amdtemp= amdtemp _arcmsr= arcmsr _asmc= asmc .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _blake2= blake2 .endif _bytgpio= bytgpio _chvgpio= chvgpio _ciss= ciss _chromebook_platform= chromebook_platform _cmx= cmx _coretemp= coretemp .if ${MK_SOURCELESS_HOST} != "no" && empty(KCSAN_ENABLED) _hpt27xx= hpt27xx .endif _hptiop= hptiop .if ${MK_SOURCELESS_HOST} != "no" && empty(KCSAN_ENABLED) _hptmv= hptmv _hptnr= hptnr _hptrr= hptrr .endif _hyperv= hyperv _ichwd= ichwd _ida= ida _iir= iir _intelspi= intelspi _ipmi= ipmi _ips= ips _isci= isci _ipw= ipw _iwi= iwi _iwm= iwm _iwn= iwn .if ${MK_SOURCELESS_UCODE} != "no" _ipwfw= ipwfw _iwifw= iwifw _iwmfw= iwmfw _iwnfw= iwnfw .endif _mly= mly _nfe= nfe _nvd= nvd _nvme= nvme _nvram= nvram .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _padlock= padlock _padlock_rng= padlock_rng _rdrand_rng= rdrand_rng .endif _s3= s3 _sdhci_acpi= sdhci_acpi _superio= superio _tpm= tpm _twa= twa _vesa= vesa _viawd= viawd _virtio= virtio _wpi= wpi .if ${MK_SOURCELESS_UCODE} != "no" _wpifw= wpifw .endif _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" _amdgpio= amdgpio _ccp= ccp _efirt= efirt _iavf= iavf _ioat= ioat _ixl= ixl _nvdimm= nvdimm _pms= pms _qlxge= qlxge _qlxgb= qlxgb _vmd= vmd .if ${MK_SOURCELESS_UCODE} != "no" _qlxgbe= qlxgbe _qlnx= qlnx .endif _sfxge= sfxge _sgx= sgx _sgx_linux= sgx_linux _smartpqi= smartpqi .if ${MK_BHYVE} != "no" || defined(ALL_MODULES) .if ${KERN_OPTS:MSMP} _vmm= vmm .endif .endif .endif .if ${MACHINE_CPUARCH} == "i386" # XXX some of these can move to the general case when de-i386'ed # XXX some of these can move now, but are untested on other architectures. _3dfx= 3dfx _3dfx_linux= 3dfx_linux _apm= apm .if ${MK_SOURCELESS_HOST} != "no" _ce= ce .endif .if ${MK_SOURCELESS_UCODE} != "no" _cp= cp .endif _glxiic= glxiic _glxsb= glxsb _pcfclock= pcfclock _pst= pst _sbni= sbni .if ${MK_SOURCELESS_UCODE} != "no" _ctau= ctau .endif .endif .if ${MACHINE_CPUARCH} == "arm" _cfi= cfi _cpsw= cpsw .endif .if ${MACHINE_CPUARCH} == "powerpc" _agp= agp _an= an _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq _exca= exca _ffec= ffec _nvd= nvd _nvme= nvme _pccard= pccard _wi= wi _virtio= virtio .endif .if ${MACHINE_ARCH} == "powerpc64" _ipmi= ipmi _nvram= opal_nvram .endif .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" # Don't build powermac_nvram for powerpcspe, it's never supported. _nvram+= powermac_nvram .endif .if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "i386") _cloudabi32= cloudabi32 .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" _cloudabi64= cloudabi64 .endif .endif .if ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "aarch64" _bcm283x_clkman= bcm283x_clkman _bcm283x_pwm= bcm283x_pwm .endif SUBDIR+=${MODULES_EXTRA} .for reject in ${WITHOUT_MODULES} SUBDIR:= ${SUBDIR:N${reject}} .endfor # Calling kldxref(8) for each module is expensive. .if !defined(NO_XREF) .MAKEFLAGS+= -DNO_XREF afterinstall: .PHONY @if type kldxref >/dev/null 2>&1; then \ ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ fi .endif SUBDIR:= ${SUBDIR:u:O} .include diff --git a/sys/modules/bktr/Makefile b/sys/modules/bktr/Makefile deleted file mode 100644 index 1a9e0376921f..000000000000 --- a/sys/modules/bktr/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# $FreeBSD$ - -SUBDIR = -SUBDIR += bktr -SUBDIR += bktr_mem - -.include diff --git a/sys/modules/bktr/Makefile.inc b/sys/modules/bktr/Makefile.inc deleted file mode 100644 index 265f86d1ed55..000000000000 --- a/sys/modules/bktr/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $FreeBSD$ - -.include "../Makefile.inc" diff --git a/sys/modules/bktr/bktr/Makefile b/sys/modules/bktr/bktr/Makefile deleted file mode 100644 index 4345abeaedf6..000000000000 --- a/sys/modules/bktr/bktr/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $FreeBSD$ - -# Makefile for the bktr Brooktree Bt848/Bt878 PCI video capture device - -.PATH: ${SRCTOP}/sys/dev/bktr - -KMOD= bktr -SRCS= bktr_core.c bktr_os.c bktr_audio.c bktr_tuner.c bktr_card.c msp34xx.c \ - opt_bktr.h bus_if.h device_if.h \ - pci_if.h - -CFLAGS+= -DBKTR_FREEBSD_MODULE - -.if defined(BKTR_USE_FREEBSD_SMBUS) -SRCS+= bktr_i2c.c iicbb_if.h iicbus_if.h smbus_if.h -CFLAGS+= -DBKTR_USE_FREEBSD_SMBUS -.endif - -.include diff --git a/sys/modules/bktr/bktr_mem/Makefile b/sys/modules/bktr/bktr_mem/Makefile deleted file mode 100644 index 12c9cbd26189..000000000000 --- a/sys/modules/bktr/bktr_mem/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -.PATH: ${SRCTOP}/sys/dev/bktr - -KMOD= bktr_mem -SRCS= bktr_mem.c -EXPORT_SYMS= bktr_has_stored_addresses \ - bktr_store_address \ - bktr_retrieve_address - -.include diff --git a/sys/sys/param.h b/sys/sys/param.h index a690ad9ffdb3..13742bf3c5ff 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,368 +1,368 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * 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. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)param.h 8.3 (Berkeley) 4/4/95 * $FreeBSD$ */ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ #include #define BSD 199506 /* System version (year & month). */ #define BSD4_3 1 #define BSD4_4 1 /* * __FreeBSD_version numbers are documented in the Porter's Handbook. * If you bump the version for any reason, you should update the documentation * there. * Currently this lives here in the doc/ repository: * * head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml * * scheme is: Rxx * 'R' is in the range 0 to 4 if this is a release branch or * X.0-CURRENT before releng/X.0 is created, otherwise 'R' is * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300081 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300082 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, * which by definition is always true on FreeBSD. This macro is also defined * on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD. * * It is tempting to use this macro in userland code when we want to enable * kernel-specific routines, and in fact it's fine to do this in code that * is part of FreeBSD itself. However, be aware that as presence of this * macro is still not widespread (e.g. older FreeBSD versions, 3rd party * compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in * external applications without also checking for __FreeBSD__ as an * alternative. */ #undef __FreeBSD_kernel__ #define __FreeBSD_kernel__ #if defined(_KERNEL) || defined(IN_RTLD) #define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #define P_OSREL_MAP_FSTRICT 1100036 #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 #define P_OSREL_MAP_GUARD 1200035 #define P_OSREL_WRFSBASE 1200041 #define P_OSREL_CK_CYLGRP 1200046 #define P_OSREL_VMTOTAL64 1200054 #define P_OSREL_CK_SUPERBLOCK 1300000 #define P_OSREL_CK_INODE 1300005 #define P_OSREL_POWERPC_NEW_AUX_ARGS 1300070 #define P_OSREL_MAJOR(x) ((x) / 100000) #endif #ifndef LOCORE #include #endif /* * Machine-independent constants (some used in following include files). * Redefined constants are from POSIX 1003.1 limits file. * * MAXCOMLEN should be >= sizeof(ac_comm) (see ) */ #include #define MAXCOMLEN 19 /* max command name remembered */ #define MAXINTERP PATH_MAX /* max interpreter file name length */ #define MAXLOGNAME 33 /* max login name length (incl. NUL) */ #define MAXUPRC CHILD_MAX /* max simultaneous processes */ #define NCARGS ARG_MAX /* max bytes for an exec function */ #define NGROUPS (NGROUPS_MAX+1) /* max number groups */ #define NOFILE OPEN_MAX /* max open files per process */ #define NOGROUP 65535 /* marker for empty group set member */ #define MAXHOSTNAMELEN 256 /* max hostname size */ #define SPECNAMELEN 255 /* max length of devicename */ /* More types and definitions used throughout the kernel. */ #ifdef _KERNEL #include #include #ifndef LOCORE #include #include #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #endif #ifndef _KERNEL /* Signals. */ #include #endif /* Machine type dependent parameters. */ #include #ifndef _KERNEL #include #endif #ifndef DEV_BSHIFT #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #endif #define DEV_BSIZE (1<>PAGE_SHIFT) #endif /* * btodb() is messy and perhaps slow because `bytes' may be an off_t. We * want to shift an unsigned type to avoid sign extension and we don't * want to widen `bytes' unnecessarily. Assume that the result fits in * a daddr_t. */ #ifndef btodb #define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ (sizeof (bytes) > sizeof(long) \ ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \ : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) #endif #ifndef dbtob #define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ ((off_t)(db) << DEV_BSHIFT) #endif #define PRIMASK 0x0ff #define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ #define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ #define NZERO 0 /* default "nice" */ #define NBBY 8 /* number of bits in a byte */ #define NBPW sizeof(int) /* number of bytes per word (integer) */ #define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ #define NODEV (dev_t)(-1) /* non-existent device */ /* * File system parameters and macros. * * MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes * per block. MAXBSIZE may be made larger without effecting * any existing filesystems as long as it does not exceed MAXPHYS, * and may be made smaller at the risk of not being able to use * filesystems which require a block size exceeding MAXBSIZE. * * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must * be >= MAXBSIZE and can be set differently for different * architectures by defining it in . * Making this larger allows NFS to do larger reads/writes. * * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the * minimum KVM memory reservation the kernel is willing to make. * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). * The default value here can be overridden on a per-architecture * basis by defining it in . * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you * make it too big the kernel will not be able to optimally use * the KVM memory reserved for the buffer cache and will wind * up with too-few buffers. * * The default is 16384, roughly 2x the block size used by a * normal UFS filesystem. */ #define MAXBSIZE 65536 /* must be power of 2 */ #ifndef MAXBCACHEBUF #define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ #endif #ifndef BKVASIZE #define BKVASIZE 16384 /* must be power of 2 */ #endif #define BKVAMASK (BKVASIZE-1) /* * MAXPATHLEN defines the longest permissible path length after expanding * symbolic links. It is used to allocate a temporary buffer from the buffer * pool in which to do the name expansion, hence should be a power of two, * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the * maximum number of symbolic links that may be expanded in a path name. * It should be set high enough to allow all legitimate uses, but halt * infinite loops reasonably quickly. */ #define MAXPATHLEN PATH_MAX #define MAXSYMLINKS 32 /* Bit map related macros. */ #define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) \ (((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) \ ((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* Macros for counting and rounding. */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #define rounddown(x, y) (((x)/(y))*(y)) #define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ #define powerof2(x) ((((x)-1)&(x))==0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #ifdef _KERNEL /* * Basic byte order function prototypes for non-inline functions. */ #ifndef LOCORE #ifndef _BYTEORDER_PROTOTYPED #define _BYTEORDER_PROTOTYPED __BEGIN_DECLS __uint32_t htonl(__uint32_t); __uint16_t htons(__uint16_t); __uint32_t ntohl(__uint32_t); __uint16_t ntohs(__uint16_t); __END_DECLS #endif #endif #ifndef _BYTEORDER_FUNC_DEFINED #define _BYTEORDER_FUNC_DEFINED #define htonl(x) __htonl(x) #define htons(x) __htons(x) #define ntohl(x) __ntohl(x) #define ntohs(x) __ntohs(x) #endif /* !_BYTEORDER_FUNC_DEFINED */ #endif /* _KERNEL */ /* * Scale factor for scaled integers used to count %cpu time and load avgs. * * The number of CPU `tick's that map to a unique `%age' can be expressed * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that * can be calculated (assuming 32 bits) can be closely approximated using * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). * * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. */ #define FSHIFT 11 /* bits to right of fixed binary point */ #define FSCALE (1<> (PAGE_SHIFT - DEV_BSHIFT)) #define ctodb(db) /* calculates pages to devblks */ \ ((db) << (PAGE_SHIFT - DEV_BSHIFT)) /* * Old spelling of __containerof(). */ #define member2struct(s, m, x) \ ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) /* * Access a variable length array that has been declared as a fixed * length array. */ #define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset]) #endif /* _SYS_PARAM_H_ */