blob: 629b7277454478e1a300d265db5428f37f0f52a5 [file] [log] [blame]
Stefano Babic1e3763c2011-07-07 03:37:07 +00001/*
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 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +020012 * SPDX-License-Identifier: GPL-2.0+
Stefano Babic1e3763c2011-07-07 03:37:07 +000013 */
14
15#include <common.h>
16#include <asm/arch/imx-regs.h>
17
18#include <linux/kbuild.h>
19
20int main(void)
21{
22 DEFINE(AIPI1_PSR0, IMX_AIPI1_BASE + offsetof(struct aipi_regs, psr0));
23 DEFINE(AIPI1_PSR1, IMX_AIPI1_BASE + offsetof(struct aipi_regs, psr1));
24 DEFINE(AIPI2_PSR0, IMX_AIPI2_BASE + offsetof(struct aipi_regs, psr0));
25 DEFINE(AIPI2_PSR1, IMX_AIPI2_BASE + offsetof(struct aipi_regs, psr1));
26
27 DEFINE(CSCR, IMX_PLL_BASE + offsetof(struct pll_regs, cscr));
28 DEFINE(MPCTL0, IMX_PLL_BASE + offsetof(struct pll_regs, mpctl0));
29 DEFINE(SPCTL0, IMX_PLL_BASE + offsetof(struct pll_regs, spctl0));
30 DEFINE(PCDR0, IMX_PLL_BASE + offsetof(struct pll_regs, pcdr0));
31 DEFINE(PCDR1, IMX_PLL_BASE + offsetof(struct pll_regs, pcdr1));
32 DEFINE(PCCR0, IMX_PLL_BASE + offsetof(struct pll_regs, pccr0));
33 DEFINE(PCCR1, IMX_PLL_BASE + offsetof(struct pll_regs, pccr1));
34
35 DEFINE(ESDCTL0_ROF, offsetof(struct esdramc_regs, esdctl0));
36 DEFINE(ESDCFG0_ROF, offsetof(struct esdramc_regs, esdcfg0));
37 DEFINE(ESDCTL1_ROF, offsetof(struct esdramc_regs, esdctl1));
38 DEFINE(ESDCFG1_ROF, offsetof(struct esdramc_regs, esdcfg1));
39 DEFINE(ESDMISC_ROF, offsetof(struct esdramc_regs, esdmisc));
40
tremd7f44dd2013-09-06 17:33:45 +020041 DEFINE(GPCR, IMX_SYSTEM_CTL_BASE +
42 offsetof(struct system_control_regs, gpcr));
43 DEFINE(FMCR, IMX_SYSTEM_CTL_BASE +
44 offsetof(struct system_control_regs, fmcr));
45
Stefano Babic1e3763c2011-07-07 03:37:07 +000046 return 0;
47}