Skip to content

Commit 3aacea9

Browse files
matthew-gerlachRuss Weight
authored andcommitted
drivers: mfd: intel-m10-bmc add debugfs support to regmap
Add access tables and a max_registers field to enable the regmap-debugfs interface. Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
1 parent 6a1d482 commit 3aacea9

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/mfd/intel-m10-bmc.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,22 @@ int m10bmc_sys_update_bits(struct intel_m10bmc *m10bmc, unsigned int offset,
126126
}
127127
EXPORT_SYMBOL_GPL(m10bmc_sys_update_bits);
128128

129+
static const struct regmap_range m10_regmap_range[] = {
130+
regmap_reg_range(M10BMC_LEGACY_SYS_BASE, M10BMC_SYS_END),
131+
regmap_reg_range(M10BMC_FLASH_BASE, M10BMC_MEM_END),
132+
};
133+
134+
static const struct regmap_access_table m10_access_table = {
135+
.yes_ranges = m10_regmap_range,
136+
.n_yes_ranges = ARRAY_SIZE(m10_regmap_range),
137+
};
138+
129139
static struct regmap_config intel_m10bmc_regmap_config = {
130140
.reg_bits = 32,
131141
.val_bits = 32,
132142
.reg_stride = 4,
143+
.wr_table = &m10_access_table,
144+
.rd_table = &m10_access_table,
133145
.max_register = M10BMC_MEM_END,
134146
};
135147

include/linux/mfd/intel-m10-bmc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ enum m10bmc_type {
1818

1919
#define M10BMC_LEGACY_SYS_BASE 0x300400
2020
#define M10BMC_SYS_BASE 0x300800
21+
#define M10BMC_SYS_END 0x300fff
2122
#define M10BMC_MEM_END 0x200000fc
2223

24+
#define M10BMC_FLASH_BASE 0x10000000
2325
#define M10BMC_STAGING_BASE 0x18000000
2426
#define M10BMC_STAGING_SIZE 0x3800000
2527

0 commit comments

Comments
 (0)