]> git.sur5r.net Git - u-boot/blob - board/h2200/h2200.c
Merge git://www.denx.de/git/u-boot-imx
[u-boot] / board / h2200 / h2200.c
1 /*
2  * iPAQ h2200 board configuration
3  *
4  * Copyright (C) 2012 Lukasz Dalek <luk0104@gmail.com>
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #include <common.h>
10 #include <asm/arch/pxa.h>
11 #include <asm/arch/pxa-regs.h>
12 #include <asm/io.h>
13 #include <usb.h>
14 #include <asm/mach-types.h>
15
16 DECLARE_GLOBAL_DATA_PTR;
17
18 int board_eth_init(bd_t *bis)
19 {
20         usb_eth_initialize(bis);
21         return 0;
22 }
23
24 void reset_cpu(ulong ignore)
25 {
26         /* Enable VLIO interface on Hamcop */
27         writeb(0x1, 0x4000);
28
29         /* Reset board (cold reset) */
30         writeb(0xff, 0x4002);
31 }
32
33 int board_init(void)
34 {
35         /* We have RAM, disable cache */
36         dcache_disable();
37         icache_disable();
38
39         gd->bd->bi_arch_number = MACH_TYPE_H2200;
40
41         /* adress of boot parameters */
42         gd->bd->bi_boot_params = 0xa0000100;
43
44         /* Let host see that device is disconnected */
45         udc_disconnect();
46         mdelay(500);
47
48         return 0;
49 }
50
51 int dram_init(void)
52 {
53         /*
54          * Everything except MSC0 was already set up by
55          * 1st stage bootloader.
56          *
57          * This setting enables access to companion chip.
58          */
59         clrsetbits_le32(MSC0, 0xffffffff, CONFIG_SYS_MSC0_VAL);
60         gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
61         return 0;
62 }
63
64 #ifdef CONFIG_USB_GADGET_PXA2XX
65 int board_usb_init(int index, enum usb_init_type init)
66 {
67         return 0;
68 }
69
70 int board_usb_cleanup(int index, enum usb_init_type init)
71 {
72         return 0;
73 }
74 #endif