diff options
Diffstat (limited to 'arch/arm/mach-omap1')
38 files changed, 413 insertions, 270 deletions
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index cd169c386161..f0e69cbc5baa 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -3,7 +3,8 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o | 6 | obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \ |
7 | serial.o devices.o dma.o | ||
7 | obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o | 8 | obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o |
8 | 9 | ||
9 | ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) | 10 | ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 8b5800acf726..e067f221f0f9 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -30,13 +30,13 @@ | |||
30 | #include <mach/tc.h> | 30 | #include <mach/tc.h> |
31 | #include <mach/mux.h> | 31 | #include <mach/mux.h> |
32 | #include <mach/flash.h> | 32 | #include <mach/flash.h> |
33 | #include <../plat-omap/fpga.h> | ||
34 | #include <linux/platform_data/keypad-omap.h> | 33 | #include <linux/platform_data/keypad-omap.h> |
35 | 34 | ||
36 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
37 | 36 | ||
38 | #include "iomap.h" | 37 | #include "iomap.h" |
39 | #include "common.h" | 38 | #include "common.h" |
39 | #include "fpga.h" | ||
40 | 40 | ||
41 | /* fsample is pretty close to p2-sample */ | 41 | /* fsample is pretty close to p2-sample */ |
42 | 42 | ||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 9134b646f01b..dcf364d1a8b1 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
40 | 40 | ||
41 | #include <mach/mux.h> | 41 | #include <mach/mux.h> |
42 | #include <plat-omap/dma-omap.h> | 42 | #include <linux/omap-dma.h> |
43 | #include <mach/tc.h> | 43 | #include <mach/tc.h> |
44 | #include <mach/irda.h> | 44 | #include <mach/irda.h> |
45 | #include <linux/platform_data/keypad-omap.h> | 45 | #include <linux/platform_data/keypad-omap.h> |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index bf213d1d8075..b3fcdedb44ca 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <mach/mux.h> | 43 | #include <mach/mux.h> |
44 | #include <mach/tc.h> | 44 | #include <mach/tc.h> |
45 | #include <linux/platform_data/keypad-omap.h> | 45 | #include <linux/platform_data/keypad-omap.h> |
46 | #include <plat-omap/dma-omap.h> | 46 | #include <linux/omap-dma.h> |
47 | #include <mach/flash.h> | 47 | #include <mach/flash.h> |
48 | 48 | ||
49 | #include <mach/hardware.h> | 49 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index c66334f22471..f8033fab0f82 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <mach/mux.h> | 34 | #include <mach/mux.h> |
35 | #include <mach/flash.h> | 35 | #include <mach/flash.h> |
36 | #include <../plat-omap/fpga.h> | ||
37 | #include <mach/tc.h> | 36 | #include <mach/tc.h> |
38 | #include <linux/platform_data/keypad-omap.h> | 37 | #include <linux/platform_data/keypad-omap.h> |
39 | 38 | ||
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 584b6fab894b..c33dceb46607 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <mach/flash.h> | 37 | #include <mach/flash.h> |
38 | #include <mach/mux.h> | 38 | #include <mach/mux.h> |
39 | #include <mach/tc.h> | 39 | #include <mach/tc.h> |
40 | #include <plat-omap/dma-omap.h> | 40 | #include <linux/omap-dma.h> |
41 | #include <mach/irda.h> | 41 | #include <mach/irda.h> |
42 | #include <linux/platform_data/keypad-omap.h> | 42 | #include <linux/platform_data/keypad-omap.h> |
43 | 43 | ||
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index fbc986bfe69e..2948b0ee4be8 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #include <mach/flash.h> | 37 | #include <mach/flash.h> |
38 | #include <mach/mux.h> | 38 | #include <mach/mux.h> |
39 | #include <plat-omap/dma-omap.h> | 39 | #include <linux/omap-dma.h> |
40 | #include <mach/tc.h> | 40 | #include <mach/tc.h> |
41 | #include <mach/irda.h> | 41 | #include <mach/irda.h> |
42 | #include <linux/platform_data/keypad-omap.h> | 42 | #include <linux/platform_data/keypad-omap.h> |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 60d917a93763..7a05895c0be3 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #include <mach/flash.h> | 39 | #include <mach/flash.h> |
40 | #include <mach/mux.h> | 40 | #include <mach/mux.h> |
41 | #include <plat-omap/dma-omap.h> | 41 | #include <linux/omap-dma.h> |
42 | #include <mach/tc.h> | 42 | #include <mach/tc.h> |
43 | #include <mach/irda.h> | 43 | #include <mach/irda.h> |
44 | #include <linux/platform_data/keypad-omap.h> | 44 | #include <linux/platform_data/keypad-omap.h> |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 030bd48727be..9a7e483ed6fd 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -30,13 +30,13 @@ | |||
30 | 30 | ||
31 | #include <mach/tc.h> | 31 | #include <mach/tc.h> |
32 | #include <mach/mux.h> | 32 | #include <mach/mux.h> |
33 | #include <../plat-omap/fpga.h> | ||
34 | #include <mach/flash.h> | 33 | #include <mach/flash.h> |
35 | 34 | ||
36 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
37 | 36 | ||
38 | #include "iomap.h" | 37 | #include "iomap.h" |
39 | #include "common.h" | 38 | #include "common.h" |
39 | #include "fpga.h" | ||
40 | 40 | ||
41 | static const unsigned int p2_keymap[] = { | 41 | static const unsigned int p2_keymap[] = { |
42 | KEY(0, 0, KEY_UP), | 42 | KEY(0, 0, KEY_UP), |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 1ebc7e08d6e5..20ed52ae1714 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #include <mach/flash.h> | 37 | #include <mach/flash.h> |
38 | #include <mach/mux.h> | 38 | #include <mach/mux.h> |
39 | #include <plat-omap/dma-omap.h> | 39 | #include <linux/omap-dma.h> |
40 | #include <mach/irda.h> | 40 | #include <mach/irda.h> |
41 | #include <mach/tc.h> | 41 | #include <mach/tc.h> |
42 | #include <mach/board-sx1.h> | 42 | #include <mach/board-sx1.h> |
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 931f3f6d396b..4f5fd4a084c0 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -24,12 +24,11 @@ | |||
24 | 24 | ||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | 26 | ||
27 | #include "../plat-omap/sram.h" | ||
28 | |||
29 | #include "soc.h" | 27 | #include "soc.h" |
30 | #include "iomap.h" | 28 | #include "iomap.h" |
31 | #include "clock.h" | 29 | #include "clock.h" |
32 | #include "opp.h" | 30 | #include "opp.h" |
31 | #include "sram.h" | ||
33 | 32 | ||
34 | __u32 arm_idlect1_mask; | 33 | __u32 arm_idlect1_mask; |
35 | struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p; | 34 | struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p; |
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 28aea55a412e..cb7c6ae2e3fc 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -27,10 +27,9 @@ | |||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/usb.h> /* for OTG_BASE */ | 28 | #include <mach/usb.h> /* for OTG_BASE */ |
29 | 29 | ||
30 | #include "../plat-omap/sram.h" | ||
31 | |||
32 | #include "iomap.h" | 30 | #include "iomap.h" |
33 | #include "clock.h" | 31 | #include "clock.h" |
32 | #include "sram.h" | ||
34 | 33 | ||
35 | /* Some ARM_IDLECT1 bit shifts - used in struct arm_idlect1_clk */ | 34 | /* Some ARM_IDLECT1 bit shifts - used in struct arm_idlect1_clk */ |
36 | #define IDL_CLKOUT_ARM_SHIFT 12 | 35 | #define IDL_CLKOUT_ARM_SHIFT 12 |
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index ecd0bb664dad..b53e0854422f 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h | |||
@@ -26,11 +26,10 @@ | |||
26 | #ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H | 26 | #ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H |
27 | #define __ARCH_ARM_MACH_OMAP1_COMMON_H | 27 | #define __ARCH_ARM_MACH_OMAP1_COMMON_H |
28 | 28 | ||
29 | #include "../plat-omap/common.h" | ||
30 | #include <linux/mtd/mtd.h> | 29 | #include <linux/mtd/mtd.h> |
31 | #include <linux/i2c-omap.h> | 30 | #include <linux/i2c-omap.h> |
32 | 31 | ||
33 | #include "../plat-omap/i2c.h" | 32 | #include <plat/i2c.h> |
34 | 33 | ||
35 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 34 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
36 | void omap7xx_map_io(void); | 35 | void omap7xx_map_io(void); |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 745031870ce4..0af635205e8a 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -28,12 +28,11 @@ | |||
28 | #include <mach/camera.h> | 28 | #include <mach/camera.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | 30 | ||
31 | #include "../plat-omap/sram.h" | ||
32 | |||
33 | #include "common.h" | 31 | #include "common.h" |
34 | #include "clock.h" | 32 | #include "clock.h" |
35 | #include "dma.h" | 33 | #include "dma.h" |
36 | #include "mmc.h" | 34 | #include "mmc.h" |
35 | #include "sram.h" | ||
37 | 36 | ||
38 | #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) | 37 | #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) |
39 | 38 | ||
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index 71305c15fbd5..e190611e4b46 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | 27 | ||
28 | #include <plat-omap/dma-omap.h> | 28 | #include <linux/omap-dma.h> |
29 | #include <mach/tc.h> | 29 | #include <mach/tc.h> |
30 | 30 | ||
31 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
@@ -321,6 +321,9 @@ static int __init omap1_system_dma_init(void) | |||
321 | d->dev_caps = ENABLE_1510_MODE; | 321 | d->dev_caps = ENABLE_1510_MODE; |
322 | enable_1510_mode = d->dev_caps & ENABLE_1510_MODE; | 322 | enable_1510_mode = d->dev_caps & ENABLE_1510_MODE; |
323 | 323 | ||
324 | if (cpu_is_omap16xx()) | ||
325 | d->dev_caps = ENABLE_16XX_MODE; | ||
326 | |||
324 | d->dev_caps |= SRC_PORT; | 327 | d->dev_caps |= SRC_PORT; |
325 | d->dev_caps |= DST_PORT; | 328 | d->dev_caps |= DST_PORT; |
326 | d->dev_caps |= SRC_INDEX; | 329 | d->dev_caps |= SRC_INDEX; |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index d940fac9a9ed..8bd71b2d0967 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -27,12 +27,11 @@ | |||
27 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
28 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
29 | 29 | ||
30 | #include <../plat-omap/fpga.h> | ||
31 | |||
32 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
33 | 31 | ||
34 | #include "iomap.h" | 32 | #include "iomap.h" |
35 | #include "common.h" | 33 | #include "common.h" |
34 | #include "fpga.h" | ||
36 | 35 | ||
37 | static void fpga_mask_irq(struct irq_data *d) | 36 | static void fpga_mask_irq(struct irq_data *d) |
38 | { | 37 | { |
diff --git a/arch/arm/mach-omap1/fpga.h b/arch/arm/mach-omap1/fpga.h new file mode 100644 index 000000000000..4b4307a80e48 --- /dev/null +++ b/arch/arm/mach-omap1/fpga.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Interrupt handler for OMAP-1510 FPGA | ||
3 | * | ||
4 | * Copyright (C) 2001 RidgeRun, Inc. | ||
5 | * Author: Greg Lonnon <glonnon@ridgerun.com> | ||
6 | * | ||
7 | * Copyright (C) 2002 MontaVista Software, Inc. | ||
8 | * | ||
9 | * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6 | ||
10 | * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_OMAP_FPGA_H | ||
18 | #define __ASM_ARCH_OMAP_FPGA_H | ||
19 | |||
20 | /* | ||
21 | * --------------------------------------------------------------------------- | ||
22 | * H2/P2 Debug board FPGA | ||
23 | * --------------------------------------------------------------------------- | ||
24 | */ | ||
25 | /* maps in the FPGA registers and the ETHR registers */ | ||
26 | #define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */ | ||
27 | #define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */ | ||
28 | #define H2P2_DBG_FPGA_START 0x04000000 /* PA */ | ||
29 | |||
30 | #define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300) | ||
31 | #define H2P2_DBG_FPGA_FPGA_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */ | ||
32 | #define H2P2_DBG_FPGA_BOARD_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */ | ||
33 | #define H2P2_DBG_FPGA_GPIO IOMEM(H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */ | ||
34 | #define H2P2_DBG_FPGA_LEDS IOMEM(H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */ | ||
35 | #define H2P2_DBG_FPGA_MISC_INPUTS IOMEM(H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */ | ||
36 | #define H2P2_DBG_FPGA_LAN_STATUS IOMEM(H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */ | ||
37 | #define H2P2_DBG_FPGA_LAN_RESET IOMEM(H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */ | ||
38 | |||
39 | /* LEDs definition on debug board (16 LEDs, all physically green) */ | ||
40 | #define H2P2_DBG_FPGA_LED_GREEN (1 << 15) | ||
41 | #define H2P2_DBG_FPGA_LED_AMBER (1 << 14) | ||
42 | #define H2P2_DBG_FPGA_LED_RED (1 << 13) | ||
43 | #define H2P2_DBG_FPGA_LED_BLUE (1 << 12) | ||
44 | /* cpu0 load-meter LEDs */ | ||
45 | #define H2P2_DBG_FPGA_LOAD_METER (1 << 0) // A bit of fun on our board ... | ||
46 | #define H2P2_DBG_FPGA_LOAD_METER_SIZE 11 | ||
47 | #define H2P2_DBG_FPGA_LOAD_METER_MASK ((1 << H2P2_DBG_FPGA_LOAD_METER_SIZE) - 1) | ||
48 | |||
49 | #define H2P2_DBG_FPGA_P2_LED_TIMER (1 << 0) | ||
50 | #define H2P2_DBG_FPGA_P2_LED_IDLE (1 << 1) | ||
51 | |||
52 | #endif | ||
diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c index 98e6f39224a4..02b3eb2e201c 100644 --- a/arch/arm/mach-omap1/gpio15xx.c +++ b/arch/arm/mach-omap1/gpio15xx.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/platform_data/gpio-omap.h> | 20 | #include <linux/platform_data/gpio-omap.h> |
21 | 21 | ||
22 | #include <mach/irqs.h> | ||
23 | |||
22 | #define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE | 24 | #define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE |
23 | #define OMAP1510_GPIO_BASE 0xFFFCE000 | 25 | #define OMAP1510_GPIO_BASE 0xFFFCE000 |
24 | 26 | ||
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c index 33f419236b17..b9952a258d82 100644 --- a/arch/arm/mach-omap1/gpio16xx.c +++ b/arch/arm/mach-omap1/gpio16xx.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/platform_data/gpio-omap.h> | 20 | #include <linux/platform_data/gpio-omap.h> |
21 | 21 | ||
22 | #include <mach/irqs.h> | ||
23 | |||
22 | #define OMAP1610_GPIO1_BASE 0xfffbe400 | 24 | #define OMAP1610_GPIO1_BASE 0xfffbe400 |
23 | #define OMAP1610_GPIO2_BASE 0xfffbec00 | 25 | #define OMAP1610_GPIO2_BASE 0xfffbec00 |
24 | #define OMAP1610_GPIO3_BASE 0xfffbb400 | 26 | #define OMAP1610_GPIO3_BASE 0xfffbb400 |
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c index 958ce9acee95..f5819b2b7cbe 100644 --- a/arch/arm/mach-omap1/gpio7xx.c +++ b/arch/arm/mach-omap1/gpio7xx.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/platform_data/gpio-omap.h> | 20 | #include <linux/platform_data/gpio-omap.h> |
21 | 21 | ||
22 | #include <mach/irqs.h> | ||
23 | |||
22 | #define OMAP7XX_GPIO1_BASE 0xfffbc000 | 24 | #define OMAP7XX_GPIO1_BASE 0xfffbc000 |
23 | #define OMAP7XX_GPIO2_BASE 0xfffbc800 | 25 | #define OMAP7XX_GPIO2_BASE 0xfffbc800 |
24 | #define OMAP7XX_GPIO3_BASE 0xfffbd000 | 26 | #define OMAP7XX_GPIO3_BASE 0xfffbd000 |
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index 32bcbb8d6c73..faca808cb3d9 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include "soc.h" | 24 | #include "soc.h" |
25 | 25 | ||
26 | #include "../plat-omap/i2c.h" | 26 | #include <plat/i2c.h> |
27 | 27 | ||
28 | #define OMAP_I2C_SIZE 0x3f | 28 | #define OMAP_I2C_SIZE 0x3f |
29 | #define OMAP1_I2C_BASE 0xfffb3800 | 29 | #define OMAP1_I2C_BASE 0xfffb3800 |
@@ -54,6 +54,9 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata, | |||
54 | struct platform_device *pdev; | 54 | struct platform_device *pdev; |
55 | struct resource *res; | 55 | struct resource *res; |
56 | 56 | ||
57 | if (bus_id > 1) | ||
58 | return -EINVAL; | ||
59 | |||
57 | omap1_i2c_mux_pins(bus_id); | 60 | omap1_i2c_mux_pins(bus_id); |
58 | 61 | ||
59 | pdev = &omap_i2c_devices[bus_id - 1]; | 62 | pdev = &omap_i2c_devices[bus_id - 1]; |
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S index 88f08cab1717..78a8c6c24764 100644 --- a/arch/arm/mach-omap1/include/mach/entry-macro.S +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -13,8 +13,6 @@ | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <mach/irqs.h> | 14 | #include <mach/irqs.h> |
15 | 15 | ||
16 | #include "../../iomap.h" | ||
17 | |||
18 | .macro get_irqnr_preamble, base, tmp | 16 | .macro get_irqnr_preamble, base, tmp |
19 | .endm | 17 | .endm |
20 | 18 | ||
diff --git a/arch/arm/mach-omap1/include/mach/gpio.h b/arch/arm/mach-omap1/include/mach/gpio.h deleted file mode 100644 index ebf86c0f4f46..000000000000 --- a/arch/arm/mach-omap1/include/mach/gpio.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/gpio.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h index dc3237bd72d2..5875a5098d35 100644 --- a/arch/arm/mach-omap1/include/mach/hardware.h +++ b/arch/arm/mach-omap1/include/mach/hardware.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/sizes.h> | 39 | #include <asm/sizes.h> |
40 | #ifndef __ASSEMBLER__ | 40 | #ifndef __ASSEMBLER__ |
41 | #include <asm/types.h> | 41 | #include <asm/types.h> |
42 | #include "../../mach-omap1/soc.h" | 42 | #include <mach/soc.h> |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | 45 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these |
@@ -72,6 +72,9 @@ static inline u32 omap_cs3_phys(void) | |||
72 | 72 | ||
73 | #endif /* ifndef __ASSEMBLER__ */ | 73 | #endif /* ifndef __ASSEMBLER__ */ |
74 | 74 | ||
75 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
76 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
77 | |||
75 | #include <mach/serial.h> | 78 | #include <mach/serial.h> |
76 | 79 | ||
77 | /* | 80 | /* |
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index 351ae4f2c514..3c2530523111 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * because of the strncmp(). | 19 | * because of the strncmp(). |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) | 21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) |
22 | #include "../../mach-omap1/soc.h" | 22 | #include <mach/soc.h> |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * OMAP-1510 Local Bus address offset | 25 | * OMAP-1510 Local Bus address offset |
diff --git a/arch/arm/mach-omap1/include/mach/soc.h b/arch/arm/mach-omap1/include/mach/soc.h new file mode 100644 index 000000000000..6cf9c1cc2bef --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/soc.h | |||
@@ -0,0 +1,229 @@ | |||
1 | /* | ||
2 | * OMAP cpu type detection | ||
3 | * | ||
4 | * Copyright (C) 2004, 2008 Nokia Corporation | ||
5 | * | ||
6 | * Copyright (C) 2009-11 Texas Instruments. | ||
7 | * | ||
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | ||
9 | * | ||
10 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | #ifndef __ASM_ARCH_OMAP_CPU_H | ||
29 | #define __ASM_ARCH_OMAP_CPU_H | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #include <linux/bitops.h> | ||
34 | |||
35 | /* | ||
36 | * Test if multicore OMAP support is needed | ||
37 | */ | ||
38 | #undef MULTI_OMAP1 | ||
39 | #undef OMAP_NAME | ||
40 | |||
41 | #ifdef CONFIG_ARCH_OMAP730 | ||
42 | # ifdef OMAP_NAME | ||
43 | # undef MULTI_OMAP1 | ||
44 | # define MULTI_OMAP1 | ||
45 | # else | ||
46 | # define OMAP_NAME omap730 | ||
47 | # endif | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARCH_OMAP850 | ||
50 | # ifdef OMAP_NAME | ||
51 | # undef MULTI_OMAP1 | ||
52 | # define MULTI_OMAP1 | ||
53 | # else | ||
54 | # define OMAP_NAME omap850 | ||
55 | # endif | ||
56 | #endif | ||
57 | #ifdef CONFIG_ARCH_OMAP15XX | ||
58 | # ifdef OMAP_NAME | ||
59 | # undef MULTI_OMAP1 | ||
60 | # define MULTI_OMAP1 | ||
61 | # else | ||
62 | # define OMAP_NAME omap1510 | ||
63 | # endif | ||
64 | #endif | ||
65 | #ifdef CONFIG_ARCH_OMAP16XX | ||
66 | # ifdef OMAP_NAME | ||
67 | # undef MULTI_OMAP1 | ||
68 | # define MULTI_OMAP1 | ||
69 | # else | ||
70 | # define OMAP_NAME omap16xx | ||
71 | # endif | ||
72 | #endif | ||
73 | |||
74 | /* | ||
75 | * omap_rev bits: | ||
76 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
77 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
78 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
79 | */ | ||
80 | unsigned int omap_rev(void); | ||
81 | |||
82 | /* | ||
83 | * Get the CPU revision for OMAP devices | ||
84 | */ | ||
85 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
86 | |||
87 | /* | ||
88 | * Macros to group OMAP into cpu classes. | ||
89 | * These can be used in most places. | ||
90 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | ||
91 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 | ||
92 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
93 | */ | ||
94 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
95 | |||
96 | #define IS_OMAP_CLASS(class, id) \ | ||
97 | static inline int is_omap ##class (void) \ | ||
98 | { \ | ||
99 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
100 | } | ||
101 | |||
102 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
103 | |||
104 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
105 | static inline int is_omap ##subclass (void) \ | ||
106 | { \ | ||
107 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
108 | } | ||
109 | |||
110 | IS_OMAP_CLASS(7xx, 0x07) | ||
111 | IS_OMAP_CLASS(15xx, 0x15) | ||
112 | IS_OMAP_CLASS(16xx, 0x16) | ||
113 | |||
114 | #define cpu_is_omap7xx() 0 | ||
115 | #define cpu_is_omap15xx() 0 | ||
116 | #define cpu_is_omap16xx() 0 | ||
117 | |||
118 | #if defined(MULTI_OMAP1) | ||
119 | # if defined(CONFIG_ARCH_OMAP730) | ||
120 | # undef cpu_is_omap7xx | ||
121 | # define cpu_is_omap7xx() is_omap7xx() | ||
122 | # endif | ||
123 | # if defined(CONFIG_ARCH_OMAP850) | ||
124 | # undef cpu_is_omap7xx | ||
125 | # define cpu_is_omap7xx() is_omap7xx() | ||
126 | # endif | ||
127 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
128 | # undef cpu_is_omap15xx | ||
129 | # define cpu_is_omap15xx() is_omap15xx() | ||
130 | # endif | ||
131 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
132 | # undef cpu_is_omap16xx | ||
133 | # define cpu_is_omap16xx() is_omap16xx() | ||
134 | # endif | ||
135 | #else | ||
136 | # if defined(CONFIG_ARCH_OMAP730) | ||
137 | # undef cpu_is_omap7xx | ||
138 | # define cpu_is_omap7xx() 1 | ||
139 | # endif | ||
140 | # if defined(CONFIG_ARCH_OMAP850) | ||
141 | # undef cpu_is_omap7xx | ||
142 | # define cpu_is_omap7xx() 1 | ||
143 | # endif | ||
144 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
145 | # undef cpu_is_omap15xx | ||
146 | # define cpu_is_omap15xx() 1 | ||
147 | # endif | ||
148 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
149 | # undef cpu_is_omap16xx | ||
150 | # define cpu_is_omap16xx() 1 | ||
151 | # endif | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * Macros to detect individual cpu types. | ||
156 | * These are only rarely needed. | ||
157 | * cpu_is_omap310(): True for OMAP310 | ||
158 | * cpu_is_omap1510(): True for OMAP1510 | ||
159 | * cpu_is_omap1610(): True for OMAP1610 | ||
160 | * cpu_is_omap1611(): True for OMAP1611 | ||
161 | * cpu_is_omap5912(): True for OMAP5912 | ||
162 | * cpu_is_omap1621(): True for OMAP1621 | ||
163 | * cpu_is_omap1710(): True for OMAP1710 | ||
164 | */ | ||
165 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
166 | |||
167 | #define IS_OMAP_TYPE(type, id) \ | ||
168 | static inline int is_omap ##type (void) \ | ||
169 | { \ | ||
170 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
171 | } | ||
172 | |||
173 | IS_OMAP_TYPE(310, 0x0310) | ||
174 | IS_OMAP_TYPE(1510, 0x1510) | ||
175 | IS_OMAP_TYPE(1610, 0x1610) | ||
176 | IS_OMAP_TYPE(1611, 0x1611) | ||
177 | IS_OMAP_TYPE(5912, 0x1611) | ||
178 | IS_OMAP_TYPE(1621, 0x1621) | ||
179 | IS_OMAP_TYPE(1710, 0x1710) | ||
180 | |||
181 | #define cpu_is_omap310() 0 | ||
182 | #define cpu_is_omap1510() 0 | ||
183 | #define cpu_is_omap1610() 0 | ||
184 | #define cpu_is_omap5912() 0 | ||
185 | #define cpu_is_omap1611() 0 | ||
186 | #define cpu_is_omap1621() 0 | ||
187 | #define cpu_is_omap1710() 0 | ||
188 | |||
189 | /* These are needed to compile common code */ | ||
190 | #ifdef CONFIG_ARCH_OMAP1 | ||
191 | #define cpu_is_omap242x() 0 | ||
192 | #define cpu_is_omap2430() 0 | ||
193 | #define cpu_is_omap243x() 0 | ||
194 | #define cpu_is_omap24xx() 0 | ||
195 | #define cpu_is_omap34xx() 0 | ||
196 | #define cpu_is_omap44xx() 0 | ||
197 | #define soc_is_omap54xx() 0 | ||
198 | #define soc_is_am33xx() 0 | ||
199 | #define cpu_class_is_omap1() 1 | ||
200 | #define cpu_class_is_omap2() 0 | ||
201 | #endif | ||
202 | |||
203 | /* | ||
204 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | ||
205 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. | ||
206 | */ | ||
207 | |||
208 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
209 | # undef cpu_is_omap310 | ||
210 | # undef cpu_is_omap1510 | ||
211 | # define cpu_is_omap310() is_omap310() | ||
212 | # define cpu_is_omap1510() is_omap1510() | ||
213 | #endif | ||
214 | |||
215 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
216 | # undef cpu_is_omap1610 | ||
217 | # undef cpu_is_omap1611 | ||
218 | # undef cpu_is_omap5912 | ||
219 | # undef cpu_is_omap1621 | ||
220 | # undef cpu_is_omap1710 | ||
221 | # define cpu_is_omap1610() is_omap1610() | ||
222 | # define cpu_is_omap1611() is_omap1611() | ||
223 | # define cpu_is_omap5912() is_omap5912() | ||
224 | # define cpu_is_omap1621() is_omap1621() | ||
225 | # define cpu_is_omap1710() is_omap1710() | ||
226 | #endif | ||
227 | |||
228 | #endif /* __ASSEMBLY__ */ | ||
229 | #endif | ||
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 44389d7cd255..499b8accb83d 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include <mach/mux.h> | 19 | #include <mach/mux.h> |
20 | #include <mach/tc.h> | 20 | #include <mach/tc.h> |
21 | #include <plat-omap/dma-omap.h> | 21 | #include <linux/omap-dma.h> |
22 | 22 | ||
23 | #include "iomap.h" | 23 | #include "iomap.h" |
24 | #include "common.h" | 24 | #include "common.h" |
@@ -134,7 +134,6 @@ void __init omap1_init_early(void) | |||
134 | */ | 134 | */ |
135 | omap1_clk_init(); | 135 | omap1_clk_init(); |
136 | omap1_mux_init(); | 136 | omap1_mux_init(); |
137 | omap_init_consistent_dma_size(); | ||
138 | } | 137 | } |
139 | 138 | ||
140 | void __init omap1_init_late(void) | 139 | void __init omap1_init_late(void) |
diff --git a/arch/arm/mach-omap1/iomap.h b/arch/arm/mach-omap1/iomap.h index 330c4716b028..f4e2d7a21365 100644 --- a/arch/arm/mach-omap1/iomap.h +++ b/arch/arm/mach-omap1/iomap.h | |||
@@ -22,9 +22,6 @@ | |||
22 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
26 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
27 | |||
28 | /* | 25 | /* |
29 | * ---------------------------------------------------------------------------- | 26 | * ---------------------------------------------------------------------------- |
30 | * Omap1 specific IO mapping | 27 | * Omap1 specific IO mapping |
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index 7ed8c1857d56..77924be37d41 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | #include <plat-omap/dma-omap.h> | 30 | #include <linux/omap-dma.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/lcdc.h> | 33 | #include <mach/lcdc.h> |
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index c6d8fdf92e9c..b0d4723c9a90 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | 21 | ||
22 | #include <plat-omap/dma-omap.h> | 22 | #include <linux/omap-dma.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include "soc.h" | 24 | #include "soc.h" |
25 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 25 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index b2c2328d7c18..7a7690ab6cb8 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/io.h> | 44 | #include <linux/io.h> |
45 | #include <linux/atomic.h> | 45 | #include <linux/atomic.h> |
46 | 46 | ||
47 | #include <asm/fncpy.h> | ||
47 | #include <asm/system_misc.h> | 48 | #include <asm/system_misc.h> |
48 | #include <asm/irq.h> | 49 | #include <asm/irq.h> |
49 | #include <asm/mach/time.h> | 50 | #include <asm/mach/time.h> |
@@ -51,16 +52,15 @@ | |||
51 | 52 | ||
52 | #include <mach/tc.h> | 53 | #include <mach/tc.h> |
53 | #include <mach/mux.h> | 54 | #include <mach/mux.h> |
54 | #include <plat-omap/dma-omap.h> | 55 | #include <linux/omap-dma.h> |
55 | #include <plat/dmtimer.h> | 56 | #include <plat/dmtimer.h> |
56 | 57 | ||
57 | #include <mach/irqs.h> | 58 | #include <mach/irqs.h> |
58 | 59 | ||
59 | #include "../plat-omap/sram.h" | ||
60 | |||
61 | #include "iomap.h" | 60 | #include "iomap.h" |
62 | #include "clock.h" | 61 | #include "clock.h" |
63 | #include "pm.h" | 62 | #include "pm.h" |
63 | #include "sram.h" | ||
64 | 64 | ||
65 | static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; | 65 | static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; |
66 | static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE]; | 66 | static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE]; |
diff --git a/arch/arm/mach-omap1/sleep.S b/arch/arm/mach-omap1/sleep.S index 0e628743bd03..a908c51839a4 100644 --- a/arch/arm/mach-omap1/sleep.S +++ b/arch/arm/mach-omap1/sleep.S | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #include <asm/assembler.h> | 37 | #include <asm/assembler.h> |
38 | 38 | ||
39 | #include <mach/hardware.h> | ||
40 | |||
39 | #include "iomap.h" | 41 | #include "iomap.h" |
40 | #include "pm.h" | 42 | #include "pm.h" |
41 | 43 | ||
diff --git a/arch/arm/mach-omap1/soc.h b/arch/arm/mach-omap1/soc.h index 6cf9c1cc2bef..69daf0187b1d 100644 --- a/arch/arm/mach-omap1/soc.h +++ b/arch/arm/mach-omap1/soc.h | |||
@@ -1,229 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP cpu type detection | 2 | * We can move mach/soc.h here once the drivers are fixed |
3 | * | ||
4 | * Copyright (C) 2004, 2008 Nokia Corporation | ||
5 | * | ||
6 | * Copyright (C) 2009-11 Texas Instruments. | ||
7 | * | ||
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | ||
9 | * | ||
10 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | */ | 3 | */ |
27 | 4 | #include <mach/soc.h> | |
28 | #ifndef __ASM_ARCH_OMAP_CPU_H | ||
29 | #define __ASM_ARCH_OMAP_CPU_H | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #include <linux/bitops.h> | ||
34 | |||
35 | /* | ||
36 | * Test if multicore OMAP support is needed | ||
37 | */ | ||
38 | #undef MULTI_OMAP1 | ||
39 | #undef OMAP_NAME | ||
40 | |||
41 | #ifdef CONFIG_ARCH_OMAP730 | ||
42 | # ifdef OMAP_NAME | ||
43 | # undef MULTI_OMAP1 | ||
44 | # define MULTI_OMAP1 | ||
45 | # else | ||
46 | # define OMAP_NAME omap730 | ||
47 | # endif | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARCH_OMAP850 | ||
50 | # ifdef OMAP_NAME | ||
51 | # undef MULTI_OMAP1 | ||
52 | # define MULTI_OMAP1 | ||
53 | # else | ||
54 | # define OMAP_NAME omap850 | ||
55 | # endif | ||
56 | #endif | ||
57 | #ifdef CONFIG_ARCH_OMAP15XX | ||
58 | # ifdef OMAP_NAME | ||
59 | # undef MULTI_OMAP1 | ||
60 | # define MULTI_OMAP1 | ||
61 | # else | ||
62 | # define OMAP_NAME omap1510 | ||
63 | # endif | ||
64 | #endif | ||
65 | #ifdef CONFIG_ARCH_OMAP16XX | ||
66 | # ifdef OMAP_NAME | ||
67 | # undef MULTI_OMAP1 | ||
68 | # define MULTI_OMAP1 | ||
69 | # else | ||
70 | # define OMAP_NAME omap16xx | ||
71 | # endif | ||
72 | #endif | ||
73 | |||
74 | /* | ||
75 | * omap_rev bits: | ||
76 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
77 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
78 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
79 | */ | ||
80 | unsigned int omap_rev(void); | ||
81 | |||
82 | /* | ||
83 | * Get the CPU revision for OMAP devices | ||
84 | */ | ||
85 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
86 | |||
87 | /* | ||
88 | * Macros to group OMAP into cpu classes. | ||
89 | * These can be used in most places. | ||
90 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | ||
91 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 | ||
92 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
93 | */ | ||
94 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
95 | |||
96 | #define IS_OMAP_CLASS(class, id) \ | ||
97 | static inline int is_omap ##class (void) \ | ||
98 | { \ | ||
99 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
100 | } | ||
101 | |||
102 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
103 | |||
104 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
105 | static inline int is_omap ##subclass (void) \ | ||
106 | { \ | ||
107 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
108 | } | ||
109 | |||
110 | IS_OMAP_CLASS(7xx, 0x07) | ||
111 | IS_OMAP_CLASS(15xx, 0x15) | ||
112 | IS_OMAP_CLASS(16xx, 0x16) | ||
113 | |||
114 | #define cpu_is_omap7xx() 0 | ||
115 | #define cpu_is_omap15xx() 0 | ||
116 | #define cpu_is_omap16xx() 0 | ||
117 | |||
118 | #if defined(MULTI_OMAP1) | ||
119 | # if defined(CONFIG_ARCH_OMAP730) | ||
120 | # undef cpu_is_omap7xx | ||
121 | # define cpu_is_omap7xx() is_omap7xx() | ||
122 | # endif | ||
123 | # if defined(CONFIG_ARCH_OMAP850) | ||
124 | # undef cpu_is_omap7xx | ||
125 | # define cpu_is_omap7xx() is_omap7xx() | ||
126 | # endif | ||
127 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
128 | # undef cpu_is_omap15xx | ||
129 | # define cpu_is_omap15xx() is_omap15xx() | ||
130 | # endif | ||
131 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
132 | # undef cpu_is_omap16xx | ||
133 | # define cpu_is_omap16xx() is_omap16xx() | ||
134 | # endif | ||
135 | #else | ||
136 | # if defined(CONFIG_ARCH_OMAP730) | ||
137 | # undef cpu_is_omap7xx | ||
138 | # define cpu_is_omap7xx() 1 | ||
139 | # endif | ||
140 | # if defined(CONFIG_ARCH_OMAP850) | ||
141 | # undef cpu_is_omap7xx | ||
142 | # define cpu_is_omap7xx() 1 | ||
143 | # endif | ||
144 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
145 | # undef cpu_is_omap15xx | ||
146 | # define cpu_is_omap15xx() 1 | ||
147 | # endif | ||
148 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
149 | # undef cpu_is_omap16xx | ||
150 | # define cpu_is_omap16xx() 1 | ||
151 | # endif | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * Macros to detect individual cpu types. | ||
156 | * These are only rarely needed. | ||
157 | * cpu_is_omap310(): True for OMAP310 | ||
158 | * cpu_is_omap1510(): True for OMAP1510 | ||
159 | * cpu_is_omap1610(): True for OMAP1610 | ||
160 | * cpu_is_omap1611(): True for OMAP1611 | ||
161 | * cpu_is_omap5912(): True for OMAP5912 | ||
162 | * cpu_is_omap1621(): True for OMAP1621 | ||
163 | * cpu_is_omap1710(): True for OMAP1710 | ||
164 | */ | ||
165 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
166 | |||
167 | #define IS_OMAP_TYPE(type, id) \ | ||
168 | static inline int is_omap ##type (void) \ | ||
169 | { \ | ||
170 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
171 | } | ||
172 | |||
173 | IS_OMAP_TYPE(310, 0x0310) | ||
174 | IS_OMAP_TYPE(1510, 0x1510) | ||
175 | IS_OMAP_TYPE(1610, 0x1610) | ||
176 | IS_OMAP_TYPE(1611, 0x1611) | ||
177 | IS_OMAP_TYPE(5912, 0x1611) | ||
178 | IS_OMAP_TYPE(1621, 0x1621) | ||
179 | IS_OMAP_TYPE(1710, 0x1710) | ||
180 | |||
181 | #define cpu_is_omap310() 0 | ||
182 | #define cpu_is_omap1510() 0 | ||
183 | #define cpu_is_omap1610() 0 | ||
184 | #define cpu_is_omap5912() 0 | ||
185 | #define cpu_is_omap1611() 0 | ||
186 | #define cpu_is_omap1621() 0 | ||
187 | #define cpu_is_omap1710() 0 | ||
188 | |||
189 | /* These are needed to compile common code */ | ||
190 | #ifdef CONFIG_ARCH_OMAP1 | ||
191 | #define cpu_is_omap242x() 0 | ||
192 | #define cpu_is_omap2430() 0 | ||
193 | #define cpu_is_omap243x() 0 | ||
194 | #define cpu_is_omap24xx() 0 | ||
195 | #define cpu_is_omap34xx() 0 | ||
196 | #define cpu_is_omap44xx() 0 | ||
197 | #define soc_is_omap54xx() 0 | ||
198 | #define soc_is_am33xx() 0 | ||
199 | #define cpu_class_is_omap1() 1 | ||
200 | #define cpu_class_is_omap2() 0 | ||
201 | #endif | ||
202 | |||
203 | /* | ||
204 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | ||
205 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. | ||
206 | */ | ||
207 | |||
208 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
209 | # undef cpu_is_omap310 | ||
210 | # undef cpu_is_omap1510 | ||
211 | # define cpu_is_omap310() is_omap310() | ||
212 | # define cpu_is_omap1510() is_omap1510() | ||
213 | #endif | ||
214 | |||
215 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
216 | # undef cpu_is_omap1610 | ||
217 | # undef cpu_is_omap1611 | ||
218 | # undef cpu_is_omap5912 | ||
219 | # undef cpu_is_omap1621 | ||
220 | # undef cpu_is_omap1710 | ||
221 | # define cpu_is_omap1610() is_omap1610() | ||
222 | # define cpu_is_omap1611() is_omap1611() | ||
223 | # define cpu_is_omap5912() is_omap5912() | ||
224 | # define cpu_is_omap1621() is_omap1621() | ||
225 | # define cpu_is_omap1710() is_omap1710() | ||
226 | #endif | ||
227 | |||
228 | #endif /* __ASSEMBLY__ */ | ||
229 | #endif | ||
diff --git a/arch/arm/mach-omap1/sram-init.c b/arch/arm/mach-omap1/sram-init.c new file mode 100644 index 000000000000..6431b0f862ce --- /dev/null +++ b/arch/arm/mach-omap1/sram-init.c | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * OMAP SRAM detection and management | ||
3 | * | ||
4 | * Copyright (C) 2005 Nokia Corporation | ||
5 | * Written by Tony Lindgren <tony@atomide.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/io.h> | ||
16 | |||
17 | #include <asm/fncpy.h> | ||
18 | #include <asm/tlb.h> | ||
19 | #include <asm/cacheflush.h> | ||
20 | |||
21 | #include <asm/mach/map.h> | ||
22 | |||
23 | #include "soc.h" | ||
24 | #include "sram.h" | ||
25 | |||
26 | #define OMAP1_SRAM_PA 0x20000000 | ||
27 | #define SRAM_BOOTLOADER_SZ 0x80 | ||
28 | |||
29 | /* | ||
30 | * The amount of SRAM depends on the core type. | ||
31 | * Note that we cannot try to test for SRAM here because writes | ||
32 | * to secure SRAM will hang the system. Also the SRAM is not | ||
33 | * yet mapped at this point. | ||
34 | */ | ||
35 | static void __init omap_detect_and_map_sram(void) | ||
36 | { | ||
37 | unsigned long omap_sram_skip = SRAM_BOOTLOADER_SZ; | ||
38 | unsigned long omap_sram_start = OMAP1_SRAM_PA; | ||
39 | unsigned long omap_sram_size; | ||
40 | |||
41 | if (cpu_is_omap7xx()) | ||
42 | omap_sram_size = 0x32000; /* 200K */ | ||
43 | else if (cpu_is_omap15xx()) | ||
44 | omap_sram_size = 0x30000; /* 192K */ | ||
45 | else if (cpu_is_omap1610() || cpu_is_omap1611() || | ||
46 | cpu_is_omap1621() || cpu_is_omap1710()) | ||
47 | omap_sram_size = 0x4000; /* 16K */ | ||
48 | else { | ||
49 | pr_err("Could not detect SRAM size\n"); | ||
50 | omap_sram_size = 0x4000; | ||
51 | } | ||
52 | |||
53 | omap_map_sram(omap_sram_start, omap_sram_size, | ||
54 | omap_sram_skip, 1); | ||
55 | } | ||
56 | |||
57 | static void (*_omap_sram_reprogram_clock)(u32 dpllctl, u32 ckctl); | ||
58 | |||
59 | void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl) | ||
60 | { | ||
61 | BUG_ON(!_omap_sram_reprogram_clock); | ||
62 | /* On 730, bit 13 must always be 1 */ | ||
63 | if (cpu_is_omap7xx()) | ||
64 | ckctl |= 0x2000; | ||
65 | _omap_sram_reprogram_clock(dpllctl, ckctl); | ||
66 | } | ||
67 | |||
68 | int __init omap_sram_init(void) | ||
69 | { | ||
70 | omap_detect_and_map_sram(); | ||
71 | _omap_sram_reprogram_clock = | ||
72 | omap_sram_push(omap1_sram_reprogram_clock, | ||
73 | omap1_sram_reprogram_clock_sz); | ||
74 | |||
75 | return 0; | ||
76 | } | ||
diff --git a/arch/arm/mach-omap1/sram.h b/arch/arm/mach-omap1/sram.h new file mode 100644 index 000000000000..d5a6c8362301 --- /dev/null +++ b/arch/arm/mach-omap1/sram.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #include <plat/sram.h> | ||
2 | |||
3 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); | ||
4 | |||
5 | /* Do not use these */ | ||
6 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | ||
7 | extern unsigned long omap1_sram_reprogram_clock_sz; | ||
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c index cdeb9d3ef640..bde7a35e5000 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/platform_data/dmtimer-omap.h> | ||
28 | 29 | ||
29 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
30 | 31 | ||
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 74529549130c..41152fadd4c0 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include <asm/mach/irq.h> | 50 | #include <asm/mach/irq.h> |
51 | #include <asm/mach/time.h> | 51 | #include <asm/mach/time.h> |
52 | 52 | ||
53 | #include <plat/dmtimer.h> | 53 | #include <plat/counter-32k.h> |
54 | 54 | ||
55 | #include <mach/hardware.h> | 55 | #include <mach/hardware.h> |
56 | 56 | ||
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 84267edd9421..104fed366b8f 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c | |||
@@ -301,7 +301,7 @@ static inline void otg_device_init(struct omap_usb_config *pdata) | |||
301 | 301 | ||
302 | #endif | 302 | #endif |
303 | 303 | ||
304 | u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device) | 304 | static u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device) |
305 | { | 305 | { |
306 | u32 syscon1 = 0; | 306 | u32 syscon1 = 0; |
307 | 307 | ||
@@ -409,7 +409,7 @@ u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device) | |||
409 | return syscon1 << 16; | 409 | return syscon1 << 16; |
410 | } | 410 | } |
411 | 411 | ||
412 | u32 __init omap1_usb1_init(unsigned nwires) | 412 | static u32 __init omap1_usb1_init(unsigned nwires) |
413 | { | 413 | { |
414 | u32 syscon1 = 0; | 414 | u32 syscon1 = 0; |
415 | 415 | ||
@@ -475,7 +475,7 @@ bad: | |||
475 | return syscon1 << 20; | 475 | return syscon1 << 20; |
476 | } | 476 | } |
477 | 477 | ||
478 | u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup) | 478 | static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup) |
479 | { | 479 | { |
480 | u32 syscon1 = 0; | 480 | u32 syscon1 = 0; |
481 | 481 | ||