source: rtems/c/src/lib/libcpu/bfin/mmu/mmu.c @ 30abd24

4.104.114.95
Last change on this file since 30abd24 was 30abd24, checked in by Joel Sherrill <joel.sherrill@…>, on 08/15/08 at 20:18:41

2008-08-15 Allan Hessenflow <allanh@…>

  • ChangeLog?, Makefile.am, README, configure.ac, preinstall.am, cache/cache.c, cache/cache_.h, clock/clock.c, clock/rtc.c, clock/tod.h, include/bf533.h, include/bf537.h, include/cecRegs.h, include/coreTimerRegs.h, include/dmaRegs.h, include/ebiuRegs.h, include/ethernetRegs.h, include/gpioRegs.h, include/memoryRegs.h, include/mmuRegs.h, include/ppiRegs.h, include/rtcRegs.h, include/sicRegs.h, include/spiRegs.h, include/sportRegs.h, include/timerRegs.h, include/twiRegs.h, include/uartRegs.h, include/wdogRegs.h, interrupt/interrupt.c, interrupt/interrupt.h, mmu/mmu.c, mmu/mmu.h, network/ethernet.c, network/ethernet.h, serial/spi.c, serial/spi.h, serial/sport.c, serial/sport.h, serial/twi.c, serial/twi.h, serial/uart.c, serial/uart.h, timer/timer.c: New files.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*  Blackfin MMU Support
2 *
3 *  Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA
4 *             written by Allan Hessenflow <allanh@kallisti.com>
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12 
13
14#include <rtems.h>
15
16#include "mmu.h"
17
18
19/* NOTE: see notes in mmu.h */
20
21void bfin_mmu_init(bfin_mmu_config_t *config) {
22  intptr_t addr;
23  intptr_t data;
24  int i;
25
26  addr = (intptr_t) ICPLB_ADDR0;
27  data = (intptr_t) ICPLB_DATA0;
28  for (i = 0; i < sizeof(config->instruction) / sizeof(config->instruction[0]);
29       i++) {
30    *(uint32_t volatile *) addr = (uint32_t) config->instruction[i].address;
31    addr += ICPLB_ADDR_PITCH;
32    *(uint32_t volatile *) data = config->instruction[i].flags;
33    data += ICPLB_DATA_PITCH;
34  }
35  addr = (intptr_t) DCPLB_ADDR0;
36  data = (intptr_t) DCPLB_DATA0;
37  for (i = 0; i < sizeof(config->data) / sizeof(config->data[0]); i++) {
38    *(uint32_t volatile *) addr = (uint32_t) config->data[i].address;
39    addr += DCPLB_ADDR_PITCH;
40    *(uint32_t volatile *) data = config->data[i].flags;
41    data += DCPLB_DATA_PITCH;
42  }
43}
44
Note: See TracBrowser for help on using the repository browser.