aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:11:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:11:00 -0400
commit952414505f55afe5cd6dc004765076aa22b3ed7e (patch)
treeeba11ed702ae02fea7f1a0d422346454fc98296f /arch/arm/mach-u300
parent68e24ba70465b82ad24e0774ceab5360180d4627 (diff)
parent3e965b176341b78620f7404fd8b7f9a0d061f8a2 (diff)
Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc
* 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc: (125 commits) ARM: mach-mxs: fix machines' initializers order mmc: mxcmmc: explicitly includes mach/hardware.h arm/imx: explicitly includes mach/hardware.h in pm-imx27.c arm/imx: remove mx27_setup_weimcs() from mx27.h arm/imx: explicitly includes mach/hardware.h in mach-kzm_arm11_01.c arm/imx: remove mx31_setup_weimcs() from mx31.h ARM: tegra: devices.c should include devices.h ARM: tegra: cpu-tegra: unexport two functions ARM: tegra: cpu-tegra: sparse type fix ARM: tegra: dma: staticify some tables and functions ARM: tegra: tegra2_clocks: don't export some tables ARM: tegra: tegra_powergate_is_powered should be static ARM: tegra: tegra_rtc_read_ms should be static ARM: tegra: tegra_init_cache should be static ARM: tegra: pcie: 0 -> NULL changes ARM: tegra: pcie: include board.h ARM: tegra: pcie: don't cast __iomem pointers ARM: tegra: tegra2_clocks: 0 -> NULL changes ARM: tegra: tegra2_clocks: don't cast __iomem pointers ARM: tegra: timer: don't cast __iomem pointers ... Fix up trivial conflicts in arch/arm/mach-omap2/Makefile, arch/arm/mach-u300/{Makefile.boot,core.c} arch/arm/plat-{mxc,omap}/devices.c
Diffstat (limited to 'arch/arm/mach-u300')
-rw-r--r--arch/arm/mach-u300/Kconfig46
-rw-r--r--arch/arm/mach-u300/Makefile.boot17
-rw-r--r--arch/arm/mach-u300/core.c81
-rw-r--r--arch/arm/mach-u300/include/mach/memory.h22
-rw-r--r--arch/arm/mach-u300/u300.c16
5 files changed, 6 insertions, 176 deletions
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
index d6e5d306557b..1cbcd4fc1e17 100644
--- a/arch/arm/mach-u300/Kconfig
+++ b/arch/arm/mach-u300/Kconfig
@@ -51,39 +51,12 @@ config MACH_U300_BS365
51 51
52endchoice 52endchoice
53 53
54choice
55 prompt "Memory configuration"
56 default MACH_U300_SINGLE_RAM
57 ---help---
58 You have to config the kernel according to the physical memory
59 configuration.
60
61config MACH_U300_SINGLE_RAM
62 bool "Single RAM"
63 help
64 Select this if you want support for Single RAM phones.
65
66config MACH_U300_DUAL_RAM
67 bool "Dual RAM"
68 help
69 Select this if you want support for Dual RAM phones.
70 This is two RAM memories on different EMIFs.
71endchoice
72
73config U300_DEBUG 54config U300_DEBUG
74 bool "Debug support for U300" 55 bool "Debug support for U300"
75 depends on PM 56 depends on PM
76 help 57 help
77 Debug support for U300 in sysfs, procfs etc. 58 Debug support for U300 in sysfs, procfs etc.
78 59
79config MACH_U300_SEMI_IS_SHARED
80 bool "The SEMI is used by both the access and application side"
81 depends on MACH_U300
82 help
83 This makes it possible to use the SEMI (Shared External
84 Memory Interface) from both from access and application
85 side.
86
87config MACH_U300_SPIDUMMY 60config MACH_U300_SPIDUMMY
88 bool "SSP/SPI dummy chip" 61 bool "SSP/SPI dummy chip"
89 select SPI 62 select SPI
@@ -96,25 +69,6 @@ config MACH_U300_SPIDUMMY
96 you don't need it. Selecting this will activate the 69 you don't need it. Selecting this will activate the
97 SPI framework and ARM PL022 support. 70 SPI framework and ARM PL022 support.
98 71
99comment "All the settings below must match the bootloader's settings"
100
101config MACH_U300_ACCESS_MEM_SIZE
102 int "Access CPU memory allocation"
103 range 7 25
104 depends on MACH_U300_SINGLE_RAM
105 default 13
106 help
107 How much memory in MiB that the Access side CPU has allocated
108
109config MACH_U300_2MB_ALIGNMENT_FIX
110 bool "2MiB alignment fix"
111 depends on MACH_U300_SINGLE_RAM
112 default y
113 help
114 If yes and the Access side CPU has allocated an odd size in
115 MiB, this fix gives you one MiB extra that would otherwise be
116 lost due to Linux 2 MiB alignment policy.
117
118endmenu 72endmenu
119 73
120endif 74endif
diff --git a/arch/arm/mach-u300/Makefile.boot b/arch/arm/mach-u300/Makefile.boot
index 69357affbd77..87811de0bd94 100644
--- a/arch/arm/mach-u300/Makefile.boot
+++ b/arch/arm/mach-u300/Makefile.boot
@@ -1,15 +1,4 @@
1# Note: the following conditions must always be true: 1 zreladdr-y += 0x48008000
2# ZRELADDR == virt_to_phys(TEXTADDR) 2params_phys-y := 0x48000100
3# PARAMS_PHYS must be within 4MB of ZRELADDR
4# INITRD_PHYS must be in RAM
5
6ifdef CONFIG_MACH_U300_SINGLE_RAM
7 zreladdr-y += 0x28E08000
8 params_phys-y := 0x28E00100
9else
10 zreladdr-y += 0x48008000
11 params_phys-y := 0x48000100
12endif
13
14# This isn't used. 3# This isn't used.
15#initrd_phys-y := 0x29800000 4#initrd_phys-y := 0x48800000
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index f4ad6d2e26f3..ac0791e924bc 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -72,25 +72,6 @@ static struct map_desc u300_io_desc[] __initdata = {
72 .length = SZ_32K, 72 .length = SZ_32K,
73 .type = MT_DEVICE, 73 .type = MT_DEVICE,
74 }, 74 },
75 {
76 .virtual = 0xffff2000, /* TCM memory */
77 .pfn = __phys_to_pfn(0xffff2000),
78 .length = SZ_16K,
79 .type = MT_DEVICE,
80 },
81
82 /*
83 * This overlaps with the IRQ vectors etc at 0xffff0000, so these
84 * may have to be moved to 0x00000000 in order to use the ROM.
85 */
86 /*
87 {
88 .virtual = U300_BOOTROM_VIRT_BASE,
89 .pfn = __phys_to_pfn(U300_BOOTROM_PHYS_BASE),
90 .length = SZ_64K,
91 .type = MT_ROM,
92 },
93 */
94}; 75};
95 76
96void __init u300_map_io(void) 77void __init u300_map_io(void)
@@ -367,51 +348,6 @@ static struct resource wdog_resources[] = {
367 } 348 }
368}; 349};
369 350
370/* TODO: These should be protected by suitable #ifdef's */
371static struct resource ave_resources[] = {
372 {
373 .name = "AVE3e I/O Area",
374 .start = U300_VIDEOENC_BASE,
375 .end = U300_VIDEOENC_BASE + SZ_512K - 1,
376 .flags = IORESOURCE_MEM,
377 },
378 {
379 .name = "AVE3e IRQ0",
380 .start = IRQ_U300_VIDEO_ENC_0,
381 .end = IRQ_U300_VIDEO_ENC_0,
382 .flags = IORESOURCE_IRQ,
383 },
384 {
385 .name = "AVE3e IRQ1",
386 .start = IRQ_U300_VIDEO_ENC_1,
387 .end = IRQ_U300_VIDEO_ENC_1,
388 .flags = IORESOURCE_IRQ,
389 },
390 {
391 .name = "AVE3e Physmem Area",
392 .start = 0, /* 0 will be remapped to reserved memory */
393 .end = SZ_1M - 1,
394 .flags = IORESOURCE_MEM,
395 },
396 /*
397 * The AVE3e requires two regions of 256MB that it considers
398 * "invisible". The hardware will not be able to access these
399 * addresses, so they should never point to system RAM.
400 */
401 {
402 .name = "AVE3e Reserved 0",
403 .start = 0xd0000000,
404 .end = 0xd0000000 + SZ_256M - 1,
405 .flags = IORESOURCE_MEM,
406 },
407 {
408 .name = "AVE3e Reserved 1",
409 .start = 0xe0000000,
410 .end = 0xe0000000 + SZ_256M - 1,
411 .flags = IORESOURCE_MEM,
412 },
413};
414
415static struct resource dma_resource[] = { 351static struct resource dma_resource[] = {
416 { 352 {
417 .start = U300_DMAC_BASE, 353 .start = U300_DMAC_BASE,
@@ -1650,13 +1586,6 @@ static struct platform_device nand_device = {
1650 }, 1586 },
1651}; 1587};
1652 1588
1653static struct platform_device ave_device = {
1654 .name = "video_enc",
1655 .id = -1,
1656 .num_resources = ARRAY_SIZE(ave_resources),
1657 .resource = ave_resources,
1658};
1659
1660static struct platform_device dma_device = { 1589static struct platform_device dma_device = {
1661 .name = "coh901318", 1590 .name = "coh901318",
1662 .id = -1, 1591 .id = -1,
@@ -1747,7 +1676,6 @@ static struct platform_device *platform_devs[] __initdata = {
1747 &gpio_device, 1676 &gpio_device,
1748 &nand_device, 1677 &nand_device,
1749 &wdog_device, 1678 &wdog_device,
1750 &ave_device,
1751 &pinmux_device, 1679 &pinmux_device,
1752}; 1680};
1753 1681
@@ -1945,17 +1873,10 @@ void __init u300_init_devices(void)
1945 /* Register subdevices on the SPI bus */ 1873 /* Register subdevices on the SPI bus */
1946 u300_spi_register_board_devices(); 1874 u300_spi_register_board_devices();
1947 1875
1948#ifndef CONFIG_MACH_U300_SEMI_IS_SHARED 1876 /* Enable SEMI self refresh */
1949 /*
1950 * Enable SEMI self refresh. Self-refresh of the SDRAM is entered when
1951 * both subsystems are requesting this mode.
1952 * If we not share the Acc SDRAM, this is never the case. Therefore
1953 * enable it here from the App side.
1954 */
1955 val = readw(U300_SYSCON_VBASE + U300_SYSCON_SMCR) | 1877 val = readw(U300_SYSCON_VBASE + U300_SYSCON_SMCR) |
1956 U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE; 1878 U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE;
1957 writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); 1879 writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR);
1958#endif /* CONFIG_MACH_U300_SEMI_IS_SHARED */
1959} 1880}
1960 1881
1961static int core_module_init(void) 1882static int core_module_init(void)
diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h
index 7034bae95de6..c808f347a081 100644
--- a/arch/arm/mach-u300/include/mach/memory.h
+++ b/arch/arm/mach-u300/include/mach/memory.h
@@ -13,25 +13,7 @@
13#ifndef __MACH_MEMORY_H 13#ifndef __MACH_MEMORY_H
14#define __MACH_MEMORY_H 14#define __MACH_MEMORY_H
15 15
16#ifdef CONFIG_MACH_U300_DUAL_RAM 16#define PLAT_PHYS_OFFSET UL(0x48000000)
17 17#define BOOT_PARAMS_OFFSET 0x100
18#define PLAT_PHYS_OFFSET UL(0x48000000)
19#define BOOT_PARAMS_OFFSET 0x100
20
21#else
22
23#ifdef CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
24#define PLAT_PHYS_OFFSET (0x28000000 + \
25 (CONFIG_MACH_U300_ACCESS_MEM_SIZE - \
26 (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
27#define BOOT_PARAMS_OFFSET (0x100 + \
28 (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1)*1024*1024*2)
29#else
30#define PLAT_PHYS_OFFSET (0x28000000 + \
31 (CONFIG_MACH_U300_ACCESS_MEM_SIZE + \
32 (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
33#define BOOT_PARAMS_OFFSET 0x100
34#endif
35#endif
36 18
37#endif 19#endif
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
index 80e7305589c6..89422ee7f3a8 100644
--- a/arch/arm/mach-u300/u300.c
+++ b/arch/arm/mach-u300/u300.c
@@ -23,21 +23,6 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/memory.h> 24#include <asm/memory.h>
25 25
26static void __init u300_reserve(void)
27{
28 /*
29 * U300 - This platform family can share physical memory
30 * between two ARM cpus, one running Linux and the other
31 * running another OS.
32 */
33#ifdef CONFIG_MACH_U300_SINGLE_RAM
34#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \
35 CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
36 memblock_reserve(PHYS_OFFSET, 0x00100000);
37#endif
38#endif
39}
40
41static void __init u300_init_machine(void) 26static void __init u300_init_machine(void)
42{ 27{
43 u300_init_devices(); 28 u300_init_devices();
@@ -63,7 +48,6 @@ MACHINE_START(U300, MACH_U300_STRING)
63 /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */ 48 /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */
64 .atag_offset = BOOT_PARAMS_OFFSET, 49 .atag_offset = BOOT_PARAMS_OFFSET,
65 .map_io = u300_map_io, 50 .map_io = u300_map_io,
66 .reserve = u300_reserve,
67 .init_irq = u300_init_irq, 51 .init_irq = u300_init_irq,
68 .timer = &u300_timer, 52 .timer = &u300_timer,
69 .init_machine = u300_init_machine, 53 .init_machine = u300_init_machine,