source: rtems/c/src/lib/libbsp/arm/lpc32xx/misc/boot.c @ 3103d4cb

4.115
Last change on this file since 3103d4cb was 3103d4cb, checked in by Sebastian Huber <sebastian.huber@…>, on 06/23/10 at 08:27:57

2010-06-23 Sebastian Huber <sebastian.huber@…>

  • make/custom/lpc32xx_mzx_boot_int.cfg, startup/linkcmds.lpc32xx_mzx_boot_int: Removed files.
  • include/boot.h, include/emc.h, include/i2c.h, include/nand-mlc.h, make/custom/lpc32xx_mzx.cfg, make/custom/lpc32xx_mzx_stage_1.cfg, make/custom/lpc32xx_mzx_stage_2.cfg, misc/boot.c, misc/emc.c, misc/i2c.c, misc/nand-mlc.c, misc/nand-mlc-read-blocks.c, misc/nand-mlc-write-blocks.c, misc/restart.c, startup/linkcmds.lpc32xx, startup/linkcmds.lpc32xx_mzx, startup/linkcmds.lpc32xx_mzx_stage_1, startup/linkcmds.lpc32xx_mzx_stage_2: New files.
  • configure.ac, Makefile.am, preinstall.am: Reflect changes above.
  • include/bsp.h, include/lpc32xx.h, irq/irq.c, rtc/rtc-config.c, startup/bspstart.c, startup/bspstarthooks.c, startup/linkcmds.lpc32xx_phycore: Changes throughout.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup lpc32xx_boot
5 *
6 * @brief Boot support implementation.
7 */
8
9/*
10 * Copyright (c) 2010
11 * embedded brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * <rtems@embedded-brains.de>
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.com/license/LICENSE.
20 */
21
22#include <string.h>
23
24#include <bsp/boot.h>
25
26void lpc32xx_setup_boot_block(
27  lpc32xx_boot_block *boot_block,
28  uint8_t icr,
29  uint8_t page_count
30)
31{
32  memset(boot_block, 0, sizeof(*boot_block));
33
34  ++page_count;
35
36  boot_block->field.d0 = icr;
37  boot_block->field.d2 = icr;
38  boot_block->field.d4 = page_count;
39  boot_block->field.d6 = page_count;
40  boot_block->field.d8 = page_count;
41  boot_block->field.d10 = page_count;
42
43  icr = (uint8_t) ~((unsigned) icr);
44  page_count = (uint8_t) ~((unsigned) page_count);
45
46  boot_block->field.d1 = icr;
47  boot_block->field.d3 = icr;
48  boot_block->field.d5 = page_count;
49  boot_block->field.d7 = page_count;
50  boot_block->field.d9 = page_count;
51  boot_block->field.d11 = page_count;
52
53  boot_block->field.d12 = 0xaa;
54}
Note: See TracBrowser for help on using the repository browser.