Commit 5b53ff05c9acf8d6a978e9bf156d9e1ba0f286b3

Add extra bank support to board-htcdiamond

Add extra bank support to board-htcdiamond. Only
useful for DIAM500.
  
6161static int halibut_ffa;
6262module_param_named(ffa, halibut_ffa, int, S_IRUGO | S_IWUSR | S_IWGRP);
6363
64static int banks=1;
65module_param(banks, int, S_IRUGO | S_IWUSR | S_IWGRP);
6664static int adb=1;
6765module_param(adb, int, S_IRUGO | S_IWUSR | S_IWGRP);
6866
448448 msm_clock_init();
449449}
450450
451extern int use_extra_bank; /* From pmem.c */
451452static void __init htcdiamond_fixup(struct machine_desc *desc, struct tag *tags,
452453 char **cmdline, struct meminfo *mi)
453454{
456456 mi->bank[0].start = PAGE_ALIGN(PHYS_OFFSET);
457457 mi->bank[0].node = PHYS_TO_NID(mi->bank[0].start);
458458 mi->bank[0].size = (107 * 1024 * 1024); // Why 107? See board-htcdiamond.h
459 /* TODO: detect whether a 2nd memory bank is actually present, not all devices have it */
460 // for now use a kernel parameter
461 if(banks==2) {
459 if(use_extra_bank) {
462460 mi->nr_banks++;
463461 mi->bank[1].start = PAGE_ALIGN(PHYS_OFFSET + 0x10000000);
464462 mi->bank[1].node = PHYS_TO_NID(mi->bank[1].start);
465 mi->bank[1].size = (128 * 1024 * 1024);
463 mi->bank[1].size = 128*1024*1024-(51*1024*1024);
466464 }
467465 printk(KERN_INFO "fixup: nr_banks = %d\n", mi->nr_banks);
468466 printk(KERN_INFO "fixup: bank0 start=%08lx, node=%08x, size=%08lx\n", mi->bank[0].start, mi->bank[0].node, mi->bank[0].size);