Re: [PATCH v2 2/3] pinctrl: amd: Get and update IOMUX details

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/24/2022 5:37 PM, Mika Westerberg wrote:

> On Tue, May 24, 2022 at 05:22:47PM +0530, Basavaraj Natikar wrote:
>> On 5/24/2022 5:07 PM, Mika Westerberg wrote:
>>
>>> Hi,
>>>
>>> On Tue, May 24, 2022 at 04:48:03PM +0530, Basavaraj Natikar wrote:
>>>>>> +
>>>>>> +       status = acpi_walk_namespace(ACPI_TYPE_REGION, sys_bus_handle, ACPI_UINT32_MAX,
>>>>>> +                                    acpi_get_iomux_region, NULL, gpio_dev, NULL);
>>>>>> +
>>>>>> +       if (ACPI_FAILURE(status)) {
>>>>>> +               dev_err(&gpio_dev->pdev->dev, "Failed to get acpi_get_iomux_region\n");
>>>>>> +               return;
>>>>>> +       }
>>>>>> +}
>>>>> Oh this looks scary to me, make sure you get the review from the GPIO
>>>>> ACPI experts, Andy Shevchenko and/or Mika Westerberg. (Added on the
>>>>> To: line)
>>>> Thanks Linus for the feedback.
>>>>
>>>> Hi Andy/Mika,
>>>>
>>>> Please provide your suggestions for this patch.
>>> If this is about muxing pins, have you looked at the ACPI PinFunction ()
>>> and related descriptors?
>> This is about finding below IOMX (pinmux region) from ACPI namespace.
> Yes, I know but you use it for muxing pins, no?
>
>> OperationRegion (IOMX, SystemMemory, 0xFED80D00, 0x0100)
>>
>> I did not find any other methods to get IOMUX system memory region.
> It seems to be standard BAR so simple memory descriptor in _CRS ()
> probably works too and does not need any additional lines of code.

There is no CRS method defined for IOMX/0xFED80D00 in ACPI namespace // IOMX Address Base 
Hence I added additional code to get IOMX memory region.

since _CRS method is used to get GPIO pin base for AMDI0030 in pinctrl-amd as below, same is not available for IOMX
 
  Device (GPIO)
        {
            Name (_HID, "AMDI0030")  // _HID: Hardware ID
            Name (_CID, "AMDI0030")  // _CID: Compatible ID
            Name (_UID, Zero)  // _UID: Unique ID
            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (RBUF, ResourceTemplate ()
                {
                    Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, )
                    {
                        0x00000007,
                    }
                    Memory32Fixed (ReadWrite,
                        0xFED81500,         // Address Base
                        0x00000400,         // Address Length
                        )
                })
                Return (RBUF) /* \_SB_.GPIO._CRS.RBUF */
            }





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux