mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-27 00:40:17 +00:00
proxy: Add proxy ops for pcie_init/shutdown
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
660d7482b9
commit
4027c34c7a
3 changed files with 19 additions and 0 deletions
|
@ -582,6 +582,9 @@ class M1N1Proxy(Reloadable):
|
|||
P_FB_RESTORE_LOGO = 0xd07
|
||||
P_FB_IMPROVE_LOGO = 0xd08
|
||||
|
||||
P_PCIE_INIT = 0xe00
|
||||
P_PCIE_SHUTDOWN = 0xe01
|
||||
|
||||
def __init__(self, iface, debug=False):
|
||||
self.debug = debug
|
||||
self.iface = iface
|
||||
|
@ -993,6 +996,11 @@ class M1N1Proxy(Reloadable):
|
|||
def fb_improve_logo(self):
|
||||
return self.request(self.P_FB_IMPROVE_LOGO)
|
||||
|
||||
def pcie_init(self):
|
||||
return self.request(self.P_PCIE_INIT)
|
||||
def pcie_shutdown(self):
|
||||
return self.request(self.P_PCIE_SHUTDOWN)
|
||||
|
||||
__all__.extend(k for k, v in globals().items()
|
||||
if (callable(v) or isinstance(v, type)) and v.__module__ == __name__)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "kboot.h"
|
||||
#include "malloc.h"
|
||||
#include "memory.h"
|
||||
#include "pcie.h"
|
||||
#include "pmgr.h"
|
||||
#include "smp.h"
|
||||
#include "string.h"
|
||||
|
@ -483,6 +484,13 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply)
|
|||
fb_improve_logo();
|
||||
break;
|
||||
|
||||
case P_PCIE_INIT:
|
||||
pcie_init();
|
||||
break;
|
||||
case P_PCIE_SHUTDOWN:
|
||||
pcie_shutdown();
|
||||
break;
|
||||
|
||||
default:
|
||||
reply->status = S_BADCMD;
|
||||
break;
|
||||
|
|
|
@ -135,6 +135,9 @@ typedef enum {
|
|||
P_FB_RESTORE_LOGO,
|
||||
P_FB_IMPROVE_LOGO,
|
||||
|
||||
P_PCIE_INIT = 0xe00,
|
||||
P_PCIE_SHUTDOWN,
|
||||
|
||||
} ProxyOp;
|
||||
|
||||
#define S_OK 0
|
||||
|
|
Loading…
Reference in a new issue