palmld.c 1.1 KB

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