Path: blob/master/arch/arm/mach-omap2/board-rx51.c
10817 views
/*1* linux/arch/arm/mach-omap2/board-rx51.c2*3* Copyright (C) 2007, 2008 Nokia4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/910#include <linux/kernel.h>11#include <linux/init.h>12#include <linux/platform_device.h>13#include <linux/delay.h>14#include <linux/err.h>15#include <linux/clk.h>16#include <linux/io.h>17#include <linux/gpio.h>18#include <linux/leds.h>1920#include <mach/hardware.h>21#include <asm/mach-types.h>22#include <asm/mach/arch.h>23#include <asm/mach/map.h>2425#include <plat/mcspi.h>26#include <plat/board.h>27#include <plat/common.h>28#include <plat/dma.h>29#include <plat/gpmc.h>30#include <plat/usb.h>3132#include "mux.h"33#include "pm.h"34#include "sdram-nokia.h"3536#define RX51_GPIO_SLEEP_IND 1623738extern void rx51_video_mem_init(void);3940static struct gpio_led gpio_leds[] = {41{42.name = "sleep_ind",43.gpio = RX51_GPIO_SLEEP_IND,44},45};4647static struct gpio_led_platform_data gpio_led_info = {48.leds = gpio_leds,49.num_leds = ARRAY_SIZE(gpio_leds),50};5152static struct platform_device leds_gpio = {53.name = "leds-gpio",54.id = -1,55.dev = {56.platform_data = &gpio_led_info,57},58};5960/*61* cpuidle C-states definition override from the default values.62* The 'exit_latency' field is the sum of sleep and wake-up latencies.63*/64static struct cpuidle_params rx51_cpuidle_params[] = {65/* C1 */66{110 + 162, 5 , 1},67/* C2 */68{106 + 180, 309, 1},69/* C3 */70{107 + 410, 46057, 0},71/* C4 */72{121 + 3374, 46057, 0},73/* C5 */74{855 + 1146, 46057, 1},75/* C6 */76{7580 + 4134, 484329, 0},77/* C7 */78{7505 + 15274, 484329, 1},79};8081static struct omap_lcd_config rx51_lcd_config = {82.ctrl_name = "internal",83};8485static struct omap_fbmem_config rx51_fbmem0_config = {86.size = 752 * 1024,87};8889static struct omap_fbmem_config rx51_fbmem1_config = {90.size = 752 * 1024,91};9293static struct omap_fbmem_config rx51_fbmem2_config = {94.size = 752 * 1024,95};9697static struct omap_board_config_kernel rx51_config[] = {98{ OMAP_TAG_FBMEM, &rx51_fbmem0_config },99{ OMAP_TAG_FBMEM, &rx51_fbmem1_config },100{ OMAP_TAG_FBMEM, &rx51_fbmem2_config },101{ OMAP_TAG_LCD, &rx51_lcd_config },102};103104static void __init rx51_init_early(void)105{106struct omap_sdrc_params *sdrc_params;107108omap2_init_common_infrastructure();109sdrc_params = nokia_get_sdram_timings();110omap2_init_common_devices(sdrc_params, sdrc_params);111}112113extern void __init rx51_peripherals_init(void);114115#ifdef CONFIG_OMAP_MUX116static struct omap_board_mux board_mux[] __initdata = {117{ .reg_offset = OMAP_MUX_TERMINATOR },118};119#endif120121static struct omap_musb_board_data musb_board_data = {122.interface_type = MUSB_INTERFACE_ULPI,123.mode = MUSB_PERIPHERAL,124.power = 0,125};126127static void __init rx51_init(void)128{129omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);130omap_board_config = rx51_config;131omap_board_config_size = ARRAY_SIZE(rx51_config);132omap3_pm_init_cpuidle(rx51_cpuidle_params);133omap_serial_init();134usb_musb_init(&musb_board_data);135rx51_peripherals_init();136137/* Ensure SDRC pins are mux'd for self-refresh */138omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);139omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);140141platform_device_register(&leds_gpio);142}143144static void __init rx51_map_io(void)145{146omap2_set_globals_3xxx();147omap34xx_map_common_io();148}149150static void __init rx51_reserve(void)151{152rx51_video_mem_init();153omap_reserve();154}155156MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")157/* Maintainer: Lauri Leukkunen <[email protected]> */158.boot_params = 0x80000100,159.reserve = rx51_reserve,160.map_io = rx51_map_io,161.init_early = rx51_init_early,162.init_irq = omap_init_irq,163.init_machine = rx51_init,164.timer = &omap_timer,165MACHINE_END166167168