Skip to content

Commit e2ae8a2

Browse files
committed
dmaengine: sdxi: Don't store version in sdxi_dev
Keep reporting the discovered version, but it's not used afterward in this version of the driver. So drop sdxi_dev->version and struct sdxi_version. Signed-off-by: Nathan Lynch <nathan.lynch@amd.com>
1 parent eb57453 commit e2ae8a2

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

drivers/dma/sdxi/device.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,9 @@ static int sdxi_fn_activate(struct sdxi_dev *sdxi)
178178
return err;
179179

180180
version = sdxi_read64(sdxi, SDXI_MMIO_VERSION);
181-
sdxi->version = (typeof(sdxi->version)){
182-
.major = FIELD_GET(SDXI_MMIO_VERSION_MAJOR, version),
183-
.minor = FIELD_GET(SDXI_MMIO_VERSION_MINOR, version),
184-
};
185-
186-
sdxi_info(sdxi, "SDXI %u.%u device found\n",
187-
sdxi->version.major, sdxi->version.minor);
181+
sdxi_info(sdxi, "SDXI %llu.%llu device found\n",
182+
FIELD_GET(SDXI_MMIO_VERSION_MAJOR, version),
183+
FIELD_GET(SDXI_MMIO_VERSION_MINOR, version));
188184

189185
/* Read capabilities and features. */
190186
cap0 = sdxi_read64(sdxi, SDXI_MMIO_CAP0);

drivers/dma/sdxi/sdxi.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,12 @@ struct sdxi_bus_ops {
9292
struct device;
9393
struct dma_pool;
9494

95-
struct sdxi_version {
96-
u8 major;
97-
u8 minor;
98-
};
99-
10095
struct sdxi_dev {
10196
struct device *dev;
10297
resource_size_t dbs_bar; /* doorbells base (BAR2) */
10398
void __iomem *ctrl_regs; /* virt addr of ctrl registers */
10499
void __iomem *dbs; /* virt addr of doorbells */
105100

106-
struct sdxi_version version; /* SDXI version implemented by function */
107-
108101
/* hardware capabilities (from cap0 & cap1) */
109102
u16 sfunc; /* function's requester id */
110103
u32 db_stride; /* doorbell stride in bytes */

0 commit comments

Comments
 (0)