diff mbox series

[2/2] arch: arm64: xilinx: Make zynqmp_firmware driver optional

Message ID 1578596764-29351-3-git-send-email-jolly.shah@xilinx.com (mailing list archive)
State Mainlined
Commit 4b9cbf5084e2ed72181a544b48bdcea91463061b
Headers show
Series arch: arm64: xilinx: Make zynqmp_firmware driver optional | expand

Commit Message

Jolly Shah Jan. 9, 2020, 7:06 p.m. UTC
From: Tejas Patel <tejas.patel@xilinx.com>

Zynqmp firmware driver requires firmware to be present in system.
Zynqmp firmware driver will crash if firmware is not present in system.
For example single arch QEMU, may not have firmware, with such setup
Linux booting fails.

So make zynqmp_firmware driver as optional to disable it if user don't
have firmware in system.

Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
---
 arch/arm64/Kconfig.platforms    | 1 -
 drivers/firmware/xilinx/Kconfig | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Michal Simek Feb. 24, 2020, 10:43 a.m. UTC | #1
On 09. 01. 20 20:06, Jolly Shah wrote:
> From: Tejas Patel <tejas.patel@xilinx.com>
> 
> Zynqmp firmware driver requires firmware to be present in system.
> Zynqmp firmware driver will crash if firmware is not present in system.
> For example single arch QEMU, may not have firmware, with such setup
> Linux booting fails.


I think that moving it to firmware Kconfig is good solution. What it is
wrong is that description above where I agree with Sudeep.
It means.
1. User should have option to disable zynqmp firmware driver which is
what this patch allows. It means if someone decides to use different
firmware mechanism it can do it directly by simply y/n option.

2. Autodetection of PMUFW presence is another feature which could be
implemented to have this driver enabled but different mechanism can be
used.

3. Doing this because of missing feature in QEMU is IMHO wrong. QEMU
should be fixed and then you don't have any issue if this should be used
or not.

Just a summary. Remove that QEMU example from commit message and talk to
Edgar to fix single QEMU solution to have that regs mapped all the time.

Thanks,
Michal
Jolly Shah Feb. 26, 2020, 12:12 a.m. UTC | #2
Hi Michal,

 > ------Original Message------
 > From: Michal Simek <michal.simek@xilinx.com>
 > Sent:  Monday, February 24, 2020 2:43AM
 > To: Jolly Shah <jolly.shah@xilinx.com>, Ard.biesheuvel@linaro.org 
<ard.biesheuvel@linaro.org>, Mingo@kernel.org <mingo@kernel.org>, 'Greg 
Kh' <gregkh@linuxfoundation.org>, Matt@codeblueprint.co.uk 
<matt@codeblueprint.co.uk>, Sudeep.holla@arm.com <sudeep.holla@arm.com>, 
Hkallweit1@gmail.com <hkallweit1@gmail.com>, Keescook@chromium.org 
<keescook@chromium.org>, Dmitry.torokhov@gmail.com 
<dmitry.torokhov@gmail.com>, Michal Simek <michal.simek@xilinx.com>
 > Cc: Rajan Vaja <rajanv@xilinx.com>, 
Linux-arm-kernel@lists.infradead.org 
<linux-arm-kernel@lists.infradead.org>, Linux-kernel@vger.kernel.org 
<linux-kernel@vger.kernel.org>, Tejas Patel <tejas.patel@xilinx.com>
 > Subject: Re: [PATCH 2/2] arch: arm64: xilinx: Make zynqmp_firmware 
driver optional
 >
> On 09. 01. 20 20:06, Jolly Shah wrote:
>> From: Tejas Patel <tejas.patel@xilinx.com>
>>
>> Zynqmp firmware driver requires firmware to be present in system.
>> Zynqmp firmware driver will crash if firmware is not present in system.
>> For example single arch QEMU, may not have firmware, with such setup
>> Linux booting fails.
> 
> 
> I think that moving it to firmware Kconfig is good solution. What it is
> wrong is that description above where I agree with Sudeep.
> It means.
> 1. User should have option to disable zynqmp firmware driver which is
> what this patch allows. It means if someone decides to use different
> firmware mechanism it can do it directly by simply y/n option.
> 
> 2. Autodetection of PMUFW presence is another feature which could be
> implemented to have this driver enabled but different mechanism can be
> used.
> 
> 3. Doing this because of missing feature in QEMU is IMHO wrong. QEMU
> should be fixed and then you don't have any issue if this should be used
> or not.
> 
> Just a summary. Remove that QEMU example from commit message and talk to
> Edgar to fix single QEMU solution to have that regs mapped all the time.

Pushed another patch as suggested. Will sync up with Edgar.

Thanks,
Jolly Shah

> 
> Thanks,
> Michal
>
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index b2b504e..563c93d 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -301,7 +301,6 @@  config ARCH_ZX
 
 config ARCH_ZYNQMP
 	bool "Xilinx ZynqMP Family"
-	select ZYNQMP_FIRMWARE
 	help
 	  This enables support for Xilinx ZynqMP Family
 
diff --git a/drivers/firmware/xilinx/Kconfig b/drivers/firmware/xilinx/Kconfig
index bd33bbf..9a9bd19 100644
--- a/drivers/firmware/xilinx/Kconfig
+++ b/drivers/firmware/xilinx/Kconfig
@@ -6,6 +6,8 @@  menu "Zynq MPSoC Firmware Drivers"
 
 config ZYNQMP_FIRMWARE
 	bool "Enable Xilinx Zynq MPSoC firmware interface"
+	depends on ARCH_ZYNQMP
+	default y if ARCH_ZYNQMP
 	select MFD_CORE
 	help
 	  Firmware interface driver is used by different