sh7785lcr.c 1.3 KB

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