⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2.6.18-rc4-at91.patch.gz

📁 内容包括2.6.14内核到2.6.23内核的at91内核补丁(没有2.6.19的)
💻 GZ
📖 第 1 页 / 共 5 页
字号:
-obj-$(CONFIG_ARCH_AT91SAM9261)	+=+obj-$(CONFIG_ARCH_AT91RM9200)	+= at91rm9200.o at91rm9200_time.o at91rm9200_devices.o+obj-$(CONFIG_ARCH_AT91SAM9260)	+= at91sam9260.o at91sam926x_time.o at91sam9260_devices.o+obj-$(CONFIG_ARCH_AT91SAM9261)	+= at91sam9261.o at91sam926x_time.o at91sam9261_devices.o -# AT91RM9200 Board-specific support+# AT91RM9200 board-specific support obj-$(CONFIG_MACH_ONEARM)	+= board-1arm.o obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-dk.o obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-ek.o@@ -28,6 +28,7 @@ # AT91SAM9260 board-specific support  # AT91SAM9261 board-specific support+obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o  # LEDs support led-$(CONFIG_ARCH_AT91RM9200DK)	+= leds.o@@ -39,7 +40,7 @@ obj-$(CONFIG_LEDS) += $(led-y)  # VGA support-#obj-$(CONFIG_FB_S1D13XXX)	+= ics1523.o+obj-$(CONFIG_FB_S1D13XXX)	+= ics1523.o   ifeq ($(CONFIG_PM_DEBUG),y)diff -urN -x CVS linux-2.6.18-rc4/arch/arm/mach-at91rm9200/at91rm9200.c linux-2.6.18-rc4-at91/arch/arm/mach-at91rm9200/at91rm9200.c--- linux-2.6.18-rc4/arch/arm/mach-at91rm9200/at91rm9200.c	Fri Aug 25 10:49:30 2006+++ linux-2.6.18-rc4-at91/arch/arm/mach-at91rm9200/at91rm9200.c	Fri Aug 25 10:36:02 2006@@ -16,7 +16,15 @@ #include <asm/mach/map.h>  #include <asm/hardware.h>+#include <asm/arch/at91rm9200.h>+ #include "generic.h"+#include "clock.h"+++/* --------------------------------------------------------------------+ *  Static Memory map+ * -------------------------------------------------------------------- */  static struct map_desc at91rm9200_io_desc[] __initdata = { 	{@@ -25,88 +33,211 @@ 		.length		= SZ_4K, 		.type		= MT_DEVICE, 	}, {-		.virtual	= AT91_VA_BASE_SPI,-		.pfn		= __phys_to_pfn(AT91_BASE_SPI),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_SSC2,-		.pfn		= __phys_to_pfn(AT91_BASE_SSC2),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_SSC1,-		.pfn		= __phys_to_pfn(AT91_BASE_SSC1),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_SSC0,-		.pfn		= __phys_to_pfn(AT91_BASE_SSC0),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_US3,-		.pfn		= __phys_to_pfn(AT91_BASE_US3),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_US2,-		.pfn		= __phys_to_pfn(AT91_BASE_US2),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_US1,-		.pfn		= __phys_to_pfn(AT91_BASE_US1),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_US0,-		.pfn		= __phys_to_pfn(AT91_BASE_US0),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, { 		.virtual	= AT91_VA_BASE_EMAC,-		.pfn		= __phys_to_pfn(AT91_BASE_EMAC),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_TWI,-		.pfn		= __phys_to_pfn(AT91_BASE_TWI),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_MCI,-		.pfn		= __phys_to_pfn(AT91_BASE_MCI),+		.pfn		= __phys_to_pfn(AT91RM9200_BASE_EMAC), 		.length		= SZ_16K, 		.type		= MT_DEVICE, 	}, { 		.virtual	= AT91_VA_BASE_UDP,-		.pfn		= __phys_to_pfn(AT91_BASE_UDP),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_TCB1,-		.pfn		= __phys_to_pfn(AT91_BASE_TCB1),-		.length		= SZ_16K,-		.type		= MT_DEVICE,-	}, {-		.virtual	= AT91_VA_BASE_TCB0,-		.pfn		= __phys_to_pfn(AT91_BASE_TCB0),+		.pfn		= __phys_to_pfn(AT91RM9200_BASE_UDP), 		.length		= SZ_16K, 		.type		= MT_DEVICE, 	}, { 		.virtual	= AT91_SRAM_VIRT_BASE,-		.pfn		= __phys_to_pfn(AT91_SRAM_BASE),-		.length		= AT91_SRAM_SIZE,+		.pfn		= __phys_to_pfn(AT91RM9200_SRAM_BASE),+		.length		= AT91RM9200_SRAM_SIZE, 		.type		= MT_DEVICE, 	}, }; -void __init at91rm9200_map_io(void)+/* --------------------------------------------------------------------+ *  Clocks+ * -------------------------------------------------------------------- */++/*+ * The peripheral clocks.+ */+static struct clk udc_clk = {+	.name		= "udc_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_UDP,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk ohci_clk = {+	.name		= "ohci_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_UHP,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk ether_clk = {+	.name		= "ether_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_EMAC,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk mmc_clk = {+	.name		= "mci_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_MCI,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk twi_clk = {+	.name		= "twi_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_TWI,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk usart0_clk = {+	.name		= "usart0_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_US0,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk usart1_clk = {+	.name		= "usart1_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_US1,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk usart2_clk = {+	.name		= "usart2_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_US2,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk usart3_clk = {+	.name		= "usart3_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_US3,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk spi_clk = {+	.name		= "spi_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_SPI,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk pioA_clk = {+	.name		= "pioA_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_PIOA,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk pioB_clk = {+	.name		= "pioB_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_PIOB,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk pioC_clk = {+	.name		= "pioC_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_PIOC,+	.type		= CLK_TYPE_PERIPHERAL,+};+static struct clk pioD_clk = {+	.name		= "pioD_clk",+	.pmc_mask	= 1 << AT91RM9200_ID_PIOD,+	.type		= CLK_TYPE_PERIPHERAL,+};++static struct clk *periph_clocks[] __initdata = {+	&pioA_clk,+	&pioB_clk,+	&pioC_clk,+	&pioD_clk,+	&usart0_clk,+	&usart1_clk,+	&usart2_clk,+	&usart3_clk,+	&mmc_clk,+	&udc_clk,+	&twi_clk,+	&spi_clk,+	// ssc 0 .. ssc2+	// tc0 .. tc5+	&ohci_clk,+	&ether_clk,+	// irq0 .. irq6+};++/*+ * The four programmable clocks.+ * You must configure pin multiplexing to bring these signals out.+ */+static struct clk pck0 = {+	.name		= "pck0",+	.pmc_mask	= AT91_PMC_PCK0,+	.type		= CLK_TYPE_PROGRAMMABLE,+	.id		= 0,+};+static struct clk pck1 = {+	.name		= "pck1",+	.pmc_mask	= AT91_PMC_PCK1,+	.type		= CLK_TYPE_PROGRAMMABLE,+	.id		= 1,+};+static struct clk pck2 = {+	.name		= "pck2",+	.pmc_mask	= AT91_PMC_PCK2,+	.type		= CLK_TYPE_PROGRAMMABLE,+	.id		= 2,+};+static struct clk pck3 = {+	.name		= "pck3",+	.pmc_mask	= AT91_PMC_PCK3,+	.type		= CLK_TYPE_PROGRAMMABLE,+	.id		= 3,+};++static void __init at91rm9200_register_clocks(void)+{+	int i;++	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)+		clk_register(periph_clocks[i]);++	clk_register(&pck0);+	clk_register(&pck1);+	clk_register(&pck2);+	clk_register(&pck3);+}++/* --------------------------------------------------------------------+ *  GPIO+ * -------------------------------------------------------------------- */++static struct at91_gpio_bank at91rm9200_gpio[] = {+	{+		.id		= AT91RM9200_ID_PIOA,+		.offset		= AT91_PIOA,+		.clock		= &pioA_clk,+	}, {+		.id		= AT91RM9200_ID_PIOB,+		.offset		= AT91_PIOB,+		.clock		= &pioB_clk,+	}, {+		.id		= AT91RM9200_ID_PIOC,+		.offset		= AT91_PIOC,+		.clock		= &pioC_clk,+	}, {+		.id		= AT91RM9200_ID_PIOD,+		.offset		= AT91_PIOD,+		.clock		= &pioD_clk,+	}+};++/* --------------------------------------------------------------------+ *  AT91RM9200 processor initialization+ * -------------------------------------------------------------------- */++void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks) {+	/* Map peripherals */ 	iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));++	/* Init clock subsystem */+	at91_clock_init(main_clock);++	/* Register the processor-specific clocks */+	at91rm9200_register_clocks();++	/* Register GPIO subsystem */+	at91_gpio_init(at91rm9200_gpio, banks); } ++/* --------------------------------------------------------------------+ *  Interrupt initialization+ * -------------------------------------------------------------------- */+ /*  * The default interrupt priority levels (0 = lowest, 7 = highest).  */@@ -145,10 +276,14 @@ 	0	/* Advanced Interrupt Controller (IRQ6) */ }; -void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS])+void __init at91rm9200_init_interrupts(unsigned int priority[NR_AIC_IRQS]) { 	if (!priority) 		priority = at91rm9200_default_irq_priority; +	/* Initialize the AIC interrupt controller */ 	at91_aic_init(priority);++	/* Enable GPIO interrupts */+	at91_gpio_irq_setup(); }diff -urN -x CVS linux-2.6.18-rc4/arch/arm/mach-at91rm9200/at91rm9200_devices.c linux-2.6.18-rc4-at91/arch/arm/mach-at91rm9200/at91rm9200_devices.c--- linux-2.6.18-rc4/arch/arm/mach-at91rm9200/at91rm9200_devices.c	Thu Jan  1 02:00:00 1970+++ linux-2.6.18-rc4-at91/arch/arm/mach-at91rm9200/at91rm9200_devices.c	Sat Aug 19 17:34:58 2006@@ -0,0 +1,831 @@+/*+ * arch/arm/mach-at91rm9200/at91rm9200_devices.c+ *+ *  Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>+ *  Copyright (C) 2005 David Brownell+ *+ * 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 <asm/mach/arch.h>+#include <asm/mach/map.h>++#include <linux/platform_device.h>++#include <asm/hardware.h>+#include <asm/arch/board.h>+#include <asm/arch/gpio.h>++#include "generic.h"++#define SZ_512	0x00000200+#define SZ_256	0x00000100+#define SZ_16	0x00000010++/* --------------------------------------------------------------------+ *  USB Host+ * -------------------------------------------------------------------- */++#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)+static u64 ohci_dmamask = 0xffffffffUL;+static struct at91_usbh_data usbh_data;++static struct resource at91_usbh_resources[] = {+	[0] = {+		.start	= AT91RM9200_UHP_BASE,+		.end	= AT91RM9200_UHP_BASE + SZ_1M - 1,+		.flags	= IORESOURCE_MEM,+	},+	[1] = {+		.start	= AT91RM9200_ID_UHP,+		.end	= AT91RM9200_ID_UHP,+		.flags	= IORESOURCE_IRQ,+	},+};++static struct platform_device at91rm9200_usbh_device = {+	.name		= "at91_ohci",+	.id		= -1,+	.dev		= {+				.dma_mask		= &ohci_dmamask,+				.coherent_dma_mask	= 0xffffffff,+				.platform_data		= &usbh_data,+	},+	.resource	= at91_usbh_resources,+	.num_resources	= ARRAY_SIZE(at91_usbh_resources),+};++void __init at91_add_device_usbh(struct at91_usbh_data *data)+{+	if (!data)+		return;++	usbh_data = *data;+	platform_device_register(&at91rm9200_usbh_device);+}+#else+void __init at91_add_device_usbh(struct at91_usbh_data *data) {}+#endif+++/* --------------------------------------------------------------------+ *  USB Device (Gadget)+ * -------------------------------------------------------------------- */++#ifdef CONFIG_USB_GADGET_AT91+static struct at91_udc_data udc_data;++static struct resource at91_udc_resources[] = {+	[0] = {+		.start	= AT91RM9200_BASE_UDP,+		.end	= AT91RM9200_BASE_UDP + SZ_16K - 1,+		.flags	= IORESOURCE_MEM,+	},+	[1] = {+		.start	= AT91RM9200_ID_UDP,+		.end	= AT91RM9200_ID_UDP,+		.flags	= IORESOURCE_IRQ,+	},+};++static struct platform_device at91rm9200_udc_device = {+	.name		= "at91_udc",+	.id		= -1,+	.dev		= {+				.platform_data		= &udc_data,+	},+	.resource	= at91_udc_resources,+	.num_resources	= ARRAY_SIZE(at91_udc_resources),+};++void __init at91_add_device_udc(struct at91_udc_data *data)+{+	if (!data)+		return;++	if (data->vbus_pin) {+		at91_set_gpio_input(data->vbus_pin, 0);+		at91_set_deglitch(data->vbus_pin, 1);+	}+	if (data->pullup_pin)+		at91_set_gpio_output(data->pullup_pin, 0);++	udc_data = *data;+	platform_device_register(&at91rm9200_udc_device);+}+#else+void __init at91_add_device_udc(struct at91_udc_data *data) {}+#endif+++/* --------------------------------------------------------------------+ *  Ethernet+ * -------------------------------------------------------------------- */++#if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)+static u64 eth_dmamask = 0xffffffffUL;+static struct at91_eth_data eth_data;++static struct resource at91_eth_resources[] = {+	[0] = {+		.start	= AT91_VA_BASE_EMAC,+		.end	= AT91_VA_BASE_EMAC + SZ_16K - 1,+		.flags	= IORESOURCE_MEM,+	},+	[1] = {+		.start	= AT91RM9200_ID_EMAC,+		.end	= AT91RM9200_ID_EMAC,+		.flags	= IORESOURCE_IRQ,+	},+};++static struct platform_device at91rm9200_eth_device = {+	.name		= "at91_ether",+	.id		= -1,+	.dev		= {+				.dma_mask		= &eth_dmamask,+				.coherent_dma_mask	= 0xffffffff,+				.platform_data		= &eth_data,+	},+	.resource	= at91_eth_resources,+	.num_resources	= ARRAY_SIZE(at91_eth_resources),+};++void __init at91_add_device_eth(struct at91_eth_data *data)+{+	if (!data)+		return;++	if (data->phy_irq_pin) {+		at91_set_gpio_input(data->phy_irq_pin, 0);+		at91_set_deglitch(data->phy_irq_pin, 1);+	}++	/* Pins used for MII and RMII */+	at91_set_A_periph(AT91_PIN_PA16, 0);	/* EMDIO */+	at91_set_A_periph(AT91_PIN_PA15, 0);	/* EMDC */+	at91_set_A_periph(AT91_PIN_PA14, 0);	/* ERXER */+	at91_set_A_periph(AT91_PIN_PA13, 0);	/* ERX1 */+	at91_set_A_periph(AT91_PIN_PA12, 0);	/* ERX0 */+	at91_set_A_periph(AT91_PIN_PA11, 0);	/* ECRS_ECRSDV */+	at91_set_A_periph(AT91_PIN_PA10, 0);	/* ETX1 */+	at91_set_A_periph(AT91_PIN_PA9, 0);	/* ETX0 */+	at91_set_A_periph(AT91_PIN_PA8, 0);	/* ETXEN */+	at91_set_A_periph(AT91_PIN_PA7, 0);	/* ETXCK_EREFCK */++	if (!data->is_rmii) {+		at91_set_B_periph(AT91_PIN_PB19, 0);	/* ERXCK */+		at91_set_B_periph(AT91_PIN_PB18, 0);	/* ECOL */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -