sh7763rdp.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (C) 2008 Renesas Solutions Corp.
  3. * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
  4. * Copyright (C) 2007 Kenati Technologies, Inc.
  5. *
  6. * board/sh7763rdp/sh7763rdp.c
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include <common.h>
  24. #include <asm/io.h>
  25. #include <asm/processor.h>
  26. #define CPU_CMDREG 0xB1000006
  27. #define PDCR 0xffef0006
  28. #define PECR 0xffef0008
  29. #define PFCR 0xffef000a
  30. #define PGCR 0xffef000c
  31. #define PHCR 0xffef000e
  32. #define PJCR 0xffef0012
  33. #define PKCR 0xffef0014
  34. #define PLCR 0xffef0016
  35. #define PMCR 0xffef0018
  36. #define PSEL1 0xffef0072
  37. #define PSEL2 0xffef0074
  38. #define PSEL3 0xffef0076
  39. int checkboard(void)
  40. {
  41. puts("BOARD: Renesas SH7763 RDP\n");
  42. return 0;
  43. }
  44. int board_init(void)
  45. {
  46. vu_short dat;
  47. *(vu_short *)(CPU_CMDREG) |= 0x0001;
  48. /* GPIO Setting (eth1) */
  49. dat = *(vu_short *)(PSEL1);
  50. *(vu_short *)PSEL1 = ((dat & ~0xff00) | 0x2400);
  51. *(vu_short *)PFCR = 0;
  52. *(vu_short *)PGCR = 0;
  53. *(vu_short *)PHCR = 0;
  54. return 0;
  55. }
  56. int dram_init (void)
  57. {
  58. DECLARE_GLOBAL_DATA_PTR;
  59. gd->bd->bi_memstart = CFG_SDRAM_BASE;
  60. gd->bd->bi_memsize = CFG_SDRAM_SIZE;
  61. printf("DRAM: %dMB\n", CFG_SDRAM_SIZE / (1024 * 1024));
  62. return 0;
  63. }
  64. void led_set_state (unsigned short value)
  65. {
  66. }