Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -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. |
| 11 | */ |
| 12 | #ifndef __MACH_PERIPHERAL_LOADER_H |
| 13 | #define __MACH_PERIPHERAL_LOADER_H |
| 14 | |
| 15 | #include <linux/list.h> |
| 16 | #include <linux/mutex.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | |
| 19 | struct pil_reset_ops { |
| 20 | int (*init_image)(const u8 *metadata, size_t size); |
| 21 | int (*verify_blob)(u32 phy_addr, size_t size); |
| 22 | int (*auth_and_reset)(void); |
| 23 | int (*shutdown)(void); |
| 24 | }; |
| 25 | |
| 26 | struct pil_device { |
| 27 | const char *name; |
| 28 | const char *depends_on; |
| 29 | int count; |
| 30 | struct mutex lock; |
| 31 | struct platform_device pdev; |
| 32 | struct list_head list; |
| 33 | struct pil_reset_ops *ops; |
| 34 | }; |
| 35 | |
| 36 | extern int msm_pil_add_device(struct pil_device *pil); |
| 37 | |
| 38 | #endif |