mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: vj <vicencb@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/7] [RFC][PATCH] archosg9: add support for tablet
Date: Wed, 26 Sep 2012 09:06:08 +0200	[thread overview]
Message-ID: <20120926070608.GG1322@pengutronix.de> (raw)
In-Reply-To: <1348613994-1793-1-git-send-email-vicencb@gmail.com>

On Wed, Sep 26, 2012 at 12:59:47AM +0200, vj wrote:
> Hello,
> A this is my first contribution, so I'm basically requesting for comments.
> 
> The attached patch adds support for Archos G9 tablet wich uses an OMAP4460 cpu.

Nice :)
I should have bought that one instead of a Acer.


> 
> A question I have is what does omap_vector_init do?
> It breaks usb-booting.

I digged around a bit. The funny thing is that this was introduced with
OMAP4 support and is only done on OMAP4. U-Boot instead has the following:

> #if !defined(CONFIG_TEGRA2)
> /*
>  * Setup vector:
>  * (OMAP4 spl TEXT_BASE is not 32 byte aligned.
>  * Continue to use ROM code vector only in OMAP4 spl)
>  */
> #if !(defined(CONFIG_OMAP44XX) && defined(CONFIG_SPL_BUILD))
> 	/* Set V=0 in CP15 SCTRL register - for VBAR to point to vector
>  * */
> 	mrc	p15, 0, r0, c1, c0, 0	@ Read CP15 SCTRL Register
> 	bic	r0, #CR_V		@ V = 0
> 	mcr	p15, 0, r0, c1, c0, 0	@ Write CP15 SCTRL Register
> 
> 	/* Set vector address in CP15 VBAR register */
> 	ldr	r0, =_start
> 	mcr	p15, 0, r0, c12, c0, 0	@Set VBAR
> #endif
> #endif	/* !Tegra2 */

So in U-Boot it's done for every ARMv7 *except* OMAP4 (and Tegra)

ARM has this information about it:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0434b/CIHHDAIH.html

> Purpose
> 
>     Provides the exception base address for exceptions that are not
>     handled in monitor mode.
> 
> Usage constraints
> 
>     The VBAR is:
> 
>         * only accessible in privileged modes
>         * only accessible in Secure state.

I think this is necessary to move the exception vector from ROM to our
own code. Does it work to read the VBAR register using the following
instruction:

	MRC p15, 0, <Rd>, c12, c0, 0 ; Read VBAR Register

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

  parent reply	other threads:[~2012-09-26  7:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[RFC][PATCH] archosg9: add support for tablet>
2012-09-25 22:59 ` vj
2012-09-25 22:59   ` [PATCH 1/7] Improved an error message and solved a minor bug vj
2012-09-26  7:11     ` Sascha Hauer
2012-09-25 22:59   ` [PATCH 2/7] added debug info for twl6030 vj
2012-09-25 22:59   ` [PATCH 3/7] OMAP specific changes vj
2012-09-26  7:18     ` Sascha Hauer
2012-09-25 22:59   ` [PATCH 4/7] Add USB booting capabilities to OMAP vj
2012-09-26  7:45     ` Sascha Hauer
2012-09-28  0:27       ` vj
2012-09-28  7:32         ` Sascha Hauer
2012-09-25 22:59   ` [PATCH 5/7] add console support over the same USB used for booting vj
2012-09-25 22:59   ` [PATCH 6/7] add filesystem " vj
2012-09-25 22:59   ` [PATCH 7/7] Add support for Archos G9 tablet vj
2012-09-26  3:57   ` [PATCH 0/7] [RFC][PATCH] archosg9: add support for tablet Antony Pavlov
2012-09-26  7:06   ` Sascha Hauer [this message]
2012-09-26 22:38     ` vj
2012-09-26  8:16   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120926070608.GG1322@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=vicencb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox