aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/mloader-db8500.c
blob: 6171a9db82f2832a3f117051b11cc75cf39b90f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
 * Copyright (C) 2011 ST-Ericsson
 *
 * Author: Maxime Coquelin <maxime.coquelin-nonst@stericsson.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2, as
 * published by the Free Software Foundation.
 *
 */
#include <linux/types.h>
#include <linux/platform_device.h>

#include <mach/mloader-dbx500.h>

static struct dbx500_ml_area modem_areas[] = {
	{ .name = "modem_trace", .start = 0x6000000, .size = 0xf00000 },
	{ .name = "modem_shared", .start = 0x6f00000, .size = 0x100000 },
	{ .name = "modem_priv", .start = 0x7000000, .size = 0x1000000 },
};

static struct dbx500_ml_fw modem_fws[] = {
	{ .name = "MODEM", .area = &modem_areas[0], .offset = 0x0 },
	{ .name = "IPL", .area = &modem_areas[1], .offset = 0x00 },
};

static struct dbx500_mloader_pdata mloader_fw_data = {
	.fws = modem_fws,
	.nr_fws = ARRAY_SIZE(modem_fws),
	.areas = modem_areas,
	.nr_areas = ARRAY_SIZE(modem_areas),
};

struct platform_device mloader_fw_device = {
	.name = "dbx500_mloader_fw",
	.id = -1,
	.dev = {
		.platform_data	= &mloader_fw_data,
	},
	.num_resources = 0,
};

/* Default areas can be overloaded in cmdline */
static int __init early_modem_priv(char *p)
{
	struct dbx500_ml_area *area = &modem_areas[2];

	area->size = memparse(p, &p);

	if (*p == '@')
		area->start = memparse(p + 1, &p);

	return 0;
}
early_param("mem_modem", early_modem_priv);

static int __init early_modem_shared(char *p)
{
	struct dbx500_ml_area *area = &modem_areas[1];

	area->size = memparse(p, &p);

	if (*p == '@')
		area->start = memparse(p + 1, &p);

	return 0;
}
early_param("mem_mshared", early_modem_shared);

static int __init early_modem_trace(char *p)
{
	struct dbx500_ml_area *area = &modem_areas[0];

	area->size = memparse(p, &p);

	if (*p == '@')
		area->start = memparse(p + 1, &p);

	return 0;
}
early_param("mem_mtrace", early_modem_trace);