From: Wolfgang Denk Date: Wed, 14 Jul 2010 21:34:59 +0200 Subject: [U-Boot] [PATCH] powerpc/85xx: Add recognition of e5500 core In-Reply-To: <1277891327-24506-1-git-send-email-galak@kernel.crashing.org> References: <1277891327-24506-1-git-send-email-galak@kernel.crashing.org> Message-ID: <20100714193459.C6121160691@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Kumar Gala, In message <1277891327-24506-1-git-send-email-galak@kernel.crashing.org> you wrote: > Signed-off-by: Kumar Gala > --- > arch/powerpc/cpu/mpc85xx/cpu.c | 20 ++++++++++---------- > 1 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c > index fddeb2f..25fb25c 100644 > --- a/arch/powerpc/cpu/mpc85xx/cpu.c > +++ b/arch/powerpc/cpu/mpc85xx/cpu.c > @@ -93,18 +93,18 @@ int checkcpu (void) > minor = PVR_MIN(pvr); > > printf("Core: "); > - switch (fam) { > - case PVR_FAM(PVR_85xx): > - puts("E500"); > - break; > - default: > - puts("Unknown"); > - break; > + if (PVR_FAM(PVR_85xx)) { > + if(PVR_MEM(pvr) <= 0x3) { > + puts("E500"); > + if (PVR_MEM(pvr) == 0x03) > + puts("MC"); > + } else { > + puts("E5500"); > + } Is it guaranteed that all higher PVR values will always be E5500? Otherwise we should rather not use an "else" here? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Quote from a recent meeting: "We are going to continue having these meetings everyday until I find out why no work is getting done."