diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 22:08:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 22:08:06 -0400 |
commit | 411f5c7a502769ccc0377c5ba36cb0b283847ba8 (patch) | |
tree | 2c3a29671e3f923de48c55f94194849264a7bf53 /arch/arm/mach-orion5x | |
parent | 6d7ed21d17e640b120b902a314143e5ef4917a70 (diff) | |
parent | 9ced9f03d12d7539e86b0bff5bc750153c976c34 (diff) |
Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (289 commits)
davinci: DM644x EVM: register MUSB device earlier
davinci: add spi devices on tnetv107x evm
davinci: add ssp config for tnetv107x evm board
davinci: add tnetv107x ssp platform device
spi: add ti-ssp spi master driver
mfd: add driver for sequencer serial port
ARM: EXYNOS4: Implement Clock gating for System MMU
ARM: EXYNOS4: Enhancement of System MMU driver
ARM: EXYNOS4: Add support for gpio interrupts
ARM: S5P: Add function to register gpio interrupt bank data
ARM: S5P: Cleanup S5P gpio interrupt code
ARM: EXYNOS4: Add missing GPYx banks
ARM: S3C64XX: Fix section mismatch from cpufreq init
ARM: EXYNOS4: Add keypad device to the SMDKV310
ARM: EXYNOS4: Update clocks for keypad
ARM: EXYNOS4: Update keypad base address
ARM: EXYNOS4: Add keypad device helpers
ARM: EXYNOS4: Add support for SATA on ARMLEX4210
plat-nomadik: make GPIO interrupts work with cpuidle ApSleep
mach-u300: define a dummy filter function for coh901318
...
Fix up various conflicts in
- arch/arm/mach-exynos4/cpufreq.c
- arch/arm/mach-mxs/gpio.c
- drivers/net/Kconfig
- drivers/tty/serial/Kconfig
- drivers/tty/serial/Makefile
- drivers/usb/gadget/fsl_mxc_udc.c
- drivers/video/Kconfig
Diffstat (limited to 'arch/arm/mach-orion5x')
29 files changed, 122 insertions, 61 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 8dc2c76d2260..986c3bf4e6b8 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | #include <mach/bridge-regs.h> | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <mach/orion5x.h> | 31 | #include <mach/orion5x.h> |
31 | #include <plat/ehci-orion.h> | 32 | #include <plat/ehci-orion.h> |
@@ -599,6 +600,11 @@ void __init orion5x_wdt_init(void) | |||
599 | /***************************************************************************** | 600 | /***************************************************************************** |
600 | * Time handling | 601 | * Time handling |
601 | ****************************************************************************/ | 602 | ****************************************************************************/ |
603 | void __init orion5x_init_early(void) | ||
604 | { | ||
605 | orion_time_set_base(TIMER_VIRT_BASE); | ||
606 | } | ||
607 | |||
602 | int orion5x_tclk; | 608 | int orion5x_tclk; |
603 | 609 | ||
604 | int __init orion5x_find_tclk(void) | 610 | int __init orion5x_find_tclk(void) |
@@ -616,7 +622,9 @@ int __init orion5x_find_tclk(void) | |||
616 | static void orion5x_timer_init(void) | 622 | static void orion5x_timer_init(void) |
617 | { | 623 | { |
618 | orion5x_tclk = orion5x_find_tclk(); | 624 | orion5x_tclk = orion5x_find_tclk(); |
619 | orion_time_init(IRQ_ORION5X_BRIDGE, orion5x_tclk); | 625 | |
626 | orion_time_init(ORION5X_BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, | ||
627 | IRQ_ORION5X_BRIDGE, orion5x_tclk); | ||
620 | } | 628 | } |
621 | 629 | ||
622 | struct sys_timer orion5x_timer = { | 630 | struct sys_timer orion5x_timer = { |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 8f004503c96d..f2b2b35e8646 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -9,6 +9,7 @@ struct mv_sata_platform_data; | |||
9 | * Basic Orion init functions used early by machine-setup. | 9 | * Basic Orion init functions used early by machine-setup. |
10 | */ | 10 | */ |
11 | void orion5x_map_io(void); | 11 | void orion5x_map_io(void); |
12 | void orion5x_init_early(void); | ||
12 | void orion5x_init_irq(void); | 13 | void orion5x_init_irq(void); |
13 | void orion5x_init(void); | 14 | void orion5x_init(void); |
14 | extern int orion5x_tclk; | 15 | extern int orion5x_tclk; |
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c index b1c451f5ee27..425807579303 100644 --- a/arch/arm/mach-orion5x/d2net-setup.c +++ b/arch/arm/mach-orion5x/d2net-setup.c | |||
@@ -339,6 +339,7 @@ MACHINE_START(D2NET, "LaCie d2 Network") | |||
339 | .boot_params = 0x00000100, | 339 | .boot_params = 0x00000100, |
340 | .init_machine = d2net_init, | 340 | .init_machine = d2net_init, |
341 | .map_io = orion5x_map_io, | 341 | .map_io = orion5x_map_io, |
342 | .init_early = orion5x_init_early, | ||
342 | .init_irq = orion5x_init_irq, | 343 | .init_irq = orion5x_init_irq, |
343 | .timer = &orion5x_timer, | 344 | .timer = &orion5x_timer, |
344 | .fixup = tag_fixup_mem32, | 345 | .fixup = tag_fixup_mem32, |
@@ -350,6 +351,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network") | |||
350 | .boot_params = 0x00000100, | 351 | .boot_params = 0x00000100, |
351 | .init_machine = d2net_init, | 352 | .init_machine = d2net_init, |
352 | .map_io = orion5x_map_io, | 353 | .map_io = orion5x_map_io, |
354 | .init_early = orion5x_init_early, | ||
353 | .init_irq = orion5x_init_irq, | 355 | .init_irq = orion5x_init_irq, |
354 | .timer = &orion5x_timer, | 356 | .timer = &orion5x_timer, |
355 | .fixup = tag_fixup_mem32, | 357 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index df1083f5b6eb..c10a11715376 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -361,6 +361,7 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") | |||
361 | .boot_params = 0x00000100, | 361 | .boot_params = 0x00000100, |
362 | .init_machine = db88f5281_init, | 362 | .init_machine = db88f5281_init, |
363 | .map_io = orion5x_map_io, | 363 | .map_io = orion5x_map_io, |
364 | .init_early = orion5x_init_early, | ||
364 | .init_irq = orion5x_init_irq, | 365 | .init_irq = orion5x_init_irq, |
365 | .timer = &orion5x_timer, | 366 | .timer = &orion5x_timer, |
366 | MACHINE_END | 367 | MACHINE_END |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 3a7bc0e36982..90ab022eabeb 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -733,6 +733,7 @@ MACHINE_START(DNS323, "D-Link DNS-323") | |||
733 | .boot_params = 0x00000100, | 733 | .boot_params = 0x00000100, |
734 | .init_machine = dns323_init, | 734 | .init_machine = dns323_init, |
735 | .map_io = orion5x_map_io, | 735 | .map_io = orion5x_map_io, |
736 | .init_early = orion5x_init_early, | ||
736 | .init_irq = orion5x_init_irq, | 737 | .init_irq = orion5x_init_irq, |
737 | .timer = &orion5x_timer, | 738 | .timer = &orion5x_timer, |
738 | .fixup = tag_fixup_mem32, | 739 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c index ba98459f44b0..d037a90c216c 100644 --- a/arch/arm/mach-orion5x/edmini_v2-setup.c +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c | |||
@@ -254,6 +254,7 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2") | |||
254 | .boot_params = 0x00000100, | 254 | .boot_params = 0x00000100, |
255 | .init_machine = edmini_v2_init, | 255 | .init_machine = edmini_v2_init, |
256 | .map_io = orion5x_map_io, | 256 | .map_io = orion5x_map_io, |
257 | .init_early = orion5x_init_early, | ||
257 | .init_irq = orion5x_init_irq, | 258 | .init_irq = orion5x_init_irq, |
258 | .timer = &orion5x_timer, | 259 | .timer = &orion5x_timer, |
259 | .fixup = tag_fixup_mem32, | 260 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/include/mach/bridge-regs.h index 5c9744cd8ef6..96484bcd34ca 100644 --- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h +++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h | |||
@@ -22,14 +22,12 @@ | |||
22 | 22 | ||
23 | #define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE | 0x10c) | 23 | #define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE | 0x10c) |
24 | 24 | ||
25 | #define BRIDGE_CAUSE (ORION5X_BRIDGE_VIRT_BASE | 0x110) | ||
26 | |||
25 | #define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE | 0x11C) | 27 | #define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE | 0x11C) |
26 | 28 | ||
27 | #define BRIDGE_CAUSE (ORION5X_BRIDGE_VIRT_BASE | 0x110) | ||
28 | #define WDT_INT_REQ 0x0008 | 29 | #define WDT_INT_REQ 0x0008 |
29 | 30 | ||
30 | #define BRIDGE_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x114) | ||
31 | #define BRIDGE_INT_TIMER0 0x0002 | ||
32 | #define BRIDGE_INT_TIMER1 0x0004 | ||
33 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 31 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
34 | 32 | ||
35 | #define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE | 0x200) | 33 | #define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE | 0x200) |
diff --git a/arch/arm/mach-orion5x/include/mach/gpio.h b/arch/arm/mach-orion5x/include/mach/gpio.h index d8182e87ac16..a1d0b78decb1 100644 --- a/arch/arm/mach-orion5x/include/mach/gpio.h +++ b/arch/arm/mach-orion5x/include/mach/gpio.h | |||
@@ -6,32 +6,4 @@ | |||
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __ASM_ARCH_GPIO_H | ||
10 | #define __ASM_ARCH_GPIO_H | ||
11 | |||
12 | #include <mach/irqs.h> | ||
13 | #include <plat/gpio.h> | 9 | #include <plat/gpio.h> |
14 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
15 | |||
16 | #define GPIO_MAX 32 | ||
17 | #define GPIO_OUT(pin) ORION5X_DEV_BUS_REG(0x100) | ||
18 | #define GPIO_IO_CONF(pin) ORION5X_DEV_BUS_REG(0x104) | ||
19 | #define GPIO_BLINK_EN(pin) ORION5X_DEV_BUS_REG(0x108) | ||
20 | #define GPIO_IN_POL(pin) ORION5X_DEV_BUS_REG(0x10c) | ||
21 | #define GPIO_DATA_IN(pin) ORION5X_DEV_BUS_REG(0x110) | ||
22 | #define GPIO_EDGE_CAUSE(pin) ORION5X_DEV_BUS_REG(0x114) | ||
23 | #define GPIO_EDGE_MASK(pin) ORION5X_DEV_BUS_REG(0x118) | ||
24 | #define GPIO_LEVEL_MASK(pin) ORION5X_DEV_BUS_REG(0x11c) | ||
25 | |||
26 | static inline int gpio_to_irq(int pin) | ||
27 | { | ||
28 | return pin + IRQ_ORION5X_GPIO_START; | ||
29 | } | ||
30 | |||
31 | static inline int irq_to_gpio(int irq) | ||
32 | { | ||
33 | return irq - IRQ_ORION5X_GPIO_START; | ||
34 | } | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/arch/arm/mach-orion5x/include/mach/orion5x.h b/arch/arm/mach-orion5x/include/mach/orion5x.h index 2d8766570531..0a28bbc76891 100644 --- a/arch/arm/mach-orion5x/include/mach/orion5x.h +++ b/arch/arm/mach-orion5x/include/mach/orion5x.h | |||
@@ -73,6 +73,7 @@ | |||
73 | #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000) | 73 | #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000) |
74 | #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000) | 74 | #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000) |
75 | #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x)) | 75 | #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x)) |
76 | #define GPIO_VIRT_BASE ORION5X_DEV_BUS_REG(0x0100) | ||
76 | #define SPI_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x0600) | 77 | #define SPI_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x0600) |
77 | #define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000) | 78 | #define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000) |
78 | #define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000) | 79 | #define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000) |
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index d7512b925a85..ed85891f8699 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -28,27 +28,12 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
28 | 28 | ||
29 | void __init orion5x_init_irq(void) | 29 | void __init orion5x_init_irq(void) |
30 | { | 30 | { |
31 | int i; | ||
32 | |||
33 | orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK); | 31 | orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK); |
34 | 32 | ||
35 | /* | 33 | /* |
36 | * Mask and clear GPIO IRQ interrupts | 34 | * Initialize gpiolib for GPIOs 0-31. |
37 | */ | ||
38 | writel(0x0, GPIO_LEVEL_MASK(0)); | ||
39 | writel(0x0, GPIO_EDGE_MASK(0)); | ||
40 | writel(0x0, GPIO_EDGE_CAUSE(0)); | ||
41 | |||
42 | /* | ||
43 | * Register chained level handlers for GPIO IRQs by default. | ||
44 | * User can use set_type() if he wants to use edge types handlers. | ||
45 | */ | 35 | */ |
46 | for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) { | 36 | orion_gpio_init(0, 32, GPIO_VIRT_BASE, 0, IRQ_ORION5X_GPIO_START); |
47 | set_irq_chip(i, &orion_gpio_irq_chip); | ||
48 | set_irq_handler(i, handle_level_irq); | ||
49 | irq_desc[i].status |= IRQ_LEVEL; | ||
50 | set_irq_flags(i, IRQF_VALID); | ||
51 | } | ||
52 | set_irq_chained_handler(IRQ_ORION5X_GPIO_0_7, gpio_irq_handler); | 37 | set_irq_chained_handler(IRQ_ORION5X_GPIO_0_7, gpio_irq_handler); |
53 | set_irq_chained_handler(IRQ_ORION5X_GPIO_8_15, gpio_irq_handler); | 38 | set_irq_chained_handler(IRQ_ORION5X_GPIO_8_15, gpio_irq_handler); |
54 | set_irq_chained_handler(IRQ_ORION5X_GPIO_16_23, gpio_irq_handler); | 39 | set_irq_chained_handler(IRQ_ORION5X_GPIO_16_23, gpio_irq_handler); |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 4be9aa08de69..47497c76162a 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -382,6 +382,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") | |||
382 | .boot_params = 0x00000100, | 382 | .boot_params = 0x00000100, |
383 | .init_machine = kurobox_pro_init, | 383 | .init_machine = kurobox_pro_init, |
384 | .map_io = orion5x_map_io, | 384 | .map_io = orion5x_map_io, |
385 | .init_early = orion5x_init_early, | ||
385 | .init_irq = orion5x_init_irq, | 386 | .init_irq = orion5x_init_irq, |
386 | .timer = &orion5x_timer, | 387 | .timer = &orion5x_timer, |
387 | .fixup = tag_fixup_mem32, | 388 | .fixup = tag_fixup_mem32, |
@@ -394,6 +395,7 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live") | |||
394 | .boot_params = 0x00000100, | 395 | .boot_params = 0x00000100, |
395 | .init_machine = kurobox_pro_init, | 396 | .init_machine = kurobox_pro_init, |
396 | .map_io = orion5x_map_io, | 397 | .map_io = orion5x_map_io, |
398 | .init_early = orion5x_init_early, | ||
397 | .init_irq = orion5x_init_irq, | 399 | .init_irq = orion5x_init_irq, |
398 | .timer = &orion5x_timer, | 400 | .timer = &orion5x_timer, |
399 | .fixup = tag_fixup_mem32, | 401 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c index 20a9b66cbafa..6ae12aa6d759 100644 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ b/arch/arm/mach-orion5x/ls-chl-setup.c | |||
@@ -321,6 +321,7 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") | |||
321 | .boot_params = 0x00000100, | 321 | .boot_params = 0x00000100, |
322 | .init_machine = lschl_init, | 322 | .init_machine = lschl_init, |
323 | .map_io = orion5x_map_io, | 323 | .map_io = orion5x_map_io, |
324 | .init_early = orion5x_init_early, | ||
324 | .init_irq = orion5x_init_irq, | 325 | .init_irq = orion5x_init_irq, |
325 | .timer = &orion5x_timer, | 326 | .timer = &orion5x_timer, |
326 | .fixup = tag_fixup_mem32, | 327 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index 437364b7168e..7adafd79cf98 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c | |||
@@ -268,6 +268,7 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL") | |||
268 | .boot_params = 0x00000100, | 268 | .boot_params = 0x00000100, |
269 | .init_machine = ls_hgl_init, | 269 | .init_machine = ls_hgl_init, |
270 | .map_io = orion5x_map_io, | 270 | .map_io = orion5x_map_io, |
271 | .init_early = orion5x_init_early, | ||
271 | .init_irq = orion5x_init_irq, | 272 | .init_irq = orion5x_init_irq, |
272 | .timer = &orion5x_timer, | 273 | .timer = &orion5x_timer, |
273 | .fixup = tag_fixup_mem32, | 274 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c index ab9b0cf0a90b..869958f5c394 100644 --- a/arch/arm/mach-orion5x/lsmini-setup.c +++ b/arch/arm/mach-orion5x/lsmini-setup.c | |||
@@ -270,6 +270,7 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini") | |||
270 | .boot_params = 0x00000100, | 270 | .boot_params = 0x00000100, |
271 | .init_machine = lsmini_init, | 271 | .init_machine = lsmini_init, |
272 | .map_io = orion5x_map_io, | 272 | .map_io = orion5x_map_io, |
273 | .init_early = orion5x_init_early, | ||
273 | .init_irq = orion5x_init_irq, | 274 | .init_irq = orion5x_init_irq, |
274 | .timer = &orion5x_timer, | 275 | .timer = &orion5x_timer, |
275 | .fixup = tag_fixup_mem32, | 276 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index db485d3b8144..2288207726e4 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -124,9 +124,6 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) | |||
124 | u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL); | 124 | u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL); |
125 | u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL); | 125 | u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL); |
126 | 126 | ||
127 | /* Initialize gpiolib. */ | ||
128 | orion_gpio_init(); | ||
129 | |||
130 | for ( ; mode->mpp >= 0; mode++) { | 127 | for ( ; mode->mpp >= 0; mode++) { |
131 | u32 *reg; | 128 | u32 *reg; |
132 | int num_type; | 129 | int num_type; |
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 2f0e16cd7e81..b43b208153cb 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -264,6 +264,7 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II") | |||
264 | .boot_params = 0x00000100, | 264 | .boot_params = 0x00000100, |
265 | .init_machine = mss2_init, | 265 | .init_machine = mss2_init, |
266 | .map_io = orion5x_map_io, | 266 | .map_io = orion5x_map_io, |
267 | .init_early = orion5x_init_early, | ||
267 | .init_irq = orion5x_init_irq, | 268 | .init_irq = orion5x_init_irq, |
268 | .timer = &orion5x_timer, | 269 | .timer = &orion5x_timer, |
269 | .fixup = tag_fixup_mem32 | 270 | .fixup = tag_fixup_mem32 |
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index b3d90f25de9f..c55d071707f5 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c | |||
@@ -232,6 +232,7 @@ MACHINE_START(MV2120, "HP Media Vault mv2120") | |||
232 | .boot_params = 0x00000100, | 232 | .boot_params = 0x00000100, |
233 | .init_machine = mv2120_init, | 233 | .init_machine = mv2120_init, |
234 | .map_io = orion5x_map_io, | 234 | .map_io = orion5x_map_io, |
235 | .init_early = orion5x_init_early, | ||
235 | .init_irq = orion5x_init_irq, | 236 | .init_irq = orion5x_init_irq, |
236 | .timer = &orion5x_timer, | 237 | .timer = &orion5x_timer, |
237 | .fixup = tag_fixup_mem32 | 238 | .fixup = tag_fixup_mem32 |
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index d6665b31665f..429ecafe9fdd 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c | |||
@@ -422,6 +422,7 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network") | |||
422 | .boot_params = 0x00000100, | 422 | .boot_params = 0x00000100, |
423 | .init_machine = net2big_init, | 423 | .init_machine = net2big_init, |
424 | .map_io = orion5x_map_io, | 424 | .map_io = orion5x_map_io, |
425 | .init_early = orion5x_init_early, | ||
425 | .init_irq = orion5x_init_irq, | 426 | .init_irq = orion5x_init_irq, |
426 | .timer = &orion5x_timer, | 427 | .timer = &orion5x_timer, |
427 | .fixup = tag_fixup_mem32, | 428 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index f4c26fd731f4..34310ab56e29 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -172,6 +172,7 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design") | |||
172 | .boot_params = 0x00000100, | 172 | .boot_params = 0x00000100, |
173 | .init_machine = rd88f5181l_fxo_init, | 173 | .init_machine = rd88f5181l_fxo_init, |
174 | .map_io = orion5x_map_io, | 174 | .map_io = orion5x_map_io, |
175 | .init_early = orion5x_init_early, | ||
175 | .init_irq = orion5x_init_irq, | 176 | .init_irq = orion5x_init_irq, |
176 | .timer = &orion5x_timer, | 177 | .timer = &orion5x_timer, |
177 | .fixup = tag_fixup_mem32, | 178 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index b5942909bab0..c1f79fa014ed 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -184,6 +184,7 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design") | |||
184 | .boot_params = 0x00000100, | 184 | .boot_params = 0x00000100, |
185 | .init_machine = rd88f5181l_ge_init, | 185 | .init_machine = rd88f5181l_ge_init, |
186 | .map_io = orion5x_map_io, | 186 | .map_io = orion5x_map_io, |
187 | .init_early = orion5x_init_early, | ||
187 | .init_irq = orion5x_init_irq, | 188 | .init_irq = orion5x_init_irq, |
188 | .timer = &orion5x_timer, | 189 | .timer = &orion5x_timer, |
189 | .fixup = tag_fixup_mem32, | 190 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 165ed87029b2..67ec6959b267 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -308,6 +308,7 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") | |||
308 | .boot_params = 0x00000100, | 308 | .boot_params = 0x00000100, |
309 | .init_machine = rd88f5182_init, | 309 | .init_machine = rd88f5182_init, |
310 | .map_io = orion5x_map_io, | 310 | .map_io = orion5x_map_io, |
311 | .init_early = orion5x_init_early, | ||
311 | .init_irq = orion5x_init_irq, | 312 | .init_irq = orion5x_init_irq, |
312 | .timer = &orion5x_timer, | 313 | .timer = &orion5x_timer, |
313 | MACHINE_END | 314 | MACHINE_END |
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 02ff45f3e2e3..b080c6966d10 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
@@ -126,6 +126,7 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") | |||
126 | .boot_params = 0x00000100, | 126 | .boot_params = 0x00000100, |
127 | .init_machine = rd88f6183ap_ge_init, | 127 | .init_machine = rd88f6183ap_ge_init, |
128 | .map_io = orion5x_map_io, | 128 | .map_io = orion5x_map_io, |
129 | .init_early = orion5x_init_early, | ||
129 | .init_irq = orion5x_init_irq, | 130 | .init_irq = orion5x_init_irq, |
130 | .timer = &orion5x_timer, | 131 | .timer = &orion5x_timer, |
131 | .fixup = tag_fixup_mem32, | 132 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 4403fae5ab0e..5653ee6c71d8 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -361,6 +361,7 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live") | |||
361 | .boot_params = 0x00000100, | 361 | .boot_params = 0x00000100, |
362 | .init_machine = tsp2_init, | 362 | .init_machine = tsp2_init, |
363 | .map_io = orion5x_map_io, | 363 | .map_io = orion5x_map_io, |
364 | .init_early = orion5x_init_early, | ||
364 | .init_irq = orion5x_init_irq, | 365 | .init_irq = orion5x_init_irq, |
365 | .timer = &orion5x_timer, | 366 | .timer = &orion5x_timer, |
366 | .fixup = tag_fixup_mem32, | 367 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 1e196129d763..8bbd27ea6735 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -325,6 +325,7 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209") | |||
325 | .boot_params = 0x00000100, | 325 | .boot_params = 0x00000100, |
326 | .init_machine = qnap_ts209_init, | 326 | .init_machine = qnap_ts209_init, |
327 | .map_io = orion5x_map_io, | 327 | .map_io = orion5x_map_io, |
328 | .init_early = orion5x_init_early, | ||
328 | .init_irq = orion5x_init_irq, | 329 | .init_irq = orion5x_init_irq, |
329 | .timer = &orion5x_timer, | 330 | .timer = &orion5x_timer, |
330 | .fixup = tag_fixup_mem32, | 331 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 428af2046e36..92f393f08fa4 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -314,6 +314,7 @@ MACHINE_START(TS409, "QNAP TS-409") | |||
314 | .boot_params = 0x00000100, | 314 | .boot_params = 0x00000100, |
315 | .init_machine = qnap_ts409_init, | 315 | .init_machine = qnap_ts409_init, |
316 | .map_io = orion5x_map_io, | 316 | .map_io = orion5x_map_io, |
317 | .init_early = orion5x_init_early, | ||
317 | .init_irq = orion5x_init_irq, | 318 | .init_irq = orion5x_init_irq, |
318 | .timer = &orion5x_timer, | 319 | .timer = &orion5x_timer, |
319 | .fixup = tag_fixup_mem32, | 320 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h index 37b3d4875291..151e89e1e676 100644 --- a/arch/arm/mach-orion5x/ts78xx-fpga.h +++ b/arch/arm/mach-orion5x/ts78xx-fpga.h | |||
@@ -1,3 +1,4 @@ | |||
1 | #define TS7800_FPGA_MAGIC 0x00b480 | ||
1 | #define FPGAID(_magic, _rev) ((_magic << 8) + _rev) | 2 | #define FPGAID(_magic, _rev) ((_magic << 8) + _rev) |
2 | 3 | ||
3 | /* | 4 | /* |
@@ -6,11 +7,15 @@ | |||
6 | */ | 7 | */ |
7 | enum fpga_ids { | 8 | enum fpga_ids { |
8 | /* Technologic Systems */ | 9 | /* Technologic Systems */ |
9 | TS7800_REV_1 = FPGAID(0x00b480, 0x01), | 10 | TS7800_REV_1 = FPGAID(TS7800_FPGA_MAGIC, 0x01), |
10 | TS7800_REV_2 = FPGAID(0x00b480, 0x02), | 11 | TS7800_REV_2 = FPGAID(TS7800_FPGA_MAGIC, 0x02), |
11 | TS7800_REV_3 = FPGAID(0x00b480, 0x03), | 12 | TS7800_REV_3 = FPGAID(TS7800_FPGA_MAGIC, 0x03), |
12 | TS7800_REV_4 = FPGAID(0x00b480, 0x04), | 13 | TS7800_REV_4 = FPGAID(TS7800_FPGA_MAGIC, 0x04), |
13 | TS7800_REV_5 = FPGAID(0x00b480, 0x05), | 14 | TS7800_REV_5 = FPGAID(TS7800_FPGA_MAGIC, 0x05), |
15 | TS7800_REV_6 = FPGAID(TS7800_FPGA_MAGIC, 0x06), | ||
16 | TS7800_REV_7 = FPGAID(TS7800_FPGA_MAGIC, 0x07), | ||
17 | TS7800_REV_8 = FPGAID(TS7800_FPGA_MAGIC, 0x08), | ||
18 | TS7800_REV_9 = FPGAID(TS7800_FPGA_MAGIC, 0x09), | ||
14 | 19 | ||
15 | /* Unaffordable & Expensive */ | 20 | /* Unaffordable & Expensive */ |
16 | UAE_DUMMY = FPGAID(0xffffff, 0x01), | 21 | UAE_DUMMY = FPGAID(0xffffff, 0x01), |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index c1c1cd04bdde..8554707d20a9 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -191,6 +191,60 @@ static int ts78xx_ts_nand_dev_ready(struct mtd_info *mtd) | |||
191 | return readb(TS_NAND_CTRL) & 0x20; | 191 | return readb(TS_NAND_CTRL) & 0x20; |
192 | } | 192 | } |
193 | 193 | ||
194 | static void ts78xx_ts_nand_write_buf(struct mtd_info *mtd, | ||
195 | const uint8_t *buf, int len) | ||
196 | { | ||
197 | struct nand_chip *chip = mtd->priv; | ||
198 | void __iomem *io_base = chip->IO_ADDR_W; | ||
199 | unsigned long off = ((unsigned long)buf & 3); | ||
200 | int sz; | ||
201 | |||
202 | if (off) { | ||
203 | sz = min_t(int, 4 - off, len); | ||
204 | writesb(io_base, buf, sz); | ||
205 | buf += sz; | ||
206 | len -= sz; | ||
207 | } | ||
208 | |||
209 | sz = len >> 2; | ||
210 | if (sz) { | ||
211 | u32 *buf32 = (u32 *)buf; | ||
212 | writesl(io_base, buf32, sz); | ||
213 | buf += sz << 2; | ||
214 | len -= sz << 2; | ||
215 | } | ||
216 | |||
217 | if (len) | ||
218 | writesb(io_base, buf, len); | ||
219 | } | ||
220 | |||
221 | static void ts78xx_ts_nand_read_buf(struct mtd_info *mtd, | ||
222 | uint8_t *buf, int len) | ||
223 | { | ||
224 | struct nand_chip *chip = mtd->priv; | ||
225 | void __iomem *io_base = chip->IO_ADDR_R; | ||
226 | unsigned long off = ((unsigned long)buf & 3); | ||
227 | int sz; | ||
228 | |||
229 | if (off) { | ||
230 | sz = min_t(int, 4 - off, len); | ||
231 | readsb(io_base, buf, sz); | ||
232 | buf += sz; | ||
233 | len -= sz; | ||
234 | } | ||
235 | |||
236 | sz = len >> 2; | ||
237 | if (sz) { | ||
238 | u32 *buf32 = (u32 *)buf; | ||
239 | readsl(io_base, buf32, sz); | ||
240 | buf += sz << 2; | ||
241 | len -= sz << 2; | ||
242 | } | ||
243 | |||
244 | if (len) | ||
245 | readsb(io_base, buf, len); | ||
246 | } | ||
247 | |||
194 | const char *ts_nand_part_probes[] = { "cmdlinepart", NULL }; | 248 | const char *ts_nand_part_probes[] = { "cmdlinepart", NULL }; |
195 | 249 | ||
196 | static struct mtd_partition ts78xx_ts_nand_parts[] = { | 250 | static struct mtd_partition ts78xx_ts_nand_parts[] = { |
@@ -233,6 +287,8 @@ static struct platform_nand_data ts78xx_ts_nand_data = { | |||
233 | */ | 287 | */ |
234 | .cmd_ctrl = ts78xx_ts_nand_cmd_ctrl, | 288 | .cmd_ctrl = ts78xx_ts_nand_cmd_ctrl, |
235 | .dev_ready = ts78xx_ts_nand_dev_ready, | 289 | .dev_ready = ts78xx_ts_nand_dev_ready, |
290 | .write_buf = ts78xx_ts_nand_write_buf, | ||
291 | .read_buf = ts78xx_ts_nand_read_buf, | ||
236 | }, | 292 | }, |
237 | }; | 293 | }; |
238 | 294 | ||
@@ -334,14 +390,29 @@ static void ts78xx_fpga_supports(void) | |||
334 | case TS7800_REV_3: | 390 | case TS7800_REV_3: |
335 | case TS7800_REV_4: | 391 | case TS7800_REV_4: |
336 | case TS7800_REV_5: | 392 | case TS7800_REV_5: |
393 | case TS7800_REV_6: | ||
394 | case TS7800_REV_7: | ||
395 | case TS7800_REV_8: | ||
396 | case TS7800_REV_9: | ||
337 | ts78xx_fpga.supports.ts_rtc.present = 1; | 397 | ts78xx_fpga.supports.ts_rtc.present = 1; |
338 | ts78xx_fpga.supports.ts_nand.present = 1; | 398 | ts78xx_fpga.supports.ts_nand.present = 1; |
339 | ts78xx_fpga.supports.ts_rng.present = 1; | 399 | ts78xx_fpga.supports.ts_rng.present = 1; |
340 | break; | 400 | break; |
341 | default: | 401 | default: |
342 | ts78xx_fpga.supports.ts_rtc.present = 0; | 402 | /* enable devices if magic matches */ |
343 | ts78xx_fpga.supports.ts_nand.present = 0; | 403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { |
344 | ts78xx_fpga.supports.ts_rng.present = 0; | 404 | case TS7800_FPGA_MAGIC: |
405 | printk(KERN_WARNING "TS-7800 FPGA: unrecognized revision 0x%.2x\n", | ||
406 | ts78xx_fpga.id & 0xff); | ||
407 | ts78xx_fpga.supports.ts_rtc.present = 1; | ||
408 | ts78xx_fpga.supports.ts_nand.present = 1; | ||
409 | ts78xx_fpga.supports.ts_rng.present = 1; | ||
410 | break; | ||
411 | default: | ||
412 | ts78xx_fpga.supports.ts_rtc.present = 0; | ||
413 | ts78xx_fpga.supports.ts_nand.present = 0; | ||
414 | ts78xx_fpga.supports.ts_rng.present = 0; | ||
415 | } | ||
345 | } | 416 | } |
346 | } | 417 | } |
347 | 418 | ||
@@ -553,6 +624,7 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") | |||
553 | .boot_params = 0x00000100, | 624 | .boot_params = 0x00000100, |
554 | .init_machine = ts78xx_init, | 625 | .init_machine = ts78xx_init, |
555 | .map_io = ts78xx_map_io, | 626 | .map_io = ts78xx_map_io, |
627 | .init_early = orion5x_init_early, | ||
556 | .init_irq = orion5x_init_irq, | 628 | .init_irq = orion5x_init_irq, |
557 | .timer = &orion5x_timer, | 629 | .timer = &orion5x_timer, |
558 | MACHINE_END | 630 | MACHINE_END |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 7994d6ec08a8..4e5216be0745 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -175,6 +175,7 @@ MACHINE_START(WNR854T, "Netgear WNR854T") | |||
175 | .boot_params = 0x00000100, | 175 | .boot_params = 0x00000100, |
176 | .init_machine = wnr854t_init, | 176 | .init_machine = wnr854t_init, |
177 | .map_io = orion5x_map_io, | 177 | .map_io = orion5x_map_io, |
178 | .init_early = orion5x_init_early, | ||
178 | .init_irq = orion5x_init_irq, | 179 | .init_irq = orion5x_init_irq, |
179 | .timer = &orion5x_timer, | 180 | .timer = &orion5x_timer, |
180 | .fixup = tag_fixup_mem32, | 181 | .fixup = tag_fixup_mem32, |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index a5989b7eb53e..fab79d09cc5c 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -263,6 +263,7 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2") | |||
263 | .boot_params = 0x00000100, | 263 | .boot_params = 0x00000100, |
264 | .init_machine = wrt350n_v2_init, | 264 | .init_machine = wrt350n_v2_init, |
265 | .map_io = orion5x_map_io, | 265 | .map_io = orion5x_map_io, |
266 | .init_early = orion5x_init_early, | ||
266 | .init_irq = orion5x_init_irq, | 267 | .init_irq = orion5x_init_irq, |
267 | .timer = &orion5x_timer, | 268 | .timer = &orion5x_timer, |
268 | .fixup = tag_fixup_mem32, | 269 | .fixup = tag_fixup_mem32, |