Stefano Babic | 0edf8b5 | 2011-07-07 03:37:06 +0000 | [diff] [blame] | 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 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version |
| 15 | * 2 of the License, or (at your option) any later version. |
| 16 | */ |
| 17 | |
| 18 | #include <common.h> |
| 19 | #include <asm/arch/imx-regs.h> |
| 20 | |
| 21 | #include <linux/kbuild.h> |
| 22 | |
| 23 | int main(void) |
| 24 | { |
| 25 | |
| 26 | /* Round up to make sure size gives nice stack alignment */ |
| 27 | DEFINE(CLKCTL_CCMR, offsetof(struct clkctl, ccr)); |
| 28 | DEFINE(CLKCTL_CCDR, offsetof(struct clkctl, ccdr)); |
| 29 | DEFINE(CLKCTL_CSR, offsetof(struct clkctl, csr)); |
| 30 | DEFINE(CLKCTL_CCSR, offsetof(struct clkctl, ccsr)); |
| 31 | DEFINE(CLKCTL_CACRR, offsetof(struct clkctl, cacrr)); |
| 32 | DEFINE(CLKCTL_CBCDR, offsetof(struct clkctl, cbcdr)); |
| 33 | DEFINE(CLKCTL_CBCMR, offsetof(struct clkctl, cbcmr)); |
| 34 | DEFINE(CLKCTL_CSCMR1, offsetof(struct clkctl, cscmr1)); |
| 35 | DEFINE(CLKCTL_CSCMR2, offsetof(struct clkctl, cscmr2)); |
| 36 | DEFINE(CLKCTL_CSCDR1, offsetof(struct clkctl, cscdr1)); |
| 37 | DEFINE(CLKCTL_CS1CDR, offsetof(struct clkctl, cs1cdr)); |
| 38 | DEFINE(CLKCTL_CS2CDR, offsetof(struct clkctl, cs2cdr)); |
| 39 | DEFINE(CLKCTL_CDCDR, offsetof(struct clkctl, cdcdr)); |
| 40 | DEFINE(CLKCTL_CHSCCDR, offsetof(struct clkctl, chsccdr)); |
| 41 | DEFINE(CLKCTL_CSCDR2, offsetof(struct clkctl, cscdr2)); |
| 42 | DEFINE(CLKCTL_CSCDR3, offsetof(struct clkctl, cscdr3)); |
| 43 | DEFINE(CLKCTL_CSCDR4, offsetof(struct clkctl, cscdr4)); |
| 44 | DEFINE(CLKCTL_CWDR, offsetof(struct clkctl, cwdr)); |
| 45 | DEFINE(CLKCTL_CDHIPR, offsetof(struct clkctl, cdhipr)); |
| 46 | DEFINE(CLKCTL_CDCR, offsetof(struct clkctl, cdcr)); |
| 47 | DEFINE(CLKCTL_CTOR, offsetof(struct clkctl, ctor)); |
| 48 | DEFINE(CLKCTL_CLPCR, offsetof(struct clkctl, clpcr)); |
| 49 | DEFINE(CLKCTL_CISR, offsetof(struct clkctl, cisr)); |
| 50 | DEFINE(CLKCTL_CIMR, offsetof(struct clkctl, cimr)); |
| 51 | DEFINE(CLKCTL_CCOSR, offsetof(struct clkctl, ccosr)); |
| 52 | DEFINE(CLKCTL_CGPR, offsetof(struct clkctl, cgpr)); |
| 53 | DEFINE(CLKCTL_CCGR0, offsetof(struct clkctl, ccgr0)); |
| 54 | DEFINE(CLKCTL_CCGR1, offsetof(struct clkctl, ccgr1)); |
| 55 | DEFINE(CLKCTL_CCGR2, offsetof(struct clkctl, ccgr2)); |
| 56 | DEFINE(CLKCTL_CCGR3, offsetof(struct clkctl, ccgr3)); |
| 57 | DEFINE(CLKCTL_CCGR4, offsetof(struct clkctl, ccgr4)); |
| 58 | DEFINE(CLKCTL_CCGR5, offsetof(struct clkctl, ccgr5)); |
| 59 | DEFINE(CLKCTL_CCGR6, offsetof(struct clkctl, ccgr6)); |
| 60 | DEFINE(CLKCTL_CMEOR, offsetof(struct clkctl, cmeor)); |
| 61 | #if defined(CONFIG_MX53) |
| 62 | DEFINE(CLKCTL_CCGR7, offsetof(struct clkctl, ccgr7)); |
| 63 | #endif |
| 64 | |
| 65 | /* DPLL */ |
| 66 | DEFINE(PLL_DP_CTL, offsetof(struct dpll, dp_ctl)); |
| 67 | DEFINE(PLL_DP_CONFIG, offsetof(struct dpll, dp_config)); |
| 68 | DEFINE(PLL_DP_OP, offsetof(struct dpll, dp_op)); |
| 69 | DEFINE(PLL_DP_MFD, offsetof(struct dpll, dp_mfd)); |
| 70 | DEFINE(PLL_DP_MFN, offsetof(struct dpll, dp_mfn)); |
| 71 | DEFINE(PLL_DP_HFS_OP, offsetof(struct dpll, dp_hfs_op)); |
| 72 | DEFINE(PLL_DP_HFS_MFD, offsetof(struct dpll, dp_hfs_mfd)); |
| 73 | DEFINE(PLL_DP_HFS_MFN, offsetof(struct dpll, dp_hfs_mfn)); |
| 74 | |
| 75 | return 0; |
| 76 | } |