File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 20
20
#include <asm/mach-types.h>
21
21
#include <asm/mach/arch.h>
22
22
#include <asm/mach/time.h>
23
+ #include <asm/setup.h>
23
24
24
25
#include <linux/clk.h>
25
26
#include <linux/delay.h>
37
38
#include <mach/iomux-v3.h>
38
39
#include <mach/mx6.h>
39
40
41
+
40
42
#include "crm_regs.h"
41
43
#include "devices-imx6q.h"
42
44
#include "usb.h"
@@ -1201,20 +1203,16 @@ static struct sys_timer wand_timer = {
1201
1203
static void __init wand_reserve (void )
1202
1204
{
1203
1205
phys_addr_t phys ;
1206
+ struct meminfo * mi = & meminfo ;
1207
+ unsigned long total_mem = 0 ;
1208
+ int i ;
1204
1209
1205
1210
if (wand_gpu_pdata .reserved_mem_size ) {
1206
- if (cpu_is_mx6q ())
1207
- phys = memblock_alloc_base (
1208
- wand_gpu_pdata .reserved_mem_size ,
1209
- SZ_4K , SZ_2G );
1210
- else if (cpu_is_mx6dl ())
1211
- phys = memblock_alloc_base (
1212
- wand_gpu_pdata .reserved_mem_size ,
1213
- SZ_4K , SZ_1G );
1214
- else
1215
- phys = memblock_alloc_base (
1211
+ for (i = 0 ; i < mi -> nr_banks ; i ++ )
1212
+ total_mem += mi -> bank [i ].size ;
1213
+ phys = memblock_alloc_base (
1216
1214
wand_gpu_pdata .reserved_mem_size ,
1217
- SZ_4K , SZ_512M );
1215
+ SZ_4K , total_mem );
1218
1216
memblock_remove (phys , wand_gpu_pdata .reserved_mem_size );
1219
1217
wand_gpu_pdata .reserved_mem_base = phys ;
1220
1218
}
You can’t perform that action at this time.
0 commit comments