blob: e377633255dac878c9c1f8b0028e3de29bdea99b [file] [log] [blame]
Stepan Moskovchenko7b181442010-10-14 19:19:21 -07001/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
Stepan Moskovchenko7b181442010-10-14 19:19:21 -070011 */
12
13#include <linux/module.h>
14#include <linux/slab.h>
15
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070016#include <mach/scm.h>
Stepan Moskovchenko7b181442010-10-14 19:19:21 -070017#include "scm-boot.h"
18
19/*
20 * Set the cold/warm boot address for one of the CPU cores.
21 */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070022int scm_set_boot_addr(void *addr, int flags)
Stepan Moskovchenko7b181442010-10-14 19:19:21 -070023{
24 struct {
25 unsigned int flags;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026 void *addr;
Stepan Moskovchenko7b181442010-10-14 19:19:21 -070027 } cmd;
28
29 cmd.addr = addr;
30 cmd.flags = flags;
31 return scm_call(SCM_SVC_BOOT, SCM_BOOT_ADDR,
32 &cmd, sizeof(cmd), NULL, 0);
33}
34EXPORT_SYMBOL(scm_set_boot_addr);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070035