mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
facetimehd: add sysfs functions
Introduce a new debug sysfs file, which accepts the following commands: ps - show task running in firmware banner - show startup banner get_root - get ROOT object heap - show heap statistics irq - show irq statistics semaphore - show semaphore status wiring - show wiring status get_object_by_name %s - get address for object get_fsm_by_name %s - get address for FSM dump_object %p - show information about object dump_objects - dump all objects (NOTE: will crash firmware) show_objects - show graph about all objects known get_debug_level - get debug level for object set_debug_level - set debug level for object set_debug_level_rec - set debug level recursive for all objects get_fsm_count - get count of FSM's get_fsm_by_index - get fsm address for index get_fsm_debug_level - get debug level for fsm set_fsm_debug_level - set debug level for fsm
This commit is contained in:
13
fthd_drv.c
13
fthd_drv.c
@@ -34,6 +34,7 @@
|
||||
#include "fthd_ringbuf.h"
|
||||
#include "fthd_buffer.h"
|
||||
#include "fthd_v4l2.h"
|
||||
#include "fthd_sysfs.h"
|
||||
|
||||
static int fthd_pci_reserve_mem(struct fthd_private *dev_priv)
|
||||
{
|
||||
@@ -207,8 +208,11 @@ static void fthd_handle_irq(struct fthd_private *dev_priv, struct fw_channel *ch
|
||||
return;
|
||||
}
|
||||
|
||||
if (chan == dev_priv->channel_debug)
|
||||
if (chan == dev_priv->channel_debug) {
|
||||
pr_debug("DEBUG channel ready\n");
|
||||
wake_up_interruptible(&chan->wq);
|
||||
return;
|
||||
}
|
||||
|
||||
while((entry = fthd_channel_ringbuf_receive(dev_priv, chan)) != (u32)-1) {
|
||||
pr_debug("channel %s: message available, address %08x\n", chan->name, FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_ADDRESS_FLAGS));
|
||||
@@ -330,6 +334,8 @@ static void fthd_pci_remove(struct pci_dev *pdev)
|
||||
if (!dev_priv)
|
||||
goto out;
|
||||
|
||||
fthd_sysfs_exit(dev_priv);
|
||||
|
||||
fthd_v4l2_unregister(dev_priv);
|
||||
|
||||
fthd_stop_firmware(dev_priv);
|
||||
@@ -485,7 +491,12 @@ static int fthd_pci_probe(struct pci_dev *pdev,
|
||||
if (ret)
|
||||
goto fail_firmware;
|
||||
|
||||
ret = fthd_sysfs_init(dev_priv);
|
||||
if (ret)
|
||||
goto fail_v4l2;
|
||||
return 0;
|
||||
fail_v4l2:
|
||||
fthd_v4l2_unregister(dev_priv);
|
||||
fail_firmware:
|
||||
fthd_stop_firmware(dev_priv);
|
||||
fail_hw:
|
||||
|
||||
Reference in New Issue
Block a user