All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] v4 Driver for Allwinner sunxi Security ID
@ 2013-06-17 20:59 ` Oliver Schinagl
  0 siblings, 0 replies; 142+ messages in thread
From: Oliver Schinagl @ 2013-06-17 20:59 UTC (permalink / raw)
  To: arnd, gregkh
  Cc: maxime.ripard, linux-kernel, linux-arm-kernel, andy.shevchenko,
	linux, linus.walleij, linux-sunxi, Oliver Schinagl

Note, this is a resent because i messed up the first send.

Changes from v3:
  * Cleanup comments
  * Remove last byte masking and useless casting, the C standard guarntees
    we are ok
  * Removed some complexity from sid_read, thanks to Russel
  * Replace dev_info with dev_dbg reducing the verbosity
  * Removed driver version
  * Reorderd variable declrations based on usage, return value always last
  * Removed all goto in exchange for return, due to popular request
  * Reduced line count by removing extra lines

Changes from v2:
  * Removed the global pointer, we can change that when the need for external
    access arises
  * Fixed header inclusions
  * Corrected if guards. There where some crude mistakes there
  * Changed offset to an unsigned int so we don't have to worry about negatives
  * Cleaned up variable declarations
  * Changed ret value, ENXIO (No device/io) as that better matches a missing dt
  * Made the loading informercial print version so it is somewhat usefull

Changes from v1:
  * Renamed the sys-fs exported key to eeprom, since it really a read-only eeprom
  * Removed mention of sun[67]i since we haven't tested those
  * Fixed up mistakes in comments
  * Removed PAGE_SIZE references, since this is a binary only driver
  * Removed lookup table and calculate offsets better
  * Use proper endianess
  * Add the SID to seed the kernel entropy pool
  * Rewrite probe to use platform_get_resource/devm_ioremap_resource instead

The Allwinner A-series of SoC's have efuses exposed via registers to read the
factory programmed e-fuses. These should in theory be programmable but this is
still to be confirmed. It does appear that these fuses are unique enough to be
used as serial numbers, RSA keys, generate MAC addresses from etc. If it turns
out to be user programmable, the use obviously increases. Allwinner did use the
fuses initially to determine the chip-type.

This driver supports all currently known chips based on datasheets and 'dumped'
drivers that we have so far, the dts is only implemented for known chips.

It has been tested on a Cubieboard 1

This is my very first driver so please try to be gentle 

Oliver Schinagl (2):
  Initial support for Allwinner's Security ID fuses
  Add sunxi-sid to dts for sun4i and sun5i

 arch/arm/boot/dts/sun4i-a10.dtsi |   5 ++
 arch/arm/boot/dts/sun5i-a13.dtsi |   5 ++
 drivers/misc/eeprom/Kconfig      |  17 +++++
 drivers/misc/eeprom/Makefile     |   1 +
 drivers/misc/eeprom/sunxi_sid.c  | 147 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 175 insertions(+)
 create mode 100644 drivers/misc/eeprom/sunxi_sid.c

-- 
1.8.1.5


^ permalink raw reply	[flat|nested] 142+ messages in thread
* [PATCHv5 0/2] Driver for Allwinner sunxi Security ID
@ 2013-08-27 14:13 oliver+list
  2013-08-27 14:13   ` oliver+list at schinagl.nl
  0 siblings, 1 reply; 142+ messages in thread
From: oliver+list @ 2013-08-27 14:13 UTC (permalink / raw)
  To: arnd, gregkh
  Cc: linux-arm-kernel, linux, linus.walleij, linux-kernel,
	andy.shevchenko, maxime.ripard, tomasz.figa, Oliver Schinagl

From: Oliver Schinagl <oliver@schinagl.nl>

After a little vacation I had time to address the last few issues and adapted
per request. After a long talk with Greg we decided that after finding some
issues with binary attribute groups that don't currently work with sysfs yet
this micro-driver falls back to the old manual way for now.

Greg said he would clean up all the drivers after his new sysfs patches land
and to ease the conversion I left a few /* fixme */ markers.

Oliver

Changes from v4:
  * Added sun7i (A20) support, also tested on Cubieboard 2.0 and OlinuXino A20
  * prepare source for move to binary attribute groups
  * Removed useless internal braces
  * Dropped DRV_NAME from dvb_dvb
  * Add and pass struct using platform_[gs]et_drvdata()
  * Add Documentation!
  * Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>

Changes from v3:
  * Cleanup comments
  * Remove last byte masking and useless casting, the C standard guarntees
    we are ok
  * Removed some complexity from sid_read, thanks to Russel
  * Replace dev_info with dev_dbg reducing the verbosity
  * Removed driver version
  * Reorderd variable declrations based on usage, return value always last
  * Removed all goto in exchange for return, due to popular request
  * Reduced line count by removing extra lines

Changes from v2:
  * Removed the global pointer, we can change that when the need for external
    access arises
  * Fixed header inclusions
  * Corrected if guards. There where some crude mistakes there
  * Changed offset to an unsigned int so we don't have to worry about negatives
  * Cleaned up variable declarations
  * Changed ret value, ENXIO (No device/io) as that better matches a missing dt
  * Made the loading informercial print version so it is somewhat usefull

Changes from v1:
  * Rename the sys-fs exported key to eeprom, since it really a read-only eeprom
  * Removed mention of sun[67]i since we haven't tested those
  * Fixed up mistakes in comments
  * Removed PAGE_SIZE references, since this is a binary only driver
  * Removed lookup table and calculate offsets better
  * Use proper endianess
  * Add the SID to seed the kernel entropy pool
  * Rewrite probe to use platform_get_resource/devm_ioremap_resource instead

The Allwinner A-series of SoC's have efuses exposed via registers to read the
factory programmed e-fuses. These should in theory be programmable but this is
still to be confirmed. It does appear that these fuses are unique enough to be
used as serial numbers, RSA keys, generate MAC addresses from etc. If it turns
out to be user programmable, the use obviously increases. Allwinner did use the
fuses initially to determine the chip-type.

This driver supports all currently known chips based on datasheets and 'dumped'
drivers that we have so far, the dts is only implemented for known chips.

It has been tested on a Cubieboard 1

This is my very first driver so please try to be gentle 

Oliver Schinagl (2):
  Initial support for Allwinner's Security ID fuses
  Add sunxi-sid to dts for sun4i, sun5i and sun7i

 Documentation/ABI/stable/sysfs-driver-sunxi-sid    |  22 +++
 .../bindings/misc/allwinner,sunxi-sid.txt          |  16 ++
 arch/arm/boot/dts/sun4i-a10.dtsi                   |   5 +
 arch/arm/boot/dts/sun5i-a13.dtsi                   |   5 +
 arch/arm/boot/dts/sun7i-a20.dtsi                   |   6 +
 drivers/misc/eeprom/Kconfig                        |  19 +++
 drivers/misc/eeprom/Makefile                       |   1 +
 drivers/misc/eeprom/sunxi_sid.c                    | 177 +++++++++++++++++++++
 8 files changed, 251 insertions(+)
 create mode 100644 Documentation/ABI/stable/sysfs-driver-sunxi-sid
 create mode 100644 Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt
 create mode 100644 drivers/misc/eeprom/sunxi_sid.c

-- 
1.8.1.5


^ permalink raw reply	[flat|nested] 142+ messages in thread
* [PATCH 0/2] v3 Driver for Allwinner sunxi Security ID
@ 2013-06-14 23:16 Oliver Schinagl
  2013-06-14 23:16   ` Oliver Schinagl
  0 siblings, 1 reply; 142+ messages in thread
From: Oliver Schinagl @ 2013-06-14 23:16 UTC (permalink / raw)
  To: arnd, gregkh
  Cc: maxime.ripard, linux-kernel, linux-arm-kernel, andy.shevchenko,
	linux, linus.walleij, Oliver Schinagl

From: Oliver Schinagl <oliver@schinagl.nl>

I've tried to incoperate all requests/issues but as always could have possibly
missed some. I've talked to a few people, maxime mostly about the return vs
goto and he said it was up to me, and have choosen to stick with the goto for
the error handling.

Changes from v2:
* Removed the global pointer, we can change that when the need for external
  access arises
* Fixed header inclusions
* Corrected if guards. There where some crude mistakes there
* Changed offset to an unsigned int so we don't have to worry about negatives
* Cleaned up variable declarations
* Changed ret value, ENXIO (No device/io) as that better matches a missing dt
* Made the loading informercial print version so it is somewhat usefull

Changes from v1:
* Renamed the sys-fs exported key to eeprom, since it really a read-only eeprom
* Removed mention of sun[67]i since we haven't tested those
* Fixed up mistakes in comments
* Removed PAGE_SIZE references, since this is a binary only driver
* Removed lookup table and calculate offsets better
* Use proper endianess
* Add the SID to seed the kernel entropy pool
* Rewrite probe to use platform_get_resource/devm_ioremap_resource instead


The Allwinner A-series of SoC's have efuses exposed via registers to read the
factory programmed e-fuses. These should in theory be programmable but this is
still to be confirmed. It does appear that these fuses are unique enough to be
used as serial numbers, RSA keys, generate MAC addresses from etc. If it turns
out to be user programmable, the use obviously increases. Allwinner did use the
fuses initially to determine the chip-type.

This driver supports all currently known chips based on datasheets and 'dumped'
drivers that we have so far, the dts is only implemented for known chips.

It has been tested on a Cubieboard 1

This is my very first driver so please try to be gentle 

Oliver Schinagl (2):
  Initial support for Allwinner's Security ID fuses
  Add sunxi-sid to dts for sun4i and sun5i

 arch/arm/boot/dts/sun4i-a10.dtsi |   5 ++
 arch/arm/boot/dts/sun5i-a13.dtsi |   5 ++
 drivers/misc/eeprom/Kconfig      |  17 ++++
 drivers/misc/eeprom/Makefile     |   1 +
 drivers/misc/eeprom/sunxi_sid.c  | 167 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 195 insertions(+)
 create mode 100644 drivers/misc/eeprom/sunxi_sid.c

-- 
1.8.1.5


^ permalink raw reply	[flat|nested] 142+ messages in thread
* [PATCH 0/2] v2 Driver for Allwinner sunxi Security ID
@ 2013-06-02 14:58 Oliver Schinagl
  2013-06-02 14:58   ` Oliver Schinagl
  0 siblings, 1 reply; 142+ messages in thread
From: Oliver Schinagl @ 2013-06-02 14:58 UTC (permalink / raw)
  To: maxime.ripard, arnd, gregkh
  Cc: linux-kernel, linux-arm-kernel, Oliver Schinagl

From: Oliver Schinagl <oliver@schinagl.nl>

Changes from v1:
* Renamed the sys-fs exported key to eeprom, since it really a read-only eeprom
* Removed mention of sun[67]i since we haven't tested those
* Fixed up mistakes in comments
* Removed PAGE_SIZE references, since this is a binary only driver
* Removed lookup table and calculate offsets better
* Use proper endianess
* Add the SID to seed the kernel entropy pool
* Rewrite probe to use platform_get_resource/devm_ioremap_resource instead


The Allwinner A-series of SoC's have efuses exposed via registers to read the
factory programmed e-fuses. These should in theory be programmable but this is
still to be confirmed. It does appear that these fuses are unique enough to be
used as serial numbers, RSA keys, generate MAC addresses from etc. If it turns
out to be user programmable, the use obviously increases. Allwinner did use the
fuses initially to determine the chip-type.

This driver supports all currently known chips based on datasheets and 'dumped'
drivers that we have so far, the dts is only implemented for known chips.

It has been tested on a Cubieboard 1

This is my very first driver so please try to be gentle 

Oliver Schinagl (2):
  Initial support for Allwinner's Security ID fuses
  Add sunxi-sid to dts for sun4i and sun5i

 arch/arm/boot/dts/sun4i-a10.dtsi |   5 ++
 arch/arm/boot/dts/sun5i-a13.dtsi |   5 ++
 drivers/misc/eeprom/Kconfig      |  17 ++++
 drivers/misc/eeprom/Makefile     |   1 +
 drivers/misc/eeprom/sunxi_sid.c  | 172 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 200 insertions(+)
 create mode 100644 drivers/misc/eeprom/sunxi_sid.c

-- 
1.8.1.5


^ permalink raw reply	[flat|nested] 142+ messages in thread
* [PATCH 0/2] Driver for Allwinner sunxi Security ID
@ 2013-05-17 13:35 Oliver Schinagl
  2013-05-17 13:35   ` Oliver Schinagl
  0 siblings, 1 reply; 142+ messages in thread
From: Oliver Schinagl @ 2013-05-17 13:35 UTC (permalink / raw)
  To: maxime.ripard, arnd, gregkh
  Cc: linux-kernel, linux-arm-kernel, Oliver Schinagl

The Allwinner A-series of SoC's have efuses exposed via registers to read the
factory programmed e-fuses. These should in theory be programmable but this is
still to be confirmed. It does appear that these fuses are unique enough to be
used as serial numbers, RSA keys, generate MAC addresses from etc. If it turns
out to be user programmable, the use obviously increases. Allwinner did use the
fuses initially to determine the chip-type.

This driver supports all currently known chips based on datasheets and 'dumped'
drivers that we have so far, the dts is only implemented for known chips.

This is my very first driver so please try to be gentle ;)

Oliver Schinagl (2):
  Initial support for Allwinner's Security ID fuses
  Add sunxi-sid to dts for sun4i and sun5i

 arch/arm/boot/dts/sun4i-a10.dtsi |   5 +
 arch/arm/boot/dts/sun5i-a13.dtsi |   5 +
 drivers/misc/eeprom/Kconfig      |  19 ++++
 drivers/misc/eeprom/Makefile     |   1 +
 drivers/misc/eeprom/sunxi_sid.c  | 218 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 248 insertions(+)
 create mode 100644 drivers/misc/eeprom/sunxi_sid.c

-- 
1.8.1.5


^ permalink raw reply	[flat|nested] 142+ messages in thread

end of thread, other threads:[~2013-08-27 15:42 UTC | newest]

Thread overview: 142+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-17 20:59 [PATCH 0/2] v4 Driver for Allwinner sunxi Security ID Oliver Schinagl
2013-06-17 20:59 ` Oliver Schinagl
2013-06-17 20:59 ` [PATCH 1/2] Initial support for Allwinner's Security ID fuses Oliver Schinagl
2013-06-17 20:59   ` Oliver Schinagl
2013-06-17 21:06   ` Tomasz Figa
2013-06-17 21:06     ` Tomasz Figa
2013-06-17 22:58   ` Greg KH
2013-06-17 22:58     ` Greg KH
2013-06-17 23:23     ` [linux-sunxi] " Henrik Nordström
2013-06-17 23:23       ` Henrik Nordström
2013-06-24  9:29     ` Maxime Ripard
2013-06-24  9:29       ` Maxime Ripard
2013-06-24 16:04       ` Greg KH
2013-06-24 16:04         ` Greg KH
2013-06-24 17:11         ` Oliver Schinagl
2013-06-24 17:11           ` Oliver Schinagl
2013-06-24 18:15           ` Greg KH
2013-06-24 18:15             ` Greg KH
2013-06-24 21:21             ` Oliver Schinagl
2013-06-24 21:21               ` Oliver Schinagl
2013-06-24 21:46               ` Greg KH
2013-06-24 21:46                 ` Greg KH
2013-06-26  8:32                 ` Oliver Schinagl
2013-06-26  8:32                   ` Oliver Schinagl
2013-06-26 17:51                   ` Greg KH
2013-06-26 17:51                     ` Greg KH
2013-07-05  7:24                     ` Oliver Schinagl
2013-07-05  7:24                       ` Oliver Schinagl
2013-07-06 19:36                       ` Greg KH
2013-07-06 19:36                         ` Greg KH
2013-07-07  0:17                         ` Greg KH
2013-07-07  0:17                           ` Greg KH
2013-07-15 21:16                         ` [linux-sunxi] " Oliver Schinagl
2013-07-15 21:16                           ` Oliver Schinagl
2013-07-16  6:41                           ` Greg KH
2013-07-16  6:41                             ` Greg KH
2013-07-16 21:02                             ` Oliver Schinagl
2013-07-16 21:02                               ` Oliver Schinagl
2013-07-17  4:20                               ` Greg KH
2013-07-17  4:20                                 ` Greg KH
2013-07-17 11:46                             ` Maxime Ripard
2013-07-17 11:46                               ` Maxime Ripard
2013-07-17 16:17                               ` Greg KH
2013-07-17 16:17                                 ` Greg KH
2013-07-19  9:42                                 ` Maxime Ripard
2013-07-19  9:42                                   ` Maxime Ripard
2013-07-19 23:49                                   ` Greg KH
2013-07-19 23:49                                     ` Greg KH
2013-07-30 13:22                                     ` Oliver Schinagl
2013-07-30 13:22                                       ` Oliver Schinagl
2013-07-30 14:20                                       ` Greg KH
2013-07-30 14:20                                         ` Greg KH
2013-07-30 17:39                                         ` Oliver Schinagl
2013-07-30 17:39                                           ` Oliver Schinagl
2013-06-26  9:10                 ` Russell King - ARM Linux
2013-06-26  9:10                   ` Russell King - ARM Linux
2013-06-26 17:51                   ` Greg KH
2013-06-26 17:51                     ` Greg KH
2013-06-24 21:04         ` Maxime Ripard
2013-06-24 21:04           ` Maxime Ripard
2013-06-26  9:22         ` Geert Uytterhoeven
2013-06-26  9:22           ` Geert Uytterhoeven
2013-06-26  9:22           ` Geert Uytterhoeven
2013-06-26 17:49           ` Greg KH
2013-06-26 17:49             ` Greg KH
2013-06-26 17:49             ` Greg KH
2013-06-18  5:41   ` Andy Shevchenko
2013-06-18  5:41     ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2013-08-27 14:13 [PATCHv5 0/2] Driver for Allwinner sunxi Security ID oliver+list
2013-08-27 14:13 ` [PATCH 1/2] Initial support for Allwinner's Security ID fuses oliver+list
2013-08-27 14:13   ` oliver+list at schinagl.nl
2013-08-27 15:42   ` Maxime Ripard
2013-08-27 15:42     ` Maxime Ripard
2013-06-14 23:16 [PATCH 0/2] v3 Driver for Allwinner sunxi Security ID Oliver Schinagl
2013-06-14 23:16 ` [PATCH 1/2] Initial support for Allwinner's Security ID fuses Oliver Schinagl
2013-06-14 23:16   ` Oliver Schinagl
2013-06-15  2:14   ` Andy Shevchenko
2013-06-15  2:14     ` Andy Shevchenko
2013-06-15  9:34     ` Oliver Schinagl
2013-06-15  9:34       ` Oliver Schinagl
2013-06-15 10:28   ` Tomasz Figa
2013-06-15 10:28     ` Tomasz Figa
2013-06-17 10:36     ` Oliver Schinagl
2013-06-17 10:36       ` Oliver Schinagl
2013-06-17 11:25       ` Russell King - ARM Linux
2013-06-17 11:25         ` Russell King - ARM Linux
2013-06-17 11:32         ` Oliver Schinagl
2013-06-17 11:32           ` Oliver Schinagl
2013-06-17 11:51       ` Maxime Ripard
2013-06-17 11:51         ` Maxime Ripard
2013-06-17 12:04         ` Oliver Schinagl
2013-06-17 12:04           ` Oliver Schinagl
2013-06-17 12:51       ` Tomasz Figa
2013-06-17 12:51         ` Tomasz Figa
2013-06-17 13:10         ` Oliver Schinagl
2013-06-17 13:10           ` Oliver Schinagl
2013-06-17 13:23           ` Tomasz Figa
2013-06-17 13:23             ` Tomasz Figa
2013-06-17 13:47             ` Oliver Schinagl
2013-06-17 13:47               ` Oliver Schinagl
2013-06-02 14:58 [PATCH 0/2] v2 Driver for Allwinner sunxi Security ID Oliver Schinagl
2013-06-02 14:58 ` [PATCH 1/2] Initial support for Allwinner's Security ID fuses Oliver Schinagl
2013-06-02 14:58   ` Oliver Schinagl
2013-06-02 15:09   ` Russell King - ARM Linux
2013-06-02 15:09     ` Russell King - ARM Linux
2013-06-02 15:21     ` Oliver Schinagl
2013-06-02 15:21       ` Oliver Schinagl
2013-06-06 19:16   ` Andy Shevchenko
2013-06-06 19:16     ` Andy Shevchenko
2013-06-10 21:43     ` Oliver Schinagl
2013-06-10 21:43       ` Oliver Schinagl
2013-06-11 10:51       ` Andy Shevchenko
2013-06-11 10:51         ` Andy Shevchenko
2013-05-17 13:35 [PATCH 0/2] Driver for Allwinner sunxi Security ID Oliver Schinagl
2013-05-17 13:35 ` [PATCH 1/2] Initial support for Allwinner's Security ID fuses Oliver Schinagl
2013-05-17 13:35   ` Oliver Schinagl
2013-05-17 13:45   ` Arnd Bergmann
2013-05-17 13:45     ` Arnd Bergmann
2013-05-17 18:54     ` Oliver Schinagl
2013-05-17 18:54       ` Oliver Schinagl
2013-05-17 21:18   ` Maxime Ripard
2013-05-17 21:18     ` Maxime Ripard
2013-05-18 17:19     ` Oliver Schinagl
2013-05-18 17:19       ` Oliver Schinagl
2013-05-19 15:22       ` Maxime Ripard
2013-05-19 15:22         ` Maxime Ripard
2013-05-24 21:50       ` Oliver Schinagl
2013-05-24 21:50         ` Oliver Schinagl
2013-05-25 12:22         ` Maxime Ripard
2013-05-25 12:22           ` Maxime Ripard
2013-05-25 19:25           ` Oliver Schinagl
2013-05-25 19:25             ` Oliver Schinagl
2013-05-26  9:35             ` Maxime Ripard
2013-05-26  9:35               ` Maxime Ripard
2013-05-23  7:56   ` Linus Walleij
2013-05-23  7:56     ` Linus Walleij
2013-05-23  8:10     ` Oliver Schinagl
2013-05-23  8:10       ` Oliver Schinagl
2013-05-23  8:20       ` Linus Walleij
2013-05-23  8:20         ` Linus Walleij
2013-05-23 14:58       ` Maxime Ripard
2013-05-23 14:58         ` Maxime Ripard
2013-05-23 15:05         ` Oliver Schinagl
2013-05-23 15:05           ` Oliver Schinagl
2013-05-23 15:27           ` Maxime Ripard
2013-05-23 15:27             ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.