Beispiel #1
0
static void __init bahamas_fixup(struct machine_desc *desc, struct tag *tags,
                               char **cmdline, struct meminfo *mi)
{
	/*CC090319*/

	hwid = 0;
	skuid = 0;
	engineerid = (0x01 << 1);

	hwid = parse_tag_hwid((const struct tag *)tags);
	printk("bahamas_fixup:hwid=0x%x\n", hwid);
	skuid = parse_tag_skuid((const struct tag *)tags);
	printk("bahamas_fixup:skuid=0x%x\n", skuid);
	engineerid = parse_tag_engineerid((const struct tag *)tags);
	printk("bahamas_fixup:engineerid=0x%x\n", engineerid);
	parse_tag_monodie((const struct tag *)tags);
	/*~CC090319*/

	if (board_mcp_monodie()) {
		mi->nr_banks=1;
		mi->bank[0].start = MSM_LINUX_BASE1;
		mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE1);
		mi->bank[0].size = MSM_LINUX_SIZE1+MSM_LINUX_SIZE2;
	}
	else {
		mi->nr_banks=2;
		mi->bank[0].start = MSM_LINUX_BASE1;
		mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE1);
		mi->bank[0].size = MSM_LINUX_SIZE1;
		mi->bank[1].start = MSM_LINUX_BASE2_DUALDIE;
		mi->bank[1].node = PHYS_TO_NID(MSM_LINUX_BASE2_DUALDIE);
		mi->bank[1].size = MSM_LINUX_SIZE2;
	}
}
Beispiel #2
0
static void __init bravo_fixup(struct machine_desc *desc, struct tag *tags,
				 char **cmdline, struct meminfo *mi)
{
	int bravo_system_rev = 0, find = 0;
	struct tag *t = (struct tag *)tags;

	for (; t->hdr.size; t = tag_next(t)) {
		if(t->hdr.tag == ATAG_REVISION) {
			find = 1;
			break;
		}
	}
	if (find)
		bravo_system_rev = t->u.revision.rev;

	mi->nr_banks = 2;
	mi->bank[0].start = MSM_EBI1_BANK0_BASE;
	mi->bank[0].node = PHYS_TO_NID(MSM_EBI1_BANK0_BASE);
	mi->bank[0].size = MSM_EBI1_BANK0_SIZE;
	mi->bank[1].start = MSM_EBI1_BANK1_BASE;
	mi->bank[1].node = PHYS_TO_NID(MSM_EBI1_BANK1_BASE);
	mi->bank[1].size = MSM_EBI1_BANK1_SIZE;
	if (bravo_system_rev >=2) {
		mi->bank[1].size = MSM_EBI1_BANK1_SIZE + MSM_MEM_128MB_OFFSET;
	}
}
static __init void m1_fixup(struct machine_desc *mach, struct tag *tag, char **cmdline, struct meminfo *m)
{
    struct membank *pbank;
    unsigned size;
    
    m->nr_banks = 0;
    pbank=&m->bank[m->nr_banks];
    pbank->start = PAGE_ALIGN(PHYS_MEM_START);
    pbank->size  = SZ_64M & PAGE_MASK;
    pbank->node  = PHYS_TO_NID(PHYS_MEM_START);
    m->nr_banks++;    
    pbank=&m->bank[m->nr_banks];
    pbank->start = PAGE_ALIGN(RESERVED_MEM_END+1);
   size = PHYS_MEM_END-RESERVED_MEM_END;
#ifdef CONFIG_AML_SUSPEND
    pbank->size  = (PHYS_MEM_END-RESERVED_MEM_END-SZ_1M) & PAGE_MASK;
#else
    pbank->size  = (PHYS_MEM_END-RESERVED_MEM_END) & PAGE_MASK;
#endif
// #ifdef CONFIG_ENCRYPT
#ifdef CONFIG_AM_IPTV_SECURITY
	size -= SZ_1M;
#endif
    pbank->size  = size & PAGE_MASK;

    pbank->node  = PHYS_TO_NID(RESERVED_MEM_END+1);
    m->nr_banks++;
}
Beispiel #4
0
static void __init bravo_fixup(struct machine_desc *desc, struct tag *tags,
				 char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 2;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size = MSM_EBI1_BANK0_SIZE;
	mi->bank[1].start = MSM_EBI1_BANK1_BASE;
	mi->bank[1].node = PHYS_TO_NID(MSM_EBI1_BANK1_BASE);
	mi->bank[1].size = MSM_EBI1_BANK1_SIZE;
}
Beispiel #5
0
static void __init tegra_harmony_fixup(struct machine_desc *desc,
	struct tag *tags, char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 2;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size = 448 * SZ_1M;
	mi->bank[1].start = SZ_512M;
	mi->bank[1].node = PHYS_TO_NID(SZ_512M);
	mi->bank[1].size = SZ_512M;
}
static void __init buzzc_fixup(struct machine_desc *desc, struct tag *tags,
				char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 2;
	mi->bank[0].start = MSM_LINUX_BASE1;
	mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE1);
	mi->bank[0].size = MSM_LINUX_SIZE1;
	mi->bank[1].start = MSM_LINUX_BASE2;
	mi->bank[1].node = PHYS_TO_NID(MSM_LINUX_BASE2);
	mi->bank[1].size = MSM_LINUX_SIZE2;
}
Beispiel #7
0
static void __init mahimahi_fixup(struct machine_desc *desc, struct tag *tags,
				 char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 2;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size = (219*1024*1024);
	mi->bank[1].start = MSM_HIGHMEM_BASE;
	mi->bank[1].node = PHYS_TO_NID(MSM_HIGHMEM_BASE);
	mi->bank[1].size = MSM_HIGHMEM_SIZE;
}
Beispiel #8
0
static void __init omnia_II_fixup(struct machine_desc *desc,
		struct tag *tags, char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 2;
	mi->bank[0].start = UL(0x50000000);//PHYS_OFFSET;
	mi->bank[0].size = (128 * 1024 * 1024); 
	mi->bank[0].node = PHYS_TO_NID(0x50000000);
	mi->bank[1].start = UL(0x60000000);
	mi->bank[1].size = PHYS_UNRESERVED_SIZE;
//	mi->bank[1].size = (80 * 1024 * 1024);
	mi->bank[1].node = PHYS_TO_NID(0x60000000);
}
static __init void m1_fixup(struct machine_desc *mach, struct tag *tag, char **cmdline, struct meminfo *m)
{
	struct membank *pbank;
	m->nr_banks = 0;
	pbank=&m->bank[m->nr_banks];
	pbank->start = PAGE_ALIGN(PHYS_MEM_START);
	pbank->size  = SZ_64M & PAGE_MASK;
	pbank->node  = PHYS_TO_NID(PHYS_MEM_START);
	m->nr_banks++;
	pbank=&m->bank[m->nr_banks];
	pbank->start = PAGE_ALIGN(RESERVED_MEM_END+1);
	pbank->size  = (PHYS_MEM_END-RESERVED_MEM_END) & PAGE_MASK;
	pbank->node  = PHYS_TO_NID(RESERVED_MEM_END+1);
	m->nr_banks++;
}
Beispiel #10
0
/*
 * Initial parsing of the command line.  We need to pick out the
 * memory size.  We look for mem=size@start, where start and size
 * are "size[KkMm]"
 */
static void __init
parse_cmdline(struct meminfo *mi, char **cmdline_p, char *from)
{
	char c = ' ', *to = command_line;
	int usermem = 0, len = 0;

	for (;;) {
		if (c == ' ' && !memcmp(from, "mem=", 4)) {
			unsigned long size, start;

			if (to != command_line)
				to -= 1;

			/*
			 * If the user specifies memory size, we
			 * blow away any automatically generated
			 * size.
			 */
			if (usermem == 0) {
				usermem = 1;
				mi->nr_banks = 0;
			}

			start = PHYS_OFFSET;
			size  = memparse(from + 4, &from);
			if (*from == '@')
				start = memparse(from + 1, &from);

			mi->bank[mi->nr_banks].start = start;
			mi->bank[mi->nr_banks].size  = size;
			mi->bank[mi->nr_banks].node  = PHYS_TO_NID(start);
			mi->nr_banks += 1;
		} else if (c == ' ' && !memcmp(from, "initrd=", 7)) {
			unsigned long start, size;

			/*
			 * Remove space character
			 */
			if (to != command_line)
				to -= 1;

			start = memparse(from + 7, &from);
			if (*from == ',') {
				size = memparse(from + 1, &from);

				phys_initrd_start = start;
				phys_initrd_size = size;
			}
		}
		c = *from++;
		if (!c)
			break;
		if (COMMAND_LINE_SIZE <= ++len)
			break;
		*to++ = c;
	}
	*to = '\0';
	*cmdline_p = command_line;
}
Beispiel #11
0
static void __init trout_fixup(struct machine_desc *desc, struct tag *tags,
				char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size = (101*1024*1024);
}
static void __init photon_fixup(struct machine_desc *desc, struct tag *tags,
                               char **cmdline, struct meminfo *mi)
{
	mi->nr_banks=1;
	mi->bank[0].start = MSM_PHOTON_LINUX1_BASE;
	mi->bank[0].node = PHYS_TO_NID(mi->bank[0].start);
	mi->bank[0].size = MSM_PHOTON_LINUX1_SIZE;

	mi->nr_banks++;
	mi->bank[1].start = MSM_PHOTON_LINUX2_BASE;
	mi->bank[1].node = PHYS_TO_NID(mi->bank[1].start);
	mi->bank[1].size = MSM_PHOTON_LINUX2_SIZE;

printk(KERN_INFO "fixup: nr_banks = %d\n", mi->nr_banks);
printk(KERN_INFO "fixup: bank0 start=%08lx, node=%08x, size=%08lx\n", mi->bank[0].start, mi->bank[0].node, mi->bank[0].size);
printk(KERN_INFO "fixup: bank1 start=%08lx, node=%08x, size=%08lx\n", mi->bank[1].start, mi->bank[1].node, mi->bank[1].size);
}
Beispiel #13
0
static void __init lpc2468_ea_fixup(struct machine_desc *desc,
		struct tag *tags, char **cmdline, struct meminfo *mi)
{
	mi->nr_banks=1;
	mi->bank[0].start = CONFIG_DRAM_BASE;
	mi->bank[0].size = CONFIG_DRAM_SIZE;
	mi->bank[0].node = PHYS_TO_NID(mi->bank[0].start);
}
static void __init marvelc_fixup(struct machine_desc *desc, struct tag *tags,
                               char **cmdline, struct meminfo *mi)
{
	mi->nr_banks=1;
	mi->bank[0].start = MSM_LINUX_BASE;
	mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE);
	mi->bank[0].size = MSM_LINUX_SIZE;
}
static void __init supersonic_fixup(struct machine_desc *desc, struct tag *tags,
				 char **cmdline, struct meminfo *mi)
{
	skuid = parse_tag_skuid((const struct tag *)tags);
	printk(KERN_INFO "supersonic_fixup:skuid=0x%x\n", skuid);
	/* First Bank 256MB */
	mi->nr_banks = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size = MSM_EBI1_BANK0_SIZE;	/*(219*1024*1024);*/

	/* Second Bank 128MB */
	mi->nr_banks++;
	mi->bank[1].start = MSM_EBI1_BANK1_BASE;
	mi->bank[1].node = PHYS_TO_NID(MSM_EBI1_BANK1_BASE);
	mi->bank[1].size = MSM_EBI1_BANK1_SIZE;
}
static void __init desirec_fixup(struct machine_desc *desc, struct tag *tags,
                                 char **cmdline, struct meminfo *mi)
{
    parse_tag_monodie((const struct tag *)tags);

    mi->nr_banks = 1;
    mi->bank[0].start = MSM_LINUX_BASE1;
    mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE1);
    if (board_mcp_monodie()) {
        mi->bank[0].size = MSM_LINUX_SIZE1 + MSM_LINUX_SIZE2;
    } else {
        mi->nr_banks = 2;
        mi->bank[0].size = MSM_LINUX_SIZE1;
        mi->bank[1].start = MSM_LINUX_BASE2;
        mi->bank[1].node = PHYS_TO_NID(MSM_LINUX_BASE2);
        mi->bank[1].size = MSM_LINUX_SIZE2;
    }
}
static void __init htcleo_fixup(struct machine_desc *desc, struct tag *tags,
				 char **cmdline, struct meminfo *mi)
{
	/* Blink the camera LED shortly to show that we're alive! */
	mi->nr_banks = 1;
	mi->bank[0].start = MSM_EBI1_BANK0_BASE;
	mi->bank[0].node = PHYS_TO_NID(MSM_EBI1_BANK0_BASE);
	mi->bank[0].size = MSM_EBI1_BANK0_SIZE;
}
static void __init icong_fixup(struct machine_desc *desc, struct tag *tags,
                               char **cmdline, struct meminfo *mi)
{
	engineerid = parse_tag_engineerid(tags);

	mi->nr_banks=1;
	mi->bank[0].start = MSM_LINUX_BASE;
	mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE);
	mi->bank[0].size = MSM_LINUX_SIZE;
}
static void __init bahamas_fixup(struct machine_desc *desc, struct tag *tags,
				char **cmdline, struct meminfo *mi)
{
	if (board_mcp_monodie()) {
		mi->nr_banks=1;
		mi->bank[0].start = MSM_LINUX_BASE1;
		mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE1);
		mi->bank[0].size = MSM_LINUX_SIZE1+MSM_LINUX_SIZE2;
	}
	else {
		mi->nr_banks=2;
		mi->bank[0].start = MSM_LINUX_BASE1;
		mi->bank[0].node = PHYS_TO_NID(MSM_LINUX_BASE1);
		mi->bank[0].size = MSM_LINUX_SIZE1;
		mi->bank[1].start = MSM_LINUX_BASE2_DUALDIE;
		mi->bank[1].node = PHYS_TO_NID(MSM_LINUX_BASE2_DUALDIE);
		mi->bank[1].size = MSM_LINUX_SIZE2;
	}
}
Beispiel #20
0
static void __init zeebo_fixup(struct machine_desc *desc,
		struct tag *tags, char **cmdline, struct meminfo *mi)
{
	mi->nr_banks = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size = (80 * 1024 * 1024);

	printk(KERN_INFO "%s: nr_banks = %d\n", __func__, mi->nr_banks);
	printk(KERN_INFO "%s: bank0 start=%08lx, node=%08x, size=%08lx\n", __func__,
		mi->bank[0].start, mi->bank[0].node, mi->bank[0].size);
}
static void __init hero_fixup(struct machine_desc *desc, struct tag *tags,
				  char **cmdline, struct meminfo *mi)
{
	mi->nr_banks		= 1;
	mi->bank[0].start	= PHYS_OFFSET;
	mi->bank[0].node	= PHYS_TO_NID(PHYS_OFFSET);
	mi->bank[0].size	= MSM_EBI_SMI32_256MB_SIZE;

	hwid		= parse_tag_hwid((const struct tag *)tags);
	skuid		= parse_tag_skuid((const struct tag *)tags);
	engineerid	= parse_tag_engineerid((const struct tag *)tags);

}
static void __init incrediblec_fixup(struct machine_desc *desc, struct tag *tags,
				 char **cmdline, struct meminfo *mi)
{
	engineerid = parse_tag_engineerid(tags);
	mi->nr_banks = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	if (0 == engineerid || 0xF == engineerid)
		mi->bank[0].size = (MSM_LINUX_XA_SIZE);
	else if (engineerid <= 2) { /* 4G3G */
		mi->bank[0].size = MSM_EBI1_BANK0_SIZE;
		mi->nr_banks++;
		mi->bank[1].start = MSM_EBI1_BANK1_BASE;
		mi->bank[1].node = PHYS_TO_NID(MSM_EBI1_BANK1_BASE);
		mi->bank[1].size = MSM_EBI1_BANK1_SIZE;
	} else {
		mi->bank[0].size = MSM_EBI1_BANK0_SIZE;
		mi->nr_banks++;
		mi->bank[1].start = MSM_EBI1_BANK1_BASE;
		mi->bank[1].node = PHYS_TO_NID(MSM_EBI1_BANK1_BASE);
		mi->bank[1].size = MSM_EBI1_BANK1_SIZE + MSM_MEM_128MB_OFFSET;
	}
}
Beispiel #23
0
static int __init parse_tag_mem32(const struct tag *tag)
{
	if (meminfo.nr_banks >= NR_BANKS) {
		printk(KERN_WARNING
		       "Ignoring memory bank 0x%08x size %dKB\n",
			tag->u.mem.start, tag->u.mem.size / 1024);
		return -EINVAL;
	}
	meminfo.bank[meminfo.nr_banks].start = tag->u.mem.start;
	meminfo.bank[meminfo.nr_banks].size  = tag->u.mem.size;
	meminfo.bank[meminfo.nr_banks].node  = PHYS_TO_NID(tag->u.mem.start);
	meminfo.nr_banks += 1;

	return 0;
}
static void __init sapphire_fixup(struct machine_desc *desc, struct tag *tags,
				  char **cmdline, struct meminfo *mi)
{
	int smi_sz = parse_tag_smi((const struct tag *)tags);

	mi->nr_banks = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
	if (smi_sz == 32) {
		mi->bank[0].size = (84*1024*1024);
	} else if (smi_sz == 64) {
		mi->bank[0].size = (101*1024*1024);
	} else {
		/* Give a default value when not get smi size */
		smi_sz = 64;
		mi->bank[0].size = (101*1024*1024);
	}
}
	&msm_device_uart_dm2,
	#endif
#endif
};

#ifdef CONFIG_ARCH_MSM8X60
static struct msm_mem_settings mem_settings[] = {
	/* First is default settings. */
	{
		.mem_size_mb = 768,
		.mem_info = {
			.nr_banks = 2,
			.bank = {
				[0] = {
					.start = 0x40400000,
					.node = PHYS_TO_NID(0x40400000),
					.size = 0x42E00000 - 0x40400000,
				},
				[1] = {
					.start = 0x48000000,
					.node = PHYS_TO_NID(0x48000000),
					.size = 0x70000000 - 0x48000000,
				}
			}
		}
	},
	{
		.mem_size_mb = 1024,
		.mem_info = {
			.nr_banks = 2,
			.bank = {