random: Rename ksdk to mcux

Renames the ksdk random generator shim driver to mcux.

Change-Id: I8bc376937fed3024c809782139a0a72c7332f89a
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2017-01-02 14:24:58 -06:00 committed by Kumar Gala
commit aa995f8d2f
6 changed files with 19 additions and 19 deletions

View file

@ -72,7 +72,7 @@ endif # NET_L2_ETHERNET
if RANDOM_GENERATOR if RANDOM_GENERATOR
config RANDOM_KSDK config RANDOM_MCUX
def_bool y def_bool y
endif # RANDOM_GENERATOR endif # RANDOM_GENERATOR

View file

@ -25,7 +25,7 @@ menuconfig RANDOM_GENERATOR
if RANDOM_GENERATOR if RANDOM_GENERATOR
source "drivers/random/Kconfig.ksdk" source "drivers/random/Kconfig.mcux"
config RANDOM_HAS_DRIVER config RANDOM_HAS_DRIVER
bool bool

View file

@ -1,4 +1,4 @@
# Kconfig.ksdk - ksdk random generator driver configuration # Kconfig.mcux - mcux random generator driver configuration
# #
# Copyright (c) 2016 ARM Ltd. # Copyright (c) 2016 ARM Ltd.
# #
@ -14,11 +14,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
menuconfig RANDOM_KSDK menuconfig RANDOM_MCUX
bool "KSDK Random driver" bool "MCUX Random driver"
depends on RANDOM_GENERATOR && HAS_RNGA depends on RANDOM_GENERATOR && HAS_RNGA
default n default n
select RANDOM_HAS_DRIVER select RANDOM_HAS_DRIVER
help help
This option enables the random number generator accelerator (RNGA) This option enables the random number generator accelerator (RNGA)
driver based on the KSDK RNGA driver. driver based on the MCUX RNGA driver.

View file

@ -1,3 +1,3 @@
obj-$(CONFIG_RANDOM_KSDK) += random_ksdk.o obj-$(CONFIG_RANDOM_MCUX) += random_mcux.o
obj-$(CONFIG_TIMER_RANDOM_GENERATOR) = rand32_timer.o obj-$(CONFIG_TIMER_RANDOM_GENERATOR) = rand32_timer.o
obj-$(CONFIG_X86_TSC_RANDOM_GENERATOR) += rand32_timestamp.o obj-$(CONFIG_X86_TSC_RANDOM_GENERATOR) += rand32_timestamp.o

View file

@ -22,7 +22,7 @@
#include "fsl_rnga.h" #include "fsl_rnga.h"
static uint8_t random_ksdk_get_uint8(void) static uint8_t random_mcux_get_uint8(void)
{ {
uint32_t random; uint32_t random;
uint8_t output = 0; uint8_t output = 0;
@ -47,7 +47,7 @@ static uint8_t random_ksdk_get_uint8(void)
return output; return output;
} }
static int random_ksdk_get_entropy(struct device *dev, uint8_t *buffer, static int random_mcux_get_entropy(struct device *dev, uint8_t *buffer,
uint16_t length) uint16_t length)
{ {
int i; int i;
@ -55,24 +55,24 @@ static int random_ksdk_get_entropy(struct device *dev, uint8_t *buffer,
ARG_UNUSED(dev); ARG_UNUSED(dev);
for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
buffer[i] = random_ksdk_get_uint8(); buffer[i] = random_mcux_get_uint8();
} }
return 0; return 0;
} }
static const struct random_driver_api random_ksdk_api_funcs = { static const struct random_driver_api random_mcux_api_funcs = {
.get_entropy = random_ksdk_get_entropy .get_entropy = random_mcux_get_entropy
}; };
static int random_ksdk_init(struct device *); static int random_mcux_init(struct device *);
DEVICE_AND_API_INIT(random_ksdk, CONFIG_RANDOM_NAME, DEVICE_AND_API_INIT(random_mcux, CONFIG_RANDOM_NAME,
random_ksdk_init, NULL, NULL, random_mcux_init, NULL, NULL,
PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&random_ksdk_api_funcs); &random_mcux_api_funcs);
static int random_ksdk_init(struct device *dev) static int random_mcux_init(struct device *dev)
{ {
uint32_t seed = sys_cycle_get_32(); uint32_t seed = sys_cycle_get_32();
@ -96,7 +96,7 @@ uint32_t sys_rand32_get(void)
uint32_t output; uint32_t output;
int r; int r;
r = random_ksdk_get_entropy(DEVICE_GET(random_ksdk), r = random_mcux_get_entropy(DEVICE_GET(random_mcux),
(uint8_t *) &output, sizeof(output)); (uint8_t *) &output, sizeof(output));
__ASSERT_NO_MSG(!r); __ASSERT_NO_MSG(!r);

View file

@ -16,6 +16,6 @@
obj-$(CONFIG_ETH_MCUX) += fsl_enet.o obj-$(CONFIG_ETH_MCUX) += fsl_enet.o
obj-$(CONFIG_I2C_MCUX) += fsl_i2c.o obj-$(CONFIG_I2C_MCUX) += fsl_i2c.o
obj-$(CONFIG_RANDOM_KSDK) += fsl_rnga.o obj-$(CONFIG_RANDOM_MCUX) += fsl_rnga.o
obj-$(CONFIG_SOC_FLASH_KSDK) += fsl_flash.o obj-$(CONFIG_SOC_FLASH_KSDK) += fsl_flash.o