Skip to content

Commit

Permalink
spi: dw: Rearrange struct dw_spi_priv
Browse files Browse the repository at this point in the history
This should reduce the size of the struct, and also groups more similar
fields together.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
  • Loading branch information
Forty-Bot authored and openedev committed Dec 18, 2020
1 parent 934beab commit ddd3450
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions drivers/spi/designware_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,26 @@ struct dw_spi_platdata {
};

struct dw_spi_priv {
void __iomem *regs;
unsigned int freq; /* Default frequency */
unsigned int mode;
struct clk clk;
unsigned long bus_clk_rate;

struct reset_ctl_bulk resets;
struct gpio_desc cs_gpio; /* External chip-select gpio */

int bits_per_word;
u8 cs; /* chip select pin */
u8 tmode; /* TR/TO/RO/EEPROM */
u8 type; /* SPI/SSP/MicroWire */
int len;
void __iomem *regs;
unsigned long bus_clk_rate;
unsigned int freq; /* Default frequency */
unsigned int mode;

u32 fifo_len; /* depth of the FIFO buffer */
void *tx;
void *tx_end;
const void *tx;
const void *tx_end;
void *rx;
void *rx_end;
u32 fifo_len; /* depth of the FIFO buffer */

struct reset_ctl_bulk resets;
int bits_per_word;
int len;
u8 cs; /* chip select pin */
u8 tmode; /* TR/TO/RO/EEPROM */
u8 type; /* SPI/SSP/MicroWire */
};

static inline u32 dw_read(struct dw_spi_priv *priv, u32 offset)
Expand Down

0 comments on commit ddd3450

Please sign in to comment.