--- zzzz-none-000/linux-2.4.17/drivers/video/valkyriefb.h 2000-08-05 01:06:34.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/drivers/video/valkyriefb.h 2004-11-24 13:23:17.000000000 +0000 @@ -9,6 +9,8 @@ * * vmode 10 changed by Steven Borley , 14 mai 2000 * + * Ported to 68k Macintosh by David Huggins-Daines + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version @@ -37,12 +39,19 @@ * Copyright (C) 1998 Jon Howell */ +#ifdef CONFIG_MAC +/* Valkyrie registers are word-aligned on m68k */ +#define VALKYRIE_REG_PADSIZE 3 +#else +#define VALKYRIE_REG_PADSIZE 7 +#endif + /* * Structure of the registers for the Valkyrie colormap registers. */ struct cmap_regs { unsigned char addr; - char pad1[7]; + char pad1[VALKYRIE_REG_PADSIZE]; unsigned char lut; }; @@ -52,7 +61,7 @@ struct vpreg { /* padded register */ unsigned char r; - char pad[7]; + char pad[VALKYRIE_REG_PADSIZE]; }; @@ -81,6 +90,7 @@ int vres; }; +#ifndef CONFIG_MAC /* Register values for 1024x768, 75Hz mode (17) */ /* I'm not sure which mode this is (16 or 17), so I'm defining it as 17, * since the equivalent mode in controlfb (which I adapted this from) is @@ -125,14 +135,6 @@ 1024, 768 }; -/* Register values for 832x624, 75Hz mode (13) */ -static struct valkyrie_regvals valkyrie_reg_init_13 = { - 9, - { 23, 42, 3 }, /* pixel clock = 57.07MHz for V=74.27Hz */ - { 832, 0 }, - 832, 624 -}; - /* Register values for 800x600, 72Hz mode (11) */ static struct valkyrie_regvals valkyrie_reg_init_11 = { 13, @@ -140,6 +142,15 @@ { 800, 0 }, 800, 600 }; +#endif /* CONFIG_MAC */ + +/* Register values for 832x624, 75Hz mode (13) */ +static struct valkyrie_regvals valkyrie_reg_init_13 = { + 9, + { 23, 42, 3 }, /* pixel clock = 57.07MHz for V=74.27Hz */ + { 832, 0 }, + 832, 624 +}; /* Register values for 800x600, 60Hz mode (10) */ static struct valkyrie_regvals valkyrie_reg_init_10 = { @@ -177,6 +188,15 @@ NULL, NULL, &valkyrie_reg_init_10, +#ifdef CONFIG_MAC + NULL, + NULL, + &valkyrie_reg_init_13, + NULL, + NULL, + NULL, + NULL, +#else &valkyrie_reg_init_11, NULL, &valkyrie_reg_init_13, @@ -184,6 +204,7 @@ &valkyrie_reg_init_15, NULL, &valkyrie_reg_init_17, +#endif NULL, NULL, NULL