mbox series

[v3,0/4] nvmem: qfprom: Avoid untouchable regions

Message ID 20201029002827.1729915-1-evgreen@chromium.org
Headers show
Series nvmem: qfprom: Avoid untouchable regions | expand

Message

Evan Green Oct. 29, 2020, 12:28 a.m. UTC
Certain fuses are protected by the XPU such that the AP cannot
access them. Attempting to do so causes an SError. Introduce an
SoC-specific compatible string, and introduce support into the
nvmem core to avoid accessing specified regions. Then use those
new elements in the qfprom driver to avoid SErrors when usermode
accesses certain registers.

Changes in v3:
 - Fixed example (Doug and rob-bot)
 - Use min()/max() macros instead of defining my own (Doug)
 - Comment changes to indicate sorting (Doug)
 - Add function to validate keepouts are proper (Doug)

Changes in v2:
 - Add other soc compatible strings (Doug)
 - Fix compatible string definition (Doug)
 - Introduced keepout regions into the core (Srini)
 - Use new core support in qfprom (Srini)

Evan Green (4):
  dt-bindings: nvmem: Add soc qfprom compatible strings
  arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string
  nvmem: core: Add support for keepout regions
  nvmem: qfprom: Don't touch certain fuses

 .../bindings/nvmem/qcom,qfprom.yaml           |  17 +-
 arch/arm64/boot/dts/qcom/sc7180.dtsi          |   2 +-
 drivers/nvmem/core.c                          | 153 +++++++++++++++++-
 drivers/nvmem/qfprom.c                        |  30 ++++
 include/linux/nvmem-provider.h                |  17 ++
 5 files changed, 211 insertions(+), 8 deletions(-)

Comments

Rob Herring (Arm) Nov. 2, 2020, 3:32 p.m. UTC | #1
On Wed, 28 Oct 2020 17:28:24 -0700, Evan Green wrote:
> Add SoC-specific compatible strings so that data can be attached
> to it in the driver.
> 
> Signed-off-by: Evan Green <evgreen@chromium.org>
> ---
> 
> Changes in v3:
>  - Fixed example (Doug and rob-bot)
> 
> Changes in v2:
>  - Add other soc compatible strings (Doug)
>  - Fix compatible string definition (Doug)
> 
>  .../devicetree/bindings/nvmem/qcom,qfprom.yaml  | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Srinivas Kandagatla Nov. 2, 2020, 3:58 p.m. UTC | #2
On 29/10/2020 00:28, Evan Green wrote:
> Certain fuses are protected by the XPU such that the AP cannot
> access them. Attempting to do so causes an SError. Introduce an
> SoC-specific compatible string, and introduce support into the
> nvmem core to avoid accessing specified regions. Then use those
> new elements in the qfprom driver to avoid SErrors when usermode
> accesses certain registers.
> 
> Changes in v3:
>   - Fixed example (Doug and rob-bot)
>   - Use min()/max() macros instead of defining my own (Doug)
>   - Comment changes to indicate sorting (Doug)
>   - Add function to validate keepouts are proper (Doug)
> 
> Changes in v2:
>   - Add other soc compatible strings (Doug)
>   - Fix compatible string definition (Doug)
>   - Introduced keepout regions into the core (Srini)
>   - Use new core support in qfprom (Srini)
> 
> Evan Green (4):
>    dt-bindings: nvmem: Add soc qfprom compatible strings
>    arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string
>    nvmem: core: Add support for keepout regions
>    nvmem: qfprom: Don't touch certain fuses

Except dts patch, I have applied all the patches, dts patch should go 
via arm-soc tree!


--srini

> 
>   .../bindings/nvmem/qcom,qfprom.yaml           |  17 +-
>   arch/arm64/boot/dts/qcom/sc7180.dtsi          |   2 +-
>   drivers/nvmem/core.c                          | 153 +++++++++++++++++-
>   drivers/nvmem/qfprom.c                        |  30 ++++
>   include/linux/nvmem-provider.h                |  17 ++
>   5 files changed, 211 insertions(+), 8 deletions(-)
>