Duy Truong | f3ac7b3 | 2013-02-13 01:07:28 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2009-2010, The Linux Foundation. All rights reserved. |
Ajay Dudani | 513fb74 | 2010-05-24 20:39:26 -0700 | [diff] [blame] | 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. |
Duy Truong | f3ac7b3 | 2013-02-13 01:07:28 -0800 | [diff] [blame] | 10 | * * Neither the name of The Linux Foundation nor |
Ajay Dudani | 513fb74 | 2010-05-24 20:39:26 -0700 | [diff] [blame] | 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 | |
| 31 | #define EBI1_SIZE1 0x0E000000 //224M |
| 32 | #define EBI1_ADDR1 0x00000000 |
| 33 | |
| 34 | #define EBI1_SIZE2 0x30000000 //768M |
| 35 | #define EBI1_ADDR2 0x10000000 |
| 36 | |
| 37 | |
| 38 | unsigned* target_atag_mem(unsigned* ptr) |
| 39 | { |
| 40 | unsigned size; |
| 41 | |
| 42 | /* ATAG_MEM */ |
| 43 | /* 1st segment */ |
| 44 | *ptr++ = 4; |
| 45 | *ptr++ = 0x54410002; |
| 46 | *ptr++ = EBI1_SIZE1; |
| 47 | *ptr++ = EBI1_ADDR1; |
| 48 | |
| 49 | /* 2nd segment */ |
| 50 | *ptr++ = 4; |
| 51 | *ptr++ = 0x54410002; |
| 52 | *ptr++ = EBI1_SIZE2; |
| 53 | *ptr++ = EBI1_ADDR2; |
| 54 | |
| 55 | return ptr; |
| 56 | } |