diff options
author | Sanyog Kale <sanyog.r.kale@intel.com> | 2017-12-14 06:49:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-19 11:31:33 +0100 |
commit | 956baa1992f9a2f62fe91da70ffdce89b7c720ae (patch) | |
tree | 32175b481bf75f97890487b15076ea6306e94e6d /drivers/soundwire/cadence_master.h | |
parent | soundwire: cdns: Add cadence library (diff) | |
download | linux-956baa1992f9a2f62fe91da70ffdce89b7c720ae.tar.xz linux-956baa1992f9a2f62fe91da70ffdce89b7c720ae.zip |
soundwire: cdns: Add sdw_master_ops and IO transfer support
Implement sdw_master_ops with support for xfer_msg, xfer_msg_defer
and reset_page_addr. Since Cadence module doesn't know the systems
it will be used, set the read_prop to the bus helper.
Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/soundwire/cadence_master.h')
-rw-r--r-- | drivers/soundwire/cadence_master.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h index f723c3395c0f..beaf6c9804eb 100644 --- a/drivers/soundwire/cadence_master.h +++ b/drivers/soundwire/cadence_master.h @@ -9,26 +9,40 @@ * @dev: Linux device * @bus: Bus handle * @instance: instance number + * @response_buf: SoundWire response buffer + * @tx_complete: Tx completion + * @defer: Defer pointer * @registers: Cadence registers * @link_up: Link status + * @msg_count: Messages sent on bus */ struct sdw_cdns { struct device *dev; struct sdw_bus bus; unsigned int instance; + u32 response_buf[0x80]; + struct completion tx_complete; + struct sdw_defer *defer; + void __iomem *registers; bool link_up; + unsigned int msg_count; }; #define bus_to_cdns(_bus) container_of(_bus, struct sdw_cdns, bus) /* Exported symbols */ +int sdw_cdns_probe(struct sdw_cdns *cdns); +extern struct sdw_master_ops sdw_cdns_master_ops; + irqreturn_t sdw_cdns_irq(int irq, void *dev_id); irqreturn_t sdw_cdns_thread(int irq, void *dev_id); int sdw_cdns_init(struct sdw_cdns *cdns); +int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns); + #endif /* __SDW_CADENCE_H */ |