Commit Graph

16 Commits

Author SHA1 Message Date
Patrik Jakobsson
9190f7d3b8 facetimehd: Disable ASPM
Kernel commit: 5a8361f7ecceaed64b4064000d16cb703462be49
ACPICA: Integrate package handling with module-level code

The above commit fixed a problem with ACPI that previously prevented
ASPM to be enabled. Unfortunately our driver broke because the link to
the device went down while streaming. Fix this for now by disabling ASPM
for the device entirely.

Note: There is an ACPI method we're calling to "power on/off" the device
so the real solution here might be to get it working correctly. I will
need to investigate that further so no ASPM will have to do for now.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2019-03-17 22:45:13 +01:00
Patrik Jakobsson
b5e3e74daa facetimehd: Hack the suspend/resume handlers
This is a temporary fix for suspend/resume. It'll unload and reload the
entire driver on suspend/resume. This will obviously not work if the
device is not closed. Also, remove the PCI_VDEVICE macro.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2015-12-31 14:41:18 +01:00
Patrik Jakobsson
959ae39f9d facetimehd: Rework some of the IRQ handling
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2015-12-31 14:41:18 +01:00
Patrik Jakobsson
0617a86642 facetimehd: Name the known IRQ registers
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2015-12-31 14:41:17 +01:00
Sven Schnelle
ea4e874e45 facetimehd: switch to debugfs 2015-12-01 09:26:46 +01:00
Sven Schnelle
5608b8b00f 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
2015-11-30 11:57:10 +01:00
Sven Schnelle
d1ec497e02 Merge remote-tracking branch 'patjak/master' into my_fixes 2015-11-28 23:11:00 +01:00
Sven Schnelle
ca8c5584e0 facetimehd: add channel waitqueue
add a per channel waitqueue to be able to have more than one ringbuffer
entry in flight.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
2015-11-28 22:59:44 +01:00
Sven Schnelle
3574901c31 facetimehd: add missing linefeeds in pr_debug
Signed-off-by: Sven Schnelle <svens@stackframe.org>
2015-11-28 22:21:37 +01:00
Sven Schnelle
aebaf60c07 facetimehd: change fthd_channel_ringbuf_send() error handling
In the current implementation it returns -1 on error, an offset value
otherwise. Change it to return a negative error value, and add a pointer
to an u32 for receiving the entry offset as an extra argument.

This makes the ugly (u32)-1 return code comparision obsolete, and we
can return a more detailed error code like EAGAIN if all ringbuffer slots
are busy.
2015-11-28 21:18:22 +01:00
Patrik Jakobsson
8e83f8fbcd Merge branch 'my_fixes' of git://github.com/sschnelle/facetimehd 2015-11-28 21:16:40 +01:00
Sven Schnelle
ad486d4522 facetimehd: remove cmd_ready variable
instead evaluate the ringbuffer status. This allows to have more than one isp
command in flight.
2015-11-28 16:10:34 +01:00
Patrik Jakobsson
ed773c8268 facetimehd: More Broadcom to FacetimeHD renaming 2015-11-28 13:16:53 +01:00
Patrik Jakobsson
29e8243acf facetimehd: Use module_pci_driver() helper macro 2015-11-28 12:45:19 +01:00
Sven Schnelle
9dd6bc2a02 facetimehd: don't access __iomem directly 2015-11-28 07:29:47 +01:00
Sven Schnelle
f3067f211a rename driver to facetimehd 2015-11-27 20:32:06 +01:00