Skip to contentSkip to conversation

Blackfin char driver for Blackfin on-chip OTP memory (v3)

PATCH In review Bryan Wu 3 participants 4 messages Mar 27, 2008 Char and misc drivers

lore
Share & tools
lore

Bryan Wu

author
#0 lore raw

PATCH 1/1 Blackfin char driver for Blackfin on-chip OTP memory (v3)

From: Mike Frysinger <[email protected]>

initial char driver for otp memory
(only read supported atm ... needs real examples/docs for write support)

v2-v3:
- fixup __initdata with __initconst, as we are heading for 2.6.26

---
 drivers/char/Kconfig    |   28 +++++++
 drivers/char/Makefile   |    1 +
 drivers/char/bfin-otp.c |  189 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 218 insertions(+), 0 deletions(-)
 create mode 100644 drivers/char/bfin-otp.c
drivers/char/Kconfig +28 -0
index dd17d06..989dade 100644
@@ -495,6 +495,34 @@ config BRIQ_PANEL
 
 	  It's safe to say N here.
 
+config BFIN_OTP
+	tristate "Blackfin On-Chip OTP Memory Support"
+	depends on BLACKFIN && (BF52x || BF54x)
+	default y
+	help
+	  If you say Y here, you will get support for a character device
+	  interface into the One Time Programmable memory pages that are
+	  stored on the Blackfin processor.  This will not get you access
+	  to the secure memory pages however.  You will need to write your
+	  own secure code and reader for that.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called bfin-otp.
+
+	  If unsure, it is safe to say Y.
+
+config BFIN_OTP_WRITE_ENABLE
+	bool "Enable writing support of OTP pages"
+	depends on BFIN_OTP
+	default n
+	help
+	  If you say Y here, you will enable support for writing of the
+	  OTP pages.  This is dangerous by nature as you can only program
+	  the pages once, so only enable this option when you actually
+	  need it so as to not inadvertently clobber data.
+
+	  If unsure, say N.
+
 config PRINTER
 	tristate "Parallel printer support"
 	depends on PARPORT
drivers/char/Makefile +1 -0
index e087ec1..06e6754 100644
@@ -59,6 +59,7 @@ obj-$(CONFIG_VIOTAPE)		+= viotape.o
 obj-$(CONFIG_HVCS)		+= hvcs.o
 obj-$(CONFIG_SGI_MBCS)		+= mbcs.o
 obj-$(CONFIG_BRIQ_PANEL)	+= briq_panel.o
+obj-$(CONFIG_BFIN_OTP)		+= bfin-otp.o
 
 obj-$(CONFIG_PRINTER)		+= lp.o
 obj-$(CONFIG_TIPAR)		+= tipar.o
drivers/char/bfin-otp.c new file +189 -0

189 lines not on this page · raw message

Signature · 1 line
1.5.4.3
Acked-by on v1 1/1
#1 lore raw

Bryan Wu napsal(a):

Quoted 7 lines

From: Mike Frysinger <[email protected]>

initial char driver for otp memory
(only read supported atm ... needs real examples/docs for write support)

v2-v3:
- fixup __initdata with __initconst, as we are heading for 2.6.26

OK, thanks.

Quoted 2 lines

Will somebody pick the patch up (otherwise cc akpm or I might fwd it)?

#2 lore raw
Quoted 8 lines · Jiri Slaby

Bryan Wu napsal(a):

Quoted 3 lines

From: Mike Frysinger <[email protected]>

Will somebody pick the patch up (otherwise cc akpm or I might fwd it)?

not sure what you mean. Bryan posts the patches for review, and then any of the Blackfin-specific ones that dont have a subsystem get into mainline via git pull requests from the Blackfin repo ... -mike

#3 lore raw

Mike Frysinger napsal(a):

Quoted 6 lines · Jiri Slaby
Quoted 1 line

Will somebody pick the patch up (otherwise cc akpm or I might fwd it)?

not sure what you mean. Bryan posts the patches for review, and then any of the Blackfin-specific ones that dont have a subsystem get into mainline via git pull requests from the Blackfin repo ...

Yes, that answers my question, thanks,