summaryrefslogtreecommitdiff
path: root/Silicon/Atmel/AtSha204a/AtSha204aDxe.inf
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-19 08:38:23 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-22 16:34:03 +0000
commit487015fb23c1a40f0d05240cadde4faf979483ee (patch)
tree763a9d420d39c543b42d212bfe9625b30858d142 /Silicon/Atmel/AtSha204a/AtSha204aDxe.inf
parent33d1b85bae277a8a78f2ab15ab6a0d9f0c9e5d79 (diff)
downloadedk2-platforms-487015fb23c1a40f0d05240cadde4faf979483ee.tar.xz
Silicon/Atmel: add support for AtSha204a RNG
This adds support for using the random number generator in the Atmel AtSha204a over I2C. Other functionality of the chip is currently unsupported. Note that the the I2C support in this device essentially violates the protocol layering, by requiring that the device is woken up by driving SDA low for a certain amount of time, which is something that cannot be expressed in terms of an I2C packet sent to the device's slave address. Instead, the slave address 0x0 is added to the device's address array, and the wake is sent by sending a dummy write to address 0x0, and ignoring the subsequent error. This requires the I2C bus to be clocked at 100 kHz. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Silicon/Atmel/AtSha204a/AtSha204aDxe.inf')
-rw-r--r--Silicon/Atmel/AtSha204a/AtSha204aDxe.inf52
1 files changed, 52 insertions, 0 deletions
diff --git a/Silicon/Atmel/AtSha204a/AtSha204aDxe.inf b/Silicon/Atmel/AtSha204a/AtSha204aDxe.inf
new file mode 100644
index 0000000000..fe90cc5381
--- /dev/null
+++ b/Silicon/Atmel/AtSha204a/AtSha204aDxe.inf
@@ -0,0 +1,52 @@
+## @file
+# Device driver for the Atmel ATSHA204A random number generator.
+#
+# Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD
+# License which accompanies this distribution. The full text of the license may
+# be found at http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+ INF_VERSION = 0x0001001A
+ BASE_NAME = AtSha204aDxe
+ FILE_GUID = 8b8f683b-f376-4ba0-b8d7-b4bbd30319cc
+ MODULE_TYPE = UEFI_DRIVER
+ VERSION_STRING = 1.0
+ ENTRY_POINT = EntryPoint
+ UNLOAD_IMAGE = UnloadImage
+
+#
+# VALID_ARCHITECTURES = AARCH64 ARM EBC IA32 IPF X64
+#
+
+[Sources]
+ AtSha204aDriver.c
+ AtSha204aDriver.h
+ ComponentName.c
+ DriverBinding.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ Silicon/Atmel/AtSha204a/AtSha204a.dec
+
+[LibraryClasses]
+ BaseMemoryLib
+ DebugLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
+
+[Protocols]
+ gEfiRngProtocolGuid # PROTOCOL BY_START
+ gEfiI2cIoProtocolGuid # PROTOCOL TO_START
+
+[Guids]
+ gAtSha204aI2cDeviceGuid
+ gEfiRngAlgorithmRaw