Forum Discussion
Altera_Forum
Honored Contributor
16 years agomounting SD Card on uClinux
Hi everyone, I'm trying to implement a fat file system on sd card I followed the instructions for Altera SPI Core on this page http://www.nioswiki.com/operatingsystems/uclinux/mmcsd didn't w...
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Have you edited your dts file with mmc-spi-slot? See section 3.2 in my uClinux_nios2.pdf document. --- Quote End --- Hi, Thanks for your respond. I got it to work and thanks to Alex Hornung. Problem: 1) device tree spi_0: spi@0x140 { compatible = "ALTR,spi-altera_avalon_spi", "ALTR,spi-1.0"; reg = < 0x00000140 0x00000020 >; interrupt-parent = < &myCPU >; interrupts = < 3 >; /*# address-cells = < 1 >; */ <-comment out
/*# size-cells = < 0 >; */ <-comment out mmc-spi@0 { <- make sure is named mmc-spi compatible = "mmc-spi-slot"; spi-max-frequency = < 10000000 >; reg = < 0x00000000 >; voltage-ranges = < 3300 3300 >; <-missing important piece }; //end mmc-slot@0 }; //end spi@0x140 (mmc_spi) 2) menuconfig - Make sure selection is [*] and not [M] 3) of_mmc_spi.c <-there is a bug for (i = 0; i < num_ranges; i++) { const int j = i * 2; u32 mask; u32 vdd_min = be32_to_cpu(voltage_ranges[j]); u32 vdd_max = be32_to_cpu(voltage_ranges[j + 1]); mask = mmc_vddrange_to_ocrmask(voltage_ranges[j],
voltage_ranges[j + 1]);
mask = mmc_vddrange_to_ocrmask(vdd_min, vdd_max); if (!mask) { ret = -EINVAL; dev_err(dev, "OF: voltage-range# %d is invalid\n", i); goto err_ocr; } oms->pdata.ocr_mask |= mask; }