diff options
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r-- | arch/m68k/mac/config.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index e48069da04ed..982c3fe73c4a 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/setup.h> | 29 | #include <asm/setup.h> |
30 | #include <asm/bootinfo.h> | 30 | #include <asm/bootinfo.h> |
31 | #include <asm/bootinfo-mac.h> | 31 | #include <asm/bootinfo-mac.h> |
32 | #include <asm/byteorder.h> | ||
32 | 33 | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -107,45 +108,46 @@ static void __init mac_sched_init(irq_handler_t vector) | |||
107 | int __init mac_parse_bootinfo(const struct bi_record *record) | 108 | int __init mac_parse_bootinfo(const struct bi_record *record) |
108 | { | 109 | { |
109 | int unknown = 0; | 110 | int unknown = 0; |
110 | const u_long *data = record->data; | 111 | const void *data = record->data; |
111 | 112 | ||
112 | switch (record->tag) { | 113 | switch (be16_to_cpu(record->tag)) { |
113 | case BI_MAC_MODEL: | 114 | case BI_MAC_MODEL: |
114 | mac_bi_data.id = *data; | 115 | mac_bi_data.id = be32_to_cpup(data); |
115 | break; | 116 | break; |
116 | case BI_MAC_VADDR: | 117 | case BI_MAC_VADDR: |
117 | mac_bi_data.videoaddr = *data; | 118 | mac_bi_data.videoaddr = be32_to_cpup(data); |
118 | break; | 119 | break; |
119 | case BI_MAC_VDEPTH: | 120 | case BI_MAC_VDEPTH: |
120 | mac_bi_data.videodepth = *data; | 121 | mac_bi_data.videodepth = be32_to_cpup(data); |
121 | break; | 122 | break; |
122 | case BI_MAC_VROW: | 123 | case BI_MAC_VROW: |
123 | mac_bi_data.videorow = *data; | 124 | mac_bi_data.videorow = be32_to_cpup(data); |
124 | break; | 125 | break; |
125 | case BI_MAC_VDIM: | 126 | case BI_MAC_VDIM: |
126 | mac_bi_data.dimensions = *data; | 127 | mac_bi_data.dimensions = be32_to_cpup(data); |
127 | break; | 128 | break; |
128 | case BI_MAC_VLOGICAL: | 129 | case BI_MAC_VLOGICAL: |
129 | mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK); | 130 | mac_orig_videoaddr = be32_to_cpup(data); |
130 | mac_orig_videoaddr = *data; | 131 | mac_bi_data.videological = |
132 | VIDEOMEMBASE + (mac_orig_videoaddr & ~VIDEOMEMMASK); | ||
131 | break; | 133 | break; |
132 | case BI_MAC_SCCBASE: | 134 | case BI_MAC_SCCBASE: |
133 | mac_bi_data.sccbase = *data; | 135 | mac_bi_data.sccbase = be32_to_cpup(data); |
134 | break; | 136 | break; |
135 | case BI_MAC_BTIME: | 137 | case BI_MAC_BTIME: |
136 | mac_bi_data.boottime = *data; | 138 | mac_bi_data.boottime = be32_to_cpup(data); |
137 | break; | 139 | break; |
138 | case BI_MAC_GMTBIAS: | 140 | case BI_MAC_GMTBIAS: |
139 | mac_bi_data.gmtbias = *data; | 141 | mac_bi_data.gmtbias = be32_to_cpup(data); |
140 | break; | 142 | break; |
141 | case BI_MAC_MEMSIZE: | 143 | case BI_MAC_MEMSIZE: |
142 | mac_bi_data.memsize = *data; | 144 | mac_bi_data.memsize = be32_to_cpup(data); |
143 | break; | 145 | break; |
144 | case BI_MAC_CPUID: | 146 | case BI_MAC_CPUID: |
145 | mac_bi_data.cpuid = *data; | 147 | mac_bi_data.cpuid = be32_to_cpup(data); |
146 | break; | 148 | break; |
147 | case BI_MAC_ROMBASE: | 149 | case BI_MAC_ROMBASE: |
148 | mac_bi_data.rombase = *data; | 150 | mac_bi_data.rombase = be32_to_cpup(data); |
149 | break; | 151 | break; |
150 | default: | 152 | default: |
151 | unknown = 1; | 153 | unknown = 1; |