-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 160955 b: refs/heads/master c: 8acd1ad h: refs/heads/master i: 160953: cc559f9 160951: 5a8fca2 v: v3
- Loading branch information
Byungho Min
authored and
Ben Dooks
committed
Aug 16, 2009
1 parent
5e9b365
commit c6ecae9
Showing
10 changed files
with
456 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 433a915fc6456ee3a4b740fe4d92caa78164fdce | ||
refs/heads/master: 8acd1ade2ede18408303c968e1449220c427a182 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* linux/arch/arm/mach-s5pc100/cpu.c | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* Based on mach-s3c6410/cpu.c | ||
* | ||
* 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 | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/types.h> | ||
#include <linux/interrupt.h> | ||
#include <linux/list.h> | ||
#include <linux/timer.h> | ||
#include <linux/init.h> | ||
#include <linux/clk.h> | ||
#include <linux/io.h> | ||
#include <linux/sysdev.h> | ||
#include <linux/serial_core.h> | ||
#include <linux/platform_device.h> | ||
|
||
#include <asm/mach/arch.h> | ||
#include <asm/mach/map.h> | ||
#include <asm/mach/irq.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/cpu.h> | ||
#include <plat/devs.h> | ||
#include <plat/clock.h> | ||
#include <plat/sdhci.h> | ||
#include <plat/iic-core.h> | ||
#include <plat/s5pc100.h> | ||
|
||
/* Initial IO mappings */ | ||
|
||
static struct map_desc s5pc100_iodesc[] __initdata = { | ||
}; | ||
|
||
/* s5pc100_map_io | ||
* | ||
* register the standard cpu IO areas | ||
*/ | ||
|
||
void __init s5pc100_map_io(void) | ||
{ | ||
iotable_init(s5pc100_iodesc, ARRAY_SIZE(s5pc100_iodesc)); | ||
|
||
/* initialise device information early */ | ||
} | ||
|
||
void __init s5pc100_init_clocks(int xtal) | ||
{ | ||
printk(KERN_DEBUG "%s: initialising clocks\n", __func__); | ||
s3c24xx_register_baseclocks(xtal); | ||
s5pc1xx_register_clocks(); | ||
s5pc100_register_clocks(); | ||
s5pc100_setup_clocks(); | ||
} | ||
|
||
void __init s5pc100_init_irq(void) | ||
{ | ||
u32 vic_valid[] = {~0, ~0, ~0}; | ||
|
||
/* VIC0, VIC1, and VIC2 are fully populated. */ | ||
s5pc1xx_init_irq(vic_valid, ARRAY_SIZE(vic_valid)); | ||
} | ||
|
||
struct sysdev_class s5pc100_sysclass = { | ||
.name = "s5pc100-core", | ||
}; | ||
|
||
static struct sys_device s5pc100_sysdev = { | ||
.cls = &s5pc100_sysclass, | ||
}; | ||
|
||
static int __init s5pc100_core_init(void) | ||
{ | ||
return sysdev_class_register(&s5pc100_sysclass); | ||
} | ||
|
||
core_initcall(s5pc100_core_init); | ||
|
||
int __init s5pc100_init(void) | ||
{ | ||
printk(KERN_DEBUG "S5PC100: Initialising architecture\n"); | ||
|
||
return sysdev_register(&s5pc100_sysdev); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* arch/arm/mach-s5pc100/include/mach/debug-macro.S | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* | ||
* Based on mach-s3c6400/include/mach/debug-macro.S | ||
* | ||
* 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 | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
/* pull in the relevant register and map files. */ | ||
|
||
#include <mach/map.h> | ||
#include <plat/regs-serial.h> | ||
|
||
/* note, for the boot process to work we have to keep the UART | ||
* virtual address aligned to an 1MiB boundary for the L1 | ||
* mapping the head code makes. We keep the UART virtual address | ||
* aligned and add in the offset when we load the value here. | ||
*/ | ||
|
||
.macro addruart, rx | ||
mrc p15, 0, \rx, c1, c0 | ||
tst \rx, #1 | ||
ldreq \rx, = S3C_PA_UART | ||
ldrne \rx, = (S3C_VA_UART + S3C_PA_UART & 0xfffff) | ||
add \rx, \rx, #(0x400 * CONFIG_DEBUG_S3C_UART) | ||
.endm | ||
|
||
/* include the reset of the code which will do the work, we're only | ||
* compiling for a single cpu processor type so the default of s3c2440 | ||
* will be fine with us. | ||
*/ | ||
|
||
#include <plat/debug-macro.S> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* arch/arm/mach-s5pc100/include/mach/entry-macro.S | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* Based on mach-s3c6400/include/mach/entry-macro.S | ||
* | ||
* Low-level IRQ helper macros for the Samsung S5PC1XX series | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#include <asm/hardware/vic.h> | ||
#include <mach/map.h> | ||
#include <plat/irqs.h> | ||
|
||
.macro disable_fiq | ||
.endm | ||
|
||
.macro get_irqnr_preamble, base, tmp | ||
ldr \base, =S3C_VA_VIC0 | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm | ||
|
||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
|
||
@ check the vic0 | ||
mov \irqnr, # S3C_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 \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 \irqnr, \irqnr, #32 | ||
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
teqeq \irqstat, #0 | ||
|
||
clzne \irqstat, \irqstat | ||
subne \irqnr, \irqnr, \irqstat | ||
.endm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* linux/arch/arm/mach-s5pc100/include/mach/hardware.h | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* S3C6400 - Hardware support | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_HARDWARE_H | ||
#define __ASM_ARCH_HARDWARE_H __FILE__ | ||
|
||
/* currently nothing here, placeholder */ | ||
|
||
#endif /* __ASM_ARCH_HARDWARE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* linux/arch/arm/mach-s5pc100/include/mach/system.h | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* S5PC1XX - system implementation | ||
* | ||
* Based on mach-s3c6400/include/mach/system.h | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_SYSTEM_H | ||
#define __ASM_ARCH_SYSTEM_H __FILE__ | ||
|
||
static void arch_idle(void) | ||
{ | ||
/* nothing here yet */ | ||
} | ||
|
||
static void arch_reset(char mode, const char *cmd) | ||
{ | ||
/* nothing here yet */ | ||
} | ||
|
||
#endif /* __ASM_ARCH_IRQ_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* arch/arm/mach-s5pc100/include/mach/uncompress.h | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* S5PC100 - uncompress code | ||
* | ||
* Based on mach-s3c6400/include/mach/uncompress.h | ||
* | ||
* 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 | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_UNCOMPRESS_H | ||
#define __ASM_ARCH_UNCOMPRESS_H | ||
|
||
#include <mach/map.h> | ||
#include <plat/uncompress.h> | ||
|
||
static void arch_detect_cpu(void) | ||
{ | ||
/* we do not need to do any cpu detection here at the moment. */ | ||
fifo_mask = S3C2440_UFSTAT_TXMASK; | ||
fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; | ||
} | ||
|
||
#endif /* __ASM_ARCH_UNCOMPRESS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* linux/arch/arm/plat-s5pc1xx/cpu.c | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* S5PC1XX CPU Support | ||
* | ||
* Based on plat-s3c64xx/cpu.c | ||
* | ||
* 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 | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/module.h> | ||
#include <linux/interrupt.h> | ||
#include <linux/ioport.h> | ||
#include <linux/serial_core.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/io.h> | ||
|
||
#include <mach/hardware.h> | ||
#include <mach/map.h> | ||
|
||
#include <asm/mach/map.h> | ||
|
||
#include <plat/regs-serial.h> | ||
|
||
#include <plat/cpu.h> | ||
#include <plat/devs.h> | ||
#include <plat/clock.h> | ||
|
||
#include <plat/s5pc100.h> | ||
|
||
/* table of supported CPUs */ | ||
|
||
static const char name_s5pc100[] = "S5PC100"; | ||
|
||
static struct cpu_table cpu_ids[] __initdata = { | ||
{ | ||
.idcode = 0x43100000, | ||
.idmask = 0xfffff000, | ||
.map_io = s5pc100_map_io, | ||
.init_clocks = s5pc100_init_clocks, | ||
.init_uarts = s5pc100_init_uarts, | ||
.init = s5pc100_init, | ||
.name = name_s5pc100, | ||
}, | ||
}; | ||
/* minimal IO mapping */ | ||
|
||
/* see notes on uart map in arch/arm/mach-s5pc100/include/mach/debug-macro.S */ | ||
#define UART_OFFS (S3C_PA_UART & 0xffff) | ||
|
||
static struct map_desc s5pc1xx_iodesc[] __initdata = { | ||
{ | ||
.virtual = (unsigned long)S5PC1XX_VA_CHIPID, | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_CHIPID), | ||
.length = SZ_16, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)S5PC1XX_VA_CLK, | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_CLK), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)S5PC1XX_VA_PWR, | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_PWR), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)(S5PC1XX_VA_UART), | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_UART), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)S5PC1XX_VA_VIC(0), | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_VIC(0)), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)S5PC1XX_VA_VIC(1), | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_VIC(1)), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)S5PC1XX_VA_VIC(2), | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_VIC(2)), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = (unsigned long)S5PC1XX_VA_TIMER, | ||
.pfn = __phys_to_pfn(S5PC1XX_PA_TIMER), | ||
.length = SZ_256, | ||
.type = MT_DEVICE, | ||
}, | ||
}; | ||
|
||
/* read cpu identification code */ | ||
|
||
void __init s5pc1xx_init_io(struct map_desc *mach_desc, int size) | ||
{ | ||
unsigned long idcode; | ||
|
||
/* initialise the io descriptors we need for initialisation */ | ||
iotable_init(s5pc1xx_iodesc, ARRAY_SIZE(s5pc1xx_iodesc)); | ||
iotable_init(mach_desc, size); | ||
|
||
idcode = __raw_readl(S5PC1XX_VA_CHIPID); | ||
s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); | ||
} |
Oops, something went wrong.