~ubuntu-branches/ubuntu/maverick/uboot-imx/maverick

« back to all changes in this revision

Viewing changes to board/cm5200/cmd_cm5200.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-01-20 15:41:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100120154126-7bha1jeyjegu7xm5
Tags: 2009.08+really2009.01-0ubuntu1
* revert to the 2009.01 upstream version, 2009.08 has still to 
  many work in progress items in the freescale patchset (MMC and NIC
  dont work at all)
* add the latest patchset from freescale for 2009.01
* add 1002_enable_hush_shell_and_ext2.patch to enable hush shell and ext2 
* add 1003_fix_board_revision_numbers to make sure babbage 2.5 boards have 
  revision 51120 and babbage 3.0 boards have revision 51130 properly set in 
  their cpuinfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#ifdef CONFIG_CMD_BSP
31
31
 
32
 
static int do_i2c_test(char *argv[])
 
32
int do_i2c(char *argv[])
33
33
{
34
34
        unsigned char temp, temp1;
35
35
 
57
57
        return 0;
58
58
}
59
59
 
60
 
static int do_usb_test(char *argv[])
 
60
int do_usbtest(char *argv[])
61
61
{
62
62
        int i;
63
63
        static int usb_stor_curr_dev = -1; /* current device */
90
90
        return 0;
91
91
}
92
92
 
93
 
static int do_led_test(char *argv[])
 
93
int do_led(char *argv[])
94
94
{
95
95
        int i = 0;
96
96
        struct mpc5xxx_gpt_0_7 *gpt = (struct mpc5xxx_gpt_0_7 *)MPC5XXX_GPT;
134
134
        return 0;
135
135
}
136
136
 
137
 
static int do_rs232_test(char *argv[])
 
137
int do_rs232(char *argv[])
138
138
{
139
139
        int error_status = 0;
140
140
        struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
397
397
        return error_status;
398
398
}
399
399
 
400
 
static int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
400
int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
401
401
{
402
402
        int rcode = -1;
403
403
 
404
404
        switch (argc) {
405
405
        case 2:
406
406
                if (strncmp(argv[1], "i2c", 3) == 0)
407
 
                        rcode = do_i2c_test(argv);
 
407
                        rcode = do_i2c(argv);
408
408
                else if (strncmp(argv[1], "led", 3) == 0)
409
 
                        rcode = do_led_test(argv);
 
409
                        rcode = do_led(argv);
410
410
                else if (strncmp(argv[1], "usb", 3) == 0)
411
 
                        rcode = do_usb_test(argv);
 
411
                        rcode = do_usbtest(argv);
412
412
                break;
413
413
        case 3:
414
414
                if (strncmp(argv[1], "rs232", 3) == 0)
415
 
                        rcode = do_rs232_test(argv);
 
415
                        rcode = do_rs232(argv);
416
416
                break;
417
417
        }
418
418
 
435
435
 
436
436
U_BOOT_CMD(
437
437
        fkt,    4,      1,      cmd_fkt,
438
 
        "Function test routines",
 
438
        "fkt     - Function test routines\n",
439
439
        "i2c\n"
440
440
        "     - Test I2C communication\n"
441
441
        "fkt led\n"
443
443
        "fkt rs232 number\n"
444
444
        "     - Test RS232 (loopback plug(s) for RS232 required)\n"
445
445
        "fkt usb\n"
446
 
        "     - Test USB communication"
 
446
        "     - Test USB communication\n"
447
447
);
448
448
#endif /* CONFIG_CMD_BSP */