linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC v1 5/5] ARM: mvebu: add board init for Armada 1500
Date: Mon, 19 Aug 2013 01:01:54 +0200	[thread overview]
Message-ID: <52115262.70402@gmail.com> (raw)
In-Reply-To: <201308172108.38824.arnd@arndb.de>

On 08/17/2013 09:08 PM, Arnd Bergmann wrote:
> On Friday 16 August 2013, Jason Cooper wrote:
>>> +
>>> +#define ARMADA_1500_REG_BASE_VIRT	0xf6000000
>>> +#define ARMADA_1500_REG_BASE_SIZE	0x03000000
>>> +
>>> +static struct map_desc armada_1500_io_desc[] __initdata = {
>>> +	{
>>> +		.virtual	= ARMADA_1500_REG_BASE_VIRT,
>>> +		.pfn		= __phys_to_pfn(ARMADA_1500_REG_BASE_VIRT),
>>> +		.length		= ARMADA_1500_REG_BASE_SIZE,
>>> +		.type		= MT_DEVICE,
>>> +	},
>>> +};
>
> You should really try to find out what driver uses this. If you have a requirement
> that VIRT == PHYS here, the most likely explanation is that some driver accidentally
> uses readl/writel on the physical address rather than on the result of ioremap.
>
> You can try shrinking the area using bisection until you have found the offending
> driver based on the address.

While bringing up timer and irq, I had no luck without that mapping,
but I didn't try without later on. There is no driver requiring it,
as I either only use mainline drivers that never knew about A1500
before, or I have written it on my own (dw-apb-ictl).

I don't think it is required and will try to remove it, now that I
know I have set up core stuff correctly and it boots.

>>> +static void __init armada_1500_timer_and_clk_init(void)
>>> +{
>>> +	of_clk_init(NULL);
>>> +	clocksource_of_init();
>>> +}
>>> +
>>> +static void __init armada_1500_dt_init(void)
>>> +{
>>> +	l2x0_of_init(0x70c00000, 0xfeffffff);
>
> New platforms should call this as 'l2x0_of_init(0, 0);' and get the bits from DT.

Ok.

> Note that we should really change the common code to do both the of_clk_init()
> and the l2x0_of_init() automatically, but that needs to be done with some care,
> in order to not break any of the existing platforms. Would you be able to do
> one of the two? We can then get the next person that wants to add a platform
> to do the last one ;-)

Scary but that reduces armada-1500.c to MACH descriptor and DT
compatible only ;) I don't expect any weird hacks required for
it anyway.

Sebastian

  parent reply	other threads:[~2013-08-18 23:01 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 19:41 [RFC v1 0/5] ARM: Initial support for Marvell Armada 1500 Sebastian Hesselbarth
     [not found] ` <1376682098-10580-5-git-send-email-sebastian.hesselbarth@gmail.com>
2013-08-16 19:50   ` [RFC v1 4/5] ARM: mvebu: add Armada 1500 and Sony NSZ-GS7 device tree files Jason Cooper
2013-08-16 19:54     ` Sebastian Hesselbarth
2013-08-16 20:22   ` Jason Cooper
2013-08-17 19:28   ` Arnd Bergmann
2013-08-18 23:11     ` Sebastian Hesselbarth
2013-08-19  8:46       ` Arnd Bergmann
     [not found] ` <1376682098-10580-2-git-send-email-sebastian.hesselbarth@gmail.com>
2013-08-17 13:24   ` [RFC v1 1/5] irqchip: add Armada 1500 APB interrupt controller Sebastian Hesselbarth
     [not found] ` <1376682098-10580-6-git-send-email-sebastian.hesselbarth@gmail.com>
2013-08-16 20:48   ` [RFC v1 5/5] ARM: mvebu: add board init for Armada 1500 Jason Cooper
2013-08-17 13:01     ` Sebastian Hesselbarth
2013-08-17 19:08     ` Arnd Bergmann
2013-08-17 19:13       ` Arnd Bergmann
2013-08-18 23:01       ` Sebastian Hesselbarth [this message]
2013-08-19  7:44         ` Arnd Bergmann
2013-08-19 14:52       ` Sebastian Hesselbarth
2013-08-19 17:47         ` Arnd Bergmann
2013-08-17 15:38   ` Thomas Petazzoni
2013-08-17 19:12   ` Arnd Bergmann
2013-08-18 23:02     ` Sebastian Hesselbarth
2013-08-19  7:58       ` Arnd Bergmann
     [not found] ` <1376682098-10580-4-git-send-email-sebastian.hesselbarth@gmail.com>
2013-08-16 20:39   ` [RFC v1 3/5] ARM: mvebu: add Armada 150 uart to lowlevel debug Jason Cooper
2013-08-17 19:01   ` Arnd Bergmann
2013-08-17 19:32 ` [RFC v1 0/5] ARM: Initial support for Marvell Armada 1500 Arnd Bergmann
2013-08-18 23:21   ` Sebastian Hesselbarth
2013-08-19  8:03     ` Arnd Bergmann
2013-08-18 16:34 ` Thomas Petazzoni
2013-08-27 14:19 ` Thomas Petazzoni
2013-08-27 16:45   ` Sebastian Hesselbarth
2013-08-27 16:51     ` Thomas Petazzoni
2013-08-27 19:38   ` Arnd Bergmann
2013-08-28  0:14 ` [PATCH RFC v2 0/6] " Sebastian Hesselbarth
2013-08-28  0:14 ` [PATCH RFC v2 1/6] irqchip: add DesignWare APB ICTL interrupt controller Sebastian Hesselbarth
2013-08-28  0:14 ` [PATCH RFC v2 2/6] ARM: add Marvell Berlin SoC familiy to Marvell doc Sebastian Hesselbarth
2013-08-28  0:14 ` [PATCH RFC v2 3/6] ARM: add Marvell Berlin and Armada 1500 to multi_v7_defconfig Sebastian Hesselbarth
2013-08-28  0:14 ` [PATCH RFC v2 4/6] ARM: add Marvell Berlin UART0 lowlevel debug Sebastian Hesselbarth
2013-08-28  0:14 ` [PATCH RFC v2 5/6] ARM: add Armada 1500 and Sony NSZ-GS7 device tree files Sebastian Hesselbarth
2013-08-28 12:14   ` Jason Cooper
2013-08-28 12:23     ` Sebastian Hesselbarth
2013-08-28  0:14 ` [PATCH RFC v2 6/6] ARM: add initial support for Marvell Berlin SoCs Sebastian Hesselbarth

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=52115262.70402@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --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 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).