Stepan Moskovchenko | 7b18144 | 2010-10-14 19:19:21 -0700 | [diff] [blame] | 1 | /* 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 Moskovchenko | 7b18144 | 2010-10-14 19:19:21 -0700 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <linux/module.h> |
| 14 | #include <linux/slab.h> |
| 15 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 16 | #include <mach/scm.h> |
Stepan Moskovchenko | 7b18144 | 2010-10-14 19:19:21 -0700 | [diff] [blame] | 17 | #include "scm-boot.h" |
| 18 | |
| 19 | /* |
| 20 | * Set the cold/warm boot address for one of the CPU cores. |
| 21 | */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 22 | int scm_set_boot_addr(void *addr, int flags) |
Stepan Moskovchenko | 7b18144 | 2010-10-14 19:19:21 -0700 | [diff] [blame] | 23 | { |
| 24 | struct { |
| 25 | unsigned int flags; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 26 | void *addr; |
Stepan Moskovchenko | 7b18144 | 2010-10-14 19:19:21 -0700 | [diff] [blame] | 27 | } 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 | } |
| 34 | EXPORT_SYMBOL(scm_set_boot_addr); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 35 | |