aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Rashed2019-01-03 17:48:51 -0600
committerAhmad Rashed2019-01-03 17:48:51 -0600
commitfbe3ce5f210a33f61cd762610dec969dd5f8c7a2 (patch)
treedd68bcc9baa58ec86d33cb13fef4ad7bc7027983 /am57xx_generate_pin_config_data.pl
parenta02393a52cc2e67bdc59c90af81ec666ed50a774 (diff)
downloadam57xx_uboot_pin_config-fbe3ce5f210a33f61cd762610dec969dd5f8c7a2.tar.gz
am57xx_uboot_pin_config-fbe3ce5f210a33f61cd762610dec969dd5f8c7a2.tar.xz
am57xx_uboot_pin_config-fbe3ce5f210a33f61cd762610dec969dd5f8c7a2.zip
README and script updated to handle the alternate padconfig register information provided by the PMT
Diffstat (limited to 'am57xx_generate_pin_config_data.pl')
-rwxr-xr-xam57xx_generate_pin_config_data.pl20
1 files changed, 19 insertions, 1 deletions
diff --git a/am57xx_generate_pin_config_data.pl b/am57xx_generate_pin_config_data.pl
index affbd46..4ee7331 100755
--- a/am57xx_generate_pin_config_data.pl
+++ b/am57xx_generate_pin_config_data.pl
@@ -43,6 +43,15 @@ my $padconf_file;
43my $output_format; 43my $output_format;
44my %iodelay_array; 44my %iodelay_array;
45my %iopad_array; 45my %iopad_array;
46my %alt_pad_array = (
47 '0x4A002E68' => 0x0,
48 '0x4A002E8C' => 0x0,
49 '0x4A002E90' => 0x0,
50 '0x4B226008' => 0x0,
51 '0x4B22600C' => 0x0,
52 '0x4B2A6008' => 0x0,
53 '0x4B2A600C' => 0x0,
54);
46 55
47# For New operations: update the two arrays 56# For New operations: update the two arrays
48my %operations_help = ( 57my %operations_help = (
@@ -143,7 +152,10 @@ sub do_read_file
143 @iopad_row = split( ',', $row ); 152 @iopad_row = split( ',', $row );
144 $register = $iopad_row[0]; 153 $register = $iopad_row[0];
145 @iopad_row = splice @iopad_row, 1, $#iopad_row; 154 @iopad_row = splice @iopad_row, 1, $#iopad_row;
146 if ($iopad) { 155
156 if (exists($alt_pad_array{$register})) {
157 $alt_pad_array{$register} |= hex($iopad_row[0]);
158 } elsif ($iopad) {
147 $iopad_array{$register} = [@iopad_row]; 159 $iopad_array{$register} = [@iopad_row];
148 } else { 160 } else {
149 $iodelay_array{$register} = [@iopad_row]; 161 $iodelay_array{$register} = [@iopad_row];
@@ -292,6 +304,12 @@ sub operation_iopad()
292 } 304 }
293 printf(")},\t/* $mux0.$mux */\n"); 305 printf(")},\t/* $mux0.$mux */\n");
294 } 306 }
307
308 foreach $register ( sort keys %alt_pad_array ) {
309 if (hex($alt_pad_array{$register}) == 0) { next; }
310 my $register_val = sprintf( "0x%08x", $alt_pad_array{$register} );
311 print "\{$register, ($register_val)},\n";
312 }
295} 313}
296 314
297sub operation_iodelay() 315sub operation_iodelay()