sbc8641d.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * SBC8641D board specific routines
  3. *
  4. * Copyright 2008 Wind River Systems Inc.
  5. *
  6. * By Paul Gortmaker (see MAINTAINERS for contact information)
  7. *
  8. * Based largely on the 8641 HPCN support by Freescale Semiconductor Inc.
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at your
  13. * option) any later version.
  14. */
  15. #include <linux/stddef.h>
  16. #include <linux/kernel.h>
  17. #include <linux/pci.h>
  18. #include <linux/kdev_t.h>
  19. #include <linux/delay.h>
  20. #include <linux/seq_file.h>
  21. #include <linux/of_platform.h>
  22. #include <asm/time.h>
  23. #include <asm/machdep.h>
  24. #include <asm/pci-bridge.h>
  25. #include <asm/prom.h>
  26. #include <mm/mmu_decl.h>
  27. #include <asm/udbg.h>
  28. #include <asm/mpic.h>
  29. #include <sysdev/fsl_pci.h>
  30. #include <sysdev/fsl_soc.h>
  31. #include "mpc86xx.h"
  32. static void __init
  33. sbc8641_setup_arch(void)
  34. {
  35. if (ppc_md.progress)
  36. ppc_md.progress("sbc8641_setup_arch()", 0);
  37. printk("SBC8641 board from Wind River\n");
  38. #ifdef CONFIG_SMP
  39. mpc86xx_smp_init();
  40. #endif
  41. fsl_pci_assign_primary();
  42. }
  43. static void
  44. sbc8641_show_cpuinfo(struct seq_file *m)
  45. {
  46. uint svid = mfspr(SPRN_SVR);
  47. seq_printf(m, "Vendor\t\t: Wind River Systems\n");
  48. seq_printf(m, "SVR\t\t: 0x%x\n", svid);
  49. }
  50. /*
  51. * Called very early, device-tree isn't unflattened
  52. */
  53. static int __init sbc8641_probe(void)
  54. {
  55. if (of_machine_is_compatible("wind,sbc8641"))
  56. return 1; /* Looks good */
  57. return 0;
  58. }
  59. machine_arch_initcall(sbc8641, mpc86xx_common_publish_devices);
  60. define_machine(sbc8641) {
  61. .name = "SBC8641D",
  62. .probe = sbc8641_probe,
  63. .setup_arch = sbc8641_setup_arch,
  64. .init_IRQ = mpc86xx_init_irq,
  65. .show_cpuinfo = sbc8641_show_cpuinfo,
  66. .get_irq = mpic_get_irq,
  67. .time_init = mpc86xx_time_init,
  68. .calibrate_decr = generic_calibrate_decr,
  69. .progress = udbg_progress,
  70. #ifdef CONFIG_PCI
  71. .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
  72. #endif
  73. };