summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/mx27/asm-offsets.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-07-18 21:04:56 +0200
committerWolfgang Denk <wd@denx.de>2011-07-18 21:04:56 +0200
commitcdf1a2328a76cc57837d9a6e14a4f11f3a58b2e6 (patch)
tree736ae439a14b3486a100d0b0e758471cbad64651 /arch/arm/cpu/arm926ejs/mx27/asm-offsets.c
parent1c6d00c2b5f090f5ae9b0d5cd9cf9a0adfdd2c77 (diff)
parent6e25b6ce5d26c3c238c1dd947ef33dc38be003d8 (diff)
downloadu-boot-imx-cdf1a2328a76cc57837d9a6e14a4f11f3a58b2e6.zip
u-boot-imx-cdf1a2328a76cc57837d9a6e14a4f11f3a58b2e6.tar.gz
u-boot-imx-cdf1a2328a76cc57837d9a6e14a4f11f3a58b2e6.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
* 'master' of git://git.denx.de/u-boot-arm: ARM: MX5: Fix broken leftover TO-2 errata workaround MX31: Cleanup clock function scb9328: Add ARM relocation support am3517evm: change console device from ttyS2 to ttyO2 Remove volatile qualifier in get_ram_size() calls TI: TNETV107X Fix Build Error ARM: add missing CONFIG_SKIP_LOWLEVEL_INIT for armv7 arm: add CONFIG_MACH_TYPE setting and documentation arm: add __ilog2 function Timer: Fix misuse of ARM *timer_masked() functions outside arch/arm EfikaMX: Enable EXT2 booting EfikaMX: Add missing CONFIG_SYS_TEXT_BASE EfikaMX: Use correct imximage.cfg MX27: Update to autogenerated asm-offsets.h MX5: Update to autogenerated asm-offsets.h imx: Add support for zmx25 board imx: Make imx25 compatible to mxc_gpio driver and fix in tx25 imx: Add auto generation of asm-offsets.h for imx25 imx: Add support for USB EHCI on imx25 imx: Use correct imx25 reset.c imx: Add get_tbclk() function for imx25 ARM: Update maintainer of board scb9328 mx27: Make the UART port number explicit build: Add targets for auto gen of asm-offsets.h and use it in imx35 mx31pdk: cosmetic: Fix line over 80 characters
Diffstat (limited to 'arch/arm/cpu/arm926ejs/mx27/asm-offsets.c')
-rw-r--r--arch/arm/cpu/arm926ejs/mx27/asm-offsets.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx27/asm-offsets.c b/arch/arm/cpu/arm926ejs/mx27/asm-offsets.c
new file mode 100644
index 0000000..f3a8d7b
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/mx27/asm-offsets.c
@@ -0,0 +1,45 @@
+/*
+ * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
+ *
+ * This program is used to generate definitions needed by
+ * assembly language modules.
+ *
+ * We use the technique used in the OSF Mach kernel code:
+ * generate asm statements containing #defines,
+ * compile this file to assembler, and then extract the
+ * #defines from the assembly-language output.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <common.h>
+#include <asm/arch/imx-regs.h>
+
+#include <linux/kbuild.h>
+
+int main(void)
+{
+ DEFINE(AIPI1_PSR0, IMX_AIPI1_BASE + offsetof(struct aipi_regs, psr0));
+ DEFINE(AIPI1_PSR1, IMX_AIPI1_BASE + offsetof(struct aipi_regs, psr1));
+ DEFINE(AIPI2_PSR0, IMX_AIPI2_BASE + offsetof(struct aipi_regs, psr0));
+ DEFINE(AIPI2_PSR1, IMX_AIPI2_BASE + offsetof(struct aipi_regs, psr1));
+
+ DEFINE(CSCR, IMX_PLL_BASE + offsetof(struct pll_regs, cscr));
+ DEFINE(MPCTL0, IMX_PLL_BASE + offsetof(struct pll_regs, mpctl0));
+ DEFINE(SPCTL0, IMX_PLL_BASE + offsetof(struct pll_regs, spctl0));
+ DEFINE(PCDR0, IMX_PLL_BASE + offsetof(struct pll_regs, pcdr0));
+ DEFINE(PCDR1, IMX_PLL_BASE + offsetof(struct pll_regs, pcdr1));
+ DEFINE(PCCR0, IMX_PLL_BASE + offsetof(struct pll_regs, pccr0));
+ DEFINE(PCCR1, IMX_PLL_BASE + offsetof(struct pll_regs, pccr1));
+
+ DEFINE(ESDCTL0_ROF, offsetof(struct esdramc_regs, esdctl0));
+ DEFINE(ESDCFG0_ROF, offsetof(struct esdramc_regs, esdcfg0));
+ DEFINE(ESDCTL1_ROF, offsetof(struct esdramc_regs, esdctl1));
+ DEFINE(ESDCFG1_ROF, offsetof(struct esdramc_regs, esdcfg1));
+ DEFINE(ESDMISC_ROF, offsetof(struct esdramc_regs, esdmisc));
+
+ return 0;
+}