prom.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
  3. * JZ4740 SoC prom code
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. *
  10. * You should have received a copy of the GNU General Public License along
  11. * with this program; if not, write to the Free Software Foundation, Inc.,
  12. * 675 Mass Ave, Cambridge, MA 02139, USA.
  13. *
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/init.h>
  17. #include <linux/string.h>
  18. #include <linux/serial_reg.h>
  19. #include <asm/bootinfo.h>
  20. #include <asm/mach-jz4740/base.h>
  21. static __init void jz4740_init_cmdline(int argc, char *argv[])
  22. {
  23. unsigned int count = COMMAND_LINE_SIZE - 1;
  24. int i;
  25. char *dst = &(arcs_cmdline[0]);
  26. char *src;
  27. for (i = 1; i < argc && count; ++i) {
  28. src = argv[i];
  29. while (*src && count) {
  30. *dst++ = *src++;
  31. --count;
  32. }
  33. *dst++ = ' ';
  34. }
  35. if (i > 1)
  36. --dst;
  37. *dst = 0;
  38. }
  39. void __init prom_init(void)
  40. {
  41. jz4740_init_cmdline((int)fw_arg0, (char **)fw_arg1);
  42. mips_machtype = MACH_INGENIC_JZ4740;
  43. }
  44. void __init prom_free_prom_memory(void)
  45. {
  46. }