Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198485
b: refs/heads/master
c: 85b14a3
h: refs/heads/master
i:
  198483: 2259740
v: v3
  • Loading branch information
Naveen Krishna Ch authored and Ben Dooks committed May 20, 2010
1 parent 35a0ee2 commit bd556fa
Show file tree
Hide file tree
Showing 46 changed files with 3,283 additions and 653 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d48562abe29ceee66a6aad7b565b021ddd7f598a
refs/heads/master: 85b14a3fc4036473ec6776d8e5d92c022155d581
9 changes: 6 additions & 3 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -699,14 +699,14 @@ config ARCH_S5P6442
help
Samsung S5P6442 CPU based systems

config ARCH_S5PC100
bool "Samsung S5PC100"
config ARCH_S5PC1XX
bool "Samsung S5PC1XX"
select GENERIC_GPIO
select HAVE_CLK
select CPU_V7
select ARM_L1_CACHE_SHIFT_6
help
Samsung S5PC100 series based systems
Samsung S5PC1XX series based systems

config ARCH_S5PV210
bool "Samsung S5PV210/S5PC110"
Expand Down Expand Up @@ -890,6 +890,7 @@ source "arch/arm/mach-sa1100/Kconfig"
source "arch/arm/plat-samsung/Kconfig"
source "arch/arm/plat-s3c24xx/Kconfig"
source "arch/arm/plat-s5p/Kconfig"
source "arch/arm/plat-s5pc1xx/Kconfig"

if ARCH_S3C2410
source "arch/arm/mach-s3c2400/Kconfig"
Expand All @@ -908,7 +909,9 @@ source "arch/arm/mach-s5p6440/Kconfig"

source "arch/arm/mach-s5p6442/Kconfig"

if ARCH_S5PC1XX
source "arch/arm/mach-s5pc100/Kconfig"
endif

source "arch/arm/mach-s5pv210/Kconfig"

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0
machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx
machine-$(CONFIG_ARCH_S5P6440) := s5p6440
machine-$(CONFIG_ARCH_S5P6442) := s5p6442
machine-$(CONFIG_ARCH_S5PC100) := s5pc100
machine-$(CONFIG_ARCH_S5PC1XX) := s5pc100
machine-$(CONFIG_ARCH_S5PV210) := s5pv210
machine-$(CONFIG_ARCH_SA1100) := sa1100
machine-$(CONFIG_ARCH_SHARK) := shark
Expand All @@ -192,6 +192,7 @@ plat-$(CONFIG_PLAT_NOMADIK) := nomadik
plat-$(CONFIG_PLAT_ORION) := orion
plat-$(CONFIG_PLAT_PXA) := pxa
plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung
plat-$(CONFIG_PLAT_S5PC1XX) := s5pc1xx samsung
plat-$(CONFIG_PLAT_S5P) := s5p samsung

ifeq ($(CONFIG_ARCH_EBSA110),y)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-s3c64xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ config MACH_SMDK6410
select S3C_DEV_HSMMC1
select S3C_DEV_I2C1
select S3C_DEV_FB
select SAMSUNG_DEV_TS
select S3C_DEV_USB_HOST
select S3C_DEV_USB_HSOTG
select S3C64XX_SETUP_SDHCI
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/arm/mach-s3c64xx/mach-smdk6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/adc.h>
#include <plat/ts.h>

#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
Expand Down Expand Up @@ -262,6 +264,8 @@ static struct platform_device *smdk6410_devices[] __initdata = {
&smdk6410_lcd_powerdev,

&smdk6410_smsc911x,
&s3c_device_adc,
&s3c_device_ts,
};

#ifdef CONFIG_REGULATOR
Expand Down Expand Up @@ -596,6 +600,12 @@ static struct i2c_board_info i2c_devs1[] __initdata = {
{ I2C_BOARD_INFO("24c128", 0x57), }, /* Samsung S524AD0XD1 */
};

static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.delay = 10000,
.presc = 49,
.oversampling_shift = 2,
};

static void __init smdk6410_map_io(void)
{
u32 tmp;
Expand Down Expand Up @@ -625,6 +635,8 @@ static void __init smdk6410_machine_init(void)
s3c_i2c1_set_platdata(NULL);
s3c_fb_set_platdata(&smdk6410_lcd_pdata);

s3c24xx_ts_set_platdata(&s3c_ts_platform);

/* configure nCS1 width to 16 bits */

cs1 = __raw_readl(S3C64XX_SROM_BW) &
Expand Down
25 changes: 8 additions & 17 deletions trunk/arch/arm/mach-s5pc100/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@

# Configuration options for the S5PC100 CPU

if ARCH_S5PC100

config CPU_S5PC100
bool
select PLAT_S5P
select S5P_EXT_INT
select CPU_S5PC100_INIT
select CPU_S5PC100_CLOCK
help
Enable S5PC100 CPU support

Expand All @@ -19,21 +17,16 @@ config S5PC100_SETUP_FB_24BPP
help
Common setup code for S5PC1XX with an 24bpp RGB display helper.

config S5PC100_SETUP_I2C1
bool
help
Common setup code for i2c bus 1.

config S5PC100_SETUP_SDHCI
bool
select S5PC100_SETUP_SDHCI_GPIO
help
Internal helper functions for S5PC100 based SDHCI systems
bool
select S5PC1XX_SETUP_SDHCI_GPIO
help
Internal helper functions for S5PC100 based SDHCI systems

config S5PC100_SETUP_SDHCI_GPIO
config S5PC100_SETUP_I2C1
bool
help
Common setup code for SDHCI gpio.
Common setup code for i2c bus 1.

config MACH_SMDKC100
bool "SMDKC100"
Expand All @@ -48,5 +41,3 @@ config MACH_SMDKC100
select S5PC100_SETUP_SDHCI
help
Machine support for the Samsung SMDKC100

endif
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-s5pc100/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ obj- :=

# Core support for S5PC100 system

obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o gpiolib.o irq-gpio.o
obj-$(CONFIG_CPU_S5PC100) += cpu.o gpiolib.o
obj-$(CONFIG_CPU_S5PC100) += setup-i2c0.o

# Helper and device support

obj-$(CONFIG_S5PC100_SETUP_FB_24BPP) += setup-fb-24bpp.o
obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o
obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o
obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o

# machine support

obj-$(CONFIG_MACH_SMDKC100) += mach-smdkc100.o
56 changes: 24 additions & 32 deletions trunk/arch/arm/mach-s5pc100/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,53 +22,47 @@
#include <linux/serial_core.h>
#include <linux/platform_device.h>

#include <asm/proc-fns.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

#include <asm/proc-fns.h>

#include <mach/hardware.h>
#include <mach/map.h>
#include <asm/irq.h>

#include <plat/cpu-freq.h>
#include <plat/regs-serial.h>
#include <mach/regs-clock.h>
#include <plat/regs-power.h>

#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/clock.h>
#include <plat/iic-core.h>
#include <plat/sdhci.h>
#include <plat/iic-core.h>
#include <plat/s5pc100.h>

/* Initial IO mappings */

static struct map_desc s5pc100_iodesc[] __initdata = {
{
.virtual = (unsigned long)S5P_VA_SYSTIMER,
.pfn = __phys_to_pfn(S5PC100_PA_SYSTIMER),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (unsigned long)VA_VIC2,
.pfn = __phys_to_pfn(S5PC100_PA_VIC2),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (unsigned long)S5PC100_VA_OTHERS,
.pfn = __phys_to_pfn(S5PC100_PA_OTHERS),
.length = SZ_4K,
.type = MT_DEVICE,
}
};

static void s5pc100_idle(void)
{
if (!need_resched())
cpu_do_idle();
unsigned long tmp;

tmp = __raw_readl(S5PC100_PWR_CFG);
tmp &= ~S5PC100_PWRCFG_CFG_DEEP_IDLE;
tmp &= ~S5PC100_PWRCFG_CFG_WFI_MASK;
tmp |= S5PC100_PWRCFG_CFG_WFI_DEEP_IDLE;
__raw_writel(tmp, S5PC100_PWR_CFG);

local_irq_enable();
tmp = __raw_readl(S5PC100_OTHERS);
tmp |= S5PC100_PMU_INT_DISABLE;
__raw_writel(tmp, S5PC100_OTHERS);

cpu_do_idle();
}

/* s5pc100_map_io
Expand All @@ -92,23 +86,22 @@ void __init s5pc100_map_io(void)

void __init s5pc100_init_clocks(int xtal)
{
printk(KERN_DEBUG "%s: initializing clocks\n", __func__);

printk(KERN_DEBUG "%s: initialising clocks\n", __func__);
s3c24xx_register_baseclocks(xtal);
s5p_register_clocks(xtal);
s5pc1xx_register_clocks();
s5pc100_register_clocks();
s5pc100_setup_clocks();
}

void __init s5pc100_init_irq(void)
{
u32 vic[] = {~0, ~0, ~0};
u32 vic_valid[] = {~0, ~0, ~0};

/* VIC0, VIC1, and VIC2 are fully populated. */
s5p_init_irq(vic, ARRAY_SIZE(vic));
s5pc1xx_init_irq(vic_valid, ARRAY_SIZE(vic_valid));
}

static struct sysdev_class s5pc100_sysclass = {
struct sysdev_class s5pc100_sysclass = {
.name = "s5pc100-core",
};

Expand All @@ -125,10 +118,9 @@ core_initcall(s5pc100_core_init);

int __init s5pc100_init(void)
{
printk(KERN_INFO "S5PC100: Initializing architecture\n");
printk(KERN_DEBUG "S5PC100: Initialising architecture\n");

/* set idle function */
pm_idle = s5pc100_idle;
s5pc1xx_idle = s5pc100_idle;

return sysdev_register(&s5pc100_sysdev);
}
36 changes: 19 additions & 17 deletions trunk/arch/arm/mach-s5pc100/gpiolib.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* arch/arm/plat-s5pc100/gpiolib.c
* arch/arm/plat-s5pc1xx/gpiolib.c
*
* Copyright 2009 Samsung Electronics Co
* Kyungmin Park <kyungmin.park@samsung.com>
*
* S5PC100 - GPIOlib support
* S5PC1XX - GPIOlib support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -61,12 +61,13 @@
* L3 8 4Bit None
*/

static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
#if 0
static int s5pc1xx_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
{
return S3C_IRQ_GPIO(chip->base + offset);
}

static int s5pc100_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
static int s5pc1xx_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
{
int base;

Expand All @@ -84,7 +85,7 @@ static int s5pc100_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
return IRQ_EINT(24 + offset);
return -EINVAL;
}

#endif
static struct s3c_gpio_cfg gpio_cfg = {
.set_config = s3c_gpio_setcfg_s3c64xx_4bit,
.set_pull = s3c_gpio_setpull_updown,
Expand Down Expand Up @@ -381,30 +382,31 @@ static struct s3c_gpio_chip s5pc100_gpio_chips[] = {
};

/* FIXME move from irq-gpio.c */
extern struct irq_chip s5pc100_gpioint;
extern void s5pc100_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc);
extern struct irq_chip s5pc1xx_gpioint;
extern void s5pc1xx_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc);

static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
{
#if 0
/* Interrupt */
if (chip->config == &gpio_cfg) {
int i, irq;

chip->chip.to_irq = s5pc100_gpiolib_to_irq;
chip->chip.to_irq = s5pc1xx_gpiolib_to_irq;

for (i = 0; i < chip->chip.ngpio; i++) {
irq = S3C_IRQ_GPIO_BASE + chip->chip.base + i;
set_irq_chip(irq, &s5pc100_gpioint);
set_irq_chip(irq, &s5pc1xx_gpioint);
set_irq_data(irq, &chip->chip);
set_irq_handler(irq, handle_level_irq);
set_irq_flags(irq, IRQF_VALID);
}
} else if (chip->config == &gpio_cfg_eint) {
chip->chip.to_irq = s5pc100_gpiolib_to_eint;
}
} else if (chip->config == &gpio_cfg_eint)
chip->chip.to_irq = s5pc1xx_gpiolib_to_eint;
#endif
}

static __init int s5pc100_gpiolib_init(void)
static __init int s5pc1xx_gpiolib_init(void)
{
struct s3c_gpio_chip *chip;
int nr_chips;
Expand All @@ -417,10 +419,10 @@ static __init int s5pc100_gpiolib_init(void)

samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips,
ARRAY_SIZE(s5pc100_gpio_chips));

#if 0
/* Interrupt */
set_irq_chained_handler(IRQ_GPIOINT, s5pc100_irq_gpioint_handler);

set_irq_chained_handler(IRQ_GPIOINT, s5pc1xx_irq_gpioint_handler);
#endif
return 0;
}
core_initcall(s5pc100_gpiolib_init);
core_initcall(s5pc1xx_gpiolib_init);
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-s5pc100/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
* aligned and add in the offset when we load the value here.
*/

.macro addruart, rx, rtmp
.macro addruart, rx, tmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1
ldreq \rx, = S3C_PA_UART
ldrne \rx, = S3C_VA_UART
#if CONFIG_DEBUG_S3C_UART != 0
ldrne \rx, = (S3C_VA_UART + S3C_PA_UART & 0xfffff)
add \rx, \rx, #(0x400 * CONFIG_DEBUG_S3C_UART)
#endif
.endm

/* include the reset of the code which will do the work, we're only
Expand Down
Loading

0 comments on commit bd556fa

Please sign in to comment.