mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 14:10:43 +00:00
a0ba97e561
Use a single dtsi file for CP110 die instead of master/slave. Moving to single file will allow miltiple DTSI inclusions with re-defined CP index and name. This change will also allow support for SoCs containing more than two CP110 dies on board. Move pin control definitions from CP110 DTS to board DTS files Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
30 lines
832 B
Text
30 lines
832 B
Text
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2021 Marvell International Ltd.
|
|
*/
|
|
|
|
/* Common definitions used by Armada 7K/8K DTs */
|
|
#define PASTER(x, y) x ## _ ## y
|
|
#define EVALUATOR(x, y) PASTER(x, y)
|
|
|
|
/* This define used to create die label:
|
|
* For example:
|
|
* CP110 master:
|
|
* CP110_LABEL(spi0) -> cp0_spi0
|
|
* CP110 slave:
|
|
* CP110_LABEL(usb0) -> cp1_usb0
|
|
*/
|
|
#define CP110_LABEL(name) EVALUATOR(CP110_NAME, name)
|
|
|
|
#define APPEND_NX(A, B) A ##-## B
|
|
#define APPEND(A, B) APPEND_NX(A, B)
|
|
|
|
#define STRINGIZE_NX(x) #x
|
|
#define STRINGIZE(x) STRINGIZE_NX(x)
|
|
|
|
/* Same idea here, but this define convert the name to string:
|
|
* For example:
|
|
* master: CP110_STRING_LABEL(ppv2) -> "cp0-ppv2"
|
|
* slave: CP110_STRING_LABEL(ppv2) -> "cp1-ppv2"
|
|
*/
|
|
#define CP110_STRING_LABEL(name) STRINGIZE(APPEND(CP110_NAME, name))
|