init.c 885 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Xilfpga platform setup
  3. *
  4. * Copyright (C) 2015 Imagination Technologies
  5. * Author: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms and conditions of the GNU General Public License,
  9. * version 2, as published by the Free Software Foundation.
  10. */
  11. #include <linux/of_fdt.h>
  12. #include <asm/prom.h>
  13. #define XILFPGA_UART_BASE 0xb0401000
  14. const char *get_system_type(void)
  15. {
  16. return "MIPSfpga";
  17. }
  18. void __init plat_mem_setup(void)
  19. {
  20. __dt_setup_arch(__dtb_start);
  21. strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
  22. }
  23. void __init prom_init(void)
  24. {
  25. setup_8250_early_printk_port(XILFPGA_UART_BASE, 2, 50000);
  26. }
  27. void __init prom_free_prom_memory(void)
  28. {
  29. }
  30. void __init device_tree_init(void)
  31. {
  32. if (!initial_boot_params)
  33. return;
  34. unflatten_and_copy_device_tree();
  35. }