Hi,
We have an custom board based on J5 ti811x
NOR flash: 4MB
SD-card connected to MMC1 (0x481D8000)
eMMC 4GB connected to MMC2 (0x47810000)
ezsdk uboot version :u-boot-2010.06-psp04.07.00.02
ezsdk kernel version :linux-2.6.37-psp04.07.00.02
As per our booting scheme, we need to configure and copy uboot and kernel into NOR flash and RFS into eMMC. I have few questions.
1) How to add support for MMC2 in kernel. Please find the code below which i have done for enabling eMMC on MMC2. Is this enough?
2) When I boot linux with this code, there is no mmcblk1 device under /dev. But I can see mmcblk0 which is used for SD-card(Currently booting from SD-card). How to configure linux to create dev/mmcblk1 for eMMC. In production system instead of SD card RFS will be mounted from eMMC
3) Could you please tell me how to partition and program NOR and eMMC flash without using CCS and JTAG.
mmc.h
---------
+#define TI81XX_NR_MMC 2 //1
+#define TI811X_MMC2_BASE 0x47810100 /* TI811X MMC/SD2 config base */
+#define TI811X_MMC2_HL_BASE 0x47810000 /* TI811X HL configuration*/
board-ti811x
---------------
static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA,
.gpio_cd = GPIO_TO_PIN(1, 6), /* Dedicated pins for CD and WP */
.gpio_wp = GPIO_TO_PIN(0, 22),
.ocr_mask = MMC_VDD_33_34,
},
{
.name ="RSB_eMMC",
.mmc = 2,
.caps = MMC_CAP_8_BIT_DATA,
.gpio_cd = -EINVAL, /* No Dedicated pins for CD and WP */
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_33_34,
.nonremovable = true,
},
{} /* Terminator */
};
devices.c
-------------
void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
int nr_controllers)
{
int i;
char *name;
printk("%s: nr_controllers = %d \n",__func__, nr_controllers);
for (i = 0; i < nr_controllers; i++) {
unsigned long base = 0;
unsigned long size;
unsigned int irq = 0;
if (!mmc_data[i])
continue;
printk("%s: i = %d \n",__func__, i);
omap2_mmc_mux(mmc_data[i], i);
switch (i) {
case 0:
if (!cpu_is_ti81xx()) {
base = OMAP2_MMC1_BASE;
irq = INT_24XX_MMC_IRQ;
} else if (cpu_is_ti816x()) {
base = TI816X_MMC1_BASE;
irq = TI81XX_IRQ_SD;
} else if (cpu_is_ti814x()) {
base = TI814X_MMC1_BASE;
irq = TI814X_IRQ_SD1;
}
break;
case 1:
if (cpu_is_ti811x()) {
base = TI811X_MMC2_BASE;
irq = TI814X_IRQ_SD2;
printk("%s: i = %d, base = 0x%x, irq = %d\n",__func__, i, TI811X_MMC2_BASE,TI814X_IRQ_SD2);
}else{
base = OMAP2_MMC2_BASE;
irq = INT_24XX_MMC2_IRQ;
}
break;
case 2:
if (!cpu_is_omap44xx() && !cpu_is_omap34xx())
return;
base = OMAP3_MMC3_BASE;
irq = INT_34XX_MMC3_IRQ;
break;
}
if (cpu_is_omap2420()) {
size = OMAP2420_MMC_SIZE;
name = "mmci-omap";
} else if (cpu_is_omap44xx()) {
if (i < 3)
irq += OMAP44XX_IRQ_GIC_START;
size = OMAP4_HSMMC_SIZE;
name = "mmci-omap-hs";
} else if (cpu_is_ti81xx()) {
if (i){
size = TI81XX_HSMMC_SIZE;
name = mmc_data[i]->slots[0].name; //"RSB_eMMC"
}else{ //default
size = TI81XX_HSMMC_SIZE;
name = "mmci-omap-hs";
}
} else {
size = OMAP3_HSMMC_SIZE;
name = "mmci-omap-hs";
}
printk("%s: name =%s, i = %d, base = 0x%lx, size = %d \n",__func__, name, i, base, size);
omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
};
}
BR/-
Nihad
