Jean-Christophe, Based on your review I have made the changes you asked for.
Tom > @@ -60,6 +61,46 @@ static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = { > 0x1D0904C4, 0 > }; > > +/* Used to track the revision of the board */ > +int zoom2_revision = ZOOM2_REVISION_UNKNOWN; add static and as the beagle provide a function to get the current version > + Tom : Ok added See +/* Used to track the revision of the board */ +static ZOOM2_REVISION zoom2_revision = ZOOM2_REVISION_UNKNOWN; + +/* + * Routine: zoom2_get_revision + * Description: Return the revision of the Zoom2 this code is running on. + */ +ZOOM2_REVISION zoom2_get_revision(void) +{ + return zoom2_revision; +} ------------------------------------------------------------------- > + printf("Board revision "); > + if (ZOOM2_REVISION_PRODUCTION == zoom2_revision) > + printf("Production\n"); > + else if (ZOOM2_REVISION_BETA == zoom2_revision) > + printf("Beta\n"); > + else > + printf("Unknown\n"); please use switch > +} Tom : Ok done. See + switch (zoom2_revision) { + case (ZOOM2_REVISION_PRODUCTION): + printf("Production\n"); + break; + case (ZOOM2_REVISION_BETA): + printf("Beta\n"); + break; + default: + printf("Unknown\n"); + break; + } +} ------------------------------------------------------- > +#define ZOOM2_REVISION_UNKNOWN 0 > +#define ZOOM2_REVISION_ALPHA 1 > +#define ZOOM2_REVISION_BETA 2 > +#define ZOOM2_REVISION_PRODUCTION 3 please use an emum Tom : Ok See +typedef enum { + ZOOM2_REVISION_UNKNOWN = 0, + ZOOM2_REVISION_ALPHA, + ZOOM2_REVISION_BETA, + ZOOM2_REVISION_PRODUCTION +} ZOOM2_REVISION; ---------------------------------------------------------- Also changed this comment in beagle.c /* * Routine: beagle_get_revision - * Description: Return revision of the BeagleBoard this code is running on. + * Description: Return the revision of the BeagleBoard this code is running on. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot