All of lore.kernel.org
 help / color / mirror / Atom feed
From: hjk@linutronix.de (Hans J. Koch)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/07] Basic IO mappings for mach-tcc8k
Date: Tue, 23 Mar 2010 11:15:40 +0100	[thread overview]
Message-ID: <20100323101540.GB2049@bluebox.local> (raw)
In-Reply-To: <63386a3d1003230029r7ed7c4adm107298686aa14d5e@mail.gmail.com>

On Tue, Mar 23, 2010 at 08:29:01AM +0100, Linus Walleij wrote:
> 2010/3/22 Hans J. Koch <hjk@linutronix.de>:
> 
> > Map the IO ranges of TCC8xxx peripherals.
> > + ? ? ? {
> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= INT_SRAM_BASE_VIRT, ? /* Internal SRAM */
> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(INT_SRAM_BASE),
> > + ? ? ? ? ? ? ? .length ? ? ? ? = INT_SRAM_SIZE,
> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE
> > + ? ? ? },
> 
> MT_DEVICE is probably inappropriate here as well.
> 
> > + ? ? ? {
> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= DATA_TCM_BASE_VIRT, ? /* Data TCM */
> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(DATA_TCM_BASE),
> > + ? ? ? ? ? ? ? .length ? ? ? ? = DATA_TCM_SIZE,
> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE
> > + ? ? ? },
> 
> Actually, look close at your specs here, because you seem to have both
> SRAM and TCM, usually you have ITCM+DTCM, so the thing that is
> called SRAM may be something else.
> 
> Looking at the .h file:
> 
> +#define INT_SRAM_BASE          0x30000000
> +#define INT_SRAM_SIZE          SZ_32K
> (...)
> +#define DATA_TCM_BASE          0xa0000000
> +#define DATA_TCM_SIZE          SZ_8K
> 
> Check if the SRAM is really an SRAM and not ITCM (which can be
> suspected).

I'm quite sure it's normal SRAM. I've got the boot ROM code sources, they
use it for both code and variables, like any standard SRAM. 

> Also check that the DTCM is really such a thing.

Yep, I'll do this.

> (The code in arch/arm/kernel/tcm.c does this once you enable it,
> it will scream if the config of the system does not match what the
> CPU register is saying about ITCM+DTCM.)

OK, will try.

> 
> If the DTCM is really an embedded TCM you can move it wherever
> you want, even i physical memory space. It doesn't have to be on
> 0xa0000000, this is probably only the place where your boot code
> locates it.

Thanks a lot for your detailed review and your hints.

Hans

> 
> Yours,
> Linus Walleij

  reply	other threads:[~2010-03-23 10:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 19:19 [PATCH 0/7] Add basic support for Telechips TCC8xxx SoCs Hans J. Koch
2010-03-22 19:21 ` [PATCH 01/07] Introduce plat-tcc Hans J. Koch
2010-03-22 19:23 ` [PATCH 02/07] Add clock framework for plat-tcc Hans J. Koch
2010-03-22 19:24 ` [PATCH 03/07] Introduce plat-tcc irq framework Hans J. Koch
2010-03-22 19:26 ` [PATCH 04/07] Add TCC8xxx system timer Hans J. Koch
2010-03-22 19:27 ` [PATCH 05/07] Basic IO mappings for mach-tcc8k Hans J. Koch
2010-03-22 21:13   ` Linus Walleij
2010-03-22 22:24     ` Hans J. Koch
2010-03-22 22:28   ` Hans J. Koch
2010-03-23  7:29   ` Linus Walleij
2010-03-23 10:15     ` Hans J. Koch [this message]
2010-03-26 17:28       ` Linus Walleij
2010-03-26 17:57         ` Hans J. Koch
2010-03-27  9:33           ` Linus Walleij
2010-03-27 15:26             ` Hans J. Koch
2010-03-22 19:29 ` [PATCH 06/07] Add common platform devices for TCC8xxx SoCs Hans J. Koch
2010-03-22 19:31 ` [PATCH 07/07] Add board support for Telechips TCC8000-SDK board Hans J. Koch

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=20100323101540.GB2049@bluebox.local \
    --to=hjk@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.