From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Borislav Petkov <bp@suse.de>
Cc: "Limonciello, Mario" <mario.limonciello@amd.com>,
"Jan Dąbroś" <jsd@semihalf.com>,
linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
jarkko.nikula@linux.intel.com, wsa@kernel.org,
rrangel@chromium.org, upstream@semihalf.com,
"Muralidhara M K" <muralimk@amd.com>,
"Naveen Krishna Chatradhi" <nchatrad@amd.com>
Subject: Re: [PATCH -next 1/2] i2c: designware: Switch from using MMIO access to SMN access
Date: Thu, 22 Sep 2022 15:48:07 +0200 [thread overview]
Message-ID: <c0c8bdce-26a0-ad3f-749b-7585d947608b@redhat.com> (raw)
In-Reply-To: <YywwEvkZK1R9mJfE@smile.fi.intel.com>
Hi,
On 9/22/22 11:51, Andy Shevchenko wrote:
> +Cc: Hans (mentioned your name and was under impression that you are in Cc list already)
>
> On Thu, Sep 22, 2022 at 12:49:15PM +0300, Andy Shevchenko wrote:
>> On Wed, Sep 21, 2022 at 10:50:53PM +0200, Borislav Petkov wrote:
>>> On Wed, Sep 21, 2022 at 03:19:26PM -0500, Limonciello, Mario wrote:
>>>> Jan mentioned this in the commit message:
>>>>
>>>>> The function which registers i2c-designware-platdrv is a
>>>>> subsys_initcall that is executed before fs_initcall (when enumeration > of
>>>> NB descriptors occurs).
>>>>
>>>> So if it's not exported again, then it means that we somehow
>>>> need to get i2c-designware-platdrv to register earlier too.
>>>
>>> So I have this there:
>>>
>>> /* This has to go after the PCI subsystem */
>>> fs_initcall(init_amd_nbs);
>>>
>>> as I need PCI. It itself does
>>>
>>> arch_initcall(pci_arch_init);
>>>
>>> so I guess init_amd_nbs() could be a subsys_initcall...
>>>
>>> Or why is
>>>
>>> subsys_initcall(dw_i2c_init_driver);
>>>
>>> a subsys initcall in the first place?
>>>
>>> Looking at
>>>
>>> 104522806a7d ("i2c: designware: dw_i2c_init_driver as subsys initcall")
>>>
>>> I don't see a particular reason why it should be a subsys_initcall...
>>>
>>> In any case, this should be fixed without an export which was crap in
>>> the first place.
>>>
>>> Hm.
>>
>> I'm speculating here, but IIRC the I2C controllers may serve PMICs on some
>> platform that are required to be present earlier due to some ACPI code
>> accessing them. This Hans de Goede can confirm or correct me.
Right, thank you for Cc-ing me. At least on X86 there are several platforms
(and 100-s of device models) which use a PMIC connected to the i2c-designware
controller and this PMIC gets poked directly from ACPI _S0 and _S3
(power on/off) methods. So the I2C bus driver needs to *bind* to the controller
as soon as we find its description in ACPI, otherwise we get a whole bunch
of failed ACPI OpRegion access errors as well as various actual really issues.
So please keep this as a subsys initcall.
Regards,
Hans
next prev parent reply other threads:[~2022-09-22 13:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 13:18 [PATCH -next 0/2] Add i2c arbitration support for new SoCs Jan Dabros
2022-09-16 13:18 ` [PATCH -next 1/2] i2c: designware: Switch from using MMIO access to SMN access Jan Dabros
2022-09-16 17:38 ` Limonciello, Mario
2022-09-20 16:24 ` Jan Dąbroś
2022-09-21 20:12 ` Borislav Petkov
2022-09-21 20:19 ` Limonciello, Mario
2022-09-21 20:50 ` Borislav Petkov
2022-09-22 9:49 ` Andy Shevchenko
2022-09-22 9:51 ` Andy Shevchenko
2022-09-22 13:48 ` Hans de Goede [this message]
2022-09-22 14:04 ` Borislav Petkov
2022-09-22 14:29 ` Hans de Goede
2022-09-26 12:49 ` Jan Dąbroś
2022-09-26 14:44 ` Borislav Petkov
2022-10-28 8:32 ` Jan Dąbroś
2023-01-09 11:12 ` Borislav Petkov
2023-01-09 17:10 ` Limonciello, Mario
2023-01-16 10:19 ` Jan Dąbroś
2023-01-16 12:38 ` Andy Shevchenko
2023-01-16 16:22 ` Limonciello, Mario
2023-01-16 17:48 ` Andy Shevchenko
2023-01-16 17:54 ` Andy Shevchenko
2023-01-16 21:59 ` Borislav Petkov
2022-09-19 13:59 ` Andy Shevchenko
2022-09-20 16:27 ` Jan Dąbroś
2022-09-16 13:18 ` [PATCH -next 2/2] i2c: designware: Add support for new SoCs in AMDPSP driver Jan Dabros
2022-09-19 13:59 ` Andy Shevchenko
2023-03-17 19:18 ` Mark Hasemeyer
2023-03-20 0:16 ` Mario Limonciello
2022-09-19 13:59 ` [PATCH -next 0/2] Add i2c arbitration support for new SoCs Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0c8bdce-26a0-ad3f-749b-7585d947608b@redhat.com \
--to=hdegoede@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bp@suse.de \
--cc=jarkko.nikula@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=muralimk@amd.com \
--cc=nchatrad@amd.com \
--cc=rrangel@chromium.org \
--cc=upstream@semihalf.com \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox