On 2016-11-30 13:26, Ralf Ramsauer wrote:
> Hi Jan,
> 
> On 11/30/2016 01:21 PM, Jan Kiszka wrote:
>> On 2016-11-30 12:31, Ralf Ramsauer wrote:
>>> From: Claudio Scordino <[email protected]>
>>>
>>> This patch adds the inmate support for the Tegra TX1 board.
>>>
>>> Signed-off-by: Claudio Scordino <[email protected]>
>>> [ralf: rename uart.h to console.h and align console.h]
>>> Signed-off-by: Ralf Ramsauer <[email protected]>
>>> ---
>>>  inmates/lib/arm64/Makefile.lib                          |  1 +
>>>  inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h | 15 
>>> +++++++++++++++
>>>  inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h  | 14 ++++++++++++++
>>>  inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h   | 13 +++++++++++++
>>>  4 files changed, 43 insertions(+)
>>>  create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
>>>  create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
>>>  create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h
>>>
>>> diff --git a/inmates/lib/arm64/Makefile.lib b/inmates/lib/arm64/Makefile.lib
>>> index 45cdfa225f55..0e6f06719400 100644
>>> --- a/inmates/lib/arm64/Makefile.lib
>>> +++ b/inmates/lib/arm64/Makefile.lib
>>> @@ -29,6 +29,7 @@ endef
>>>  mach-$(CONFIG_MACH_FOUNDATION_V8)  := foundation-v8
>>>  mach-$(CONFIG_MACH_AMD_SEATTLE)         := amd-seattle
>>>  mach-$(CONFIG_MACH_HI6220)         := hi6220
>>> +mach-$(CONFIG_MACH_TEGRA_TX1)              := tegra-tx1
>>>  
>>>  MACHINE                                    := mach-$(mach-y)
>>>  KBUILD_CFLAGS                              += 
>>> -I$(INMATES_LIB)/include/$(MACHINE)
>>> diff --git a/inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h 
>>> b/inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
>>> new file mode 100644
>>> index 000000000000..79ef329ca81c
>>> --- /dev/null
>>> +++ b/inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
>>> @@ -0,0 +1,15 @@
>>> +/*
>>> + * Jailhouse, a Linux-based partitioning hypervisor
>>> + *
>>> + * Copyright (c) Siemens AG, 2015
>>> + *
>>> + * Authors:
>>> + *  Jan Kiszka <[email protected]>
>>> + *
>>> + * This work is licensed under the terms of the GNU GPL, version 2.  See
>>> + * the COPYING file in the top-level directory.
>>> + */
>>> +
>>> +#define CON_TYPE   "8250"
>>> +
>>> +#define CON_BASE   0x70006000
>>> diff --git a/inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h 
>>> b/inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
>>> new file mode 100644
>>> index 000000000000..e51319443df6
>>> --- /dev/null
>>> +++ b/inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
>>> @@ -0,0 +1,14 @@
>>> +/*
>>> + * Jailhouse, a Linux-based partitioning hypervisor
>>> + *
>>> + * Copyright (c) Siemens AG, 2015
>>> + *
>>> + * Authors:
>>> + *  Jan Kiszka <[email protected]>
>>> + *
>>> + * This work is licensed under the terms of the GNU GPL, version 2.  See
>>> + * the COPYING file in the top-level directory.
>>> + */
>>> +
>>> +#define GICD_BASE  ((void *)0x50041000)
>>> +#define GICC_BASE  ((void *)0x50042000)
>>> diff --git a/inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h 
>>> b/inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h
>>> new file mode 100644
>>> index 000000000000..428162d81cc4
>>> --- /dev/null
>>> +++ b/inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h
>>> @@ -0,0 +1,13 @@
>>> +/*
>>> + * Jailhouse, a Linux-based partitioning hypervisor
>>> + *
>>> + * Copyright (c) Siemens AG, 2015
>>> + *
>>> + * Authors:
>>> + *  Jan Kiszka <[email protected]>
>>> + *
>>> + * This work is licensed under the terms of the GNU GPL, version 2.  See
>>> + * the COPYING file in the top-level directory.
>>> + */
>>> +
>>> +#define TIMER_IRQ  27
>>>
>>
>> Without doing the diff myself: why do we need a separate mach and cannot
>> generalize the one for the TK1?
> In deed, the only difference is the base address of the UART console.
> (0x70006000 vs. 0x70006300).

Does that mean that we would use a different physical connector on the
TX1 for the inmate output, or is there a different wiring?

> 
> For proper default settings we would at least need some #ifdefs and move
> common code to arm-common.

Probably, things would scale better if we consolidated the few #defines
of the inmates in a few (or even a single) header files and use #ifdef
to dispatch.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to