source: rtems/c/src/lib/libcpu/powerpc/mpc55xx/siu/siu.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 917 bytes
RevLine 
[2f5435a4]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 *
[0e27119]17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
[c499856]19 * http://www.rtems.org/license/LICENSE.
[2f5435a4]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.