From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"patches@linaro.org" <patches@linaro.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH V2 31/33] xen/arm: Add platform specific code for the exynos5
Date: Thu, 09 May 2013 14:03:36 +0100 [thread overview]
Message-ID: <518B9EA8.5030307@linaro.org> (raw)
In-Reply-To: <1368094779.17285.128.camel@zakaz.uk.xensource.com>
On 05/09/2013 11:19 AM, Ian Campbell wrote:
> On Wed, 2013-05-08 at 03:33 +0100, Julien Grall wrote:
>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>>
>> Changes in v2:
>> - Add dom0 1:1 mapping quirk for the arndale board
>> - s/mapping/mappings/ in comment
>> - Remove debug trap (unnecessary with linux 3.9)
>> ---
>> xen/arch/arm/platforms/Makefile | 1 +
>> xen/arch/arm/platforms/exynos5.c | 86 +++++++++++++++++++++++++++++++
>> xen/include/asm-arm/platforms/exynos5.h | 40 ++++++++++++++
>> 3 files changed, 127 insertions(+)
>> create mode 100644 xen/arch/arm/platforms/exynos5.c
>> create mode 100644 xen/include/asm-arm/platforms/exynos5.h
>>
>> diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
>> index 4313e95..ff2b65b 100644
>> --- a/xen/arch/arm/platforms/Makefile
>> +++ b/xen/arch/arm/platforms/Makefile
>> @@ -1 +1,2 @@
>> obj-y += vexpress.o
>> +obj-y += exynos5.o
>> diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
>> new file mode 100644
>> index 0000000..8620390
>> --- /dev/null
>> +++ b/xen/arch/arm/platforms/exynos5.c
>> @@ -0,0 +1,86 @@
>> +/*
>> + * xen/arch/arm/platforms/exynos5.c
>> + *
>> + * Exynos5 specific settings
>> + *
>> + * Julien Grall <julien.grall@linaro.org>
>> + * Copyright (c) 2013 Linaro Limited.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>> + * GNU General Public License for more details.
>> + */
>> +
>> +#include <asm/p2m.h>
>> +#include <xen/config.h>
>> +#include <xen/device_tree.h>
>> +#include <xen/domain_page.h>
>> +#include <xen/mm.h>
>> +#include <asm/platforms/exynos5.h>
>> +#include <asm/platform.h>
>> +
>> +static int exynos5_init_time(void)
>> +{
>> + uint32_t reg;
>> +
>> + // enable timer on exynos5 arndale board
>> + // should probably be done by u-boot
>
> /* */ please.
>
>> + reg = platform_read_register(EXYNOS5_MCT_G_TCON);
>> + platform_write_register(EXYNOS5_MCT_G_TCON, reg | EXYNOS5_MCT_G_TCON_START);
>> +
>> + return 0;
>> +}
>> +
>> +/* Additionnal mappings for dom0 (Not in the DTS) */
>
> "Additional"
>
>> +static int exynos5_specific_mapping(struct domain *d)
>> +{
>> + /* Map the chip ID */
>> + map_mmio_regions(d, EXYNOS5_PA_CHIPID, EXYNOS5_PA_CHIPID + PAGE_SIZE - 1,
>> + EXYNOS5_PA_CHIPID);
>> +
>> + /* Map the PWM region */
>> + map_mmio_regions(d, EXYNOS5_PA_TIMER,
>> + EXYNOS5_PA_TIMER + (PAGE_SIZE * 2) - 1,
>> + EXYNOS5_PA_TIMER);
>
> If these get added to a future version of the DTS will badness ensue? I
> suppose all we can do is add a check for the new compatible node at that
> time, which we obviously can't do now...
In this case, we can remove this both lines.
map_devices_from_device_tree will do all the work.
But I think it's too specific to be added in the DTS.
>> diff --git a/xen/include/asm-arm/platforms/exynos5.h b/xen/include/asm-arm/platforms/exynos5.h
>> new file mode 100644
>> index 0000000..d77623c
>> --- /dev/null
>> +++ b/xen/include/asm-arm/platforms/exynos5.h
>> @@ -0,0 +1,40 @@
>> +#ifndef __ASM_ARM_PLATFORMS_EXYNOS5_H
>> +#define __ASM_ASM_PLATFORMS_EXYSNO5_H
>> +
>> +#define EXYNOS5_MCT_BASE 0x101c0000
>> +#define EXYNOS5_MCTREG(x) (EXYNOS5_MCT_BASE + (x))
>> +#define EXYNOS5_MCT_G_TCON EXYNOS5_MCTREG(0x240)
>> +#define EXYNOS5_MCT_G_TCON_START (1 << 8)
>
> Inconsistent indent, hard tabs perhaps?
Right. Will be fix on the next patch series.
>> +
>> +#define EXYNOS5_PA_CHIPID 0x10000000
>> +#define EXYNOS5_PA_TIMER 0x12dd0000
>> +/* Base address of system controller */
>> +#define EXYNOS5_PA_PMU 0x10040000
>> +
>> +#define EXYNOS5_SWRESET (EXYNOS5_PA_PMU + 0x0400)
>> +
>> +#define S5P_PA_SYSRAM 0x02020000
>> +
>> +/* Constants below is only used in assembly because the DTS is not yet parsed */
>
> In a subsequent patch?
Yes. It's used in patch 32.
>> +#ifdef __ASSEMBLY__
>> +
>> +/* GIC Base Address */
>> +#define EXYNOS5_GIC_BASE_ADDRESS 0x10480000
>> +
>> +/* Timer's frequency */
>> +#define EXYNOS5_TIMER_FREQUENCY (24 * 1000 * 1000) /* 24 MHz */
>> +
>> +/* Arndale machine ID */
>> +#define MACH_TYPE_SMDK5250 3774
>> +
>> +#endif /* __ASSEMBLY__ */
>> +
>> +#endif /* __ASM_ARM_PLATFORMS_EXYNOS5_H */
>> +/*
>> + * Local variables:
>> + * mode: C
>> + * c-file-style: "BSD"
>> + * c-basic-offset: 4
>> + * indent-tabs-mode: nil
>> + * End:
>> + */
>
>
--
Julien
next prev parent reply other threads:[~2013-05-09 13:03 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 2:33 [PATCH V2 00/33] Support multiple ARM platforms in Xen Julien Grall
2013-05-08 2:33 ` [PATCH V2 01/33] xen/arm: lr must be included in range [0-nr_lr( Julien Grall
2013-05-08 2:33 ` [PATCH V2 02/33] xen/arm: don't allow dom0 to access to vpl011 UART0 memory range Julien Grall
2013-05-08 2:33 ` [PATCH V2 03/33] xen/arm: Remove duplicated GICD_ICPIDR2 definition Julien Grall
2013-05-08 2:33 ` [PATCH V2 04/33] xen/arm: Bump early printk internal buffer to 512 Julien Grall
2013-05-08 13:00 ` Ian Campbell
2013-05-09 14:32 ` Julien Grall
2013-05-09 14:46 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 05/33] xen/arm: Fix early_panic when EARLY_PRINTK is disabled Julien Grall
2013-05-08 2:33 ` [PATCH V2 06/33] xen/arm: Load dtb after dom0 kernel Julien Grall
2013-05-08 2:33 ` [PATCH V2 07/33] xen/arm: Create a hierarchical device tree Julien Grall
2013-05-08 13:11 ` Ian Campbell
2013-05-08 13:34 ` Julien Grall
2013-05-08 13:41 ` Ian Campbell
2013-05-08 15:15 ` Julien Grall
2013-05-08 15:34 ` Ian Campbell
2013-05-09 14:38 ` Julien Grall
2013-05-09 14:43 ` Ian Campbell
2013-05-09 14:55 ` Julien Grall
2013-05-08 13:52 ` Ian Campbell
2013-05-08 15:22 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 08/33] xen/arm: Add helpers to use the " Julien Grall
2013-05-08 13:18 ` Ian Campbell
2013-05-08 15:31 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 09/33] xen/arm: Add helpers to retrieve an address from " Julien Grall
2013-05-08 13:23 ` Ian Campbell
2013-05-08 15:32 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 10/33] xen/arm: Add helpers to retrieve an interrupt description " Julien Grall
2013-05-08 13:30 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 11/33] xen/arm: Introduce gic_route_dt_irq Julien Grall
2013-05-08 13:31 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 12/33] xen/arm: Introduce gic_irq_xlate Julien Grall
2013-05-08 13:32 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 13/33] xen/arm: Introduce setup_dt_irq Julien Grall
2013-05-08 13:35 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 14/33] xen/arm: Introduce request_dt_irq Julien Grall
2013-05-08 13:41 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 15/33] xen/arm: Use hierarchical device tree to retrieve GIC information Julien Grall
2013-05-08 13:46 ` Ian Campbell
2013-05-08 15:49 ` Julien Grall
2013-05-08 15:56 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 16/33] xen/arm: Retrieve timer interrupts from the device tree Julien Grall
2013-05-08 13:50 ` Ian Campbell
2013-05-08 15:53 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 17/33] xen/arm: Don't hardcode VGIC informations Julien Grall
2013-05-08 2:33 ` [PATCH V2 18/33] xen/arm: Introduce a generic way to use a device from the device tree Julien Grall
2013-05-08 13:52 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 19/33] xen/arm: New callback in uart_driver to get device tree interrupt structure Julien Grall
2013-05-08 2:33 ` [PATCH V2 20/33] xen/arm: Add generic UART to get the device in the device tree Julien Grall
2013-05-08 14:01 ` Ian Campbell
2013-05-08 15:58 ` Julien Grall
2013-05-08 16:41 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 21/33] xen/arm: Use device tree API in pl011 UART driver Julien Grall
2013-05-08 15:17 ` Ian Campbell
2013-05-08 16:23 ` Julien Grall
2013-05-08 16:43 ` Ian Campbell
2013-05-08 16:55 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 22/33] xen/arm: Use the device tree to map the address range and IRQ to dom0 Julien Grall
2013-05-08 15:28 ` Ian Campbell
2013-05-08 16:59 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 23/33] xen/arm: Allow Xen to run on multiple platform without recompilation Julien Grall
2013-05-08 15:32 ` Ian Campbell
2013-05-08 15:35 ` Ian Campbell
2013-05-08 16:32 ` Julien Grall
2013-05-08 16:38 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 24/33] xen/arm: WORKAROUND 1:1 memory mapping for dom0 Julien Grall
2013-05-08 15:54 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 25/33] xen/arm: Add versatile express platform Julien Grall
2013-05-08 2:33 ` [PATCH V2 26/33] xen/arm: remove request_irq Julien Grall
2013-05-09 9:59 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 27/33] xen/arm: remove setup_irq Julien Grall
2013-05-09 10:00 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 28/33] xen/arm: Don't use pl011 UART by default for early printk Julien Grall
2013-05-09 10:10 ` Ian Campbell
2013-05-09 13:14 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 29/33] xen/arm: Add exynos 4210 UART support Julien Grall
2013-05-09 10:13 ` Ian Campbell
2013-05-09 18:33 ` Julien Grall
2013-05-08 2:33 ` [PATCH V2 30/33] xen/arm: Add Exynos 4210 UART support for early printk Julien Grall
2013-05-09 10:16 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 31/33] xen/arm: Add platform specific code for the exynos5 Julien Grall
2013-05-09 10:19 ` Ian Campbell
2013-05-09 13:03 ` Julien Grall [this message]
2013-05-08 2:33 ` [PATCH V2 32/33] xen/arm: WORKAROUND Support kick cpus and switch to hypervisor " Julien Grall
2013-05-09 10:24 ` Ian Campbell
2013-05-08 2:33 ` [PATCH V2 33/33] xen/arm64: Remove hardcoded value for gic in assembly code Julien Grall
2013-05-08 7:03 ` [PATCH V2 00/33] Support multiple ARM platforms in Xen Gihun Jung
2013-05-08 11:01 ` Julien Grall
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=518B9EA8.5030307@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=patches@linaro.org \
--cc=xen-devel@lists.xen.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.