From 4a079c752beef8c2e8072b55a267d4b597b1e05b Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Fri, 23 Aug 2019 18:28:36 +0100 Subject: meson: Rename platform directory to amlogic Meson is the internal code name for the SoC family. The correct name for the platform should be Amlogic. Change the name of the platform directory. Signed-off-by: Carlo Caione Change-Id: Icc140e1ea137f12117acbf64c7dcb1a8b66b345d --- include/drivers/amlogic/gxl/crypto/sha_dma.h | 36 +++++++++++++++++++++++++++ include/drivers/amlogic/meson_console.h | 37 ++++++++++++++++++++++++++++ include/drivers/meson/gxl/crypto/sha_dma.h | 36 --------------------------- include/drivers/meson/meson_console.h | 37 ---------------------------- 4 files changed, 73 insertions(+), 73 deletions(-) create mode 100644 include/drivers/amlogic/gxl/crypto/sha_dma.h create mode 100644 include/drivers/amlogic/meson_console.h delete mode 100644 include/drivers/meson/gxl/crypto/sha_dma.h delete mode 100644 include/drivers/meson/meson_console.h (limited to 'include') diff --git a/include/drivers/amlogic/gxl/crypto/sha_dma.h b/include/drivers/amlogic/gxl/crypto/sha_dma.h new file mode 100644 index 00000000..52129a61 --- /dev/null +++ b/include/drivers/amlogic/gxl/crypto/sha_dma.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2019, Remi Pommarel + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef SHA_DMA_H +#define SHA_DMA_H + +#define SHA256_HASHSZ 32 +#define SHA256_BLOCKSZ 0x40 + +enum ASD_MODE { + ASM_INVAL, + ASM_SHA256, + ASM_SHA224, +}; + +struct asd_ctx { + uint8_t digest[SHA256_HASHSZ]; + uint8_t block[SHA256_BLOCKSZ]; + size_t blocksz; + enum ASD_MODE mode; + uint8_t started; +}; + +static inline void asd_sha_init(struct asd_ctx *ctx, enum ASD_MODE mode) +{ + ctx->started = 0; + ctx->mode = mode; + ctx->blocksz = 0; +} + +void asd_sha_update(struct asd_ctx *ctx, void *data, size_t len); +void asd_sha_finalize(struct asd_ctx *ctx); + +#endif diff --git a/include/drivers/amlogic/meson_console.h b/include/drivers/amlogic/meson_console.h new file mode 100644 index 00000000..70e3b0bd --- /dev/null +++ b/include/drivers/amlogic/meson_console.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef MESON_CONSOLE_H +#define MESON_CONSOLE_H + +#include + +#define CONSOLE_T_MESON_BASE CONSOLE_T_DRVDATA + +#ifndef __ASSEMBLER__ + +#include + +typedef struct { + console_t console; + uintptr_t base; +} console_meson_t; + +/* + * Initialize a new meson console instance and register it with the console + * framework. The |console| pointer must point to storage that will be valid + * for the lifetime of the console, such as a global or static local variable. + * Its contents will be reinitialized from scratch. + * + * NOTE: The clock is actually fixed to 24 MHz. The argument is only there in + * order to make this function future-proof. + */ +int console_meson_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, + console_meson_t *console); + +#endif /*__ASSEMBLER__*/ + +#endif /* MESON_CONSOLE_H */ diff --git a/include/drivers/meson/gxl/crypto/sha_dma.h b/include/drivers/meson/gxl/crypto/sha_dma.h deleted file mode 100644 index 52129a61..00000000 --- a/include/drivers/meson/gxl/crypto/sha_dma.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2019, Remi Pommarel - * - * SPDX-License-Identifier: BSD-3-Clause - */ -#ifndef SHA_DMA_H -#define SHA_DMA_H - -#define SHA256_HASHSZ 32 -#define SHA256_BLOCKSZ 0x40 - -enum ASD_MODE { - ASM_INVAL, - ASM_SHA256, - ASM_SHA224, -}; - -struct asd_ctx { - uint8_t digest[SHA256_HASHSZ]; - uint8_t block[SHA256_BLOCKSZ]; - size_t blocksz; - enum ASD_MODE mode; - uint8_t started; -}; - -static inline void asd_sha_init(struct asd_ctx *ctx, enum ASD_MODE mode) -{ - ctx->started = 0; - ctx->mode = mode; - ctx->blocksz = 0; -} - -void asd_sha_update(struct asd_ctx *ctx, void *data, size_t len); -void asd_sha_finalize(struct asd_ctx *ctx); - -#endif diff --git a/include/drivers/meson/meson_console.h b/include/drivers/meson/meson_console.h deleted file mode 100644 index 70e3b0bd..00000000 --- a/include/drivers/meson/meson_console.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef MESON_CONSOLE_H -#define MESON_CONSOLE_H - -#include - -#define CONSOLE_T_MESON_BASE CONSOLE_T_DRVDATA - -#ifndef __ASSEMBLER__ - -#include - -typedef struct { - console_t console; - uintptr_t base; -} console_meson_t; - -/* - * Initialize a new meson console instance and register it with the console - * framework. The |console| pointer must point to storage that will be valid - * for the lifetime of the console, such as a global or static local variable. - * Its contents will be reinitialized from scratch. - * - * NOTE: The clock is actually fixed to 24 MHz. The argument is only there in - * order to make this function future-proof. - */ -int console_meson_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, - console_meson_t *console); - -#endif /*__ASSEMBLER__*/ - -#endif /* MESON_CONSOLE_H */ -- cgit v1.2.3 From 01b2a7fc3256dcec74e2f147ed28a37ad4df05fe Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Sat, 24 Aug 2019 17:17:30 +0100 Subject: amlogic: Move the SHA256 DMA driver to common directory The SHA256 DMA driver can be used by multiple SoCs. Move it to the common directory. Signed-off-by: Carlo Caione Change-Id: I96319eeeeeebd503ef0dcb07c0e4ff6a67afeaa5 --- include/drivers/amlogic/crypto/sha_dma.h | 36 ++++++++++++++++++++++++++++ include/drivers/amlogic/gxl/crypto/sha_dma.h | 36 ---------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 include/drivers/amlogic/crypto/sha_dma.h delete mode 100644 include/drivers/amlogic/gxl/crypto/sha_dma.h (limited to 'include') diff --git a/include/drivers/amlogic/crypto/sha_dma.h b/include/drivers/amlogic/crypto/sha_dma.h new file mode 100644 index 00000000..52129a61 --- /dev/null +++ b/include/drivers/amlogic/crypto/sha_dma.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2019, Remi Pommarel + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef SHA_DMA_H +#define SHA_DMA_H + +#define SHA256_HASHSZ 32 +#define SHA256_BLOCKSZ 0x40 + +enum ASD_MODE { + ASM_INVAL, + ASM_SHA256, + ASM_SHA224, +}; + +struct asd_ctx { + uint8_t digest[SHA256_HASHSZ]; + uint8_t block[SHA256_BLOCKSZ]; + size_t blocksz; + enum ASD_MODE mode; + uint8_t started; +}; + +static inline void asd_sha_init(struct asd_ctx *ctx, enum ASD_MODE mode) +{ + ctx->started = 0; + ctx->mode = mode; + ctx->blocksz = 0; +} + +void asd_sha_update(struct asd_ctx *ctx, void *data, size_t len); +void asd_sha_finalize(struct asd_ctx *ctx); + +#endif diff --git a/include/drivers/amlogic/gxl/crypto/sha_dma.h b/include/drivers/amlogic/gxl/crypto/sha_dma.h deleted file mode 100644 index 52129a61..00000000 --- a/include/drivers/amlogic/gxl/crypto/sha_dma.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2019, Remi Pommarel - * - * SPDX-License-Identifier: BSD-3-Clause - */ -#ifndef SHA_DMA_H -#define SHA_DMA_H - -#define SHA256_HASHSZ 32 -#define SHA256_BLOCKSZ 0x40 - -enum ASD_MODE { - ASM_INVAL, - ASM_SHA256, - ASM_SHA224, -}; - -struct asd_ctx { - uint8_t digest[SHA256_HASHSZ]; - uint8_t block[SHA256_BLOCKSZ]; - size_t blocksz; - enum ASD_MODE mode; - uint8_t started; -}; - -static inline void asd_sha_init(struct asd_ctx *ctx, enum ASD_MODE mode) -{ - ctx->started = 0; - ctx->mode = mode; - ctx->blocksz = 0; -} - -void asd_sha_update(struct asd_ctx *ctx, void *data, size_t len); -void asd_sha_finalize(struct asd_ctx *ctx); - -#endif -- cgit v1.2.3