[Intel-gfx] [RFC PATCH 3/9] drm/i915/spi: add driver for on-die spi device

Winkler, Tomas tomas.winkler at intel.com
Sat Feb 20 12:56:19 EST 2021



> On Thu, Feb 18, 2021 at 10:06:08PM -0800, Winkler, Tomas wrote:
> >
> >>
> >> On Wed, Feb 17, 2021 at 08:58:12PM +0000, Winkler, Tomas wrote:
> >> >>
> >> >> On Tue, 16 Feb 2021, Tomas Winkler <tomas.winkler at intel.com>
> wrote:
> >> >> > Add the platform driver for i915 on-die spi device, exposed via
> >> >> > mfd framework.
> >> >> >
> >> >> > Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> >> >> > Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> >> >> > Signed-off-by: Tomas Winkler <tomas.winkler at intel.com>
> >> >> > ---
> >> >> >  drivers/gpu/drm/i915/Kconfig             |   2 +
> >> >> >  drivers/gpu/drm/i915/Makefile            |   3 +
> >> >> >  drivers/gpu/drm/i915/spi/intel_spi_drv.c | 116
> >> >> > +++++++++++++++++++++++
> >> >> >  3 files changed, 121 insertions(+)  create mode 100644
> >> >> > drivers/gpu/drm/i915/spi/intel_spi_drv.c
> >> >> >
> >> >> > diff --git a/drivers/gpu/drm/i915/Kconfig
> >> >> > b/drivers/gpu/drm/i915/Kconfig index abcaa8da45ac..13c870e5878e
> >> >> > 100644
> >> >> > --- a/drivers/gpu/drm/i915/Kconfig
> >> >> > +++ b/drivers/gpu/drm/i915/Kconfig
> >> >> > @@ -27,6 +27,8 @@ config DRM_I915
> >> >> >  	select CEC_CORE if CEC_NOTIFIER
> >> >> >  	select VMAP_PFN
> >> >> >  	select MFD_CORE
> >> >> > +	select MTD
> >> >>
> >> >> Selecting MTD does not seem to be a popular thing to do, which is
> >> >> usually a clue it's probably the wrong thing to do.
> >> >Depends, if it is not selected you'll end with wrongly configured system.
> >>
> >> no. I believe the idea is that having a CONFIG_I915_SPI, you could do
> >>
> >> 	depends on MTD
> >>
> >> like the other drivers doing similar thing:
> >>
> >> 	git grep MTD -- ':(exclude)drivers/mtd' ':(exclude)arch/' '*Kconfig'
> > I know the pattern and it can be done, the issue is that mtd is used mostly
> in embedded systems so it is not selected by the desktop distros.
> >The intel spi both on PCH and in GFX takes this into different direction and
> usage.
> 
> humn... but then we have a problem here. You're saying most of the people
> won't need it because it's used only for manufacturing*.
> And yet you want it to be force selected on everybody?  That doesn't sound
> like a good plan.
It depends, whether manufacturing is done on shipping OS or not, both approaches are in use.
One approach for the first case can be that the distro prevent the module loading via modprobe.d 
and it's forcefully loaded during manufacturing.  Still it should be compiled and signed.
> 
> Lucas De Marchi
> 
> 
> * it may actually also be useful for kernel developers too, to dump its content
> and validate the parser, help debug other systems, etc.
True.




More information about the linux-mtd mailing list