Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
On Jul 5, 2008, at 5:32 PM, Wolfgang Denk wrote: > In message [EMAIL PROTECTED]> you wrote: >> The current cpu identification code is used just to return the name >> of the processor at boot. There are some other locations that the >> name >> is useful (device tree setup). >> >> Also, we add a feature field to convey useful attributes of the >> processor. >> >> (for 85xx we have a single feature to tell if the processor has a >> crypto >> engine or not). >> >> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> >> --- >> cpu/mpc85xx/cpu.c | 77 + >> + >> include/asm-ppc/processor.h | 13 +++ >> 2 files changed, 53 insertions(+), 37 deletions(-) > > There was some discussion about this patch, but I don't see an updated > version posted, nor was it picked up (and fixed) by the custodian. > > So what's the state of this patch? this was reworked and accepted by Andy and in both mainline and his 85xx tree. - k - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
In message <[EMAIL PROTECTED]> you wrote: > The current cpu identification code is used just to return the name > of the processor at boot. There are some other locations that the name > is useful (device tree setup). > > Also, we add a feature field to convey useful attributes of the processor. > > (for 85xx we have a single feature to tell if the processor has a crypto > engine or not). > > Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > --- > cpu/mpc85xx/cpu.c | 77 ++ > include/asm-ppc/processor.h | 13 +++ > 2 files changed, 53 insertions(+), 37 deletions(-) There was some discussion about this patch, but I don't see an updated version posted, nor was it picked up (and fixed) by the custodian. So what's the state of this patch? 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: [EMAIL PROTECTED] "He only drinks when he gets depressed." "Why does he get depressed?" "Sometimes it's because he hasn't had a drink." - Terry Pratchett, _Men at Arms_ - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
In message <[EMAIL PROTECTED]> you wrote: > > >> I don't trust our HW guys to keep w/that convention. Plus we can use > >> this mechanism for other things if need be. > > > > they've been pretty good so far, and until the other thing comes > > around, we can compact this table instead of expanding it - the 85xx_E > > entries themselves are unnecessary. > > I disagree and would prefer to keep it as I've done as it provides the > most flexibility. I vote with the others for the short and readable form. 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: [EMAIL PROTECTED] core error - bus dumped - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
On Tue, 10 Jun 2008 10:10:02 -0500 Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Jun 10, 2008, at 8:48 AM, Kim Phillips wrote: > > > On Tue, 10 Jun 2008 08:23:46 -0500 > > Kumar Gala <[EMAIL PROTECTED]> wrote: > > > >> > >> On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote: > >> > >>> On Thu, 29 May 2008 03:20:08 -0500 (CDT) > >>> Kumar Gala <[EMAIL PROTECTED]> wrote: > >>> > +struct cpu_type cpu_type_list [] = { > +CPU_TYPE_ENTRY(8533, 8533, 0), > +CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8540, 8540, 0), > +CPU_TYPE_ENTRY(8541, 8541, 0), > +CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8543, 8543, 0), > +CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8544, 8544, 0), > +CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8545, 8545, 0), > +CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8548, 8548, 0), > +CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8555, 8555, 0), > +CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8560, 8560, 0), > +CPU_TYPE_ENTRY(8567, 8567, 0), > +CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8568, 8568, 0), > +CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO), > +CPU_TYPE_ENTRY(8572, 8572, 0), > +CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO), > >>> > >>> this seems like overkill given all we have to do is check one bit > >>> (see > >>> IS_E_PROCESSOR macro in "handle crypto node" patch I just sent out). > >> > >> I don't trust our HW guys to keep w/that convention. Plus we can use > >> this mechanism for other things if need be. > > > > they've been pretty good so far, and until the other thing comes > > around, we can compact this table instead of expanding it - the 85xx_E > > entries themselves are unnecessary. > > I disagree and would prefer to keep it as I've done as it provides the > most flexibility. it's easier to do a IS_E_PROCESSOR(get_svr()) from cpu/mpc85xx/fdt.c instead of getting ver, calling cpu = identify_cpu(ver), and then checking cpu->features every time. I don't know what other features you have in mind (perhaps this patch should wait until then?), but HAS_CRYPTO is either on or off, and the bit already exists in the h/w.. Kim - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
On Jun 10, 2008, at 8:48 AM, Kim Phillips wrote: > On Tue, 10 Jun 2008 08:23:46 -0500 > Kumar Gala <[EMAIL PROTECTED]> wrote: > >> >> On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote: >> >>> On Thu, 29 May 2008 03:20:08 -0500 (CDT) >>> Kumar Gala <[EMAIL PROTECTED]> wrote: >>> +struct cpu_type cpu_type_list [] = { + CPU_TYPE_ENTRY(8533, 8533, 0), + CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8540, 8540, 0), + CPU_TYPE_ENTRY(8541, 8541, 0), + CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8543, 8543, 0), + CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8544, 8544, 0), + CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8545, 8545, 0), + CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8548, 8548, 0), + CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8555, 8555, 0), + CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8560, 8560, 0), + CPU_TYPE_ENTRY(8567, 8567, 0), + CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8568, 8568, 0), + CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8572, 8572, 0), + CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO), >>> >>> this seems like overkill given all we have to do is check one bit >>> (see >>> IS_E_PROCESSOR macro in "handle crypto node" patch I just sent out). >> >> I don't trust our HW guys to keep w/that convention. Plus we can use >> this mechanism for other things if need be. > > they've been pretty good so far, and until the other thing comes > around, we can compact this table instead of expanding it - the 85xx_E > entries themselves are unnecessary. I disagree and would prefer to keep it as I've done as it provides the most flexibility. - k - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
On Tue, 10 Jun 2008 08:23:46 -0500 Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote: > > > On Thu, 29 May 2008 03:20:08 -0500 (CDT) > > Kumar Gala <[EMAIL PROTECTED]> wrote: > > > >> +struct cpu_type cpu_type_list [] = { > >> + CPU_TYPE_ENTRY(8533, 8533, 0), > >> + CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8540, 8540, 0), > >> + CPU_TYPE_ENTRY(8541, 8541, 0), > >> + CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8543, 8543, 0), > >> + CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8544, 8544, 0), > >> + CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8545, 8545, 0), > >> + CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8548, 8548, 0), > >> + CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8555, 8555, 0), > >> + CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8560, 8560, 0), > >> + CPU_TYPE_ENTRY(8567, 8567, 0), > >> + CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8568, 8568, 0), > >> + CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO), > >> + CPU_TYPE_ENTRY(8572, 8572, 0), > >> + CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO), > > > > this seems like overkill given all we have to do is check one bit (see > > IS_E_PROCESSOR macro in "handle crypto node" patch I just sent out). > > I don't trust our HW guys to keep w/that convention. Plus we can use > this mechanism for other things if need be. they've been pretty good so far, and until the other thing comes around, we can compact this table instead of expanding it - the 85xx_E entries themselves are unnecessary. Kim - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote: > On Thu, 29 May 2008 03:20:08 -0500 (CDT) > Kumar Gala <[EMAIL PROTECTED]> wrote: > >> +struct cpu_type cpu_type_list [] = { >> +CPU_TYPE_ENTRY(8533, 8533, 0), >> +CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8540, 8540, 0), >> +CPU_TYPE_ENTRY(8541, 8541, 0), >> +CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8543, 8543, 0), >> +CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8544, 8544, 0), >> +CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8545, 8545, 0), >> +CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8548, 8548, 0), >> +CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8555, 8555, 0), >> +CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8560, 8560, 0), >> +CPU_TYPE_ENTRY(8567, 8567, 0), >> +CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8568, 8568, 0), >> +CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO), >> +CPU_TYPE_ENTRY(8572, 8572, 0), >> +CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO), > > this seems like overkill given all we have to do is check one bit (see > IS_E_PROCESSOR macro in "handle crypto node" patch I just sent out). I don't trust our HW guys to keep w/that convention. Plus we can use this mechanism for other things if need be. - k - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification
On Thu, 29 May 2008 03:20:08 -0500 (CDT) Kumar Gala <[EMAIL PROTECTED]> wrote: > +struct cpu_type cpu_type_list [] = { > + CPU_TYPE_ENTRY(8533, 8533, 0), > + CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8540, 8540, 0), > + CPU_TYPE_ENTRY(8541, 8541, 0), > + CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8543, 8543, 0), > + CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8544, 8544, 0), > + CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8545, 8545, 0), > + CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8548, 8548, 0), > + CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8555, 8555, 0), > + CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8560, 8560, 0), > + CPU_TYPE_ENTRY(8567, 8567, 0), > + CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8568, 8568, 0), > + CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO), > + CPU_TYPE_ENTRY(8572, 8572, 0), > + CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO), this seems like overkill given all we have to do is check one bit (see IS_E_PROCESSOR macro in "handle crypto node" patch I just sent out). Kim - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH] 85xx: extended cpu identification
The current cpu identification code is used just to return the name of the processor at boot. There are some other locations that the name is useful (device tree setup). Also, we add a feature field to convey useful attributes of the processor. (for 85xx we have a single feature to tell if the processor has a crypto engine or not). Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- cpu/mpc85xx/cpu.c | 77 ++ include/asm-ppc/processor.h | 13 +++ 2 files changed, 53 insertions(+), 37 deletions(-) diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c index 58d23f4..7c842de 100644 --- a/cpu/mpc85xx/cpu.c +++ b/cpu/mpc85xx/cpu.c @@ -32,38 +32,41 @@ DECLARE_GLOBAL_DATA_PTR; -struct cpu_type { - char name[15]; - u32 soc_ver; +struct cpu_type cpu_type_list [] = { + CPU_TYPE_ENTRY(8533, 8533, 0), + CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8540, 8540, 0), + CPU_TYPE_ENTRY(8541, 8541, 0), + CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8543, 8543, 0), + CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8544, 8544, 0), + CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8545, 8545, 0), + CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8548, 8548, 0), + CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8555, 8555, 0), + CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8560, 8560, 0), + CPU_TYPE_ENTRY(8567, 8567, 0), + CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8568, 8568, 0), + CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO), + CPU_TYPE_ENTRY(8572, 8572, 0), + CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO), }; -#define CPU_TYPE_ENTRY(x) {#x, SVR_##x} +struct cpu_type *identify_cpu(uint ver) +{ + int i; + for (i = 0; i < ARRAY_SIZE(cpu_type_list); i++) + if (cpu_type_list[i].soc_ver == ver) + return &cpu_type_list[i]; -struct cpu_type cpu_type_list [] = { - CPU_TYPE_ENTRY(8533), - CPU_TYPE_ENTRY(8533_E), - CPU_TYPE_ENTRY(8540), - CPU_TYPE_ENTRY(8541), - CPU_TYPE_ENTRY(8541_E), - CPU_TYPE_ENTRY(8543), - CPU_TYPE_ENTRY(8543_E), - CPU_TYPE_ENTRY(8544), - CPU_TYPE_ENTRY(8544_E), - CPU_TYPE_ENTRY(8545), - CPU_TYPE_ENTRY(8545_E), - CPU_TYPE_ENTRY(8547_E), - CPU_TYPE_ENTRY(8548), - CPU_TYPE_ENTRY(8548_E), - CPU_TYPE_ENTRY(8555), - CPU_TYPE_ENTRY(8555_E), - CPU_TYPE_ENTRY(8560), - CPU_TYPE_ENTRY(8567), - CPU_TYPE_ENTRY(8567_E), - CPU_TYPE_ENTRY(8568), - CPU_TYPE_ENTRY(8568_E), - CPU_TYPE_ENTRY(8572), - CPU_TYPE_ENTRY(8572_E), -}; + return NULL; +} int checkcpu (void) { @@ -74,7 +77,7 @@ int checkcpu (void) uint fam; uint ver; uint major, minor; - int i; + struct cpu_type *cpu; #ifdef CONFIG_DDR_CLK_FREQ volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR); u32 ddr_ratio = ((gur->porpllsr) & 0x3e00) >> 9; @@ -89,14 +92,14 @@ int checkcpu (void) puts("CPU: "); - for (i = 0; i < ARRAY_SIZE(cpu_type_list); i++) - if (cpu_type_list[i].soc_ver == ver) { - puts(cpu_type_list[i].name); - break; - } - - if (i == ARRAY_SIZE(cpu_type_list)) + cpu = identify_cpu(ver); + if (cpu) { + puts(cpu->name); + if (cpu->features & CPU_FTRS_HAS_CRYPTO) + puts("E"); + } else { puts("Unknown"); + } printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr); diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h index 8bdfb9d..acbf98a 100644 --- a/include/asm-ppc/processor.h +++ b/include/asm-ppc/processor.h @@ -960,6 +960,19 @@ n: #define SR15 15 #ifndef __ASSEMBLY__ + +struct cpu_type { + char name[15]; + u32 soc_ver; + u32 features; +}; + +struct cpu_type *identify_cpu(uint ver); + +#define CPU_TYPE_ENTRY(n, v, f) \ + { .name = #n, .soc_ver = SVR_##v, .features = f } +#define CPU_FTRS_HAS_CRYPTO0x0001 + #ifndef CONFIG_MACH_SPECIFIC extern int _machine; extern int have_of; -- 1.5.4.5 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users