sh7785lcr.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (C) 2008 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/io.h>
  8. #include <asm/processor.h>
  9. #include <asm/pci.h>
  10. #include <netdev.h>
  11. int checkboard(void)
  12. {
  13. puts("BOARD: Renesas Technology Corp. R0P7785LC0011RL\n");
  14. return 0;
  15. }
  16. int board_init(void)
  17. {
  18. return 0;
  19. }
  20. static struct pci_controller hose;
  21. void pci_init_board(void)
  22. {
  23. pci_sh7780_init(&hose);
  24. }
  25. int board_eth_init(bd_t *bis)
  26. {
  27. return pci_eth_init(bis);
  28. }
  29. #if defined(CONFIG_SH_32BIT)
  30. int do_pmb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  31. {
  32. /* clear ITLB */
  33. writel(0x00000004, 0xff000010);
  34. /* delete PMB for peripheral */
  35. writel(0, PMB_ADDR_BASE(0));
  36. writel(0, PMB_DATA_BASE(0));
  37. writel(0, PMB_ADDR_BASE(1));
  38. writel(0, PMB_DATA_BASE(1));
  39. writel(0, PMB_ADDR_BASE(2));
  40. writel(0, PMB_DATA_BASE(2));
  41. /* add PMB for SDRAM(0x40000000 - 0x47ffffff) */
  42. writel(mk_pmb_addr_val(0x80), PMB_ADDR_BASE(8));
  43. writel(mk_pmb_data_val(0x40, 0, 1, 1, 0, 1, 1), PMB_DATA_BASE(8));
  44. writel(mk_pmb_addr_val(0xa0), PMB_ADDR_BASE(12));
  45. writel(mk_pmb_data_val(0x40, 1, 1, 1, 0, 0, 1), PMB_DATA_BASE(12));
  46. return 0;
  47. }
  48. U_BOOT_CMD(
  49. pmb, 1, 1, do_pmb,
  50. "pmb - PMB setting\n",
  51. "\n"
  52. " - PMB setting for all SDRAM mapping"
  53. );
  54. #endif