merged current version of git://git.denx.de/u-boot
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 23 Feb 2012 13:40:17 +0000 (14:40 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 23 Feb 2012 13:40:17 +0000 (14:40 +0100)
16 files changed:
1  2 
Makefile
common/Makefile
common/cmd_bootm.c
common/cmd_mmc.c
common/cmd_sata.c
disk/part.c
drivers/block/Makefile
drivers/input/Makefile
drivers/misc/Makefile
drivers/mtd/nand/Makefile
drivers/mtd/spi/Makefile
drivers/net/smc911x.h
drivers/spi/Makefile
include/ahci.h
include/environment.h
include/lcd.h

diff --cc Makefile
+++ b/Makefile
@@@ -30,9 -30,11 +30,9 @@@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVE
  else
  U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
  endif
 -TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h
 -VERSION_FILE = $(obj)include/generated/version_autogenerated.h
  
  HOSTARCH := $(shell uname -m | \
-       sed -e s/i.86/i386/ \
+       sed -e s/i.86/x86/ \
            -e s/sun4u/sparc64/ \
            -e s/arm.*/arm/ \
            -e s/sa110/arm/ \
diff --cc common/Makefile
@@@ -51,15 -47,13 +47,16 @@@ COBJS-y += cmd_version.
  COBJS-y += env_common.o
  COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
  COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
- COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
XCOBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
  COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
- COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
XCOBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
  COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
 +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_embedded.o
 +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_embedded.o
 +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_embedded.o
  COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
  COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o
+ COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
  COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
  COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
  COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
@@@ -101,7 -96,7 +101,8 @@@ COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.
  ifdef CONFIG_FPGA
  COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
  endif
+ COBJS-$(CONFIG_CMD_GPIO) += cmd_gpio.o
 +COBJS-$(CONFIG_CMD_IIM) += cmd_iim.o
  COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o
  COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
  COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
@@@ -713,30 -746,23 +746,30 @@@ static image_header_t *image_get_kernel
                return NULL;
        }
  
-       show_boot_progress (3);
-       image_print_contents (hdr);
 +#if defined(CONFIG_MX51_BBG) || defined(CONFIG_MX51_3DS)
 +      if (image_get_load(hdr) < 0x90000000)
 +              image_set_load(hdr, image_get_load(hdr)+0x20000000);
 +      if (image_get_ep(hdr) < 0x90000000)
 +              image_set_ep(hdr, image_get_ep(hdr)+0x20000000);
 +#endif
 +
+       show_boot_progress(3);
+       image_print_contents(hdr);
  
        if (verify) {
-               puts ("   Verifying Checksum ... ");
-               if (!image_check_dcrc (hdr)) {
-                       printf ("Bad Data CRC\n");
-                       show_boot_progress (-3);
+               puts("   Verifying Checksum ... ");
+               if (!image_check_dcrc(hdr)) {
+                       printf("Bad Data CRC\n");
+                       show_boot_progress(-3);
                        return NULL;
                }
-               puts ("OK\n");
+               puts("OK\n");
        }
-       show_boot_progress (4);
+       show_boot_progress(4);
  
-       if (!image_check_target_arch (hdr)) {
-               printf ("Unsupported Architecture 0x%x\n", image_get_arch (hdr));
-               show_boot_progress (-4);
+       if (!image_check_target_arch(hdr)) {
+               printf("Unsupported Architecture 0x%x\n", image_get_arch(hdr));
+               show_boot_progress(-4);
                return NULL;
        }
        return hdr;
@@@ -93,33 -87,12 +87,42 @@@ U_BOOT_CMD
  );
  #else /* !CONFIG_GENERIC_MMC */
  
++<<<<<<< HEAD
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +#define MMC_PARTITION_SWITCH(mmc, part, enable_boot) \
 +      do { \
 +              if (IS_SD(mmc)) {       \
 +                      if (part > 1)   {\
 +                              printf( \
 +                              "\nError: SD partition can only be 0 or 1\n");\
 +                              return 1;       \
 +                      }       \
 +                      if (sd_switch_partition(mmc, part) < 0) {       \
 +                              if (part > 0) { \
 +                                      printf("\nError: Unable to switch SD "\
 +                                      "partition\n");\
 +                                      return 1;       \
 +                              }       \
 +                      }       \
 +              } else {        \
 +                      if (mmc_switch_partition(mmc, part, enable_boot) \
 +                              < 0) {  \
 +                              printf("Error: Fail to switch " \
 +                                      "partition to %d\n", part);     \
 +                              return 1;       \
 +                      }       \
 +              } \
 +      } while (0)
 +#endif
 +
++=======
+ enum mmc_state {
+       MMC_INVALID,
+       MMC_READ,
+       MMC_WRITE,
+       MMC_ERASE,
+ };
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
  static void print_mmcinfo(struct mmc *mmc)
  {
        printf("Device: %s\n", mmc->name);
                        (mmc->version >> 4) & 0xf, mmc->version & 0xf);
  
        printf("High Capacity: %s\n", mmc->high_capacity ? "Yes" : "No");
-       printf("Capacity: %lld\n", mmc->capacity);
+       puts("Capacity: ");
+       print_size(mmc->capacity, "\n");
  
- #ifdef CONFIG_EMMC_DDR_MODE
-       if (mmc->bus_width == EMMC_MODE_4BIT_DDR ||
-               mmc->bus_width == EMMC_MODE_8BIT_DDR)
-               printf("Bus Width: %d-bit DDR\n", (mmc->bus_width >> 8));
-       else
- #endif
        printf("Bus Width: %d-bit\n", mmc->bus_width);
- #ifdef CONFIG_BOOT_PARTITION_ACCESS
-       if (mmc->boot_size_mult == 0) {
-               printf("Boot Partition Size: %s\n", "No boot partition available");
-       } else {
-               printf("Boot Partition Size: %5dKB\n", mmc->boot_size_mult * 128);
-               printf("Current Partition for boot: ");
-               switch (mmc->boot_config & EXT_CSD_BOOT_PARTITION_ENABLE_MASK) {
-               case EXT_CSD_BOOT_PARTITION_DISABLE:
-                       printf("Not bootable\n");
-                       break;
-               case EXT_CSD_BOOT_PARTITION_PART1:
-                       printf("Boot partition 1\n");
-                       break;
-               case EXT_CSD_BOOT_PARTITION_PART2:
-                       printf("Boot partition 2\n");
-                       break;
-               case EXT_CSD_BOOT_PARTITION_USER:
-                       printf("User area\n");
-                       break;
-               default:
-                       printf("Unknown\n");
-                       break;
-               }
-       }
- #endif
  }
  
- int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+ int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  {
        struct mmc *mmc;
-       int dev_num;
  
-       if (argc < 2)
-               dev_num = 0;
-       else
-               dev_num = simple_strtoul(argv[1], NULL, 0);
+       if (curr_device < 0) {
+               if (get_mmc_num() > 0)
+                       curr_device = 0;
+               else {
+                       puts("No MMC device available\n");
+                       return 1;
+               }
+       }
  
-       mmc = find_mmc_device(dev_num);
+       mmc = find_mmc_device(curr_device);
  
        if (mmc) {
-       }
++<<<<<<< HEAD
 +              if (mmc_init(mmc))
 +                      puts("MMC card init failed!\n");
 +              else
 +                      print_mmcinfo(mmc);
++=======
+               mmc_init(mmc);
  
-       return 0;
+               print_mmcinfo(mmc);
+               return 0;
+       } else {
+               printf("no mmc device at slot %x\n", curr_device);
+               return 1;
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
+       }
  }
  
++<<<<<<< HEAD
 +U_BOOT_CMD(mmcinfo, 2, 0, do_mmcinfo,
 +      "mmcinfo <dev num>-- display MMC info",
++=======
+ U_BOOT_CMD(
+       mmcinfo, 1, 0, do_mmcinfo,
+       "display MMC info",
+       "    - device number of the device to dislay info of\n"
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
        ""
  );
  
- int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  {
++<<<<<<< HEAD
 +      int rc = 0;
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +      u32 part = 0;
 +#endif
++=======
+       enum mmc_state state;
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
  
-       switch (argc) {
-       case 3:
-               if (strcmp(argv[1], "rescan") == 0) {
-                       int dev = simple_strtoul(argv[2], NULL, 10);
-                       struct mmc *mmc = find_mmc_device(dev);
+       if (argc < 2)
+               return cmd_usage(cmdtp);
  
-                       if (!mmc)
-                               return 1;
+       if (curr_device < 0) {
+               if (get_mmc_num() > 0)
+                       curr_device = 0;
+               else {
+                       puts("No MMC device available\n");
+                       return 1;
+               }
+       }
  
-                       mmc_init(mmc);
+       if (strcmp(argv[1], "rescan") == 0) {
+               struct mmc *mmc = find_mmc_device(curr_device);
  
-                       return 0;
+               if (!mmc) {
+                       printf("no mmc device at slot %x\n", curr_device);
+                       return 1;
                }
  
-       case 0:
-       case 1:
-       case 4:
-               printf("Usage:\n%s\n", cmdtp->usage);
-               return 1;
+               mmc->has_init = 0;
  
-       case 2:
-               if (!strcmp(argv[1], "list")) {
-                       print_mmc_devices('\n');
+               if (mmc_init(mmc))
+                       return 1;
+               else
                        return 0;
+       } else if (strncmp(argv[1], "part", 4) == 0) {
+               block_dev_desc_t *mmc_dev;
+               struct mmc *mmc = find_mmc_device(curr_device);
+               if (!mmc) {
+                       printf("no mmc device at slot %x\n", curr_device);
+                       return 1;
                }
+               mmc_init(mmc);
+               mmc_dev = mmc_get_dev(curr_device);
+               if (mmc_dev != NULL &&
+                               mmc_dev->type != DEV_TYPE_UNKNOWN) {
+                       print_part(mmc_dev);
+                       return 0;
+               }
+               puts("get mmc type error!\n");
                return 1;
++<<<<<<< HEAD
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +      case 7: /* Fall through */
 +              part = simple_strtoul(argv[6], NULL, 10);
 +#endif
 +      default: /* at least 5 args */
 +              if (strcmp(argv[1], "read") == 0) {
 +                      int dev = simple_strtoul(argv[2], NULL, 10);
 +                      void *addr = (void *)simple_strtoul(argv[3], NULL, 16);
 +                      u32 cnt = simple_strtoul(argv[5], NULL, 16);
 +                      u32 n;
 +                      u32 blk = simple_strtoul(argv[4], NULL, 16);
 +
 +                      struct mmc *mmc = find_mmc_device(dev);
 +
 +                      if (!mmc)
++=======
+       } else if (strcmp(argv[1], "list") == 0) {
+               print_mmc_devices('\n');
+               return 0;
+       } else if (strcmp(argv[1], "dev") == 0) {
+               int dev, part = -1;
+               struct mmc *mmc;
+               if (argc == 2)
+                       dev = curr_device;
+               else if (argc == 3)
+                       dev = simple_strtoul(argv[2], NULL, 10);
+               else if (argc == 4) {
+                       dev = (int)simple_strtoul(argv[2], NULL, 10);
+                       part = (int)simple_strtoul(argv[3], NULL, 10);
+                       if (part > PART_ACCESS_MASK) {
+                               printf("#part_num shouldn't be larger"
+                                       " than %d\n", PART_ACCESS_MASK);
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
                                return 1;
+                       }
+               } else
+                       return cmd_usage(cmdtp);
  
++<<<<<<< HEAD
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +                      printf("\nMMC read: dev # %d, block # %d, "
 +                              "count %d partition # %d ... \n",
 +                              dev, blk, cnt, part);
 +#else
 +                      printf("\nMMC read: dev # %d, block # %d,"
 +                              "count %d ... \n", dev, blk, cnt);
 +#endif
 +
 +                      mmc_init(mmc);
 +
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +                      if (((mmc->boot_config &
 +                              EXT_CSD_BOOT_PARTITION_ACCESS_MASK) != part)
 +                              || IS_SD(mmc)) {
 +                              /*
 +                               * After mmc_init, we now know whether
 +                               * this is a eSD/eMMC which support boot
 +                               * partition
 +                               */
 +                              MMC_PARTITION_SWITCH(mmc, part, 0);
 +                      }
 +#endif
 +
 +                      n = mmc->block_dev.block_read(dev, blk, cnt, addr);
++=======
+               mmc = find_mmc_device(dev);
+               if (!mmc) {
+                       printf("no mmc device at slot %x\n", dev);
+                       return 1;
+               }
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
  
-                       /* flush cache after read */
-                       flush_cache((ulong)addr, cnt * 512); /* FIXME */
+               mmc_init(mmc);
+               if (part != -1) {
+                       int ret;
+                       if (mmc->part_config == MMCPART_NOAVAILABLE) {
+                               printf("Card doesn't support part_switch\n");
+                               return 1;
+                       }
  
++<<<<<<< HEAD
 +                      printf("%d blocks read: %s\n",
 +                              n, (n==cnt) ? "OK" : "ERROR");
 +                      return (n == cnt) ? 0 : 1;
 +              } else if (strcmp(argv[1], "write") == 0) {
 +                      int dev = simple_strtoul(argv[2], NULL, 10);
 +                      void *addr = (void *)simple_strtoul(argv[3], NULL, 16);
 +                      u32 cnt = simple_strtoul(argv[5], NULL, 16);
 +                      u32 n;
 +
 +                      struct mmc *mmc = find_mmc_device(dev);
++=======
+                       if (part != mmc->part_num) {
+                               ret = mmc_switch_part(dev, part);
+                               if (!ret)
+                                       mmc->part_num = part;
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
+                               printf("switch to partions #%d, %s\n",
+                                               part, (!ret) ? "OK" : "ERROR");
+                       }
+               }
+               curr_device = dev;
+               if (mmc->part_config == MMCPART_NOAVAILABLE)
+                       printf("mmc%d is current device\n", curr_device);
+               else
+                       printf("mmc%d(part %d) is current device\n",
+                               curr_device, mmc->part_num);
  
-                       int blk = simple_strtoul(argv[4], NULL, 16);
-                       if (!mmc)
-                               return 1;
+               return 0;
+       }
  
++<<<<<<< HEAD
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +                      printf("\nMMC write: dev # %d, block # %d, "
 +                              "count %d, partition # %d ... \n",
 +                              dev, blk, cnt, part);
 +#else
 +                      printf("\nMMC write: dev # %d, block # %d, "
 +                              "count %d ... \n",
 +                              dev, blk, cnt);
 +#endif
++=======
+       if (strcmp(argv[1], "read") == 0)
+               state = MMC_READ;
+       else if (strcmp(argv[1], "write") == 0)
+               state = MMC_WRITE;
+       else if (strcmp(argv[1], "erase") == 0)
+               state = MMC_ERASE;
+       else
+               state = MMC_INVALID;
+       if (state != MMC_INVALID) {
+               struct mmc *mmc = find_mmc_device(curr_device);
+               int idx = 2;
+               u32 blk, cnt, n;
+               void *addr;
+               if (state != MMC_ERASE) {
+                       addr = (void *)simple_strtoul(argv[idx], NULL, 16);
+                       ++idx;
+               } else
+                       addr = 0;
+               blk = simple_strtoul(argv[idx], NULL, 16);
+               cnt = simple_strtoul(argv[idx + 1], NULL, 16);
+               if (!mmc) {
+                       printf("no mmc device at slot %x\n", curr_device);
+                       return 1;
+               }
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
  
-                       mmc_init(mmc);
+               printf("\nMMC %s: dev # %d, block # %d, count %d ... ",
+                               argv[1], curr_device, blk, cnt);
  
-                       printf("%d blocks written: %s\n",
-                               n, (n == cnt) ? "OK" : "ERROR");
-                       return (n == cnt) ? 0 : 1;
-               } else {
-                       printf("Usage:\n%s\n", cmdtp->usage);
-                       rc = 1;
++<<<<<<< HEAD
 +#ifdef CONFIG_BOOT_PARTITION_ACCESS
 +                      if (((mmc->boot_config &
 +                              EXT_CSD_BOOT_PARTITION_ACCESS_MASK) != part)
 +                              || IS_SD(mmc)) {
 +                              /*
 +                               * After mmc_init, we now know whether this is a
 +                               * eSD/eMMC which support boot partition
 +                               */
 +                              MMC_PARTITION_SWITCH(mmc, part, 1);
 +                      }
 +#endif
 +
 +                      n = mmc->block_dev.block_write(dev, blk, cnt, addr);
++=======
+               mmc_init(mmc);
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
+               switch (state) {
+               case MMC_READ:
+                       n = mmc->block_dev.block_read(curr_device, blk,
+                                                     cnt, addr);
+                       /* flush cache after read */
+                       flush_cache((ulong)addr, cnt * 512); /* FIXME */
+                       break;
+               case MMC_WRITE:
+                       n = mmc->block_dev.block_write(curr_device, blk,
+                                                     cnt, addr);
+                       break;
+               case MMC_ERASE:
+                       n = mmc->block_dev.block_erase(curr_device, blk, cnt);
+                       break;
+               default:
+                       BUG();
                }
  
-               return rc;
+               printf("%d blocks %s: %s\n",
+                               n, argv[1], (n == cnt) ? "OK" : "ERROR");
+               return (n == cnt) ? 0 : 1;
        }
+       return cmd_usage(cmdtp);
  }
  
- #ifndef CONFIG_BOOT_PARTITION_ACCESS
  U_BOOT_CMD(
        mmc, 6, 1, do_mmcops,
        "MMC sub system",
++<<<<<<< HEAD
 +      "mmc read <device num> addr blk# cnt\n"
 +      "mmc write <device num> addr blk# cnt\n"
 +      "mmc rescan <device num>\n"
++=======
+       "read addr blk# cnt\n"
+       "mmc write addr blk# cnt\n"
+       "mmc erase blk# cnt\n"
+       "mmc rescan\n"
+       "mmc part - lists available partition on current mmc device\n"
+       "mmc dev [dev] [part] - show or set current mmc device [partition]\n"
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
 +      "mmc list - lists available devices");
 +#else
 +U_BOOT_CMD(
 +      mmc, 7, 1, do_mmcops,
 +      "MMC sub system",
 +      "mmc read <device num> addr blk# cnt [partition]\n"
 +      "mmc write <device num> addr blk# cnt [partition]\n"
 +      "mmc rescan <device num>\n"
        "mmc list - lists available devices");
  #endif
- #endif
Simple merge
diff --cc disk/part.c
Simple merge
  
  include $(TOPDIR)/config.mk
  
- LIB   := $(obj)libblock.a
+ LIB   := $(obj)libblock.o
  
+ COBJS-$(CONFIG_SCSI_AHCI) += ahci.o
  COBJS-$(CONFIG_ATA_PIIX) += ata_piix.o
- COBJS-$(CONFIG_CMD_MG_DISK) += mg_disk.o
 +COBJS-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
  COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o
- COBJS-$(CONFIG_IDE_SIL680) += sil680.o
+ COBJS-$(CONFIG_IDE_FTIDE020) += ftide020.o
  COBJS-$(CONFIG_LIBATA) += libata.o
+ COBJS-$(CONFIG_CMD_MG_DISK) += mg_disk.o
+ COBJS-$(CONFIG_MVSATA_IDE) += mvsata_ide.o
+ COBJS-$(CONFIG_MX51_PATA) += mxc_ata.o
  COBJS-$(CONFIG_PATA_BFIN) += pata_bfin.o
  COBJS-$(CONFIG_SATA_DWC) += sata_dwc.o
  COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
Simple merge
@@@ -28,10 -28,17 +28,18 @@@ LIB        := $(obj)libmisc.
  COBJS-$(CONFIG_ALI152X) += ali512x.o
  COBJS-$(CONFIG_DS4510)  += ds4510.o
  COBJS-$(CONFIG_FSL_LAW) += fsl_law.o
 +COBJS-$(CONFIG_IMX_IIM) += imx_iim.o
+ COBJS-$(CONFIG_GPIO_LED) += gpio_led.o
+ COBJS-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o
  COBJS-$(CONFIG_NS87308) += ns87308.o
+ COBJS-$(CONFIG_PDSP188x) += pdsp188x.o
  COBJS-$(CONFIG_STATUS_LED) += status_led.o
  COBJS-$(CONFIG_TWL4030_LED) += twl4030_led.o
+ COBJS-$(CONFIG_PMIC) += pmic_core.o
+ COBJS-$(CONFIG_PMIC_FSL) += pmic_fsl.o
+ COBJS-$(CONFIG_PMIC_I2C) += pmic_i2c.o
+ COBJS-$(CONFIG_PMIC_SPI) += pmic_spi.o
+ COBJS-$(CONFIG_PMIC_MAX8998) += pmic_max8998.o
  
  COBJS := $(COBJS-y)
  SRCS  := $(COBJS:.o=.c)
@@@ -44,11 -60,9 +60,12 @@@ COBJS-$(CONFIG_NAND_NDFC) += ndfc.
  COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o
  COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
  COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o
+ COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o
  COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
  COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o
 +COBJS-$(CONFIG_MX31_NAND) += mx31_nand.o
 +COBJS-$(CONFIG_MXC_NAND) += mxc_nand.o nand_device_info.o
 +COBJS-$(CONFIG_MXS_NAND) += mxs_gpmi.o
  endif
  
  COBJS := $(COBJS-y)
@@@ -31,10 -36,9 +36,12 @@@ COBJS-$(CONFIG_SPI_FLASH_MACRONIX)  += m
  COBJS-$(CONFIG_SPI_FLASH_SPANSION)    += spansion.o
  COBJS-$(CONFIG_SPI_FLASH_SST) += sst.o
  COBJS-$(CONFIG_SPI_FLASH_STMICRO)     += stmicro.o
+ COBJS-$(CONFIG_SPI_FLASH_WINBOND)     += winbond.o
+ COBJS-$(CONFIG_SPI_FRAM_RAMTRON)      += ramtron.o
  COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
 +COBJS-$(CONFIG_SPI_FLASH_IMX) += imx_spi_nor.o
 +COBJS-$(CONFIG_SPI_FLASH_IMX_SST)     += imx_spi_nor_sst.o
 +COBJS-$(CONFIG_SPI_FLASH_IMX_ATMEL)   += imx_spi_nor_atmel.o
  
  COBJS := $(COBJS-y)
  SRCS  := $(COBJS:.o=.c)
Simple merge
@@@ -33,11 -37,13 +37,20 @@@ COBJS-$(CONFIG_KIRKWOOD_SPI) += kirkwoo
  COBJS-$(CONFIG_MPC52XX_SPI) += mpc52xx_spi.o
  COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
  COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
+ COBJS-$(CONFIG_MXS_SPI) += mxs_spi.o
+ COBJS-$(CONFIG_OC_TINY_SPI) += oc_tiny_spi.o
+ COBJS-$(CONFIG_OMAP3_SPI) += omap3_spi.o
  COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
++<<<<<<< HEAD
 +COBJS-$(CONFIG_IMX_ECSPI) += imx_ecspi.o
 +COBJS-$(CONFIG_IMX_CSPI) += imx_cspi.o
 +COBJS-$(CONFIG_IMX_SPI_PMIC) += imx_spi_pmic.o
 +COBJS-$(CONFIG_IMX_SPI_CPLD) += imx_spi_cpld.o
++=======
+ COBJS-$(CONFIG_SH_SPI) += sh_spi.o
+ COBJS-$(CONFIG_FSL_ESPI) += fsl_espi.o
+ COBJS-$(CONFIG_TEGRA2_SPI) += tegra2_spi.o
++>>>>>>> 9a3aae22edf1eda6326cc51c28631ca5c23b7706
  
  COBJS := $(COBJS-y)
  SRCS  := $(COBJS:.o=.c)
diff --cc include/ahci.h
Simple merge
@@@ -91,38 -103,42 +103,60 @@@ extern unsigned long nand_env_oob_offse
  # ifndef CONFIG_ENV_SIZE
  #  error "Need to define CONFIG_ENV_SIZE when using CONFIG_ENV_IS_IN_MG_DISK"
  # endif
- # ifdef CONFIG_ENV_IS_EMBEDDED
- #  error "CONFIG_ENV_IS_EMBEDDED not supported when using CONFIG_ENV_IS_IN_MG_DISK"
- # endif
  #endif /* CONFIG_ENV_IS_IN_MG_DISK */
  
- #include "compiler.h"
- #ifdef USE_HOSTCC
- # include <stdint.h>
- #else
- # include <linux/types.h>
 +#if defined(CONFIG_ENV_IS_IN_MMC)
 +# ifndef CONFIG_ENV_OFFSET
 +#  error "Need to define CONFIG_ENV_OFFSET when using CONFIG_ENV_IS_IN_MMC"
 +# endif
 +# ifndef CONFIG_ENV_ADDR
 +#  define CONFIG_ENV_ADDR     (CONFIG_ENV_OFFSET)
 +# endif
 +# ifndef CONFIG_ENV_OFFSET
 +#  define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
 +# endif
 +# ifdef CONFIG_ENV_OFFSET_REDUND
 +#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 +# endif
 +# ifdef CONFIG_ENV_IS_EMBEDDED
 +#  define ENV_IS_EMBEDDED     1
 +# endif
 +#endif /* CONFIG_ENV_IS_IN_MMC */
 +
+ /* Embedded env is only supported for some flash types */
+ #ifdef CONFIG_ENV_IS_EMBEDDED
+ # if  !defined(CONFIG_ENV_IS_IN_FLASH)        && \
+       !defined(CONFIG_ENV_IS_IN_NAND)         && \
+       !defined(CONFIG_ENV_IS_IN_ONENAND)      && \
+       !defined(CONFIG_ENV_IS_IN_SPI_FLASH)
+ #  error "CONFIG_ENV_IS_EMBEDDED not supported for your flash type"
+ # endif
  #endif
  
+ /*
+  * For the flash types where embedded env is supported, but it cannot be
+  * calculated automatically (i.e. NAND), take the board opt-in.
+  */
+ #if defined(CONFIG_ENV_IS_EMBEDDED) && !defined(ENV_IS_EMBEDDED)
+ # define ENV_IS_EMBEDDED
+ #endif
+ /* The build system likes to know if the env is embedded */
+ #ifdef DO_DEPS_ONLY
+ # ifdef ENV_IS_EMBEDDED
+ #  ifndef CONFIG_ENV_IS_EMBEDDED
+ #   define CONFIG_ENV_IS_EMBEDDED
+ #  endif
+ # endif
+ #endif
+ #include "compiler.h"
  #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
  # define ENV_HEADER_SIZE      (sizeof(uint32_t) + 1)
+ # define ACTIVE_FLAG   1
+ # define OBSOLETE_FLAG 0
  #else
  # define ENV_HEADER_SIZE      (sizeof(uint32_t))
  #endif
diff --cc include/lcd.h
Simple merge