Hi, On Wed, Mar 26, 2014 at 07:04:50PM -0500, Felipe Balbi wrote: > @@ -1867,6 +1879,37 @@ static inline struct omap_mmc_platform_data > } > #endif > > +static void omap_hsmmc_set_max_blk_size(struct omap_hsmmc_host *host) > +{ > + struct mmc_host *mmc = host->mmc; > + > + if (of_device_is_compatible(host->dev->of_node, "ti,omap4-hsmmc")) { > + u32 mem; > + u32 reg; > + > + reg = omap_hsmmc_read_no_offset(host, OMAP_HSMMC_HL_HWINFO); > + mem = OMAP_HSMMC_HL_HWINFO_MEM_SIZE(reg); > + > + switch (mem) { > + case 1: > + mmc->max_blk_size = 512; > + break; > + case 2: > + mmc->max_blk_size = 1024; > + break; > + case 4: > + /* FALLTHROUGH */ > + case 8: > + /* FALLTHROUGH */ > + default: > + mmc->max_blk_size = 2048; > + break; > + } > + } else { > + mmc->max_blk_size = 512; /* Block Length at max can be > 1024 */
looks like here, we could read CAPA register to figure out if older devices support bigger block sizes. According to TRM, omap3 should support 1024 just fine. -- balbi
signature.asc
Description: Digital signature