bsc9131rdb.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright 2011-2012 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/processor.h>
  8. #include <asm/mmu.h>
  9. #include <asm/cache.h>
  10. #include <asm/immap_85xx.h>
  11. #include <asm/io.h>
  12. #include <miiphy.h>
  13. #include <libfdt.h>
  14. #include <fdt_support.h>
  15. #include <fsl_mdio.h>
  16. #include <tsec.h>
  17. #include <jffs2/load_kernel.h>
  18. #include <mtd_node.h>
  19. #include <flash.h>
  20. #include <netdev.h>
  21. DECLARE_GLOBAL_DATA_PTR;
  22. int board_early_init_f(void)
  23. {
  24. ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
  25. clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_GPIO42);
  26. setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_DSP_TMS);
  27. clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_GPIO43);
  28. setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_DSP_TCK |
  29. MPC85xx_PMUXCR2_UART_CTS_B1_SIM_PD);
  30. setbits_be32(&gur->halt_req_mask, HALTED_TO_HALT_REQ_MASK_0);
  31. clrsetbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_IFC_AD_GPIO_MASK |
  32. MPC85xx_PMUXCR_IFC_AD17_GPO_MASK,
  33. MPC85xx_PMUXCR_IFC_AD_GPIO |
  34. MPC85xx_PMUXCR_IFC_AD17_GPO | MPC85xx_PMUXCR_SDHC_USIM);
  35. return 0;
  36. }
  37. int checkboard(void)
  38. {
  39. struct cpu_type *cpu;
  40. cpu = gd->arch.cpu;
  41. printf("Board: %sRDB\n", cpu->name);
  42. return 0;
  43. }
  44. #if defined(CONFIG_OF_BOARD_SETUP)
  45. #ifdef CONFIG_FDT_FIXUP_PARTITIONS
  46. struct node_info nodes[] = {
  47. { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
  48. };
  49. #endif
  50. int ft_board_setup(void *blob, bd_t *bd)
  51. {
  52. phys_addr_t base;
  53. phys_size_t size;
  54. ft_cpu_setup(blob, bd);
  55. base = getenv_bootm_low();
  56. size = getenv_bootm_size();
  57. fdt_fixup_memory(blob, (u64)base, (u64)size);
  58. #ifdef CONFIG_FDT_FIXUP_PARTITIONS
  59. fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
  60. #endif
  61. fsl_fdt_fixup_dr_usb(blob, bd);
  62. return 0;
  63. }
  64. #endif