mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* barebox on imx23-olinuxino
@ 2012-08-27 15:37 Fadil Berisha
  2012-08-27 18:01 ` Juergen Beisert
  0 siblings, 1 reply; 5+ messages in thread
From: Fadil Berisha @ 2012-08-27 15:37 UTC (permalink / raw)
  To: barebox

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@mci0: registered as mci0
ehci@ehci0: USB EHCI 1.00
No MCI card preset
Cannot create the 'env0' persistant environment storage (-19)
Malloc space: 0x40c00000 -> 0x40ffffff (size  4 MB)
Stack space : 0x40bf8000 -> 0x40c00000 (size 32 kB)
Open /dev/env0 No such file or directory
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...

I can't get activated SD card.
When compile with CONFIG_MCI_STARTUP, system hang after mxs_mci@mci0:
registered as mci0.
If compile without  CONFIG_MCI_STARTUP, after probe mci0.probe=1
system hang again.
Looking at code mci-core.c found  following note:
 /*
		 * If it fails, add the 'probe' parameter to give the user
		 * a chance to insert a card and try again. Note: This may fail
		 * systems that rely on the MCI card for startup (for the
		 * persistant environment for example)
		 */
imx23-olinuxino board rely on the MCI for startup. Any input to do
probe in this case is greatly appreciated.

Fadil Berisha

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: barebox on imx23-olinuxino
  2012-08-27 15:37 barebox on imx23-olinuxino Fadil Berisha
@ 2012-08-27 18:01 ` Juergen Beisert
  2012-09-02  5:25   ` Fadil Berisha
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Beisert @ 2012-08-27 18:01 UTC (permalink / raw)
  To: barebox, f.koliqi

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@mci0: registered as mci0
> ehci@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/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: barebox on imx23-olinuxino
  2012-08-27 18:01 ` Juergen Beisert
@ 2012-09-02  5:25   ` Fadil Berisha
  2012-09-04 20:47     ` Sascha Hauer
  0 siblings, 1 reply; 5+ messages in thread
From: Fadil Berisha @ 2012-09-02  5:25 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: barebox on imx23-olinuxino
  2012-09-02  5:25   ` Fadil Berisha
@ 2012-09-04 20:47     ` Sascha Hauer
  2012-09-04 21:23       ` Fadil Berisha
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2012-09-04 20:47 UTC (permalink / raw)
  To: Fadil Berisha; +Cc: barebox, Juergen Beisert

On Sun, Sep 02, 2012 at 01:25:01AM -0400, Fadil Berisha wrote:
> 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);
>

The problem is the 5th parameter. It is the size of the memory resource.
When speicified as 0 you will not be able to request it. It seems we
still have not catched all of these. We should probably add a warning
if someone tries to register a device with a valid resource but size =
0.

Sascha
 
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: barebox on imx23-olinuxino
  2012-09-04 20:47     ` Sascha Hauer
@ 2012-09-04 21:23       ` Fadil Berisha
  0 siblings, 0 replies; 5+ messages in thread
From: Fadil Berisha @ 2012-09-04 21:23 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox, Juergen Beisert

Sascha

On Tue, Sep 4, 2012 at 4:47 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> The problem is the 5th parameter. It is the size of the memory resource.
> When speicified as 0 you will not be able to request it. It seems we
> still have not catched all of these. We should probably add a warning
> if someone tries to register a device with a valid resource but size =
> 0.
Thank you for your help. I will clean-up my workaround and define size
as needed. Barebox booting good in olinuxino. At this stage, I am
doing testing and adjusting env parameters.

Regards,
Fadil Berisha

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-04 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-27 15:37 barebox on imx23-olinuxino Fadil Berisha
2012-08-27 18:01 ` Juergen Beisert
2012-09-02  5:25   ` Fadil Berisha
2012-09-04 20:47     ` Sascha Hauer
2012-09-04 21:23       ` Fadil Berisha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox