aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-07-31 08:40:14 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-08-01 06:04:41 -0400
commit23f1751c5fef5c33e6a58ed2448774aeae436a39 (patch)
tree71b6e82d7c14b397f40d37997b4953cd73c44777 /arch
parentf79d68da510bf1b95beff4d556b78d06801f11dc (diff)
ARM: shmobile: ape6evm: add "__initconst" annotations where needed
This patch adds __initconst markers to the platform data and resources, used on ape6evm as parameters to platform_device_register_resndata(). The data is duplicated inside that function, therefore original data can be discarded after initialisation is completed. Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index ccf8b0429083..c5e6cba8f7b0 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -44,7 +44,7 @@ static struct regulator_consumer_supply dummy_supplies[] = {
44}; 44};
45 45
46/* SMSC LAN9220 */ 46/* SMSC LAN9220 */
47static const struct resource lan9220_res[] = { 47static const struct resource lan9220_res[] __initconst = {
48 DEFINE_RES_MEM(0x08000000, 0x1000), 48 DEFINE_RES_MEM(0x08000000, 0x1000),
49 { 49 {
50 .start = irq_pin(40), /* IRQ40 */ 50 .start = irq_pin(40), /* IRQ40 */
@@ -52,7 +52,7 @@ static const struct resource lan9220_res[] = {
52 }, 52 },
53}; 53};
54 54
55static const struct smsc911x_platform_config lan9220_data = { 55static const struct smsc911x_platform_config lan9220_data __initconst = {
56 .flags = SMSC911X_USE_32BIT, 56 .flags = SMSC911X_USE_32BIT,
57 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 57 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
58 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, 58 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
@@ -73,39 +73,39 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] =
73}; 73};
74 74
75/* MMCIF */ 75/* MMCIF */
76static struct sh_mmcif_plat_data mmcif0_pdata = { 76static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = {
77 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, 77 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
78}; 78};
79 79
80static struct resource mmcif0_resources[] = { 80static const struct resource mmcif0_resources[] __initconst = {
81 DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), 81 DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"),
82 DEFINE_RES_IRQ(gic_spi(169)), 82 DEFINE_RES_IRQ(gic_spi(169)),
83}; 83};
84 84
85/* SDHI0 */ 85/* SDHI0 */
86static struct sh_mobile_sdhi_info sdhi0_pdata = { 86static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = {
87 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, 87 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
88 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, 88 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
89}; 89};
90 90
91static struct resource sdhi0_resources[] = { 91static const struct resource sdhi0_resources[] __initconst = {
92 DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), 92 DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"),
93 DEFINE_RES_IRQ(gic_spi(165)), 93 DEFINE_RES_IRQ(gic_spi(165)),
94}; 94};
95 95
96/* SDHI1 */ 96/* SDHI1 */
97static struct sh_mobile_sdhi_info sdhi1_pdata = { 97static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = {
98 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, 98 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
99 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 99 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
100 MMC_CAP_NEEDS_POLL, 100 MMC_CAP_NEEDS_POLL,
101}; 101};
102 102
103static struct resource sdhi1_resources[] = { 103static const struct resource sdhi1_resources[] __initconst = {
104 DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), 104 DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"),
105 DEFINE_RES_IRQ(gic_spi(166)), 105 DEFINE_RES_IRQ(gic_spi(166)),
106}; 106};
107 107
108static const struct pinctrl_map ape6evm_pinctrl_map[] = { 108static const struct pinctrl_map ape6evm_pinctrl_map[] __initconst = {
109 /* SCIFA0 console */ 109 /* SCIFA0 console */
110 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4", 110 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4",
111 "scifa0_data", "scifa0"), 111 "scifa0_data", "scifa0"),