FreeBSD/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDmSpiSerialBusDescriptor
 *
 * PARAMETERS:  Info                - Extra resource info
 *              Resource            - Pointer to the resource descriptor
 *              Length              - Length of the descriptor in bytes
 *              Level               - Current source code indentation level
 *
 * RETURN:      None
 *
 * DESCRIPTION: Decode a SPI serial bus descriptor
 *
 ******************************************************************************/
AcpiDmSpiSerialBusDescriptor
PARAMETERS:  Info                - Extra resource info
Resource            - Pointer to the resource descriptor
Length              - Length of the descriptor in bytes
Level               - Current source code indentation level

None

Decode a SPI serial bus descriptor
AcpiDmSpiSerialBusDescriptor PARAMETERS : Info - Extra resource info Resource - Pointer to the resource descriptor Length - Length of the descriptor in bytes Level - Current source code indentation level None Decode a SPI serial bus descriptor
static void
AcpiDmSpiSerialBusDescriptor (
    ACPI_OP_WALK_INFO       *Info,
    AML_RESOURCE            *Resource,
    UINT32                  Length,
    UINT32                  Level)
{
    UINT32                  ResourceSourceOffset;
    char                    *DeviceName;
    AcpiDmIndent (Level);
    AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
        Resource->SpiSerialBus.DeviceSelection,
        AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
        AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
        Resource->SpiSerialBus.DataBitLength);
    AcpiDmIndent (Level + 1);
    AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
        AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.Flags)],
        Resource->SpiSerialBus.ConnectionSpeed,
        AcpiGbl_CpoDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPolarity)]);
    AcpiDmIndent (Level + 1);
    AcpiOsPrintf ("%s, ",
        AcpiGbl_CphDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPhase)]);
    ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
        Resource->CommonSerialBus.TypeDataLength;
    DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
    AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    AcpiOsPrintf (",\n");
    AcpiDmIndent (Level + 1);
    AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
    AcpiOsPrintf ("%s, ",
        AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 1)]);
    AcpiDmDescriptorName ();
    AcpiOsPrintf (", %s,\n",
        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 2)]);
    AcpiDmIndent (Level + 1);
    AcpiDmDumpSerialBusVendorData (Resource, Level);
    AcpiOsPrintf (")\n");
#ifndef _KERNEL
    MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
#endif
}
static void AcpiDmSpiSerialBusDescriptor ( ACPI_OP_WALK_INFO * Info , AML_RESOURCE * Resource , UINT32 Length , UINT32 Level ) { UINT32 ResourceSourceOffset ; char * DeviceName ; AcpiDmIndent ( Level ) ; AcpiOsPrintf ( " \n " , Resource -> SpiSerialBus . DeviceSelection , AcpiGbl_DpDecode [ ACPI_EXTRACT_1BIT_FLAG ( Resource -> SpiSerialBus . TypeSpecificFlags , 1 ) ] , AcpiGbl_WmDecode [ ACPI_GET_1BIT_FLAG ( Resource -> SpiSerialBus . TypeSpecificFlags ) ] , Resource -> SpiSerialBus . DataBitLength ) ; AcpiDmIndent ( Level + 1 ) ; AcpiOsPrintf ( " \n " , AcpiGbl_SmDecode [ ACPI_GET_1BIT_FLAG ( Resource -> SpiSerialBus . Flags ) ] , Resource -> SpiSerialBus . ConnectionSpeed , AcpiGbl_CpoDecode [ ACPI_GET_1BIT_FLAG ( Resource -> SpiSerialBus . ClockPolarity ) ] ) ; AcpiDmIndent ( Level + 1 ) ; AcpiOsPrintf ( " " , AcpiGbl_CphDecode [ ACPI_GET_1BIT_FLAG ( Resource -> SpiSerialBus . ClockPhase ) ] ) ; ResourceSourceOffset = sizeof ( AML_RESOURCE_COMMON_SERIALBUS ) + Resource -> CommonSerialBus . TypeDataLength ; DeviceName = ACPI_ADD_PTR ( char , Resource , ResourceSourceOffset ) , AcpiUtPrintString ( DeviceName , ACPI_UINT16_MAX ) ; AcpiOsPrintf ( " \n " ) ; AcpiDmIndent ( Level + 1 ) ; AcpiOsPrintf ( " " , Resource -> SpiSerialBus . ResSourceIndex ) ; AcpiOsPrintf ( " " , AcpiGbl_ConsumeDecode [ ACPI_EXTRACT_1BIT_FLAG ( Resource -> SpiSerialBus . Flags , 1 ) ] ) ; AcpiDmDescriptorName ( ) ; AcpiOsPrintf ( " \n " , AcpiGbl_ShrDecode [ ACPI_EXTRACT_1BIT_FLAG ( Resource -> SpiSerialBus . Flags , 2 ) ] ) ; AcpiDmIndent ( Level + 1 ) ; AcpiDmDumpSerialBusVendorData ( Resource , Level ) ; AcpiOsPrintf ( " \n " ) ; #ifndef _KERNEL MpSaveSerialInfo ( Info -> MappingOp , Resource , DeviceName ) ; #endif }
FUNCTION:    AcpiDmSpiSerialBusDescriptor
 PARAMETERS:  Info                - Extra resource info
              Resource            - Pointer to the resource descriptor
              Length              - Length of the descriptor in bytes
              Level               - Current source code indentation level
FUNCTION : AcpiDmSpiSerialBusDescriptor PARAMETERS : Info - Extra resource info Resource - Pointer to the resource descriptor Length - Length of the descriptor in bytes Level - Current source code indentation level
/* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */ /* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */ /* ResourceSource is a required field */ /* ResourceSourceIndex, ResourceUsage */ /* Insert a descriptor name */ /* Share */ /* Dump the vendor data */