From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=1gLXs1eg; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.222.196, mailfrom: mw@semihalf.com) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by groups.io with SMTP; Thu, 27 Jun 2019 23:34:03 -0700 Received: by mail-qk1-f196.google.com with SMTP id s22so3896600qkj.12 for ; Thu, 27 Jun 2019 23:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NaPnuUhCllOQDV+vrXbsq9hHhYAPYsHCcrG8mSwwA0w=; b=1gLXs1egqX290PF8DCqDz4Qzm3gpymJl3eLktqS9nyiylGmQzjvoQ7WSned4YJLpiq NSOuPP79m+y3MwSjWHOLMvtG3GDdg1AgV/3CObjOxQev2lUvWIKPDJeWCJzrRSOjA5zm HM+Bn/ydZlI2v4jqbTfRf5B3uKHRdtItuDODTP2O2EaVfvrW+vO/Z5BO/fUC5ye7nq0x jcdKjBugLhd+sf8uC7h85X41+Hg27iFoo1xK0MIdGz3V0/rhANZ4jQd4nX+g2qSM6JEQ 8rMszBnoRfPmHccKgWlWqxsE+D1ErfYWAKgchsjTrbLmkF12ClESr1JV8RhRC+42s3eh mhxA== 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=NaPnuUhCllOQDV+vrXbsq9hHhYAPYsHCcrG8mSwwA0w=; b=sAVBwcXEt15YFkbySzIsYlY9gmE+QRtz83llJfRR/D+LafAioBNZlny3C6VzzRHJly OIgk0mCPc4f69DUnrtrRJSBXdwFr/1o1O81EVupORtq4s1xLOiBzpF0j86ZYCYMopywC LM6zQ+tgvSMGHIhU/+6xwVXIu+rolukj/xms8Ec/X3c+2eX+BuiRIGvMGCgVeav0az9h KbX5CHRiy39N7RFAKgn8KveBZ57FS+qGDyIB+ZzdirJYiE8tM6XJXhIGGq+SdphP5DHM spAiJ2P96bJRBkd5INiE5cmv4kciJpaBTz3B/TiO66eYzwgBcBcqXTScx1fWtInmulxU os1A== X-Gm-Message-State: APjAAAWmwkLBi8Ln/jQyVTDpENIxuE+GcO9FGbFxmAW2jo2SaY3NlRxm jTgUfl9ITW6muLCprlFctBH/EbAFS4trV2hgA/sqog== X-Google-Smtp-Source: APXvYqzSoVM/cemJehRJq0QdCzjH/MBRvhYu3TSFAlzMIt1iyi0Xti+pE5LjVk9kLoBSTk/nYGl6EsmEmW7/eUHSz4Y= X-Received: by 2002:a37:7847:: with SMTP id t68mr7029592qkc.128.1561703642711; Thu, 27 Jun 2019 23:34:02 -0700 (PDT) MIME-Version: 1.0 References: <20190626131003.3088-1-mateusz.albecki@intel.com> In-Reply-To: From: "Marcin Wojtas" Date: Fri, 28 Jun 2019 08:33:50 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol To: "Wu, Hao A" , "Albecki, Mateusz" Cc: Sumit Garg , Ard Biesheuvel , edk2-devel-groups-io Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable pt., 28 cze 2019 o 08:32 Marcin Wojtas napisa=C5=82(a): > > Hi, > > I was almost happily sending you email with 'tested-by' information, but= I checked 3 boards: > Board 1 (out of tree): SD - OK, MMC - OK > Board 2: (Armada80x0McBin): SD - OK, MMC - OK > Board 3: (Armada70x0Db): SD - problems, MMC - OK > > In the latter case I get stall and booting takes around 3 minutes. > Without "MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideP= rotocol" patch it works as before. > > I enabled debugs, and in theory everything seems fine, the DriverStrengt= h is set to EDKII_SD_MMC_DRIVER_STRENGTH_IGNORE. > SdCardIdentification: Found a SD device at slot [0] > SdCardSetBusMode: Target bus mode: bus timing =3D 1, bus width =3D 4, cl= ock freq[MHz] =3D 50, driver strength =3D 255 > > However right after Csd register dump the booting stalls until printing = following and continuing: > FatOpenDevice: read of part_lba failed Time out > > This is absent from the prints I dumped from vanilla kernel. Despite I c= urrently really have no time to additional debug, I checked and with following diff, everything works as before: vanilla edk2 of course :) > > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c > @@ -536,8 +536,8 @@ SdCardSwitch ( > AccessMode =3D 0xF; > } > > - SdMmcCmdBlk.CommandArgument =3D (AccessMode & 0xF) | ((CommandSystem = & 0xF) << 4) | \ > - ((DriverStrength & 0xF) << 8) | ((Power= Limit & 0xF) << 12) | \ > + SdMmcCmdBlk.CommandArgument =3D (AccessMode & 0xF) | ((PowerLimit & 0= xF) << 4) | \^M > + ((DriverStrength & 0xF) << 8) | ((Drive= rStrength & 0xF) << 12) | \^M > ModeValue; > > Above is restoring SdMmcCmdBlk.CommandArgument to the state from before = the patch in question. Now the question - why the layout of the command cha= nged? CommandSystem was unused before, and PowerLimit changed its position.= Is this change really related to the rest of the patch? What is the justif= ication? > > Best regards, > Marcin > > > pt., 28 cze 2019 o 02:57 Wu, Hao A napisa=C5=82(a): >> >> > -----Original Message----- >> > From: Sumit Garg [mailto:sumit.garg@linaro.org] >> > Sent: Thursday, June 27, 2019 9:39 PM >> > To: Ard Biesheuvel >> > Cc: edk2-devel-groups-io; Wu, Hao A; Marcin Wojtas; Albecki, Mateusz >> > Subject: Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: >> > Implement revision 3 of SdMmcOverrideProtocol >> > >> > On Thu, 27 Jun 2019 at 13:40, Ard Biesheuvel >> > wrote: >> > > >> > > (+ Sumit) >> > > >> > > On Thu, 27 Jun 2019 at 08:29, Wu, Hao A wrote: >> > > > >> > > > > -----Original Message----- >> > > > > From: Marcin Wojtas [mailto:mw@semihalf.com] >> > > > > Sent: Thursday, June 27, 2019 2:25 PM >> > > > > To: Albecki, Mateusz >> > > > > Cc: edk2-devel-groups-io; Wu, Hao A >> > > > > Subject: Re: [edk2-devel] [PATCH v4 0/2] >> > MdeModulePkg/SdMmcHcDxe: >> > > > > Implement revision 3 of SdMmcOverrideProtocol >> > > > > >> > > > > Hi Mateusz, >> > > > > >> > > > > Can you please push those patches somewhere (github?) so that I= can >> > > > > easily do a quick check for regression? >> > > > > >> > > > > Thanks, >> > > > > Marcin >> > > > >> > > > >> > > > Hello Marcin, >> > > > >> > > > I have just pushed the series at: >> > > > https://github.com/hwu25/edk2/tree/sdmmc_override_extend_v4 >> > > > >> > > > Please help to check. >> > > > >> > > >> > > I have cc'ed my colleague Sumit, who has kindly agreed to regressio= n >> > > test this branch on Socionext SynQuacer, which also uses the SD/MMC >> > > override infrastructure. >> > > >> > > Sumit, please reply here with your results. And thanks again! >> > >> > I did picked this patch-set and applied on top of edk2 master branch. >> > It works well on SynQuacer with eMMC device enumerated properly and >> > all three eMMC partitions are visible: >> > >> > BLK4: Alias(s): >> > VenHw(0D51905B-B77E-452A-A2C0- >> > ECA0CC8D514A,000030520000000000)/eMMC(0x >> > 0)/Ctrl(0x0) >> > BLK5: Alias(s): >> > VenHw(0D51905B-B77E-452A-A2C0- >> > ECA0CC8D514A,000030520000000000)/eMMC(0x >> > 0)/Ctrl(0x1) >> > BLK6: Alias(s): >> > VenHw(0D51905B-B77E-452A-A2C0- >> > ECA0CC8D514A,000030520000000000)/eMMC(0x >> > 0)/Ctrl(0x2) >> > >> > Shell> devices >> > >> > E9 D - - 1 1 0 VenHw(0D51905B-B77E-452A-A2C0- >> > ECA0CC8D514A,0000305200000000 >> > 00)/eMMC(0x0)/Ctrl(0x0) >> > EA D - - 1 1 0 VenHw(0D51905B-B77E-452A-A2C0- >> > ECA0CC8D514A,0000305200000000 >> > 00)/eMMC(0x0)/Ctrl(0x1) >> > EB D - - 1 1 0 VenHw(0D51905B-B77E-452A-A2C0- >> > ECA0CC8D514A,0000305200000000 >> > 00)/eMMC(0x0)/Ctrl(0x2) >> > >> > So you can add following: >> > >> > Regression-tested-by: Sumit Garg >> >> >> Thanks a lot for the testing. >> >> Best Regards, >> Hao Wu >> >> >> > >> > -Sumit >> >>=20 >>