diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-05 13:13:03 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-05 13:13:03 -0400 |
| commit | 5e66dd6d66ffe758b39b6dcadf2330753ee1159b (patch) | |
| tree | a72cdcff4448e4af9425cc213ddf56ab23e697fe /arch/powerpc/kernel/btext.c | |
| parent | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (diff) | |
| parent | ca78f6baca863afe2e6a244a0fe94b3a70211d46 (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'arch/powerpc/kernel/btext.c')
| -rw-r--r-- | arch/powerpc/kernel/btext.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index a6920919d68e..f4e5e14ee2b6 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c | |||
| @@ -111,7 +111,7 @@ void __init btext_setup_display(int width, int height, int depth, int pitch, | |||
| 111 | logicalDisplayBase = (unsigned char *)address; | 111 | logicalDisplayBase = (unsigned char *)address; |
| 112 | dispDeviceBase = (unsigned char *)address; | 112 | dispDeviceBase = (unsigned char *)address; |
| 113 | dispDeviceRowBytes = pitch; | 113 | dispDeviceRowBytes = pitch; |
| 114 | dispDeviceDepth = depth; | 114 | dispDeviceDepth = depth == 15 ? 16 : depth; |
| 115 | dispDeviceRect[0] = dispDeviceRect[1] = 0; | 115 | dispDeviceRect[0] = dispDeviceRect[1] = 0; |
| 116 | dispDeviceRect[2] = width; | 116 | dispDeviceRect[2] = width; |
| 117 | dispDeviceRect[3] = height; | 117 | dispDeviceRect[3] = height; |
| @@ -160,20 +160,28 @@ int btext_initialize(struct device_node *np) | |||
| 160 | unsigned long address = 0; | 160 | unsigned long address = 0; |
| 161 | u32 *prop; | 161 | u32 *prop; |
| 162 | 162 | ||
| 163 | prop = (u32 *)get_property(np, "width", NULL); | 163 | prop = (u32 *)get_property(np, "linux,bootx-width", NULL); |
| 164 | if (prop == NULL) | ||
| 165 | prop = (u32 *)get_property(np, "width", NULL); | ||
| 164 | if (prop == NULL) | 166 | if (prop == NULL) |
| 165 | return -EINVAL; | 167 | return -EINVAL; |
| 166 | width = *prop; | 168 | width = *prop; |
| 167 | prop = (u32 *)get_property(np, "height", NULL); | 169 | prop = (u32 *)get_property(np, "linux,bootx-height", NULL); |
| 170 | if (prop == NULL) | ||
| 171 | prop = (u32 *)get_property(np, "height", NULL); | ||
| 168 | if (prop == NULL) | 172 | if (prop == NULL) |
| 169 | return -EINVAL; | 173 | return -EINVAL; |
| 170 | height = *prop; | 174 | height = *prop; |
| 171 | prop = (u32 *)get_property(np, "depth", NULL); | 175 | prop = (u32 *)get_property(np, "linux,bootx-depth", NULL); |
| 176 | if (prop == NULL) | ||
| 177 | prop = (u32 *)get_property(np, "depth", NULL); | ||
| 172 | if (prop == NULL) | 178 | if (prop == NULL) |
| 173 | return -EINVAL; | 179 | return -EINVAL; |
| 174 | depth = *prop; | 180 | depth = *prop; |
| 175 | pitch = width * ((depth + 7) / 8); | 181 | pitch = width * ((depth + 7) / 8); |
| 176 | prop = (u32 *)get_property(np, "linebytes", NULL); | 182 | prop = (u32 *)get_property(np, "linux,bootx-linebytes", NULL); |
| 183 | if (prop == NULL) | ||
| 184 | prop = (u32 *)get_property(np, "linebytes", NULL); | ||
| 177 | if (prop) | 185 | if (prop) |
| 178 | pitch = *prop; | 186 | pitch = *prop; |
| 179 | if (pitch == 1) | 187 | if (pitch == 1) |
| @@ -194,7 +202,7 @@ int btext_initialize(struct device_node *np) | |||
| 194 | g_max_loc_Y = height / 16; | 202 | g_max_loc_Y = height / 16; |
| 195 | dispDeviceBase = (unsigned char *)address; | 203 | dispDeviceBase = (unsigned char *)address; |
| 196 | dispDeviceRowBytes = pitch; | 204 | dispDeviceRowBytes = pitch; |
| 197 | dispDeviceDepth = depth; | 205 | dispDeviceDepth = depth == 15 ? 16 : depth; |
| 198 | dispDeviceRect[0] = dispDeviceRect[1] = 0; | 206 | dispDeviceRect[0] = dispDeviceRect[1] = 0; |
| 199 | dispDeviceRect[2] = width; | 207 | dispDeviceRect[2] = width; |
| 200 | dispDeviceRect[3] = height; | 208 | dispDeviceRect[3] = height; |
