Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68f4c319 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge branch 'next/cleanup-samsung' of...

Merge branch 'next/cleanup-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup

From Kukjin Kim:
"Mostly it is using common macro to define resources and clean up useless codes."

* 'next/cleanup-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (34 commits)
  ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c
  ARM: S3C24XX: Use common macro to define resources on mach-osiris.c
  ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable
  ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c
  ARM: S5PV210: Use common macro to define resources on dev-audio.c
  ARM: S5PC100: Use common macro to define resources on dev-audio.c
  ARM: S5P64X0: Use common macro to define resources on dev-audio.c
  ARM: S3C64XX: Use common macro to define resources on mach-smdk6410.c
  ARM: S3C64XX: Use common macro to define resources on mach-real6410.c
  ARM: S3C64XX: Use common macro to define resources on mach-mini6410.c
  ARM: S3C64XX: Use common macro to define resources on mach-crag6410.c
  ARM: S3C64XX: Use common macro to define resources on mach-anw6410.c
  ARM: S3C64XX: Use common macro to define resources on dev-uart.c
  ARM: S3C64XX: Use common macro to define resources on dev-audio.c
  ARM: S3C24XX: Use common macro to define resources on simtec-nor.c
  ARM: S3C24XX: Use common macro to define resources on mach-vr1000.c
  ARM: S3C24XX: Use common macro to define resources on mach-tct_hammer.c
  ARM: S3C24XX: Use common macro to define resources on mach-rx1950.c
  ARM: S3C24XX: Use common macro to define resources on mach-otom.c
  ARM: S3C24XX: Use common macro to define resources on mach-nexcoder.c
  ...
parents 243e0954 2870f535
Loading
Loading
Loading
Loading
+6 −47
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <asm/smp_scu.h>
#include <asm/suspend.h>
#include <asm/unified.h>
#include <asm/cpuidle.h>
#include <mach/regs-pmu.h>
#include <mach/pmu.h>

@@ -34,22 +35,12 @@

#define S5P_CHECK_AFTR		0xFCBA0D10

static int exynos4_enter_idle(struct cpuidle_device *dev,
			struct cpuidle_driver *drv,
			      int index);
static int exynos4_enter_lowpower(struct cpuidle_device *dev,
				struct cpuidle_driver *drv,
				int index);

static struct cpuidle_state exynos4_cpuidle_set[] __initdata = {
	[0] = {
		.enter			= exynos4_enter_idle,
		.exit_latency		= 1,
		.target_residency	= 100000,
		.flags			= CPUIDLE_FLAG_TIME_VALID,
		.name			= "C0",
		.desc			= "ARM clock gating(WFI)",
	},
	[0] = ARM_CPUIDLE_WFI_STATE,
	[1] = {
		.enter			= exynos4_enter_lowpower,
		.exit_latency		= 300,
@@ -65,6 +56,7 @@ static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
static struct cpuidle_driver exynos4_idle_driver = {
	.name			= "exynos4_idle",
	.owner			= THIS_MODULE,
	.en_core_tk_irqen	= 1,
};

/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
@@ -103,13 +95,8 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
				struct cpuidle_driver *drv,
				int index)
{
	struct timeval before, after;
	int idle_time;
	unsigned long tmp;

	local_irq_disable();
	do_gettimeofday(&before);

	exynos4_set_wakeupmask();

	/* Set value of power down register for aftr mode */
@@ -150,34 +137,6 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
	/* Clear wakeup state register */
	__raw_writel(0x0, S5P_WAKEUP_STAT);

	do_gettimeofday(&after);

	local_irq_enable();
	idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
		    (after.tv_usec - before.tv_usec);

	dev->last_residency = idle_time;
	return index;
}

static int exynos4_enter_idle(struct cpuidle_device *dev,
				struct cpuidle_driver *drv,
				int index)
{
	struct timeval before, after;
	int idle_time;

	local_irq_disable();
	do_gettimeofday(&before);

	cpu_do_idle();

	do_gettimeofday(&after);
	local_irq_enable();
	idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
		    (after.tv_usec - before.tv_usec);

	dev->last_residency = idle_time;
	return index;
}

@@ -192,7 +151,7 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev,
		new_index = drv->safe_state_index;

	if (new_index == 0)
		return exynos4_enter_idle(dev, drv, new_index);
		return arm_cpuidle_simple_enter(dev, drv, new_index);
	else
		return exynos4_enter_core0_aftr(dev, drv, new_index);
}
+2 −10
Original line number Diff line number Diff line
@@ -236,16 +236,8 @@ static struct ahci_platform_data exynos4_ahci_pdata = {
};

static struct resource exynos4_ahci_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_SATA,
		.end	= EXYNOS4_PA_SATA + SZ_64K - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= EXYNOS4_IRQ_SATA,
		.end	= EXYNOS4_IRQ_SATA,
		.flags	= IORESOURCE_IRQ,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_SATA, SZ_64K),
	[1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_SATA),
};

static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32);
+26 −130
Original line number Diff line number Diff line
@@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = {
};

static struct resource exynos4_i2s0_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_I2S0,
		.end	= EXYNOS4_PA_I2S0 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_I2S0_TX,
		.end	= DMACH_I2S0_TX,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_I2S0_RX,
		.end	= DMACH_I2S0_RX,
		.flags	= IORESOURCE_DMA,
	},
	[3] = {
		.start	= DMACH_I2S0S_TX,
		.end	= DMACH_I2S0S_TX,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
	[2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
	[3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
};

struct platform_device exynos4_device_i2s0 = {
@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = {
};

static struct resource exynos4_i2s1_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_I2S1,
		.end	= EXYNOS4_PA_I2S1 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_I2S1_TX,
		.end	= DMACH_I2S1_TX,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_I2S1_RX,
		.end	= DMACH_I2S1_RX,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
	[2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
};

struct platform_device exynos4_device_i2s1 = {
@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = {
};

static struct resource exynos4_i2s2_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_I2S2,
		.end	= EXYNOS4_PA_I2S2 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_I2S2_TX,
		.end	= DMACH_I2S2_TX,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_I2S2_RX,
		.end	= DMACH_I2S2_RX,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
	[2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
};

struct platform_device exynos4_device_i2s2 = {
@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = {
};

static struct resource exynos4_pcm0_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_PCM0,
		.end	= EXYNOS4_PA_PCM0 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_PCM0_TX,
		.end	= DMACH_PCM0_TX,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_PCM0_RX,
		.end	= DMACH_PCM0_RX,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
	[2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
};

struct platform_device exynos4_device_pcm0 = {
@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = {
};

static struct resource exynos4_pcm1_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_PCM1,
		.end	= EXYNOS4_PA_PCM1 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_PCM1_TX,
		.end	= DMACH_PCM1_TX,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_PCM1_RX,
		.end	= DMACH_PCM1_RX,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
	[2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
};

struct platform_device exynos4_device_pcm1 = {
@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = {
};

static struct resource exynos4_pcm2_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_PCM2,
		.end	= EXYNOS4_PA_PCM2 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_PCM2_TX,
		.end	= DMACH_PCM2_TX,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_PCM2_RX,
		.end	= DMACH_PCM2_RX,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
	[2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
};

struct platform_device exynos4_device_pcm2 = {
@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev)
}

static struct resource exynos4_ac97_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_AC97,
		.end	= EXYNOS4_PA_AC97 + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_AC97_PCMOUT,
		.end	= DMACH_AC97_PCMOUT,
		.flags	= IORESOURCE_DMA,
	},
	[2] = {
		.start	= DMACH_AC97_PCMIN,
		.end	= DMACH_AC97_PCMIN,
		.flags	= IORESOURCE_DMA,
	},
	[3] = {
		.start	= DMACH_AC97_MICIN,
		.end	= DMACH_AC97_MICIN,
		.flags	= IORESOURCE_DMA,
	},
	[4] = {
		.start	= EXYNOS4_IRQ_AC97,
		.end	= EXYNOS4_IRQ_AC97,
		.flags	= IORESOURCE_IRQ,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
	[2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
	[3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
	[4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97),
};

static struct s3c_audio_pdata s3c_ac97_pdata = {
@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev)
}

static struct resource exynos4_spdif_resource[] = {
	[0] = {
		.start	= EXYNOS4_PA_SPDIF,
		.end	= EXYNOS4_PA_SPDIF + 0x100 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= DMACH_SPDIF,
		.end	= DMACH_SPDIF,
		.flags	= IORESOURCE_DMA,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256),
	[1] = DEFINE_RES_DMA(DMACH_SPDIF),
};

static struct s3c_audio_pdata samsung_spdif_pdata = {
+3 −13
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ static struct s3c2410_uartcfg armlex4210_uartcfgs[] __initdata = {

static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
	.cd_type		= S3C_SDHCI_CD_PERMANENT,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
	.max_width		= 8,
	.host_caps		= MMC_CAP_8_BIT_DATA,
@@ -88,13 +87,11 @@ static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = {
	.cd_type		= S3C_SDHCI_CD_GPIO,
	.ext_cd_gpio		= EXYNOS4_GPX2(5),
	.ext_cd_gpio_invert	= 1,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
	.max_width		= 4,
};

static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
	.cd_type		= S3C_SDHCI_CD_PERMANENT,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
	.max_width		= 4,
};

@@ -121,16 +118,9 @@ static void __init armlex4210_wlan_init(void)
}

static struct resource armlex4210_smsc911x_resources[] = {
	[0] = {
		.start	= EXYNOS4_PA_SROM_BANK(3),
		.end	= EXYNOS4_PA_SROM_BANK(3) + SZ_64K - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= IRQ_EINT(27),
		.end	= IRQ_EINT(27),
		.flags	= IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
	},
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K),
	[1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \
					| IRQF_TRIGGER_HIGH),
};

static struct smsc911x_platform_config smsc9215_config = {
+0 −3
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = {
				MMC_CAP_ERASE),
	.host_caps2		= MMC_CAP2_BROKEN_VOLTAGE,
	.cd_type		= S3C_SDHCI_CD_PERMANENT,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
};

static struct regulator_consumer_supply emmc_supplies[] = {
@@ -155,7 +154,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = {
	.ext_cd_gpio		= EXYNOS4_GPX3(3),	/* XEINT_27 */
	.ext_cd_gpio_invert	= 1,
	.cd_type		= S3C_SDHCI_CD_GPIO,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
};

/* WLAN */
@@ -164,7 +162,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = {
	.host_caps		= MMC_CAP_4_BIT_DATA |
				MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
	.cd_type		= S3C_SDHCI_CD_EXTERNAL,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
};

static void __init nuri_sdhci_init(void)
Loading