[dahdi-commits] kpfleming: branch linux/kpfleming/modular_ec r4411 - in /linux/team/kpfleming...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Jun 19 09:02:44 CDT 2008
Author: kpfleming
Date: Thu Jun 19 09:02:44 2008
New Revision: 4411
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4411
Log:
Merged revisions 4404,4407-4408 via svnmerge from
https://origsvn.digium.com/svn/dahdi/linux/trunk
........
r4404 | tzafrir | 2008-06-19 08:13:44 -0500 (Thu, 19 Jun 2008) | 2 lines
Delete generated pciradio and tor2 firmware files on 'make clean'.
........
r4407 | tzafrir | 2008-06-19 08:24:41 -0500 (Thu, 19 Jun 2008) | 4 lines
Remove some unused magic intended to build MMX automatically.
Reimplement this with Kconfig if you really want it.
........
r4408 | tzafrir | 2008-06-19 08:36:15 -0500 (Thu, 19 Jun 2008) | 7 lines
Further XPP driver adjustments:
* More complete Kconfig.
* Verification of FXO init script moved here from tools.
* Perl init scripts are verified.
* Correct name XppConf*ig*.
* Add the files for xpp_mmap .
........
Added:
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/mmapbus.c
- copied unchanged from r4408, linux/trunk/drivers/dahdi/xpp/mmapbus.c
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/mmapbus.h
- copied unchanged from r4408, linux/trunk/drivers/dahdi/xpp/mmapbus.h
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/mmapdrv.c
- copied unchanged from r4408, linux/trunk/drivers/dahdi/xpp/mmapdrv.c
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/print_fxo_modes.c
- copied unchanged from r4408, linux/trunk/drivers/dahdi/xpp/print_fxo_modes.c
Modified:
linux/team/kpfleming/modular_ec/ (props changed)
linux/team/kpfleming/modular_ec/drivers/dahdi/Kbuild
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/ (props changed)
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kbuild
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kconfig
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/XppConfig.pm
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_1_30
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_2_30
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_3_30
linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_4_30
Propchange: linux/team/kpfleming/modular_ec/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jun 19 09:02:44 2008
@@ -1,1 +1,1 @@
-/linux/trunk:1-4388
+/linux/trunk:1-4410
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/Kbuild
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/Kbuild?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/Kbuild (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/Kbuild Thu Jun 19 09:02:44 2008
@@ -81,22 +81,4 @@
$(obj)/makefw: $(src)/makefw.c
$(HOSTCC) -o $@ $^
-# set CONFIG_DAHDI_MMX for a number of CPU types.
-# Right now this part is not enabled, unless you build with
-# DAHDI_MMX_AUTO=something .
-DAHDIMMX_WHITELIST_i386 = M586MMX M686 MPENTIUMII MPENTIUMIII MPENTIUMM \
- MPENTIUM4 MVIAC3_2
-
-DAHDIMMX_WHITELIST_x86_64 =
-
-# A list of configuration variables to test: CONFIG_M686 , etc.
-DAHDIMMX_CONFIG_VARS := $(DAHDIMMX_WHITELIST_$(ARCH):%=CONFIG_%)
-
-# expand them:
-DAHDIMMX_CONFIG_VALS := $(strip $(foreach var,$(DAHDIMMX_CONFIG_VARS),$(var)) )
-ifdef DAHDI_MMX_AUTO
- ifdef DAHDIMMX_CONFIG_VALS
- # TODO: make that
- CFLAGS_dahdi-base.o += -DCONFIG_DAHDI_MMX
- endif
-endif
+clean-files := radfw.h tor2fw.h
Propchange: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jun 19 09:02:44 2008
@@ -1,9 +1,11 @@
*.o
*.ko
-*.o.cmd
-*.ko.cmd
+*.cmd
*.mod.c
.tmp_versions
.*.swp
+*.verified
xpp_version.h
README.Astribank.html
+print_fxo_modes
+init_fxo_modes
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kbuild
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kbuild?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kbuild (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kbuild Thu Jun 19 09:02:44 2008
@@ -1,9 +1,3 @@
-ifdef SUBDIRS
- ZAP_KERNEL = $(SUBDIRS)
-else
- ZAP_KERNEL = $(M)
-endif
-
EXTRA_CFLAGS = $(XPP_LOCAL_CFLAGS) \
-DDEBUG \
-DPOLL_DIGITAL_INPUTS \
@@ -13,20 +7,22 @@
-g
#
+WITH_BRISTUFF := $(shell grep '^[[:space:]]*\#[[:space:]]*define[[:space:]]\+CONFIG_ZAPATA_BRI_DCHANS\>' $(src)/../dahdi_config.h)
+
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp.o
-obj-$(CONFIG_DAHDI_XPP_USB) += xpp_usb.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_FXS) += xpd_fxs.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_FXO) += xpd_fxo.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_PRI) += xpd_pri.o
-
-HAS_BRISTUFF := $(shell grep '^[[:space:]]*\#[[:space:]]*define[[:space:]]\+CONFIG_ZAPATA_BRI_DCHANS\>' $(ZAP_KERNEL)/dahdi_config.h)
+ifneq (,$(WITH_BRISTUFF))
+obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_BRI) += xpd_bri.o
+endif
# Build only supported modules
ifneq (,$(filter y m,$(CONFIG_USB)))
-obj-m += xpp_usb.o
+obj-$(DAHDI_BUILD_ALL)$(CONFIG_XPP_USB) += xpp_usb.o
endif
-ifneq (,$(HAS_BRISTUFF))
-obj-m += xpd_bri.o
+ifneq (,$(filter y m,$(CONFIG_BF537)))
+obj-$(DAHDI_BUILD_ALL)$(CONFIG_XPP_MMAP) += xpp_mmap.o
endif
xpp-objs += xbus-core.o xbus-sysfs.o xbus-pcm.o xframe_queue.o xpp_zap.o xproto.o card_global.o zap_debug.o
@@ -34,6 +30,7 @@
xpd_fxo-objs += card_fxo.o
xpd_bri-objs += card_bri.o
xpd_pri-objs += card_pri.o
+xpp_mmap-objs += mmapbus.o mmapdrv.o
ifeq (y,$(PARPORT_DEBUG))
EXTRA_CFLAGS += -DDEBUG_SYNC_PARPORT
@@ -42,7 +39,7 @@
# Handle versioning
XPP_VERSION_STR ?= $(shell if [ -r $(obj)/.version ]; then echo "\"`cat $(obj)/.version`\""; else echo '"Unknown"'; fi)
-clean-files := xpp_version.h
+clean-files += xpp_version.h
$(obj)/card_fxs.o $(obj)/card_fxo.o $(obj)/card_bri.o $(obj)/card_pri.o $(obj)/xpp_usb.o $(obj)/xpp.o: $(obj)/xpp_version.h
@@ -53,5 +50,42 @@
fi
$(Q)rm -f $@.tmp
+# Validations:
+# - Syntactic verification of perl scripts
+# - Handle country table validation for init_card_2_*
+
+XPP_PROTOCOL_VERSION := $(shell grep XPP_PROTOCOL_VERSION $(src)/xproto.h | sed -e 's/^.*XPP_PROTOCOL_VERSION[ \t]*//')
+
+xpp_verifications = \
+ init_card_1_$(XPP_PROTOCOL_VERSION) \
+ init_card_2_$(XPP_PROTOCOL_VERSION) \
+ init_card_3_$(XPP_PROTOCOL_VERSION) \
+ init_card_4_$(XPP_PROTOCOL_VERSION) \
+ init_fxo_modes
+
+xpp_verified = $(foreach file, $(xpp_verifications), $(file).verified)
+
+FXO_MODES = $(src)/../fxo_modes.h
+FXO_VERIFY = $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION) -v $(obj)/init_fxo_modes
+
+hostprogs-y := print_fxo_modes
+always := $(xpp_verified)
+print_fxo_modes-objs := print_fxo_modes.o
+HOSTCFLAGS_print_fxo_modes.o += -include $(FXO_MODES)
+
+clean-files += print_fxo_modes init_fxo_modes $(xpp_verified)
+
+$(obj)/init_fxo_modes: $(obj)/print_fxo_modes
+ @echo ' GEN $@'
+ $(Q)$(obj)/print_fxo_modes >$@ || (rm -f $@; exit 1)
+
+$(obj)/init_fxo_modes.verified: $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION) $(obj)/init_fxo_modes
+ @echo ' CHECK $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION)'
+ $(Q)$(FXO_VERIFY) && touch $@ || (rm -f $@; exit 1)
+
+$(obj)/init_card_%_$(XPP_PROTOCOL_VERSION).verified: $(src)/init_card_%_$(XPP_PROTOCOL_VERSION)
+ @echo ' VERIFY $<'
+ $(Q)perl -c $< 2> $@ || (cat $@; rm -f $@; exit 1)
+
.PHONY: FORCE
FORCE:
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kconfig
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kconfig?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kconfig (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/Kconfig Thu Jun 19 09:02:44 2008
@@ -4,7 +4,7 @@
menuconfig DAHDI_XPP
tristate "Xorcom Astribank Support"
- depends on DAHDI && USB
+ depends on DAHDI
default DAHDI
---help---
Infrastructure support for Xorcom Astribank products.
@@ -14,16 +14,32 @@
If unsure, say Y.
-if DAHDI_XPP
+config DAHDI_XPP_USB
+ tristate "Astribank USB transport"
+ depends on DAHDI_XPP && USB
+ default DAHDI_XPP
+ ---help---
+ To compile this driver as a module, choose M here: the
+ module will be called xpp_usb.
-config DAHDI_XPP_USB
- tristate
- depends on DAHDI_XPP
+ If unsure, say Y.
+
+config DAHDI_XPP_MMAP
+ tristate "Astribank Blackfin transport"
+ depends on DAHDI_XPP && BF537
default DAHDI_XPP
+ ---help---
+ To compile this driver as a module, choose M here: the
+ module will be called xpp_mmap.
+
+ This module can be compiled only on Blackfin architecture
+ (with uClinux).
+
+ If unsure, say N.
config DAHDI_XPD_FXS
tristate "FXS port Support"
- depends on DAHDI_XPP
+ depends on DAHDI_XPP && (DAHDI_XPP_USB || DAHDI_XPP_MMAP)
default DAHDI_XPP
---help---
To compile this driver as a module, choose M here: the
@@ -33,7 +49,7 @@
config DAHDI_XPD_FXO
tristate "FXO port Support"
- depends on DAHDI_XPP
+ depends on DAHDI_XPP && (DAHDI_XPP_USB || DAHDI_XPP_MMAP)
default DAHDI_XPP
---help---
To compile this driver as a module, choose M here: the
@@ -41,14 +57,26 @@
If unsure, say Y.
+config DAHDI_XPD_BRI
+ tristate "BRI port Support"
+ depends on DAHDI_XPP && (DAHDI_XPP_USB || DAHDI_XPP_MMAP)
+ default DAHDI_XPP
+ ---help---
+ To compile this driver as a module, choose M here: the
+ module will be called xpd_pri.
+
+ Note: this driver will be automatically excluded
+ from compilation if dahdi driver does not
+ contain the "bristuff" patch.
+
+ If unsure, say Y.
+
config DAHDI_XPD_PRI
tristate "PRI port Support"
- depends on DAHDI_XPP
+ depends on DAHDI_XPP && (DAHDI_XPP_USB || DAHDI_XPP_MMAP)
default DAHDI_XPP
---help---
To compile this driver as a module, choose M here: the
module will be called xpd_pri.
If unsure, say Y.
-
-endif # DAHDI_XPP
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/XppConfig.pm
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/XppConfig.pm?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/XppConfig.pm (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/XppConfig.pm Thu Jun 19 09:02:44 2008
@@ -1,4 +1,4 @@
-package XppConf;
+package XppConfig;
#
# Written by Oron Peled <oron at actcom.co.il>
# Copyright (C) 2008, Xorcom
@@ -10,8 +10,6 @@
use strict;
my $conf_file = "/etc/dahdi/xpp.conf";
-
-$conf_file = $ENV{XPP_CONFIG} if $ENV{XPP_CONFIG};
sub subst_var($$) {
my $lookup = shift;
@@ -55,7 +53,13 @@
return %xpp_config;
}
-my %x = read_config($conf_file);
+sub import {
+ my $pack = shift || die "Import without package?";
+ my $init_dir = shift || die "$pack::import -- missing init_dir parameter";
+ my $local_conf = "$init_dir/xpp.conf";
+ $conf_file = $local_conf if -r $local_conf;
+ my %x = read_config($conf_file);
+}
sub show_vars {
my $assoc = shift;
@@ -79,6 +83,5 @@
return ($conf_file, %result);
}
-source_vars(qw(XPP_PRI_SETUP opermode));
1;
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_1_30
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_1_30?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_1_30 (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_1_30 Thu Jun 19 09:02:44 2008
@@ -45,7 +45,7 @@
my $program = basename("$0");
my $init_dir = dirname("$0");
BEGIN { $init_dir = dirname($0); unshift(@INC, "$init_dir", "$init_dir/zconf"); }
-use XppConfig;
+use XppConfig $init_dir;
my $unit_id;
my %opts;
$ENV{XPP_BASE} = '/proc/xpp';
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_2_30
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_2_30?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_2_30 (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_2_30 Thu Jun 19 09:02:44 2008
@@ -45,12 +45,12 @@
my $program = basename("$0");
my $init_dir = dirname("$0");
BEGIN { $init_dir = dirname($0); unshift(@INC, "$init_dir", "$init_dir/zconf", "$init_dir/utils/zconf"); }
-use XppConfig;
+use XppConfig $init_dir;
my $unit_id;
my %opts;
$ENV{XPP_BASE} = '/proc/xpp';
-getopts('o:', \%opts);
+getopts('o:v:', \%opts);
my $debug;
@@ -127,9 +127,9 @@
CANADA reg16=00 reg26=C0 reg30=00 reg31=20
CHILE reg16=00 reg26=C0 reg30=00 reg31=20
CHINA reg16=00 reg26=30 reg30=0F reg31=20
-COLUMBIA reg16=00 reg26=C0 reg30=00 reg31=20
+COLOMBIA reg16=00 reg26=C0 reg30=00 reg31=20
CROATIA reg16=00 reg26=C2 reg30=02 reg31=20
-CYRPUS reg16=00 reg26=C2 reg30=02 reg31=20
+CYPRUS reg16=00 reg26=C2 reg30=02 reg31=20
CZECH reg16=00 reg26=C2 reg30=02 reg31=20
DENMARK reg16=00 reg26=C2 reg30=02 reg31=28
ECUADOR reg16=00 reg26=C0 reg30=00 reg31=20
@@ -263,6 +263,7 @@
sub opermode_verify($) {
my $input = shift or die;
my %verification_table;
+ my $mismatches = 0;
open(F, $input) or die "$0: Failed opening '$input': $!\n";
while(<F>) {
@@ -281,7 +282,8 @@
foreach my $location (sort keys %verification_table) {
my $mode = $opermode_table{$location};
if(! defined $mode) {
- printf STDERR "Missing $location\n";
+ printf STDERR "Missing from $0: '$location'\n";
+ $mismatches++;
next;
}
my $verify_mode = $verification_table{$location};
@@ -291,16 +293,20 @@
print STDERR "DIFF: $location:\n";
printf STDERR "\t%-20s: %s\n", "program", $str1;
printf STDERR "\t%-20s: %s\n", "verify", $str2;
+ $mismatches++;
}
}
# Second test: check for extra data in our program
foreach my $location (sort keys %opermode_table) {
my $mode = $verification_table{$location};
if(! defined $mode) {
- printf STDERR "Extra $location\n";
+ printf STDERR "Extra in $0 '$location'\n";
+ $mismatches++;
next;
}
}
+ print STDERR "Total $mismatches mismatches\n" if $mismatches;
+ return $mismatches;
}
sub read_defaults() {
@@ -331,11 +337,12 @@
FXO::opermode_preprocess; # Must be first
-if(@ARGV and $ARGV[0] =~ /^verify(.*)/) {
- my $verify_file = $1;
- die "Usage: $0 verify=filename\n" unless $verify_file =~ s/^=//;
+if($opts{v}) {
+ my $verify_file = $opts{v};
+ die "Usage: $0 [-v verify_filename]\n" unless $verify_file;
main::debug "$0: opermode verification (input='$verify_file')";
- FXO::opermode_verify($verify_file);
+ my $mismatches = FXO::opermode_verify($verify_file);
+ die "$0: Verification against $verify_file failed\n" if $mismatches != 0;
exit 0;
}
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_3_30
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_3_30?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_3_30 (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_3_30 Thu Jun 19 09:02:44 2008
@@ -57,6 +57,8 @@
my $program = basename("$0");
my $init_dir = dirname("$0");
+BEGIN { $init_dir = dirname($0); unshift(@INC, "$init_dir", "$init_dir/zconf"); }
+use XppConfig $init_dir;
my $unit_id;
my %opts;
$ENV{XPP_BASE} = '/proc/xpp';
Modified: linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_4_30
URL: http://svn.digium.com/view/dahdi/linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_4_30?view=diff&rev=4411&r1=4410&r2=4411
==============================================================================
--- linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_4_30 (original)
+++ linux/team/kpfleming/modular_ec/drivers/dahdi/xpp/init_card_4_30 Thu Jun 19 09:02:44 2008
@@ -54,6 +54,8 @@
my $program = basename("$0");
my $init_dir = dirname("$0");
+BEGIN { $init_dir = dirname($0); unshift(@INC, "$init_dir", "$init_dir/zconf"); }
+use XppConfig $init_dir;
my $unit_id;
my %opts;
$ENV{XPP_BASE} = '/proc/xpp';
@@ -344,8 +346,6 @@
}
package main;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/zconf"); }
-use XppConfig;
logit "Starting '$0'";
More information about the dahdi-commits
mailing list