Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Palm Tungsten|C Support |
| 3 | * |
| 4 | * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.com> |
| 5 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | #include <command.h> |
| 11 | #include <serial.h> |
| 12 | #include <asm/io.h> |
Marek Vasut | 71d058b | 2011-11-26 11:17:32 +0100 | [diff] [blame] | 13 | #include <asm/arch/pxa.h> |
Marek Vasut | d2f3bbd | 2012-09-30 10:09:49 +0000 | [diff] [blame] | 14 | #include <asm/arch/regs-mmc.h> |
Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 15 | |
| 16 | DECLARE_GLOBAL_DATA_PTR; |
| 17 | |
| 18 | /* |
| 19 | * Miscelaneous platform dependent initialisations |
| 20 | */ |
| 21 | |
| 22 | int board_init(void) |
| 23 | { |
Marek Vasut | 1ba68e8 | 2010-10-20 21:06:23 +0200 | [diff] [blame] | 24 | /* We have RAM, disable cache */ |
| 25 | dcache_disable(); |
| 26 | icache_disable(); |
| 27 | |
Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 28 | /* Arch number of Palm Tungsten|C */ |
| 29 | gd->bd->bi_arch_number = MACH_TYPE_PALMTC; |
| 30 | |
| 31 | /* Adress of boot parameters */ |
| 32 | gd->bd->bi_boot_params = 0xa0000100; |
| 33 | |
| 34 | /* Set PWM for LCD */ |
| 35 | writel(0x5f, PWM_CTRL1); |
| 36 | writel(0x3ff, PWM_PERVAL1); |
| 37 | writel(892, PWM_PWDUTY1); |
| 38 | |
| 39 | return 0; |
| 40 | } |
| 41 | |
Marek Vasut | d2f3bbd | 2012-09-30 10:09:49 +0000 | [diff] [blame] | 42 | #ifdef CONFIG_CMD_MMC |
| 43 | int board_mmc_init(bd_t *bis) |
| 44 | { |
| 45 | pxa_mmc_register(0); |
| 46 | return 0; |
| 47 | } |
| 48 | #endif |
| 49 | |
Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 50 | int dram_init(void) |
| 51 | { |
Marek Vasut | 08341be | 2011-11-26 11:18:57 +0100 | [diff] [blame] | 52 | pxa2xx_dram_init(); |
Marek Vasut | 1ba68e8 | 2010-10-20 21:06:23 +0200 | [diff] [blame] | 53 | gd->ram_size = PHYS_SDRAM_1_SIZE; |
| 54 | return 0; |
| 55 | } |
| 56 | |
| 57 | void dram_init_banksize(void) |
| 58 | { |
Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 59 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 60 | gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; |
Marek Vasut | afcb01c | 2010-07-18 05:23:19 +0200 | [diff] [blame] | 61 | } |