Message ID | 20231017052322.2636-1-kkartik@nvidia.com (mailing list archive) |
---|---|
Headers | show |
Series | soc/tegra: fuse: Add ACPI support | expand |
On Tue, Oct 17, 2023 at 10:53:14AM +0530, Kartik wrote: > This series of patches add ACPI support for Tegra194 and Tegra234 in > Tegra fuse and apbmisc drivers. It also adds support for Tegra241 > which uses ACPI boot. > > Kartik (8): > mm/util: Introduce kmemdup_array() > soc/tegra: fuse: Use dev_err_probe for probe failures > soc/tegra: fuse: Refactor resource mapping > soc/tegra: fuse: Add tegra_acpi_init_apbmisc() > soc/tegra: fuse: Add function to add lookups > soc/tegra: fuse: Add function to print SKU info > soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234 > soc/tegra: fuse: Add support for Tegra241 > > drivers/soc/tegra/Kconfig | 5 ++ > drivers/soc/tegra/fuse/fuse-tegra.c | 112 ++++++++++++++++++------- > drivers/soc/tegra/fuse/fuse-tegra30.c | 20 +++++ > drivers/soc/tegra/fuse/fuse.h | 5 ++ > drivers/soc/tegra/fuse/tegra-apbmisc.c | 110 ++++++++++++++++++++---- > include/linux/string.h | 1 + > include/soc/tegra/fuse.h | 1 + > mm/util.c | 17 ++++ > 8 files changed, 227 insertions(+), 44 deletions(-) Applied, thanks. Thierry
On Thu, Dec 14, 2023, at 17:08, Thierry Reding wrote: > On Tue, Oct 17, 2023 at 10:53:14AM +0530, Kartik wrote: >> This series of patches add ACPI support for Tegra194 and Tegra234 in >> Tegra fuse and apbmisc drivers. It also adds support for Tegra241 >> which uses ACPI boot. > > Applied, thanks. I'm still a bit puzzled by this series, can you provide some more background? Why does an ACPI based system require access to SoC drivers? Shouldn't this all be abstracted by the BIOS in some form so the device drivers can work standalone rather than calling into this driver? Arnd
On Thu, Dec 14, 2023 at 06:43:47PM +0000, Arnd Bergmann wrote: > On Thu, Dec 14, 2023, at 17:08, Thierry Reding wrote: > > On Tue, Oct 17, 2023 at 10:53:14AM +0530, Kartik wrote: > >> This series of patches add ACPI support for Tegra194 and Tegra234 in > >> Tegra fuse and apbmisc drivers. It also adds support for Tegra241 > >> which uses ACPI boot. > > > > Applied, thanks. > > I'm still a bit puzzled by this series, can you provide some more background? > > Why does an ACPI based system require access to SoC drivers? Shouldn't > this all be abstracted by the BIOS in some form so the device drivers > can work standalone rather than calling into this driver? This driver exposes a couple of things such as SoC family and SKU information that is not otherwise available. It also exposes FUSE data which can be used to calibrate certain devices. Most of the region that contains the fuses is in the keep-out, so perhaps they aren't needed on Tegra241. I suppose things like SoC family and such could be exposed differently. Not sure if ACPI has other ways to expose that. Let's see if Kartik can shed some light on this. Thierry
On Fri, 2023-12-15 at 17:43 +0100, Thierry Reding wrote > On Thu, Dec 14, 2023 at 06:43:47PM +0000, Arnd Bergmann wrote: > > On Thu, Dec 14, 2023, at 17:08, Thierry Reding wrote: > > > On Tue, Oct 17, 2023 at 10:53:14AM +0530, Kartik wrote: > > >> This series of patches add ACPI support for Tegra194 and Tegra234 in > > >> Tegra fuse and apbmisc drivers. It also adds support for Tegra241 > > >> which uses ACPI boot. > > > > > > Applied, thanks. > > > > I'm still a bit puzzled by this series, can you provide some more background? > > > > Why does an ACPI based system require access to SoC drivers? Shouldn't > > this all be abstracted by the BIOS in some form so the device drivers > > can work standalone rather than calling into this driver? > > This driver exposes a couple of things such as SoC family and SKU > information that is not otherwise available. It also exposes FUSE > data which can be used to calibrate certain devices. Most of the > region that contains the fuses is in the keep-out, so perhaps they > aren't needed on Tegra241. > > I suppose things like SoC family and such could be exposed differently. > Not sure if ACPI has other ways to expose that. > > Let's see if Kartik can shed some light on this. > > Thierry Hi Thierry, Arnd, Although the keep-out contains most of the FUSE region. The driver still expose FUSE data with tegra_fuse_readl(), which can be used by drivers to get the required calibration data. Hence the reason to add ACPI support. The keep-out region is only used by nvmem interface, which allows reading the FUSE data from userspace as well as kernel modules. Currently on Tegra241, there are no users needing this information via nvmem interface. Regards, Kartik