mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
serial: 8250_dw: Revert "Move definitions to the shared header"
This reverts commit d9666dfb314e1ffd6eb9c3c4243fe3e094c047a7. The container of the struct dw8250_port_data is private to the actual driver. In particular, 8250_lpss and 8250_dw use different data types that are assigned to the UART port private_data. Hence, it must not be used outside the specific driver. Fix the mistake made in the past by moving the respective definitions to the specific driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240514190730.2787071-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
87d80bfbd5
commit
2c94512055
@ -57,6 +57,33 @@
|
|||||||
#define DW_UART_QUIRK_APMC0D08 BIT(4)
|
#define DW_UART_QUIRK_APMC0D08 BIT(4)
|
||||||
#define DW_UART_QUIRK_CPR_VALUE BIT(5)
|
#define DW_UART_QUIRK_CPR_VALUE BIT(5)
|
||||||
|
|
||||||
|
struct dw8250_platform_data {
|
||||||
|
u8 usr_reg;
|
||||||
|
u32 cpr_value;
|
||||||
|
unsigned int quirks;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct dw8250_data {
|
||||||
|
struct dw8250_port_data data;
|
||||||
|
const struct dw8250_platform_data *pdata;
|
||||||
|
|
||||||
|
int msr_mask_on;
|
||||||
|
int msr_mask_off;
|
||||||
|
struct clk *clk;
|
||||||
|
struct clk *pclk;
|
||||||
|
struct notifier_block clk_notifier;
|
||||||
|
struct work_struct clk_work;
|
||||||
|
struct reset_control *rst;
|
||||||
|
|
||||||
|
unsigned int skip_autocfg:1;
|
||||||
|
unsigned int uart_16550_compatible:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline struct dw8250_data *to_dw8250_data(struct dw8250_port_data *data)
|
||||||
|
{
|
||||||
|
return container_of(data, struct dw8250_data, data);
|
||||||
|
}
|
||||||
|
|
||||||
static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block *nb)
|
static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block *nb)
|
||||||
{
|
{
|
||||||
return container_of(nb, struct dw8250_data, clk_notifier);
|
return container_of(nb, struct dw8250_data, clk_notifier);
|
||||||
|
@ -2,15 +2,10 @@
|
|||||||
/* Synopsys DesignWare 8250 library header file. */
|
/* Synopsys DesignWare 8250 library header file. */
|
||||||
|
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/notifier.h>
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/workqueue.h>
|
|
||||||
|
|
||||||
#include "8250.h"
|
#include "8250.h"
|
||||||
|
|
||||||
struct clk;
|
|
||||||
struct reset_control;
|
|
||||||
|
|
||||||
struct dw8250_port_data {
|
struct dw8250_port_data {
|
||||||
/* Port properties */
|
/* Port properties */
|
||||||
int line;
|
int line;
|
||||||
@ -26,36 +21,9 @@ struct dw8250_port_data {
|
|||||||
bool hw_rs485_support;
|
bool hw_rs485_support;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dw8250_platform_data {
|
|
||||||
u8 usr_reg;
|
|
||||||
u32 cpr_value;
|
|
||||||
unsigned int quirks;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct dw8250_data {
|
|
||||||
struct dw8250_port_data data;
|
|
||||||
const struct dw8250_platform_data *pdata;
|
|
||||||
|
|
||||||
int msr_mask_on;
|
|
||||||
int msr_mask_off;
|
|
||||||
struct clk *clk;
|
|
||||||
struct clk *pclk;
|
|
||||||
struct notifier_block clk_notifier;
|
|
||||||
struct work_struct clk_work;
|
|
||||||
struct reset_control *rst;
|
|
||||||
|
|
||||||
unsigned int skip_autocfg:1;
|
|
||||||
unsigned int uart_16550_compatible:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, const struct ktermios *old);
|
void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, const struct ktermios *old);
|
||||||
void dw8250_setup_port(struct uart_port *p);
|
void dw8250_setup_port(struct uart_port *p);
|
||||||
|
|
||||||
static inline struct dw8250_data *to_dw8250_data(struct dw8250_port_data *data)
|
|
||||||
{
|
|
||||||
return container_of(data, struct dw8250_data, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline u32 dw8250_readl_ext(struct uart_port *p, int offset)
|
static inline u32 dw8250_readl_ext(struct uart_port *p, int offset)
|
||||||
{
|
{
|
||||||
if (p->iotype == UPIO_MEM32BE)
|
if (p->iotype == UPIO_MEM32BE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user