mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 08:36:47 +07:00
b216c01829
Patch from Liam Girdwood This patch allows users of the pxa SSP driver to register their own irq handlers instead of using the default SSP handler. It also cleans up the CKEN clock and irq detection as the values are now stored in a table. This patch replaces 2845/1 Changes:- o Added flags parameter to ssp_init() o Added SSP_NO_IRQ flag to disable registering of ssp irq handler (for drivers that want to register their own handler) o Cleaned up clock and irq detection, values are now stored in table. o Added build changes to allow other drivers (e.g audio) to select the ssp driver. o corgi_ssp.c changed to use new interface. Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com> Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/*
|
|
* ssp.h
|
|
*
|
|
* Copyright (C) 2003 Russell King, All Rights Reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This driver supports the following PXA CPU/SSP ports:-
|
|
*
|
|
* PXA250 SSP
|
|
* PXA255 SSP, NSSP
|
|
* PXA26x SSP, NSSP, ASSP
|
|
* PXA27x SSP1, SSP2, SSP3
|
|
*/
|
|
|
|
#ifndef SSP_H
|
|
#define SSP_H
|
|
|
|
/*
|
|
* SSP initialisation flags
|
|
*/
|
|
#define SSP_NO_IRQ 0x1 /* don't register an irq handler in SSP driver */
|
|
|
|
struct ssp_state {
|
|
u32 cr0;
|
|
u32 cr1;
|
|
u32 to;
|
|
u32 psp;
|
|
};
|
|
|
|
struct ssp_dev {
|
|
u32 port;
|
|
u32 mode;
|
|
u32 flags;
|
|
u32 psp_flags;
|
|
u32 speed;
|
|
int irq;
|
|
};
|
|
|
|
int ssp_write_word(struct ssp_dev *dev, u32 data);
|
|
int ssp_read_word(struct ssp_dev *dev);
|
|
void ssp_flush(struct ssp_dev *dev);
|
|
void ssp_enable(struct ssp_dev *dev);
|
|
void ssp_disable(struct ssp_dev *dev);
|
|
void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);
|
|
void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
|
|
int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags);
|
|
int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
|
|
void ssp_exit(struct ssp_dev *dev);
|
|
|
|
#endif
|