barebox on imx23-olinuxino

Fadil Berisha f.koliqi at gmail.com
Sun Sep 2 01:25:01 EDT 2012


Juergen,

Sorry, for replying so late, but took me time to identify problem.
 I am using function:

add_generic_device("mxs_mci", DEVICE_ID_DYNAMIC, NULL, IMX_SSP1_BASE, 0,
			       IORESOURCE_MEM, &mci_pdata);

It is supposed during initialisation to pass parameter  IMX_SSP1_BASE,
but in  function
 mxs_mci_initialize register base  mxs_mci->regs is initialised with
zero. As result mxs_mci_initialize writing in wrong memory area and
system hangs.
My workaround is:

static int mxs_mci_initialize(struct mci_host *host, struct device_d *mci_dev)
{
	struct mxs_mci_host *mxs_mci = to_mxs_mci(host);

+	mxs_mci->regs = IMX_SSP1_BASE;

 Bellow is response with SD Card successfully added.

Regards

Fadil Berisha

mci at mci0: SD Card Rev. 2.00 or later detected
mci at mci0: Put the Card in Identify Mode
mci at mci0: Card's identification data is:
03534453-55303247-8071997F-BE00BC97
mci at mci0: Get/Set relative address
mci at mci0: Get card's specific data
mci at mci0: Card's specific data is: 00260032-5F5A83AE-FEFBCFFF-928040DF
mci at mci0: Transfer speed: 25000000
mci at mci0: Max. block length are: Write=1024, Read=1024 Bytes
mci at mci0: Capacity: 1886 MiB
mci at mci0: Limiting max. read block size down to 512
mci at mci0: Limiting max. write block size down to 512
mci at mci0: Read block length: 512, Write block length: 512
mci at mci0: Select the card, and put it into Transfer Mode
mci at mci0: Changing transfer frequency
mci at mci0: Trying to read the SCR (try 1 of 3)
mci at mci0: Prepare for bus width change
mci at mci0: Set SD bus width to 4 bit
IO settings: bus width=4, frequency=400000 Hz
mci at mci0: Card is up and running now, registering as a disk
mci at mci0: registered disk0
mci at mci0: mci_sd_read: Read 1 block(s), starting at 0
mci at mci0: SD Card successfully added
barebox:/ ls dev
defaultenv    disk0         disk0.0       disk0.1       disk0.2
disk0.3       full          mem           null          ram0
zero
barebox:/


On Mon, Aug 27, 2012 at 2:01 PM, Juergen Beisert <jbe at pengutronix.de> wrote:
> Hi Fadil,
>
> Fadil Berisha wrote:
>> Based on falconfing and mx23-evk, I did barebox port on
>> imx23-olinuxino board.  Here is barebox boot:
>>
>> Board: Olimex.ltd imx23-olinuxino
>> registered netconsole as cs1
>> Min. frequency is 1476 Hz
>> Max. frequency is 48000000 Hz
>> mxs_mci at mci0: registered as mci0
>> ehci at ehci0: USB EHCI 1.00
>> No MCI card preset
>
> In the mci-core.c source file you can enable the DEBUG macro to include more
> debug output. This will print more information about the MCI card detection.
> Maybe it helps.
>
> Check also:
>  - pin multiplexing
>  - power supply to the SD card
>  - GPIOs for detecting the SD card (some kind of inserting signal)
>  - increase the min frequency to about 400 kHz. Maybe 1476 Hz are too slow and
>    conflict with some timeout values
>
> Regards,
> Juergen
>
> --
> Pengutronix e.K.                              | Juergen Beisert             |
> Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |



More information about the barebox mailing list