blob: cc00446751866499188a56ffaee6b825a7da40f6 [file] [log] [blame]
Stephen Boyd6d67d252011-09-27 11:50:05 -07001/* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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 */
Stephen Boyde4174b22011-09-20 00:19:43 -070012#ifndef __MSM_PERIPHERAL_LOADER_H
13#define __MSM_PERIPHERAL_LOADER_H
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070014
Stephen Boyd3f4da322011-08-30 01:03:23 -070015struct device;
Stephen Boyd6d67d252011-09-27 11:50:05 -070016struct module;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070017
Stephen Boyd3f4da322011-08-30 01:03:23 -070018struct pil_desc {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019 const char *name;
20 const char *depends_on;
Stephen Boyd3f4da322011-08-30 01:03:23 -070021 struct device *dev;
22 const struct pil_reset_ops *ops;
Stephen Boyd6d67d252011-09-27 11:50:05 -070023 struct module *owner;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070024};
25
Stephen Boyd5bd999a2011-08-02 18:50:57 -070026struct pil_reset_ops {
Stephen Boyd3f4da322011-08-30 01:03:23 -070027 int (*init_image)(struct pil_desc *pil, const u8 *metadata,
Stephen Boyd5bd999a2011-08-02 18:50:57 -070028 size_t size);
Stephen Boyd3f4da322011-08-30 01:03:23 -070029 int (*verify_blob)(struct pil_desc *pil, u32 phy_addr, size_t size);
30 int (*auth_and_reset)(struct pil_desc *pil);
31 int (*shutdown)(struct pil_desc *pil);
Stephen Boyd5bd999a2011-08-02 18:50:57 -070032};
33
Stephen Boyd6d67d252011-09-27 11:50:05 -070034struct pil_device;
35
36extern struct pil_device *msm_pil_register(struct pil_desc *desc);
37extern void msm_pil_unregister(struct pil_device *pil);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070038
39#endif