From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Date: Thu, 14 Nov 2013 13:41:48 -0600 Subject: [U-Boot] [[PATCH v2]pandaboard: 1/1] Modification of Elpida DDR2 RAM for Pandaboard-ES Rev B3 In-Reply-To: <1384423612-18697-2-git-send-email-hardik.patel@volansystech.com> References: <1382715750-10363-1-git-send-email-hardik.patel@volansystech.com> <1382715750-10363-2-git-send-email-hardik.patel@volansystech.com> <526E5DE6.1040804@ti.com> <526E60F9.7010106@ti.com> <526FDA4F.6060609@ti.com> <1384423612-18697-2-git-send-email-hardik.patel@volansystech.com> Message-ID: <5285277C.8050400@ti.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 11/14/2013 04:06 AM, Hardik wrote: > From: Hardik Patel Add some details about the change -> commit message is usually suggested as a good thing to have. [...] > diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c > index c104024..5a7f80a 100644 > --- a/board/ti/panda/panda.c > +++ b/board/ti/panda/panda.c > @@ -122,6 +122,30 @@ int get_board_revision(void) > return board_id; > } > > +/* > +* Routine: is_panda_es_rev_b3 > +* Description: Detect if we are running on B3 version of ES panda board, > +* This can be done by reading the level of GPIO 171 > +* and checking the processor revisions. > +* GPIO171: 1 => Panda ES Rev B3 > +*/ will be good to see some kernel-doc style comments here.. /** * u8 is_panda_es_rev_b3 - Detect if we are running on B3 version of ES panda * * This can be done by reading the level of GPIO 171 and checking the * processor revisions. GPIO171: 1 => Panda ES Rev B3 (if using OMAP4460) */ u8 is_panda_es_rev_b3(void) > +u8 is_panda_es_rev_b3(void) > +{ > + int processor_rev = omap_revision(); > + int ret = 0; > + > + if ((processor_rev >= OMAP4460_ES1_0 && > + processor_rev <= OMAP4460_ES1_1)) { > + > + /* Setup the mux for the common board ID pins (gpio 171) */ > + writew((IEN | M3), (*ctrl)->control_padconf_core_base + UNIPRO_TX0); Could rather belong to mux code in board/ti/panda/panda_mux_data.h? > + > + /* if processor_rev is panda ES and GPIO171 is 1, it is rev b3 */ > + ret = gpio_get_value(PANDA_BOARD_ID_2_GPIO); > + } > + return ret; > +} Why cant we do something equivalent to beagle here? see board/ti/beagle/beagle.c > + > /** > * @brief misc_init_r - Configure Panda board specific configurations > * such as power configurations, ethernet initialization as phase2 of > -- Regards, Nishanth Menon