[BACK]Return to virtex_devices.c CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / arch / ppc / syslib

File: [Development] / linux-2.6-xfs / arch / ppc / syslib / Attic / virtex_devices.c (download)

Revision 1.2, Wed Sep 12 17:09:56 2007 UTC (10 years, 1 month ago) by tes.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.1: +25 -13 lines

Update 2.6.x-xfs to 2.6.23-rc4.

Also update fs/xfs with external mainline changes.
There were 12 such missing commits that I detected:

--------
commit ad690ef9e690f6c31f7d310b09ef1314bcec9033
Author: Al Viro <viro@ftp.linux.org.uk>
    xfs ioctl __user annotations

commit 20c2df83d25c6a95affe6157a4c9cac4cf5ffaac
Author: Paul Mundt <lethal@linux-sh.org>
    mm: Remove slab destructors from kmem_cache_create().

commit d0217ac04ca6591841e5665f518e38064f4e65bd
Author: Nick Piggin <npiggin@suse.de>
    mm: fault feedback #1

commit 54cb8821de07f2ffcd28c380ce9b93d5784b40d7
Author: Nick Piggin <npiggin@suse.de>
    mm: merge populate and nopage into fault (fixes nonlinear)

commit d00806b183152af6d24f46f0c33f14162ca1262a
Author: Nick Piggin <npiggin@suse.de>
    mm: fix fault vs invalidate race for linear mappings

commit a569425512253992cc64ebf8b6d00a62f986db3e
Author: Christoph Hellwig <hch@infradead.org>
    knfsd: exportfs: add exportfs.h header

commit 831441862956fffa17b9801db37e6ea1650b0f69
Author: Rafael J. Wysocki <rjw@sisk.pl>
    Freezer: make kernel threads nonfreezable by default

commit 8e1f936b73150f5095448a0fee6d4f30a1f9001d
Author: Rusty Russell <rusty@rustcorp.com.au>
    mm: clean up and kernelify shrinker registration

commit 5ffc4ef45b3b0a57872f631b4e4ceb8ace0d7496
Author: Jens Axboe <jens.axboe@oracle.com>
    sendfile: remove .sendfile from filesystems that use generic_file_sendfile()

commit 8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d
Author: Rafael J. Wysocki <rjw@sisk.pl>
    Add suspend-related notifications for CPU hotplug

commit 59c51591a0ac7568824f541f57de967e88adaa07
Author: Michael Opdenacker <michael@free-electrons.com>
    Fix occurrences of "the the "

commit 0ceb331433e8aad9c5f441a965d7c681f8b9046f
Author: Dmitriy Monakhov <dmonakhov@openvz.org>
    mm: move common segment checks to separate helper function
--------
Merge of 2.6.x-xfs-melb:linux:29656b by kenmcd.

/*
 * Virtex hard ppc405 core common device listing
 *
 * Copyright 2005-2007 Secret Lab Technologies Ltd.
 * Copyright 2005 Freescale Semiconductor Inc.
 * Copyright 2002-2004 MontaVista Software, Inc.
 *
 * 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 2 of the  License, or (at your
 * option) any later version.
 */

#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/serial_8250.h>
#include <syslib/virtex_devices.h>
#include <platforms/4xx/xparameters/xparameters.h>
#include <asm/io.h>

/*
 * UARTLITE: shortcut macro for single instance
 */
#define XPAR_UARTLITE(num) { \
	.name = "uartlite", \
	.id = num, \
	.num_resources = 2, \
	.resource = (struct resource[]) { \
		{ \
			.start = XPAR_UARTLITE_##num##_BASEADDR + 3, \
			.end = XPAR_UARTLITE_##num##_HIGHADDR, \
			.flags = IORESOURCE_MEM, \
		}, \
		{ \
			.start = XPAR_INTC_0_UARTLITE_##num##_VEC_ID, \
			.flags = IORESOURCE_IRQ, \
		}, \
	}, \
}

/*
 * Full UART: shortcut macro for single instance + platform data structure
 */
#define XPAR_UART(num) { \
	.mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \
	.irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \
	.iotype = UPIO_MEM, \
	.uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \
	.flags = UPF_BOOT_AUTOCONF, \
	.regshift = 2, \
}

/*
 * SystemACE: shortcut macro for single instance
 */
#define XPAR_SYSACE(num) { \
	.name		= "xsysace", \
	.id		= XPAR_SYSACE_##num##_DEVICE_ID, \
	.num_resources	= 2, \
	.resource = (struct resource[]) { \
		{ \
			.start	= XPAR_SYSACE_##num##_BASEADDR, \
			.end	= XPAR_SYSACE_##num##_HIGHADDR, \
			.flags	= IORESOURCE_MEM, \
		}, \
		{ \
			.start	= XPAR_INTC_0_SYSACE_##num##_VEC_ID, \
			.flags	= IORESOURCE_IRQ, \
		}, \
	}, \
}

/*
 * ML300/ML403 Video Device: shortcut macro for single instance
 */
#define XPAR_TFT(num) { \
	.name = "xilinxfb", \
	.id = num, \
	.num_resources = 1, \
	.resource = (struct resource[]) { \
		{ \
			.start = XPAR_TFT_##num##_BASEADDR, \
			.end = XPAR_TFT_##num##_BASEADDR+7, \
			.flags = IORESOURCE_IO, \
		}, \
	}, \
}

/* UART 8250 driver platform data table */
struct plat_serial8250_port virtex_serial_platform_data[] = {
#if defined(XPAR_UARTNS550_0_BASEADDR)
	XPAR_UART(0),
#endif
#if defined(XPAR_UARTNS550_1_BASEADDR)
	XPAR_UART(1),
#endif
#if defined(XPAR_UARTNS550_2_BASEADDR)
	XPAR_UART(2),
#endif
#if defined(XPAR_UARTNS550_3_BASEADDR)
	XPAR_UART(3),
#endif
#if defined(XPAR_UARTNS550_4_BASEADDR)
	XPAR_UART(4),
#endif
#if defined(XPAR_UARTNS550_5_BASEADDR)
	XPAR_UART(5),
#endif
#if defined(XPAR_UARTNS550_6_BASEADDR)
	XPAR_UART(6),
#endif
#if defined(XPAR_UARTNS550_7_BASEADDR)
	XPAR_UART(7),
#endif
	{ }, /* terminated by empty record */
};


struct platform_device virtex_platform_devices[] = {
	/* UARTLITE instances */
#if defined(XPAR_UARTLITE_0_BASEADDR)
	XPAR_UARTLITE(0),
#endif
#if defined(XPAR_UARTLITE_1_BASEADDR)
	XPAR_UARTLITE(1),
#endif
#if defined(XPAR_UARTLITE_2_BASEADDR)
	XPAR_UARTLITE(2),
#endif
#if defined(XPAR_UARTLITE_3_BASEADDR)
	XPAR_UARTLITE(3),
#endif
#if defined(XPAR_UARTLITE_4_BASEADDR)
	XPAR_UARTLITE(4),
#endif
#if defined(XPAR_UARTLITE_5_BASEADDR)
	XPAR_UARTLITE(5),
#endif
#if defined(XPAR_UARTLITE_6_BASEADDR)
	XPAR_UARTLITE(6),
#endif
#if defined(XPAR_UARTLITE_7_BASEADDR)
	XPAR_UARTLITE(7),
#endif

	/* Full UART instances */
#if defined(XPAR_UARTNS550_0_BASEADDR)
	{
		.name		= "serial8250",
		.id		= 0,
		.dev.platform_data = virtex_serial_platform_data,
	},
#endif

	/* SystemACE instances */
#if defined(XPAR_SYSACE_0_BASEADDR)
	XPAR_SYSACE(0),
#endif
#if defined(XPAR_SYSACE_1_BASEADDR)
	XPAR_SYSACE(1),
#endif

#if defined(XPAR_TFT_0_BASEADDR)
	XPAR_TFT(0),
#endif
#if defined(XPAR_TFT_1_BASEADDR)
	XPAR_TFT(1),
#endif
#if defined(XPAR_TFT_2_BASEADDR)
	XPAR_TFT(2),
#endif
#if defined(XPAR_TFT_3_BASEADDR)
	XPAR_TFT(3),
#endif
};

/* Early serial support functions */
static void __init
virtex_early_serial_init(int num, struct plat_serial8250_port *pdata)
{
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
	struct uart_port serial_req;

	memset(&serial_req, 0, sizeof(serial_req));
	serial_req.mapbase	= pdata->mapbase;
	serial_req.membase	= pdata->membase;
	serial_req.irq		= pdata->irq;
	serial_req.uartclk	= pdata->uartclk;
	serial_req.regshift	= pdata->regshift;
	serial_req.iotype	= pdata->iotype;
	serial_req.flags	= pdata->flags;
	gen550_init(num, &serial_req);
#endif
}

void __init
virtex_early_serial_map(void)
{
#ifdef CONFIG_SERIAL_8250
	struct plat_serial8250_port *pdata;
	int i = 0;

	pdata = virtex_serial_platform_data;
	while(pdata && pdata->flags) {
		pdata->membase = ioremap(pdata->mapbase, 0x100);
		virtex_early_serial_init(i, pdata);
		pdata++;
		i++;
	}
#endif /* CONFIG_SERIAL_8250 */
}

/*
 * default fixup routine; do nothing and return success.
 *
 * Reimplement this routine in your custom board support file to
 * override the default behaviour
 */
int __attribute__ ((weak))
virtex_device_fixup(struct platform_device *dev)
{
	return 0;
}

static int __init virtex_init(void)
{
	struct platform_device *index = virtex_platform_devices;
	unsigned int ret = 0;
	int i;

	for (i = 0; i < ARRAY_SIZE(virtex_platform_devices); i++, index++) {
		if (virtex_device_fixup(index) != 0)
			continue;

		if (platform_device_register(index)) {
			ret = 1;
			printk(KERN_ERR "cannot register dev %s:%d\n",
			       index->name, index->id);
		}
	}
	return ret;
}

subsys_initcall(virtex_init);