Commit 2d2a0f9a authored by Sudhakar Rajashekhara's avatar Sudhakar Rajashekhara Committed by Kevin Hilman

ARM: DaVinci: add dm646x board support

Adds dm646x board support.
Signed-off-by: default avatarSudhakar Rajashekhara <sudhakar.raj@ti.com>
parent 7cd182c1
......@@ -4,10 +4,17 @@ menu "TI DaVinci Implementations"
comment "DaVinci Core Type"
choice
prompt "DaVinci ARCH type"
default ARCH_DAVINCI644x
config ARCH_DAVINCI644x
default y
bool "DaVinci 644x based system"
config ARCH_DAVINCI_DM646x
bool "DaVinci 646x based system"
endchoice
comment "DaVinci Board Type"
config MACH_DAVINCI_EVM
......@@ -18,6 +25,14 @@ config MACH_DAVINCI_EVM
Configure this option to specify the whether the board used
for development is a DaVinci EVM
config MACH_DAVINCI_DM646X_EVM
bool "TI DM646x EVM"
default n
depends on ARCH_DAVINCI_DM646x
help
Configure this option to specify the whether the board used
for development is a DM646x EVM
config DAVINCI_RESET_CLOCKS
bool "Reset unused clocks during boot"
depends on ARCH_DAVINCI
......
......@@ -9,3 +9,4 @@ obj-y := time.o irq.o clock.o serial.o io.o id.o psc.o \
# Board specific
obj-$(CONFIG_MACH_DAVINCI_EVM) += board-evm.o
obj-$(CONFIG_MACH_DAVINCI_DM646X_EVM) += board-dm646x-evm.o
/*
* TI DaVinci DM646X EVM board
*
* Derived from: arch/arm/mach-davinci/board-evm.c
* Copyright (C) 2006 Texas Instruments.
*
* (C) 2007-2008, 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.
*
*/
/**************************************************************************
* Included Files
**************************************************************************/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <linux/root_dev.h>
#include <linux/dma-mapping.h>
#include <linux/serial.h>
#include <linux/serial_8250.h>
#include <asm/setup.h>
#include <linux/io.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/flash.h>
#include <mach/board.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/psc.h>
#include <mach/serial.h>
#include <mach/i2c.h>
static struct davinci_uart_config davinci_evm_uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static struct davinci_board_config_kernel davinci_evm_config[] __initdata = {
{ DAVINCI_TAG_UART, &davinci_evm_uart_config },
};
static void board_init(void)
{
davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DM646X_LPSC_AEMIF, 1);
davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DM646X_LPSC_GPIO, 1);
}
static void __init davinci_map_io(void)
{
davinci_map_common_io();
/* Initialize the DaVinci EVM board settigs */
board_init();
}
static __init void evm_init(void)
{
davinci_board_config = davinci_evm_config;
davinci_board_config_size = ARRAY_SIZE(davinci_evm_config);
davinci_serial_init();
}
static __init void davinci_dm646x_evm_irq_init(void)
{
davinci_init_common_hw();
davinci_irq_init();
}
MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
.phys_io = IO_PHYS,
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
.boot_params = (0x80000100),
.map_io = davinci_map_io,
.init_irq = davinci_dm646x_evm_irq_init,
.timer = &davinci_timer,
.init_machine = evm_init,
MACHINE_END
......@@ -16,6 +16,11 @@ struct sys_timer;
extern struct sys_timer davinci_timer;
extern void davinci_serial_init(void);
extern void davinci_irq_init(void);
extern void davinci_psc_config(unsigned int domain, unsigned int id,
char enable);
extern void __init davinci_init_common_hw(void);
void __init davinci_map_common_io(void);
/* parameters describe VBUS sourcing for host mode */
extern void setup_usb(unsigned mA, unsigned potpgt_msec);
......
......@@ -33,6 +33,8 @@
#include <mach/serial.h>
#include <mach/irqs.h>
#include <mach/board.h>
#include <mach/cpu.h>
#include "clock.h"
#define UART_DAVINCI_PWREMU 0x0c
......@@ -135,6 +137,11 @@ void __init davinci_serial_init(void)
for (i = 0; i < DAVINCI_MAX_NR_UARTS; i++) {
struct plat_serial8250_port *p = serial_platform_data + i;
if (cpu_is_davinci_dm646x()) {
p->uartclk = DM646X_AUX_OSC_FREQ;
p->iotype = UPIO_MEM32;
}
if (!(info->enabled_uarts & (1 << i))) {
p->membase = 0;
p->mapbase = 0;
......@@ -148,7 +155,8 @@ void __init davinci_serial_init(void)
__func__, __LINE__, i);
else {
clk_enable(uart_clk);
davinci_serial_reset(p);
if (cpu_is_davinci_dm644x())
davinci_serial_reset(p);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment