@@ -1717,6 +1717,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
struct omap_mmc_platform_data *pdata;
struct device_node *np = dev->of_node;
u32 bus_width, max_freq;
+ u32 reg_offset;
int cd_gpio, wp_gpio;
cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
@@ -1755,6 +1756,9 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
if (of_find_property(np, "ti,needs-special-hs-handling", NULL))
pdata->slots[0].features |= HSMMC_HAS_HSPE_SUPPORT;
+ if (!of_property_read_u32(np, "reg-offset", ®_offset))
+ pdata->reg_offset = reg_offset;
+
return pdata;
}
#else
@@ -1785,7 +1789,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
if (IS_ERR(pdata))
return PTR_ERR(pdata);
- if (match->data) {
+ /* Provide reg_offset from match->data unless specified in DT */
+ if (match->data && !pdata->reg_offset) {
const u16 *offsetp = match->data;
pdata->reg_offset = *offsetp;
}