diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/dts/gef_sbc610.dts | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc610.c | 40 |
2 files changed, 44 insertions, 0 deletions
diff --git a/arch/powerpc/boot/dts/gef_sbc610.dts b/arch/powerpc/boot/dts/gef_sbc610.dts index 771a776d6101..6ed608322ddc 100644 --- a/arch/powerpc/boot/dts/gef_sbc610.dts +++ b/arch/powerpc/boot/dts/gef_sbc610.dts | |||
@@ -84,6 +84,10 @@ | |||
84 | 6 0 0xfd000000 0x00800000 // IO FPGA (8-bit) | 84 | 6 0 0xfd000000 0x00800000 // IO FPGA (8-bit) |
85 | 7 0 0xfd800000 0x00800000>; // IO FPGA (32-bit) | 85 | 7 0 0xfd800000 0x00800000>; // IO FPGA (32-bit) |
86 | 86 | ||
87 | fpga@4,0 { | ||
88 | compatible = "gef,fpga-regs"; | ||
89 | reg = <0x4 0x0 0x40>; | ||
90 | }; | ||
87 | gef_pic: pic@4,4000 { | 91 | gef_pic: pic@4,4000 { |
88 | #interrupt-cells = <1>; | 92 | #interrupt-cells = <1>; |
89 | interrupt-controller; | 93 | interrupt-controller; |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index 3873c2018cc3..821c45fac18b 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
@@ -73,6 +73,7 @@ static void __init gef_sbc610_init_irq(void) | |||
73 | 73 | ||
74 | static void __init gef_sbc610_setup_arch(void) | 74 | static void __init gef_sbc610_setup_arch(void) |
75 | { | 75 | { |
76 | struct device_node *regs; | ||
76 | #ifdef CONFIG_PCI | 77 | #ifdef CONFIG_PCI |
77 | struct device_node *np; | 78 | struct device_node *np; |
78 | 79 | ||
@@ -86,8 +87,43 @@ static void __init gef_sbc610_setup_arch(void) | |||
86 | #ifdef CONFIG_SMP | 87 | #ifdef CONFIG_SMP |
87 | mpc86xx_smp_init(); | 88 | mpc86xx_smp_init(); |
88 | #endif | 89 | #endif |
90 | |||
91 | /* Remap basic board registers */ | ||
92 | regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); | ||
93 | if (regs) { | ||
94 | sbc610_regs = of_iomap(regs, 0); | ||
95 | if (sbc610_regs == NULL) | ||
96 | printk(KERN_WARNING "Unable to map board registers\n"); | ||
97 | of_node_put(regs); | ||
98 | } | ||
99 | } | ||
100 | |||
101 | /* Return the PCB revision */ | ||
102 | static unsigned int gef_sbc610_get_pcb_rev(void) | ||
103 | { | ||
104 | unsigned int reg; | ||
105 | |||
106 | reg = ioread32(sbc610_regs); | ||
107 | return (reg >> 8) & 0xff; | ||
108 | } | ||
109 | |||
110 | /* Return the board (software) revision */ | ||
111 | static unsigned int gef_sbc610_get_board_rev(void) | ||
112 | { | ||
113 | unsigned int reg; | ||
114 | |||
115 | reg = ioread32(sbc610_regs); | ||
116 | return (reg >> 16) & 0xff; | ||
89 | } | 117 | } |
90 | 118 | ||
119 | /* Return the FPGA revision */ | ||
120 | static unsigned int gef_sbc610_get_fpga_rev(void) | ||
121 | { | ||
122 | unsigned int reg; | ||
123 | |||
124 | reg = ioread32(sbc610_regs); | ||
125 | return (reg >> 24) & 0xf; | ||
126 | } | ||
91 | 127 | ||
92 | static void gef_sbc610_show_cpuinfo(struct seq_file *m) | 128 | static void gef_sbc610_show_cpuinfo(struct seq_file *m) |
93 | { | 129 | { |
@@ -96,6 +132,10 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m) | |||
96 | 132 | ||
97 | seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); | 133 | seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); |
98 | 134 | ||
135 | seq_printf(m, "Revision\t: %u%c\n", gef_sbc610_get_pcb_rev(), | ||
136 | ('A' + gef_sbc610_get_board_rev() - 1)); | ||
137 | seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev()); | ||
138 | |||
99 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 139 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
100 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | 140 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); |
101 | } | 141 | } |