| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  |  * Intel Management Engine Interface (Intel MEI) Linux driver | 
					
						
							|  |  |  |  * Copyright (c) 2003-2012, Intel Corporation. | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  |  * This program is free software; you can redistribute it and/or modify it | 
					
						
							|  |  |  |  * under the terms and conditions of the GNU General Public License, | 
					
						
							|  |  |  |  * version 2, as published by the Free Software Foundation. | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  |  * This program is distributed in the hope it will be useful, but WITHOUT | 
					
						
							|  |  |  |  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 
					
						
							|  |  |  |  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for | 
					
						
							|  |  |  |  * more details. | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  |  * | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  | #ifndef _MEI_INTERFACE_H_
 | 
					
						
							|  |  |  | #define _MEI_INTERFACE_H_
 | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-14 14:06:14 -07:00
										 |  |  | #include <linux/irqreturn.h>
 | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:45 +03:00
										 |  |  | #include <linux/pci.h>
 | 
					
						
							|  |  |  | #include <linux/mei.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  | #include "mei_dev.h"
 | 
					
						
							| 
									
										
										
										
											2013-02-06 14:06:40 +02:00
										 |  |  | #include "client.h"
 | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:45 +03:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * mei_cfg - mei device configuration | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @fw_status: FW status | 
					
						
							|  |  |  |  * @quirk_probe: device exclusion quirk | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | struct mei_cfg { | 
					
						
							|  |  |  | 	const struct mei_fw_status fw_status; | 
					
						
							|  |  |  | 	bool (*quirk_probe)(struct pci_dev *pdev); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define MEI_PCI_DEVICE(dev, cfg) \
 | 
					
						
							|  |  |  | 	.vendor = PCI_VENDOR_ID_INTEL, .device = (dev), \ | 
					
						
							|  |  |  | 	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, \ | 
					
						
							|  |  |  | 	.driver_data = (kernel_ulong_t)&(cfg) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-18 22:52:02 +02:00
										 |  |  | #define MEI_ME_RPM_TIMEOUT    500 /* ms */
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:45 +03:00
										 |  |  | /**
 | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:50 +03:00
										 |  |  |  * struct mei_me_hw - me hw specific data | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:45 +03:00
										 |  |  |  * @cfg: per device generation config and ops | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:50 +03:00
										 |  |  |  * @mem_addr:  io memory address | 
					
						
							|  |  |  |  * @pg_state:      power gating state | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:45 +03:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2013-02-06 14:06:40 +02:00
										 |  |  | struct mei_me_hw { | 
					
						
							| 
									
										
										
										
											2014-09-29 16:31:45 +03:00
										 |  |  | 	const struct mei_cfg *cfg; | 
					
						
							| 
									
										
										
										
											2013-02-06 14:06:40 +02:00
										 |  |  | 	void __iomem *mem_addr; | 
					
						
							| 
									
										
										
										
											2014-03-18 22:52:00 +02:00
										 |  |  | 	enum mei_pg_state pg_state; | 
					
						
							| 
									
										
										
										
											2013-02-06 14:06:40 +02:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-06 14:06:40 +02:00
										 |  |  | #define to_me_hw(dev) (struct mei_me_hw *)((dev)->hw)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-13 01:30:53 +03:00
										 |  |  | extern const struct mei_cfg mei_me_legacy_cfg; | 
					
						
							|  |  |  | extern const struct mei_cfg mei_me_ich_cfg; | 
					
						
							|  |  |  | extern const struct mei_cfg mei_me_pch_cfg; | 
					
						
							| 
									
										
										
										
											2014-05-13 01:30:54 +03:00
										 |  |  | extern const struct mei_cfg mei_me_pch_cpt_pbg_cfg; | 
					
						
							| 
									
										
										
										
											2014-11-19 17:01:38 +02:00
										 |  |  | extern const struct mei_cfg mei_me_pch8_cfg; | 
					
						
							|  |  |  | extern const struct mei_cfg mei_me_pch8_sps_cfg; | 
					
						
							| 
									
										
										
										
											2014-05-13 01:30:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | struct mei_device *mei_me_dev_init(struct pci_dev *pdev, | 
					
						
							|  |  |  | 				   const struct mei_cfg *cfg); | 
					
						
							| 
									
										
										
										
											2012-12-25 19:06:02 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-18 22:52:00 +02:00
										 |  |  | int mei_me_pg_set_sync(struct mei_device *dev); | 
					
						
							|  |  |  | int mei_me_pg_unset_sync(struct mei_device *dev); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-06 14:06:42 +02:00
										 |  |  | irqreturn_t mei_me_irq_quick_handler(int irq, void *dev_id); | 
					
						
							|  |  |  | irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-08 23:07:17 +02:00
										 |  |  | #endif /* _MEI_INTERFACE_H_ */
 |