Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Platform dependent support for DIG64 platforms. |
| 3 | * |
| 4 | * Copyright (C) 1999 Intel Corp. |
| 5 | * Copyright (C) 1999, 2001 Hewlett-Packard Co |
| 6 | * Copyright (C) 1999, 2001, 2003 David Mosberger-Tang <davidm@hpl.hp.com> |
| 7 | * Copyright (C) 1999 VA Linux Systems |
| 8 | * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> |
| 9 | * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com> |
| 10 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/delay.h> |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/kdev_t.h> |
| 16 | #include <linux/string.h> |
Jon Smirl | 894673e | 2006-07-10 04:44:13 -0700 | [diff] [blame] | 17 | #include <linux/screen_info.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <linux/console.h> |
| 19 | #include <linux/timex.h> |
| 20 | #include <linux/sched.h> |
| 21 | #include <linux/root_dev.h> |
| 22 | |
| 23 | #include <asm/io.h> |
| 24 | #include <asm/machvec.h> |
David Howells | c140d87 | 2012-03-28 18:30:02 +0100 | [diff] [blame] | 25 | #include <asm/setup.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | void __init |
| 28 | dig_setup (char **cmdline_p) |
| 29 | { |
| 30 | unsigned int orig_x, orig_y, num_cols, num_rows, font_height; |
| 31 | |
| 32 | /* |
| 33 | * Default to /dev/sda2. This assumes that the EFI partition |
| 34 | * is physical disk 1 partition 1 and the Linux root disk is |
| 35 | * physical disk 1 partition 2. |
| 36 | */ |
| 37 | ROOT_DEV = Root_SDA2; /* default to second partition on first drive */ |
| 38 | |
| 39 | #ifdef CONFIG_SMP |
| 40 | init_smp_config(); |
| 41 | #endif |
| 42 | |
| 43 | memset(&screen_info, 0, sizeof(screen_info)); |
| 44 | |
| 45 | if (!ia64_boot_param->console_info.num_rows |
| 46 | || !ia64_boot_param->console_info.num_cols) |
| 47 | { |
| 48 | printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n"); |
| 49 | orig_x = 0; |
| 50 | orig_y = 0; |
| 51 | num_cols = 80; |
| 52 | num_rows = 25; |
| 53 | font_height = 16; |
| 54 | } else { |
| 55 | orig_x = ia64_boot_param->console_info.orig_x; |
| 56 | orig_y = ia64_boot_param->console_info.orig_y; |
| 57 | num_cols = ia64_boot_param->console_info.num_cols; |
| 58 | num_rows = ia64_boot_param->console_info.num_rows; |
| 59 | font_height = 400 / num_rows; |
| 60 | } |
| 61 | |
| 62 | screen_info.orig_x = orig_x; |
| 63 | screen_info.orig_y = orig_y; |
| 64 | screen_info.orig_video_cols = num_cols; |
| 65 | screen_info.orig_video_lines = num_rows; |
| 66 | screen_info.orig_video_points = font_height; |
| 67 | screen_info.orig_video_mode = 3; /* XXX fake */ |
| 68 | screen_info.orig_video_isVGA = 1; /* XXX fake */ |
| 69 | screen_info.orig_video_ega_bx = 3; /* XXX fake */ |
| 70 | } |