| // SPDX-License-Identifier: GPL-2.0+ |
| * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| static int mmc_nspi (const char *); |
| int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| switch (mmc_nspi (argv[1])) { |
| case 0: AT91F_SelectSPI (); |
| case 1: AT91F_SelectMMC (); |
| printf ("Mux is configured to be %s\n", |
| AT91F_GetMuxStatus () ? "MMC" : "SPI"); |
| static int mmc_nspi (const char *s) |
| if (strcmp (s, "mmc") == 0) { |
| } else if (strcmp (s, "spi") == 0) { |
| dataflash_mmc_mux, 2, 1, do_dataflash_mmc_mux, |
| "enable or disable MMC or SPI\n", |
| " - enable or disable MMC or SPI" |