On 11/30/2016 04:31 PM, Ralf Ramsauer wrote:
> 
> 
> On 11/30/2016 04:02 PM, Jan Kiszka wrote:
>> On 2016-11-30 15:58, Ralf Ramsauer wrote:
>>>
>>>
>>> On 11/30/2016 03:07 PM, Jan Kiszka wrote:
>>>> 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?
>>> On the TK1, 0x70006300 is available through the DB9 pin header. TX1
>>> doesn't have a SUB-D connector, it only has an expansion header where
>>> UART is available. This expansion header uses 0x70006000.
>>
>> Would it make a major difference to use the UART behind 0x70006300 also
>> on the TX1? Or is there none? I mean, if it's only about connecting some
>> loose wires to different pins...
> There is UART0 (0x70006000) exposed to the expansion header J21.
> Claudio's patches currently use this one. Surprisingly, this one is
> called the "debug uart", besides the fact that there is another header
> which is called "J17 - UART". (find picture attached)
> 
> According to "Jetson TX1 Developer Kit Carrier Board Specification" it's
> 3.3V compliant.
> 
> The problem is, that only the 'debug uart' UART0 is enabled in mainline
> device tree of the TX1. Without powering up its clocks (what we
> currently don't support on ARM64) or patching the device tree to enable
> it, we won't be able to use it. I didn't even test that connector so far...
> 
> And even then, UART1 is probably connected to 0x70006040, if it follows
> the same scheme as tegra124 SoCs.
> 
> To answer your question: No, I don't see 0x70006300, the debug UART we
> use on TK1, be exposed to any header of the TX1.
One addition:

UART2 as well as UART0 are available on J10, but that's a 2x30, 0.5mm
pitch connector...

And in deed, UART3, which is probably available through 0x70006300, is
exposed to the camera connector, (again 2x60, 0.5mm pitch, but there's
already the camera mounted on top of it).

So for the moment and without the need to modify the kernel, the best is
to use 0x70006000 on the TX1, as everyone will have it available.

  Ralf
> 
>   Ralf
>>
>>>>
>>>>>
>>>>> 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.
>>> You mean consolidating _all_ mach/*.h to a single header?
>>>
>>> Hmm, why not. It's not that much mach-specific stuff inside those headers...
>>
>> Exactly, that's my point.
>>
>> Jan
>>
> 

-- 
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