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

4.104.11
Last change on this file since 2f5435a4 was 2f5435a4, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on Mar 25, 2010 at 8:26:00 PM

add support for mpc551x based GW_LCFM system

  • Property mode set to 100644
File size: 914 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 found in the file
18 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
19 */
20
21#include <mpc55xx/regs.h>
22#include <mpc55xx/mpc55xx.h>
23#include <mpc55xx/siu.h>
24
25rtems_status_code mpc55xx_siu_pcr_init(volatile struct SIU_tag *siu,
26                                       const mpc55xx_siu_pcr_entry_t *pcr_entry)
27{
28  int idx,cnt;
29  /*
30   * repeat, until end of list reached (pcr_cnt = 0)
31   */
32  while ((pcr_entry != NULL) &&
33         (pcr_entry->pcr_cnt > 0)) {
34    idx = pcr_entry->pcr_idx;
35    for (cnt = pcr_entry->pcr_cnt;cnt > 0;cnt--) {
36      siu->PCR[idx++].R = pcr_entry->pcr_val.R;
37    }
38    pcr_entry++;
39  }
40  return RTEMS_SUCCESSFUL;
41}
Note: See TracBrowser for help on using the repository browser.