Stephen Boyd | 5bd999a | 2011-08-02 18:50:57 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 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 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 19 | struct pil_device { |
| 20 | const char *name; |
| 21 | const char *depends_on; |
| 22 | int count; |
| 23 | struct mutex lock; |
| 24 | struct platform_device pdev; |
| 25 | struct list_head list; |
| 26 | struct pil_reset_ops *ops; |
| 27 | }; |
| 28 | |
Stephen Boyd | 5bd999a | 2011-08-02 18:50:57 -0700 | [diff] [blame^] | 29 | struct pil_reset_ops { |
| 30 | int (*init_image)(struct pil_device *pil, const u8 *metadata, |
| 31 | size_t size); |
| 32 | int (*verify_blob)(struct pil_device *pil, u32 phy_addr, size_t size); |
| 33 | int (*auth_and_reset)(struct pil_device *pil); |
| 34 | int (*shutdown)(struct pil_device *pil); |
| 35 | }; |
| 36 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 37 | extern int msm_pil_add_device(struct pil_device *pil); |
| 38 | |
| 39 | #endif |