From 552a848e4f75e224515269a84a1155c84b762bc7 Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Thu, 29 Jun 2017 10:16:06 +0200 Subject: imx: reorganize IMX code as other SOCs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change is consistent with other SOCs and it is in preparation for adding SOMs. SOC's related files are moved from cpu/ to mach-imx/. This change is also coherent with the structure in kernel. Signed-off-by: Stefano Babic CC: Fabio Estevam CC: Akshay Bhat CC: Ken Lin CC: Marek Vasut CC: Heiko Schocher CC: "Sébastien Szymanski" CC: Christian Gmeiner CC: Stefan Roese CC: Patrick Bruenn CC: Troy Kisky CC: Nikita Kiryanov CC: Otavio Salvador CC: "Eric Bénard" CC: Jagan Teki CC: Ye Li CC: Peng Fan CC: Adrian Alonso CC: Alison Wang CC: Tim Harvey CC: Martin Donnelly CC: Marcin Niestroj CC: Lukasz Majewski CC: Adam Ford CC: "Albert ARIBAUD (3ADEV)" CC: Boris Brezillon CC: Soeren Moch CC: Richard Hu CC: Wig Cheng CC: Vanessa Maegima CC: Max Krummenacher CC: Stefan Agner CC: Markus Niebel CC: Breno Lima CC: Francesco Montefoschi CC: Jaehoon Chung CC: Scott Wood CC: Joe Hershberger CC: Anatolij Gustschin CC: Simon Glass CC: "Andrew F. Davis" CC: "Łukasz Majewski" CC: Patrice Chotard CC: Nobuhiro Iwamatsu CC: Hans de Goede CC: Masahiro Yamada CC: Stephen Warren CC: Andre Przywara CC: "Álvaro Fernández Rojas" CC: York Sun CC: Xiaoliang Yang CC: Chen-Yu Tsai CC: George McCollister CC: Sven Ebenfeld CC: Filip Brozovic CC: Petr Kulhavy CC: Eric Nelson CC: Bai Ping CC: Anson Huang CC: Sanchayan Maity CC: Lokesh Vutla CC: Patrick Delaunay CC: Gary Bisson CC: Alexander Graf CC: u-boot@lists.denx.de Reviewed-by: Fabio Estevam Reviewed-by: Christian Gmeiner --- arch/arm/imx-common/cmd_dek.c | 92 ------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 arch/arm/imx-common/cmd_dek.c (limited to 'arch/arm/imx-common/cmd_dek.c') diff --git a/arch/arm/imx-common/cmd_dek.c b/arch/arm/imx-common/cmd_dek.c deleted file mode 100644 index ada8adf2f4..0000000000 --- a/arch/arm/imx-common/cmd_dek.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2008-2015 Freescale Semiconductor, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - * - * Command for encapsulating DEK blob - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -/** -* blob_dek() - Encapsulate the DEK as a blob using CAM's Key -* @src: - Address of data to be encapsulated -* @dst: - Desination address of encapsulated data -* @len: - Size of data to be encapsulated -* -* Returns zero on success,and negative on error. -*/ -static int blob_encap_dek(const u8 *src, u8 *dst, u32 len) -{ - int ret = 0; - u32 jr_size = 4; - - u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + 0x102c); - if (out_jr_size != jr_size) { - hab_caam_clock_enable(1); - sec_init(); - } - - if (!((len == 128) | (len == 192) | (len == 256))) { - debug("Invalid DEK size. Valid sizes are 128, 192 and 256b\n"); - return -1; - } - - len /= 8; - ret = blob_dek(src, dst, len); - - return ret; -} - -/** - * do_dek_blob() - Handle the "dek_blob" command-line command - * @cmdtp: Command data struct pointer - * @flag: Command flag - * @argc: Command-line argument count - * @argv: Array of command-line arguments - * - * Returns zero on success, CMD_RET_USAGE in case of misuse and negative - * on error. - */ -static int do_dek_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) -{ - uint32_t src_addr, dst_addr, len; - uint8_t *src_ptr, *dst_ptr; - int ret = 0; - - if (argc != 4) - return CMD_RET_USAGE; - - src_addr = simple_strtoul(argv[1], NULL, 16); - dst_addr = simple_strtoul(argv[2], NULL, 16); - len = simple_strtoul(argv[3], NULL, 10); - - src_ptr = map_sysmem(src_addr, len/8); - dst_ptr = map_sysmem(dst_addr, BLOB_SIZE(len/8)); - - ret = blob_encap_dek(src_ptr, dst_ptr, len); - - return ret; -} - -/***************************************************/ -static char dek_blob_help_text[] = - "src dst len - Encapsulate and create blob of data\n" - " $len bits long at address $src and\n" - " store the result at address $dst.\n"; - -U_BOOT_CMD( - dek_blob, 4, 1, do_dek_blob, - "Data Encryption Key blob encapsulation", - dek_blob_help_text -); -- cgit