blob: c3b3c765ae4151264df9b047972596b36bb62fd5 [file] [log] [blame]
Shashank Mittal23b8f422010-04-16 19:27:21 -07001/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are met:
5 * * Redistributions of source code must retain the above copyright
6 * notice, this list of conditions and the following disclaimer.
7 * * Redistributions in binary form must reproduce the above copyright
8 * notice, this list of conditions and the following disclaimer in the
9 * documentation and/or other materials provided with the distribution.
10 * * Neither the name of Code Aurora nor
11 * the names of its contributors may be used to endorse or promote
12 * products derived from this software without specific prior written
13 * permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 */
28
29#include <reg.h>
30#include <debug.h>
31#include <smem.h>
32
Ajay Dudanib3af4172010-05-26 18:47:17 -070033#define EBI1_SIZE1 0x02D00000 // 45M
34#define EBI1_ADDR1 0x40200000
35
36#define EBI1_SIZE2 0x08000000 // 128M
37#define EBI1_ADDR2 0x48000000
Shashank Mittal23b8f422010-04-16 19:27:21 -070038
39unsigned* target_atag_mem(unsigned* ptr)
40{
Shashank Mittal23b8f422010-04-16 19:27:21 -070041 /* ATAG_MEM */
Shashank Mittal23b8f422010-04-16 19:27:21 -070042 *ptr++ = 4;
43 *ptr++ = 0x54410002;
Ajay Dudanib3af4172010-05-26 18:47:17 -070044 *ptr++ = EBI1_SIZE1;
45 *ptr++ = EBI1_ADDR1;
46
47 *ptr++ = 4;
48 *ptr++ = 0x54410002;
49 *ptr++ = EBI1_SIZE2;
50 *ptr++ = EBI1_ADDR2;
Shashank Mittal23b8f422010-04-16 19:27:21 -070051 return ptr;
52}
53
54void *target_get_scratch_address(void)
55{
56 return ((void *)SCRATCH_ADDR);
57}