All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Marc Zyngier <Marc.Zyngier-5wv7dgnIgG8@public.gmane.org>,
	Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 6/6 v4] ARM: realview: basic device tree implementation
Date: Fri, 25 Jul 2014 16:50:10 +0100	[thread overview]
Message-ID: <20140725155010.GP21766@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140725152401.GA21830@leverpostej>

On Fri, Jul 25, 2014 at 04:24:02PM +0100, Mark Rutland wrote:
> Hi Linus,
> 
> On Fri, Jul 25, 2014 at 02:23:48PM +0100, Linus Walleij wrote:
> > +static void __init realview_dt_init_machine(void)
> > +{
> > +       int ret;
> > +
> > +#if IS_ENABLED(CONFIG_CACHE_L2X0)
> > +       if (of_machine_is_compatible("arm,realview-eb"))
> > +               /*
> > +                * 1MB (128KB/way), 8-way associativity,
> > +                * evmon/parity/share enabled
> > +                * Bits:  .... ...0 0111 1001 0000 .... .... ....
> > +                */
> > +               l2x0_of_init(0x00790000, 0xfe000fff);
> > +       else if (of_machine_is_compatible("arm,realview-pb1176"))
> > +               /*
> > +                * 128Kb (16Kb/way) 8-way associativity.
> > +                * evmon/parity/share enabled.
> > +                */
> > +               l2x0_of_init(0x00730000, 0xfe000fff);
> > +       else if (of_machine_is_compatible("arm,realview-pb11mp"))
> > +               /*
> > +                * 1MB (128KB/way), 8-way associativity,
> > +                * evmon/parity/share enabled
> > +                * Bits:  .... ...0 0111 1001 0000 .... .... ....
> > +                */
> > +               l2x0_of_init(0x00730000, 0xfe000fff);
> > +       else if (of_machine_is_compatible("arm,realview-pbx"))
> > +               /*
> > +                * 16KB way size, 8-way associativity, parity disabled
> > +                * Bits:  .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... ....
> > +                */
> > +               l2x0_of_init(0x02520000, 0xc0000fff);
> > +#endif
> 
> Are these just copied form what we already have for non-DT?
> 
> Do we know that these are all necessary?

It is necessary to provide the cache sizes on Realview because the
older L2C210/L2C220 do not have a method of encoding that information
in the register - and given that ARM doesn't seem to like shipping
Linux compatible boot loaders on their eval hardware, we can't really
say that it should be dealt with there.

I toyed with the idea of adding the standard cache size specifications
to the L2C code, it sounds like there's a reason to do that now.

Let's not mess around with adding stuff like the above to work around
the L2 code not parsing the appropriate specs from DT, let's do the
right thing and add bindings to allow DT to provide the cache geometry.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6 v4] ARM: realview: basic device tree implementation
Date: Fri, 25 Jul 2014 16:50:10 +0100	[thread overview]
Message-ID: <20140725155010.GP21766@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140725152401.GA21830@leverpostej>

On Fri, Jul 25, 2014 at 04:24:02PM +0100, Mark Rutland wrote:
> Hi Linus,
> 
> On Fri, Jul 25, 2014 at 02:23:48PM +0100, Linus Walleij wrote:
> > +static void __init realview_dt_init_machine(void)
> > +{
> > +       int ret;
> > +
> > +#if IS_ENABLED(CONFIG_CACHE_L2X0)
> > +       if (of_machine_is_compatible("arm,realview-eb"))
> > +               /*
> > +                * 1MB (128KB/way), 8-way associativity,
> > +                * evmon/parity/share enabled
> > +                * Bits:  .... ...0 0111 1001 0000 .... .... ....
> > +                */
> > +               l2x0_of_init(0x00790000, 0xfe000fff);
> > +       else if (of_machine_is_compatible("arm,realview-pb1176"))
> > +               /*
> > +                * 128Kb (16Kb/way) 8-way associativity.
> > +                * evmon/parity/share enabled.
> > +                */
> > +               l2x0_of_init(0x00730000, 0xfe000fff);
> > +       else if (of_machine_is_compatible("arm,realview-pb11mp"))
> > +               /*
> > +                * 1MB (128KB/way), 8-way associativity,
> > +                * evmon/parity/share enabled
> > +                * Bits:  .... ...0 0111 1001 0000 .... .... ....
> > +                */
> > +               l2x0_of_init(0x00730000, 0xfe000fff);
> > +       else if (of_machine_is_compatible("arm,realview-pbx"))
> > +               /*
> > +                * 16KB way size, 8-way associativity, parity disabled
> > +                * Bits:  .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... ....
> > +                */
> > +               l2x0_of_init(0x02520000, 0xc0000fff);
> > +#endif
> 
> Are these just copied form what we already have for non-DT?
> 
> Do we know that these are all necessary?

It is necessary to provide the cache sizes on Realview because the
older L2C210/L2C220 do not have a method of encoding that information
in the register - and given that ARM doesn't seem to like shipping
Linux compatible boot loaders on their eval hardware, we can't really
say that it should be dealt with there.

I toyed with the idea of adding the standard cache size specifications
to the L2C code, it sounds like there's a reason to do that now.

Let's not mess around with adding stuff like the above to work around
the L2 code not parsing the appropriate specs from DT, let's do the
right thing and add bindings to allow DT to provide the cache geometry.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2014-07-25 15:50 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 13:23 [PATCH 0/6] ARM RealView DeviceTree support v4 Linus Walleij
2014-07-25 13:23 ` Linus Walleij
     [not found] ` <1406294628-16079-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-25 13:23   ` [PATCH 1/6] leds: add a driver for syscon-based LEDs Linus Walleij
2014-07-25 13:23     ` Linus Walleij
     [not found]     ` <1406294628-16079-2-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-13  9:14       ` Linus Walleij
2014-08-13  9:14         ` Linus Walleij
2014-07-25 13:23   ` [PATCH 2/6] leds: add device tree bindings for syscon LEDs Linus Walleij
2014-07-25 13:23     ` Linus Walleij
     [not found]     ` <1406294628-16079-3-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-25 14:07       ` Rob Herring
2014-07-25 14:07         ` Rob Herring
     [not found]         ` <CAL_Jsq+-G68wjBLDbELHRDFcGYRa65-Hx9WoD6HypXNjJKVDvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-13  9:31           ` Linus Walleij
2014-08-13  9:31             ` Linus Walleij
2014-07-25 13:23   ` [PATCH 3/6] power: reset: driver for the Versatile syscon reboot Linus Walleij
2014-07-25 13:23     ` Linus Walleij
2014-07-25 13:23   ` [PATCH 4/6] power: reset: DT bindings for the Versatile reset driver Linus Walleij
2014-07-25 13:23     ` Linus Walleij
2014-07-25 13:23   ` [PATCH 5/6] soc: add driver for the ARM RealView Linus Walleij
2014-07-25 13:23     ` Linus Walleij
2014-07-25 13:23   ` [PATCH 6/6 v4] ARM: realview: basic device tree implementation Linus Walleij
2014-07-25 13:23     ` Linus Walleij
     [not found]     ` <1406294628-16079-7-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-25 15:24       ` Mark Rutland
2014-07-25 15:24         ` Mark Rutland
2014-07-25 15:50         ` Russell King - ARM Linux [this message]
2014-07-25 15:50           ` Russell King - ARM Linux
     [not found]           ` <20140725155010.GP21766-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-07-25 15:58             ` Arnd Bergmann
2014-07-25 15:58               ` Arnd Bergmann
2014-09-01 12:03               ` Russell King - ARM Linux
2014-09-01 12:03                 ` Russell King - ARM Linux
     [not found]                 ` <20140901120313.GI30401-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-09-01 12:11                   ` Arnd Bergmann
2014-09-01 12:11                     ` Arnd Bergmann
2014-09-01 11:52         ` Linus Walleij
2014-09-01 11:52           ` Linus Walleij
     [not found]           ` <CACRpkdaugAmVt5CF194xd+eVyz=Yfir6Jz0k9h4VSvSWLkKPRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-01 12:17             ` Mark Rutland
2014-09-01 12:17               ` Mark Rutland
2014-09-01 12:27               ` Linus Walleij
2014-09-01 12:27                 ` Linus Walleij
     [not found]                 ` <CACRpkdYoqhiLqVMqrrUxZEq-c63NuDT--FVWs3j_5b1BC24FeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-01 12:44                   ` Mark Rutland
2014-09-01 12:44                     ` Mark Rutland

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=20140725155010.GP21766@n2100.arm.linux.org.uk \
    --to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
    --cc=Marc.Zyngier-5wv7dgnIgG8@public.gmane.org \
    --cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
    --cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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.