aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pnx8550
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2010-09-18 19:09:09 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-10-04 13:33:57 -0400
commitc1b47e9508f74c152407323260f9fbb980d2fde1 (patch)
tree3e913dd2799fad90bc0856ced4826e97ade33480 /arch/mips/pnx8550
parent863cb9bad8f992a9c171e90552045eac77808e84 (diff)
MIPS: PNX8550: Sort out machine halt, restart and powerdown functions.
No rubbish printks - those belong to userspace. The halt function now actually halts the system and the poweroff function was deleted because it didn't actually power down the system. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pnx8550')
-rw-r--r--arch/mips/pnx8550/common/reset.c20
-rw-r--r--arch/mips/pnx8550/common/setup.c3
2 files changed, 6 insertions, 17 deletions
diff --git a/arch/mips/pnx8550/common/reset.c b/arch/mips/pnx8550/common/reset.c
index fadd8744a6bc..e7a12ff304b9 100644
--- a/arch/mips/pnx8550/common/reset.c
+++ b/arch/mips/pnx8550/common/reset.c
@@ -22,29 +22,19 @@
22 */ 22 */
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24 24
25#include <asm/processor.h>
25#include <asm/reboot.h> 26#include <asm/reboot.h>
26#include <glb.h> 27#include <glb.h>
27 28
28void pnx8550_machine_restart(char *command) 29void pnx8550_machine_restart(char *command)
29{ 30{
30 char head[] = "************* Machine restart *************";
31 char foot[] = "*******************************************";
32
33 printk("\n\n");
34 printk("%s\n", head);
35 if (command != NULL)
36 printk("* %s\n", command);
37 printk("%s\n", foot);
38
39 PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; 31 PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST;
40} 32}
41 33
42void pnx8550_machine_halt(void) 34void pnx8550_machine_halt(void)
43{ 35{
44 printk("*** Machine halt. (Not implemented) ***\n"); 36 while (1) {
45} 37 if (cpu_wait)
46 38 cpu_wait();
47void pnx8550_machine_power_off(void) 39 }
48{
49 printk("*** Machine power off. (Not implemented) ***\n");
50} 40}
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c
index 64246c9c875c..43cb3945fdbf 100644
--- a/arch/mips/pnx8550/common/setup.c
+++ b/arch/mips/pnx8550/common/setup.c
@@ -44,7 +44,6 @@
44extern void __init board_setup(void); 44extern void __init board_setup(void);
45extern void pnx8550_machine_restart(char *); 45extern void pnx8550_machine_restart(char *);
46extern void pnx8550_machine_halt(void); 46extern void pnx8550_machine_halt(void);
47extern void pnx8550_machine_power_off(void);
48extern struct resource ioport_resource; 47extern struct resource ioport_resource;
49extern struct resource iomem_resource; 48extern struct resource iomem_resource;
50extern char *prom_getcmdline(void); 49extern char *prom_getcmdline(void);
@@ -100,7 +99,7 @@ void __init plat_mem_setup(void)
100 99
101 _machine_restart = pnx8550_machine_restart; 100 _machine_restart = pnx8550_machine_restart;
102 _machine_halt = pnx8550_machine_halt; 101 _machine_halt = pnx8550_machine_halt;
103 pm_power_off = pnx8550_machine_power_off; 102 pm_power_off = pnx8550_machine_halt;
104 103
105 /* Clear the Global 2 Register, PCI Inta Output Enable Registers 104 /* Clear the Global 2 Register, PCI Inta Output Enable Registers
106 Bit 1:Enable DAC Powerdown 105 Bit 1:Enable DAC Powerdown
792' href='#n792'>792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
PK