[U-Boot] [PATCH V4 1/3] Initial support for Marvell Orion5x SoC
Prafulla Wadaskar
prafulla at marvell.com
Mon Jan 11 12:29:16 CET 2010
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Sunday, January 10, 2010 9:34 PM
> To: U-Boot at lists.denx.de
> Subject: [U-Boot] [PATCH V4 1/3] Initial support for Marvell
> Orion5x SoC
>
> This patch adds support for the Marvell Orion5x SoC.
> It has no use alone, and must be followed by a patch
> to add Orion5x support for serial, then support for
> the ED Mini V2, an Orion5x-based product from LaCie.
>
> Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
> ---
> Patchset history
>
> V1: Initial monolithic patch.
> V2: split in three patches : orion, serial, edmini;
> checkpatch'ed, with only 6 errors, in patch 1/3,
> all 6 errors being false positives.
> V3: useless GPIO and MPP programming support removed;
> low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
> V4: all files licensed GPLv2-only removed;
> RAM bank size detection now uses getm_ram_size().
>
> cpu/arm926ejs/orion5x/Makefile | 51 ++++++
> cpu/arm926ejs/orion5x/cpu.c | 258
....snip....
> +int print_cpuinfo(void)
> +{
> + char dev_str[] = "0x0000";
> + char rev_str[] = "0x00";
> + char *dev_name = NULL;
> + char *rev_name = NULL;
> +
> + u32 dev = orion5x_device_id();
> + u32 rev = orion5x_device_rev();
> +
> + if (dev == MV88F5181_DEV_ID) {
> + dev_name = "MV88F5181";
> + if (rev == MV88F5181_REV_B1)
> + rev_name = "B1";
> + else if (rev == MV88F5181L_REV_A1) {
> + dev_name = "MV88F5181L";
> + rev_name = "A1";
> + } else if (rev == MV88F5181L_REV_A0) {
> + dev_name = "MV88F5181L";
> + rev_name = "A0";
> + }
> + } else if (dev == MV88F5182_DEV_ID) {
> + dev_name = "MV88F5182";
> + if (rev == MV88F5182_REV_A2)
> + rev_name = "A2";
> + } else if (dev == MV88F5281_DEV_ID) {
> + dev_name = "MV88F5281";
> + if (rev == MV88F5281_REV_D2)
> + rev_name = "D2";
> + else if (rev == MV88F5281_REV_D1)
> + rev_name = "D1";
> + else if (rev == MV88F5281_REV_D0)
> + rev_name = "D0";
> + } else if (dev == MV88F6183_DEV_ID) {
> + dev_name = "MV88F6183";
> + if (rev == MV88F6183_REV_B0)
> + rev_name = "B0";
> + }
The above checks should be #ifdefed with CONFIG_88FXXXX (SOC type)
There is no need to check for all SoC names, this will also reduce code size.
Regards..
Prafulla . .
More information about the U-Boot
mailing list