]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/cpu/armv7/mx5/asm-offsets.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / arch / arm / cpu / armv7 / mx5 / asm-offsets.c
1 /*
2 * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
3 *
4 * This program is used to generate definitions needed by
5 * assembly language modules.
6 *
7 * We use the technique used in the OSF Mach kernel code:
8 * generate asm statements containing #defines,
9 * compile this file to assembler, and then extract the
10 * #defines from the assembly-language output.
11 *
12 * SPDX-License-Identifier: GPL-2.0+
13 */
14
15 #include <common.h>
16 #include <asm/arch/imx-regs.h>
17
18 #include <linux/kbuild.h>
19
20 int main(void)
21 {
22
23 /* Round up to make sure size gives nice stack alignment */
24 DEFINE(CLKCTL_CCMR, offsetof(struct clkctl, ccr));
25 DEFINE(CLKCTL_CCDR, offsetof(struct clkctl, ccdr));
26 DEFINE(CLKCTL_CSR, offsetof(struct clkctl, csr));
27 DEFINE(CLKCTL_CCSR, offsetof(struct clkctl, ccsr));
28 DEFINE(CLKCTL_CACRR, offsetof(struct clkctl, cacrr));
29 DEFINE(CLKCTL_CBCDR, offsetof(struct clkctl, cbcdr));
30 DEFINE(CLKCTL_CBCMR, offsetof(struct clkctl, cbcmr));
31 DEFINE(CLKCTL_CSCMR1, offsetof(struct clkctl, cscmr1));
32 DEFINE(CLKCTL_CSCMR2, offsetof(struct clkctl, cscmr2));
33 DEFINE(CLKCTL_CSCDR1, offsetof(struct clkctl, cscdr1));
34 DEFINE(CLKCTL_CS1CDR, offsetof(struct clkctl, cs1cdr));
35 DEFINE(CLKCTL_CS2CDR, offsetof(struct clkctl, cs2cdr));
36 DEFINE(CLKCTL_CDCDR, offsetof(struct clkctl, cdcdr));
37 DEFINE(CLKCTL_CHSCCDR, offsetof(struct clkctl, chsccdr));
38 DEFINE(CLKCTL_CSCDR2, offsetof(struct clkctl, cscdr2));
39 DEFINE(CLKCTL_CSCDR3, offsetof(struct clkctl, cscdr3));
40 DEFINE(CLKCTL_CSCDR4, offsetof(struct clkctl, cscdr4));
41 DEFINE(CLKCTL_CWDR, offsetof(struct clkctl, cwdr));
42 DEFINE(CLKCTL_CDHIPR, offsetof(struct clkctl, cdhipr));
43 DEFINE(CLKCTL_CDCR, offsetof(struct clkctl, cdcr));
44 DEFINE(CLKCTL_CTOR, offsetof(struct clkctl, ctor));
45 DEFINE(CLKCTL_CLPCR, offsetof(struct clkctl, clpcr));
46 DEFINE(CLKCTL_CISR, offsetof(struct clkctl, cisr));
47 DEFINE(CLKCTL_CIMR, offsetof(struct clkctl, cimr));
48 DEFINE(CLKCTL_CCOSR, offsetof(struct clkctl, ccosr));
49 DEFINE(CLKCTL_CGPR, offsetof(struct clkctl, cgpr));
50 DEFINE(CLKCTL_CCGR0, offsetof(struct clkctl, ccgr0));
51 DEFINE(CLKCTL_CCGR1, offsetof(struct clkctl, ccgr1));
52 DEFINE(CLKCTL_CCGR2, offsetof(struct clkctl, ccgr2));
53 DEFINE(CLKCTL_CCGR3, offsetof(struct clkctl, ccgr3));
54 DEFINE(CLKCTL_CCGR4, offsetof(struct clkctl, ccgr4));
55 DEFINE(CLKCTL_CCGR5, offsetof(struct clkctl, ccgr5));
56 DEFINE(CLKCTL_CCGR6, offsetof(struct clkctl, ccgr6));
57 DEFINE(CLKCTL_CMEOR, offsetof(struct clkctl, cmeor));
58 #if defined(CONFIG_MX53)
59 DEFINE(CLKCTL_CCGR7, offsetof(struct clkctl, ccgr7));
60 #endif
61
62 /* DPLL */
63 DEFINE(PLL_DP_CTL, offsetof(struct dpll, dp_ctl));
64 DEFINE(PLL_DP_CONFIG, offsetof(struct dpll, dp_config));
65 DEFINE(PLL_DP_OP, offsetof(struct dpll, dp_op));
66 DEFINE(PLL_DP_MFD, offsetof(struct dpll, dp_mfd));
67 DEFINE(PLL_DP_MFN, offsetof(struct dpll, dp_mfn));
68 DEFINE(PLL_DP_HFS_OP, offsetof(struct dpll, dp_hfs_op));
69 DEFINE(PLL_DP_HFS_MFD, offsetof(struct dpll, dp_hfs_mfd));
70 DEFINE(PLL_DP_HFS_MFN, offsetof(struct dpll, dp_hfs_mfn));
71
72 return 0;
73 }