public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* Re: SDHCI generic controller in Linux
       [not found] ` <dd3be1f2-02fd-40ef-8f52-ff5dbea3da90@intel.com>
@ 2025-11-07 21:27   ` Steffen Pervold
  2025-11-10  9:04     ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Steffen Pervold @ 2025-11-07 21:27 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: linux-mmc

On Fri, Nov 7, 2025 at 7:59 PM Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> On 07/11/2025 19:54, Steffen Pervold wrote:
> > Hi Adrian,
> >
> > I hope this email finds you well.
> >
> > Recently I have developed a SDHCI compliant host controller in System Verilog (for a hobby project), but I could not find any existing drivers in the Linux kernel (as per 6.18) that is using just the standard functions as provided by sdhci.c. All the existing ones have either some vendor specific quirks or function handlers (specific to a SoC platform for example).
> >
> > So I made a "generic" SDHCI driver that should work for any SDHCI compliant controller that doesn't need any special quirks or handling (other than what you can override in the device tree attributes).
> >
> > Before I post the patch to the kernel community I thought I'd ask you as I see you're listed as the maintainer of the SDHCI subsystem.
> >
> > I've attached the patch for your convenience.
> >
> > Any feedback is highly appreciated.
>
> First, it is preferred to keep the development process in public.  In other words, cc the appropriate mailing list with this kind of question. For SDHCI it is linux-mmc@vger.kernel.org , see the archive at https://lore.kernel.org/linux-mmc/
>
> If you reply to this, I would prefer you cc linux-mmc@vger.kernel.org

My apologies, Cc added.

>
> Secondly, it sounds like you would be the only user of the driver.  You would need to make a case for why it needs to be in the mainline kernel.  Even Linus Torvalds has said he has code that he doesn't submit to the kernel because he doesn't think it would benefit anyone else.

Yes, this is true as far as I know (for now). However I was slightly
surprised that since SDHCI is a well defined standard specification
that there was no "generic" platform driver like there is for USB
OHCI/EHCI/XHCI/UHCI.

>
> Note you can post a patch as an RFC (Request for comment) that is better for getting feedback on whether it is a good idea.  Even if the patch is not accepted, having the patch and the discussion on the mailing list may help others.  And of course others may have had a similar requirement to the one you have, and have solved it another way, so there are plenty of reasons for using the mailing list.

I will do that. Thanks for the tip.

>
> And please be sure to have a look at Kernel documentation like:
>         Submitting patches
>                 https://docs.kernel.org/process/submitting-patches.html
>         Development Process
>                 https://docs.kernel.org/process/development-process.html
>

Yes, thanks!

Cheers,
Steffen

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SDHCI generic controller in Linux
  2025-11-07 21:27   ` SDHCI generic controller in Linux Steffen Pervold
@ 2025-11-10  9:04     ` Adrian Hunter
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2025-11-10  9:04 UTC (permalink / raw)
  To: Steffen Pervold; +Cc: linux-mmc

On 07/11/2025 23:27, Steffen Pervold wrote:
> On Fri, Nov 7, 2025 at 7:59 PM Adrian Hunter <adrian.hunter@intel.com> wrote:
>>
>> On 07/11/2025 19:54, Steffen Pervold wrote:
>>> Hi Adrian,
>>>
>>> I hope this email finds you well.
>>>
>>> Recently I have developed a SDHCI compliant host controller in System Verilog (for a hobby project), but I could not find any existing drivers in the Linux kernel (as per 6.18) that is using just the standard functions as provided by sdhci.c. All the existing ones have either some vendor specific quirks or function handlers (specific to a SoC platform for example).
>>>
>>> So I made a "generic" SDHCI driver that should work for any SDHCI compliant controller that doesn't need any special quirks or handling (other than what you can override in the device tree attributes).
>>>
>>> Before I post the patch to the kernel community I thought I'd ask you as I see you're listed as the maintainer of the SDHCI subsystem.
>>>
>>> I've attached the patch for your convenience.
>>>
>>> Any feedback is highly appreciated.
>>
>> First, it is preferred to keep the development process in public.  In other words, cc the appropriate mailing list with this kind of question. For SDHCI it is linux-mmc@vger.kernel.org , see the archive at https://lore.kernel.org/linux-mmc/
>>
>> If you reply to this, I would prefer you cc linux-mmc@vger.kernel.org
> 
> My apologies, Cc added.
> 
>>
>> Secondly, it sounds like you would be the only user of the driver.  You would need to make a case for why it needs to be in the mainline kernel.  Even Linus Torvalds has said he has code that he doesn't submit to the kernel because he doesn't think it would benefit anyone else.
> 
> Yes, this is true as far as I know (for now). However I was slightly
> surprised that since SDHCI is a well defined standard specification
> that there was no "generic" platform driver like there is for USB
> OHCI/EHCI/XHCI/UHCI.

sdhci-acpi will drive any ACPI-enumerated device with ID PNP0D40
"SDA Standard Compliant SD Host Controller".  sdhci-pci will drive
any PCI device with the SDHCI class code 0x0805 "SD Host controller".

> 
>>
>> Note you can post a patch as an RFC (Request for comment) that is better for getting feedback on whether it is a good idea.  Even if the patch is not accepted, having the patch and the discussion on the mailing list may help others.  And of course others may have had a similar requirement to the one you have, and have solved it another way, so there are plenty of reasons for using the mailing list.
> 
> I will do that. Thanks for the tip.
> 
>>
>> And please be sure to have a look at Kernel documentation like:
>>         Submitting patches
>>                 https://docs.kernel.org/process/submitting-patches.html
>>         Development Process
>>                 https://docs.kernel.org/process/development-process.html
>>
> 
> Yes, thanks!
> 
> Cheers,
> Steffen


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-10  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAGw3uGD=jqdppGzQ9k8K6qu1znpWMrgMdcxYvtEXWi2Qwn01uw@mail.gmail.com>
     [not found] ` <dd3be1f2-02fd-40ef-8f52-ff5dbea3da90@intel.com>
2025-11-07 21:27   ` SDHCI generic controller in Linux Steffen Pervold
2025-11-10  9:04     ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox