Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Palm LifeDrive Support |
| 3 | * |
| 4 | * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com> |
| 5 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | #include <command.h> |
| 11 | #include <serial.h> |
| 12 | #include <asm/arch/pxa-regs.h> |
Marek Vasut | 4438a45 | 2011-11-26 11:17:32 +0100 | [diff] [blame] | 13 | #include <asm/arch/pxa.h> |
Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 14 | #include <asm/io.h> |
| 15 | |
| 16 | DECLARE_GLOBAL_DATA_PTR; |
| 17 | |
| 18 | /* |
| 19 | * Miscelaneous platform dependent initialisations |
| 20 | */ |
| 21 | |
| 22 | int board_init(void) |
| 23 | { |
Marek Vasut | d2942ee | 2010-10-20 21:04:13 +0200 | [diff] [blame] | 24 | /* We have RAM, disable cache */ |
| 25 | dcache_disable(); |
| 26 | icache_disable(); |
| 27 | |
| 28 | /* arch number of PalmLD */ |
Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 29 | gd->bd->bi_arch_number = MACH_TYPE_PALMLD; |
| 30 | |
| 31 | /* adress of boot parameters */ |
| 32 | gd->bd->bi_boot_params = 0xa0000100; |
| 33 | |
| 34 | /* Set PWM for LCD */ |
| 35 | writel(0x7, PWM_CTRL0); |
| 36 | writel(0x16c, PWM_PERVAL0); |
| 37 | writel(0x11a, PWM_PWDUTY0); |
| 38 | |
| 39 | return 0; |
| 40 | } |
| 41 | |
Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 42 | int dram_init(void) |
| 43 | { |
Marek Vasut | f68d2a2 | 2011-11-26 11:18:57 +0100 | [diff] [blame] | 44 | pxa2xx_dram_init(); |
Marek Vasut | d2942ee | 2010-10-20 21:04:13 +0200 | [diff] [blame] | 45 | gd->ram_size = PHYS_SDRAM_1_SIZE; |
| 46 | return 0; |
| 47 | } |
| 48 | |
| 49 | void dram_init_banksize(void) |
| 50 | { |
Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 51 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 52 | gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; |
Marek Vasut | 6375dad | 2010-07-19 11:23:07 +0200 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) |
| 56 | { |
| 57 | info->portwidth = FLASH_CFI_16BIT; |
| 58 | info->chipwidth = FLASH_CFI_BY16; |
| 59 | info->interface = FLASH_CFI_X16; |
| 60 | return 1; |
| 61 | } |