Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __IXP4XX_NPE_H
0003 #define __IXP4XX_NPE_H
0004 
0005 #include <linux/kernel.h>
0006 #include <linux/regmap.h>
0007 
0008 extern const char *npe_names[];
0009 
0010 struct npe_regs {
0011     u32 exec_addr, exec_data, exec_status_cmd, exec_count;
0012     u32 action_points[4];
0013     u32 watchpoint_fifo, watch_count;
0014     u32 profile_count;
0015     u32 messaging_status, messaging_control;
0016     u32 mailbox_status, /*messaging_*/ in_out_fifo;
0017 };
0018 
0019 struct npe {
0020     struct npe_regs __iomem *regs;
0021     struct regmap *rmap;
0022     int id;
0023     int valid;
0024 };
0025 
0026 
0027 static inline const char *npe_name(struct npe *npe)
0028 {
0029     return npe_names[npe->id];
0030 }
0031 
0032 int npe_running(struct npe *npe);
0033 int npe_send_message(struct npe *npe, const void *msg, const char *what);
0034 int npe_recv_message(struct npe *npe, void *msg, const char *what);
0035 int npe_send_recv_message(struct npe *npe, void *msg, const char *what);
0036 int npe_load_firmware(struct npe *npe, const char *name, struct device *dev);
0037 struct npe *npe_request(unsigned id);
0038 void npe_release(struct npe *npe);
0039 
0040 #endif /* __IXP4XX_NPE_H */