soundwire updates for 6.3
- Core:
- sdw_transfer_defer() API change to dropan argument
- Reset page address rework
- Exporting sdw_nwrite_no_pm and sdw_nread_no_pm APIs
- Drivers:
- Cadence and related intel driver updates for FIFO handling and
low level msg transfers
-----BEGIN PGP SIGNATURE-----
iQIyBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmP4wIkACgkQfBQHDyUj
g0eScA/4r/l0qC6z3xDq4LDHoXgAY5Q1qrlfdhj8/Dv3DDkIf4uChkZBJxiQVQsL
zzS8lULiRhTdGLoLb/EM3Lit3WIHk7sAxld06Pwk/SUKRGraDXtqSD3hypJGzHy8
EkYbKLD0nGhDgdj1SNoHxl3HZEijssZmVTI6rWLqvAjsAPhbDTrf1ONTRkkXdm7K
UsQ0FOvrhFyC5dNTWDXb8yrRA/W/o5HX0YAr6FQGV0d9eur9jJLSbw/TYEuzIbE8
tlqD6qfU43b/5efbURK/cJ0MdnFBLXjBytQBo8A4VYm+qZ99BbL+N+iU8+3b1xWu
EHuGg5ztruI6tVdW17dtt9niVEg4Zil2tZqbkwl3GJBisiH6bb6hJU9TceyBBig7
FbDzT9jFB13UMZE1zbJZ6XpFyBHoGlhsdOtaTmx3vjZDVnkP/SCMBY7tblIg3NE7
1lzLDwAXWqBLE2jkqjHdb1o9bCrfzI74bJY3ZvvrRIhkliDqDkLvwiSK3PD/Ic7M
4dLYUdN9OCHhV9T0txm5tguYE6wpJzt1wyuOEKlrncB1J+V8MCPZY1/QbpOiREzq
6VSHk5IIrDk0pfOQCukktJQX6OO/plRTLNmUGCJpD9EuNhjLDCwYxgu3PqaAaHG0
k0U0DqJv9XoUMlcbnA0dvwn2iiW7fSMxF+g2TXEckVrlFz3uhg==
=LwuQ
-----END PGP SIGNATURE-----
Merge tag 'soundwire-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire updates from Vinod Koul:
"This is a small update which features a bit of core changes and driver
updates in Intel and cadence driver.
Core:
- sdw_transfer_defer() API change to drop an argument
- Reset page address rework
- Export sdw_nwrite_no_pm and sdw_nread_no_pm APIs
Drivers:
- Cadence and related intel driver updates for FIFO handling and low
level msg transfers"
* tag 'soundwire-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
soundwire: cadence: further simplify low-level xfer_msg_defer() callback
soundwire: cadence: use directly bus sdw_defer structure
soundwire: bus: remove sdw_defer argument in sdw_transfer_defer()
soundwire: stream: use consistent pattern for freeing buffers
soundwire: bus: Remove unused reset_page_addr() callback
soundwire: bus: Don't zero page registers after every transaction
soundwire: bus_type: Avoid lockdep assert in sdw_drv_probe()
soundwire: stream: Move remaining register accesses over to no_pm
soundwire: debugfs: Switch to sdw_read_no_pm
soundwire: Provide build stubs for common functions
soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions
soundwire: cadence: remove unused sdw_cdns_master_ops declaration
soundwire: enable optional clock registers for SoundWire 1.2 devices
ASoC/soundwire: remove is_sdca boolean property
soundwire: cadence: Drain the RX FIFO after an IO timeout
soundwire: cadence: Remove wasted space in response_buf
soundwire: cadence: Don't overflow the command FIFOs
soundwire: intel: remove DAI startup/shutdown
This commit is contained in:
commit
595fa4e313
13 changed files with 207 additions and 167 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#ifndef __SOUNDWIRE_H
|
||||
#define __SOUNDWIRE_H
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/bitfield.h>
|
||||
|
||||
|
|
@ -365,7 +366,9 @@ struct sdw_dpn_prop {
|
|||
* @sink_dpn_prop: Sink Data Port N properties
|
||||
* @scp_int1_mask: SCP_INT1_MASK desired settings
|
||||
* @quirks: bitmask identifying deltas from the MIPI specification
|
||||
* @is_sdca: the Slave supports the SDCA specification
|
||||
* @clock_reg_supported: the Peripheral implements the clock base and scale
|
||||
* registers introduced with the SoundWire 1.2 specification. SDCA devices
|
||||
* do not need to set this boolean property as the registers are required.
|
||||
*/
|
||||
struct sdw_slave_prop {
|
||||
u32 mipi_revision;
|
||||
|
|
@ -389,7 +392,7 @@ struct sdw_slave_prop {
|
|||
struct sdw_dpn_prop *sink_dpn_prop;
|
||||
u8 scp_int1_mask;
|
||||
u32 quirks;
|
||||
bool is_sdca;
|
||||
bool clock_reg_supported;
|
||||
};
|
||||
|
||||
#define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0)
|
||||
|
|
@ -836,8 +839,8 @@ struct sdw_defer {
|
|||
* @read_prop: Read Master properties
|
||||
* @override_adr: Override value read from firmware (quirk for buggy firmware)
|
||||
* @xfer_msg: Transfer message callback
|
||||
* @xfer_msg_defer: Defer version of transfer message callback
|
||||
* @reset_page_addr: Reset the SCP page address registers
|
||||
* @xfer_msg_defer: Defer version of transfer message callback. The message is handled with the
|
||||
* bus struct @sdw_defer
|
||||
* @set_bus_conf: Set the bus configuration
|
||||
* @pre_bank_switch: Callback for pre bank switch
|
||||
* @post_bank_switch: Callback for post bank switch
|
||||
|
|
@ -851,10 +854,7 @@ struct sdw_master_ops {
|
|||
enum sdw_command_response (*xfer_msg)
|
||||
(struct sdw_bus *bus, struct sdw_msg *msg);
|
||||
enum sdw_command_response (*xfer_msg_defer)
|
||||
(struct sdw_bus *bus, struct sdw_msg *msg,
|
||||
struct sdw_defer *defer);
|
||||
enum sdw_command_response (*reset_page_addr)
|
||||
(struct sdw_bus *bus, unsigned int dev_num);
|
||||
(struct sdw_bus *bus);
|
||||
int (*set_bus_conf)(struct sdw_bus *bus,
|
||||
struct sdw_bus_params *params);
|
||||
int (*pre_bank_switch)(struct sdw_bus *bus);
|
||||
|
|
@ -1023,15 +1023,8 @@ int sdw_stream_add_master(struct sdw_bus *bus,
|
|||
struct sdw_port_config *port_config,
|
||||
unsigned int num_ports,
|
||||
struct sdw_stream_runtime *stream);
|
||||
int sdw_stream_add_slave(struct sdw_slave *slave,
|
||||
struct sdw_stream_config *stream_config,
|
||||
struct sdw_port_config *port_config,
|
||||
unsigned int num_ports,
|
||||
struct sdw_stream_runtime *stream);
|
||||
int sdw_stream_remove_master(struct sdw_bus *bus,
|
||||
struct sdw_stream_runtime *stream);
|
||||
int sdw_stream_remove_slave(struct sdw_slave *slave,
|
||||
struct sdw_stream_runtime *stream);
|
||||
int sdw_startup_stream(void *sdw_substream);
|
||||
int sdw_prepare_stream(struct sdw_stream_runtime *stream);
|
||||
int sdw_enable_stream(struct sdw_stream_runtime *stream);
|
||||
|
|
@ -1042,18 +1035,111 @@ int sdw_bus_prep_clk_stop(struct sdw_bus *bus);
|
|||
int sdw_bus_clk_stop(struct sdw_bus *bus);
|
||||
int sdw_bus_exit_clk_stop(struct sdw_bus *bus);
|
||||
|
||||
/* messaging and data APIs */
|
||||
int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);
|
||||
void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id);
|
||||
|
||||
#if IS_ENABLED(CONFIG_SOUNDWIRE)
|
||||
|
||||
int sdw_stream_add_slave(struct sdw_slave *slave,
|
||||
struct sdw_stream_config *stream_config,
|
||||
struct sdw_port_config *port_config,
|
||||
unsigned int num_ports,
|
||||
struct sdw_stream_runtime *stream);
|
||||
int sdw_stream_remove_slave(struct sdw_slave *slave,
|
||||
struct sdw_stream_runtime *stream);
|
||||
|
||||
/* messaging and data APIs */
|
||||
int sdw_read(struct sdw_slave *slave, u32 addr);
|
||||
int sdw_write(struct sdw_slave *slave, u32 addr, u8 value);
|
||||
int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value);
|
||||
int sdw_read_no_pm(struct sdw_slave *slave, u32 addr);
|
||||
int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
|
||||
int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
|
||||
int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
|
||||
int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
|
||||
int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
|
||||
int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
|
||||
|
||||
int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);
|
||||
void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id);
|
||||
#else
|
||||
|
||||
static inline int sdw_stream_add_slave(struct sdw_slave *slave,
|
||||
struct sdw_stream_config *stream_config,
|
||||
struct sdw_port_config *port_config,
|
||||
unsigned int num_ports,
|
||||
struct sdw_stream_runtime *stream)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_stream_remove_slave(struct sdw_slave *slave,
|
||||
struct sdw_stream_runtime *stream)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* messaging and data APIs */
|
||||
static inline int sdw_read(struct sdw_slave *slave, u32 addr)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_write(struct sdw_slave *slave, u32 addr, u8 value)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_read_no_pm(struct sdw_slave *slave, u32 addr)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val)
|
||||
{
|
||||
WARN_ONCE(1, "SoundWire API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SOUNDWIRE */
|
||||
|
||||
#endif /* __SOUNDWIRE_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue