Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198480
b: refs/heads/master
c: acc8470
h: refs/heads/master
v: v3
  • Loading branch information
Marek Szyprowski authored and Ben Dooks committed May 20, 2010
1 parent edc5898 commit 397a32a
Show file tree
Hide file tree
Showing 22 changed files with 268 additions and 204 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: 2af716ba77d26f3d291fe7c7f5a5108d4945c69f
refs/heads/master: acc84707d3487735fc666fdeab76185d086428c0
9 changes: 3 additions & 6 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_S5PC1XX
bool "Samsung S5PC1XX"
config ARCH_S5PC100
bool "Samsung S5PC100"
select GENERIC_GPIO
select HAVE_CLK
select CPU_V7
select ARM_L1_CACHE_SHIFT_6
help
Samsung S5PC1XX series based systems
Samsung S5PC100 series based systems

config ARCH_S5PV210
bool "Samsung S5PV210/S5PC110"
Expand Down Expand Up @@ -890,7 +890,6 @@ 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 @@ -909,9 +908,7 @@ 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: 1 addition & 2 deletions 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_S5PC1XX) := s5pc100
machine-$(CONFIG_ARCH_S5PC100) := s5pc100
machine-$(CONFIG_ARCH_S5PV210) := s5pv210
machine-$(CONFIG_ARCH_SA1100) := sa1100
machine-$(CONFIG_ARCH_SHARK) := shark
Expand All @@ -192,7 +192,6 @@ 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
7 changes: 5 additions & 2 deletions trunk/arch/arm/mach-s5pc100/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

# Configuration options for the S5PC100 CPU

if ARCH_S5PC100

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

Expand Down Expand Up @@ -46,3 +47,5 @@ config MACH_SMDKC100
select S5PC100_SETUP_SDHCI
help
Machine support for the Samsung SMDKC100

endif
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-s5pc100/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ obj- :=

# Core support for S5PC100 system

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

# Helper and device support
Expand All @@ -22,4 +22,5 @@ obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o
obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o

# machine support

obj-$(CONFIG_MACH_SMDKC100) += mach-smdkc100.o
56 changes: 32 additions & 24 deletions trunk/arch/arm/mach-s5pc100/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,47 +22,53 @@
#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 <plat/regs-power.h>
#include <mach/regs-clock.h>

#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/clock.h>
#include <plat/sdhci.h>
#include <plat/iic-core.h>
#include <plat/sdhci.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)
{
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);
if (!need_resched())
cpu_do_idle();

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

cpu_do_idle();
local_irq_enable();
}

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

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

s3c24xx_register_baseclocks(xtal);
s5pc1xx_register_clocks();
s5p_register_clocks(xtal);
s5pc100_register_clocks();
s5pc100_setup_clocks();
}

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

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

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

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

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

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

return sysdev_register(&s5pc100_sysdev);
}
24 changes: 12 additions & 12 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-s5pc1xx/gpiolib.c
* arch/arm/plat-s5pc100/gpiolib.c
*
* Copyright 2009 Samsung Electronics Co
* Kyungmin Park <kyungmin.park@samsung.com>
*
* S5PC1XX - GPIOlib support
* S5PC100 - 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 @@ -62,12 +62,12 @@
*/

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

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

Expand Down Expand Up @@ -382,8 +382,8 @@ static struct s3c_gpio_chip s5pc100_gpio_chips[] = {
};

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

static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
{
Expand All @@ -392,21 +392,21 @@ static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
if (chip->config == &gpio_cfg) {
int i, irq;

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

for (i = 0; i < chip->chip.ngpio; i++) {
irq = S3C_IRQ_GPIO_BASE + chip->chip.base + i;
set_irq_chip(irq, &s5pc1xx_gpioint);
set_irq_chip(irq, &s5pc100_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 = s5pc1xx_gpiolib_to_eint;
chip->chip.to_irq = s5pc100_gpiolib_to_eint;
#endif
}

static __init int s5pc1xx_gpiolib_init(void)
static __init int s5pc100_gpiolib_init(void)
{
struct s3c_gpio_chip *chip;
int nr_chips;
Expand All @@ -421,8 +421,8 @@ static __init int s5pc1xx_gpiolib_init(void)
ARRAY_SIZE(s5pc100_gpio_chips));
#if 0
/* Interrupt */
set_irq_chained_handler(IRQ_GPIOINT, s5pc1xx_irq_gpioint_handler);
set_irq_chained_handler(IRQ_GPIOINT, s5pc100_irq_gpioint_handler);
#endif
return 0;
}
core_initcall(s5pc1xx_gpiolib_init);
core_initcall(s5pc100_gpiolib_init);
6 changes: 4 additions & 2 deletions trunk/arch/arm/mach-s5pc100/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
* aligned and add in the offset when we load the value here.
*/

.macro addruart, rx, tmp
.macro addruart, rx, rtmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1
ldreq \rx, = S3C_PA_UART
ldrne \rx, = (S3C_VA_UART + S3C_PA_UART & 0xfffff)
ldrne \rx, = S3C_VA_UART
#if CONFIG_DEBUG_S3C_UART != 0
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
8 changes: 4 additions & 4 deletions trunk/arch/arm/mach-s5pc100/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.endm

.macro get_irqnr_preamble, base, tmp
ldr \base, =S3C_VA_VIC0
ldr \base, =VA_VIC0
.endm

.macro arch_ret_to_user, tmp1, tmp2
Expand All @@ -29,18 +29,18 @@
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp

@ check the vic0
mov \irqnr, # S3C_IRQ_OFFSET + 31
mov \irqnr, # S5P_IRQ_OFFSET + 31
ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
teq \irqstat, #0

@ otherwise try vic1
addeq \tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0)
addeq \tmp, \base, #(VA_VIC1 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0

@ otherwise try vic2
addeq \tmp, \base, #(S3C_VA_VIC2 - S3C_VA_VIC0)
addeq \tmp, \base, #(VA_VIC2 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0
Expand Down
Loading

0 comments on commit 397a32a

Please sign in to comment.