Merge branch 'depends/rmk/memory_h' into next/fixes
Fix up all conflicts between the memory.h cleanup and bug fixes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -676,7 +676,7 @@ static void __init da830_evm_map_io(void)
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137/AM17x EVM")
|
||||
.boot_params = (DA8XX_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = da830_evm_map_io,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -1291,7 +1291,7 @@ static void __init da850_evm_map_io(void)
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
|
||||
.boot_params = (DA8XX_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = da850_evm_map_io,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -351,7 +351,7 @@ static __init void dm355_evm_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM")
|
||||
.boot_params = (0x80000100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = dm355_evm_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -270,7 +270,7 @@ static __init void dm355_leopard_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard")
|
||||
.boot_params = (0x80000100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = dm355_leopard_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -612,7 +612,7 @@ static __init void dm365_evm_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")
|
||||
.boot_params = (0x80000100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = dm365_evm_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -712,7 +712,7 @@ static __init void davinci_evm_init(void)
|
||||
|
||||
MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")
|
||||
/* Maintainer: MontaVista Software <source@mvista.com> */
|
||||
.boot_params = (DAVINCI_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = davinci_evm_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -792,7 +792,7 @@ static __init void evm_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
|
||||
.boot_params = (0x80000100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = davinci_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
@@ -801,7 +801,7 @@ MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(DAVINCI_DM6467TEVM, "DaVinci DM6467T EVM")
|
||||
.boot_params = (0x80000100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = davinci_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -566,7 +566,7 @@ static void __init mityomapl138_map_io(void)
|
||||
}
|
||||
|
||||
MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808")
|
||||
.boot_params = (DA8XX_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = mityomapl138_map_io,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -272,7 +272,7 @@ static __init void davinci_ntosd2_init(void)
|
||||
|
||||
MACHINE_START(NEUROS_OSD2, "Neuros OSD2")
|
||||
/* Maintainer: Neuros Technologies <neuros@groups.google.com> */
|
||||
.boot_params = (DAVINCI_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = davinci_ntosd2_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -338,7 +338,7 @@ static void __init omapl138_hawk_map_io(void)
|
||||
}
|
||||
|
||||
MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
|
||||
.boot_params = (DA8XX_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omapl138_hawk_map_io,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -151,7 +151,7 @@ static __init void davinci_sffsdr_init(void)
|
||||
|
||||
MACHINE_START(SFFSDR, "Lyrtech SFFSDR")
|
||||
/* Maintainer: Hugo Villeneuve hugo.villeneuve@lyrtech.com */
|
||||
.boot_params = (DAVINCI_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = davinci_sffsdr_map_io,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -277,7 +277,7 @@ console_initcall(tnetv107x_evm_console_init);
|
||||
#endif
|
||||
|
||||
MACHINE_START(TNETV107X, "TNETV107X EVM")
|
||||
.boot_params = (TNETV107X_DDR_BASE + 0x100),
|
||||
.atag_offset = 0x100,
|
||||
.map_io = tnetv107x_init,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/davinci_emac.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/mach/map.h>
|
||||
@@ -86,6 +87,8 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
|
||||
iotable_init(davinci_soc_info.io_desc,
|
||||
davinci_soc_info.io_desc_num);
|
||||
|
||||
init_consistent_dma_size(14 << 20);
|
||||
|
||||
/*
|
||||
* Normally devicemaps_init() would flush caches and tlb after
|
||||
* mdesc->map_io(), but we must also do it here because of the CPU
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <asm/proc-fns.h>
|
||||
|
||||
#include <mach/cpuidle.h>
|
||||
#include <mach/memory.h>
|
||||
#include <mach/ddr2.h>
|
||||
|
||||
#define DAVINCI_CPUIDLE_MAX_STATES 2
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#define DDR2_SDRCR_OFFSET 0xc
|
||||
#define DDR2_SRPD_BIT (1 << 23)
|
||||
#define DDR2_MCLKSTOPEN_BIT (1 << 30)
|
||||
#define DDR2_LPMODEN_BIT (1 << 31)
|
||||
@@ -18,56 +18,50 @@
|
||||
|
||||
#include <linux/serial_reg.h>
|
||||
|
||||
#include <asm/memory.h>
|
||||
|
||||
#include <mach/serial.h>
|
||||
|
||||
#define UART_SHIFT 2
|
||||
|
||||
#define davinci_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET)
|
||||
#define davinci_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET)
|
||||
|
||||
.pushsection .data
|
||||
davinci_uart_phys: .word 0
|
||||
davinci_uart_virt: .word 0
|
||||
.popsection
|
||||
|
||||
.macro addruart, rp, rv
|
||||
.macro addruart, rp, rv, tmp
|
||||
|
||||
/* Use davinci_uart_phys/virt if already configured */
|
||||
10: mrc p15, 0, \rp, c1, c0
|
||||
tst \rp, #1 @ MMU enabled?
|
||||
ldreq \rp, =davinci_uart_v2p(davinci_uart_phys)
|
||||
ldrne \rp, =davinci_uart_phys
|
||||
add \rv, \rp, #4 @ davinci_uart_virt
|
||||
ldr \rp, [\rp, #0]
|
||||
ldr \rv, [\rv, #0]
|
||||
10: adr \rp, 99f @ get effective addr of 99f
|
||||
ldr \rv, [\rp] @ get absolute addr of 99f
|
||||
sub \rv, \rv, \rp @ offset between the two
|
||||
ldr \rp, [\rp, #4] @ abs addr of omap_uart_phys
|
||||
sub \tmp, \rp, \rv @ make it effective
|
||||
ldr \rp, [\tmp, #0] @ davinci_uart_phys
|
||||
ldr \rv, [\tmp, #4] @ davinci_uart_virt
|
||||
cmp \rp, #0 @ is port configured?
|
||||
cmpne \rv, #0
|
||||
bne 99f @ already configured
|
||||
bne 100f @ already configured
|
||||
|
||||
/* Check the debug UART address set in uncompress.h */
|
||||
mrc p15, 0, \rp, c1, c0
|
||||
tst \rp, #1 @ MMU enabled?
|
||||
and \rp, pc, #0xff000000
|
||||
ldr \rv, =DAVINCI_UART_INFO_OFS
|
||||
add \rp, \rp, \rv
|
||||
|
||||
/* Copy uart phys address from decompressor uart info */
|
||||
ldreq \rv, =davinci_uart_v2p(davinci_uart_phys)
|
||||
ldrne \rv, =davinci_uart_phys
|
||||
ldreq \rp, =DAVINCI_UART_INFO
|
||||
ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO)
|
||||
ldr \rp, [\rp, #0]
|
||||
str \rp, [\rv]
|
||||
ldr \rv, [\rp, #0]
|
||||
str \rv, [\tmp, #0]
|
||||
|
||||
/* Copy uart virt address from decompressor uart info */
|
||||
ldreq \rv, =davinci_uart_v2p(davinci_uart_virt)
|
||||
ldrne \rv, =davinci_uart_virt
|
||||
ldreq \rp, =DAVINCI_UART_INFO
|
||||
ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO)
|
||||
ldr \rp, [\rp, #4]
|
||||
str \rp, [\rv]
|
||||
ldr \rv, [\rp, #4]
|
||||
str \rv, [\tmp, #4]
|
||||
|
||||
b 10b
|
||||
99:
|
||||
|
||||
.align
|
||||
99: .word .
|
||||
.word davinci_uart_phys
|
||||
.ltorg
|
||||
|
||||
100:
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* DaVinci memory space definitions
|
||||
*
|
||||
* Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* 2007 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
#ifndef __ASM_ARCH_MEMORY_H
|
||||
#define __ASM_ARCH_MEMORY_H
|
||||
|
||||
/**************************************************************************
|
||||
* Included Files
|
||||
**************************************************************************/
|
||||
#include <asm/page.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
/**************************************************************************
|
||||
* Definitions
|
||||
**************************************************************************/
|
||||
#define DAVINCI_DDR_BASE 0x80000000
|
||||
#define DA8XX_DDR_BASE 0xc0000000
|
||||
|
||||
#if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
|
||||
#error Cannot enable DaVinci and DA8XX platforms concurrently
|
||||
#elif defined(CONFIG_ARCH_DAVINCI_DA8XX)
|
||||
#define PLAT_PHYS_OFFSET DA8XX_DDR_BASE
|
||||
#else
|
||||
#define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE
|
||||
#endif
|
||||
|
||||
#define DDR2_SDRCR_OFFSET 0xc
|
||||
#define DDR2_SRPD_BIT BIT(23)
|
||||
#define DDR2_MCLKSTOPEN_BIT BIT(30)
|
||||
#define DDR2_LPMODEN_BIT BIT(31)
|
||||
|
||||
/*
|
||||
* Increase size of DMA-consistent memory region
|
||||
*/
|
||||
#define CONSISTENT_DMA_SIZE (14<<20)
|
||||
|
||||
#endif /* __ASM_ARCH_MEMORY_H */
|
||||
@@ -21,8 +21,9 @@
|
||||
* macros in debug-macro.S.
|
||||
*
|
||||
* This area sits just below the page tables (see arch/arm/kernel/head.S).
|
||||
* We define it as a relative offset from start of usable RAM.
|
||||
*/
|
||||
#define DAVINCI_UART_INFO (PLAT_PHYS_OFFSET + 0x3ff8)
|
||||
#define DAVINCI_UART_INFO_OFS 0x3ff8
|
||||
|
||||
#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
|
||||
#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
|
||||
|
||||
@@ -43,7 +43,12 @@ static inline void flush(void)
|
||||
|
||||
static inline void set_uart_info(u32 phys, void * __iomem virt)
|
||||
{
|
||||
u32 *uart_info = (u32 *)(DAVINCI_UART_INFO);
|
||||
/*
|
||||
* Get address of some.bss variable and round it down
|
||||
* a la CONFIG_AUTO_ZRELADDR.
|
||||
*/
|
||||
u32 ram_start = (u32)&uart & 0xf8000000;
|
||||
u32 *uart_info = (u32 *)(ram_start + DAVINCI_UART_INFO_OFS);
|
||||
|
||||
uart = (u32 *)phys;
|
||||
uart_info[0] = phys;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <mach/psc.h>
|
||||
#include <mach/memory.h>
|
||||
#include <mach/ddr2.h>
|
||||
|
||||
#include "clock.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user