Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 740e518e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[PATCH] 64bit resource: C99 changes for struct resource declarations



Based on an original patch from Ralf Baechle <ralf@linux-mips.org> and
Vivek Goyal <vgoyal@in.ibm.com>.  This is needed in order to prepare for
changing the size of resources.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d38b6968
Loading
Loading
Loading
Loading
+36 −6
Original line number Original line Diff line number Diff line
@@ -119,9 +119,24 @@ DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data);
 * Standard memory resources
 * Standard memory resources
 */
 */
static struct resource mem_res[] = {
static struct resource mem_res[] = {
	{ "Video RAM",   0,     0,     IORESOURCE_MEM			},
	{
	{ "Kernel text", 0,     0,     IORESOURCE_MEM			},
		.name = "Video RAM",
	{ "Kernel data", 0,     0,     IORESOURCE_MEM			}
		.start = 0,
		.end = 0,
		.flags = IORESOURCE_MEM
	},
	{
		.name = "Kernel text",
		.start = 0,
		.end = 0,
		.flags = IORESOURCE_MEM
	},
	{
		.name = "Kernel data",
		.start = 0,
		.end = 0,
		.flags = IORESOURCE_MEM
	}
};
};


#define video_ram   mem_res[0]
#define video_ram   mem_res[0]
@@ -129,9 +144,24 @@ static struct resource mem_res[] = {
#define kernel_data mem_res[2]
#define kernel_data mem_res[2]


static struct resource io_res[] = {
static struct resource io_res[] = {
	{ "reserved",    0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY },
	{
	{ "reserved",    0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY },
		.name = "reserved",
	{ "reserved",    0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY }
		.start = 0x3bc,
		.end = 0x3be,
		.flags = IORESOURCE_IO | IORESOURCE_BUSY
	},
	{
		.name = "reserved",
		.start = 0x378,
		.end = 0x37f,
		.flags = IORESOURCE_IO | IORESOURCE_BUSY
	},
	{
		.name = "reserved",
		.start = 0x278,
		.end = 0x27f,
		.flags = IORESOURCE_IO | IORESOURCE_BUSY
	}
};
};


#define lp0 io_res[0]
#define lp0 io_res[0]
+6 −6
Original line number Original line Diff line number Diff line
@@ -390,7 +390,7 @@ static const char *vgacon_startup(void)
		vga_video_port_val = VGA_CRT_DM;
		vga_video_port_val = VGA_CRT_DM;
		if ((ORIG_VIDEO_EGA_BX & 0xff) != 0x10) {
		if ((ORIG_VIDEO_EGA_BX & 0xff) != 0x10) {
			static struct resource ega_console_resource =
			static struct resource ega_console_resource =
			    { "ega", 0x3B0, 0x3BF };
			    { .name = "ega", .start = 0x3B0, .end = 0x3BF };
			vga_video_type = VIDEO_TYPE_EGAM;
			vga_video_type = VIDEO_TYPE_EGAM;
			vga_vram_size = 0x8000;
			vga_vram_size = 0x8000;
			display_desc = "EGA+";
			display_desc = "EGA+";
@@ -398,9 +398,9 @@ static const char *vgacon_startup(void)
					 &ega_console_resource);
					 &ega_console_resource);
		} else {
		} else {
			static struct resource mda1_console_resource =
			static struct resource mda1_console_resource =
			    { "mda", 0x3B0, 0x3BB };
			    { .name = "mda", .start = 0x3B0, .end = 0x3BB };
			static struct resource mda2_console_resource =
			static struct resource mda2_console_resource =
			    { "mda", 0x3BF, 0x3BF };
			    { .name = "mda", .start = 0x3BF, .end = 0x3BF };
			vga_video_type = VIDEO_TYPE_MDA;
			vga_video_type = VIDEO_TYPE_MDA;
			vga_vram_size = 0x2000;
			vga_vram_size = 0x2000;
			display_desc = "*MDA";
			display_desc = "*MDA";
@@ -423,14 +423,14 @@ static const char *vgacon_startup(void)


			if (!ORIG_VIDEO_ISVGA) {
			if (!ORIG_VIDEO_ISVGA) {
				static struct resource ega_console_resource
				static struct resource ega_console_resource
				    = { "ega", 0x3C0, 0x3DF };
				    = { .name = "ega", .start = 0x3C0, .end = 0x3DF };
				vga_video_type = VIDEO_TYPE_EGAC;
				vga_video_type = VIDEO_TYPE_EGAC;
				display_desc = "EGA";
				display_desc = "EGA";
				request_resource(&ioport_resource,
				request_resource(&ioport_resource,
						 &ega_console_resource);
						 &ega_console_resource);
			} else {
			} else {
				static struct resource vga_console_resource
				static struct resource vga_console_resource
				    = { "vga+", 0x3C0, 0x3DF };
				    = { .name = "vga+", .start = 0x3C0, .end = 0x3DF };
				vga_video_type = VIDEO_TYPE_VGAC;
				vga_video_type = VIDEO_TYPE_VGAC;
				display_desc = "VGA+";
				display_desc = "VGA+";
				request_resource(&ioport_resource,
				request_resource(&ioport_resource,
@@ -474,7 +474,7 @@ static const char *vgacon_startup(void)
			}
			}
		} else {
		} else {
			static struct resource cga_console_resource =
			static struct resource cga_console_resource =
			    { "cga", 0x3D4, 0x3D5 };
			    { .name = "cga", .start = 0x3D4, .end = 0x3D5 };
			vga_video_type = VIDEO_TYPE_CGA;
			vga_video_type = VIDEO_TYPE_CGA;
			vga_vram_size = 0x2000;
			vga_vram_size = 0x2000;
			display_desc = "*CGA";
			display_desc = "*CGA";