From 73285146544589424e8e1c1ebd6304d3c6231acf Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 9 Aug 2011 21:03:43 +0200 Subject: mach-u300: retire odd singlemem variant The U300 had a special variant where a memory was shared between two CPU:s and only one part of memory was accessible for the kernel. However it is now seriously legacy and only create problems for kernel consolidation, so let's retire it. Cc: Nicolas Pitre Signed-off-by: Linus Walleij --- arch/arm/mach-u300/Kconfig | 38 -------------------------------- arch/arm/mach-u300/Makefile.boot | 17 +++----------- arch/arm/mach-u300/include/mach/memory.h | 22 ++---------------- arch/arm/mach-u300/u300.c | 16 -------------- 4 files changed, 5 insertions(+), 88 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index 32a7b0f7e9f7..d3a9ca45ef85 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig @@ -48,25 +48,6 @@ config MACH_U300_BS365 endchoice -choice - prompt "Memory configuration" - default MACH_U300_SINGLE_RAM - ---help--- - You have to config the kernel according to the physical memory - configuration. - -config MACH_U300_SINGLE_RAM - bool "Single RAM" - help - Select this if you want support for Single RAM phones. - -config MACH_U300_DUAL_RAM - bool "Dual RAM" - help - Select this if you want support for Dual RAM phones. - This is two RAM memories on different EMIFs. -endchoice - config U300_DEBUG bool "Debug support for U300" depends on PM @@ -93,25 +74,6 @@ config MACH_U300_SPIDUMMY you don't need it. Selecting this will activate the SPI framework and ARM PL022 support. -comment "All the settings below must match the bootloader's settings" - -config MACH_U300_ACCESS_MEM_SIZE - int "Access CPU memory allocation" - range 7 25 - depends on MACH_U300_SINGLE_RAM - default 13 - help - How much memory in MiB that the Access side CPU has allocated - -config MACH_U300_2MB_ALIGNMENT_FIX - bool "2MiB alignment fix" - depends on MACH_U300_SINGLE_RAM - default y - help - If yes and the Access side CPU has allocated an odd size in - MiB, this fix gives you one MiB extra that would otherwise be - lost due to Linux 2 MiB alignment policy. - endmenu endif diff --git a/arch/arm/mach-u300/Makefile.boot b/arch/arm/mach-u300/Makefile.boot index 6fbfc6ea2d35..a06bb0deadfe 100644 --- a/arch/arm/mach-u300/Makefile.boot +++ b/arch/arm/mach-u300/Makefile.boot @@ -1,15 +1,4 @@ -# Note: the following conditions must always be true: -# ZRELADDR == virt_to_phys(TEXTADDR) -# PARAMS_PHYS must be within 4MB of ZRELADDR -# INITRD_PHYS must be in RAM - -ifdef CONFIG_MACH_U300_SINGLE_RAM - zreladdr-y := 0x28E08000 - params_phys-y := 0x28E00100 -else - zreladdr-y := 0x48008000 - params_phys-y := 0x48000100 -endif - + zreladdr-y := 0x48008000 +params_phys-y := 0x48000100 # This isn't used. -#initrd_phys-y := 0x29800000 +#initrd_phys-y := 0x48800000 diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h index 888e2e351ee1..02bd832f063e 100644 --- a/arch/arm/mach-u300/include/mach/memory.h +++ b/arch/arm/mach-u300/include/mach/memory.h @@ -13,26 +13,8 @@ #ifndef __MACH_MEMORY_H #define __MACH_MEMORY_H -#ifdef CONFIG_MACH_U300_DUAL_RAM - -#define PLAT_PHYS_OFFSET UL(0x48000000) -#define BOOT_PARAMS_OFFSET (PHYS_OFFSET + 0x100) - -#else - -#ifdef CONFIG_MACH_U300_2MB_ALIGNMENT_FIX -#define PLAT_PHYS_OFFSET (0x28000000 + \ - (CONFIG_MACH_U300_ACCESS_MEM_SIZE - \ - (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024) -#else -#define PLAT_PHYS_OFFSET (0x28000000 + \ - (CONFIG_MACH_U300_ACCESS_MEM_SIZE + \ - (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024) -#endif -#define BOOT_PARAMS_OFFSET (0x28000000 + \ - (CONFIG_MACH_U300_ACCESS_MEM_SIZE + \ - (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024 + 0x100) -#endif +#define PLAT_PHYS_OFFSET UL(0x48000000) +#define BOOT_PARAMS_OFFSET (PLAT_PHYS_OFFSET + 0x100) /* * We enable a real big DMA buffer if need be. diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c index 48b3b7f39966..25d11bac2a10 100644 --- a/arch/arm/mach-u300/u300.c +++ b/arch/arm/mach-u300/u300.c @@ -23,21 +23,6 @@ #include #include -static void __init u300_reserve(void) -{ - /* - * U300 - This platform family can share physical memory - * between two ARM cpus, one running Linux and the other - * running another OS. - */ -#ifdef CONFIG_MACH_U300_SINGLE_RAM -#if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \ - CONFIG_MACH_U300_2MB_ALIGNMENT_FIX - memblock_reserve(PHYS_OFFSET, 0x00100000); -#endif -#endif -} - static void __init u300_init_machine(void) { u300_init_devices(); @@ -63,7 +48,6 @@ MACHINE_START(U300, MACH_U300_STRING) /* Maintainer: Linus Walleij */ .boot_params = BOOT_PARAMS_OFFSET, .map_io = u300_map_io, - .reserve = u300_reserve, .init_irq = u300_init_irq, .timer = &u300_timer, .init_machine = u300_init_machine, -- cgit v1.2.1 From c43ed5600b285e7b3bfe868ffe2eb259939c4b98 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 9 Aug 2011 21:30:01 +0200 Subject: mach-u300: drop SEMI config option When we have only dual-RAM configurations, the SEMI (shared memory interface) must always be enabled. Signed-off-by: Linus Walleij --- arch/arm/mach-u300/Kconfig | 8 -------- arch/arm/mach-u300/core.c | 9 +-------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index d3a9ca45ef85..966a5a06a58c 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig @@ -54,14 +54,6 @@ config U300_DEBUG help Debug support for U300 in sysfs, procfs etc. -config MACH_U300_SEMI_IS_SHARED - bool "The SEMI is used by both the access and application side" - depends on MACH_U300 - help - This makes it possible to use the SEMI (Shared External - Memory Interface) from both from access and application - side. - config MACH_U300_SPIDUMMY bool "SSP/SPI dummy chip" select SPI diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 399c89f14dfb..8b78af90166f 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -1837,17 +1837,10 @@ void __init u300_init_devices(void) /* Register subdevices on the SPI bus */ u300_spi_register_board_devices(); -#ifndef CONFIG_MACH_U300_SEMI_IS_SHARED - /* - * Enable SEMI self refresh. Self-refresh of the SDRAM is entered when - * both subsystems are requesting this mode. - * If we not share the Acc SDRAM, this is never the case. Therefore - * enable it here from the App side. - */ + /* Enable SEMI self refresh */ val = readw(U300_SYSCON_VBASE + U300_SYSCON_SMCR) | U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE; writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); -#endif /* CONFIG_MACH_U300_SEMI_IS_SHARED */ } static int core_module_init(void) -- cgit v1.2.1 From 711e2deb63bb151249fa78287f99ba1e7de77b2f Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 9 Aug 2011 21:20:20 +0200 Subject: mach-u300: delete bogus memory mappings Get rid of the bogus memory map to TCM (there is a real mechanism for handling that nowadays!) and the commented- out declaration of the ROM. Signed-off-by: Linus Walleij --- arch/arm/mach-u300/core.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 8b78af90166f..ba0b1d3b6ed2 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -68,25 +68,6 @@ static struct map_desc u300_io_desc[] __initdata = { .length = SZ_32K, .type = MT_DEVICE, }, - { - .virtual = 0xffff2000, /* TCM memory */ - .pfn = __phys_to_pfn(0xffff2000), - .length = SZ_16K, - .type = MT_DEVICE, - }, - - /* - * This overlaps with the IRQ vectors etc at 0xffff0000, so these - * may have to be moved to 0x00000000 in order to use the ROM. - */ - /* - { - .virtual = U300_BOOTROM_VIRT_BASE, - .pfn = __phys_to_pfn(U300_BOOTROM_PHYS_BASE), - .length = SZ_64K, - .type = MT_ROM, - }, - */ }; void __init u300_map_io(void) -- cgit v1.2.1 From c21d2319efcdca6d1bc5d24d22dde8976464031e Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 9 Aug 2011 21:26:15 +0200 Subject: mach-u300: retire AVE device We need to face the fact that there will never be a mainlined driver for the U300 advanced video encoder, so let's just drop the declaration of this device. Signed-off-by: Linus Walleij --- arch/arm/mach-u300/core.c | 54 ----------------------------------------------- 1 file changed, 54 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index ba0b1d3b6ed2..5030a455251a 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -342,51 +342,6 @@ static struct resource wdog_resources[] = { } }; -/* TODO: These should be protected by suitable #ifdef's */ -static struct resource ave_resources[] = { - { - .name = "AVE3e I/O Area", - .start = U300_VIDEOENC_BASE, - .end = U300_VIDEOENC_BASE + SZ_512K - 1, - .flags = IORESOURCE_MEM, - }, - { - .name = "AVE3e IRQ0", - .start = IRQ_U300_VIDEO_ENC_0, - .end = IRQ_U300_VIDEO_ENC_0, - .flags = IORESOURCE_IRQ, - }, - { - .name = "AVE3e IRQ1", - .start = IRQ_U300_VIDEO_ENC_1, - .end = IRQ_U300_VIDEO_ENC_1, - .flags = IORESOURCE_IRQ, - }, - { - .name = "AVE3e Physmem Area", - .start = 0, /* 0 will be remapped to reserved memory */ - .end = SZ_1M - 1, - .flags = IORESOURCE_MEM, - }, - /* - * The AVE3e requires two regions of 256MB that it considers - * "invisible". The hardware will not be able to access these - * addresses, so they should never point to system RAM. - */ - { - .name = "AVE3e Reserved 0", - .start = 0xd0000000, - .end = 0xd0000000 + SZ_256M - 1, - .flags = IORESOURCE_MEM, - }, - { - .name = "AVE3e Reserved 1", - .start = 0xe0000000, - .end = 0xe0000000 + SZ_256M - 1, - .flags = IORESOURCE_MEM, - }, -}; - static struct resource dma_resource[] = { { .start = U300_DMAC_BASE, @@ -1593,13 +1548,6 @@ static struct platform_device nand_device = { }, }; -static struct platform_device ave_device = { - .name = "video_enc", - .id = -1, - .num_resources = ARRAY_SIZE(ave_resources), - .resource = ave_resources, -}; - static struct platform_device dma_device = { .name = "coh901318", .id = -1, @@ -1624,10 +1572,8 @@ static struct platform_device *platform_devs[] __initdata = { &gpio_device, &nand_device, &wdog_device, - &ave_device }; - /* * Interrupts: the U300 platforms have two pl190 ARM PrimeCells connected * together so some interrupts are connected to the first one and some -- cgit v1.2.1