-
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.
[ARM] 5338/1: Add Nuvoton W90P910 Platform support
Add Nuvoton W90X900 ARM9 plat support to linux arm tree, Now, this patch include only W90P910 EVB of W90P910 CPU, Its driver is nothing. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- Loading branch information
wanzongshun
authored and
Russell King
committed
Dec 3, 2008
1 parent
c5b84b3
commit 7ec80dd
Showing
23 changed files
with
986 additions
and
0 deletions.
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
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
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,19 @@ | ||
if ARCH_W90X900 | ||
|
||
config CPU_W90P910 | ||
bool | ||
help | ||
Support for W90P910 of Nuvoton W90X900 CPUs. | ||
|
||
menu "W90P910 Machines" | ||
|
||
config MACH_W90P910EVB | ||
bool "Nuvoton W90P910 Evaluation Board" | ||
default y | ||
select CPU_W90P910 | ||
help | ||
Say Y here if you are using the Nuvoton W90P910EVB | ||
|
||
endmenu | ||
|
||
endif |
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,15 @@ | ||
# | ||
# Makefile for the linux kernel. | ||
# | ||
|
||
# Object file lists. | ||
|
||
obj-y := irq.o time.o | ||
|
||
# W90X900 CPU support files | ||
|
||
obj-$(CONFIG_CPU_W90P910) += w90p910.o | ||
|
||
# machine support | ||
|
||
obj-$(CONFIG_MACH_W90P910EVB) += mach-w90p910evb.o |
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,3 @@ | ||
zreladdr-y := 0x00008000 | ||
params_phys-y := 0x00000100 | ||
|
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,77 @@ | ||
/* | ||
* arch/arm/mach-w90x900/cpu.h | ||
* | ||
* Based on linux/include/asm-arm/plat-s3c24xx/cpu.h by Ben Dooks | ||
* | ||
* Copyright (c) 2008 Nuvoton technology corporation | ||
* All rights reserved. | ||
* | ||
* Header file for W90X900 CPU support | ||
* | ||
* Wan ZongShun <mcuos.com@gmail.com> | ||
* | ||
* 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. | ||
* | ||
*/ | ||
|
||
#define IODESC_ENT(y) \ | ||
{ \ | ||
.virtual = (unsigned long)W90X900_VA_##y, \ | ||
.pfn = __phys_to_pfn(W90X900_PA_##y), \ | ||
.length = W90X900_SZ_##y, \ | ||
.type = MT_DEVICE, \ | ||
} | ||
|
||
/*Cpu identifier register*/ | ||
|
||
#define W90X900PDID W90X900_VA_GCR | ||
#define W90P910_CPUID 0x02900910 | ||
#define W90P920_CPUID 0x02900920 | ||
#define W90P950_CPUID 0x02900950 | ||
#define W90N960_CPUID 0x02900960 | ||
|
||
struct w90x900_uartcfg; | ||
struct map_desc; | ||
struct sys_timer; | ||
|
||
/* core initialisation functions */ | ||
|
||
extern void w90x900_init_irq(void); | ||
extern void w90p910_init_io(struct map_desc *mach_desc, int size); | ||
extern void w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no); | ||
extern void w90p910_init_clocks(int xtal); | ||
extern void w90p910_map_io(struct map_desc *mach_desc, int size); | ||
extern struct sys_timer w90x900_timer; | ||
|
||
#define W90X900_RES(name) \ | ||
struct resource w90x900_##name##_resource[] = { \ | ||
[0] = { \ | ||
.start = name##_PA, \ | ||
.end = name##_PA + 0x0ff, \ | ||
.flags = IORESOURCE_MEM, \ | ||
}, \ | ||
[1] = { \ | ||
.start = IRQ_##name, \ | ||
.end = IRQ_##name, \ | ||
.flags = IORESOURCE_IRQ, \ | ||
} \ | ||
} | ||
|
||
#define W90X900_DEVICE(devname, regname, devid, platdevname) \ | ||
struct platform_device w90x900_##devname = { \ | ||
.name = platdevname, \ | ||
.id = devid, \ | ||
.num_resources = ARRAY_SIZE(w90x900_##regname##_resource), \ | ||
.resource = w90x900_##regname##_resource, \ | ||
} | ||
|
||
#define W90X900_UARTCFG(port, flag, uc, ulc, ufc) \ | ||
{ \ | ||
.hwport = port, \ | ||
.flags = flag, \ | ||
.ucon = uc, \ | ||
.ulcon = ulc, \ | ||
.ufcon = ufc, \ | ||
} |
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,34 @@ | ||
/* | ||
* arch/arm/mach-w90x900/include/mach/entry-macro.S | ||
* | ||
* Low-level IRQ helper macros for W90P910-based platforms | ||
* | ||
* 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 <mach/hardware.h> | ||
#include <mach/regs-irq.h> | ||
|
||
.macro get_irqnr_preamble, base, tmp | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm | ||
|
||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
|
||
mov \base, #AIC_BA | ||
|
||
ldr \irqnr, [ \base, #AIC_IPER] | ||
ldr \irqnr, [ \base, #AIC_ISNR] | ||
cmp \irqnr, #0 | ||
|
||
.endm | ||
|
||
/* currently don't need an disable_fiq macro */ | ||
|
||
.macro disable_fiq | ||
.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,24 @@ | ||
/* | ||
* arch/arm/mach-w90x900/include/mach/hardware.h | ||
* | ||
* Copyright (c) 2008 Nuvoton technology corporation | ||
* All rights reserved. | ||
* | ||
* Wan ZongShun <mcuos.com@gmail.com> | ||
* | ||
* Based on arch/arm/mach-s3c2410/include/mach/hardware.h | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_HARDWARE_H | ||
#define __ASM_ARCH_HARDWARE_H | ||
|
||
#include <asm/sizes.h> | ||
#include <mach/map.h> | ||
|
||
#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,30 @@ | ||
/* | ||
* arch/arm/mach-w90x900/include/mach/io.h | ||
* | ||
* Copyright (c) 2008 Nuvoton technology corporation | ||
* All rights reserved. | ||
* | ||
* Wan ZongShun <mcuos.com@gmail.com> | ||
* | ||
* Based on arch/arm/mach-s3c2410/include/mach/io.h | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#ifndef __ASM_ARM_ARCH_IO_H | ||
#define __ASM_ARM_ARCH_IO_H | ||
|
||
#define IO_SPACE_LIMIT 0xffffffff | ||
|
||
/* | ||
* 1:1 mapping for ioremapped regions. | ||
*/ | ||
|
||
#define __mem_pci(a) (a) | ||
#define __io(a) __typesafe_io(a) | ||
|
||
#endif |
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,45 @@ | ||
/* | ||
* arch/arm/mach-w90x900/include/mach/irqs.h | ||
* | ||
* Copyright (c) 2008 Nuvoton technology corporation | ||
* All rights reserved. | ||
* | ||
* Wan ZongShun <mcuos.com@gmail.com> | ||
* | ||
* Based on arch/arm/mach-s3c2410/include/mach/irqs.h | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_IRQS_H | ||
#define __ASM_ARCH_IRQS_H | ||
|
||
/* | ||
* we keep the first set of CPU IRQs out of the range of | ||
* the ISA space, so that the PC104 has them to itself | ||
* and we don't end up having to do horrible things to the | ||
* standard ISA drivers.... | ||
* | ||
*/ | ||
|
||
#define W90X900_IRQ(x) (x) | ||
|
||
/* Main cpu interrupts */ | ||
|
||
#define IRQ_WDT W90X900_IRQ(1) | ||
#define IRQ_UART0 W90X900_IRQ(7) | ||
#define IRQ_UART1 W90X900_IRQ(8) | ||
#define IRQ_UART2 W90X900_IRQ(9) | ||
#define IRQ_UART3 W90X900_IRQ(10) | ||
#define IRQ_UART4 W90X900_IRQ(11) | ||
#define IRQ_TIMER0 W90X900_IRQ(12) | ||
#define IRQ_TIMER1 W90X900_IRQ(13) | ||
#define IRQ_T_INT_GROUP W90X900_IRQ(14) | ||
#define IRQ_ADC W90X900_IRQ(31) | ||
#define NR_IRQS (IRQ_ADC+1) | ||
|
||
#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,76 @@ | ||
/* | ||
* arch/arm/mach-w90x900/include/mach/map.h | ||
* | ||
* Copyright (c) 2008 Nuvoton technology corporation | ||
* All rights reserved. | ||
* | ||
* Wan ZongShun <mcuos.com@gmail.com> | ||
* | ||
* Based on arch/arm/mach-s3c2410/include/mach/map.h | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_MAP_H | ||
#define __ASM_ARCH_MAP_H | ||
|
||
#ifndef __ASSEMBLY__ | ||
#define W90X900_ADDR(x) ((void __iomem *)(0xF0000000 + (x))) | ||
#else | ||
#define W90X900_ADDR(x) (0xF0000000 + (x)) | ||
#endif | ||
|
||
#define AHB_IO_BASE 0xB0000000 | ||
#define APB_IO_BASE 0xB8000000 | ||
#define CLOCKPW_BASE (APB_IO_BASE+0x200) | ||
#define AIC_IO_BASE (APB_IO_BASE+0x2000) | ||
#define TIMER_IO_BASE (APB_IO_BASE+0x1000) | ||
|
||
/* | ||
* interrupt controller is the first thing we put in, to make | ||
* the assembly code for the irq detection easier | ||
*/ | ||
|
||
#define W90X900_VA_IRQ W90X900_ADDR(0x00000000) | ||
#define W90X900_PA_IRQ (0xB8002000) | ||
#define W90X900_SZ_IRQ SZ_4K | ||
|
||
#define W90X900_VA_GCR W90X900_ADDR(0x08002000) | ||
#define W90X900_PA_GCR (0xB0000000) | ||
#define W90X900_SZ_GCR SZ_4K | ||
|
||
/* Clock and Power management */ | ||
|
||
#define W90X900_VA_CLKPWR (W90X900_VA_GCR+0x200) | ||
#define W90X900_PA_CLKPWR (0xB0000200) | ||
#define W90X900_SZ_CLKPWR SZ_4K | ||
|
||
/* EBI management */ | ||
|
||
#define W90X900_VA_EBI W90X900_ADDR(0x00001000) | ||
#define W90X900_PA_EBI (0xB0001000) | ||
#define W90X900_SZ_EBI SZ_4K | ||
|
||
/* UARTs */ | ||
|
||
#define W90X900_VA_UART W90X900_ADDR(0x08000000) | ||
#define W90X900_PA_UART (0xB8000000) | ||
#define W90X900_SZ_UART SZ_4K | ||
|
||
/* Timers */ | ||
|
||
#define W90X900_VA_TIMER W90X900_ADDR(0x08001000) | ||
#define W90X900_PA_TIMER (0xB8001000) | ||
#define W90X900_SZ_TIMER SZ_4K | ||
|
||
/* GPIO ports */ | ||
|
||
#define W90X900_VA_GPIO W90X900_ADDR(0x08003000) | ||
#define W90X900_PA_GPIO (0xB8003000) | ||
#define W90X900_SZ_GPIO SZ_4K | ||
|
||
#endif /* __ASM_ARCH_MAP_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,23 @@ | ||
/* | ||
* arch/arm/mach-w90x900/include/mach/memory.h | ||
* | ||
* Copyright (c) 2008 Nuvoton technology corporation | ||
* All rights reserved. | ||
* | ||
* Wan ZongShun <mcuos.com@gmail.com> | ||
* | ||
* Based on arch/arm/mach-s3c2410/include/mach/memory.h | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_MEMORY_H | ||
#define __ASM_ARCH_MEMORY_H | ||
|
||
#define PHYS_OFFSET UL(0x00000000) | ||
|
||
#endif |
Oops, something went wrong.