Merge remote branch 'git-master/android-tegra-2.6.36' into 0112-1120
Dan Willemsen [Sat, 26 Mar 2011 01:49:07 +0000 (18:49 -0700)]
Conflicts:
Makefile
arch/arm/configs/tegra_defconfig
arch/arm/configs/tegra_whistler_android_defconfig
arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-ventana-sensors.c
arch/arm/mach-tegra/board-ventana.c
arch/arm/mach-tegra/board-whistler-panel.c
arch/arm/mach-tegra/board-whistler-pinmux.c
arch/arm/mach-tegra/board-whistler-power.c
arch/arm/mach-tegra/board-whistler-sensors.c
arch/arm/mach-tegra/board-whistler.c
arch/arm/mach-tegra/board-whistler.h
arch/arm/mach-tegra/clock.c
arch/arm/mach-tegra/clock.h
arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/cpu-tegra.c
arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h
arch/arm/mach-tegra/dma.c
arch/arm/mach-tegra/fuse.c
arch/arm/mach-tegra/fuse.h
arch/arm/mach-tegra/headsmp.S
arch/arm/mach-tegra/include/mach/clk.h
arch/arm/mach-tegra/include/mach/iomap.h
arch/arm/mach-tegra/include/mach/system.h
arch/arm/mach-tegra/irq.c
arch/arm/mach-tegra/spi_tegra_slave.c
arch/arm/mach-tegra/suspend.c
arch/arm/mach-tegra/tegra2_dvfs.c
arch/arm/mach-tegra/tegra2_emc.c
arch/arm/mach-tegra/tegra2_emc.h
arch/arm/tools/mach-types
arch/x86/kvm/svm.c
drivers/cpufreq/cpufreq_interactive.c
drivers/crypto/tegra-aes.c
drivers/gpio/cs5535-gpio.c
drivers/hwmon/nct1008.c
drivers/misc/Makefile
drivers/net/wireless/p54/p54usb.c
drivers/regulator/max8907c-regulator.c
drivers/rtc/rtc-tegra.c
drivers/usb/gadget/fsl_udc_core.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/xhci-mem.c
drivers/usb/otg/tegra-otg.c
drivers/usb/serial/ftdi_sio.c
drivers/video/tegra/dc/dc.c
drivers/video/tegra/dc/hdmi.c
drivers/video/tegra/dc/hdmi.h
drivers/video/tegra/host/dev.c
drivers/video/tegra/host/nvhost_channel.c
drivers/video/tegra/host/nvhost_intr.c
include/linux/nct1008.h
net/econet/af_econet.c
sound/soc/tegra/Kconfig
sound/soc/tegra/tegra_i2s.c
sound/soc/tegra/tegra_pcm.c
sound/soc/tegra/tegra_soc.c
sound/soc/tegra/tegra_soc.h

Original-Change-Id: I5b39fd8ea2284828e9cb3b5ce4330728e20b1662
Reviewed-on: http://git-master/r/15736
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Scott Williams <scwilliams@nvidia.com>
Original-Change-Id: I71ecd7c4426e7e82500f12d57b85a6bcc417065c

Rebase-Id: Rc18bd03bdd6ef4cf0a5ae6f7dc863729deb2eb27

arch/arm/mach-tegra/fuse.c
arch/arm/mach-tegra/fuse.h

index f3bb515..d2c3ad6 100644 (file)
 
 static const char *tegra_revision_name[TEGRA_REVISION_MAX] = {
        [TEGRA_REVISION_UNKNOWN] = "unknown",
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
        [TEGRA_REVISION_A02] = "A02",
        [TEGRA_REVISION_A03] = "A03",
        [TEGRA_REVISION_A03p] = "A03 prime",
+#elif CONFIG_ARCH_TEGRA_3x_SOC
+       [TEGRA_REVISION_A01] = "A01",
+#endif
 };
 
 u32 tegra_fuse_readl(unsigned long offset)
@@ -144,13 +148,13 @@ unsigned long long tegra_chip_uid(void)
                break;
        }
 
-       vendor = fuse_readl(FUSE_VENDOR_CODE) & FUSE_VENDOR_CODE_MASK;
-       fab = fuse_readl(FUSE_FAB_CODE) & FUSE_FAB_CODE_MASK;
+       vendor = tegra_fuse_readl(FUSE_VENDOR_CODE) & FUSE_VENDOR_CODE_MASK;
+       fab = tegra_fuse_readl(FUSE_FAB_CODE) & FUSE_FAB_CODE_MASK;
 
        /* Lot code must be re-encoded from a 5 digit base-36 'BCD' number
           to a binary number. */
        lot = 0;
-       reg = fuse_readl(FUSE_LOT_CODE_1) << 2;
+       reg = tegra_fuse_readl(FUSE_LOT_CODE_1) << 2;
 
        for (i = 0; i < 5; ++i) {
                u32 digit = (reg & 0xFC000000) >> 26;
@@ -160,9 +164,9 @@ unsigned long long tegra_chip_uid(void)
                reg <<= 6;
        }
 
-       wafer = fuse_readl(FUSE_WAFER_ID) & FUSE_WAFER_ID_MASK;
-       x = fuse_readl(FUSE_X_COORDINATE) & FUSE_X_COORDINATE_MASK;
-       y = fuse_readl(FUSE_Y_COORDINATE) & FUSE_Y_COORDINATE_MASK;
+       wafer = tegra_fuse_readl(FUSE_WAFER_ID) & FUSE_WAFER_ID_MASK;
+       x = tegra_fuse_readl(FUSE_X_COORDINATE) & FUSE_X_COORDINATE_MASK;
+       y = tegra_fuse_readl(FUSE_Y_COORDINATE) & FUSE_Y_COORDINATE_MASK;
 
        uid = ((unsigned long long)cid  << 60ull)
            | ((unsigned long long)vendor << 56ull)
@@ -195,6 +199,7 @@ enum tegra_revision tegra_get_revision(void)
        u32 id = readl(chip_id);
 
        switch ((id >> 16) & 0xf) {
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
        case 2:
                return TEGRA_REVISION_A02;
        case 3:
@@ -202,6 +207,10 @@ enum tegra_revision tegra_get_revision(void)
                        return TEGRA_REVISION_A03p;
                else
                        return TEGRA_REVISION_A03;
+#elif defined(CONFIG_ARCH_TEGRA_3x_SOC)
+       case 1:\r
+               return TEGRA_REVISION_A01;
+#endif
        default:
                return TEGRA_REVISION_UNKNOWN;
        }
index d384743..60de4f2 100644 (file)
 
 enum tegra_revision {
        TEGRA_REVISION_UNKNOWN = 0,
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
        TEGRA_REVISION_A02,
        TEGRA_REVISION_A03,
        TEGRA_REVISION_A03p,
+#elif CONFIG_ARCH_TEGRA_3x_SOC
+       TEGRA_REVISION_A01,
+#endif
        TEGRA_REVISION_MAX,
 };