apx4devkit.c (9c471142bc6c5aa01532ba85ead8509bbf2eb153) | apx4devkit.c (fa7a51cb8272bd6076ea4701fd6bdc65a68703ba) |
---|---|
1/* 2 * Bluegiga APX4 Development Kit 3 * 4 * Copyright (C) 2012 Bluegiga Technologies Oy 5 * 6 * Authors: 7 * Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> 8 * Lauri Hintsala <lauri.hintsala@bluegiga.com> --- 116 unchanged lines hidden (view full) --- 125 struct mxs_ocotp_regs *ocotp_regs = 126 (struct mxs_ocotp_regs *)MXS_OCOTP_BASE; 127 128 serialnr->high = 0; 129 serialnr->low = 0; 130 131 writel(OCOTP_CTRL_RD_BANK_OPEN, &ocotp_regs->hw_ocotp_ctrl_set); 132 | 1/* 2 * Bluegiga APX4 Development Kit 3 * 4 * Copyright (C) 2012 Bluegiga Technologies Oy 5 * 6 * Authors: 7 * Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> 8 * Lauri Hintsala <lauri.hintsala@bluegiga.com> --- 116 unchanged lines hidden (view full) --- 125 struct mxs_ocotp_regs *ocotp_regs = 126 (struct mxs_ocotp_regs *)MXS_OCOTP_BASE; 127 128 serialnr->high = 0; 129 serialnr->low = 0; 130 131 writel(OCOTP_CTRL_RD_BANK_OPEN, &ocotp_regs->hw_ocotp_ctrl_set); 132 |
133 if (mx28_wait_mask_clr(&ocotp_regs->hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, | 133 if (mxs_wait_mask_clr(&ocotp_regs->hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, |
134 MXS_OCOTP_MAX_TIMEOUT)) { 135 printf("MXS: Can't get serial number from OCOTP\n"); 136 return; 137 } 138 139 serialnr->low = readl(&ocotp_regs->hw_ocotp_cust3); 140} 141#endif 142 143#ifdef CONFIG_REVISION_TAG 144u32 get_board_rev(void) 145{ 146 if (getenv("revision#") != NULL) 147 return simple_strtoul(getenv("revision#"), NULL, 10); 148 return 0; 149} 150#endif | 134 MXS_OCOTP_MAX_TIMEOUT)) { 135 printf("MXS: Can't get serial number from OCOTP\n"); 136 return; 137 } 138 139 serialnr->low = readl(&ocotp_regs->hw_ocotp_cust3); 140} 141#endif 142 143#ifdef CONFIG_REVISION_TAG 144u32 get_board_rev(void) 145{ 146 if (getenv("revision#") != NULL) 147 return simple_strtoul(getenv("revision#"), NULL, 10); 148 return 0; 149} 150#endif |