From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=pYKRXRV9; spf=pass (domain: linaro.org, ip: 209.85.166.195, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) by groups.io with SMTP; Sun, 28 Apr 2019 23:53:00 -0700 Received: by mail-it1-f195.google.com with SMTP id k64so7260257itb.5 for ; Sun, 28 Apr 2019 23:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=KwEZCjXrjRccl3vmSPHiHDpgMUalqxQiSgWl3VaPv5Y=; b=pYKRXRV9UQytbKZtBHSlpT6SCzN9Ie51a8EaCPr+VzpyKEK0F7j5RH/NVHZ7FtW4qu 1knMX5P5MsThsd5c0NSXFya/m/YG6JwSuXv/97S1yD5yMjf415ODk4OG1nbwjYOdgaTJ 3eBPPqTiLiXqQovnIWZUzTI/LCvi76Key6UvyEFBmT0gUy59N6g2Olcqa1pq04beRj+o tZaeLokXtQxIy/G9r4sZKq4pwHm9byCtSouDjAeNrqHNLB2ibRx5zS6H0UsCrI8cYiMu 5yBBEzVcwxAcFkt06mGuOJljWzvg1W0ullg/PiOZXXmDLy5Stk2i74BLNVfUd6ZJ5ZEu zoww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=KwEZCjXrjRccl3vmSPHiHDpgMUalqxQiSgWl3VaPv5Y=; b=sXeaoIyoMgu6/AYzpk/ryctm6VPEEOyDb7nui6Xt09Rtz4ApNSt08j0ZjCpbx9gQF+ CqmFf/MMg+9nbYlbw8+JNktT+mcBHl+tlTcBWGJEJQsZgaJqNAak6JUp4OEqavVOh6g0 zhtCuIyMp+UyL+v+XIdxAia668iIhEZRR0q5uYypz+R63uBKuYCDr22LNHCNzO4eFsV5 Wozs6obqngVDxZ2TzM93RcJR34rFSaRXPTExujfLBmQ76ps3ntgE0i/jSa0x9kjdyJaj sB6QsYvwaoJmTNEfRRZGFqWzOuro2sFGzNk7H1NicYbx0/jvhIezjDXyvd0oI2JDPL/F OWSg== X-Gm-Message-State: APjAAAXg5/WledYXIKk4qkpavyw55j/kcJ2k7joZLNeuAQXC3vsqmoUn 2BO4t4qnkko736ouu3WlhH5GTw6wDWdzwrAjYdcckLBW X-Google-Smtp-Source: APXvYqwIimv66m97V+Yv56l1sytFAQQtVLzZFSAmUflaDPdIiHVsXCFABEHbobS+rNr7xvfGMDw3QYCPl9d5w9niAvA= X-Received: by 2002:a02:1dc7:: with SMTP id 190mr24130609jaj.62.1556520779051; Sun, 28 Apr 2019 23:52:59 -0700 (PDT) MIME-Version: 1.0 References: <1554210602-2957-1-git-send-email-jagadeesh.ujja@arm.com> In-Reply-To: From: "Ard Biesheuvel" Date: Mon, 29 Apr 2019 08:52:46 +0200 Message-ID: Subject: Re: [edk2-devel] [edk2] [PATCH v2 edk2-platforms] Platform/ARM/Drivers: Add Nor Flash Driver To: edk2-devel-groups-io , Jagadeesh Ujja Cc: Leif Lindholm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 29 Apr 2019 at 07:59, Jagadeesh Ujja wrote= : > > hi Ard > > On Wed, Apr 24, 2019 at 6:37 PM Ard Biesheuvel > wrote: > > > > On Wed, 24 Apr 2019 at 11:05, Jagadeesh Ujja w= rote: > > > > > > Fwd to new EDKII development mailing list. > > > > > > hi Ard, > > > > > > Sorry about missing your previous comment and adding here. > > > > > > "Hello Jagadeesh, > > > > > > Why are you moving this driver into edk2-platforms? I'd prefer to ha= ve > > > > > > it alongside the non-MM version instead. > > > > > > That would allow us to share a lot more code between the two versions= ." > > > ----------------- > > > > > > my Point of view: > > > > > > In ArmPlatformPkg/Drivers/NorFlashDxe driver supports block I/O and > > > disk I/O protocols. > > > In case of StandaloneMM norflash driver the block I/O and disk I/O > > > protocols are not required > > > > > > We don=E2=80=99t want to remove support of block I/O and disk I/O pro= tocols in > > > =E2=80=9CArmPlatformPkg/Drivers/NorFlashDxe=E2=80=9D > > > In this case =E2=80=9CNOR_FLASH_INSTANCE=E2=80=9D is different in bot= h > > > drivers(DXE/STANDALONEMM). So we end up with having 2 different > > > drivers. > > > > > > Even if we want to share common code then we end up with multiple > > > files as =E2=80=9CNOR_FLASH_INSTANCE=E2=80=9D is used in almost all = files > > > Ex: =E2=80=9CNorFlash.c=E2=80=9D =E2=80=9CNorFlash.h=E2=80=9D NorFla= shFvb.c > > > In this case =E2=80=9CNorFlash.c=E2=80=9D will have 2 copies one use= d by DXE and > > > other by STANDALONE_MM driver > > > > > > So instead of having 2 different drivers in one place > > > =E2=80=9CArmPlatformPkg/Drivers/NorFlashDxe=E2=80=9D > > > added a new refactored nor flash driver in "Platform/ARM/Drivers" > > > > > > I am not sure if any other platform is using > > > =E2=80=9CArmPlatformPkg/Drivers/NorFlashDxe=E2=80=9D and may require = block I/O and > > > disk I/O protocols > > > if we remove =E2=80=9Csupport of block I/O and disk I/O protocols=E2= =80=9D then we > > > can share the common code easily. > > > > > > > I see your point. > > > > The only reason you need block i/o and disk i/o is to use ordinary > > partition and filesystem drivers. I guess Juno uses this for its magic > > filesystem? If not, I'd be glad to get rid of it. > > > > > Yes "block i/o and disk i/o of =E2=80=9CArmPlatformPkg/Drivers/NorFlash= Dxe=E2=80=9D > driver is used even > in RD-platforms(edk2-platforms/Platform/ARM/SgiPkg/)(and JUNO) to list > partition. we don't want to break > legacy and want to have separate > "Platform/ARM/Drivers/StandaloneMmNorFlash/" driver. > In that case, could we move the existing code into edk2-platforms/Platform/ARM first? And then rip out the block i/o and disk i/o parts from the common driver? Leif, any thoughts?