GIT 5e4a9bdbb69f7f583eac2549faf82c5619f0889c git://www.linux-mips.org/pub/scm/upstream.git#for-akpm commit Author: Ralf Baechle Date: Sun Mar 25 02:31:17 2007 +0100 [MIPS] Remove unused argument from kunmap_coherent(). Signed-off-by: Ralf Baechle commit 8541fcf0f0ad8b4ee2f8fb05f588464b27b9cb00 Author: Ralf Baechle Date: Sun Mar 25 02:31:17 2007 +0100 [MIPS] Malta: Delete unused prototype of mips_timer_interrupt. Signed-off-by: Ralf Baechle commit 9d566fe93bd2e4d9f9d961963497968a2de9986d Author: Atsushi Nemoto Date: Wed Mar 21 00:36:02 2007 +0900 [MIPS] Select ZONE_DMA only if GENERIC_ISA_DMA selected Signed-off-by: Atsushi Nemoto commit 59266b6a09f648ecae02d8d63d83ebb3b3030c34 Author: Ralf Baechle Date: Sun Mar 25 02:31:17 2007 +0100 [MIPS] MIPS Tech: Get rid of volatile in core code. Signed-off-by: Ralf Baechle commit 4840272dd9e5f9212e253b26940f1b301a3c9fd3 Author: Ralf Baechle Date: Sun Mar 25 02:31:17 2007 +0100 [MIPS] IP22: Get rid of volatile in IP22 core code. Signed-off-by: Ralf Baechle commit d04b9c09c628def2c6332414115c22aa0a583112 Author: Atsushi Nemoto Date: Thu Mar 15 00:58:28 2007 +0900 [MIPS] JMR3927 cleanup * Kill dead codes * Rearrange irq chip handlers * Minimize defconfig Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit ed71554b24f06a7e79bb463a619c3b24609e3a55 Author: Yoichi Yuasa Date: Wed Mar 14 21:51:26 2007 +0900 [MIPS] Merge GT64111 PCI routines and GT64120 PCI_0 routines This patch has merged GT64111 PCI routines and GT64120 PCI_0 routines. GT64111 PCI is almost the same as GT64120's PCI_0. This patch don't change GT64120 PCI routines. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit bc76f4a7fe0cb1a1d3113b6372469b51140f170a Author: Ralf Baechle Date: Sat Feb 24 02:38:42 2007 +0000 [MIPS] Atlas, Malta: Display CPU card type in sysfs as sysdev corecard. Signed-off-by: Ralf Baechle commit 17a85eeb4bd69f3a177652636149d8a261cb8eab Author: Yoichi Yuasa Date: Tue Mar 6 21:34:44 2007 +0900 [MIPS] Cobalt: clean up include files Signed-off-by: Yoichi Yuasa commit 889e2af6a3c3ef3d74470820f159fab54643c62a Author: Yoichi Yuasa Date: Mon Mar 5 19:10:03 2007 +0900 [MIPS] Cobalt: Split PCI codes from setup.c It's removed #ifdef CONFIG_PCI/#endif from cobalt setup.c . Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle arch/mips/Kconfig | 5 + arch/mips/cobalt/setup.c | 26 +++++++ arch/mips/mips-boards/generic/Makefile | 1 arch/mips/mips-boards/generic/corecard-sysfs.c | 94 ++++++++++++++++++++++++ 4 files changed, 126 insertions(+), 0 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 0f09412..d01cafc 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -617,7 +617,12 @@ config TOSHIBA_JMR3927 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN +<<<<<<< HEAD/arch/mips/Kconfig select GENERIC_HARDIRQS_NO__DO_IRQ +======= + select TOSHIBA_BOARDS + select GENERIC_HARDIRQS_NO__DO_IRQ +>>>>>>> /arch/mips/Kconfig config TOSHIBA_RBTX4927 bool "Toshiba TBTX49[23]7 board" diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index 7abe45e..c044dd2 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c @@ -103,6 +103,32 @@ void __init plat_mem_setup(void) /* These resources have been reserved by VIA SuperI/O chip. */ for (i = 0; i < ARRAY_SIZE(cobalt_reserved_resources); i++) request_resource(&ioport_resource, cobalt_reserved_resources + i); +<<<<<<< HEAD/arch/mips/cobalt/setup.c +======= + + /* Read the cobalt id register out of the PCI config space */ + PCI_CFG_SET(devfn, (VIA_COBALT_BRD_ID_REG & ~0x3)); + cobalt_board_id = GT_READ(GT_PCI0_CFGDATA_OFS); + cobalt_board_id >>= ((VIA_COBALT_BRD_ID_REG & 3) * 8); + cobalt_board_id = VIA_COBALT_BRD_REG_to_ID(cobalt_board_id); + + printk("Cobalt board ID: %d\n", cobalt_board_id); + + if (cobalt_board_id > COBALT_BRD_ID_RAQ1) { +#ifdef CONFIG_SERIAL_8250 + uart.line = 0; + uart.type = PORT_UNKNOWN; + uart.uartclk = 18432000; + uart.irq = COBALT_SERIAL_IRQ; + uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | + UPF_SKIP_TEST; + uart.iotype = UPIO_MEM; + uart.mapbase = 0x1c800000; + + early_serial_setup(&uart); +#endif + } +>>>>>>> /arch/mips/cobalt/setup.c } /* diff --git a/arch/mips/mips-boards/generic/Makefile b/arch/mips/mips-boards/generic/Makefile index aade36d..d43748f 100644 --- a/arch/mips/mips-boards/generic/Makefile +++ b/arch/mips/mips-boards/generic/Makefile @@ -24,3 +24,4 @@ obj-y := reset.o display.o init.o mem obj-$(CONFIG_EARLY_PRINTK) += console.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_KGDB) += gdb_hook.o +obj-$(CONFIG_SYSFS) += corecard-sysfs.o diff --git a/arch/mips/mips-boards/generic/corecard-sysfs.c b/arch/mips/mips-boards/generic/corecard-sysfs.c new file mode 100644 index 0000000..fd75f2b --- /dev/null +++ b/arch/mips/mips-boards/generic/corecard-sysfs.c @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2007 by Ralf Baechle (ralf@linux-mips.org) + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + */ +#include /* Or will explode */ +#include +#include + +static struct sysdev_class corecard_sysdev_class = { + set_kset_name("corecard"), +}; + +static struct sys_device corecard_sys_device = { + .id = 0, + .cls = &corecard_sysdev_class, +}; + +static const char *corecard_name(unsigned int id) +{ + static char warned; + + switch (id) { + case MIPS_REVISION_CORID_QED_RM5261: + return "QED-RM5261"; + case MIPS_REVISION_CORID_CORE_LV: + return "CoreLV"; + case MIPS_REVISION_CORID_BONITO64: + return "CoreBonito64"; + case MIPS_REVISION_CORID_CORE_20K: + return "Core20K"; + case MIPS_REVISION_CORID_CORE_FPGA: + return "CoreFPGA"; + case MIPS_REVISION_CORID_CORE_MSC: + return "CoreEMUL"; + case MIPS_REVISION_CORID_CORE_EMUL: + return "CoreEMUL"; + case MIPS_REVISION_CORID_CORE_FPGA2: + return "CoreFPGA2"; + case MIPS_REVISION_CORID_CORE_FPGAR2: + return "CoreFPGA"; + case MIPS_REVISION_CORID_CORE_FPGA3: + return "CoreFPGA3"; + case MIPS_REVISION_CORID_CORE_24K: + return "Core24KLV"; + case MIPS_REVISION_CORID_CORE_EMUL_BON: + return "CoreEMUL"; + case MIPS_REVISION_CORID_CORE_EMUL_MSC: + return "CoreEMUL"; + } + + if (!warned) { + warned = 1; + printk(KERN_ERR "Unknown corecard type. " + "Please report this to linux-mips@linux-mips.org.\n"); + } + + return "unknown"; +} + +static ssize_t sysfs_show_corecard(struct sys_device *dev, char *buf) +{ + char *curr = buf; + + curr += sprintf(curr, "%s\n", corecard_name(mips_revision_corid)); + + return curr - buf; +} + +static SYSDEV_ATTR(type, 0600, sysfs_show_corecard, NULL); + +static int __init corecard_init_sysfs(void) +{ + int error = sysdev_class_register(&corecard_sysdev_class); + if (!error) + error = sysdev_register(&corecard_sys_device); + if (!error) + error = sysdev_create_file(&corecard_sys_device, + &attr_type); + return error; +} + +device_initcall(corecard_init_sysfs);