bsc9131rdb.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright 2011-2012 Freescale Semiconductor, Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #include <common.h>
  23. #include <asm/processor.h>
  24. #include <asm/mmu.h>
  25. #include <asm/cache.h>
  26. #include <asm/immap_85xx.h>
  27. #include <asm/io.h>
  28. #include <miiphy.h>
  29. #include <libfdt.h>
  30. #include <fdt_support.h>
  31. #include <fsl_mdio.h>
  32. #include <tsec.h>
  33. #include <netdev.h>
  34. DECLARE_GLOBAL_DATA_PTR;
  35. int board_early_init_f(void)
  36. {
  37. ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
  38. clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_GPIO42);
  39. setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_DSP_TMS);
  40. clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_GPIO43);
  41. setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_DSP_TCK |
  42. MPC85xx_PMUXCR2_UART_CTS_B1_SIM_PD);
  43. setbits_be32(&gur->halt_req_mask, HALTED_TO_HALT_REQ_MASK_0);
  44. clrsetbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_IFC_AD_GPIO_MASK |
  45. MPC85xx_PMUXCR_IFC_AD17_GPO_MASK,
  46. MPC85xx_PMUXCR_IFC_AD_GPIO |
  47. MPC85xx_PMUXCR_IFC_AD17_GPO | MPC85xx_PMUXCR_SDHC_USIM);
  48. return 0;
  49. }
  50. int checkboard(void)
  51. {
  52. struct cpu_type *cpu;
  53. cpu = gd->arch.cpu;
  54. printf("Board: %sRDB\n", cpu->name);
  55. return 0;
  56. }
  57. #if defined(CONFIG_OF_BOARD_SETUP)
  58. void ft_board_setup(void *blob, bd_t *bd)
  59. {
  60. phys_addr_t base;
  61. phys_size_t size;
  62. ft_cpu_setup(blob, bd);
  63. base = getenv_bootm_low();
  64. size = getenv_bootm_size();
  65. fdt_fixup_memory(blob, (u64)base, (u64)size);
  66. fdt_fixup_dr_usb(blob, bd);
  67. }
  68. #endif