mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-24 12:19:21 +01:00
sdhc: add ipc call IPC_SDHC_EXIT
In some cases it is desirable to let the Broadway processor take complete control of hardware initially managed by 'mini'. Add a new IPC call to instruct 'mini' to relinquish control of the SD Host Controller. One immediate user of this IPC call is Linux on the Nintendo Wii which takes complete control of the SDHC hardware. Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
This commit is contained in:
parent
950adf002f
commit
68791a05fe
1
ipc.h
1
ipc.h
@ -77,6 +77,7 @@ Copyright (C) 2009 John Kelley <wiidev@kelley.ca>
|
||||
// etc.
|
||||
|
||||
#define IPC_SDHC_DISCOVER 0x0000
|
||||
#define IPC_SDHC_EXIT 0x0001
|
||||
|
||||
#define IPC_SDMMC_ACK 0x0000
|
||||
#define IPC_SDMMC_READ 0x0001
|
||||
|
11
sdhc.c
11
sdhc.c
@ -1033,6 +1033,14 @@ void sdhc_init(void)
|
||||
// sdhc_host_found(&__softc, 0, 0x0d080000, 1);
|
||||
}
|
||||
|
||||
void sdhc_exit(void)
|
||||
{
|
||||
#ifdef CAN_HAZ_IRQ
|
||||
irq_disable(IRQ_SDHC);
|
||||
#endif
|
||||
sdhc_shutdown(&__softc);
|
||||
}
|
||||
|
||||
#ifdef CAN_HAZ_IPC
|
||||
void sdhc_ipc(volatile ipc_request *req)
|
||||
{
|
||||
@ -1040,6 +1048,9 @@ void sdhc_ipc(volatile ipc_request *req)
|
||||
case IPC_SDHC_DISCOVER:
|
||||
sdmmc_needs_discover((struct device *)req->args[0]);
|
||||
break;
|
||||
case IPC_SDHC_EXIT:
|
||||
sdhc_exit();
|
||||
ipc_post(req->code, req->tag, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user