kernel/resource: Introduce request_mem_region_muxed()
authorTerry Bowman <terry.bowman@amd.com>
Wed, 9 Feb 2022 17:27:09 +0000 (11:27 -0600)
committerWolfram Sang <wsa@kernel.org>
Thu, 10 Feb 2022 21:40:00 +0000 (22:40 +0100)
commit27c196c7b73cb70bbed3a9df46563bab60e63415
treec8528d1bbf361e79d15c803bf1cfe91dfe49e331
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
kernel/resource: Introduce request_mem_region_muxed()

Support for requesting muxed memory region is implemented but not
currently callable as a macro. Add the request muxed memory
region macro.

MMIO memory accesses can be synchronized using request_mem_region() which
is already available. This call will return failure if the resource is
busy. The 'muxed' version of this macro will handle a busy resource by
using a wait queue to retry until the resource is available.

Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
include/linux/ioport.h