Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 1 | /* |
| 2 | * arch/powerpc/platforms/83xx/sbc834x.c |
| 3 | * |
| 4 | * Wind River SBC834x board specific routines |
| 5 | * |
| 6 | * By Paul Gortmaker (see MAINTAINERS for contact information) |
| 7 | * |
| 8 | * Based largely on the mpc834x_mds.c support by Kumar Gala. |
| 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 | |
| 16 | #include <linux/stddef.h> |
| 17 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> |
| 19 | #include <linux/errno.h> |
| 20 | #include <linux/reboot.h> |
| 21 | #include <linux/pci.h> |
| 22 | #include <linux/kdev_t.h> |
| 23 | #include <linux/major.h> |
| 24 | #include <linux/console.h> |
| 25 | #include <linux/delay.h> |
| 26 | #include <linux/seq_file.h> |
| 27 | #include <linux/root_dev.h> |
| 28 | #include <linux/of_platform.h> |
| 29 | |
| 30 | #include <asm/system.h> |
Arun Sharma | 6006349 | 2011-07-26 16:09:06 -0700 | [diff] [blame] | 31 | #include <linux/atomic.h> |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 32 | #include <asm/time.h> |
| 33 | #include <asm/io.h> |
| 34 | #include <asm/machdep.h> |
| 35 | #include <asm/ipic.h> |
| 36 | #include <asm/irq.h> |
| 37 | #include <asm/prom.h> |
| 38 | #include <asm/udbg.h> |
| 39 | #include <sysdev/fsl_soc.h> |
John Rigby | 76fe1ff | 2008-06-26 11:07:57 -0600 | [diff] [blame] | 40 | #include <sysdev/fsl_pci.h> |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 41 | |
| 42 | #include "mpc83xx.h" |
| 43 | |
| 44 | /* ************************************************************************ |
| 45 | * |
| 46 | * Setup the architecture |
| 47 | * |
| 48 | */ |
| 49 | static void __init sbc834x_setup_arch(void) |
| 50 | { |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 51 | if (ppc_md.progress) |
| 52 | ppc_md.progress("sbc834x_setup_arch()", 0); |
| 53 | |
Dmitry Eremin-Solenikov | bede480 | 2011-11-17 18:48:48 +0400 | [diff] [blame] | 54 | mpc83xx_setup_pci(); |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 55 | } |
| 56 | |
Dmitry Eremin-Solenikov | 7669d58 | 2011-11-17 18:48:47 +0400 | [diff] [blame] | 57 | machine_device_initcall(sbc834x, mpc83xx_declare_of_platform_devices); |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 58 | |
| 59 | /* |
| 60 | * Called very early, MMU is off, device-tree isn't unflattened |
| 61 | */ |
| 62 | static int __init sbc834x_probe(void) |
| 63 | { |
| 64 | unsigned long root = of_get_flat_dt_root(); |
| 65 | |
Paul Gortmaker | dabc784 | 2011-12-05 11:41:07 -0500 | [diff] [blame] | 66 | return of_flat_dt_is_compatible(root, "SBC834xE"); |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | define_machine(sbc834x) { |
Paul Gortmaker | dabc784 | 2011-12-05 11:41:07 -0500 | [diff] [blame] | 70 | .name = "SBC834xE", |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 71 | .probe = sbc834x_probe, |
| 72 | .setup_arch = sbc834x_setup_arch, |
Dmitry Eremin-Solenikov | d4fb5eb | 2011-07-22 23:55:42 +0400 | [diff] [blame] | 73 | .init_IRQ = mpc83xx_ipic_init_IRQ, |
Paul Gortmaker | a43414c | 2008-01-24 18:41:30 -0500 | [diff] [blame] | 74 | .get_irq = ipic_get_irq, |
| 75 | .restart = mpc83xx_restart, |
| 76 | .time_init = mpc83xx_time_init, |
| 77 | .calibrate_decr = generic_calibrate_decr, |
| 78 | .progress = udbg_progress, |
| 79 | }; |