diff options
author | Scott Williams <scwilliams@nvidia.com> | 2011-05-23 22:08:42 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:43 -0800 |
commit | 07fc331f7ca9eb8b6c4958cafb302b0e9def78bd (patch) | |
tree | 19c95e9b0bd000a69b737068afc372116d79faf3 | |
parent | d3b4e36da94f5fe2d69beab2e3f9ade8b5ab68bb (diff) |
arm: tegra: Clean up SOC conditionals
Change SOC conditionals to make them more forward-looking.
Original-Change-Id: Ib60db4e690c2f396afdec962616d735548b5a8a9
Reviewed-on: http://git-master/r/32706
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
Rebase-Id: R77c675a1995116098b58f1f775bc7c3cc8722998
-rw-r--r-- | arch/arm/mach-tegra/common.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/fuse.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/fuse.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/iomap.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/mc.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/memory.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/pinmux.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/iovmm-smmu.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/mc.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/pinmux.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/spi_tegra_slave.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 2 |
16 files changed, 42 insertions, 47 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index a5d7eb4af7a1..091cc0600667 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -86,7 +86,13 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = { { "pll_p_out2", "pll_p", 48000000, true }, { "pll_p_out3", "pll_p", 72000000, true }, { "pll_p_out4", "pll_p", 108000000, true }, -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifdef CONFIG_ARCH_TEGRA_2x_SOC + { "pll_m", "clk_m", 600000000, true }, + { "pll_m_out1", "pll_m", 120000000, true }, + { "sclk", "pll_m_out1", 40000000, true }, + { "hclk", "sclk", 40000000, true }, + { "pclk", "hclk", 40000000, true }, +#else { "pll_m_out1", "pll_m", 275000000, true }, { "pll_c", NULL, ULONG_MAX, false }, { "pll_c_out1", "pll_c", 208000000, false }, @@ -94,12 +100,6 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = { { "sclk", "pll_p_out4", 108000000, true }, { "hclk", "sclk", 108000000, true }, { "pclk", "hclk", 54000000, true }, -#else - { "pll_m", "clk_m", 600000000, true }, - { "pll_m_out1", "pll_m", 120000000, true }, - { "sclk", "pll_m_out1", 40000000, true }, - { "hclk", "sclk", 40000000, true }, - { "pclk", "hclk", 40000000, true }, #endif { "csite", NULL, 0, true }, { "emc", NULL, 0, true }, @@ -109,7 +109,7 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = { { "sdmmc1", "pll_c", 48000000, false}, { "sdmmc3", "pll_p", 48000000, false}, { "sdmmc4", "pll_p", 48000000, false}, -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC { "vde", "pll_c", ULONG_MAX, false }, { "host1x", "pll_c", 0, false }, { "mpe", "pll_c", 0, false }, @@ -163,8 +163,7 @@ static void __init tegra_init_power(void) { tegra_powergate_power_off(TEGRA_POWERGATE_MPE); tegra_powergate_power_off(TEGRA_POWERGATE_3D); -#ifndef CONFIG_ARCH_TEGRA_3x_SOC - /* for TEGRA_3x_SOC it will be handled seperately */ +#ifdef CONFIG_ARCH_TEGRA_2x_SOC tegra_powergate_power_off(TEGRA_POWERGATE_PCIE); #endif } diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index dbc7f297e1a5..8df74f5db407 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -72,7 +72,7 @@ static struct resource i2c_resource3[] = { }, }; -#if defined(CONFIG_ARCH_TEGRA_2x_SOC) +#ifdef CONFIG_ARCH_TEGRA_2x_SOC static struct resource i2c_resource4[] = { [0] = { .start = INT_DVC, @@ -86,7 +86,7 @@ static struct resource i2c_resource4[] = { }, }; -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else static struct resource i2c_resource4[] = { [0] = { .start = INT_I2C4, @@ -170,7 +170,7 @@ struct platform_device tegra_i2c_device4 = { }, }; -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC struct platform_device tegra_i2c_device5 = { .name = "tegra-i2c", .id = 4, @@ -233,7 +233,7 @@ static struct resource spi_resource4[] = { .flags = IORESOURCE_MEM, }, }; -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC static struct resource spi_resource5[] = { [0] = { .start = INT_SPI_5, @@ -300,7 +300,7 @@ struct platform_device tegra_spi_device4 = { .coherent_dma_mask = 0xffffffff, }, }; -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC struct platform_device tegra_spi_device5 = { .name = "spi_tegra", .id = 4, @@ -361,7 +361,7 @@ struct platform_device tegra_spi_slave_device4 = { .coherent_dma_mask = 0xffffffff, }, }; -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC struct platform_device tegra_spi_slave_device5 = { .name = "spi_slave_tegra", .id = 4, @@ -578,7 +578,7 @@ static struct resource tegra_pmu_resources[] = { .end = INT_CPU1_PMU_INTR, .flags = IORESOURCE_IRQ, }, -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC [2] = { .start = INT_CPU2_PMU_INTR, .end = INT_CPU2_PMU_INTR, @@ -714,7 +714,7 @@ struct platform_device tegra_uarte_device = { }, }; -#if defined(CONFIG_ARCH_TEGRA_2x_SOC) +#ifdef CONFIG_ARCH_TEGRA_2x_SOC static struct resource i2s_resource1[] = { [0] = { .start = INT_I2S1, @@ -789,7 +789,7 @@ static struct resource spdif_resource[] = { } }; -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else static struct resource audio_resource[] = { [0] = { .start = TEGRA_AUDIO_CLUSTER_BASE, @@ -1052,7 +1052,7 @@ static struct resource tegra_wdt_resources[] = { .flags = IORESOURCE_IRQ, }, }; -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else static struct resource tegra_wdt_resources[] = { [0] = { .start = TEGRA_WDT0_BASE, diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h index 2d3130dce79a..b01a0e9d1dcc 100644 --- a/arch/arm/mach-tegra/devices.h +++ b/arch/arm/mach-tegra/devices.h @@ -32,7 +32,7 @@ extern struct platform_device tegra_i2c_device2; extern struct platform_device tegra_i2c_device3; extern struct platform_device tegra_i2c_device4; extern struct platform_device tegra_kbc_device; -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC extern struct platform_device tegra_i2c_device5; #endif extern struct platform_device tegra_spi_device1; @@ -43,7 +43,7 @@ extern struct platform_device tegra_spi_slave_device1; extern struct platform_device tegra_spi_slave_device2; extern struct platform_device tegra_spi_slave_device3; extern struct platform_device tegra_spi_slave_device4; -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC extern struct platform_device tegra_spi_device5; extern struct platform_device tegra_spi_device6; extern struct platform_device tegra_spi_slave_device5; @@ -69,7 +69,7 @@ extern struct platform_device tegra_ehci2_device; extern struct platform_device tegra_ehci3_device; extern struct platform_device tegra_i2s_device1; extern struct platform_device tegra_i2s_device2; -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC extern struct platform_device tegra_i2s_device0; extern struct platform_device tegra_i2s_device3; extern struct platform_device tegra_i2s_device4; diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index bb05fad1f610..480397be3fe2 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c @@ -946,7 +946,7 @@ int __init tegra_dma_init(void) spin_lock_init(&ch->lock); INIT_LIST_HEAD(&ch->list); -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC if (i >= 16) irq = INT_APB_DMA_CH16 + i - 16; else diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index 5ef69f2d0340..5b2499a859f3 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c @@ -33,7 +33,7 @@ #define FUSE_UID_LOW 0x108 #define FUSE_UID_HIGH 0x10c #define FUSE_SPARE_BIT 0x200 -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else #define FUSE_VENDOR_CODE 0x200 #define FUSE_VENDOR_CODE_MASK 0xf #define FUSE_FAB_CODE 0x204 diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h index 367308b21098..80c6082d768c 100644 --- a/arch/arm/mach-tegra/fuse.h +++ b/arch/arm/mach-tegra/fuse.h @@ -20,7 +20,7 @@ enum tegra_revision { TEGRA_REVISION_UNKNOWN = 0, -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) TEGRA_REVISION_A01, #endif TEGRA_REVISION_A02, diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h index 449f6e1afda8..dd7b864f0e1b 100644 --- a/arch/arm/mach-tegra/include/mach/iomap.h +++ b/arch/arm/mach-tegra/include/mach/iomap.h @@ -77,9 +77,7 @@ #define TEGRA_GART_BASE 0x58000000 #define TEGRA_GART_SIZE SZ_32M -#endif - -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else #define TEGRA_SMMU_BASE_A01 0xe0000000 #define TEGRA_SMMU_SIZE_A01 SZ_256M @@ -109,7 +107,7 @@ #define TEGRA_QUATERNARY_ICTLR_BASE 0x60004300 #define TEGRA_QUATERNARY_ICTLR_SIZE 64 -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC #define TEGRA_QUINARY_ICTLR_BASE 0x60004400 #define TEGRA_QUINARY_ICTLR_SIZE SZ_64 @@ -131,7 +129,7 @@ #define TEGRA_TMR4_BASE 0x60005058 #define TEGRA_TMR4_SIZE SZ_8 -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC #define TEGRA_TMR5_BASE 0x60005060 #define TEGRA_TMR5_SIZE 8 @@ -186,7 +184,7 @@ #define TEGRA_APB_DMA_CH0_BASE 0x6000B000 #define TEGRA_APB_DMA_CH0_SIZE 32 -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC #define TEGRA_AHB_ARB_BASE 0x6000C000 #define TEGRA_AHB_ARB_SIZE 768 /* Overlaps with GISMO */ @@ -336,7 +334,7 @@ #define TEGRA_SPI_BASE 0x7000C380 #define TEGRA_SPI_SIZE 48 -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else #define TEGRA_DTV_BASE 0x7000C300 #define TEGRA_DTV_SIZE SZ_256 @@ -379,7 +377,7 @@ #define TEGRA_SPI4_BASE 0x7000DA00 #define TEGRA_SPI4_SIZE SZ_512 -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC #define TEGRA_SPI5_BASE 0x7000DC00 #define TEGRA_SPI5_SIZE SZ_512 @@ -436,7 +434,7 @@ #define TEGRA_SDMMC4_BASE 0xC8000600 #define TEGRA_SDMMC4_SIZE SZ_512 -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else #define TEGRA_SATA_BASE 0x70020000 #define TEGRA_SATA_SIZE SZ_64K diff --git a/arch/arm/mach-tegra/include/mach/mc.h b/arch/arm/mach-tegra/include/mach/mc.h index 5b909a506f2f..c2b73bd2c8b4 100644 --- a/arch/arm/mach-tegra/include/mach/mc.h +++ b/arch/arm/mach-tegra/include/mach/mc.h @@ -98,7 +98,7 @@ void tegra_mc_set_priority(unsigned long client, unsigned long prio); -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else /* !!!FIXME!!! IMPLEMENT ME */ #define tegra_mc_set_priority(client, prio) \ do { /* nothing for now */ } while (0) diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/memory.h index 4f3a24d5de5e..e97f624f355a 100644 --- a/arch/arm/mach-tegra/include/mach/memory.h +++ b/arch/arm/mach-tegra/include/mach/memory.h @@ -24,10 +24,8 @@ /* physical offset of RAM */ #if defined(CONFIG_ARCH_TEGRA_2x_SOC) #define PLAT_PHYS_OFFSET UL(0) -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) -#define PLAT_PHYS_OFFSET UL(0x80000000) #else -#error "Invalid Tegra SoC family selection" +#define PLAT_PHYS_OFFSET UL(0x80000000) #endif /* diff --git a/arch/arm/mach-tegra/include/mach/pinmux.h b/arch/arm/mach-tegra/include/mach/pinmux.h index 93db69d40ae5..09af077d9f3d 100644 --- a/arch/arm/mach-tegra/include/mach/pinmux.h +++ b/arch/arm/mach-tegra/include/mach/pinmux.h @@ -99,7 +99,7 @@ enum tegra_mux_func { TEGRA_MUX_VI, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_MUX_XIO, -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC TEGRA_MUX_BLINK, TEGRA_MUX_CEC, TEGRA_MUX_CLK12, @@ -192,7 +192,7 @@ enum tegra_vddio { TEGRA_VDDIO_SYS, TEGRA_VDDIO_AUDIO, TEGRA_VDDIO_SD, -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC TEGRA_VDDIO_CAM, TEGRA_VDDIO_GMI, TEGRA_VDDIO_PEXCTL, diff --git a/arch/arm/mach-tegra/iovmm-smmu.c b/arch/arm/mach-tegra/iovmm-smmu.c index e0297b27d71e..9eb1484be676 100644 --- a/arch/arm/mach-tegra/iovmm-smmu.c +++ b/arch/arm/mach-tegra/iovmm-smmu.c @@ -49,7 +49,7 @@ #define SMMU_VERBOSE 0 #endif -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC /* * ALL-CAP macros copied from armc.h */ diff --git a/arch/arm/mach-tegra/mc.c b/arch/arm/mach-tegra/mc.c index 53074ce3dc06..57b2f6f4e223 100644 --- a/arch/arm/mach-tegra/mc.c +++ b/arch/arm/mach-tegra/mc.c @@ -42,6 +42,6 @@ void tegra_mc_set_priority(unsigned long client, unsigned long prio) spin_unlock_irqrestore(&tegra_mc_lock, flags); } -#elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#else /* !!!FIXME!!! IMPLEMENT ME */ #endif diff --git a/arch/arm/mach-tegra/pinmux.c b/arch/arm/mach-tegra/pinmux.c index 3d22145e8b0a..8c86b7224d3e 100644 --- a/arch/arm/mach-tegra/pinmux.c +++ b/arch/arm/mach-tegra/pinmux.c @@ -96,7 +96,7 @@ static char *tegra_mux_names[TEGRA_MAX_MUX] = { [TEGRA_MUX_VI] = "VI", [TEGRA_MUX_VI_SENSOR_CLK] = "VI_SENSOR_CLK", [TEGRA_MUX_XIO] = "XIO", -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC [TEGRA_MUX_BLINK] = "BLINK", [TEGRA_MUX_CEC] = "CEC", [TEGRA_MUX_CLK12] = "CLK12", diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 04df5f6c0339..7b7f420d1f8a 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -262,7 +262,7 @@ static unsigned int available_cpus(void) if (ncores == 0) { ncores = scu_get_core_count(scu_base); -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC if (ncores > 1) { u32 fuse_sku = readl(FUSE_SKU_DIRECT_CONFIG); ncores -= FUSE_SKU_NUM_DISABLED_CPUS(fuse_sku); diff --git a/arch/arm/mach-tegra/spi_tegra_slave.c b/arch/arm/mach-tegra/spi_tegra_slave.c index 6086c5598860..a25813241c42 100644 --- a/arch/arm/mach-tegra/spi_tegra_slave.c +++ b/arch/arm/mach-tegra/spi_tegra_slave.c @@ -145,7 +145,7 @@ static const unsigned long spi_tegra_req_sels[] = { TEGRA_DMA_REQ_SEL_SL2B2, TEGRA_DMA_REQ_SEL_SL2B3, TEGRA_DMA_REQ_SEL_SL2B4, -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC TEGRA_DMA_REQ_SEL_SL2B5, TEGRA_DMA_REQ_SEL_SL2B6, #endif diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 0e14caa4b66d..a5688905cfed 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -101,7 +101,7 @@ static struct tegra_gpio_bank tegra_gpio_banks[] = { {.bank = 4, .irq = INT_GPIO5}, {.bank = 5, .irq = INT_GPIO6}, {.bank = 6, .irq = INT_GPIO7}, -#if defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifndef CONFIG_ARCH_TEGRA_2x_SOC {.bank = 7, .irq = INT_GPIO8}, #endif }; |