From: Kim Phillips Date: Tue, 10 Jun 2008 11:01:41 -0500 Subject: [U-Boot-Users] [PATCH] 85xx: extended cpu identification In-Reply-To: <627A2C79-163B-45FE-A431-82E97356D14B@kernel.crashing.org> References: <20080610005758.d8d1c56d.kim.phillips@freescale.com> <58C840F0-B853-4987-84D8-68B5AE015FD5@kernel.crashing.org> <20080610084855.7ef1e566.kim.phillips@freescale.com> <627A2C79-163B-45FE-A431-82E97356D14B@kernel.crashing.org> Message-ID: <20080610110141.c27e8fb2.kim.phillips@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 10 Jun 2008 10:10:02 -0500 Kumar Gala wrote: > > On Jun 10, 2008, at 8:48 AM, Kim Phillips wrote: > > > On Tue, 10 Jun 2008 08:23:46 -0500 > > Kumar Gala wrote: > > > >> > >> On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote: > >> > >>> On Thu, 29 May 2008 03:20:08 -0500 (CDT) > >>> Kumar Gala 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