From patchwork Wed Jul 24 07:34:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3318 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 477443F18D for ; Wed, 24 Jul 2024 09:34:20 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42671a6fb9dsf43700195e9.3 for ; Wed, 24 Jul 2024 00:34:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1721806460; cv=pass; d=google.com; s=arc-20160816; b=u5lFKEHyshMoVtMwtSG5iEx/Egx/J33uSBZxjl8fXD/Y0WwUYktTdN62RU2Yw3Av6H ZQNEWoF6svUiP76xcMJl+nIh90dZ60GFaO0jFOsdhNKqxSLf5JZL2rb9i12gPFzhhztl Qu6G5Q6h7Dj1aB9XWMSklLf/Ka6i/STSWqEJB+ntildBpLZatmDdp8qXm/QPtDZDzbsw K258MEZZw4Xa7iZX8CC7rEj0NBWAe3sY7tGEFkvZUjfHx2UaoLk+a1LZ2dXUsh2ApHVC gKvdLDMEBbF+If/ERJIwO0lYQhJOrmJ9CYrHcyb/oFlWCB8gacJarNIMin3k70TxGHK7 sd8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=QeXLY5tQKDj84B8FaWVCgpY0AaSQD5Wd59YcxhoQPqc=; fh=LaQnrk36pQlbU84HAT4NwfKQwQDgeo8s8pTCp5POB+w=; b=yqlVV3x8As9QQu1bbfA/L4VxQx4lWHqo012ajEyVmvumIGOtf9ALtE95E51zmgazVO 7HAMgGd2OEej93k6i/ia9BbWeopmmq65p8xBtmhXeIw4tY+JzLWo6nklRylhYyKLOxV0 4YfOZ93oFjI7mVIMVCFHuPJ72w4c9fo345zRO1ylWQnCbz6XGT+vTOX4QJg/hyYOVm3W Ni+34FM0X+2b4q6LC9X8y1AG+eGCrOeF9MvnCqmZSirG8aF/vaLGzVZ8XOM0ZdnOMJtm CNsBT/Gtuz8NDG5B7F9eyEphtW1VN9Ffk/egdB/VmDEsrYUa3aIJyRhCabiyoq8qGn5i Ko+g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AzzhTtgj; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1721806460; x=1722411260; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=QeXLY5tQKDj84B8FaWVCgpY0AaSQD5Wd59YcxhoQPqc=; b=O0VvN1rdm7aaKfWi+VZwzZB0bKpWKHA+TL9zPF3JbAb/BeHz5rRZDo3RNfcdRm+JGJ 2ciAIu+M6nEIUwapx97IA2PuM3Jjj2RKnp1Hw2HWscQ2TwV2cA6ji6a2hJvp1DlyNPLb 9XXbzlz56ju3W7aF6oU5Ls01IKQCgXz8KQqfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721806460; x=1722411260; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QeXLY5tQKDj84B8FaWVCgpY0AaSQD5Wd59YcxhoQPqc=; b=GcIkp+WoLMwMLQz7KHbIuuQEOjQdGfoQK9+j9Tr1Csyf+WXI0aqhod7kmukUaNfdeS voTxhAYLXIF8aZjeqiOXIgW49nfmiAlRsLX0XJgca1J6qmSq1y83dql8hvBEooRuaqty 4GtXq8SvfdPEDF4AUW6oS70Y5qcsRwzdvuZv8DnVOoRTEqAzPw6n769rWS8uhsLdYvem vwKXz6ihBPvbGbTGz8Tdlc4SZxE/vfslITndwkHkyX2QDUwhb6XLNEQ6Eg+2h2srWlLK JOLb+KKq5LNoIN4XXBaqRDglx8vynsoYFI31vyQ6UKvWJ91IeBeXuAOdWpkgt+nLiERC zxAQ== X-Forwarded-Encrypted: i=2; AJvYcCUOikISk+WG5fcQRxoTSmBwMXLr0cTZJiMlnV+IWwwBZjOHPsyL2ZkWUk2+l9DoqS58DLixeEwC4I5+2icbHb+aoFMN07jCidTkc4NX6VT6sSuIjcAFb/sf8Ie0CA== X-Gm-Message-State: AOJu0Yw4aJUhb0hJFtEyPGytrM+UDAPeeLw+J/6dOFtVDTqmd011MwDH zBRkWalr2bt4PxiktYRdjeHeHE9RVdCshIRjdrKOWBZPM2D0QyNOjCEmZb9TDit4Ag== X-Google-Smtp-Source: AGHT+IHOneEaWHJlSQsCaHeR4GSU3vFiAp5ZXlosUkUvJjUHf/exSOOh6Zcb8DghjXPQht1Z1QcsDA== X-Received: by 2002:a05:600c:1c9d:b0:427:d713:a5d3 with SMTP id 5b1f17b1804b1-427dc51f999mr76197825e9.11.1721806459866; Wed, 24 Jul 2024 00:34:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1c13:b0:426:6243:ddf with SMTP id 5b1f17b1804b1-427c83aa767ls30099065e9.2.-pod-prod-08-eu; Wed, 24 Jul 2024 00:34:18 -0700 (PDT) X-Received: by 2002:a05:600c:458f:b0:426:554a:e0bf with SMTP id 5b1f17b1804b1-427dc527e21mr79397775e9.16.1721806458248; Wed, 24 Jul 2024 00:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721806458; cv=none; d=google.com; s=arc-20160816; b=dCbx4oWk7jq1lZD9CynFUiNbsNlHd3z+UidVU3HTUgducNHJc7UBvqg7a7KYBuw6a5 GPiKzS2GNy4VL81Yi+g2Y1FeS+ieMKz+Df9S09tHjPeYsDCs43uQ3P+yIYlPqPHzDO+N /7e5fSP1mC6FtdLeYi4OwFnkBMSNSU2fcz0+ON2albkt/EFOoVafhj5eOBc9herCkkQN WHoFvSvADLTcCyLKItPcE4Ldghl4uNZfvQ+/tiZdfdPcxqyeLdz7u4R2qgkaNt6O04Aa R3QLMN65qDNHh1YI55XJGQu6CQ13sY0FpUaneRwkdtr5osUuLvII80CyZCmvR9A7NAVd jN+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1+VuaeXDb29T9a+lEhJ80KyA6eSRK6CRF5V6im3o/Rg=; fh=TxZqpDnmNnEuFpzvSuJnex3klziSlCfIJQeCLB2WEQk=; b=LXvUx4IcHOhZ1GhdQbOhdoarQgQclgWvtaaudobXuMllthch3GXUBBHMgAp/se0oii rClCCXzLVs+5UXK7Rz5sz+aR+6wsSdVSk/AdLTgY+nD6rkDwAABIR6L7fXn7jpxEarXD KP/thNrHzFeAcQLEaNM8lKpV2tddi3pS4edMpya47VyBXJ7YxrrDGYYQWl5dSAIPA6vg xPeTn2rUbbq6S1KApl3aUwCBrZOA8YLnITU3Q8tRCnZimzkl45iBNwh944y2NLn0qTAR WJLG0tfwfwOQQc4OqsSGS5lnC7jD1Bui0TdJFayZ1UUbBSGcyTInmgF+iB2DbHTdCfYX 1ezQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AzzhTtgj; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-427d6fe4a16sor32320465e9.9.2024.07.24.00.34.18 for (Google Transport Security); Wed, 24 Jul 2024 00:34:18 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:1d04:b0:426:62c5:4742 with SMTP id 5b1f17b1804b1-427dc5153ccmr88243525e9.7.1721806457746; Wed, 24 Jul 2024 00:34:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.40.97]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368787ced05sm13474613f8f.67.2024.07.24.00.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 00:34:17 -0700 (PDT) From: Dario Binacchi To: michael@amarulasolutions.com Cc: linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH 2/2] refactor(imx8m): replace magic number with macros Date: Wed, 24 Jul 2024 09:34:01 +0200 Message-ID: <20240724073401.1587434-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240724073401.1587434-1-dario.binacchi@amarulasolutions.com> References: <20240724073401.1587434-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AzzhTtgj; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Replace the UARTs base addresses with the appropriate constants previously defined in the file "imx8m_uart.h". Fammi sapere se hai altre richieste di traduzione o altre domande! Replace the uart base address using ose RDC config related magic numbers with enum type Signed-off-by: Dario Binacchi --- plat/imx/imx8m/imx8m_ccm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plat/imx/imx8m/imx8m_ccm.c b/plat/imx/imx8m/imx8m_ccm.c index 10a00c990031..96b38e2712e1 100644 --- a/plat/imx/imx8m/imx8m_ccm.c +++ b/plat/imx/imx8m/imx8m_ccm.c @@ -5,6 +5,7 @@ */ #include +#include #include #define UCR1 0x80 @@ -17,16 +18,16 @@ static struct imx_uart { } imx8m_uart_info[] = { { /* UART 1 */ .ccm_reg = 0x4490, - .uart_base = 0x30860000, + .uart_base = UART1_BASE_ADDR, }, { /* UART 2 */ .ccm_reg = 0x44a0, - .uart_base = 0x30890000, + .uart_base = UART2_BASE_ADDR, }, { /* UART 3 */ .ccm_reg = 0x44b0, - .uart_base = 0x30880000, + .uart_base = UART3_BASE_ADDR, }, { /* UART 4 */ .ccm_reg = 0x44c0, - .uart_base = 0x30a60000, + .uart_base = UART4_BASE_ADDR, } };