Ilya Yanok | 016b702 | 2009-08-11 02:32:09 +0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 Sascha Hauer, Pengutronix |
| 3 | * Copyright (C) 2008,2009 Eric Jarrige <jorasse@users.sourceforge.net> |
| 4 | * Copyright (C) 2009 Ilya Yanok <yanok@emcraft.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; either version 2 of |
| 9 | * the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 19 | * MA 02111-1307 USA |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #include <common.h> |
| 24 | #include <asm/io.h> |
| 25 | #include <asm/arch/imx-regs.h> |
| 26 | |
| 27 | DECLARE_GLOBAL_DATA_PTR; |
| 28 | |
| 29 | int board_init (void) |
| 30 | { |
| 31 | struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE; |
| 32 | |
| 33 | gd->bd->bi_arch_number = MACH_TYPE_IMX27LITE; |
| 34 | gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; |
| 35 | |
| 36 | #ifdef CONFIG_MXC_UART |
| 37 | mx27_uart_init_pins(); |
| 38 | #endif |
| 39 | #ifdef CONFIG_FEC_MXC |
| 40 | mx27_fec_init_pins(); |
| 41 | imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31)); |
| 42 | writel(readl(®s->port[PORTC].dr) | (1 << 31), |
| 43 | ®s->port[PORTC].dr); |
| 44 | #endif |
| 45 | #ifdef CONFIG_MXC_MMC |
| 46 | mx27_sd2_init_pins(); |
| 47 | #endif |
| 48 | |
| 49 | return 0; |
| 50 | } |
| 51 | |
| 52 | int dram_init (void) |
| 53 | { |
| 54 | |
| 55 | #if CONFIG_NR_DRAM_BANKS > 0 |
| 56 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 57 | gd->bd->bi_dram[0].size = get_ram_size((volatile void *)PHYS_SDRAM_1, |
| 58 | PHYS_SDRAM_1_SIZE); |
| 59 | #endif |
| 60 | #if CONFIG_NR_DRAM_BANKS > 1 |
| 61 | gd->bd->bi_dram[1].start = PHYS_SDRAM_2; |
| 62 | gd->bd->bi_dram[1].size = get_ram_size((volatile void *)PHYS_SDRAM_2, |
| 63 | PHYS_SDRAM_2_SIZE); |
| 64 | #endif |
| 65 | |
| 66 | return 0; |
| 67 | } |
| 68 | |
| 69 | int checkboard(void) |
| 70 | { |
| 71 | printf("LogicPD imx27lite\n"); |
| 72 | return 0; |
| 73 | } |