source: rtems/bsps/powerpc/mpc55xxevb/start/siu.c @ 762fa62

5
Last change on this file since 762fa62 was dc1ea01, checked in by Sebastian Huber <sebastian.huber@…>, on 03/22/18 at 05:27:31

bsps/mpc55xx: Move libcpu content to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 917 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup mpc55xx
5 *
6 * @brief System Integration Unit Access (SIU).
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.org/license/LICENSE.
20 */
21
22#include <mpc55xx/regs.h>
23#include <mpc55xx/mpc55xx.h>
24#include <mpc55xx/siu.h>
25
26rtems_status_code mpc55xx_siu_pcr_init(volatile struct SIU_tag *siu,
27                                       const mpc55xx_siu_pcr_entry_t *pcr_entry)
28{
29  int idx,cnt;
30  /*
31   * repeat, until end of list reached (pcr_cnt = 0)
32   */
33  while ((pcr_entry != NULL) &&
34         (pcr_entry->pcr_cnt > 0)) {
35    idx = pcr_entry->pcr_idx;
36    for (cnt = pcr_entry->pcr_cnt;cnt > 0;cnt--) {
37      siu->PCR[idx++].R = pcr_entry->pcr_val.R;
38    }
39    pcr_entry++;
40  }
41  return RTEMS_SUCCESSFUL;
42}
Note: See TracBrowser for help on using the repository browser.