h2200.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #include <common.h>
  9. #include <asm/arch/pxa.h>
  10. #include <asm/arch/pxa-regs.h>
  11. #include <asm/io.h>
  12. #include <usb.h>
  13. DECLARE_GLOBAL_DATA_PTR;
  14. int board_eth_init(bd_t *bis)
  15. {
  16. usb_eth_initialize(bis);
  17. return 0;
  18. }
  19. void reset_cpu(ulong ignore)
  20. {
  21. /* Enable VLIO interface on Hamcop */
  22. writeb(0x1, 0x4000);
  23. /* Reset board (cold reset) */
  24. writeb(0xff, 0x4002);
  25. }
  26. int board_init(void)
  27. {
  28. /* We have RAM, disable cache */
  29. dcache_disable();
  30. icache_disable();
  31. gd->bd->bi_arch_number = MACH_TYPE_H2200;
  32. /* adress of boot parameters */
  33. gd->bd->bi_boot_params = 0xa0000100;
  34. /* Let host see that device is disconnected */
  35. udc_disconnect();
  36. mdelay(500);
  37. return 0;
  38. }
  39. int dram_init(void)
  40. {
  41. /*
  42. * Everything except MSC0 was already set up by
  43. * 1st stage bootloader.
  44. *
  45. * This setting enables access to companion chip.
  46. */
  47. clrsetbits_le32(MSC0, 0xffffffff, CONFIG_SYS_MSC0_VAL);
  48. gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
  49. return 0;
  50. }
  51. #ifdef CONFIG_USB_GADGET_PXA2XX
  52. int board_usb_init(int index, enum usb_init_type init)
  53. {
  54. return 0;
  55. }
  56. int board_usb_cleanup(int index, enum usb_init_type init)
  57. {
  58. return 0;
  59. }
  60. #endif