Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
snip - if (cpu_is_omap44xx()) - mmc-reg_offset = OMAP4_MMC_REG_OFFSET; - else - mmc-reg_offset = 0; +static struct omap_mmc_platform_data *mmc __initdata; can you pass this *mmc as another argument to omap_hsmmc_pdata_init so that this static initdata can be removed ? - mmc-get_context_loss_count = hsmmc_get_context_loss; +static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c) +{ + char *hc_name; - mmc-slots[0].switch_pin = c-gpio_cd; - mmc-slots[0].gpio_wp = c-gpio_wp; + if (!c-mmc) { + pr_debug(MMC%d: no such controller\n, c-mmc); + return -ENXIO; + } - mmc-slots[0].remux = c-remux; - mmc-slots[0].init_card = c-init_card; + hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL); + if (!hc_name) { + pr_err(Cannot allocate memory for controller slot name\n); + kfree(hc_name); + return -ENOMEM; + } - if (c-cover_only) - mmc-slots[0].cover = 1; + if (c-name) + strncpy(hc_name, c-name, HSMMC_NAME_LEN); + else + snprintf(hc_name, (HSMMC_NAME_LEN + 1), mmc%islot%i, + c-mmc, 1); + mmc-slots[0].name = hc_name; + mmc-nr_slots = 1; snip -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
On Fri, Feb 25, 2011 at 6:20 PM, Krishnamoorthy, Balaji T balaj...@ti.com wrote: snip - if (cpu_is_omap44xx()) - mmc-reg_offset = OMAP4_MMC_REG_OFFSET; - else - mmc-reg_offset = 0; +static struct omap_mmc_platform_data *mmc __initdata; can you pass this *mmc as another argument to omap_hsmmc_pdata_init so that this static initdata can be removed ? Agree, will go with as said - mmc-get_context_loss_count = hsmmc_get_context_loss; +static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c) +{ + char *hc_name; - mmc-slots[0].switch_pin = c-gpio_cd; - mmc-slots[0].gpio_wp = c-gpio_wp; + if (!c-mmc) { + pr_debug(MMC%d: no such controller\n, c-mmc); + return -ENXIO; + } - mmc-slots[0].remux = c-remux; - mmc-slots[0].init_card = c-init_card; + hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL); + if (!hc_name) { + pr_err(Cannot allocate memory for controller slot name\n); + kfree(hc_name); + return -ENOMEM; + } - if (c-cover_only) - mmc-slots[0].cover = 1; + if (c-name) + strncpy(hc_name, c-name, HSMMC_NAME_LEN); + else + snprintf(hc_name, (HSMMC_NAME_LEN + 1), mmc%islot%i, + c-mmc, 1); + mmc-slots[0].name = hc_name; + mmc-nr_slots = 1; snip -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
* Kishore Kadiyala kishore.kadiy...@ti.com [110224 11:17]: Changes involves: 1) Remove controller reset in devices.c which is taken care of by hwmod framework. 2) Omap2420 platform consists of mmc block as in omap1 and not the hsmmc block as present in omap2430, omap3, omap4 platforms. Removing all base address macro defines except keeping one for OMAP2420. 3) Using omap-device layer to register device and utilizing data from hwmod data file for base address, dma channel number, Irq_number, device attribute. 4) Update the driver to use dev_attr to find whether controller supports dual volt cards This patch is too hard to read. Can you please split it into more readable patches? Thanks, Tony -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html