summaryrefslogtreecommitdiff
path: root/bsp/nxp/imx/imx91/drivers/imx91.h
blob: fd8452c10d5437c8ee8a0d4e82e7aa7aacb55767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Copyright (c) 2006-2025, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2025-08-10     Siwei Xu     Add i.MX91 SDK
 */

#ifndef __IMX91_H__
#define __IMX91_H__

#include <rtthread.h>

/* 'ARM_GIC_MAX_NR' is the number of cores, gicv3.c required */
#define ARM_GIC_MAX_NR 1

/* The platform maximum interrupts, interrupt.c required */
#define ARM_GIC_NR_IRQS 256

/* Number of interrupts in the Vector table, interrupt.c required */
#define MAX_HANDLERS 256

/* interrupt.c required. */
rt_base_t platform_get_gic_dist_base(void);
rt_base_t platform_get_gic_redist_base(void);
rt_base_t platform_get_gic_cpu_base(void);

/* interrupt.c required */
#define GIC_IRQ_START 0

/* gic.c required */
#define __REG32(x) (*((volatile unsigned int *)(x)))

#define KB_SIZE(x) ((x) * 1024)
#define MB_SIZE(x) ((x) * 1024 * 1024)

#define GIC_DISTRIBUTOR_SIZE   KB_SIZE(64)
#define GIC_REDISTRIBUTOR_SIZE KB_SIZE(768)

#define LPUART1_SIZE  KB_SIZE(64)
#define CCM_CTRL_SIZE KB_SIZE(64)

#endif  /* __IMX91_H__ */