blob: 3d4b4b2144b3daae6c23bdf5fd5845ee368513c5 [file] [log] [blame]
Stephen Boyd5bd999a2011-08-02 18:50:57 -07001/* Copyright (c) 2010-2011, 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;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070016
Stephen Boyd3f4da322011-08-30 01:03:23 -070017struct pil_desc {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070018 const char *name;
19 const char *depends_on;
Stephen Boyd3f4da322011-08-30 01:03:23 -070020 struct device *dev;
21 const struct pil_reset_ops *ops;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070022};
23
Stephen Boyd5bd999a2011-08-02 18:50:57 -070024struct pil_reset_ops {
Stephen Boyd3f4da322011-08-30 01:03:23 -070025 int (*init_image)(struct pil_desc *pil, const u8 *metadata,
Stephen Boyd5bd999a2011-08-02 18:50:57 -070026 size_t size);
Stephen Boyd3f4da322011-08-30 01:03:23 -070027 int (*verify_blob)(struct pil_desc *pil, u32 phy_addr, size_t size);
28 int (*auth_and_reset)(struct pil_desc *pil);
29 int (*shutdown)(struct pil_desc *pil);
Stephen Boyd5bd999a2011-08-02 18:50:57 -070030};
31
Stephen Boyd3f4da322011-08-30 01:03:23 -070032extern int msm_pil_register(struct pil_desc *desc);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070033
34#endif