diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2009-01-19 22:42:03 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2009-01-19 22:42:03 +0000 |
commit | 5a4676144660f6e92bbe5e0de6b38094df155021 (patch) | |
tree | 064a71e50fa34e6a26c44b5597b3c4e1fc45556a /target/device/Atmel/arch-arm/u-boot/2009.01-rc3/u-boot-2009.01-rc1-011-spimux.patch | |
parent | b71c76a10a21320a9401cc4246079e9f4f47fae1 (diff) | |
download | buildroot-novena-5a4676144660f6e92bbe5e0de6b38094df155021.tar.gz buildroot-novena-5a4676144660f6e92bbe5e0de6b38094df155021.zip |
Bump u-boot to -2009.01-rc3, and add possibility to apply the arch-at91 patches if using an at91
Diffstat (limited to 'target/device/Atmel/arch-arm/u-boot/2009.01-rc3/u-boot-2009.01-rc1-011-spimux.patch')
-rw-r--r-- | target/device/Atmel/arch-arm/u-boot/2009.01-rc3/u-boot-2009.01-rc1-011-spimux.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/target/device/Atmel/arch-arm/u-boot/2009.01-rc3/u-boot-2009.01-rc1-011-spimux.patch b/target/device/Atmel/arch-arm/u-boot/2009.01-rc3/u-boot-2009.01-rc1-011-spimux.patch new file mode 100644 index 000000000..8ab469fd8 --- /dev/null +++ b/target/device/Atmel/arch-arm/u-boot/2009.01-rc3/u-boot-2009.01-rc1-011-spimux.patch @@ -0,0 +1,93 @@ +diff -urN u-boot-2009.01-0rig//common/cmd_mux.c u-boot-2009.01/common/cmd_mux.c +--- u-boot-2009.01-0rig//common/cmd_mux.c 1970-01-01 01:00:00.000000000 +0100 ++++ u-boot-2009.01/common/cmd_mux.c 2009-01-04 00:17:19.000000000 +0100 +@@ -0,0 +1,78 @@ ++/* ++ * (C) Copyright 2008 ++ * Ulf Samuelsson <ulf.samuelsson@atmel.com> ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include <common.h> ++#include <command.h> ++#if (defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF)) ++ ++#include <asm/arch/AT91RM9200.h> ++#include <dataflash.h> ++#include <at45.h> ++ ++ ++static int mmc_nspi (const char *s) ++{ ++ if (strcmp(s, "mmc") == 0) { ++ return (1); ++ } else if (strcmp(s, "spi") == 0) { ++ return (0); ++ } ++ return (-1); ++} ++ ++int do_mux ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++ switch (argc) { ++ case 2: /* on / off */ ++ switch (mmc_nspi(argv[1])) { ++#if 0 /* prevented by varargs handling; FALLTROUGH is harmless, too */ ++ default: printf ("Usage:\n%s\n", cmdtp->usage); ++ return; ++#endif ++ case 0: AT91F_SelectSPI (); ++ break; ++ case 1: AT91F_SelectMMC (); ++ break; ++ } ++ /* FALL TROUGH */ ++ case 1: /* get status */ ++ printf ("Mux is configured to be %s\n", ++ AT91F_GetMuxStatus() ? "MMC" : "SPI"); ++ return 0; ++ default: ++ printf ("Usage:\n%s\n", cmdtp->usage); ++ return 1; ++ } ++ return 0; ++} ++ ++ ++U_BOOT_CMD( ++ mux, 2, 1, do_mux, ++ "mux\t- enable or disable MMC or SPI\n", ++ "[mmc, spi]\n" ++ " - enable or disable MMC or SPI\n" ++); ++ ++#endif /* CONFIG_CMD_MUX */ ++ +diff -urN u-boot-2009.01-0rig//common/Makefile u-boot-2009.01/common/Makefile +--- u-boot-2009.01-0rig//common/Makefile 2009-01-04 00:10:28.000000000 +0100 ++++ u-boot-2009.01/common/Makefile 2009-01-04 00:20:39.000000000 +0100 +@@ -112,6 +112,7 @@ + COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o + COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o + COBJS-$(CONFIG_MP) += cmd_mp.o ++COBJS-$(CONFIG_CMD_AT91_SPIMUX) += cmd_mux.o + COBJS-y += cmd_nand.o + COBJS-$(CONFIG_CMD_NET) += cmd_net.o + COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o |