blob: 05de50c26993b0da8956ff9693b6f0f3900fcc45 [file] [log] [blame]
Will Robertson383a32a2007-12-23 03:47:28 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Will Robertson
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
Will Robertson383a32a2007-12-23 03:47:28 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
Will Robertson590501c2007-09-21 15:51:53 +000021#include "cpu.h"
Will Robertson383a32a2007-12-23 03:47:28 +000022#include "mmu-imx31.h"
23#include "mmu-arm.h"
Will Robertson590501c2007-09-21 15:51:53 +000024
25void memory_init(void) {
Michael Sevakis1f021af2008-02-05 04:43:19 +000026#if 0
Will Robertson383a32a2007-12-23 03:47:28 +000027 ttb_init();
Will Robertson590501c2007-09-21 15:51:53 +000028 set_page_tables();
29 enable_mmu();
Michael Sevakis1f021af2008-02-05 04:43:19 +000030#endif
Will Robertson590501c2007-09-21 15:51:53 +000031}
32
Will Robertson590501c2007-09-21 15:51:53 +000033void set_page_tables() {
Michael Sevakis1f021af2008-02-05 04:43:19 +000034#if 0
Will Robertson590501c2007-09-21 15:51:53 +000035 map_section(0, 0, 0x1000, CACHE_NONE); /* map every memory region to itself */
Will Robertson383a32a2007-12-23 03:47:28 +000036 /*This pa *might* change*/
Will Robertson590501c2007-09-21 15:51:53 +000037 map_section(0x80000000, 0, 64, CACHE_ALL); /* map RAM to 0 and enable caching for it */
38 map_section((int)FRAME1, (int)FRAME1, 1, BUFFERED); /* enable buffered writing for the framebuffer */
Will Robertson383a32a2007-12-23 03:47:28 +000039 map_section((int)FRAME2, (int)FRAME2, 1, BUFFERED);
Michael Sevakis1f021af2008-02-05 04:43:19 +000040#endif
Will Robertson590501c2007-09-21 15:51:53 +000041}
42