18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/**
38c2ecf20Sopenharmony_ci * Copyright (C) ST-Ericsson SA 2010
48c2ecf20Sopenharmony_ci * Author: Shujuan Chen <shujuan.chen@stericsson.com> for ST-Ericsson.
58c2ecf20Sopenharmony_ci * Author: Jonas Linde <jonas.linde@stericsson.com> for ST-Ericsson.
68c2ecf20Sopenharmony_ci * Author: Joakim Bech <joakim.xx.bech@stericsson.com> for ST-Ericsson.
78c2ecf20Sopenharmony_ci * Author: Berne Hebark <berne.herbark@stericsson.com> for ST-Ericsson.
88c2ecf20Sopenharmony_ci * Author: Niklas Hernaeus <niklas.hernaeus@stericsson.com> for ST-Ericsson.
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifndef __CRYP_IRQP_H_
128c2ecf20Sopenharmony_ci#define __CRYP_IRQP_H_
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include "cryp_irq.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/**
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci * CRYP Registers - Offset mapping
198c2ecf20Sopenharmony_ci *     +-----------------+
208c2ecf20Sopenharmony_ci * 00h | CRYP_CR         |  Configuration register
218c2ecf20Sopenharmony_ci *     +-----------------+
228c2ecf20Sopenharmony_ci * 04h | CRYP_SR         |  Status register
238c2ecf20Sopenharmony_ci *     +-----------------+
248c2ecf20Sopenharmony_ci * 08h | CRYP_DIN        |  Data In register
258c2ecf20Sopenharmony_ci *     +-----------------+
268c2ecf20Sopenharmony_ci * 0ch | CRYP_DOUT       |  Data out register
278c2ecf20Sopenharmony_ci *     +-----------------+
288c2ecf20Sopenharmony_ci * 10h | CRYP_DMACR      |  DMA control register
298c2ecf20Sopenharmony_ci *     +-----------------+
308c2ecf20Sopenharmony_ci * 14h | CRYP_IMSC       |  IMSC
318c2ecf20Sopenharmony_ci *     +-----------------+
328c2ecf20Sopenharmony_ci * 18h | CRYP_RIS        |  Raw interrupt status
338c2ecf20Sopenharmony_ci *     +-----------------+
348c2ecf20Sopenharmony_ci * 1ch | CRYP_MIS        |  Masked interrupt status.
358c2ecf20Sopenharmony_ci *     +-----------------+
368c2ecf20Sopenharmony_ci *       Key registers
378c2ecf20Sopenharmony_ci *       IVR registers
388c2ecf20Sopenharmony_ci *       Peripheral
398c2ecf20Sopenharmony_ci *       Cell IDs
408c2ecf20Sopenharmony_ci *
418c2ecf20Sopenharmony_ci *       Refer data structure for other register map
428c2ecf20Sopenharmony_ci */
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci/**
458c2ecf20Sopenharmony_ci * struct cryp_register
468c2ecf20Sopenharmony_ci * @cr			- Configuration register
478c2ecf20Sopenharmony_ci * @status		- Status register
488c2ecf20Sopenharmony_ci * @din			- Data input register
498c2ecf20Sopenharmony_ci * @din_size		- Data input size register
508c2ecf20Sopenharmony_ci * @dout		- Data output register
518c2ecf20Sopenharmony_ci * @dout_size		- Data output size register
528c2ecf20Sopenharmony_ci * @dmacr		- Dma control register
538c2ecf20Sopenharmony_ci * @imsc		- Interrupt mask set/clear register
548c2ecf20Sopenharmony_ci * @ris			- Raw interrupt status
558c2ecf20Sopenharmony_ci * @mis			- Masked interrupt statu register
568c2ecf20Sopenharmony_ci * @key_1_l		- Key register 1 L
578c2ecf20Sopenharmony_ci * @key_1_r		- Key register 1 R
588c2ecf20Sopenharmony_ci * @key_2_l		- Key register 2 L
598c2ecf20Sopenharmony_ci * @key_2_r		- Key register 2 R
608c2ecf20Sopenharmony_ci * @key_3_l		- Key register 3 L
618c2ecf20Sopenharmony_ci * @key_3_r		- Key register 3 R
628c2ecf20Sopenharmony_ci * @key_4_l		- Key register 4 L
638c2ecf20Sopenharmony_ci * @key_4_r		- Key register 4 R
648c2ecf20Sopenharmony_ci * @init_vect_0_l	- init vector 0 L
658c2ecf20Sopenharmony_ci * @init_vect_0_r	- init vector 0 R
668c2ecf20Sopenharmony_ci * @init_vect_1_l	- init vector 1 L
678c2ecf20Sopenharmony_ci * @init_vect_1_r	- init vector 1 R
688c2ecf20Sopenharmony_ci * @cryp_unused1	- unused registers
698c2ecf20Sopenharmony_ci * @itcr		- Integration test control register
708c2ecf20Sopenharmony_ci * @itip		- Integration test input register
718c2ecf20Sopenharmony_ci * @itop		- Integration test output register
728c2ecf20Sopenharmony_ci * @cryp_unused2	- unused registers
738c2ecf20Sopenharmony_ci * @periphId0		- FE0 CRYP Peripheral Identication Register
748c2ecf20Sopenharmony_ci * @periphId1		- FE4
758c2ecf20Sopenharmony_ci * @periphId2		- FE8
768c2ecf20Sopenharmony_ci * @periphId3		- FEC
778c2ecf20Sopenharmony_ci * @pcellId0		- FF0  CRYP PCell Identication Register
788c2ecf20Sopenharmony_ci * @pcellId1		- FF4
798c2ecf20Sopenharmony_ci * @pcellId2		- FF8
808c2ecf20Sopenharmony_ci * @pcellId3		- FFC
818c2ecf20Sopenharmony_ci */
828c2ecf20Sopenharmony_cistruct cryp_register {
838c2ecf20Sopenharmony_ci	u32 cr;			/* Configuration register   */
848c2ecf20Sopenharmony_ci	u32 sr;			/* Status register          */
858c2ecf20Sopenharmony_ci	u32 din;		/* Data input register      */
868c2ecf20Sopenharmony_ci	u32 din_size;		/* Data input size register */
878c2ecf20Sopenharmony_ci	u32 dout;		/* Data output register     */
888c2ecf20Sopenharmony_ci	u32 dout_size;		/* Data output size register */
898c2ecf20Sopenharmony_ci	u32 dmacr;		/* Dma control register     */
908c2ecf20Sopenharmony_ci	u32 imsc;		/* Interrupt mask set/clear register */
918c2ecf20Sopenharmony_ci	u32 ris;		/* Raw interrupt status             */
928c2ecf20Sopenharmony_ci	u32 mis;		/* Masked interrupt statu register  */
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci	u32 key_1_l;		/*Key register 1 L */
958c2ecf20Sopenharmony_ci	u32 key_1_r;		/*Key register 1 R */
968c2ecf20Sopenharmony_ci	u32 key_2_l;		/*Key register 2 L */
978c2ecf20Sopenharmony_ci	u32 key_2_r;		/*Key register 2 R */
988c2ecf20Sopenharmony_ci	u32 key_3_l;		/*Key register 3 L */
998c2ecf20Sopenharmony_ci	u32 key_3_r;		/*Key register 3 R */
1008c2ecf20Sopenharmony_ci	u32 key_4_l;		/*Key register 4 L */
1018c2ecf20Sopenharmony_ci	u32 key_4_r;		/*Key register 4 R */
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci	u32 init_vect_0_l;	/*init vector 0 L */
1048c2ecf20Sopenharmony_ci	u32 init_vect_0_r;	/*init vector 0 R */
1058c2ecf20Sopenharmony_ci	u32 init_vect_1_l;	/*init vector 1 L */
1068c2ecf20Sopenharmony_ci	u32 init_vect_1_r;	/*init vector 1 R */
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci	u32 cryp_unused1[(0x80 - 0x58) / sizeof(u32)];	/* unused registers */
1098c2ecf20Sopenharmony_ci	u32 itcr;		/*Integration test control register */
1108c2ecf20Sopenharmony_ci	u32 itip;		/*Integration test input register */
1118c2ecf20Sopenharmony_ci	u32 itop;		/*Integration test output register */
1128c2ecf20Sopenharmony_ci	u32 cryp_unused2[(0xFE0 - 0x8C) / sizeof(u32)];	/* unused registers */
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ci	u32 periphId0;		/* FE0  CRYP Peripheral Identication Register */
1158c2ecf20Sopenharmony_ci	u32 periphId1;		/* FE4 */
1168c2ecf20Sopenharmony_ci	u32 periphId2;		/* FE8 */
1178c2ecf20Sopenharmony_ci	u32 periphId3;		/* FEC */
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci	u32 pcellId0;		/* FF0  CRYP PCell Identication Register */
1208c2ecf20Sopenharmony_ci	u32 pcellId1;		/* FF4 */
1218c2ecf20Sopenharmony_ci	u32 pcellId2;		/* FF8 */
1228c2ecf20Sopenharmony_ci	u32 pcellId3;		/* FFC */
1238c2ecf20Sopenharmony_ci};
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci#endif
126