diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-09-25 11:52:12 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-09-25 11:52:12 +0000 |
commit | d6503485736e4ad332618728a112d148e8a2b11e (patch) | |
tree | 8ebebe0d7d68e8d36c802afb8a45c36efd3c3f61 /drivers/dahdi/xpp/init_card_2_30 | |
parent | 03bfa0b772c20c59cde8af538c668969a249104f (diff) |
Fix display of indirect registers and streamline their setting.
* This commit fixes display of indirect registers through the chipregs
(formly "slics") procfs file. Only the low byte was displayed.
* It also deprecates previous {RW}S in favour of {RW}I. The prevois
style is still allowed but deprecated, and thus previous scripts will
still work.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4980 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/init_card_2_30')
-rwxr-xr-x | drivers/dahdi/xpp/init_card_2_30 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/dahdi/xpp/init_card_2_30 b/drivers/dahdi/xpp/init_card_2_30 index bda0792..6a62ec8 100755 --- a/drivers/dahdi/xpp/init_card_2_30 +++ b/drivers/dahdi/xpp/init_card_2_30 @@ -29,12 +29,12 @@ use strict; # accept settings for ALL SLICS). # 2. Command word: # - RD Read Direct register. -# - RI Read Indirect register. +# - RS Read Sub-register. # - WD Write Direct register. -# - WI Write Indirect register. +# - WS Write Sub-register. # 3. Register number in hexadecimal. -# 4. Low data byte in hexadecimal. (for WD and WI commands). -# 5. High data byte in hexadecimal. (for WI command only). +# 4. Low data byte in hexadecimal. (for WD and WS commands). +# 5. High data byte in hexadecimal. (for WS command only). # # @@ -264,6 +264,7 @@ sub opermode_to_string($) { sub opermode_verify($) { my $input = shift or die; my %verification_table; + my %location_lines; my $mismatches = 0; open(F, $input) or die "$0: Failed opening '$input': $!\n"; @@ -277,13 +278,14 @@ sub opermode_verify($) { my ($key, $val) = split(/=/, $p, 2); $verification_table{$location}{$key} = $val; } + $location_lines{$location} = $.; } close F; # First test: check for missing data in our program foreach my $location (sort keys %verification_table) { my $mode = $opermode_table{$location}; if(! defined $mode) { - printf STDERR "Missing from $0: '$location'\n"; + printf STDERR "Missing from $0: '$location' at $input:$location_lines{$location}\n"; $mismatches++; next; } @@ -291,7 +293,7 @@ sub opermode_verify($) { my $str1 = opermode_to_string($mode); my $str2 = opermode_to_string($verify_mode); if($str1 ne $str2) { - print STDERR "DIFF: $location:\n"; + print STDERR "DIFF: '$location' at $input:$location_lines{$location}\n"; printf STDERR "\t%-20s: %s\n", "program", $str1; printf STDERR "\t%-20s: %s\n", "verify", $str2; $mismatches++; |