Skip to contentSkip to conversation

Initial support for IMG Generic eFuse Controller

PATCH RESEND New [email protected] 1 participant 3 messages Nov 22, 2014 1 message not in the archive Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover Initial support for IMG Generic eFuse Controller

From: Arul Ramasamy <[email protected]>

The Pistachio SoC from Imagination Technologies includes a generic eFuse controller which exposes 128 EFUSE bits to the Kernel drivers and the user applications. EFUSE bits are non-reversible fusible links that are blown in specific ways to enable / disable certain features on the Pistachio SoC.

This is based on v3.18-rc4.

I am re-sending the series with gmail SMTP as we had some problems with the mail server we used in the previous rounds.

Please review and provide your comments.

Changes from v1:

* Created drivers/soc/img/ instead of drivers/soc/pistachio/.

* Changed name of the external oscillator clock reference.

* Changed of_device_id compatible name.

* Removed MAX_EFUSE_BYTE_OFFSET macro.

* Added range check against efuse_dev->size inside 'img_efuse_readl' function.

* Added 'efuse_dev' valid check inside 'img_efuse_readl' function before invoking 'readl'.

* Removed 'THIS_MODULE' set.

* Moved 'img_efuse' structure definition to driver source file from header file.

* Added include guard in header file.

Arul Ramasamy (2):
efuse: Imagination Technologies Generic eFuse Controller
DT: eFuse: Add binding document for IMG Generic eFuse Controller

 .../devicetree/bindings/soc/img/img-efuse.txt      |  18 ++
 drivers/soc/Kconfig                                |   1 +
 drivers/soc/Makefile                               |   1 +
 drivers/soc/img/Makefile                           |   1 +
 drivers/soc/img/fuse/Kconfig                       |   9 +
 drivers/soc/img/fuse/Makefile                      |   1 +
 drivers/soc/img/fuse/img-efuse.c                   | 192 +++++++++++++++++++++
 include/soc/img/img-efuse.h                        |  15 ++
 8 files changed, 238 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/img/img-efuse.txt
 create mode 100644 drivers/soc/img/Makefile
 create mode 100644 drivers/soc/img/fuse/Kconfig
 create mode 100644 drivers/soc/img/fuse/Makefile
 create mode 100644 drivers/soc/img/fuse/img-efuse.c
 create mode 100644 include/soc/img/img-efuse.h
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1416624873-7823-1-git-send-email-Naidu.Tellapati-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH RESEND v2 1/2 efuse: Imagination Technologies Generic eFuse Controller

From: Arul Ramasamy <[email protected]>

The Pistachio SoC from Imagination Technologies includes a generic eFuse Controller which exposes the status of 128 EFUSE bits to the external world.

---
 drivers/soc/Kconfig              |   1 +
 drivers/soc/Makefile             |   1 +
 drivers/soc/img/Makefile         |   1 +
 drivers/soc/img/fuse/Kconfig     |   9 ++
 drivers/soc/img/fuse/Makefile    |   1 +
 drivers/soc/img/fuse/img-efuse.c | 192 +++++++++++++++++++++++++++++++++++++++
 include/soc/img/img-efuse.h      |  15 +++
 7 files changed, 220 insertions(+)
 create mode 100644 drivers/soc/img/Makefile
 create mode 100644 drivers/soc/img/fuse/Kconfig
 create mode 100644 drivers/soc/img/fuse/Makefile
 create mode 100644 drivers/soc/img/fuse/img-efuse.c
 create mode 100644 include/soc/img/img-efuse.h
drivers/soc/Kconfig +1 -0
index 76d6bd4..b699082 100644
@@ -1,5 +1,6 @@
 menu "SOC (System On Chip) specific Drivers"
 
+source "drivers/soc/img/fuse/Kconfig"
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/ti/Kconfig"
 source "drivers/soc/versatile/Kconfig"
drivers/soc/Makefile +1 -0
index 063113d..eed9585 100644
@@ -2,6 +2,7 @@
 # Makefile for the Linux Kernel SOC specific device drivers.
 #
 
+obj-$(CONFIG_SOC_IMG)		+= img/
 obj-$(CONFIG_ARCH_QCOM)		+= qcom/
 obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-$(CONFIG_SOC_TI)		+= ti/
drivers/soc/img/Makefile new file +1 -0
new file mode 100644
index 0000000..f33a89f
@@ -0,0 +1 @@
+obj-$(CONFIG_SOC_IMG)	+= fuse/
drivers/soc/img/fuse/Kconfig new file +9 -0
new file mode 100644
index 0000000..7810ea3
@@ -0,0 +1,9 @@
+config IMG_EFUSE
+	tristate "Imagination Technologies Generic eFuse driver"
+	depends on HAS_IOMEM
+	help
+	  Imagination Technologies Generic eFuse driver which exposes the status
+	  of 128 EFUSE bits.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called img-efuse.
drivers/soc/img/fuse/Makefile new file +1 -0
new file mode 100644
index 0000000..e873dc0
@@ -0,0 +1 @@
+obj-$(CONFIG_IMG_EFUSE)	+= img-efuse.o
drivers/soc/img/fuse/img-efuse.c new file +192 -0

192 lines not on this page · raw message

include/soc/img/img-efuse.h new file +15 -0
new file mode 100644
index 0000000..64bf4ad
@@ -0,0 +1,15 @@
+/*
+ * Imagination Technologies Generic eFuse driver
+ *
+ * Copyright (C) 2014 Imagination Technologies Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __IMG_EFUSE_H
+#define __IMG_EFUSE_H
+
+int img_efuse_readl(unsigned int offset, u32 *value);
+
+#endif
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH RESEND v2 2/2 DT: eFuse: Add binding document for IMG Generic eFuse Controller

In reply to a message not in the archive

From: Arul Ramasamy <[email protected]>

Add binding document for Imagination Technologies Generic eFuse Controller present on Pistachio SoC.

---
 .../devicetree/bindings/soc/img/img-efuse.txt          | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/img/img-efuse.txt
Documentation/devicetree/bindings/soc/img/img-efuse.txt new file +18 -0
new file mode 100644
index 0000000..e87738f
@@ -0,0 +1,18 @@
+* Imagination Technologies Generic eFuse controller
+
+Required properties:
+- compatible: Must be "img,efuse".
+- reg: Must contain the base address and length of the eFuse registers.
+- clocks: Must contain an entry for each entry in clock-names.
+  See ../clock/clock-bindings.txt for details.
+- clock-names: Must include the following entries:
+  - osc: External oscillator clock
+  - sys: eFuse system interface clock
+
+Example:
+efuse: efuse@18149200 {
+       compatible = "img,efuse";
+       reg = <0x18149200 0x200>;
+       clocks = <&osc>, <&system_clk>;
+       clock-names = "osc", "sys";
+};
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html