mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
58cda884ec
Some OMAP3 boards (Beagle Cx, Overo, RX51, Pandora) have 2 SDRAM parts connected to the SDRC. This patch adds the following: - add a new argument of type omap_sdrc_params struct* to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params - adapted the OMAP boards files to the new prototype of omap2_init_common_hw - add the SDRC 2nd CS registers offsets defines - adapt the sram sleep code to configure the SDRC for the 2nd CS Note: If the 2nd param to omap2_init_common_hw is NULL, then the parameters are not programmed into the SDRC CS1 registers Tested on 3430 SDP and Beagleboard rev C2 and B5, with suspend/resume and frequency changes (cpufreq). Signed-off-by: Jean Pihet <jpihet@mvista.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
95 lines
2.3 KiB
C
95 lines
2.3 KiB
C
/*
|
|
* Board support file for OMAP4430 SDP.
|
|
*
|
|
* Copyright (C) 2009 Texas Instruments
|
|
*
|
|
* Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
|
*
|
|
* Based on mach-omap2/board-3430sdp.c
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/init.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/io.h>
|
|
#include <linux/gpio.h>
|
|
|
|
#include <mach/hardware.h>
|
|
#include <asm/mach-types.h>
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/mach/map.h>
|
|
|
|
#include <mach/board.h>
|
|
#include <mach/common.h>
|
|
#include <mach/control.h>
|
|
#include <mach/timer-gp.h>
|
|
#include <asm/hardware/gic.h>
|
|
|
|
static struct platform_device sdp4430_lcd_device = {
|
|
.name = "sdp4430_lcd",
|
|
.id = -1,
|
|
};
|
|
|
|
static struct platform_device *sdp4430_devices[] __initdata = {
|
|
&sdp4430_lcd_device,
|
|
};
|
|
|
|
static struct omap_uart_config sdp4430_uart_config __initdata = {
|
|
.enabled_uarts = (1 << 0) | (1 << 1) | (1 << 2),
|
|
};
|
|
|
|
static struct omap_lcd_config sdp4430_lcd_config __initdata = {
|
|
.ctrl_name = "internal",
|
|
};
|
|
|
|
static struct omap_board_config_kernel sdp4430_config[] __initdata = {
|
|
{ OMAP_TAG_UART, &sdp4430_uart_config },
|
|
{ OMAP_TAG_LCD, &sdp4430_lcd_config },
|
|
};
|
|
|
|
static void __init gic_init_irq(void)
|
|
{
|
|
gic_dist_init(0, IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29);
|
|
gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
|
|
}
|
|
|
|
static void __init omap_4430sdp_init_irq(void)
|
|
{
|
|
omap2_init_common_hw(NULL, NULL);
|
|
#ifdef CONFIG_OMAP_32K_TIMER
|
|
omap2_gp_clockevent_set_gptimer(1);
|
|
#endif
|
|
gic_init_irq();
|
|
omap_gpio_init();
|
|
}
|
|
|
|
|
|
static void __init omap_4430sdp_init(void)
|
|
{
|
|
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
|
|
omap_board_config = sdp4430_config;
|
|
omap_board_config_size = ARRAY_SIZE(sdp4430_config);
|
|
omap_serial_init();
|
|
}
|
|
|
|
static void __init omap_4430sdp_map_io(void)
|
|
{
|
|
omap2_set_globals_443x();
|
|
omap2_map_common_io();
|
|
}
|
|
|
|
MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
|
|
/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
|
|
.phys_io = 0x48000000,
|
|
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
|
.boot_params = 0x80000100,
|
|
.map_io = omap_4430sdp_map_io,
|
|
.init_irq = omap_4430sdp_init_irq,
|
|
.init_machine = omap_4430sdp_init,
|
|
.timer = &omap_timer,
|
|
MACHINE_END
|