Skip to content

Commit

Permalink
staging: ccree: use a consistent file naming convention
Browse files Browse the repository at this point in the history
The ccree driver source files were using an inconsistent
naming convention stemming from what the company was called
when they were added.

Move to a single consistent naming convention for better
code readability.

Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gby authored and gregkh committed Jan 9, 2018
1 parent 5b135f6 commit e7660d2
Show file tree
Hide file tree
Showing 25 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/ccree/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_CRYPTO_DEV_CCREE) := ccree.o
ccree-y := ssi_driver.o ssi_buffer_mgr.o ssi_request_mgr.o ssi_cipher.o ssi_hash.o ssi_aead.o ssi_ivgen.o ssi_sram_mgr.o
ccree-$(CONFIG_CRYPTO_FIPS) += ssi_fips.o
ccree-y := cc_driver.o cc_buffer_mgr.o cc_request_mgr.o cc_cipher.o cc_hash.o cc_aead.o cc_ivgen.o cc_sram_mgr.o
ccree-$(CONFIG_CRYPTO_FIPS) += cc_fips.o
ccree-$(CONFIG_DEBUG_FS) += cc_debugfs.o
ccree-$(CONFIG_PM) += ssi_pm.o
ccree-$(CONFIG_PM) += cc_pm.o
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#include <crypto/des.h>
#include <linux/rtnetlink.h>
#include <linux/version.h>
#include "ssi_driver.h"
#include "ssi_buffer_mgr.h"
#include "ssi_aead.h"
#include "ssi_request_mgr.h"
#include "ssi_hash.h"
#include "ssi_sram_mgr.h"
#include "cc_driver.h"
#include "cc_buffer_mgr.h"
#include "cc_aead.h"
#include "cc_request_mgr.h"
#include "cc_hash.h"
#include "cc_sram_mgr.h"

#define template_aead template_u.aead

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file ssi_aead.h
/* \file cc_aead.h
* ARM CryptoCell AEAD Crypto API
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include <linux/module.h>
#include <linux/platform_device.h>

#include "ssi_buffer_mgr.h"
#include "cc_buffer_mgr.h"
#include "cc_lli_defs.h"
#include "ssi_cipher.h"
#include "ssi_hash.h"
#include "ssi_aead.h"
#include "cc_cipher.h"
#include "cc_hash.h"
#include "cc_aead.h"

enum dma_buffer_type {
DMA_NULL_TYPE = -1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file buffer_mgr.h
/* \file cc_buffer_mgr.h
* Buffer Manager
*/

Expand All @@ -10,7 +10,7 @@

#include <crypto/algapi.h>

#include "ssi_driver.h"
#include "cc_driver.h"

enum cc_req_dma_buf_type {
CC_DMA_BUF_NULL = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include <crypto/xts.h>
#include <crypto/scatterwalk.h>

#include "ssi_driver.h"
#include "cc_driver.h"
#include "cc_lli_defs.h"
#include "ssi_buffer_mgr.h"
#include "ssi_cipher.h"
#include "ssi_request_mgr.h"
#include "cc_buffer_mgr.h"
#include "cc_cipher.h"
#include "cc_request_mgr.h"

#define MAX_ABLKCIPHER_SEQ_LEN 6

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file ssi_cipher.h
/* \file cc_cipher.h
* ARM CryptoCell Cipher Crypto API
*/

Expand All @@ -10,8 +10,8 @@

#include <linux/kernel.h>
#include <crypto/algapi.h>
#include "ssi_driver.h"
#include "ssi_buffer_mgr.h"
#include "cc_driver.h"
#include "cc_buffer_mgr.h"

/* Crypto cipher flags */
#define CC_CRYPTO_CIPHER_KEY_KFDE0 BIT(0)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ccree/cc_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <linux/kernel.h>
#include <linux/debugfs.h>
#include <linux/stringify.h>
#include "ssi_driver.h"
#include "cc_driver.h"
#include "cc_crypto_ctx.h"

struct cc_debugfs_ctx {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
#include <linux/clk.h>
#include <linux/of_address.h>

#include "ssi_driver.h"
#include "ssi_request_mgr.h"
#include "ssi_buffer_mgr.h"
#include "cc_driver.h"
#include "cc_request_mgr.h"
#include "cc_buffer_mgr.h"
#include "cc_debugfs.h"
#include "ssi_cipher.h"
#include "ssi_aead.h"
#include "ssi_hash.h"
#include "ssi_ivgen.h"
#include "ssi_sram_mgr.h"
#include "ssi_pm.h"
#include "ssi_fips.h"
#include "cc_cipher.h"
#include "cc_aead.h"
#include "cc_hash.h"
#include "cc_ivgen.h"
#include "cc_sram_mgr.h"
#include "cc_pm.h"
#include "cc_fips.h"

bool cc_dump_desc;
module_param_named(dump_desc, cc_dump_desc, bool, 0600);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file ssi_driver.h
/* \file cc_driver.h
* ARM CryptoCell Linux Crypto Driver
*/

Expand All @@ -26,11 +26,11 @@
#include <linux/platform_device.h>

/* Registers definitions from shared/hw/ree_include */
#include "dx_host.h"
#include "cc_host_regs.h"
#define CC_DEV_SHA_MAX 512
#include "cc_crypto_ctx.h"
#include "cc_hw_queue_defs.h"
#include "ssi_sram_mgr.h"
#include "cc_sram_mgr.h"

extern bool cc_dump_desc;
extern bool cc_dump_bytes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <linux/kernel.h>
#include <linux/fips.h>

#include "ssi_driver.h"
#include "ssi_fips.h"
#include "cc_driver.h"
#include "cc_fips.h"

static void fips_dsr(unsigned long devarg);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#include <crypto/md5.h>
#include <crypto/internal/hash.h>

#include "ssi_driver.h"
#include "ssi_request_mgr.h"
#include "ssi_buffer_mgr.h"
#include "ssi_hash.h"
#include "ssi_sram_mgr.h"
#include "cc_driver.h"
#include "cc_request_mgr.h"
#include "cc_buffer_mgr.h"
#include "cc_hash.h"
#include "cc_sram_mgr.h"

#define CC_MAX_HASH_SEQ_LEN 12
#define CC_MAX_OPAD_KEYS_SIZE CC_MAX_HASH_BLCK_SIZE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file ssi_hash.h
/* \file cc_hash.h
* ARM CryptoCell Hash Crypto API
*/

#ifndef __CC_HASH_H__
#define __CC_HASH_H__

#include "ssi_buffer_mgr.h"
#include "cc_buffer_mgr.h"

#define HMAC_IPAD_CONST 0x36363636
#define HMAC_OPAD_CONST 0x5C5C5C5C
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion drivers/staging/ccree/cc_hw_queue_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <linux/types.h>

#include "dx_crys_kernel.h"
#include "cc_kernel_regs.h"
#include <linux/bitfield.h>

/******************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#include <linux/platform_device.h>
#include <crypto/ctr.h>
#include "ssi_driver.h"
#include "ssi_ivgen.h"
#include "ssi_request_mgr.h"
#include "ssi_sram_mgr.h"
#include "ssi_buffer_mgr.h"
#include "cc_driver.h"
#include "cc_ivgen.h"
#include "cc_request_mgr.h"
#include "cc_sram_mgr.h"
#include "cc_buffer_mgr.h"

/* The max. size of pool *MUST* be <= SRAM total size */
#define CC_IVPOOL_SIZE 1024
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions drivers/staging/ccree/ssi_pm.c → drivers/staging/ccree/cc_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#include <linux/interrupt.h>
#include <crypto/ctr.h>
#include <linux/pm_runtime.h>
#include "ssi_driver.h"
#include "ssi_buffer_mgr.h"
#include "ssi_request_mgr.h"
#include "ssi_sram_mgr.h"
#include "ssi_ivgen.h"
#include "ssi_hash.h"
#include "ssi_pm.h"
#include "cc_driver.h"
#include "cc_buffer_mgr.h"
#include "cc_request_mgr.h"
#include "cc_sram_mgr.h"
#include "cc_ivgen.h"
#include "cc_hash.h"
#include "cc_pm.h"

#define POWER_DOWN_ENABLE 0x01
#define POWER_DOWN_DISABLE 0x00
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file ssi_pm.h
/* \file cc_pm.h
*/

#ifndef __CC_POWER_MGR_H__
#define __CC_POWER_MGR_H__

#include "ssi_driver.h"
#include "cc_driver.h"

#define CC_SUSPEND_TIMEOUT 3000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include <linux/delay.h>
#include <crypto/ctr.h>
#include <linux/pm_runtime.h>
#include "ssi_driver.h"
#include "ssi_buffer_mgr.h"
#include "ssi_request_mgr.h"
#include "ssi_ivgen.h"
#include "ssi_pm.h"
#include "cc_driver.h"
#include "cc_buffer_mgr.h"
#include "cc_request_mgr.h"
#include "cc_ivgen.h"
#include "cc_pm.h"

#define CC_MAX_POLL_ITER 10
/* The highest descriptor count in used */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

/* \file request_mgr.h
/* \file cc_request_mgr.h
* Request Manager
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */

#include "ssi_driver.h"
#include "ssi_sram_mgr.h"
#include "cc_driver.h"
#include "cc_sram_mgr.h"

/**
* struct cc_sram_ctx -Internal RAM context manager
Expand Down
File renamed without changes.

0 comments on commit e7660d2

Please sign in to comment.