From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::22a; helo=mail-wr0-x22a.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 45854226847A7 for ; Wed, 18 Apr 2018 11:15:33 -0700 (PDT) Received: by mail-wr0-x22a.google.com with SMTP id f14-v6so7275355wre.4 for ; Wed, 18 Apr 2018 11:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wSsmB76sjpXfF7Vc4GTSyyybViAw8/+W2msRPTafKiw=; b=OaeECgtv4C/in2tKpd6exHTmLm0wiVEiPWBDEDehoghbn7edKF6ix8wB4hDFR3o9IP A+XcE3WXYWcfsyGlfabpvC7nxEZsC9NL469aEMQW+1NEKsSACSmPBb4l2oQsphz3pSUe kmt4k0M3QAjixzvwa3TZ3Ooajaq8FRalzXGZ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wSsmB76sjpXfF7Vc4GTSyyybViAw8/+W2msRPTafKiw=; b=Ars6uQthTA2ng+EapjPtHRcUlpWwDL4Dku38bSeJK2Bnnopeqrx14t7uS9+E1kyzye lxhBIUjcLW/3AvowpPAB1oSQILjIQuzZOXi1oCd7z0U6yYM2V+bgA1PCKpqDz2+Q+mAC F4nfIwv+t606Mum5EWQuWMWJcipjoGQLr+nyIhYKm4Z9p2xR/ycL41TAv4tjkQ1m9cv4 FIU/bSDarLGRVqFHNDnd5RsgDR39NlflEythy5QI0AGbyuyW1wqy0wiMXAhbRyc/DAT5 aPlUXvpx+RKmnkB5FbzqT1Gd1DVgXs9Ds3s4n2/3s6190Isc46JotjyHJ7we/3OtyRjU q1EQ== X-Gm-Message-State: ALQs6tC5oiPoyC2eVmYJLbva7oO/2v/DHC1I3wTB2zkomRpCFi8Y+lTU weMZ7nWZvH0p4z9pa81RsT/s6Q== X-Google-Smtp-Source: AIpwx4/3/dCThCUBvJbxX9uYviJKP5zg34FA4NXv2hmPL7x5/qg0Ld0vY5CptXhLiw+umJ0ycr3ztA== X-Received: by 2002:adf:8a8e:: with SMTP id y14-v6mr2493493wry.267.1524075332106; Wed, 18 Apr 2018 11:15:32 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id s15-v6sm2022962wrg.28.2018.04.18.11.15.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Apr 2018 11:15:30 -0700 (PDT) Date: Wed, 18 Apr 2018 19:15:29 +0100 From: Leif Lindholm To: Meenakshi Aggarwal Cc: "ard.biesheuvel@linaro.org" , "edk2-devel@lists.01.org" , Udit Kumar , Varun Sethi Message-ID: <20180418181529.5huwswxe6t7nrifi@bivouac.eciton.net> References: <1518771035-6733-1-git-send-email-meenakshi.aggarwal@nxp.com> <1518771035-6733-4-git-send-email-meenakshi.aggarwal@nxp.com> <20180418151228.xdg7v2jfv2m36l4v@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 03/39] SocLib : Add support for initialization of peripherals X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2018 18:15:34 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 18, 2018 at 04:38:22PM +0000, Meenakshi Aggarwal wrote: > > > + > > > +/* > > > + * Returns the bit mask for a bit index from 0 to 31 > > > + */ > > > +#define BIT(_BitIndex) (0x1u << (_BitIndex)) > > > > I don't see these being used for anything other than setting up BIT1 > > BIT2 BIT3 and so on. We already have those in Base.h. > > > In Base.h, we have BIT1, BIT2 defined, here the requirement is to > get set bit on basis of bit number, bit is not known in advance. Ah, I missed the uses in SerDes.c and saw only the ones in UsbHcd.h (which could use the Base.h defines). But does it really simplify anything in SerDes.c? *SerDesPrtclMap |= BIT (LanePrtcl); is no clearer to me than *SerDesPrtclMap |= (1u << LanePrtcl); Best Regards, Leif