MRL MR-300 patch
結局、byteswapしても、kernelロード時にエンディアン切り替えをするには、kernelそのものに手を加えないといけないらしい。そういうわけで、NLSU2のコードと、byteswapパッチと、NV550の2.4用パッチからめんどくさいところを除いてマージパッチを作ってみた。
いくつかわかんないところがあったのだけど、まぁ、そのへんは適当に。
もし、これで動けばマジメにやってみるかもしれない。
IRQ/GPIOあたりで、どこに当てたらいいのかわからないものがあった。i2cについては使っていないので省いた。2.6ではボードごとに設定を分ける流儀なので、それにあわせてみたけどよくわかんない。LEDのドライバとユーティリティも移植してない。NPEについても動いてから考えようということで入れていない。
つまりは、まったくのモンキーパッチというわけだ。
バックアップがわりに貼っておく。
diff -Naur linux-2.6.11.12.orig/arch/arm/Makefile linux-2.6.11.12/arch/arm/Makefile --- linux-2.6.11.12.orig/arch/arm/Makefile 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/Makefile 2006-09-07 17:37:22.000000000 +0900 @@ -23,11 +23,13 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) CFLAGS += -mbig-endian +CPPFLAGS += -mbig-endian AS += -EB LD += -EB AFLAGS += -mbig-endian else CFLAGS += -mlittle-endian +CPPFLAGS += -mlittle-endian AS += -EL LD += -EL AFLAGS += -mlittle-endian diff -Naur linux-2.6.11.12.orig/arch/arm/boot/compressed/Makefile linux-2.6.11.12/arch/arm/boot/compressed/Makefile --- linux-2.6.11.12.orig/arch/arm/boot/compressed/Makefile 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/boot/compressed/Makefile 2006-09-07 17:40:57.000000000 +0900 @@ -56,6 +56,8 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) OBJS += big-endian.o +else +OBJS += little-endian.o endif # diff -Naur linux-2.6.11.12.orig/arch/arm/boot/compressed/head-xscale.S linux-2.6.11.12/arch/arm/boot/compressed/head-xscale.S --- linux-2.6.11.12.orig/arch/arm/boot/compressed/head-xscale.S 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/boot/compressed/head-xscale.S 2006-09-07 17:45:56.000000000 +0900 @@ -47,3 +47,7 @@ orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) #endif +#ifdef CONFIG_MACH_MR300 + mov r7, #(MACH_TYPE_MR300 & 0xff) + orr r7, r7, #(MACH_TYPE_MR300 & 0xff00) +#endif diff -Naur linux-2.6.11.12.orig/arch/arm/boot/compressed/head.S linux-2.6.11.12/arch/arm/boot/compressed/head.S --- linux-2.6.11.12.orig/arch/arm/boot/compressed/head.S 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/boot/compressed/head.S 2006-09-07 17:45:11.000000000 +0900 @@ -79,6 +79,14 @@ .endm .macro writeb, rb str ?rb, [r3, #0] + .endm +#elif defined(CONFIG_MACH_MR300) + .macro loadsp, rb + mov ?rb, #0xc8000000 + .endm + .macro writeb, rb + str ?rb, [r3, #0] + .endm #elif defined(CONFIG_ARCH_IXP2000) .macro loadsp, rb mov ?rb, #0xc0000000 diff -Naur linux-2.6.11.12.orig/arch/arm/boot/compressed/little-endian.S linux-2.6.11.12/arch/arm/boot/compressed/little-endian.S --- linux-2.6.11.12.orig/arch/arm/boot/compressed/little-endian.S 1970-01-01 09:00:00.000000000 +0900 +++ linux-2.6.11.12/arch/arm/boot/compressed/little-endian.S 2006-09-07 17:49:58.000000000 +0900 @@ -0,0 +1,13 @@ +/* + * linux/arch/arm/boot/compressed/little-endian.S + * + * Switch CPU into little endian mode. + * Author: Nicolas Pitre + */ + + .section ".start", #alloc, #execinstr + + mrc p15, 0, r0, c1, c0, 0 @ read control reg + bic r0, r0, #(1 << 7) @ enable little endian mode + mcr p15, 0, r0, c1, c0, 0 @ write control reg + diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/Kconfig linux-2.6.11.12/arch/arm/mach-ixp4xx/Kconfig --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/Kconfig 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/Kconfig 2006-09-07 18:21:28.000000000 +0900 @@ -43,6 +43,11 @@ IXDP465 Development Platform (Also known as BMP). For more information on this platform, see Documentation/arm/IXP4xx. +config MACH_MR300 + bool "MR300" + help + Say 'Y' here if you want your kernel to support MRL's + MR-300 board. # # IXCDP1100 is the exact same HW as IXDP425, but with a different machine diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/Makefile linux-2.6.11.12/arch/arm/mach-ixp4xx/Makefile --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/Makefile 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/Makefile 2006-09-08 19:38:12.000000000 +0900 @@ -9,4 +9,5 @@ obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o obj-$(CONFIG_ARCH_PRPMC1100) += prpmc1100-pci.o prpmc1100-setup.o obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o +obj-$(CONFIG_MACH_MR300) += mr300-pci.o mr300-setup.o diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/common-pci.c linux-2.6.11.12/arch/arm/mach-ixp4xx/common-pci.c --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/common-pci.c 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/common-pci.c 2006-09-08 15:00:12.000000000 +0900 @@ -427,7 +427,7 @@ #ifdef __ARMEB__ *PCI_CSR = PCI_CSR_IC | PCI_CSR_ABE | PCI_CSR_PDS | PCI_CSR_ADS; #else - *PCI_CSR = PCI_CSR_IC; + *PCI_CSR = PCI_CSR_IC | PCI_CSR_ABE; #endif pr_debug("DONE?n"); diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/ixdp425-pci.c linux-2.6.11.12/arch/arm/mach-ixp4xx/ixdp425-pci.c --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/ixdp425-pci.c 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/ixdp425-pci.c 2006-09-06 19:02:15.000000000 +0900 @@ -75,7 +75,8 @@ int __init ixdp425_pci_init(void) { if (machine_is_ixdp425() || machine_is_ixcdp1100() || - machine_is_avila() || machine_is_ixdp465()) + machine_is_avila() || machine_is_ixdp465() || + machine_is_mr300()) pci_common_init(&ixdp425_pci); return 0; } diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c linux-2.6.11.12/arch/arm/mach-ixp4xx/ixdp425-setup.c --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/ixdp425-setup.c 2006-09-07 19:28:33.000000000 +0900 @@ -172,4 +172,3 @@ INIT_MACHINE(ixdp425_init) MACHINE_END #endif - diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/mr300-pci.c linux-2.6.11.12/arch/arm/mach-ixp4xx/mr300-pci.c --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/mr300-pci.c 1970-01-01 09:00:00.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/mr300-pci.c 2006-09-08 14:57:16.000000000 +0900 @@ -0,0 +1,86 @@ +/* + * arch/arm/mach-ixp4xx/mr300-pci.c + * + * MRL MR-300 board-level PCI initialization + * + * based on arch/arm/mach-ixp4xx/ixdp425-pci.c + * IXDP425 board-level PCI initialization + * Copyright (C) 2002 Intel Corporation. + * Copyright (C) 2003-2004 MontaVista Software, Inc. + * Maintainer: Deepak Saxena <dsaxena@plexity.net> + * + * Maintainer: kinneko <kinneko@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include <linux/kernel.h> +#include <linux/config.h> +#include <linux/pci.h> +#include <linux/init.h> +#include <linux/delay.h> + +#include <asm/mach/pci.h> +#include <asm/irq.h> +#include <asm/hardware.h> +#include <asm/mach-types.h> + +void __init mr300_pci_preinit(void) +{ + gpio_line_config(MR300_PCI_INTA_PIN, + IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); + gpio_line_config(MR300_PCI_INTB_PIN, + IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); + gpio_line_config(MR300_PCI_INTC_PIN, + IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); + gpio_line_config(MR300_PCI_INTD_PIN, + IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); + + gpio_line_isr_clear(MR300_PCI_INTA_PIN); + gpio_line_isr_clear(MR300_PCI_INTB_PIN); + gpio_line_isr_clear(MR300_PCI_INTC_PIN); + gpio_line_isr_clear(MR300_PCI_INTD_PIN); + + ixp4xx_pci_preinit(); +} + +static int __init mr300_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + static int pci_irq_table[MR300_PCI_IRQ_LINES] = { + IRQ_MR300_PCI_INTA, + IRQ_MR300_PCI_INTB, + IRQ_MR300_PCI_INTC, + IRQ_MR300_PCI_INTD + }; + + int irq = -1; + + if (slot >= 1 && slot <= MR300_PCI_MAX_DEV && + pin >= 1 && pin <= MR300_PCI_IRQ_LINES) { + irq = pci_irq_table[(slot + pin - 2) % 4]; + } + + return irq; +} + +struct hw_pci mr300_pci __initdata = { + .nr_controllers = 1, + .preinit = mr300_pci_preinit, + .swizzle = pci_std_swizzle, + .setup = ixp4xx_setup, + .scan = ixp4xx_scan_bus, + .map_irq = mr300_map_irq, +}; + +int __init ixdp425_pci_init(void) +{ + if (machine_is_mr300()) + pci_common_init(&mr300_pci); + return 0; +} + +subsys_initcall(mr300_pci_init); + diff -Naur linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/mr300-setup.c linux-2.6.11.12/arch/arm/mach-ixp4xx/mr300-setup.c --- linux-2.6.11.12.orig/arch/arm/mach-ixp4xx/mr300-setup.c 1970-01-01 09:00:00.000000000 +0900 +++ linux-2.6.11.12/arch/arm/mach-ixp4xx/mr300-setup.c 2006-09-08 14:19:15.000000000 +0900 @@ -0,0 +1,142 @@ +/* + * arch/arm/mach-ixp4xx/mr300-setup.c + * + * MRL MR-300 Linux board-setup + * + * based on + * arch/arm/mach-ixp4xx/ixdp425-setup.c + * Copyright (C) 2003-2004 MontaVista Software, Inc. + * Author: Deepak Saxena <dsaxena@plexity.net> + * + * arch/arm/mach-ixp4xx/nslu2-setup.c + * Author: Mark Rakes <mrakes at mac.com> + * Maintainers: http://www.nslu2-linux.org/ + * Fixed missing init_time in MACHINE_START kas11 10/22/04 + * Changed to conform to new style __init ixdp425 kas11 10/22/04 + * + * Author: kinneko <kinneko@gmail.com> + */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/device.h> +#include <linux/serial.h> +#include <linux/tty.h> +#include <linux/serial_core.h> + +#include <asm/types.h> +#include <asm/setup.h> +#include <asm/memory.h> +#include <asm/hardware.h> +#include <asm/mach-types.h> +#include <asm/irq.h> +#include <asm/mach/arch.h> +#include <asm/mach/flash.h> + +#ifdef __ARMEB__ +#define REG_OFFSET 3 +#else +#define REG_OFFSET 0 +#endif + +/* + * MR300 uses both chipset serial ports + */ +static struct uart_port mr300_serial_ports[] = { + { + .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET), + .mapbase = (IXP4XX_UART1_BASE_PHYS), + .irq = IRQ_IXP4XX_UART1, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + .line = 0, + .type = PORT_XSCALE, + .fifosize = 32 + } , { + .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET), + .mapbase = (IXP4XX_UART2_BASE_PHYS), + .irq = IRQ_IXP4XX_UART2, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + .line = 1, + .type = PORT_XSCALE, + .fifosize = 32 + } +}; + +void __init mr300_map_io(void) +{ + early_serial_setup(&mr300_serial_ports[0]); + early_serial_setup(&mr300_serial_ports[1]); + + ixp4xx_map_io(); +} + +static struct flash_platform_data mr300_flash_data = { + .map_name = "cfi_probe", + .width = 2, +}; + +static struct resource mr300_flash_resource = { + .start = MR300_FLASH_BASE, + .end = MR300_FLASH_BASE + MR300_FLASH_SIZE, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device mr300_flash = { + .name = "IXP4XX-Flash", + .id = 0, + .dev = { + .platform_data = &mr300_flash_data, + }, + .num_resources = 1, + .resource = &mr300_flash_resource, +}; + +/* + * static struct ixp4xx_i2c_pins mr300_i2c_gpio_pins = { + * .sda_pin = MR300_SDA_PIN, + * .scl_pin = MR300_SCL_PIN, + *}; + * + *static struct platform_device mr300_i2c_controller = { + * .name = "IXP4XX-I2C", + * .id = 0, + * .dev = { + * .platform_data = &mr300_i2c_gpio_pins, + * }, + * .num_resources = 0 + *}; + */ + +static struct platform_device *mr300_devices[] __initdata = { + // &mr300_i2c_controller, + &mr300_flash +}; + +static void __init mr300_init(void) +{ + + platform_add_devices(mr300_devices, ARRAY_SIZE(mr300_devices)); +} + +/* + * MR-300 is enbeded linux board, based on IXDP422/425. + */ +#ifdef CONFIG_MACH_MR300 +MACHINE_START(MR300, "MRL MR-300 embeded linux board") + MAINTAINER("kinneko <kinneko@gmail.com>") + BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, + IXP4XX_PERIPHERAL_BASE_VIRT) + MAPIO(mr300_map_io) + INITIRQ(ixp4xx_init_irq) //nlsu2:FIXME: all irq are off here ??? + .timer = &ixp4xx_timer, + // INITTIME(ixp4xx_init_time) //nlsu2:??? + BOOT_PARAMS(0x0100) + INIT_MACHINE(mr300_init) +MACHINE_END +#endif diff -Naur linux-2.6.11.12.orig/arch/arm/tools/mach-types linux-2.6.11.12/arch/arm/tools/mach-types --- linux-2.6.11.12.orig/arch/arm/tools/mach-types 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/arch/arm/tools/mach-types 2006-09-07 18:46:01.000000000 +0900 @@ -667,3 +667,4 @@ manga_ks8695 MACH_MANGA_KS8695 MANGA_KS8695 657 ajax MACH_AJAX AJAX 658 nec_mp900 MACH_NEC_MP900 NEC_MP900 659 +mr300 MACH_MR300 MR300 660 diff -Naur linux-2.6.11.12.orig/drivers/mtd/maps/ixp4xx.c linux-2.6.11.12/drivers/mtd/maps/ixp4xx.c --- linux-2.6.11.12.orig/drivers/mtd/maps/ixp4xx.c 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/drivers/mtd/maps/ixp4xx.c 2006-09-08 20:11:19.000000000 +0900 @@ -13,6 +13,8 @@ * Copyright (C) 2002 Intel Corporation * Copyright (C) 2003-2004 MontaVista Software, Inc. * + * Hack: Last sector contains RedBoot FIS table in big-endian format. + * Convert into little endian format so we can use RedBoot parser */ #include <linux/module.h> @@ -29,9 +31,11 @@ #include <asm/mach-types.h> #include <asm/mach/flash.h> +#include <asm/byteorder.h> + #include <linux/reboot.h> -#ifndef __ARMEB__ +#if !defined(__ARMEB__) && !defined(CONFIG_MARH_MR300) #define BYTE0(h) ((h) & 0xFF) #define BYTE1(h) (((h) >> 8) & 0xFF) #else @@ -42,6 +46,11 @@ static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs) { map_word val; + +#ifndef __ARMEB__ + ofs ^= 2; +#endif + val.x[0] = *(__u16 *) (map->map_priv_1 + ofs); return val; } @@ -51,6 +60,21 @@ * when attached to a 16-bit wide device (such as the 28F128J3A), * so we can't just memcpy_fromio(). */ + +#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS) +struct fis_image_desc { + unsigned char name[16]; // Null terminated name + unsigned long flash_base; // Address within FLASH of image + unsigned long mem_base; // Address in memory where it executes + unsigned long size; // Length of image + unsigned long entry_point; // Execution entry point + unsigned long data_length; // Length of actual data + unsigned char _pad[256-(16+7*sizeof(unsigned long))]; + unsigned long desc_cksum; // Checksum over image descriptor + unsigned long file_cksum; // Checksum over image data +}; +#endif + static void ixp4xx_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) { @@ -60,13 +84,35 @@ u16 data; for (i = 0; i < (len / 2); i++) { + int j = i; +#ifndef __ARMEB__ + j ^= 1; +#endif data = src[i]; dest[i * 2] = BYTE0(data); dest[i * 2 + 1] = BYTE1(data); } +#ifndef __ARMEB__ + i ^= 1; +#endif + if (len & 1) dest[len - 1] = BYTE0(src[i]); + + /* Hack: Last sector contains RedBoot FIS table in big-endian format. + Convert into little endian format so we can use RedBoot parser */ + +#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS) + if (from == 0x7e0000) { + struct fis_image_desc *desc = (struct fis_image_desc *)to; + for (i=0; i < (len/sizeof(struct fis_image_desc)); i++) { + desc[i].flash_base = be32_to_cpu(desc[i].flash_base); + desc[i].mem_base = be32_to_cpu(desc[i].mem_base); + desc[i].size = be32_to_cpu(desc[i].size); + } + } +#endif } /* @@ -75,6 +121,9 @@ */ static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr) { +#ifndef __ARMEB__ + adr ^= 2; +#endif if (!(adr & 1)) *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; } @@ -84,7 +133,10 @@ */ static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) { - *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; +#ifndef __ARMEB__ + adr ^= 2; +#endif + *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; } struct ixp4xx_flash_info { diff -Naur linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/hardware.h linux-2.6.11.12/include/asm-arm/arch-ixp4xx/hardware.h --- linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/hardware.h 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/include/asm-arm/arch-ixp4xx/hardware.h 2006-09-08 17:13:57.000000000 +0900 @@ -44,5 +44,6 @@ #include "ixdp425.h" #include "coyote.h" #include "prpmc1100.h" +#include "mr300.h" #endif /* _ASM_ARCH_HARDWARE_H */ diff -Naur linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/irqs.h linux-2.6.11.12/include/asm-arm/arch-ixp4xx/irqs.h --- linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/irqs.h 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/include/asm-arm/arch-ixp4xx/irqs.h 2006-09-08 19:27:37.000000000 +0900 @@ -93,4 +93,12 @@ #define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11 #define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5 +/* + * MRL MR-300 board IRQs + */ +#define IRQ_MR300_PCI_INTA IRQ_IXP4XX_GPIO12 +#define IRQ_MR300_PCI_INTB IRQ_IXP4XX_GPIO11 +#define IRQ_MR300_PCI_INTC IRQ_IXP4XX_GPIO10 +#define IRQ_MR300_PCI_INTC IRQ_IXP4XX_GPIO8 + #endif diff -Naur linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/mr300.h linux-2.6.11.12/include/asm-arm/arch-ixp4xx/mr300.h --- linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/mr300.h 1970-01-01 09:00:00.000000000 +0900 +++ linux-2.6.11.12/include/asm-arm/arch-ixp4xx/mr300.h 2006-09-08 17:11:19.000000000 +0900 @@ -0,0 +1,42 @@ +/* + * include/asm-arm/arch-ixp4xx/mr300.h + * + * MRL MR-300 platform specific definitions + * + * modify: kinneko <kinneko@gmail.com> + * + * based on + * include/asm-arm/arch-ixp4xx/mr300.h + * IXDP425 platform specific definitions + * Author: Deepak Saxena <dsaxena@plexity.net> + * Copyright 2004 (c) MontaVista, Software, Inc. + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __ASM_ARCH_HARDWARE_H__ +#error "Do not include this directly, instead #include <asm/hardware.h>" +#endif + +#define MR300_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS +#define MR300_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE + +#define MR300_SDA_PIN 7 +#define MR300_SCL_PIN 6 + +/* + * MR300 PCI IRQs + */ +#define MR300_PCI_MAX_DEV 4 +#define MR300_PCI_IRQ_LINES 4 + + +/* PCI controller GPIO to IRQ pin mappings */ +#define MR300_PCI_INTA_PIN 12 +#define MR300_PCI_INTB_PIN 11 +#define MR300_PCI_INTC_PIN 10 +#define MR300_PCI_INTD_PIN 8 + + diff -Naur linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.11.12/include/asm-arm/arch-ixp4xx/uncompress.h --- linux-2.6.11.12.orig/include/asm-arm/arch-ixp4xx/uncompress.h 2005-06-12 11:45:37.000000000 +0900 +++ linux-2.6.11.12/include/asm-arm/arch-ixp4xx/uncompress.h 2006-09-08 19:46:41.000000000 +0900 @@ -46,9 +46,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) { /* - * Coyote and gtwx5715 only have UART2 connected + * Coyote, gtwx5715 and MR300 only have UART2 connected */ - if (machine_is_adi_coyote() || machine_is_gtwx5715()) + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_mr300()) uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; else uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
.config はスカスカで。
# # Automatically generated make config: don't edit # Linux kernel version: 2.6.11.12 # Fri Sep 8 21:17:58 2006 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y # # General setup # CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SHMEM=y CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set CONFIG_ARCH_IXP4XX=y # CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # # Intel IXP4xx Implementation Options # # # IXP4xx Platforms # # CONFIG_ARCH_AVILA is not set # CONFIG_ARCH_ADI_COYOTE is not set # CONFIG_ARCH_IXDP425 is not set # CONFIG_MACH_IXDPG425 is not set # CONFIG_MACH_IXDP465 is not set CONFIG_MACH_MR300=y # CONFIG_ARCH_PRPMC1100 is not set # CONFIG_MACH_GTWX5715 is not set # # IXP4xx Options # # CONFIG_IXP4XX_INDIRECT_PCI is not set CONFIG_DMABOUNCE=y # # Processor Type # CONFIG_CPU_32=y CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y # # Processor Features # # CONFIG_ARM_THUMB is not set # CONFIG_CPU_BIG_ENDIAN is not set CONFIG_XSCALE_PMU=y # # General setup # CONFIG_PCI=y CONFIG_ZBOOT_ROM_TEXT=0 CONFIG_ZBOOT_ROM_BSS=0 # CONFIG_XIP_KERNEL is not set CONFIG_PCI_LEGACY_PROC=y # CONFIG_PCI_NAMES is not set # # PCCARD (PCMCIA/CardBus) support # # CONFIG_PCCARD is not set # # PC-card bridges # # # At least one math emulation must be selected # # CONFIG_FPE_NWFPE is not set # CONFIG_FPE_FASTFPE is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set # # Generic Driver Options # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set # CONFIG_PREEMPT is not set # CONFIG_ARTHUR is not set CONFIG_CMDLINE="" CONFIG_ALIGNMENT_TRAP=y # # Parallel port support # # CONFIG_PARPORT is not set # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Plug and Play support # # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" # CONFIG_CDROM_PKTCDVD is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set # CONFIG_ATA_OVER_ETH is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # # Networking support # CONFIG_NET=y # # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_NETLINK_DEV=y CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set CONFIG_INET_TUNNEL=m # CONFIG_IP_TCPDIAG is not set # CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set CONFIG_XFRM=y # CONFIG_XFRM_USER is not set # # SCTP Configuration (EXPERIMENTAL) # # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set # CONFIG_NET_SCH_CLK_JIFFIES is not set # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set # CONFIG_NET_SCH_CLK_CPU is not set # CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set CONFIG_TUN=m CONFIG_ETHERTAP=m # # ARCnet devices # # CONFIG_ARCNET is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_SMC91X is not set # # Tulip family network device support # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set CONFIG_E100=y # CONFIG_E100_NAPI is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_8139CP is not set # CONFIG_8139TOO is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set # CONFIG_DL2K is not set # CONFIG_E1000 is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set # CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set # # Wireless LAN (non-hamradio) # # CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # # ATA/ATAPI/MFM/RLL support # # CONFIG_IDE is not set # # SCSI device support # # CONFIG_SCSI is not set # # Fusion MPT device support # # # IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set # # I2O device support # # CONFIG_I2O is not set # # ISDN subsystem # # CONFIG_ISDN is not set # # Input device support # CONFIG_INPUT=y # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set # CONFIG_SERIO_LIBPS2 is not set # CONFIG_SERIO_RAW is not set # # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # # IPMI # # CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # # I2C support # # CONFIG_I2C is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set # # File systems # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT3_FS is not set # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # # XFS support # # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=m # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # # CD-ROM/DVD Filesystems # # CONFIG_ISO9660_FS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # # CONFIG_MSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y CONFIG_TMPFS_XATTR=y # CONFIG_TMPFS_SECURITY is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # # Miscellaneous filesystems # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y # # Native Language Support # # CONFIG_NLS is not set # # Profiling support # # CONFIG_PROFILING is not set # # Graphics support # # CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # # Sound # # CONFIG_SOUND is not set # # Misc devices # # # USB support # # CONFIG_USB is not set CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STOR AGE Help for more information # # # USB Gadget Support # # CONFIG_USB_GADGET is not set # # MMC/SD Card support # # CONFIG_MMC is not set # # Kernel hacking # CONFIG_DEBUG_KERNEL=y # CONFIG_MAGIC_SYSRQ is not set # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_WAITQ is not set # CONFIG_DEBUG_ERRORS is not set # CONFIG_DEBUG_LL is not set # # Security options # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set # # Hardware crypto devices # # # Library routines # # CONFIG_CRC_CCITT is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set