linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* MX28 & finding out boot mode
  2012-08-30  8:25 MX28 & finding out boot mode Wolfram Sang
@ 2012-08-30  8:12 ` Dong Aisheng
  2012-08-30  8:47   ` Chen Peter-B29397
  0 siblings, 1 reply; 7+ messages in thread
From: Dong Aisheng @ 2012-08-30  8:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 30, 2012 at 04:25:18PM +0800, Wolfram Sang wrote:
> Hi,
> 
> is there a way to find out how the MX28 was booted? I could read out the
> bootmode-pins for indication. Still, either by button or by empty NAND,
> the CPU could have been booted via USB recovery mode. And going through
> the docs and the bootlets code, I can't find a way to determine if USB
> recovery was used.
> 
> So, can USB recovery mode be detected somehow? Then, this and reading
> pins should be sufficent, no?
> 
Add Frank&Peter who may know it.

Regards
Dong Aisheng

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

* MX28 & finding out boot mode
@ 2012-08-30  8:25 Wolfram Sang
  2012-08-30  8:12 ` Dong Aisheng
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2012-08-30  8:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

is there a way to find out how the MX28 was booted? I could read out the
bootmode-pins for indication. Still, either by button or by empty NAND,
the CPU could have been booted via USB recovery mode. And going through
the docs and the bootlets code, I can't find a way to determine if USB
recovery was used.

So, can USB recovery mode be detected somehow? Then, this and reading
pins should be sufficent, no?

Thanks,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120830/b1553e27/attachment.sig>

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

* MX28 & finding out boot mode
  2012-08-30  8:12 ` Dong Aisheng
@ 2012-08-30  8:47   ` Chen Peter-B29397
  2012-08-30  9:13     ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Chen Peter-B29397 @ 2012-08-30  8:47 UTC (permalink / raw)
  To: linux-arm-kernel

 
> > is there a way to find out how the MX28 was booted? I could read out
> the
> > bootmode-pins for indication. Still, either by button or by empty NAND,
> > the CPU could have been booted via USB recovery mode. And going through
> > the docs and the bootlets code, I can't find a way to determine if USB
> > recovery was used.
> >
> > So, can USB recovery mode be detected somehow? Then, this and reading
> > pins should be sufficent, no?
> >
> Add Frank&Peter who may know it.
As far as I know, the romcode decides which mode is used, I haven't read
romcode, so don't know priority of below booting selection.

OTP, button, boot media (if no boot media, will go to USB recovery mode)

Why do you need to know USB recovery mode at your code? 

Peter

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

* MX28 & finding out boot mode
  2012-08-30  8:47   ` Chen Peter-B29397
@ 2012-08-30  9:13     ` Wolfram Sang
  2012-08-30  9:40       ` Chen Peter-B29397
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2012-08-30  9:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 30, 2012 at 08:47:21AM +0000, Chen Peter-B29397 wrote:
>  
> > > is there a way to find out how the MX28 was booted? I could read out
> > the
> > > bootmode-pins for indication. Still, either by button or by empty NAND,
> > > the CPU could have been booted via USB recovery mode. And going through
> > > the docs and the bootlets code, I can't find a way to determine if USB
> > > recovery was used.
> > >
> > > So, can USB recovery mode be detected somehow? Then, this and reading
> > > pins should be sufficent, no?
> > >
> > Add Frank&Peter who may know it.

Thanks.

> As far as I know, the romcode decides which mode is used, I haven't read
> romcode, so don't know priority of below booting selection.

For me, this is not about priorities, I just want to know which mode was
really used in the end :)

> Why do you need to know USB recovery mode at your code? 

Some customers want this to handle the recovery case differently than
the standard case.

Thanks for the help!

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120830/43724dbe/attachment.sig>

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

* MX28 & finding out boot mode
  2012-08-30  9:13     ` Wolfram Sang
@ 2012-08-30  9:40       ` Chen Peter-B29397
  2012-08-30  9:55         ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Chen Peter-B29397 @ 2012-08-30  9:40 UTC (permalink / raw)
  To: linux-arm-kernel

 
> 
> Some customers want this to handle the recovery case differently than
> the standard case.
> 

If you can't find method at datasheet (like reading some registers), a workaround
is according to usb register, usually, usbcmd.rs (pull-up DP) stands for usb is using
or not.

1. Make sure usbcmd.rs = 0 is the default value.
2. Before the usb code is running, the usbcmd.rs should be 0 at normal mode
So, get a flag before usb code is running

if (usbcmd.rs == 0)
	usb_recover_mode = 0;
else
	usb_recover_mode = 1;


Peter

> Thanks for the help!
> 
>    Wolfram
> 
> --
> Pengutronix e.K.                           | Wolfram Sang
> |
> Industrial Linux Solutions                 | http://www.pengutronix.de/
> |

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

* MX28 & finding out boot mode
  2012-08-30  9:40       ` Chen Peter-B29397
@ 2012-08-30  9:55         ` Wolfram Sang
  2012-09-01 21:00           ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2012-08-30  9:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 30, 2012 at 09:40:05AM +0000, Chen Peter-B29397 wrote:
>  
> > 
> > Some customers want this to handle the recovery case differently than
> > the standard case.
> > 
> 
> If you can't find method at datasheet (like reading some registers), a workaround

I hoped there was one bit in the persistent registers where the ROM
code stores such stuff. Sadly, those are usually not documented, so I
asked.

> is according to usb register, usually, usbcmd.rs (pull-up DP) stands for usb is using
> or not.

I think this is too much of a workaround for me :)

Thanks anyway!

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120830/9a726b79/attachment.sig>

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

* MX28 & finding out boot mode
  2012-08-30  9:55         ` Wolfram Sang
@ 2012-09-01 21:00           ` Marek Vasut
  0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2012-09-01 21:00 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Wolfram Sang,

> On Thu, Aug 30, 2012 at 09:40:05AM +0000, Chen Peter-B29397 wrote:
> > > Some customers want this to handle the recovery case differently than
> > > the standard case.
> > 
> > If you can't find method at datasheet (like reading some registers), a
> > workaround
> 
> I hoped there was one bit in the persistent registers where the ROM
> code stores such stuff. Sadly, those are usually not documented, so I
> asked.
> 
> > is according to usb register, usually, usbcmd.rs (pull-up DP) stands for
> > usb is using or not.
> 
> I think this is too much of a workaround for me :)

I cycled the board a few times and checked the ICOLL setup, but I gave up since 
I don't care enough.

btw. did you cc me on gmail intentionally ? ;-)

> Thanks anyway!

Best regards,
Marek Vasut

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30  8:25 MX28 & finding out boot mode Wolfram Sang
2012-08-30  8:12 ` Dong Aisheng
2012-08-30  8:47   ` Chen Peter-B29397
2012-08-30  9:13     ` Wolfram Sang
2012-08-30  9:40       ` Chen Peter-B29397
2012-08-30  9:55         ` Wolfram Sang
2012-09-01 21:00           ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).