Lines Matching refs:segment
302 my %segment;
303 $segment{BusType} = $busType;
304 $segment{SourceUnit} = $target;
305 $segment{SourceChip} = getParentByClass($target, "CHIP");
306 if ($segment{SourceChip} eq "")
319 $segment{DestUnit} = $dest;
320 $segment{DestChip} = getParentByClass($dest, "CHIP");
323 if ($segment{DestChip} eq "")
328 $segment{DestChip} = $parent;
332 if ($segment{DestChip} eq "")
350 $segment{FRUPath} = $fruPath;
352 $segment{Callouts} = \@callouts;
356 $segment{FRUPath} = "";
358 $segment{Callouts} = \@empty;
371 $segment{I2CBus} = $targets->getBusAttribute(
374 if ($segment{I2CBus} ne "")
376 $segment{I2CBus} = $segment{I2CBus} + 1;
380 if ($segment{I2CBus} eq "")
382 $segment{I2CBus} = $targets->getAttribute($target, "I2C_PORT");
385 $segment{I2CAddress} =
389 $segment{I2CAddress} =
390 Util::adjustI2CAddress($segment{I2CAddress});
394 $segment{FSILink} =
399 $segment{SPIBus} = $targets->getAttribute($target, "SPI_PORT");
402 if ($segment{SPIBus} =~ /^0x/i)
404 $segment{SPIBus} = hex($segment{SPIBus});
408 push @{$segments{$busType}}, { %segment };
502 for my $segment (@{$$segments{$busType}})
504 my $chipType = $targets->getType($segment->{SourceChip});
507 my $callout = buildSingleSegmentCallout($segment);
522 my ($segment, $callouts) = @_;
524 if ($segment->{BusType} eq "I2C")
526 return createI2CCallout($segment, $callouts);
528 elsif ($segment->{BusType} eq "FSIM")
530 return createFSICallout($segment, $callouts);
532 elsif ($segment->{BusType} eq "SPI")
534 return createSPICallout($segment, $callouts);
580 for my $segment (@{$$segments{$segmentType}})
585 if ($callout->destChip() eq $segment->{SourceChip})
589 buildSingleSegmentCallout($segment);
667 my $segment = shift;
668 my $bus = $segment->{I2CBus};
671 if ($targets->getAttribute($segment->{SourceChip}, "TYPE") eq "BMC")
673 $bus = Util::adjustI2CPort($segment->{I2CBus});
677 die "After adjusting BMC I2C bus $segment->{I2CBus}, " .
682 my $i2cCallout = new I2CCallout($segment->{SourceChip},
683 $segment->{DestChip}, $segment->{Callouts}, $bus,
684 $segment->{I2CAddress});
692 my $segment = shift;
694 my $fsiCallout = new FSICallout($segment->{SourceChip},
695 $segment->{DestChip}, $segment->{Callouts},
696 $segment->{FSILink}, $segment);
704 my $segment = shift;
706 my $spiCallout = new SPICallout($segment->{SourceChip},
707 $segment->{DestChip}, $segment->{Callouts},
708 $segment->{SPIBus});