On Fri, Dec 10, 2010 at 7:48 AM, Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> wrote: > On 16:42 Fri 10 Dec   , Marc Reilly wrote: >> Starting point for the vpr200 board. >> Very similar core hardware to mx35 3stack. >> >> Signed-off-by: Marc Reilly <marc@xxxxxxxxxxxxxxx> >> --- >> Âarch/arm/Makefile              Â|  Â1 + >> Âarch/arm/boards/vpr200/Makefile       Â|  Â4 + >> Âarch/arm/boards/vpr200/config.h       Â|  28 + >> Âarch/arm/boards/vpr200/env/bin/_update    |  39 ++ >> Âarch/arm/boards/vpr200/env/bin/boot     Â|  67 ++ >> Âarch/arm/boards/vpr200/env/bin/hush_hack   |  Â1 + >> Âarch/arm/boards/vpr200/env/bin/init     Â|  38 + >> Âarch/arm/boards/vpr200/env/bin/update_kernel |  15 + >> Âarch/arm/boards/vpr200/env/bin/update_rootfs |  20 + > con u use the defaultenv? >> Âarch/arm/boards/vpr200/env/config      Â|  46 ++ >> Âarch/arm/boards/vpr200/flash_header.c    Â|  46 ++ >> Âarch/arm/boards/vpr200/lowlevel.c      Â| Â255 +++++++ >> Âarch/arm/boards/vpr200/vpr200.c       Â| Â929 ++++++++++++++++++++++++++ >> Âarch/arm/boards/vpr200/vpr200.dox      Â|  10 + >> Âarch/arm/configs/vpr200_defconfig      Â|  60 ++ >> Âarch/arm/mach-imx/Kconfig          Â|  13 + >> Â16 files changed, 1572 insertions(+), 0 deletions(-) >> Âcreate mode 100644 arch/arm/boards/vpr200/Makefile >> Âcreate mode 100644 arch/arm/boards/vpr200/config.h >> Âcreate mode 100644 arch/arm/boards/vpr200/env/bin/_update >> Âcreate mode 100644 arch/arm/boards/vpr200/env/bin/boot >> Âcreate mode 100644 arch/arm/boards/vpr200/env/bin/hush_hack >> Âcreate mode 100644 arch/arm/boards/vpr200/env/bin/init >> Âcreate mode 100644 arch/arm/boards/vpr200/env/bin/update_kernel >> Âcreate mode 100644 arch/arm/boards/vpr200/env/bin/update_rootfs >> Âcreate mode 100644 arch/arm/boards/vpr200/env/config >> Âcreate mode 100644 arch/arm/boards/vpr200/flash_header.c >> Âcreate mode 100644 arch/arm/boards/vpr200/lowlevel.c >> Âcreate mode 100644 arch/arm/boards/vpr200/vpr200.c >> Âcreate mode 100644 arch/arm/boards/vpr200/vpr200.dox >> Âcreate mode 100644 arch/arm/configs/vpr200_defconfig >> >> diff --git a/arch/arm/Makefile b/arch/arm/Makefile >> index 9729c23..6e6be98 100644 >> --- a/arch/arm/Makefile >> +++ b/arch/arm/Makefile >> @@ -91,6 +91,7 @@ board-$(CONFIG_MACH_CHUMBY)         := chumby_falconwing >> Âboard-$(CONFIG_MACH_FREESCALE_MX51_PDK)       Â:= freescale-mx51-pdk >> Âboard-$(CONFIG_MACH_GUF_CUPID)            := guf-cupid >> Âboard-$(CONFIG_MACH_MINI2440)            Â:= mini2440 >> +board-$(CONFIG_MACH_VPR200)         Â:= vpr200 >> >> Âmachdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) >> >> +static int do_diagled(struct command *cmdtp, int argc, char *argv[]) >> +{ >> +   int color; >> + >> +   if (argc != 2) >> +       return COMMAND_ERROR_USAGE; >> + >> +   color = simple_strtoul(argv[1], NULL, 0); >> +   vpr_diag_set_color(color); >> + >> +   return 0; >> +} > it will be better to have a common API for led management >> + >> +BAREBOX_CMD_HELP_START(diagled) >> +BAREBOX_CMD_HELP_USAGE("diagled [color]\n") >> +BAREBOX_CMD_HELP_SHORT("Sets the color of the diagnostic LED.\n") >> +BAREBOX_CMD_HELP_TEXT("\toff\t 0\n") >> +BAREBOX_CMD_HELP_TEXT("\tblue\t 1\n") >> +BAREBOX_CMD_HELP_TEXT("\tgreen\t 2\n") >> +BAREBOX_CMD_HELP_TEXT("\taqua\t 3\n") >> +BAREBOX_CMD_HELP_TEXT("\tred\t 4\n") >> +BAREBOX_CMD_HELP_TEXT("\tmagenta\t 5\n") >> +BAREBOX_CMD_HELP_TEXT("\tyellow\t 6\n") >> +BAREBOX_CMD_HELP_TEXT("\twhite\t 7\n") >> +BAREBOX_CMD_HELP_END >> + >> +BAREBOX_CMD_START(diagled) >> +   .cmd      Â= do_diagled, >> +   .usage     Â= "Set color of diagnositc tri-color LED", >> +   BAREBOX_CMD_HELP(cmd_diagled_help) >> +BAREBOX_CMD_END >> + >> +/* ------------------------------------------------------------------------ */ >> + >> +static int do_waitbutton(struct command *cmdtp, int argc, char *argv[]) >> +{ >> +   int opt; >> +   uint64_t start; >> +   ulong timeout = 0; >> +   uint32_t bstate; >> + >> +   while ((opt = getopt(argc, argv, "t:")) > 0) { >> +       switch (opt) { >> +       case 't': >> +           timeout = simple_strtol(optarg, NULL, 0); >> +           break; >> +       } >> +   } >> + >> +   start = get_time_ns(); >> +   while (!timeout || !is_timeout(start, timeout * SECOND)) { >> +       bstate = vpr_button_state(); >> +       if (bstate) { >> +           printf("%d\n", vpr_button_state_to_number(bstate)); >> +           return 0; >> +       } >> +       if (ctrlc()) >> +           return -EINTR; >> +   } >> + >> +   return -ETIMEDOUT; >> +} > ditto here >> + >> +BAREBOX_CMD_HELP_START(waitbutton) >> +BAREBOX_CMD_HELP_USAGE("waitbutton [-t]\n") >> +BAREBOX_CMD_HELP_SHORT("Prints the button number of the next pressed button.\n") >> +BAREBOX_CMD_HELP_OPT("-t <seconds>", "time in seconds to wait. 0 (default) is forever.") >> +BAREBOX_CMD_HELP_END > > please also check your patch you have some whitespace and other too long line > issue FYI can be used checkpatch.pl in scripts directory ;) > > Best Regards, > J. > > _______________________________________________ > barebox mailing list > barebox@xxxxxxxxxxxxxxxxxxx > http://lists.infradead.org/mailman/listinfo/barebox > thanks, marek -- as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox