From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Wed, 27 Apr 2011 16:57:20 +0200 Subject: [U-Boot] [PATCH v5] ARM: mx31: Print the silicon version In-Reply-To: <4DB7E496.4070400@denx.de> (Stefano Babic's message of "Wed, 27 Apr 2011 11:40:38 +0200") References: <1302574692-28134-1-git-send-email-festevam@gmail.com> <4DA8897B.70202@denx.de> <4DB054C2.4020901@denx.de> <4DB7E496.4070400@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, > On 04/27/2011 11:11 AM, Detlev Zundel wrote: > >>>>> This is due to the usage of the const in the mx3_cpu_type: >>> >>> struct mx3_cpu_type { >>> u8 srev; >>> const char *v; >>> >>> Do you agree if I drop myself the const attribute on u-boot-imx before >>> pulling your patch to the arm tree ? >> >> Sorry to jump in late, > > .. not so late, we can change it... > >>but why not change get_cpu_rev to 'const char *' >> which it actually is? > > This is correct. However, I have not noted before that the last > introduced get_cpu_rev() in MX31 is an exception in u-boot. For all > other processors, it returns a u32 and it is defined as u32 > get_cpu_rev(void). > > Fabio's patch introduces a variant, because it is defined as const char > *get_cpu_rev(void). I propose to change its name (get_cpu_rev_string ?) > and add the static attribute, to make clear it is different as the > get_cpu_rev() already implemented in u-boot. I see. Can't we consolidate all those functions into more general functions higher up in the specialization graph? I.e. why have static non-conforming functions when we could have one generic function to handle all users? Cheers Detlev -- System going down at 1:45 this afternoon for disk crashing. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de