at91rm9200ek.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * (C) Copyright 2010 Andreas Bießmann <andreas@biessmann.org>
  3. *
  4. * derived from previous work
  5. *
  6. * (C) Copyright 2002
  7. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  8. * Marius Groeger <mgroeger@sysgo.de>
  9. *
  10. * SPDX-License-Identifier: GPL-2.0+
  11. */
  12. #include <common.h>
  13. #include <netdev.h>
  14. #include <asm/arch/hardware.h>
  15. #include <asm/arch/at91_pio.h>
  16. #include <asm/arch/at91_common.h>
  17. #include <asm/io.h>
  18. DECLARE_GLOBAL_DATA_PTR;
  19. /* ------------------------------------------------------------------------- */
  20. int board_init(void)
  21. {
  22. at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
  23. /*
  24. * Correct IRDA resistor problem
  25. * Set PA23_TXD in Output
  26. */
  27. writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
  28. /* arch number of AT91RM9200EK-Board */
  29. gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
  30. /* adress of boot parameters */
  31. gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  32. return 0;
  33. }
  34. int board_early_init_f(void)
  35. {
  36. at91_seriald_hw_init();
  37. return 0;
  38. }
  39. int dram_init (void)
  40. {
  41. /* dram_init must store complete ramsize in gd->ram_size */
  42. gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
  43. CONFIG_SYS_SDRAM_SIZE);
  44. return 0;
  45. }
  46. #ifdef CONFIG_DRIVER_AT91EMAC
  47. int board_eth_init(bd_t *bis)
  48. {
  49. return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
  50. }
  51. #endif