From: Hamish Guthrie Date: Sun, 29 Jul 2007 04:26:11 +0000 (+0000) Subject: Prepare for 2.6.22.1 kernel X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=d9d13461d6e4aea76129a71131949f75aa006ca9 Prepare for 2.6.22.1 kernel SVN-Revision: 8212 --- diff --git a/target/linux/at91-2.6/Makefile b/target/linux/at91-2.6/Makefile index c5c2ab6225..fd9329c027 100644 --- a/target/linux/at91-2.6/Makefile +++ b/target/linux/at91-2.6/Makefile @@ -11,7 +11,8 @@ BOARD:=at91 BOARDNAME:=AT91 FEATURES:=squashfs usb -LINUX_VERSION:=2.6.21.5 +#LINUX_VERSION:=2.6.21.5 +LINUX_VERSION:=2.6.22.1 define Target/Description Build fimware images for Figment Design Labs VersaLink board. diff --git a/target/linux/at91-2.6/config/default b/target/linux/at91-2.6/config/default index eb0081b221..5e74bd616e 100644 --- a/target/linux/at91-2.6/config/default +++ b/target/linux/at91-2.6/config/default @@ -11,6 +11,7 @@ CONFIG_ARCH_AT91RM9200=y # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EP93XX is not set @@ -26,6 +27,7 @@ CONFIG_ARCH_AT91RM9200=y # CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_KS8695 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_NETX is not set @@ -38,6 +40,7 @@ CONFIG_ARCH_AT91RM9200=y # CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set # CONFIG_ARCH_VERSATILE is not set CONFIG_ARM=y CONFIG_ARM_AT91_ETHER=y @@ -47,8 +50,8 @@ CONFIG_ARM_THUMB=y # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set CONFIG_AT91_SPI=y # CONFIG_AT91_SPIDEV is not set -CONFIG_AT91_VLIO=y # CONFIG_ATMEL_TCLIB is not set +CONFIG_ATM_DRIVERS=y # CONFIG_ATM_DUMMY is not set # CONFIG_ATM_TCP is not set CONFIG_BASE_SMALL=0 @@ -115,17 +118,18 @@ CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set CONFIG_FRAME_POINTER=y CONFIG_FS_POSIX_ACL=y -# CONFIG_FW_LOADER is not set +CONFIG_FW_LOADER=m +# CONFIG_GENERIC_CLOCKEVENTS is not set CONFIG_GENERIC_GPIO=y # CONFIG_GENERIC_TIME is not set CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HID=y CONFIG_HW_CONSOLE=y # CONFIG_HW_RANDOM is not set # CONFIG_I2C is not set -# CONFIG_IEEE80211 is not set # CONFIG_IKCONFIG is not set CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m CONFIG_INITRAMFS_SOURCE="" @@ -143,7 +147,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_IP6_NF_RAW is not set # CONFIG_IP6_NF_TARGET_HL is not set # CONFIG_IP6_NF_TARGET_LOG is not set -# CONFIG_IP_DCCP is not set # CONFIG_IP_NF_ARPTABLES is not set # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_TARGET_LOG is not set @@ -167,16 +170,16 @@ CONFIG_LEGACY_PTY_COUNT=32 # CONFIG_MACH_KAFA is not set # CONFIG_MACH_KB9200 is not set # CONFIG_MACH_ONEARM is not set -CONFIG_MACH_VLINK=y +# CONFIG_MACH_PICOTUX2XX is not set CONFIG_MMC=m CONFIG_MMC_AT91=m CONFIG_MMC_BLOCK=m # CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set CONFIG_MTD=y # CONFIG_MTD_ABSENT is not set # CONFIG_MTD_AFS_PARTS is not set CONFIG_MTD_AT91_DATAFLASH=y -CONFIG_MTD_AT91_PARTS=y CONFIG_MTD_BLKDEVS=y CONFIG_MTD_BLOCK=y # CONFIG_MTD_BLOCK2MTD is not set @@ -189,6 +192,7 @@ CONFIG_MTD_CHAR=y CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_DATAFLASH26 is not set # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set @@ -201,7 +205,6 @@ CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set # CONFIG_MTD_ONENAND is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_PHRAM is not set @@ -209,19 +212,18 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_ROM is not set -# CONFIG_MTD_SLRAM is not set # CONFIG_MTD_ROOTFS_ROOT_DEV is not set # CONFIG_MTD_ROOTFS_SPLIT is not set +# CONFIG_MTD_SLRAM is not set +CONFIG_NETDEV_1000=y # CONFIG_NET_EMATCH is not set # CONFIG_NET_IPGRE_BROADCAST is not set # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_RADIO is not set CONFIG_NET_SCH_FIFO=y # CONFIG_NET_SCH_NETEM is not set # CONFIG_NEW_LEDS is not set # CONFIG_NO_IDLE_HZ is not set # CONFIG_NO_IOPORT is not set -# CONFIG_NTFS_FS is not set # CONFIG_NVRAM is not set # CONFIG_OUTER_CACHE is not set CONFIG_PHYLIB=y @@ -234,6 +236,7 @@ CONFIG_PHYLIB=y CONFIG_RTC_LIB=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_WAIT_SCAN=m # CONFIG_SERIAL_8250 is not set CONFIG_SERIAL_ATMEL=y CONFIG_SERIAL_ATMEL_CONSOLE=y @@ -249,12 +252,12 @@ CONFIG_SERIO_SERPORT=y CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_SYSVIPC_SYSCTL=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y +# CONFIG_TICK_ONESHOT is not set CONFIG_UID16=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_USB_ARCH_HAS_EHCI is not set # CONFIG_USB_ATM is not set # CONFIG_USB_CATC is not set -# CONFIG_USB_GTCO is not set # CONFIG_USB_KAWETH is not set CONFIG_USB_LIBUSUAL=y CONFIG_USB_MON=y @@ -263,7 +266,6 @@ CONFIG_USB_MON=y CONFIG_USB_OHCI_HCD=m # CONFIG_USB_PEGASUS is not set # CONFIG_USB_PRINTER is not set -# CONFIG_USB_RTL8150 is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set # CONFIG_USB_SERIAL_FUNSOFT is not set @@ -291,8 +293,8 @@ CONFIG_USB_OHCI_HCD=m # CONFIG_USB_STORAGE_USBAT is not set # CONFIG_USB_USBNET is not set # CONFIG_USB_USBNET_MII is not set -# CONFIG_USB_YEALINK is not set CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_VGASTATE is not set # CONFIG_VGA_CONSOLE is not set CONFIG_VT=y CONFIG_VT_CONSOLE=y diff --git a/target/linux/at91-2.6/patches-2.6.21/000-at91patches.patch b/target/linux/at91-2.6/patches-2.6.21/000-at91patches.patch new file mode 100644 index 0000000000..93fa2cf03c --- /dev/null +++ b/target/linux/at91-2.6/patches-2.6.21/000-at91patches.patch @@ -0,0 +1,10312 @@ +diff -urN -x CVS linux-2.6.21/arch/arm/boot/compressed/head-at91rm9200.S linux-2.6-stable/arch/arm/boot/compressed/head-at91rm9200.S +--- linux-2.6.21/arch/arm/boot/compressed/head-at91rm9200.S Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/boot/compressed/head-at91rm9200.S Tue May 8 12:13:30 2007 +@@ -67,6 +67,12 @@ + cmp r7, r3 + beq 99f + ++ @ Promwad Chub : 1181 ++ mov r3, #(MACH_TYPE_CHUB & 0xff) ++ orr r3, r3, #(MACH_TYPE_CHUB & 0xff00) ++ cmp r7, r3 ++ beq 99f ++ + @ Unknown board, use the AT91RM9200DK board + @ mov r7, #MACH_TYPE_AT91RM9200 + mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff) +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/Kconfig linux-2.6-stable/arch/arm/mach-at91/Kconfig +--- linux-2.6.21/arch/arm/mach-at91/Kconfig Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/Kconfig Wed May 9 10:20:54 2007 +@@ -17,6 +17,9 @@ + config ARCH_AT91SAM9263 + bool "AT91SAM9263" + ++config ARCH_AT91SAM9RL ++ bool "AT91SAM9RL" ++ + endchoice + + # ---------------------------------------------------------- +@@ -87,6 +90,12 @@ + help + Select this if you are using Sperry-Sun's KAFA board. + ++config MACH_CHUB ++ bool "Promwad Chub board" ++ depends on ARCH_AT91RM9200 ++ help ++ Select this if you are using Promwad's Chub board. ++ + endif + + # ---------------------------------------------------------- +@@ -111,6 +120,13 @@ + Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit + + ++config MACH_CAM60 ++ bool "KwikByte CAM60 board" ++ depends on ARCH_AT91SAM9260 ++ help ++ Select this if you are using KwikByte's CAM60 board based on the Atmel AT91SAM9260. ++ ++ + endif + + # ---------------------------------------------------------- +@@ -145,6 +161,20 @@ + + # ---------------------------------------------------------- + ++if ARCH_AT91SAM9RL ++ ++comment "AT91SAM9RL Board Type" ++ ++config MACH_AT91SAM9RLEK ++ bool "Atmel AT91SAM9RL-EK Evaluation Kit" ++ depends on ARCH_AT91SAM9RL ++ help ++ Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit. ++ ++endif ++ ++# ---------------------------------------------------------- ++ + comment "AT91 Board Options" + + config MTD_AT91_DATAFLASH_CARD +@@ -160,6 +190,20 @@ + On AT91SAM926x boards both types of NAND flash can be present + (8 and 16 bit data bus width). + ++config CSB300_WAKE_SW0 ++ bool "CSB300 SW0 irq0 wakeup" ++ depends on MACH_CSB337 && PM ++ help ++ If you have a CSB300 connected to your CSB337, this lets ++ SW0 serve as a wakeup button. It uses IRQ0. ++ ++config CSB300_WAKE_SW1 ++ bool "CSB300 SW1 gpio wakeup" ++ depends on MACH_CSB337 && PM ++ help ++ If you have a CSB300 connected to your CSB337, this lets ++ SW1 serve as a wakeup button. It uses GPIO. ++ + # ---------------------------------------------------------- + + comment "AT91 Feature Selections" +@@ -170,6 +214,20 @@ + Select this if you need to program one or more of the PCK0..PCK3 + programmable clock outputs. + ++config ATMEL_TCLIB ++ bool "Timer/Counter Library" ++ help ++ Select this if you want a library to allocate the Timer/Counter ++ blocks found on many Atmel processors. This facilitates using ++ these modules despite processor differences. ++ ++config AT91_SLOW_CLOCK ++ bool "Suspend-to-RAM uses slow clock mode (EXPERIMENTAL)" ++ depends on PM && EXPERIMENTAL ++ help ++ Select this if you wish to put the CPU into slow clock mode ++ while in the "Suspend to RAM" state, to save more power. ++ + endmenu + + endif +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/Makefile linux-2.6-stable/arch/arm/mach-at91/Makefile +--- linux-2.6.21/arch/arm/mach-at91/Makefile Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/Makefile Wed May 9 12:37:19 2007 +@@ -8,12 +8,15 @@ + obj- := + + obj-$(CONFIG_PM) += pm.o ++obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o ++obj-$(CONFIG_ATMEL_TCLIB) += tclib.o + + # CPU-specific support + 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 + obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o ++obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o + + # AT91RM9200 board-specific support + obj-$(CONFIG_MACH_ONEARM) += board-1arm.o +@@ -25,9 +28,11 @@ + obj-$(CONFIG_MACH_KB9200) += board-kb9202.o + obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o + obj-$(CONFIG_MACH_KAFA) += board-kafa.o ++obj-$(CONFIG_MACH_CHUB) += board-chub.o + + # AT91SAM9260 board-specific support + obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o ++obj-$(CONFIG_MACH_CAM60) += board-cam60.o + + # AT91SAM9261 board-specific support + obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o +@@ -35,9 +40,13 @@ + # AT91SAM9263 board-specific support + obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o + ++# AT91SAM9RL board-specific support ++obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o ++ + # LEDs support + led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o + led-$(CONFIG_MACH_AT91RM9200EK) += leds.o ++led-$(CONFIG_MACH_AT91SAM9261EK)+= leds.o + led-$(CONFIG_MACH_CSB337) += leds.o + led-$(CONFIG_MACH_CSB637) += leds.o + led-$(CONFIG_MACH_KB9200) += leds.o +@@ -45,7 +54,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.21/arch/arm/mach-at91/at91rm9200.c linux-2.6-stable/arch/arm/mach-at91/at91rm9200.c +--- linux-2.6.21/arch/arm/mach-at91/at91rm9200.c Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/at91rm9200.c Tue May 8 12:13:30 2007 +@@ -117,6 +117,21 @@ + .pmc_mask = 1 << AT91RM9200_ID_PIOD, + .type = CLK_TYPE_PERIPHERAL, + }; ++static struct clk ssc0_clk = { ++ .name = "ssc0_clk", ++ .pmc_mask = 1 << AT91RM9200_ID_SSC0, ++ .type = CLK_TYPE_PERIPHERAL, ++}; ++static struct clk ssc1_clk = { ++ .name = "ssc1_clk", ++ .pmc_mask = 1 << AT91RM9200_ID_SSC1, ++ .type = CLK_TYPE_PERIPHERAL, ++}; ++static struct clk ssc2_clk = { ++ .name = "ssc2_clk", ++ .pmc_mask = 1 << AT91RM9200_ID_SSC2, ++ .type = CLK_TYPE_PERIPHERAL, ++}; + static struct clk tc0_clk = { + .name = "tc0_clk", + .pmc_mask = 1 << AT91RM9200_ID_TC0, +@@ -161,7 +176,9 @@ + &udc_clk, + &twi_clk, + &spi_clk, +- // ssc 0 .. ssc2 ++ &ssc0_clk, ++ &ssc1_clk, ++ &ssc2_clk, + &tc0_clk, + &tc1_clk, + &tc2_clk, +@@ -250,6 +267,33 @@ + + + /* -------------------------------------------------------------------- ++ * Timer/Counter library initialization ++ * -------------------------------------------------------------------- */ ++#ifdef CONFIG_ATMEL_TCLIB ++ ++#include "tclib.h" ++ ++static struct atmel_tcblock at91rm9200_tcblocks[] = { ++ [0] = { ++ .physaddr = AT91RM9200_BASE_TCB0, ++ .irq = { AT91RM9200_ID_TC0, AT91RM9200_ID_TC1, AT91RM9200_ID_TC2 }, ++ .clk = { &tc0_clk, &tc1_clk, &tc2_clk }, ++ }, ++ [1] = { ++ .physaddr = AT91RM9200_BASE_TCB1, ++ .irq = { AT91RM9200_ID_TC3, AT91RM9200_ID_TC4, AT91RM9200_ID_TC5 }, ++ .clk = { &tc3_clk, &tc4_clk, &tc5_clk }, ++ }, ++}; ++ ++#define at91rm9200_tc_init() atmel_tc_init(at91rm9200_tcblocks, ARRAY_SIZE(at91rm9200_tcblocks)) ++ ++#else ++#define at91rm9200_tc_init() do {} while(0) ++#endif ++ ++ ++/* -------------------------------------------------------------------- + * AT91RM9200 processor initialization + * -------------------------------------------------------------------- */ + void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks) +@@ -271,6 +315,9 @@ + + /* Initialize GPIO subsystem */ + at91_gpio_init(at91rm9200_gpio, banks); ++ ++ /* Initialize the Timer/Counter blocks */ ++ at91rm9200_tc_init(); + } + + +@@ -284,28 +331,28 @@ + static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { + 7, /* Advanced Interrupt Controller (FIQ) */ + 7, /* System Peripherals */ +- 0, /* Parallel IO Controller A */ +- 0, /* Parallel IO Controller B */ +- 0, /* Parallel IO Controller C */ +- 0, /* Parallel IO Controller D */ +- 6, /* USART 0 */ +- 6, /* USART 1 */ +- 6, /* USART 2 */ +- 6, /* USART 3 */ ++ 1, /* Parallel IO Controller A */ ++ 1, /* Parallel IO Controller B */ ++ 1, /* Parallel IO Controller C */ ++ 1, /* Parallel IO Controller D */ ++ 5, /* USART 0 */ ++ 5, /* USART 1 */ ++ 5, /* USART 2 */ ++ 5, /* USART 3 */ + 0, /* Multimedia Card Interface */ +- 4, /* USB Device Port */ +- 0, /* Two-Wire Interface */ +- 6, /* Serial Peripheral Interface */ +- 5, /* Serial Synchronous Controller 0 */ +- 5, /* Serial Synchronous Controller 1 */ +- 5, /* Serial Synchronous Controller 2 */ ++ 2, /* USB Device Port */ ++ 6, /* Two-Wire Interface */ ++ 5, /* Serial Peripheral Interface */ ++ 4, /* Serial Synchronous Controller 0 */ ++ 4, /* Serial Synchronous Controller 1 */ ++ 4, /* Serial Synchronous Controller 2 */ + 0, /* Timer Counter 0 */ + 0, /* Timer Counter 1 */ + 0, /* Timer Counter 2 */ + 0, /* Timer Counter 3 */ + 0, /* Timer Counter 4 */ + 0, /* Timer Counter 5 */ +- 3, /* USB Host port */ ++ 2, /* USB Host port */ + 3, /* Ethernet MAC */ + 0, /* Advanced Interrupt Controller (IRQ0) */ + 0, /* Advanced Interrupt Controller (IRQ1) */ +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91rm9200_devices.c linux-2.6-stable/arch/arm/mach-at91/at91rm9200_devices.c +--- linux-2.6.21/arch/arm/mach-at91/at91rm9200_devices.c Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/at91rm9200_devices.c Tue May 8 12:13:30 2007 +@@ -480,7 +480,18 @@ + * SPI + * -------------------------------------------------------------------- */ + +-#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) ++#if defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) /* legacy SPI driver */ ++#define SPI_DEVNAME "at91_spi" ++ ++#elif defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) /* SPI bitbanging driver */ ++#define SPI_DEVNAME "at91_spi" ++ ++#elif defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) /* new SPI driver */ ++#define SPI_DEVNAME "atmel_spi" ++ ++#endif ++ ++#ifdef SPI_DEVNAME + static u64 spi_dmamask = 0xffffffffUL; + + static struct resource spi_resources[] = { +@@ -497,7 +508,7 @@ + }; + + static struct platform_device at91rm9200_spi_device = { +- .name = "at91_spi", ++ .name = SPI_DEVNAME, + .id = 0, + .dev = { + .dma_mask = &spi_dmamask, +@@ -606,6 +617,32 @@ + #endif + + ++#if defined(CONFIG_NEW_LEDS) ++ ++static struct platform_device at91_leds = { ++ .name = "at91_leds", ++ .id = -1, ++}; ++ ++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) ++{ ++ if (!nr) ++ return; ++ ++ at91_leds.dev.platform_data = leds; ++ ++ for ( ; nr; nr--, leds++) { ++ leds->index = nr; /* first record stores number of leds */ ++ at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0); ++ } ++ ++ platform_device_register(&at91_leds); ++} ++#else ++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {} ++#endif ++ ++ + /* -------------------------------------------------------------------- + * UART + * -------------------------------------------------------------------- */ +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9260.c linux-2.6-stable/arch/arm/mach-at91/at91sam9260.c +--- linux-2.6.21/arch/arm/mach-at91/at91sam9260.c Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9260.c Tue May 8 12:13:30 2007 +@@ -119,6 +119,11 @@ + .pmc_mask = 1 << AT91SAM9260_ID_SPI1, + .type = CLK_TYPE_PERIPHERAL, + }; ++static struct clk ssc_clk = { ++ .name = "ssc_clk", ++ .pmc_mask = 1 << AT91SAM9260_ID_SSC, ++ .type = CLK_TYPE_PERIPHERAL, ++}; + static struct clk tc0_clk = { + .name = "tc0_clk", + .pmc_mask = 1 << AT91SAM9260_ID_TC0, +@@ -193,7 +198,7 @@ + &twi_clk, + &spi0_clk, + &spi1_clk, +- // ssc ++ &ssc_clk, + &tc0_clk, + &tc1_clk, + &tc2_clk, +@@ -264,6 +269,33 @@ + + + /* -------------------------------------------------------------------- ++ * Timer/Counter library initialization ++ * -------------------------------------------------------------------- */ ++#ifdef CONFIG_ATMEL_TCLIB ++ ++#include "tclib.h" ++ ++static struct atmel_tcblock at91sam9260_tcblocks[] = { ++ [0] = { ++ .physaddr = AT91SAM9260_BASE_TCB0, ++ .irq = { AT91SAM9260_ID_TC0, AT91SAM9260_ID_TC1, AT91SAM9260_ID_TC2 }, ++ .clk = { &tc0_clk, &tc1_clk, &tc2_clk }, ++ }, ++ [1] = { ++ .physaddr = AT91SAM9260_BASE_TCB1, ++ .irq = { AT91SAM9260_ID_TC3, AT91SAM9260_ID_TC4, AT91SAM9260_ID_TC5 }, ++ .clk = { &tc3_clk, &tc4_clk, &tc5_clk }, ++ }, ++}; ++ ++#define at91sam9260_tc_init() atmel_tc_init(at91sam9260_tcblocks, ARRAY_SIZE(at91sam9260_tcblocks)) ++ ++#else ++#define at91sam9260_tc_init() do {} while(0) ++#endif ++ ++ ++/* -------------------------------------------------------------------- + * AT91SAM9260 processor initialization + * -------------------------------------------------------------------- */ + +@@ -310,6 +342,9 @@ + + /* Register GPIO subsystem */ + at91_gpio_init(at91sam9260_gpio, 3); ++ ++ /* Initialize the Timer/Counter blocks */ ++ at91sam9260_tc_init(); + } + + /* -------------------------------------------------------------------- +@@ -322,30 +357,30 @@ + static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = { + 7, /* Advanced Interrupt Controller */ + 7, /* System Peripherals */ +- 0, /* Parallel IO Controller A */ +- 0, /* Parallel IO Controller B */ +- 0, /* Parallel IO Controller C */ ++ 1, /* Parallel IO Controller A */ ++ 1, /* Parallel IO Controller B */ ++ 1, /* Parallel IO Controller C */ + 0, /* Analog-to-Digital Converter */ +- 6, /* USART 0 */ +- 6, /* USART 1 */ +- 6, /* USART 2 */ ++ 5, /* USART 0 */ ++ 5, /* USART 1 */ ++ 5, /* USART 2 */ + 0, /* Multimedia Card Interface */ +- 4, /* USB Device Port */ +- 0, /* Two-Wire Interface */ +- 6, /* Serial Peripheral Interface 0 */ +- 6, /* Serial Peripheral Interface 1 */ ++ 2, /* USB Device Port */ ++ 6, /* Two-Wire Interface */ ++ 5, /* Serial Peripheral Interface 0 */ ++ 5, /* Serial Peripheral Interface 1 */ + 5, /* Serial Synchronous Controller */ + 0, + 0, + 0, /* Timer Counter 0 */ + 0, /* Timer Counter 1 */ + 0, /* Timer Counter 2 */ +- 3, /* USB Host port */ ++ 2, /* USB Host port */ + 3, /* Ethernet */ + 0, /* Image Sensor Interface */ +- 6, /* USART 3 */ +- 6, /* USART 4 */ +- 6, /* USART 5 */ ++ 5, /* USART 3 */ ++ 5, /* USART 4 */ ++ 5, /* USART 5 */ + 0, /* Timer Counter 3 */ + 0, /* Timer Counter 4 */ + 0, /* Timer Counter 5 */ +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6-stable/arch/arm/mach-at91/at91sam9260_devices.c +--- linux-2.6.21/arch/arm/mach-at91/at91sam9260_devices.c Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9260_devices.c Tue May 8 12:13:30 2007 +@@ -527,6 +527,32 @@ + #endif + + ++#if defined(CONFIG_NEW_LEDS) ++ ++static struct platform_device at91_leds = { ++ .name = "at91_leds", ++ .id = -1, ++}; ++ ++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) ++{ ++ if (!nr) ++ return; ++ ++ at91_leds.dev.platform_data = leds; ++ ++ for ( ; nr; nr--, leds++) { ++ leds->index = nr; /* first record stores number of leds */ ++ at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0); ++ } ++ ++ platform_device_register(&at91_leds); ++} ++#else ++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {} ++#endif ++ ++ + /* -------------------------------------------------------------------- + * UART + * -------------------------------------------------------------------- */ +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9261.c linux-2.6-stable/arch/arm/mach-at91/at91sam9261.c +--- linux-2.6.21/arch/arm/mach-at91/at91sam9261.c Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9261.c Tue May 8 12:13:30 2007 +@@ -97,6 +97,21 @@ + .pmc_mask = 1 << AT91SAM9261_ID_SPI1, + .type = CLK_TYPE_PERIPHERAL, + }; ++static struct clk ssc0_clk = { ++ .name = "ssc0_clk", ++ .pmc_mask = 1 << AT91SAM9261_ID_SSC0, ++ .type = CLK_TYPE_PERIPHERAL, ++}; ++static struct clk ssc1_clk = { ++ .name = "ssc1_clk", ++ .pmc_mask = 1 << AT91SAM9261_ID_SSC1, ++ .type = CLK_TYPE_PERIPHERAL, ++}; ++static struct clk ssc2_clk = { ++ .name = "ssc2_clk", ++ .pmc_mask = 1 << AT91SAM9261_ID_SSC2, ++ .type = CLK_TYPE_PERIPHERAL, ++}; + static struct clk tc0_clk = { + .name = "tc0_clk", + .pmc_mask = 1 << AT91SAM9261_ID_TC0, +@@ -135,7 +150,9 @@ + &twi_clk, + &spi0_clk, + &spi1_clk, +- // ssc 0 .. ssc2 ++ &ssc0_clk, ++ &ssc1_clk, ++ &ssc2_clk, + &tc0_clk, + &tc1_clk, + &tc2_clk, +@@ -230,6 +247,28 @@ + + + /* -------------------------------------------------------------------- ++ * Timer/Counter library initialization ++ * -------------------------------------------------------------------- */ ++#ifdef CONFIG_ATMEL_TCLIB ++ ++#include "tclib.h" ++ ++static struct atmel_tcblock at91sam9261_tcblocks[] = { ++ [0] = { ++ .physaddr = AT91SAM9261_BASE_TCB0, ++ .irq = { AT91SAM9261_ID_TC0, AT91SAM9261_ID_TC1, AT91SAM9261_ID_TC2 }, ++ .clk = { &tc0_clk, &tc1_clk, &tc2_clk }, ++ } ++}; ++ ++#define at91sam9261_tc_init() atmel_tc_init(at91sam9261_tcblocks, ARRAY_SIZE(at91sam9261_tcblocks)) ++ ++#else ++#define at91sam9261_tc_init() do {} while(0) ++#endif ++ ++ ++/* -------------------------------------------------------------------- + * AT91SAM9261 processor initialization + * -------------------------------------------------------------------- */ + +@@ -250,6 +289,9 @@ + + /* Register GPIO subsystem */ + at91_gpio_init(at91sam9261_gpio, 3); ++ ++ /* Initialize the Timer/Counter blocks */ ++ at91sam9261_tc_init(); + } + + /* -------------------------------------------------------------------- +@@ -262,25 +304,25 @@ + static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = { + 7, /* Advanced Interrupt Controller */ + 7, /* System Peripherals */ +- 0, /* Parallel IO Controller A */ +- 0, /* Parallel IO Controller B */ +- 0, /* Parallel IO Controller C */ ++ 1, /* Parallel IO Controller A */ ++ 1, /* Parallel IO Controller B */ ++ 1, /* Parallel IO Controller C */ + 0, +- 6, /* USART 0 */ +- 6, /* USART 1 */ +- 6, /* USART 2 */ ++ 5, /* USART 0 */ ++ 5, /* USART 1 */ ++ 5, /* USART 2 */ + 0, /* Multimedia Card Interface */ +- 4, /* USB Device Port */ +- 0, /* Two-Wire Interface */ +- 6, /* Serial Peripheral Interface 0 */ +- 6, /* Serial Peripheral Interface 1 */ +- 5, /* Serial Synchronous Controller 0 */ +- 5, /* Serial Synchronous Controller 1 */ +- 5, /* Serial Synchronous Controller 2 */ ++ 2, /* USB Device Port */ ++ 6, /* Two-Wire Interface */ ++ 5, /* Serial Peripheral Interface 0 */ ++ 5, /* Serial Peripheral Interface 1 */ ++ 4, /* Serial Synchronous Controller 0 */ ++ 4, /* Serial Synchronous Controller 1 */ ++ 4, /* Serial Synchronous Controller 2 */ + 0, /* Timer Counter 0 */ + 0, /* Timer Counter 1 */ + 0, /* Timer Counter 2 */ +- 3, /* USB Host port */ ++ 2, /* USB Host port */ + 3, /* LCD Controller */ + 0, + 0, +diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9261_devices.c linux-2.6-stable/arch/arm/mach-at91/at91sam9261_devices.c +--- linux-2.6.21/arch/arm/mach-at91/at91sam9261_devices.c Thu Apr 26 05:08:32 2007 ++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9261_devices.c Tue May 8 12:56:33 2007 +@@ -14,6 +14,9 @@ + #include + + #include ++#include ++ ++#include