blob: 66ae4b6906b54568242ee1cdb34d758689c12b07 [file] [log] [blame]
Łukasz Dałek34cda7a2012-10-15 07:46:54 +00001/*
2 * iPAQ h2200 board configuration
3 *
4 * Copyright (C) 2012 Lukasz Dalek <luk0104@gmail.com>
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Łukasz Dałek34cda7a2012-10-15 07:46:54 +00007 */
8
9#include <common.h>
10#include <asm/arch/pxa.h>
11#include <asm/arch/pxa-regs.h>
12#include <asm/io.h>
Lukasz Daleka33fada2012-11-29 15:55:16 +010013#include <usb.h>
Łukasz Dałek34cda7a2012-10-15 07:46:54 +000014
15DECLARE_GLOBAL_DATA_PTR;
16
Lukasz Daleka33fada2012-11-29 15:55:16 +010017int board_eth_init(bd_t *bis)
18{
19 usb_eth_initialize(bis);
20 return 0;
21}
22
Łukasz Dałek66a62ce2013-01-12 15:32:31 +000023void reset_cpu(ulong ignore)
24{
25 /* Enable VLIO interface on Hamcop */
26 writeb(0x1, 0x4000);
27
28 /* Reset board (cold reset) */
29 writeb(0xff, 0x4002);
30}
31
Łukasz Dałek34cda7a2012-10-15 07:46:54 +000032int board_init(void)
33{
34 /* We have RAM, disable cache */
35 dcache_disable();
36 icache_disable();
37
38 gd->bd->bi_arch_number = MACH_TYPE_H2200;
39
40 /* adress of boot parameters */
41 gd->bd->bi_boot_params = 0xa0000100;
42
Lukasz Daleka33fada2012-11-29 15:55:16 +010043 /* Let host see that device is disconnected */
44 udc_disconnect();
45 mdelay(500);
46
Łukasz Dałek34cda7a2012-10-15 07:46:54 +000047 return 0;
48}
49
50int dram_init(void)
51{
52 /*
53 * Everything except MSC0 was already set up by
54 * 1st stage bootloader.
55 *
56 * This setting enables access to companion chip.
57 */
58 clrsetbits_le32(MSC0, 0xffffffff, CONFIG_SYS_MSC0_VAL);
59 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
60 return 0;
61}